CN101997766A - Method and system for limiting speed of token bucket based on priority - Google Patents

Method and system for limiting speed of token bucket based on priority Download PDF

Info

Publication number
CN101997766A
CN101997766A CN2009101694112A CN200910169411A CN101997766A CN 101997766 A CN101997766 A CN 101997766A CN 2009101694112 A CN2009101694112 A CN 2009101694112A CN 200910169411 A CN200910169411 A CN 200910169411A CN 101997766 A CN101997766 A CN 101997766A
Authority
CN
China
Prior art keywords
token
bucket
message
speed limit
current
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.)
Granted
Application number
CN2009101694112A
Other languages
Chinese (zh)
Other versions
CN101997766B (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.)
Sanechips Technology Co Ltd
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN200910169411A priority Critical patent/CN101997766B/en
Publication of CN101997766A publication Critical patent/CN101997766A/en
Application granted granted Critical
Publication of CN101997766B publication Critical patent/CN101997766B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method and a system for limiting speed of a token bucket based on priority. The method comprises the following steps of: configuring speed limiting parameters of a message according to the attribute of the message, wherein the speed limiting parameters comprise a speed limiting value and gradually decreased depths of token buckets at different stages, and ensuring that the token number in the token bucket at the highest stage is greater than or equal to sum of the token numbers in the token buckets at the rest stages of the token buckets; calculating the token number to be added after receiving the message; limiting the speed of the current message by using the token bucket at the highest stage when determining that priority speed limiting is not needed; limiting the speed of the current message by using the token bucket corresponding to the number of stages of the current message for the messages with the same priority number of the message as the speed limiting stage number when determining that priority speed limiting is needed; and limiting the speed of the current message for the messages with different priority stage of the message from the speed limiting stage number by using the token bucket at the highest stage. Through the method and the system, different messages have different discard probabilities under the condition of the same speed limiting condition, and the service quality of a network is improved.

Description

