CN101557348B - Message forwarding method and device based on token bucket - Google Patents

Message forwarding method and device based on token bucket Download PDF

Info

Publication number
CN101557348B
CN101557348B CN2009101433911A CN200910143391A CN101557348B CN 101557348 B CN101557348 B CN 101557348B CN 2009101433911 A CN2009101433911 A CN 2009101433911A CN 200910143391 A CN200910143391 A CN 200910143391A CN 101557348 B CN101557348 B CN 101557348B
Authority
CN
China
Prior art keywords
token bucket
message
priority
token
capacity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN2009101433911A
Other languages
Chinese (zh)
Other versions
CN101557348A (en
Inventor
傅嘉嘉
董君
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN2009101433911A priority Critical patent/CN101557348B/en
Publication of CN101557348A publication Critical patent/CN101557348A/en
Application granted granted Critical
Publication of CN101557348B publication Critical patent/CN101557348B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to a message forwarding method and a device thereof based on a token bucket. The method comprises the following steps: token buckets are set based on priority level; the initial capacity of each token bucket of a different priority level is the total available bandwidth; and when receiving a message of certain priority level, the device searches the token bucket matched with the message to forward the message. If the token number of the token bucket of the priority level meets the requirements for the message forwarding, the device then forwards the message; simultaneously the capacities of the token bucket of the priority level and the token bucket of a lower priority level are updated, which equal to the current capacities thereof minus the number of the token used for the message forwarding, and then the capacities thereof after updating are regarded as the current capacities. The message forwarding method and the device thereof realize the low complication andhigh efficiency and are easy to expand the priority level.

Description

A kind of message forwarding method and device based on token bucket
Technical field
The present invention relates to the communications field, relate in particular to a kind of message forwarding method and device based on token bucket.
Background technology
In communication network, usually different real time business are divided into different priority services and transmit, to guarantee the bandwidth demand of high priority.In the prior art; Main Bandwidth Management and the priority management that adopts two kinds of methods to realize above-mentioned different business; A kind of is CBQ (Class Based Queuing, class-based formation) technology, and this technology is mainly passed through the formation of different priorities according to using different scheduling and detection; The message of guaranteeing high priority is able to quick forwarding, and the message of low priority also can have controlled time delay.But because said method is to realize through formation, need a large amount of message of buffer memory, therefore take a large amount of internal memories, small-sized like radio reception device internal memory product on the low side for some, its internal memory is difficult to meet the demands; And the queue scheduling algorithm complicacy and the operational efficiency of said method are poor, if newly-increased a kind of priority then need adjust whole queue structure, so the autgmentability of this method is also poor.
Another kind is to use the token bucket technology, is divided into following several kinds of modes on the implementation again:
A kind of mode is that the general service that a token bucket is given low priority is set; High-priority service need not consume token; Thereby realize the forwarding speed of low priority general service is controlled in certain threshold range, guarantee the high-priority service bandwidth demand, to be that the speed limit threshold value is bad define this method defective; The too high bandwidth availability ratio that causes is low, crosses to hang down can not guarantee the high-priority service bandwidth demand again;
The service message that another kind of mode is normal priority and high priority all is provided with token bucket; When the token number in the token bucket during less than the needed token number of packet to be transmitted, whether be that the packet of high priority is handled it accordingly according to packet to be transmitted, be then it to be transmitted processing; And operable token number is a negative value in the meter token bucket; Otherwise, abandon pending packet, though this method can reduce normal priority business taking line bandwidth on the whole; Thereby guaranteed the high-priority service bandwidth demand; But also be to have sacrificed bandwidth availability ratio, especially when bandwidth is nervous, can not guarantee the high-priority service bandwidth demand well;
It is the renewal rate that the utilized bandwidth of periodic monitor high-priority service is adjusted the professional token bucket of normal priority that a kind of mode is arranged again; The bandwidth sum of the token bucket of high priority and low priority is whole available bandwidths; This method comes down to improve high-priority service bandwidth through the professional bandwidth of restriction normal priority; Improving bandwidth availability ratio and guaranteeing not too big raising on the high-priority service bandwidth with above-mentioned dual mode; And need constantly monitor the bandwidth of high priority, implement cumbersome.
In sum, of the prior art message bandwidth demand management method is existed can't rationally be carried out allocated bandwidth, and bandwidth availability ratio hangs down and the shortcoming that can't effectively guarantee the high-priority service bandwidth demand.
Summary of the invention
In order to address the above problem, the purpose of this invention is to provide a kind of message forwarding method and device that has high efficient band width management, low complex degree and be prone to expansion priority.
For realizing above-mentioned purpose, the invention provides a kind of message forwarding method based on token bucket, comprising:
Based on priority token bucket is set, each different priorities token bucket initialization capacity is whole available bandwidths;
When receiving the message of a certain priority, search the token bucket that is complementary with this message and carry out the message forwarding, if the token number in this priority token bucket satisfies the requirement of transmitting this message, then this message is transmitted;
The capacity that upgrades this priority token bucket and lower priority token bucket is simultaneously transmitted the employed token number of this message for its current capacity deducts, and with the token bucket capacity behind said this priority token bucket and the lower priority update of token bucket as its current capacity.
Said method also comprises: if the token number that detects in this priority token bucket does not satisfy the requirement that message is transmitted, then abandon this message.
Saidly based on priority token bucket is set and comprises:
The token bucket of a certain priority is set to the individual layer token bucket, and said individual layer token bucket is the one-level token bucket, and its capacity is initialized as whole available bandwidths;
Or the token bucket of a certain priority is set to double-deck token bucket; Said double-deck token bucket comprise the one-level token bucket and respectively with this priority in a plurality of secondary token buckets of being complementary of dissimilar messages; Said one-level token bucket initialization capacity is whole available bandwidths, and said a plurality of secondary token bucket capacity sums equal the capacity of said one-level token bucket.
When searching the token bucket that is complementary with this message and be the secondary token bucket, whether the token number that detects in this secondary token bucket satisfies the requirement of transmitting this message, is then this message to be transmitted; Otherwise whether the token number that further detects in this priority one-level token bucket satisfies the requirement of transmitting this message, is then to carry out message to transmit.
This priority token bucket of said renewal is specially when this priority token bucket is double-deck token bucket:
Upgrade the secondary token bucket that this message is complementary and the capacity of this priority one-level token bucket and transmit the employed token number of this message for its current capacity deducts, and will said this secondary token bucket and this one-level update of token bucket after token bucket capacity be its current capacity.
Said renewal lower priority token bucket is specially when the lower priority token bucket is double-deck token bucket:
Upgrade the capacity of this lower priority one-level token bucket and transmit the employed token number of this message for its current capacity deducts;
The capacity that upgrades each secondary token bucket in this lower priority is the employed token number of this message of forwarding that its current capacity deducts corresponding proportion, and said corresponding proportion is the Capacity Ratio of each secondary token bucket and this lower priority one-level token bucket;
And be its current capacity with the token bucket capacity behind secondary token bucket and the one-level update of token bucket in said this lower priority.
The present invention also provides a kind of apparatus for forwarding message based on token bucket, it is characterized in that, said device comprises:
Token bucket is provided with the unit, is used for based on priority token bucket being set, and each different priorities token bucket initialization capacity is whole available bandwidths;
Detect retransmission unit, be used for when receiving the message of a certain priority, adopt the token bucket that is complementary with this message to carry out message and transmit; If the token number in this token bucket satisfies the requirement of transmitting this message; Then this message is transmitted, otherwise abandoned this message, trigger updating block simultaneously;
Updating block; The capacity that is used to upgrade this priority token bucket and lower priority token bucket is transmitted the employed token number of this message for its current capacity deducts, the token bucket capacity of the current capacity of said this priority token bucket and lower priority token bucket after for its renewal.
Said token bucket is provided with the unit and comprises:
The individual layer token bucket is provided with module, and the token bucket that is used for a certain priority is set to the individual layer token bucket, and said individual layer token bucket is the one-level token bucket, and its capacity is initialized as whole available bandwidths; And/or
Double-deck token bucket is provided with module; The token bucket that is used for a certain priority is set to double-deck token bucket; Said double-deck token bucket comprise the one-level token bucket and respectively with this priority in a plurality of secondary token buckets of being complementary of dissimilar messages; Said one-level token bucket initialization capacity is whole available bandwidths, and said a plurality of secondary token bucket capacity sums equal the capacity of said one-level token bucket.
Said detection retransmission unit also comprises:
First detects forwarding module, is used for when the said token bucket that is complementary with this message is the secondary token bucket, and whether the token number that detects in this secondary token bucket satisfies the requirement of transmitting this message, is then this message to be transmitted; Otherwise whether the token number that further detects in this priority one-level token bucket satisfies the requirement of transmitting this message, is then to carry out message to transmit, otherwise abandons this message.
Said updating block comprises: this priority update module; Be used for when this priority token bucket is double-deck token bucket, upgrading the secondary token bucket that this message is complementary and the capacity of this priority one-level token bucket and transmit the employed token number of this message for its current capacity deducts, and will said this secondary token bucket and this one-level update of token bucket after token bucket capacity be its current capacity.
Said updating block comprises:
The low priority update module; The capacity that is used for when being double-deck token bucket than the priority token bucket, upgrading this lower priority one-level token bucket is transmitted the employed token number of this message for its current capacity deducts; And the capacity that upgrades each secondary token bucket in this lower priority deducts the employed token number of this message of forwarding of corresponding proportion for its current capacity; Wherein said corresponding proportion is the Capacity Ratio of each secondary token bucket and this lower priority one-level token bucket, and is its current capacity with the token bucket capacity behind secondary token bucket and the one-level update of token bucket in said this lower priority.
Can know by technique scheme; The present invention adopts mode that the overall situation is provided with token bucket when message is transmitted; The token bucket of all priority all takies whole available bandwidths, thereby can the maximum using bandwidth, and is using high priority token bucket to carry out message when transmitting; Upgrade the bandwidth of its low priority token bucket, thereby the message that has guaranteed high priority can be transmitted definitely with respect to the message of low priority.Implementation complexity of the present invention is low, and efficient is high, and can dynamically increase and delete priority, and only need increase one deck one-level token bucket or the secondary token bucket just can be realized, has unlimited extended capability.
With reference to the accompanying drawing description of a preferred embodiment, above-mentioned and other purpose of the present invention, feature and advantage will be more obvious through following.
Description of drawings
Fig. 1 is the sorting technique sketch map of token bucket of the present invention;
Fig. 2 is the flow chart of the message forwarding method based on token bucket of the present invention;
Fig. 3 is the structural representation of one embodiment of the present of invention token bucket;
Fig. 4 is of the present invention a kind of based on the logical apparatus for forwarding message structured flowchart of token.
Embodiment
To describe specific embodiment of the present invention in detail below.Should be noted that the embodiments described herein only is used to illustrate, be not limited to the present invention.
Design of the present invention is on the basis based on message classification, adopts the mode of overall situation setting and renewal token bucket that message is transmitted, so that maximum using bandwidth and the bandwidth demand that guarantees high priority.
Particularly; The present invention is based on priority token bucket is set; According to the height of priority the token bucket of different priorities is set respectively, the initialization capacity of the token bucket of each priority is whole available bandwidths all, that is to say; In the starting stage, all can have whole available bandwidths when whichsoever the message of priority arrives.
When the message of a certain priority arrives, through the token bucket of respective priority, detect this priority token bucket token number and whether satisfy the requirement that E-Packets, if satisfy, then take the token of respective numbers in this priority token bucket away, this message is transmitted.
If the token number in this priority token bucket does not satisfy the requirement of transmitting this message, generally speaking, then abandon this message.
In above-mentioned E-Packeting; Upgrade the capacity of this priority token bucket and lower priority token bucket; The capacity of this priority token bucket and lower priority token bucket is updated to the token number that its current capacity deducts said respective numbers, and the capacity behind this priority token bucket and the lower priority update of token bucket is its current capacity then.Such update mode is for the message of this priority; When transmitting this message; The message of lower priority can not take the bandwidth of this message, and for the message of low priority, can only take the no remaining bandwidth of high priority; Thereby guaranteed of the absolute forwarding of high priority message, utilized bandwidth substantially with respect to the low priority message.
Further for the message of a certain priority; Can be divided into dissimilar messages again, therefore, the present invention can be arranged to the individual layer token bucket or the double-deck token bucket that are complementary with type of message with the token bucket of certain priority again; Said individual layer token bucket is the one-level token bucket; Said double-deck token bucket comprises one-level token bucket and a plurality of secondary token bucket, and wherein the one-level token bucket takies whole available bandwidths, and the bandwidth sum of a plurality of secondary token buckets equals the bandwidth of same priority one-level token bucket.As shown in Figure 1, what the high priority message was adopted is the individual layer token bucket that has only the one-level token bucket, and what the lower priority message was adopted is the double-deck token bucket that comprises an one-level token bucket and three secondary token buckets; Certainly, otherwise also can be provided with, the high priority message adopts double-deck token bucket, and the lower priority message adopts the individual layer token bucket.
Wherein the set-up mode of certain priority token bucket is decided according to type of message; Such as need to mate four types message in this priority; Token bucket in this priority level just can be divided into an one-level token bucket and four secondary token buckets that mate with type of message so; The setting of the one-level token bucket in the double-deck here token bucket is exactly to give its same priority not interior secondary token bucket for the reasonable distribution bandwidth; This one-level token bucket is a virtual token bucket, is carrying out message when transmitting, not physical presence.If have only a kind of type of message in this priority level, only need to set an one-level token bucket and get final product.
The present invention adopts the token bucket of above-mentioned classification when different classes of message is transmitted, and according to following flow process message is transmitted, and is as shown in Figure 2:
1, message gets in the token bucket of its coupling through grader;
2, detecting institute and mate token number in the token bucket and whether satisfy message and transmit the needed token number of processing, is then just to transmit processing.According to multi-form coupling token bucket, above-mentioned detection mode is also different:
If coupling is the one-level token bucket, token number is wherein then directly transmitted processing if meet the demands;
If coupling is the secondary token bucket; Token number wherein is if meet the demands; Then directly transmit processing, if do not meet the demands, need detect its corresponding one-level token bucket further and whether satisfy message and transmit needed token number; If its corresponding one-level token bucket meets the demands, then this message is transmitted processing;
3, pass through in above-mentioned detection, when E-Packeting, the capacity of the token bucket that need upgrading E-Packets is adopted and the token bucket of priority thereof, its update mode according to double-deck token bucket with the individual layer token bucket and different:
If coupling is the one-level token bucket; When E-Packeting, upgrade the token number of this one-level token bucket and the token number of lower priority token bucket; Capacity after the renewal deducts the needed capacity that E-Packets for its current capacity; When next message arrived, the current capacity of the token number of this one-level token bucket and lower priority token bucket was for transmitting the capacity after this message upgrades then.If coupling is the secondary token bucket; No matter be that this secondary token bucket or its corresponding one-level token bucket satisfy the needed token number that E-Packets; When E-Packeting, all need upgrade this secondary token bucket, the one-level token bucket of correspondence and the capacity of lower priority token bucket; The capacity of this secondary token bucket after the renewal, this priority one-level token bucket and lower priority token bucket deducts the needed token number that E-Packets for its current capacity; When next message arrived, the current capacity of this secondary token bucket, this priority one-level token bucket and lower priority token bucket was for transmitting the capacity after this message upgrades then.
Wherein here when upgrading the lower priority token bucket; If this lower priority token bucket is double-deck token bucket; The capacity of this lower priority one-level token bucket is updated to its current capacity and deducts the needed token number that E-Packets; And this lower priority secondary token bucket upgrades according to its capacity and this lower priority one-level token bucket capacity ratio, and the capacity after the renewal deducts the token number that message is transmitted that is used for of corresponding proportion for its current capacity.
Such update mode has guaranteed that the message of high priority preferentially transmits, and the message of low priority can only take the unwanted remaining bandwidth of high priority message;
Summarized the basic technical scheme that the present invention is adopted above when E-Packeting; Come to explain further technical scheme of the present invention from a specific embodiment that combines Fig. 1-3 below; In this embodiment, the token bucket that is adopted comprises individual layer token bucket or multilayer token bucket.
Supposing to carry out message, to transmit whole available bandwidths be 20M; The capacity of all the one-level token buckets from the high priority to the low priority all is 20M; As shown in Figure 3; Example goes out the token bucket of three priority from high to low, and the token bucket of high priority has only an one-level token bucket A, and the token bucket of lower priority comprises one-level token bucket and secondary token bucket.For the individual layer token bucket, above-mentioned when message is transmitted the detection renewal process to token bucket be a computational process, double-deck token bucket then is that once or twice detection is upgraded:
(1) detection of double-deck token bucket is upgraded
Suppose that token bucket comprises one-level token bucket E in certain priority; Three secondary token bucket B, C and D; Wherein the bandwidth of one-level token bucket E is total bandwidth 20M, equals secondary token bucket B, C and D bandwidth sum, and the bandwidth of secondary token bucket B, C and D is respectively 10M, 5M and 5M here.
When the message of match-type B passed through token bucket, whether the token number that calculates earlier among the secondary token bucket B met the demands.
If the token number among the current secondary token bucket B meets the demands; Then upgrade the corresponding token number of token bucket B; Here suppose that each token allows to send the message of a byte; Just from token bucket, deduct token number, also the corresponding one-level token bucket E of token bucket B is upgraded simultaneously, deduct token number corresponding to the message data amount corresponding to the message data amount.At this moment; Secondary token bucket C in the same priority and D institute employable total bandwidth are with regard to the bandwidth of minimizing corresponding to the message data amount; The mode of when upgrading the secondary token bucket, also its corresponding one-level token bucket being upgraded like this makes this secondary token bucket when E-Packeting, can be retained to the flow of rare 10M.
If the token number among the current secondary token bucket B does not meet the demands; Whether the token number that then detects further among its corresponding one-level token bucket E meets the demands; If this moment, token bucket E met the demands; Likewise the message of this match-type B is transmitted, just when transmitting this message, from one-level token bucket E, taken away the token number of insufficient section among the token bucket B, the message of this explanation match-type C this moment and D does not reach the speed limit upper limit of forwarding; Thereby guaranteed that when bandwidth is idle the dissimilar messages of same priority in are the maximum using bandwidth as far as possible.In the case, equally also to upgrade the token number of token bucket E.
And, under above-mentioned two kinds of situation,, also to upgrade the token number of all token buckets of its low priority simultaneously, i.e. token bucket F, token bucket G and token bucket H except renewal to token bucket E.Suppose the 1M that is of above-mentioned message; Then one-level token bucket H should reduce the token number of 1M; And secondary token bucket G and H according to current rank its token number ratio that takies upgrade, wherein secondary token bucket F reduces 1M* (5M/20M)=1/4M, secondary token bucket G reduces 1M* (15M/20M)=3/4M.When guaranteeing that like this high priority type of message B transmits, the message of low priority type F and G can only take remaining bandwidth, thereby has realized the absolute forwarding of high priority.
(2) detection of individual layer token bucket is upgraded
For the individual layer token bucket that has only the one-level token bucket; Through out-of-date, whether the token number that directly detects wherein satisfies the needs that message is transmitted as the message of match-type, such as the message of the match-type A of limit priority is through out-of-date; A detects to the one-level token bucket; If meet the demands, just directly transmit, otherwise discard this message.
This moment, the message forwarding upper limit of type A was exactly the bandwidth of whole token bucket A, as long as the message process of type A is arranged, no matter other types message occupied bandwidth whether can directly carry out its forwarding.
When transmitting, also to upgrade to H token bucket B, update method is the same with the update mode of above-mentioned double-deck token bucket.Just guaranteed that when the message of type A is transmitted the other types message of lower priority can only take the unwanted remaining bandwidth of type A message, and distribute like this according to bandwidth separately.
Corresponding to method of the present invention, the present invention also provides a kind of apparatus for forwarding message based on token bucket, and is as shown in Figure 4, and this device comprises:
Token bucket is provided with unit 101, is used for based on priority token bucket being set, and each different priorities token bucket initialization capacity is whole available bandwidths;
Detect retransmission unit 102; Be used for when receiving the message of a certain priority; Adopt the token bucket that is complementary with this message to carry out message and transmit,, then this message is transmitted if the token number in this token bucket satisfies the requirement of transmitting this message; Otherwise abandon this message, trigger updating block simultaneously;
Updating block 103; The capacity that is used to upgrade this priority token bucket and lower priority token bucket is transmitted the employed token number of this message for its current capacity deducts, the token bucket capacity of the current capacity of said this priority token bucket and lower priority token bucket after for its renewal.
Based on the different type of messages in certain priority, said token bucket is provided with unit 101 and comprises:
The individual layer token bucket is provided with module, and the token bucket that is used for a certain priority is set to the individual layer token bucket, and said individual layer token bucket is the one-level token bucket, and its capacity is initialized as whole available bandwidths; And/or
Double-deck token bucket is provided with module; The token bucket that is used for a certain priority is set to double-deck token bucket; Said double-deck token bucket comprise the one-level token bucket and respectively with this priority in a plurality of secondary token buckets of being complementary of dissimilar messages; Said one-level token bucket initialization capacity is whole available bandwidths, and said a plurality of secondary token bucket capacity sums equal the capacity of said one-level token bucket.
When the token bucket that a certain priority in unit is set when said token bucket was set to double-deck token bucket, said detection retransmission unit 102 comprised:
First detects forwarding module, is used for when the said token bucket that is complementary with this message is the secondary token bucket, and whether the token number that detects in this secondary token bucket satisfies the requirement of transmitting this message, is then this message to be transmitted; Otherwise whether the token number that further detects in this priority one-level token bucket satisfies the requirement of transmitting this message, is then to carry out message to transmit, otherwise abandons this message.
When the token bucket that a certain priority in unit is set when said token bucket is set to double-deck token bucket; Said updating block comprises: this priority update module; Be used for when this priority token bucket is double-deck token bucket, upgrading the secondary token bucket that this message is complementary and the capacity of this priority one-level token bucket and transmit the employed token number of this message for its current capacity deducts, and will said this secondary token bucket and this one-level update of token bucket after token bucket capacity be its current capacity.
When the token bucket that a certain priority in unit is set when said token bucket was set to double-deck token bucket, said updating block 103 comprised:
The low priority update module; The capacity that is used for when being double-deck token bucket than the priority token bucket, upgrading this lower priority one-level token bucket is transmitted the employed token number of this message for its current capacity deducts; And the capacity that upgrades each secondary token bucket in this lower priority deducts the employed token number of this message of forwarding of corresponding proportion for its current capacity; Wherein said corresponding proportion is the Capacity Ratio of each secondary token bucket and this lower priority one-level token bucket, and is its current capacity with the token bucket capacity behind secondary token bucket and the one-level update of token bucket in said this lower priority.
Though described the present invention with reference to above-mentioned exemplary embodiments, should be appreciated that used term is explanation and exemplary and nonrestrictive term.Because the present invention's practical implementation and do not break away from the spirit or the essence of invention in a variety of forms; So be to be understood that; The foregoing description is not limited to any aforesaid details; And should in enclose spirit that claim limited and scope, explain widely, therefore fall into whole variations and remodeling in claim or its equivalent scope and all should be the claim of enclosing and contain.

Claims (11)

1. the message forwarding method based on token bucket is characterized in that, said method comprises:
Based on priority token bucket is set, each different priorities token bucket initialization capacity is whole available bandwidths;
When receiving the message of a certain priority, search the token bucket that is complementary with this message and carry out the message forwarding, if the token number in this priority token bucket satisfies the requirement of transmitting this message, then this message is transmitted;
The capacity that upgrades this priority token bucket and lower priority token bucket is simultaneously transmitted the employed token number of this message for its current capacity deducts, and with the token bucket capacity behind said this priority token bucket and the lower priority update of token bucket as its current capacity.
2. message forwarding method according to claim 1 is characterized in that, also comprises: if the token number that detects in this priority token bucket does not satisfy the requirement that message is transmitted, then abandon this message.
3. message forwarding method according to claim 1 and 2 is characterized in that, saidly based on priority token bucket is set and comprises:
The token bucket of a certain priority is set to the individual layer token bucket, and said individual layer token bucket is the one-level token bucket, and its capacity is initialized as whole available bandwidths;
Or the token bucket of a certain priority is set to double-deck token bucket; Said double-deck token bucket comprise the one-level token bucket and respectively with this priority in a plurality of secondary token buckets of being complementary of dissimilar messages; Said one-level token bucket initialization capacity is whole available bandwidths, and said a plurality of secondary token bucket capacity sums equal the capacity of said one-level token bucket.
4. message forwarding method according to claim 3; It is characterized in that; When the token bucket that is complementary with this message that finds was the secondary token bucket, whether the token number that detects in this secondary token bucket satisfied the requirement of transmitting this message, is then this message to be transmitted;
Otherwise whether the token number that further detects in this priority one-level token bucket satisfies the requirement of transmitting this message, is then to carry out message to transmit.
5. message forwarding method according to claim 3 is characterized in that, this priority token bucket of said renewal is specially when this priority token bucket is double-deck token bucket:
Upgrade the secondary token bucket that is complementary with this message and the capacity of this priority one-level token bucket and transmit the employed token number of this message for its current capacity deducts, and will said this secondary token bucket and this one-level update of token bucket after token bucket capacity as its current capacity.
6. message forwarding method according to claim 3 is characterized in that, said renewal lower priority token bucket is specially when the lower priority token bucket is double-deck token bucket:
Upgrade the capacity of this lower priority one-level token bucket and transmit the employed token number of this message for its current capacity deducts;
The capacity that upgrades each secondary token bucket in this lower priority is the employed token number of this message of forwarding that its current capacity deducts corresponding proportion, and said corresponding proportion is the Capacity Ratio of each secondary token bucket and this lower priority one-level token bucket;
And be its current capacity with the token bucket capacity behind secondary token bucket and the one-level update of token bucket in said this lower priority.
7. the apparatus for forwarding message based on token bucket is characterized in that, said device comprises:
Token bucket is provided with the unit, is used for based on priority token bucket being set, and each different priorities token bucket initialization capacity is whole available bandwidths;
Detect retransmission unit; Be used for when receiving the message of a certain priority; Adopt the token bucket that is complementary with this message to carry out message and transmit,, then this message is transmitted if the token number in this token bucket satisfies the requirement of transmitting this message; Otherwise abandon this message, when transmitting this message, trigger updating block;
Updating block; The capacity that is used to upgrade this priority token bucket and lower priority token bucket is transmitted the employed token number of this message for its current capacity deducts, the token bucket capacity of the current capacity of said this priority token bucket and lower priority token bucket after for its renewal.
8. apparatus for forwarding message according to claim 7 is characterized in that, said token bucket is provided with the unit and comprises:
The individual layer token bucket is provided with module, and the token bucket that is used for a certain priority is set to the individual layer token bucket, and said individual layer token bucket is the one-level token bucket, and its capacity is initialized as whole available bandwidths; And/or
Double-deck token bucket is provided with module; The token bucket that is used for a certain priority is set to double-deck token bucket; Said double-deck token bucket comprise the one-level token bucket and respectively with this priority in a plurality of secondary token buckets of being complementary of dissimilar messages; Said one-level token bucket initialization capacity is whole available bandwidths, and said a plurality of secondary token bucket capacity sums equal the capacity of said one-level token bucket.
9. apparatus for forwarding message according to claim 8 is characterized in that, said detection retransmission unit also comprises:
First detects forwarding module, is used for when the said token bucket that is complementary with this message is the secondary token bucket, and whether the token number that detects in this secondary token bucket satisfies the requirement of transmitting this message, is then this message to be transmitted; Otherwise whether the token number that further detects in this priority one-level token bucket satisfies the requirement of transmitting this message, is then to carry out message to transmit, otherwise abandons this message.
10. apparatus for forwarding message according to claim 8; It is characterized in that; Said updating block comprises: this priority update module; Be used for when this priority token bucket is double-deck token bucket upgrading the secondary token bucket that is complementary with this message and the capacity of this priority one-level token bucket and transmit the employed token number of this message for its current capacity deducts, and will said this secondary token bucket and this one-level update of token bucket after token bucket capacity as its current capacity.
11. apparatus for forwarding message according to claim 8 is characterized in that, said updating block comprises:
The low priority update module; The capacity that is used for when the lower priority token bucket is double-deck token bucket, upgrading this lower priority one-level token bucket is transmitted the employed token number of this message for its current capacity deducts; And the capacity that upgrades each secondary token bucket in this lower priority deducts the employed token number of this message of forwarding of corresponding proportion for its current capacity; Wherein said corresponding proportion is the Capacity Ratio of each secondary token bucket and this lower priority one-level token bucket, and with the token bucket capacity behind secondary token bucket and the one-level update of token bucket in said this lower priority as its current capacity.
CN2009101433911A 2009-05-25 2009-05-25 Message forwarding method and device based on token bucket Active CN101557348B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009101433911A CN101557348B (en) 2009-05-25 2009-05-25 Message forwarding method and device based on token bucket

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009101433911A CN101557348B (en) 2009-05-25 2009-05-25 Message forwarding method and device based on token bucket

Publications (2)

Publication Number Publication Date
CN101557348A CN101557348A (en) 2009-10-14
CN101557348B true CN101557348B (en) 2012-03-28

Family

ID=41175298

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009101433911A Active CN101557348B (en) 2009-05-25 2009-05-25 Message forwarding method and device based on token bucket

Country Status (1)

Country Link
CN (1) CN101557348B (en)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102148830B (en) 2011-03-31 2014-03-26 杭州华三通信技术有限公司 Method for controlling flow of authentication server and authentication access device
WO2013000114A1 (en) * 2011-06-28 2013-01-03 中兴通讯股份有限公司 Rate limit method and device for leaky bucket
WO2013000112A1 (en) * 2011-06-28 2013-01-03 中兴通讯股份有限公司 Rate limit method and device for leaky bucket
WO2013000113A1 (en) * 2011-06-28 2013-01-03 中兴通讯股份有限公司 Rate limit method and apparatus for leaky bucket
CN103997467B (en) * 2014-05-20 2017-11-14 深圳市共进电子股份有限公司 A kind of method and device of data flow Stochastic Fair share of bandwidth
CN104219169B (en) * 2014-09-30 2017-11-10 新华三技术有限公司 Class-based queue CBQ dispatching methods and equipment
CN104702528B (en) * 2015-04-09 2018-07-10 深圳中兴网信科技有限公司 Flow control methods and flow control system
CN105991467B (en) * 2015-04-15 2019-05-07 杭州迪普科技股份有限公司 A kind of message forwarding method and device
CN106302239A (en) * 2015-05-25 2017-01-04 深圳市中兴微电子技术有限公司 A kind of method and device of single multicast flow scheduling management
CN106330755A (en) * 2015-06-16 2017-01-11 中兴通讯股份有限公司 Message flow regulation method and device and mobile communication gateway
CN105939285A (en) * 2015-08-21 2016-09-14 杭州迪普科技有限公司 Message forwarding method and device
CN105764091B (en) * 2016-02-19 2019-02-01 杭州敦崇科技股份有限公司 A method of effective use wireless bandwidth
CN106603429B (en) * 2016-12-16 2019-12-03 无锡路通视信网络股份有限公司 A kind of ACS system overload guard method based on token bucket
CN108418766B (en) * 2018-03-05 2021-12-17 京信网络系统股份有限公司 Bandwidth control method, device and system
CN110943934A (en) * 2019-11-19 2020-03-31 上海钧正网络科技有限公司 Service request processing method, system, terminal and readable storage medium
CN115080657B (en) * 2021-03-10 2024-09-27 中国移动通信集团山东有限公司 Operation token distribution method, system and equipment applied to distributed storage
CN112953848B (en) * 2021-03-12 2023-05-02 西安电子科技大学 Traffic supervision method, system and equipment based on strict priority
CN115766592A (en) * 2022-10-31 2023-03-07 中科驭数(北京)科技有限公司 Flow rate limiting method based on priority, DPU message forwarding method and device

Also Published As

Publication number Publication date
CN101557348A (en) 2009-10-14

Similar Documents

Publication Publication Date Title
CN101557348B (en) Message forwarding method and device based on token bucket
US6922408B2 (en) Packet communication buffering with dynamic flow control
CN103841041B (en) A kind of multi-stream service concurrent transmission control method and device
CN100579065C (en) Transmission method and device for high speed data flow and data exchange device
CN104796337A (en) Method and device for forwarding message
US8817619B2 (en) Network system with quality of service management and associated management method
CN102811176B (en) A kind of data flow control method and device
CN102111819B (en) Delay-tolerant network
US20080063004A1 (en) Buffer allocation method for multi-class traffic with dynamic spare buffering
US20120188873A1 (en) Communication system, communication method, receiving apparatus, and transmitting apparatus
TW201338470A (en) System and method for performing packet queuing on a client device using packet service classifications
WO2014117347A1 (en) Data scheduling method and apparatus
CN104079502A (en) Multi-user multi-queue scheduling method
CN105764091B (en) A method of effective use wireless bandwidth
CN104780118B (en) A kind of flow control method and device based on token
CN101207570A (en) Data transmission method, data sending rate control method and base station
CN104302008A (en) Wireless multi-hop network bandwidth allocation method integrating time division and cache proportion
CN101964751B (en) Transmission method and device of data packets
CN111131061B (en) Data transmission method and network equipment
CN110213170A (en) A kind of method and device of message transmissions
CN101053222B (en) Method for transmitting supplying to use data with data block mode
CN109039934B (en) Space DTN network congestion control method and system
CN104066122B (en) A kind of honeycomb and the congestion control and transmission dispatching method in D2D hybrid networks
CN102404225A (en) Method for rapid enqueue of packet for differential queue service system
CN117155874A (en) Data packet transmitting method, forwarding node, transmitting terminal and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Patentee after: Xinhua three Technology Co., Ltd.

Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base

Patentee before: Huasan Communication Technology Co., Ltd.

CP03 Change of name, title or address