A kind of method and system of the token bucket speed limit based on priority
Technical field
The present invention relates to field of data networks, relate in particular to the message rate-limiting technology in the network.
Background technology
In existing data network,, usually can cause network congestion because message flow is sudden.Avoid a kind of method of network congestion to be, message is carried out speed limit,, then normally receive message if the speed of message is lower than the speed of regulation at receiving terminal; If the speed of message surpasses the speed of regulation,, perhaps reduce priority of messages etc. then with packet loss.
The method that generally adopts is to utilize token bucket that message is carried out speed limit at present.As shown in Figure 1, system's speed is in accordance with regulations constantly filled token in token bucket, till token bucket is filled.When message arrives, follow the token number in the token bucket to compare the length of message, if enough tokens are arranged in the token bucket, then message allows to pass through, and deducts the pairing token number of message length simultaneously from token bucket; If the token in the token bucket is not enough,, perhaps reduce the transmission priority of message then with packet loss.
Existing standard based on token bucket algorithm commonly used has RFC2697 and RFC2698, i.e. single-rate three look twin-tubs and dual rate three look twin-tubs.The Chinese application number of the patent of Huawei Tech Co., Ltd " based on the access rate method for limiting of token bucket algorithm ": 03135014.3 application improves the canonical algorithm based on RFC2697, the method of utilization token debt-credit makes the high priority message can borrow or lend money token, the low priority message then haves no right to borrow or lend money, distinguish the service quality of high low priority to a certain extent, but can't satisfy the difference of an amount.
In above-mentioned existing method, the fill rate of token has limited the speed that receives message, network be about to congested in, how many quilts of message token number in the long and token bucket discarding at random because of the bag of self, the chance that is dropped for all messages of same token bucket is impartial, such result just is to use the user of the user of high priority of same token bucket and domestic consumer and low priority in by speed limit, and the service quality of high-priority users can not get difference and embodies.Though above-mentioned patent improves to some extent to a certain extent, but whether it be that boundary is treated the just way of priority packet with a certain discrimination greater than zero with token number, because the negative computing that debt-credit is repaid increases the complexity and the resource occupation of design, and in critical condition, high low priority is imposed uniformity without examining individual cases, and can't satisfy equipment user's accurate demand.
Therefore, there is certain defective in prior art, requires further improvement and develops
Summary of the invention
Technical problem to be solved by this invention provides a kind of method and system of the token bucket speed limit based on message priority, when overcoming the usefulness token bucket methodology speed limit that exists in the prior art, the height nondistinctive problem of priority packet and defective provide a kind of method of the token bucket speed limit based on priority.
In order to solve the problems of the technologies described above, the invention provides a kind of method of the token bucket speed limit based on priority, comprising:
Speed limit parameter according to the attribute configuration message of message comprises speed limit, and the token buckets at different levels that successively decrease one by one are dark, and guarantees that token number in the highest token bucket is more than or equal to the token number sum in all the other token buckets at different levels;
Receive after the message token number that calculating will be added;
Need not carry out the priority speed limit when determining, then the token number that will add adds in the into highest token bucket, utilizes highest token bucket that current message is carried out speed limit; And
To carry out the priority speed limit when determining, for the message priority number message identical with speed limit progression, the token number that will add simultaneously adds in into highest token bucket and the pairing token bucket of current message progression, utilizes the pairing token bucket of current message progression that current message is carried out speed limit;
For the message priority number message different with speed limit progression, then the token number that will add adds in the into highest token bucket, utilizes highest token bucket that current message is carried out speed limit.
In order to solve the problems of the technologies described above, the present invention also provides a kind of system of the token bucket speed limit based on priority, comprising:
Configuration module is used for the speed limit parameter according to the attribute configuration message of message, comprises speed limit, and the token buckets at different levels that successively decrease one by one are dark, and guarantees that token number in the highest token bucket is more than or equal to the token number sum in all the other token buckets at different levels;
Receiver module is used to receive current message;
Acquisition module obtains the corresponding speed limit parameter that gets with current message attribute;
Computing module is used to receive after the message token number that calculating will be added;
First judge module is used for need not carrying out the priority speed limit when determining, and sends first triggering signal;
First processing module, be used to receive described first triggering signal after, the token number that will add adds in the into highest token bucket, utilizes highest token bucket that current message is carried out speed limit;
Second judge module is used for will carrying out the priority speed limit when determining, and further determines the message priority number when identical with speed limit progression, sends second triggering signal;
Second processing module, the token number that is used for will adding simultaneously adds into highest token bucket and the pairing token bucket of current message progression, utilizes the pairing token bucket of current message progression that current message is carried out speed limit;
The 3rd judge module is used for will carrying out the priority speed limit when determining, and further determines message priority number and speed limit progression not simultaneously, sends the 3rd triggering signal;
The 3rd processing module, the token number that is used for adding are added into highest token bucket, utilize highest token bucket that current message is carried out speed limit.
This method is compared with current techniques, provide a kind of can be based on the token bucket method for limiting speed of priority, make different messages under same speed limit condition, different drop probabilities be arranged, be that high priority can pass through under network congestion fast, the message of low priority has higher drop probability, avoided current techniques when token bucket speed limit, high level message is by the problem of random drop under the network congestion, reached the effect of speed limit, save Internet resources, improved the service quality of network simultaneously.
Description of drawings
Fig. 1 is a token bucket speed limit schematic diagram.
Fig. 2 adopts the method for the token bucket speed limit the present invention is based on priority low priority packet to be carried out the schematic diagram of speed limit.
Fig. 3 adopts the schematic diagram of the method for the token bucket speed limit based on priority of the present invention to non-low priority packet speed limit.
Fig. 4 is the method flow diagram of token bucket speed limit based on priority of the present invention.
Fig. 5 is the system construction drawing of token bucket speed limit based on priority of the present invention.
Embodiment
Main thought of the present invention is that the token bucket of different speed limit progression is set is dark, when the progression of the current message that receives is identical with progression that will speed limit, uses and with the corresponding token bucket of the progression of speed limit current message is carried out speed limit and handle; When the progression of the current message that receives and progression that will speed limit not simultaneously, utilize five-star token bucket that current message is carried out speed limit and handle.Specifically, may further comprise the steps:
The speed limit parameter of configuration message comprises speed limit, and the token buckets at different levels that successively decrease one by one are dark, and guarantees that token number in the highest token bucket is more than or equal to the token number sum in all the other token buckets at different levels;
Receive after the message token number that calculating will be added;
Judge whether to carry out the priority speed limit, if need not carry out the priority speed limit, then the token number that will add adds in the into highest token bucket, utilizes highest token bucket that current message is carried out speed limit;
To carry out the priority speed limit if determine, then further judge the priority of messages number, for the message priority number message identical with speed limit progression, the token number that will add simultaneously adds in into highest token bucket and the pairing token bucket of current message progression, utilize the pairing token bucket of current message progression that current message is carried out speed limit, upgrade the token number in highest token bucket and the pairing token bucket of current message progression afterwards simultaneously;
For the message priority number message different with speed limit progression, then the token number that will add adds in the into highest token bucket, utilizes highest token bucket that current message is carried out speed limit; And guarantee that token number in the highest token bucket is more than or equal to the token number sum in all the other token buckets at different levels.
Be described in further detail below in conjunction with the enforcement of accompanying drawing technical scheme:
In first preferred embodiment of the present invention, speed limit progression comprises two-stage: low priority and high priority, and the method based on the token bucket speed limit of priority in the present embodiment needs following configuration in the time of enforcement:
The speed limit of 1 configuration different attribute message, (unit of speed limit is bps).Concrete numerical value can be set according to actual needs, here the configuration of speed limit is to determine according to different users, the bandwidth ratio that the user that service class is high distributes is bigger, so corresponding speed limit comparatively speaking can be more greatly such as 10M, the general user may be 1M) (the attribute here is meant that different messages is from different sources or user), should comprise whether needing enabling of low priority speed limit simultaneously;
The token bucket degree of depth of 2 configuration message speed limits comprises the total barrel of degree of depth and the low priority token bucket degree of depth, and it should be noted that the low priority bucket is dark must be less than the degree of depth of total bucket, simultaneously must be greater than zero;
3 storage devices that are used for each token bucket token number of real-time storage.
Here specify the execution mode of this method by example.
With reference to shown in Figure 2, for example receive a low priority message, need carry out the low priority speed limit to it, its step is as follows:
1) attribute according to message obtains configuration, the speed of speed limit, and total token bucket bucket is dark, and the bucket of low priority bucket is dark, whether carries out the low priority speed limit;
By above narrating as can be known, based on configuration before, have the corresponding different configuration of message of different attribute, like this,, just can obtain its corresponding configuration according to the attribute of the message that acquires.For example whole network service object has 100, and these 100 users can number 0-99 so, and the corresponding configuration of each numbering is searched corresponding configuration according to numbering when each message arrives.
2) according to the speed limit speed of obtaining, and a last message calculates the token number that needs interpolation to the time difference of current message;
The token number that adds is to obtain according to the speed that the time difference that the adjacent message of same attribute arrives be multiply by speed limit, and unit is a byte number.
3) token number of the interpolation of calculating is added respectively in the low priority token bucket and total bucket, obtain current available token number;
4) token number in the current low priority bucket and current message length are compared,, otherwise be considered as abandoning if token number more than message length, is then transmitted this message;
5) upgrade token number in low priority bucket and the total bucket simultaneously, if current bag abandons, token number in two buckets is respectively the available tokens number after adding in 4, dark for token number after adding token greater than token bucket, it is dark then the degree of depth of token bucket to be updated to bucket, for the situation of the bag that passes through, the token number in its barrel is the poor of available tokens number and message length;
Flow process finishes, for current low priority message, because the dark superficial cause of low priority bucket, limit its maximum burst size, exchange the available tokens number of follow-up high-priority packets for high relatively loss ratio, improve the percent of pass of follow-up high-priority packets, guarantee the service quality of network.
With reference to shown in Figure 3, carry out the non-low priority message of low priority speed limit for needs, then carry out following steps:
1) attribute according to message obtains configuration, the speed of speed limit, and total token bucket bucket is dark, and the bucket of low priority bucket is dark, whether carries out the low priority speed limit;
2) according to the speed limit speed of obtaining, and a last message calculates the token number that needs interpolation to the time difference of current message;
3) token number with the interpolation of calculating only adds in into total bucket, obtains current available token number; As shown in Figure 3
4) token number in current total token bucket and current message length are compared,, otherwise be considered as abandoning if token number more than message length, is then transmitted this message;
5) token number in the total token bucket of renewal, if current bag abandons, token number in total bucket is the available tokens number in 4, dark for token number after adding token greater than token bucket, it is dark then the degree of depth of token bucket to be updated to bucket, for the situation by bag, the token number in total bucket is the poor of available tokens number and current message length.Here it should be noted that token number in the low priority bucket forever less than the token number in total bucket, therefore,, need to upgrade the token number of low priority bucket, the two is equated when the token number in total token bucket during less than the token number in the low priority bucket.
Flow process finishes, for current non-low priority message, though it is required with the low priority speed limit, but it does not belong to the low priority message, the maximum burst size of corresponding permission is greater than low priority packet, for follow-up any message, all is the influence that is not subjected to current message.
For the message that does not need to carry out the low priority speed limit, the step of its enforcement promptly is the current flow process that is widely used, do not need to consider any parameter of low priority bucket, only using total token bucket gets final product, certainly, its effect can only be all other messages of level of same attribute, and identical maximum burst size restriction is all arranged, in network congestion, can discarding by randomness.
Fig. 4 is the method flow diagram of token bucket speed limit based on priority of the present invention.Be about to flow process shown in Figure 2 and flowsheet synthesis shown in Figure 3 gets up to set forth, comprise:
Step 401: add token number according to rate calculations;
Step 402: judge whether to carry out the low priority speed limit; If, execution in step 403, if not, execution in step 411;
Is step 403: the judgment data bag a low priority? if, execution in step 404, if not, execution in step 407;
Step 404: add token toward low priority bucket and total token bucket simultaneously;
Step 405: the algorithm process of carrying out the RFC2697 standard code according to the low priority bucket;
Step 406: discarded packets, do not carry out the reducing of token, carry out the reducing of total bucket and low priority bucket simultaneously by bag, finish;
Step 407: only carry out the interpolation of total token bucket, do not carry out the interpolation of low priority bucket;
Step 408:, carry out the algorithm process of TrTCM according to total token bucket;
Step 409: discarded packets, do not carry out the reducing of token; By bag, only carry out the reducing of total bucket;
Step 410: when total token bucket during, the token number of low priority bucket must be changed to total token number, finish less than the priority bucket;
Step 411: only use total token bucket, in bucket, add token number;
Step 412: carry out the algorithm process of RFC2697 standard code, finish.
In addition, method for limiting speed provided by the invention also can be expanded the speed limit into multipriority, and be not limited only to the difference of high low priority, for example, be respectively high, medium and low three grades of priority, when realizing three grades of speed limits, use set of parameters with the difference of two-stage speed limit be exactly more, and respectively overlapping has certain association between the parameter, specifically implement as follows:
The speed limit speed (the attribute here is meant that different messages is from different sources or user) of 1 configuration different attribute message;
Three token bucket degree of depth of 2 configurations, respectively corresponding high, medium and low priority bucket is dark, and three dark relations of bucket should be among CBS height>CBS>CBS is low, simultaneously among the CBS+CBS is low otherwise greater than the CBS height, three dark priority speed limits that comprise simultaneously of bucket enable; (the dark total bucket that is equivalent in the accompanying drawing of the high priority bucket here is dark)
3 storage devices that are used for each token bucket token number of real-time storage.
Here specify the execution mode of multistage speed limit by example:
For example receive a medium priority message, need carry out the medium priority speed limit to it, its step is as follows
1. the attribute according to message obtains configuration, the speed of speed limit, and the high priority token bucket bucket is dark, and the bucket of medium priority bucket is dark, whether carries out intermediate priority speed limit;
2. according to the speed limit speed of obtaining, and a last message is to the time difference of current message, and calculating needs the token number that adds;
3. the token number with the interpolation of calculating adds respectively in into intermediate priority token bucket and the high priority bucket, obtains current available token number;
4. token number in the current medium priority bucket and current message length are compared,, otherwise be considered as abandoning if token number more than message length, is then transmitted this message;
5. upgrade the token number in medium priority bucket and the high priority bucket simultaneously, if current bag abandons, the token number in two buckets is respectively the available tokens number in 4, and for dark greater than token bucket, it is dark then to be updated to bucket, and for the bag that passes through, its token number is poor for both; Here it should be noted that when the token number in the low priority bucket during, must upgrade token number in the low priority bucket and make it equal token number in the medium priority bucket more than the medium priority token number; High priority bucket rank is the highest, and the token number in the bucket does not change because of the size of the token number in other barrel
Flow process finishes.
Carry out the non-medium priority message of medium priority speed limit for needs, so, may be low priority message or high priority message, if the low priority message, and be that the low priority speed limit enables simultaneously, then the method among Fig. 3 is carried out speed limit.If the low priority speed limit does not also enable or this message is a high priority, then carry out speed limit according to the method among Fig. 2, the corresponding total bucket of high priority bucket, the renewal of middle low priority bucket is with reference to the update method of the low priority bucket among Fig. 2.
With reference to shown in Figure 5, be the system construction drawing of token bucket speed limit based on priority of the present invention.
Configuration module 501 is used for the speed limit parameter according to the attribute configuration message of message, comprises speed limit, and the token buckets at different levels that successively decrease one by one are dark, and guarantees that token number in the highest token bucket is more than or equal to the token number sum in all the other token buckets at different levels;
Receiver module 502 is used to receive current message;
Acquisition module 503 obtains the corresponding speed limit parameter that gets with current message attribute;
Computing module 504 is used to receive after the message token number that calculating will be added;
First judge module 505 is used for need not carrying out the priority speed limit when determining, and sends first triggering signal;
First processing module 506, be used to receive described first triggering signal after, the token number that will add adds in the into highest token bucket, utilizes highest token bucket that current message is carried out speed limit;
Second judge module 507 is used for will carrying out the priority speed limit when determining, and further determines the message priority number when identical with speed limit progression, sends second triggering signal;
Second processing module 508, the token number that is used for will adding simultaneously adds into highest token bucket and the pairing token bucket of current message progression, utilizes the pairing token bucket of current message progression that current message is carried out speed limit;
The 3rd judge module 509 is used for will carrying out the priority speed limit when determining, and further determines message priority number and speed limit progression not simultaneously, sends the 3rd triggering signal;
The 3rd processing module 510, the token number that is used for adding are added into highest token bucket, utilize highest token bucket that current message is carried out speed limit.
In a preferred embodiment of the invention, described second processing module 508 also is used for upgrading simultaneously the token number of highest token bucket and the pairing token bucket of current message progression.
In a preferred embodiment of the invention, described the 3rd processing module 510 also is used for making the token number of highest token bucket more than or equal to the token number sum in all the other token buckets at different levels.
The attribute of described message is meant that different messages is from different sources or user.
Described computing module 504 is used for according to speed limit and this message time difference calculating token number that will add with same attribute message last time.
In a preferred embodiment of the invention,
It is dark that described configuration module 501 is used to dispose the token buckets at different levels that successively decrease one by one, comprises that total token is deeply logical and the low priority token bucket is dark, corresponding,
Receiver module 502 is used to receive a low priority message;
Acquisition module 503 is used for obtaining according to the attribute of message the speed limit parameter of message, and described parameter comprises: speed limit, total token logical dark, the low priority token bucket is dark;
Second judge module 507 is used to determine and need carries out the low priority speed limit to it, sends second triggering signal;
Computing module 504, according to the speed limit that obtains, and a last message calculates the token number that needs interpolation to the time difference of current message;
Second processing module 508, the token number that is used for the interpolation that will calculate adds into low priority token bucket and total bucket respectively, obtains current available token number; Token number in the current low priority bucket and current message length are compared, if token number more than current message length, is then transmitted this current message, otherwise is considered as abandoning current message; Upgrade the token number in low priority bucket and the total bucket simultaneously, if current packet loss, token number in two buckets is respectively the available tokens number after the interpolation, token number after adding is dark greater than token bucket, it is dark then the degree of depth of token bucket to be updated to bucket, current message passes through, then poor for token number after adding and current message length of the token number in the token bucket; Upgrade the token number of total token bucket and low priority token bucket.
In another preferred embodiment of the present invention,
Receiver module 502 also is used to receive a non-low priority message;
Acquisition module 503 is used for obtaining according to the attribute of message the speed limit parameter of message, and described parameter comprises: speed limit, total token logical dark, the low priority token bucket is dark;
According to the speed limit that obtains, and a last message calculates the token number that needs interpolation to the time difference of current message;
Computing module 504 only adds the described token number that needs to add in into total token bucket, obtains current available token number;
The 3rd judge module 509 is used for will carrying out the low priority speed limit when determining, and sends the 3rd triggering signal;
The 3rd processing module 510 is used for the token number and the current message length of current total token bucket are compared, if token number more than current message length, is then transmitted this current message, otherwise is considered as abandoning current message; Upgrade the token number in total token bucket, if current packet loss, token number in total bucket is the available tokens number after the interpolation, token number after adding is dark greater than token bucket, it is dark then the degree of depth of token bucket to be updated to bucket, when current message passes through, poor for token number after adding and current message length of the token number in the token bucket then; Token number in determining total token bucket is less than the token number in the low priority bucket, then upgrades the token number of low priority bucket and equates with token number in total token bucket.
Method provided by the invention can be according to the number of user's requirements extend priority, as long as abide by a principle, the dark configuration of limit priority bucket is not less than the summation of all the other times dark configuration of priority bucket, follow this rule when upgrading the token number storage condition equally, promptly the token number in the low priority bucket must not surpass the token number of high one-level token bucket; Like this, the speed limit of utilizing this method to provide illustrates, can reach the speed limit of multilevel precedence, improves network service quality (QOS).
It is pointed out that the above only is preferred embodiment of the present invention, is not to be used for limiting practical range of the present invention, and every variation and modification according to the equivalence that the present invention did are all covered by claim of the present invention.

Claims (14)

1. the method based on the token bucket speed limit of priority is characterized in that, comprising:
Speed limit parameter according to the attribute configuration message of message comprises speed limit, and the token buckets at different levels that successively decrease one by one are dark, and guarantees that token number in the highest token bucket is more than or equal to the token number sum in all the other token buckets at different levels;
Receive after the message token number that calculating will be added;
Need not carry out the priority speed limit when determining, then the token number that will add adds in the into highest token bucket, utilizes highest token bucket that current message is carried out speed limit; And
To carry out the priority speed limit when determining, for the message priority number message identical with speed limit progression, the token number that will add simultaneously adds in into highest token bucket and the pairing token bucket of current message progression, utilizes the pairing token bucket of current message progression that current message is carried out speed limit;
For the message priority number message different with speed limit progression, then the token number that will add adds in the into highest token bucket, utilizes highest token bucket that current message is carried out speed limit.
2. the method for claim 1 is characterized in that, the described pairing token bucket of current message progression that utilizes carries out current message also comprising after the step of speed limit:
Upgrade the token number in highest token bucket and the pairing token bucket of current message progression.
3. the method for claim 1 is characterized in that, utilizes highest token bucket current message to be carried out also comprise after the step of speed limit:
Make token number in the highest token bucket more than or equal to the token number sum in all the other token buckets at different levels.
4. the method for claim 1 is characterized in that, the attribute of described message is meant that different messages is from different sources or user.
5. the method for claim 1 is characterized in that, the token number that described calculating will be added comprises:
According to speed limit and this message time difference calculating token number that will add with same attribute message last time.
6. the method for claim 1 is characterized in that, the described token buckets at different levels that successively decrease one by one are dark, comprises that total token is deeply logical and the low priority token bucket is dark, and is corresponding,
When receiving a low priority message, determine and need carry out the low priority speed limit it, then obtain the speed limit parameter of message according to the attribute of message, described parameter comprises: speed limit, total token lead to deeply, the low priority token bucket is dark;
According to the speed limit that obtains, and a last message calculates the token number that needs interpolation to the time difference of current message;
The token number of the interpolation of calculating is added respectively in the low priority token bucket and total bucket, obtain current available token number;
Token number in the current low priority bucket and current message length are compared, if token number more than current message length, is then transmitted this current message, otherwise is considered as abandoning current message;
Upgrade the token number in low priority bucket and the total bucket, if current packet loss, token number in low priority bucket and the total bucket is respectively the available tokens number after the interpolation, token number after adding is dark greater than token bucket, it is dark then the degree of depth of token bucket to be updated to bucket, current message passes through, then poor for token number after adding and current message length of the token number in the token bucket;
Upgrade the token number of total token bucket and low priority token bucket.
7. method as claimed in claim 6, it is characterized in that, need carry out the low priority speed limit to it when receiving a non-low priority message, determining, then obtain the speed limit parameter of message according to the attribute of message, described parameter comprises: speed limit, total token lead to deeply, the low priority token bucket is dark;
According to the speed limit that obtains, and a last message calculates the token number that needs interpolation to the time difference of current message;
The described token number that needs to add is only added in into total token bucket, obtain current available token number;
Token number in current total token bucket and current message length are compared, if token number more than current message length, is then transmitted this current message, otherwise is considered as abandoning current message;
Upgrade the token number in total token bucket, if current packet loss, token number in total bucket is the available tokens number after the interpolation, token number after adding is dark greater than token bucket, it is dark then the degree of depth of token bucket to be updated to bucket, when current message passes through, poor for token number after adding and current message length of the token number in the token bucket then;
Token number in determining total token bucket is less than the token number in the low priority bucket, then upgrades the token number of low priority bucket and equates with token number in total token bucket.
8. the system based on the token bucket speed limit of priority is characterized in that, comprising:
Configuration module is used for the speed limit parameter according to the attribute configuration message of message, comprises speed limit, and the token buckets at different levels that successively decrease one by one are dark, and guarantees that token number in the highest token bucket is more than or equal to the token number sum in all the other token buckets at different levels;
Receiver module is used to receive current message;
Acquisition module obtains the corresponding speed limit parameter that gets with current message attribute;
Computing module is used to receive after the message token number that calculating will be added;
First judge module is used for need not carrying out the priority speed limit when determining, and sends first triggering signal;
First processing module, be used to receive described first triggering signal after, the token number that will add adds in the into highest token bucket, utilizes highest token bucket that current message is carried out speed limit;
Second judge module is used for will carrying out the priority speed limit when determining, and further determines the message priority number when identical with speed limit progression, sends second triggering signal;
Second processing module, the token number that is used for will adding simultaneously adds into highest token bucket and the pairing token bucket of current message progression, utilizes the pairing token bucket of current message progression that current message is carried out speed limit;
The 3rd judge module is used for will carrying out the priority speed limit when determining, and further determines message priority number and speed limit progression not simultaneously, sends the 3rd triggering signal;
The 3rd processing module, the token number that is used for adding are added into highest token bucket, utilize highest token bucket that current message is carried out speed limit.
9. system as claimed in claim 8 is characterized in that, described second processing module also is used for upgrading simultaneously the token number of highest token bucket and the pairing token bucket of current message progression.
10. system as claimed in claim 8 is characterized in that, described the 3rd processing module also is used for making the token number of highest token bucket more than or equal to the token number sum in all the other token buckets at different levels.
11. system as claimed in claim 8 is characterized in that, the attribute of described message is meant that different messages is from different sources or user.
12. system as claimed in claim 8 is characterized in that, described computing module is used for according to speed limit and this message time difference calculating token number that will add with same attribute message last time.
13. system as claimed in claim 8 is characterized in that, it is dark that described configuration module is used to dispose the token buckets at different levels that successively decrease one by one, comprises that total token is deeply logical and the low priority token bucket is dark, corresponding,
Receiver module is used to receive a low priority message;
Acquisition module is used for obtaining according to the attribute of message the speed limit parameter of message, and described parameter comprises: speed limit, total token logical dark, the low priority token bucket is dark;
Second judge module is used to determine and need carries out the low priority speed limit to it, sends second triggering signal;
Computing module, according to the speed limit that obtains, and a last message calculates the token number that needs interpolation to the time difference of current message;
Second processing module, the token number that is used for the interpolation that will calculate adds into low priority token bucket and total bucket respectively, obtains current available token number; Token number in the current low priority bucket and current message length are compared, if token number more than current message length, is then transmitted this current message, otherwise is considered as abandoning current message; Upgrade the token number in low priority bucket and the total bucket simultaneously, if current packet loss, token number in two buckets is respectively the available tokens number after the interpolation, token number after adding is dark greater than token bucket, it is dark then the degree of depth of token bucket to be updated to bucket, current message passes through, then poor for token number after adding and current message length of the token number in the token bucket; Upgrade the token number of total token bucket and low priority token bucket.
14. system as claimed in claim 13 is characterized in that,
Receiver module also is used to receive a non-low priority message;
Acquisition module is used for obtaining according to the attribute of message the speed limit parameter of message, and described parameter comprises: speed limit, total token logical dark, the low priority token bucket is dark;
According to the speed limit that obtains, and a last message calculates the token number that needs interpolation to the time difference of current message;
Computing module only adds the described token number that needs to add in into total token bucket, obtains current available token number;
The 3rd judge module is used for will carrying out the low priority speed limit when determining, and sends the 3rd triggering signal;
The 3rd processing module is used for the token number and the current message length of current total token bucket are compared, if token number more than current message length, is then transmitted this current message, otherwise is considered as abandoning current message; Upgrade the token number in total token bucket, if current packet loss, token number in total bucket is the available tokens number after the interpolation, token number after adding is dark greater than token bucket, it is dark then the degree of depth of token bucket to be updated to bucket, when current message passes through, poor for token number after adding and current message length of the token number in the token bucket then; Token number in determining total token bucket is less than the token number in the low priority bucket, then upgrades the token number of low priority bucket and equates with token number in total token bucket.
CN200910169411A 2009-08-31 2009-08-31 Method and system for limiting speed of token bucket based on priority Active CN101997766B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910169411A CN101997766B (en) 2009-08-31 2009-08-31 Method and system for limiting speed of token bucket based on priority

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910169411A CN101997766B (en) 2009-08-31 2009-08-31 Method and system for limiting speed of token bucket based on priority

Publications (2)

Publication Number Publication Date
CN101997766A true CN101997766A (en) 2011-03-30
CN101997766B CN101997766B (en) 2012-09-05

Family

ID=43787383

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910169411A Active CN101997766B (en) 2009-08-31 2009-08-31 Method and system for limiting speed of token bucket based on priority

Country Status (1)

Country Link
CN (1) CN101997766B (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013000113A1 (en) * 2011-06-28 2013-01-03 中兴通讯股份有限公司 Rate limit method and apparatus for leaky bucket
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
CN102984081A (en) * 2012-10-30 2013-03-20 盛科网络(苏州)有限公司 Method and system of message processing in network equipment
WO2015161552A1 (en) * 2014-04-21 2015-10-29 中兴通讯股份有限公司 Method and device for traffic policing based on token bucket
CN108848038A (en) * 2018-08-30 2018-11-20 华为技术有限公司 Flow managing method and token bucket node based on token bucket
WO2019033857A1 (en) * 2017-08-18 2019-02-21 华为技术有限公司 Packet control method and network device
CN109672627A (en) * 2018-09-26 2019-04-23 深圳壹账通智能科技有限公司 Method for processing business, platform, equipment and storage medium based on cluster server
CN110545246A (en) * 2018-05-29 2019-12-06 北京京东尚科信息技术有限公司 Token bucket-based current limiting method and device
CN111431816A (en) * 2020-06-15 2020-07-17 广东睿江云计算股份有限公司 Distributed flow rate limiting method and system
CN112187661A (en) * 2020-09-14 2021-01-05 武汉思普崚技术有限公司 QOS flow control method, system, equipment and storage medium
CN112953848A (en) * 2021-03-12 2021-06-11 西安电子科技大学 Strict priority based traffic supervision method, system and equipment
CN112995059A (en) * 2019-12-12 2021-06-18 阿里巴巴集团控股有限公司 Flow control method, flow control device, terminal equipment and computer storage medium
CN114172847A (en) * 2021-11-29 2022-03-11 烽火通信科技股份有限公司 Multi-port bandwidth speed limiting method and system
CN115766592A (en) * 2022-10-31 2023-03-07 中科驭数(北京)科技有限公司 Flow rate limiting method based on priority, DPU message forwarding method and device
CN117255061A (en) * 2023-09-14 2023-12-19 中科驭数(北京)科技有限公司 DPU-based encrypted message speed limiting method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101026556B (en) * 2007-01-10 2010-04-21 华为技术有限公司 Arbitrating method and device for supporting service quality
CN101242394B (en) * 2008-01-30 2012-08-29 华为技术有限公司 Method and device for realizing promised access rate
CN101478494B (en) * 2009-02-16 2011-03-16 中兴通讯股份有限公司 Data packet processing method and apparatus based on token barrel algorithm

Cited By (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013000113A1 (en) * 2011-06-28 2013-01-03 中兴通讯股份有限公司 Rate limit method and apparatus for leaky bucket
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
CN102984081A (en) * 2012-10-30 2013-03-20 盛科网络(苏州)有限公司 Method and system of message processing in network equipment
WO2015161552A1 (en) * 2014-04-21 2015-10-29 中兴通讯股份有限公司 Method and device for traffic policing based on token bucket
CN105024932A (en) * 2014-04-21 2015-11-04 中兴通讯股份有限公司 Traffic policing method and apparatus based on token bucket
KR102317523B1 (en) * 2017-08-18 2021-10-25 후아웨이 테크놀러지 컴퍼니 리미티드 Packet control method and network device
WO2019033857A1 (en) * 2017-08-18 2019-02-21 华为技术有限公司 Packet control method and network device
CN109412964A (en) * 2017-08-18 2019-03-01 华为技术有限公司 Message control method and network equipment
KR20200037405A (en) * 2017-08-18 2020-04-08 후아웨이 테크놀러지 컴퍼니 리미티드 Packet control method and network device
US11646967B2 (en) 2017-08-18 2023-05-09 Huawei Technologies Co., Ltd. Packet control method and network apparatus
CN109412964B (en) * 2017-08-18 2022-04-29 华为技术有限公司 Message control method and network device
US11190449B2 (en) 2017-08-18 2021-11-30 Huawei Technologies Co., Ltd. Packet control method and network apparatus
CN110545246B (en) * 2018-05-29 2023-12-08 北京京东尚科信息技术有限公司 Token bucket-based current limiting method, device and computer readable medium
CN110545246A (en) * 2018-05-29 2019-12-06 北京京东尚科信息技术有限公司 Token bucket-based current limiting method and device
CN108848038A (en) * 2018-08-30 2018-11-20 华为技术有限公司 Flow managing method and token bucket node based on token bucket
CN108848038B (en) * 2018-08-30 2021-01-29 华为技术有限公司 Token bucket-based traffic management method and token bucket node
CN109672627A (en) * 2018-09-26 2019-04-23 深圳壹账通智能科技有限公司 Method for processing business, platform, equipment and storage medium based on cluster server
CN112995059A (en) * 2019-12-12 2021-06-18 阿里巴巴集团控股有限公司 Flow control method, flow control device, terminal equipment and computer storage medium
CN111431816A (en) * 2020-06-15 2020-07-17 广东睿江云计算股份有限公司 Distributed flow rate limiting method and system
CN112187661A (en) * 2020-09-14 2021-01-05 武汉思普崚技术有限公司 QOS flow control method, system, equipment and storage medium
CN112187661B (en) * 2020-09-14 2022-06-21 武汉思普崚技术有限公司 QOS flow control method, system, equipment and storage medium
CN112953848A (en) * 2021-03-12 2021-06-11 西安电子科技大学 Strict priority based traffic supervision method, system and equipment
CN114172847A (en) * 2021-11-29 2022-03-11 烽火通信科技股份有限公司 Multi-port bandwidth speed limiting method and system
CN114172847B (en) * 2021-11-29 2023-05-26 烽火通信科技股份有限公司 Multi-port bandwidth speed limiting method and system
CN115766592A (en) * 2022-10-31 2023-03-07 中科驭数(北京)科技有限公司 Flow rate limiting method based on priority, DPU message forwarding method and device
CN117255061A (en) * 2023-09-14 2023-12-19 中科驭数(北京)科技有限公司 DPU-based encrypted message speed limiting method and device

Also Published As

Publication number Publication date
CN101997766B (en) 2012-09-05

Similar Documents

Publication Publication Date Title
CN101997766B (en) Method and system for limiting speed of token bucket based on priority
CN102238068B (en) Message transmitting method and system
US20210336885A1 (en) Phantom queue link level load balancing system, method and device
US7778174B2 (en) Shaper circuit and shaper circuit combination
CN112953848B (en) Traffic supervision method, system and equipment based on strict priority
RU2643666C2 (en) Method and device to control virtual output queue authorization and also computer storage media
CN106550393B (en) Commercial WIFI user dynamic bandwidth limiting method and system
US11509566B2 (en) Shaping outgoing traffic of network packets in a network management system
CN110674942A (en) Bandwidth management method and device, electronic equipment and readable storage medium
CN104580008A (en) Method and device for improving multi-queue random message discarding accuracy based on hardware
CN107682316B (en) Method for generating dynamic password sending strategy and method for sending dynamic password
WO2013000116A1 (en) Method and device for leaky bucket speed-limitation
Borodakiy et al. Analyzing mean bit rate of multicast video conference in LTE network with adaptive radio admission control scheme
CN112152863A (en) Distributed bandwidth allocation method and device
CN115834054B (en) Multistage key progression management method and device
Hou et al. Modeling and analysis of spectrum handoffs for real-time traffic in cognitive radio networks
CN114745333B (en) IMS system self-adaptive flow control method
US20020167957A1 (en) Method and apparatus for scheduling data on a medium
CN100488310C (en) Method and apparatus for dudging high-speed downward grouped access-in admittance
CN114531401A (en) Token bucket flow limiting method based on priority
CN104734794B (en) Maximum spectrum sensing method for data volume and energy consumption ratios of cognitive radio networks
KR100564819B1 (en) Apparatus and method for controlling packet in a ethernet system
Chen et al. An adaptive buffer allocation mechanism for token bucket flow control
Yang et al. Optimizing admission control for multiservice wireless networks with bandwidth asymmetry between uplink and downlink
CN116094815B (en) Data encryption processing method and device based on flow self-adaptive control adjustment

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
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20110330

Assignee: SANECHIPS TECHNOLOGY Co.,Ltd.

Assignor: ZTE Corp.

Contract record no.: 2015440020319

Denomination of invention: Method and system for limiting speed of token bucket based on priority

Granted publication date: 20120905

License type: Common License

Record date: 20151123

LICC Enforcement, change and cancellation of record of contracts on the licence for exploitation of a patent or utility model
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221114

Address after: 518055 Zhongxing Industrial Park, Liuxian Avenue, Xili street, Nanshan District, Shenzhen City, Guangdong Province

Patentee after: SANECHIPS TECHNOLOGY Co.,Ltd.

Address before: 518057 Ministry of justice, Zhongxing building, South Science and technology road, Nanshan District hi tech Industrial Park, Shenzhen, Guangdong

Patentee before: ZTE Corp.