CN103188160A - Flow control method and forwarding unit - Google Patents

Flow control method and forwarding unit Download PDF

Info

Publication number
CN103188160A
CN103188160A CN2013101362240A CN201310136224A CN103188160A CN 103188160 A CN103188160 A CN 103188160A CN 2013101362240 A CN2013101362240 A CN 2013101362240A CN 201310136224 A CN201310136224 A CN 201310136224A CN 103188160 A CN103188160 A CN 103188160A
Authority
CN
China
Prior art keywords
token
retransmission unit
master control
application message
control token
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
CN2013101362240A
Other languages
Chinese (zh)
Other versions
CN103188160B (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 Information 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 CN201310136224.0A priority Critical patent/CN103188160B/en
Publication of CN103188160A publication Critical patent/CN103188160A/en
Application granted granted Critical
Publication of CN103188160B publication Critical patent/CN103188160B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

The invention discloses a flow control method and a forwarding unit, applicable to a device comprising at least one forwarding unit. A local token set for controlling the flow speed of the forwarding unit is arranged on each forwarding unit, and a master control token set is further arranged on one forwarding unit in the device. The method comprises the following steps of: receiving a token application message by the forwarding unit provided with the master control token set; when the quantity of tokens in the master control token set is not zero, distributing the tokens for the corresponding forwarding units by the forwarding unit provided with the master control token set according to the token application message and the quantity of tokens in the master control token set, so that the quantity of the corresponding tokens of the master control token set can be reduced; and transmitting the distributed tokens to the corresponding forwarding unit by the forwarding unit provided with the master control token set through a token authorization message, so that the quantity of tokens of the local token set within the forwarding unit can be increased. After the flow control method and the forwarding unit are adopted, the global flow monitoring on a plurality of single boards or chips can be realized, and the single board or chip passing flow can not go beyond the flow which is allowed to pass.

Description

A kind of flow control methods and retransmission unit
Technical field
The present invention relates to communication technical field, relate in particular to a kind of flow control methods and retransmission unit.
Background technology
Traffic policing is controlled flow exactly; enter the flow rate of network by supervision; the flow that exceeds part is carried out " punishment "; the flow that enters is limited within the reasonable range; with protecting network resource and benefits of operators; can not take and surpass 50% the network bandwidth as limiting the HTTP message; if finding the flow of certain connection exceeds standard; traffic policing can be selected dropping packets; or reconfigure priority of messages; traffic policing is called for short CAR(Committed Access Rate, committed access rate).
Distributed apparatus is the equipment that includes the polylith veneer, veneer is provided with chip, every veneer has the ability of independent transmitting-receiving message, be all can produce flow on the every veneer, for distributed apparatus, when a plurality of veneers are set to be applied to same overall CAR, need carry out unified flow control to these a plurality of veneers, when a VLAN went up application CAR, the interface of reply distributed apparatus in this VLAN carried out unified flow control.
In the prior art, at above-mentioned situation, in veneer operation CAR function, but the actual effect that reaches remains every veneer carried out flow control, and can't realize flow control is carried out in a plurality of veneer unifications.
Summary of the invention
The problem to be solved in the present invention is how the retransmission unit in the equipment to be carried out global traffic control.
For achieving the above object, the invention provides a kind of flow control methods, be applied to comprise in the equipment of at least one retransmission unit, be provided with the local token set for this retransmission unit of control flow rate on each retransmission unit, also be provided with the set of master control token on the retransmission unit in the described equipment, described method comprises:
The retransmission unit that is provided with the set of master control token receives token application message;
When the token quantity in the described master control token set is non-vanishing, the described retransmission unit of master control token set that is provided with is according to the token quantity in described token application message and the set of described master control token, be corresponding retransmission unit distribution token, and reduce the token of respective numbers in the described master control token set;
The described retransmission unit that is provided with the set of master control token sends to described corresponding retransmission unit by the token grant message with the token that distributes, to increase the token quantity in the local token set that arranges in this retransmission unit.
Preferably, when described token quantity in the set of master control token is non-vanishing, the described retransmission unit that is provided with the set of master control token, specifically comprises for corresponding retransmission unit distributes token according to the token quantity in described token application message and the set of described master control token:
The described retransmission unit that is provided with master control token set is judged the token quantity whether the token quantity in the described master control token set apply for more than or equal to described token application message;
If judged result is for being, described to be provided with the retransmission unit that the master control token gathers be the token number that described corresponding retransmission unit distributes described token application message to ask;
If judged result is not, the described retransmission unit that is provided with the set of master control token is distributed to described corresponding retransmission unit with all tokens in the described master control token set.
Preferably, also comprise:
When the token quantity in the described master control token set was zero, the described retransmission unit that is provided with the set of master control token was that the token quantity that described corresponding retransmission unit distributes is zero.
Preferably, the token quantity that promising described at least one retransmission unit of record distributed on the described retransmission unit that is provided with master control token set, and be described at least one retransmission unit setting priority from low to high from more to less according to the token quantity of described distribution;
When described token quantity in the set of master control token was non-vanishing, the described retransmission unit that is provided with the set of master control token, specifically comprised for corresponding retransmission unit distributes token according to the token quantity in described token application message and the set of described master control token:
The described retransmission unit that is provided with the set of master control token judges whether described corresponding retransmission unit is the minimum retransmission unit of priority;
If judged result is for being, the described retransmission unit that is provided with the set of master control token starts timer, when the described timer time arrives, is described corresponding retransmission unit distribution token;
If judged result is not, the described retransmission unit that is provided with the set of master control token is that described corresponding retransmission unit distributes token.
Preferably, the described retransmission unit that is provided with the set of master control token receives token application message, specifically comprises:
The described retransmission unit that is provided with master control token set receives the token application message that this retransmission unit generates according to self token requisition cycle; And/or
The described retransmission unit that is provided with master control token set receives the token application message that other retransmission units send according to self token requisition cycle.
Preferably, the described retransmission unit that is provided with master control token set receives this retransmission unit according to the token application message that self token generates requisition cycle, specifically comprises:
The described retransmission unit that is provided with master control token set receives when the local token set of this retransmission unit self is discontented, and this retransmission unit is according to the token application message of self token generation requisition cycle;
The described retransmission unit that is provided with master control token set receives other retransmission units according to the token application message that self token sends requisition cycle, specifically comprises:
The described retransmission unit that is provided with master control token set receives when the local token set of described other retransmission units is discontented, and described other retransmission units are according to the token application message of self token transmission requisition cycle.
Preferably,
When the token quantity of the local token set disappearance that sends described token application message forwarding unit was less than or equal to the token application thresholding of self, the token quantity of described token application message application was the token quantity of described disappearance;
When the token quantity of the local token set disappearance that sends described token application message forwarding unit during greater than described self token application thresholding, the token quantity of described token application message application is described self token application thresholding.
Preferably, the described retransmission unit that is provided with the set of master control token is provided with token increases cycle and token increase thresholding, and described method also comprises:
When the described token increase cycle arrived, the described retransmission unit that is provided with the set of master control token judged whether the token quantity of disappearance in the described master control token set increases thresholding greater than described token;
If judged result is for being, the token quantity that the described retransmission unit that is provided with the set of master control token increases in described master control token set is described token increase thresholding;
Otherwise the token quantity that the described retransmission unit that is provided with the set of master control token increases in described master control token set is the token quantity of described disappearance.
The present invention also provides a kind of retransmission unit, be applied to comprise in the equipment of at least one retransmission unit, be provided with the local token set for this retransmission unit of control flow rate on each retransmission unit, also be provided with the set of master control token on the retransmission unit in the described equipment, described retransmission unit comprises:
Sending module is used for sending token application message to the retransmission unit that is provided with the set of master control token;
Receiver module is used for after described sending module sends token application message, receives the token grant message that the described retransmission unit that is provided with the set of master control token returns according to described token application message, to increase the token in the local token set that self arranges;
Wherein, described receiver module, described retransmission unit are provided with under the situation of master control token set, also are used for receiving the token application message that described sending module sends;
Judge module, described retransmission unit are provided with under the situation of master control token set and enable, and are used for after described receiver module receives token application message, judge whether the token quantity in the described master control token set is zero;
The token distribution module, described retransmission unit is provided with under the situation of master control token set and enables, be used for when described judge module judges that token quantity in described master control token is gathered is non-vanishing, gather interior token quantity according to token application message and described master control token that described receiver module receives, be corresponding retransmission unit distribution token, and reduce the token of respective numbers in the described master control token set;
Described sending module, described retransmission unit is provided with under the situation of master control token set, also being used in described token distribution module is after described corresponding retransmission unit distributes token, by the token grant message token that distributes is sent to described corresponding retransmission unit, to increase the token quantity in the local token set that arranges in this retransmission unit.
Preferably,
Described judge module, the concrete token quantity that is used for judging that whether the interior token quantity of described master control token set apply for more than or equal to described token application message;
Described token distribution module, concrete being used for when described judge module is judged the token quantity that the token quantity in described master control token is gathered applies for more than or equal to described token application message, the token number that distributes described token application message to ask for described corresponding retransmission unit; During token quantity that the token quantity in described judge module is judged the set of described master control token is applied for less than described token application message, all interior tokens of described master control token set are distributed to described corresponding retransmission unit.
Preferably, described token distribution module, concrete being used for when the token quantity in the described master control token set is zero, the token quantity of distributing for described corresponding retransmission unit is zero.
Preferably, also comprise:
Logging modle, described retransmission unit is provided with under the situation of master control token set and enables, be used for being recorded as the token quantity that described at least one retransmission unit distributed, and be described at least two retransmission unit settings priority from low to high from more to less according to the token quantity of described distribution;
Described judge module, the concrete priority that is used for according to described logging modle record judges whether described corresponding retransmission unit is the minimum retransmission unit of priority;
Timing module, described retransmission unit are provided with under the situation of master control token set and enable, and are used for if the judged result of described judge module is for being the startup timer;
Described token distribution module is used for when the described timer time of described timing module arrives, for described corresponding retransmission unit distributes token; And if the judged result of described judge module for not, is described corresponding retransmission unit distribution token.
Preferably, the described retransmission unit that is provided with the set of master control token is provided with token increases cycle and token increase thresholding, and described retransmission unit also comprises:
Described judge module, judges whether the token quantity of disappearance in the described master control token set increases thresholding greater than described token at concrete being used for when the described token increase cycle arrives;
Token increases module, and described retransmission unit is provided with under the situation of master control token set and enables, and is used for if the judged result of described judge module is when being, the token quantity that increases in described master control token set is described token increase thresholding; Otherwise the token quantity that increases in described master control token set is the token quantity of described disappearance.
Among the present invention, the veneer that is provided with the set of master control token receives token application message, when the token quantity in the set of master control token is non-vanishing, be provided with the veneer of master control token set according to the token quantity in token application message and the set of described master control token, for corresponding veneer distributes token, and reduce the token of respective numbers in the set of master control token, the veneer that is provided with the set of master control token sends to corresponding veneer by the token grant message with the token that distributes, to increase the token quantity in the local token set that arranges in this veneer.By adopting the present invention, can realize a plurality of veneers or chip are carried out the global traffic supervision, avoided the actual flow that passes through of veneer or chip above the flow that allows to pass through.
Description of drawings
The structural representation of a kind of distributed apparatus that Fig. 1 provides for the embodiment of the invention;
The schematic flow sheet of a kind of flow control methods that Fig. 2 provides for the embodiment of the invention;
The structural representation of a kind of distributed apparatus that Fig. 3 provides for the embodiment of the invention;
The schematic flow sheet of a kind of flow control methods that Fig. 4 provides for the embodiment of the invention;
The structural representation of the veneer that Fig. 5 provides for the embodiment of the invention.
Embodiment
Below in conjunction with the accompanying drawing among the present invention, the technical scheme among the present invention is clearly and completely described, obviously, described embodiment only is a part of embodiment of the present invention, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
The embodiment of the invention provides a kind of flow control methods, this method can be applied in distributed apparatus or the centralized device, for distributed apparatus, retransmission unit is the veneer in the distributed apparatus, as shown in Figure 1, the structural representation of a kind of distributed apparatus that provides for the embodiment of the invention, be provided with one or more local token set on each veneer in the distributed apparatus, be provided with the set of master control token on one of them veneer simultaneously, for centralized device, retransmission unit is the chip that arranges on the veneer of centralized device, veneer in the centralized device is provided with one or more chips, each chip is provided with one or more local token set, be provided with the set of master control token on one of them chip simultaneously, in an embodiment of the present invention, all local tokens are gathered the token that obtains and are gathered distribution by the master control token.
Below, in conjunction with concrete execution mode, method proposed by the invention is described further, and in the present embodiment, equipment is distributed apparatus, consider the processing of the common not responsible service message of master control borad, therefore the set of master control token is arranged on the master control borad, certainly, the set of master control token can be arranged on any veneer, or be arranged on the third party device, present embodiment is that example describes so that the set of master control token is arranged on the master control borad only.
As shown in Figure 2, the schematic flow sheet of a kind of flow control methods that provides for the embodiment of the invention may further comprise the steps:
Step 201, business board sends token application message to master control borad.
Concrete, be provided with token requisition cycle in the business board, business board is when token arrives requisition cycle, send token application message to master control borad, the information such as token number of carry the veneer numbering in the token application message, adding token cycle, application, for different veneers, token requisition cycle can be identical or different.Need to prove that master control borad self also can have local token set, master control borad generates token application message according to the token requisition cycle of self, and is local token set application token from the set of master control token.
Wherein, be provided with token application thresholding in the business board, token application thresholding=maximum allows through-rate * (token requisition cycle+propagation delay time), when the token quantity of the local token set disappearance of the veneer that sends token application message is less than or equal to the token application thresholding of self, the token quantity of token application message application is the token quantity of disappearance, when the token quantity of the local token set disappearance of the veneer that sends token application message during greater than self token application thresholding, the token quantity of token application message application is the token application thresholding of self.
Preferably, for master control borad and business board, when the token of himself arrives requisition cycle, whether the local token set that can judge self is full, when local token set has been expired, master control borad and business board do not generate or do not send token application message at this token requisition cycle, and when local token set was discontented, master control borad and business board generated or send token application message.
Preferably, business board can also be after sending token application message, at local record response identification not, if when next token arrives requisition cycle, this not response identification still exist, then business board does not send token application message requisition cycle at this token.
Preferably, this not response identification can be set to only exist a token requisition cycle, for example, when this token arrived requisition cycle, there was not response identification in this locality, then business board does not send token application message to master control borad, and response identification deletion.
Step 202, master control borad receive token application message.
Step 203, master control borad judge whether the token quantity in the set of master control token is zero, if the result is for being execution in step 204, otherwise execution in step 205.
Concrete, master control borad is provided with token increases cycle and token increase thresholding, when the token increase cycle arrives, master control borad judges whether the token quantity of disappearance in the set of master control token increases thresholding greater than token, if judged result is when being, the token quantity that master control borad increases in the set of master control token is that token increases thresholding, otherwise the token quantity that master control borad increases in the set of master control token is the token quantity of disappearance.When the frequency of each business board application token and quantity surpassed token in the set of master control token and accelerates, the token quantity possibility in the set of master control token was depleted.
Step 204, master control borad sends the token grant message according to the numbering of the veneer in the token application message to the corresponding service plate, and the token quantity that this token entitlement message is distributed is zero, and execution in step 207.
Step 205, master control borad are corresponding service plate distribution token according to the token quantity in the numbering of the veneer in the token application message and the set of master control token, and reduce the token of respective numbers in the set of master control token.
Concrete, master control borad can be judged the token quantity whether the token quantity in the set of master control token apply for more than or equal to token application message; If judged result is for being, master control borad is numbered the token number that corresponding veneer distribution token application message is asked according to veneer; If judged result is not, all tokens that master control borad is numbered in the just master control token set according to veneer are distributed to corresponding veneer.
Preferably, can record the token quantity that promising all veneers distributed on the master control borad, and be all veneer settings priority from low to high from more to less according to the token quantity of distributing.When master control borad is received the token application message of business board transmission, search priority according to the veneer numbering, and judge whether this business board is the minimum veneer of priority, if judged result is for being, the master control board starting timer, when the timer time arrived, for this business board distributes token, otherwise directly this business board distributed token.
Step 206, master control borad sends to business board by the token grant message with the token that distributes, to increase the token quantity in the local token set that arranges in this veneer.
Step 207, business board receives the token grant message that master control borad sends, and according to the token quantity of carrying in the token grant message, increases the token quantity in the local token set.
Preferably, if business board after sending token application message at local record response identification not, after receiving the token grant message, business board is deleted this not response identification.
Need to prove, for centralized device, the realization flow of realization flow and above-mentioned distributed apparatus is similar, difference only is because centralized device has only a veneer, therefore the set of master control token and a plurality of local token set are safeguarded by each chip on the veneer, for centralized device, because there is not communication between plates in it, need not consider propagation delay time, therefore use this method and can obtain compared to the better speed limit effect of distributed apparatus.
For local token set, can be provided with a plurality of local token set on each veneer, if veneer need be a plurality of local token set request tokens, its can a setting time unification will send to the veneer that is provided with the set of master control token by a combination message for the token of each local token set application, to avoid veneer to send token application message for each local token set separately, the plate communication that causes is frequent, and then the performance that produces descends.
The present invention is by arranging the set of master control token and the set of local token at veneer, and unified token quantity in the local token set of all veneers in the control appliance by the veneer that is provided with master control token set, can realize a plurality of veneers or chip are carried out the global traffic supervision, avoid the actual flow that passes through of veneer or chip above the flow that allows to pass through.
Below in conjunction with specific embodiment, describe the present invention, in embodiments of the present invention, gathering with the master control token is the master control token bucket, local token set is that example is described for local token bucket, for the master control token bucket, its CBS(Committed Burst Size, can promise to undertake the maximum information frame sign) can arrange according to the actual flow control strategy, its token increase cycle can be the CIR(Committed Information Rate that the user allows, but the commitment information transmission rate), for local token bucket, consider problems such as propagation delay time, the size of its CBS can be the local token bucket CIR*(of local token bucket CBS=token requisition cycle+propagation delay time), to guarantee that veneer can be before getting access to the request token, normally send message with the CIR that allows, herein, the CIR of local token bucket and master control token bucket can be different.
As shown in Figure 3, in the present embodiment, be provided with master control token bucket and local token bucket on the veneer 1 simultaneously, veneer 2 and veneer 3 are provided with local token bucket, residue token quantity is 90 in the master control token bucket, be that 5s, local token bucket CBS are 500 the token requisition cycle of veneer 2, and real surplus token quantity is 300, and local token bucket CIR is 20.
As shown in Figure 4, a kind of flow control methods for the embodiment of the invention provides may further comprise the steps:
Step 401, when token arrival requisition cycle of self, veneer 2 judges whether this locality records not response sign, if judged result is for being execution in step 402, otherwise execution in step 403.
Step 402, veneer 2 are waited for when next token arrives requisition cycle, are returned execution in step 401.
Step 403, veneer 2 less than disappearance token number 200, therefore send token application message to veneer 1 according to token requisition cycle and local token bucket CIR determining that token application thresholding is 100, ask 100 tokens, and at local record response identification not.
Step 404, veneer 1 judge whether the priority of veneer 2 is minimum after receiving the token application message of veneer 2 transmissions, if judged result is for being execution in step 405, otherwise execution in step 406.
Concrete, the token quantity that the promising veneer 1 of record, veneer 2 and veneer 3 distributed on the veneer 1.
Wherein, if the token quantity that veneer 1 distributed is 200, the token quantity of distributing for veneer 2 is 400, the token quantity of distributing for veneer 3 is 300, veneer 1 is according to this record, and the priority of veneer 1, veneer 2 and veneer 3 is set to 1,3,2, at this moment execution in step 405.
If the token quantity that veneer 1 distributed is 400, the token quantity of distributing for veneer 2 is 100, and the token quantity of distributing for veneer 3 is 300, and veneer 1 is according to this record, the priority of veneer 1, veneer 2 and veneer 3 is set to 3,1,2, at this moment execution in step 406.
Step 405, veneer 1 starts timer, wouldn't be that veneer 2 distributes tokens, and timer then after, execution in step 406.
Wherein, if veneer 1 timer not then before, receive the token application message that veneer 3 sends, the token quantity of asking is 220, veneer 1 determines that veneer 3 is not the minimum veneer of priority, therefore send the token grant message to veneer 3, for veneer 3 distributes 220 tokens, and the token number in the master control token bucket is adjusted into 80.
Step 406, veneer 1 according to token quantity last in the master control token bucket, returns the token grant message according to the token application message that veneer 2 sends.
Concrete, if veneer 1 is be before veneer 2 distributes tokens, for veneer 3 has distributed 220 tokens, last token number quantity not sufficient is 100 in this moment local token bucket, therefore is 80 tokens of veneer 2 distribution, and the token number in the master control token bucket is adjusted into 0.
If veneer 1 is when being veneer 2 distribution tokens, the token quantity in the local token bucket is more than or equal to 100, and veneer 1 is that veneer 2 distributes 100 tokens, and by token grant message notifying veneer 2.
Step 407, after veneer 2 received the token grant message, the token quantity according to carrying in the token grant message increased the token in the local token bucket, and deleted not response identification.
In the present embodiment, the priority of each veneer is according to dynamically arranging for the token quantity of its distribution, for example, in the present embodiment, before this sub-distribution token, if the token quantity that veneer 1 distributed is 200, the token quantity of distributing for veneer 2 is 400, the token quantity of distributing for veneer 3 is 300, has distributed 80 tokens at this for veneer 2, for after veneer 3 distributed 220 tokens, at this moment, the token that veneer 1 distributed for veneer 2 adds up to 480, the token that distributed for veneer 3 adds up to 520, and therefore, veneer 1 is with veneer 1, the priority of veneer 2 and veneer 3 is adjusted into 1,2,3.
Based on the same or analogous thought of said method, the present invention also provides a kind of retransmission unit, be applied to comprise in the equipment of at least one retransmission unit, be provided with the local token set for this retransmission unit of control flow rate on each retransmission unit, also be provided with the set of master control token on the retransmission unit in the described equipment, as shown in Figure 5, the structural representation of the retransmission unit that provides for the embodiment of the invention, described retransmission unit comprises:
Sending module 501 is used for sending token application message to the retransmission unit that is provided with the set of master control token;
Receiver module 502, be used for after described sending module 501 sends token application message, receive the token grant message that the described retransmission unit that is provided with the set of master control token returns according to described token application message, to increase the token in the local token set that self arranges;
Wherein, described receiver module 502, described retransmission unit are provided with under the situation of master control token set, also are used for receiving the token application message that described sending module sends;
Judge module 503, described retransmission unit are provided with under the situation of master control token set and enable, and are used for after described receiver module 502 receives token application message, judge whether the token quantity in the described master control token set is zero;
Token distribution module 504, described retransmission unit is provided with under the situation of master control token set and enables, be used for when the token quantity in the described master control token set of described judge module 503 judgements is non-vanishing, gather interior token quantity according to token application message and described master control token that described receiver module 502 receives, be corresponding retransmission unit distribution token, and reduce the token of respective numbers in the described master control token set;
Described sending module 501, described retransmission unit is provided with under the situation of master control token set, also being used in described token distribution module 504 is after described corresponding retransmission unit distributes token, by the token grant message token that distributes is sent to described corresponding retransmission unit, to increase the token quantity in the local token set that arranges in this retransmission unit.
Preferably,
Described judge module, the concrete token quantity that is used for judging that whether the interior token quantity of described master control token set apply for more than or equal to described token application message;
Described token distribution module, concrete being used for when described judge module is judged the token quantity that the token quantity in described master control token is gathered applies for more than or equal to described token application message, the token number that distributes described token application message to ask for described corresponding retransmission unit; During token quantity that the token quantity in described judge module is judged the set of described master control token is applied for less than described token application message, all interior tokens of described master control token set are distributed to described corresponding retransmission unit.
Preferably, described token distribution module, concrete being used for when the token quantity in the described master control token set is zero, the token quantity of distributing for described corresponding retransmission unit is zero.
Preferably, also comprise:
Logging modle, described retransmission unit is provided with under the situation of master control token set and enables, be used for being recorded as the token quantity that described at least one retransmission unit distributed, and be described at least two retransmission unit settings priority from low to high from more to less according to the token quantity of described distribution;
Described judge module, the concrete priority that is used for according to described logging modle record judges whether described corresponding retransmission unit is the minimum retransmission unit of priority;
Timing module, described retransmission unit are provided with under the situation of master control token set and enable, and are used for if the judged result of described judge module is for being the startup timer;
Described token distribution module is used for when the described timer time of described timing module arrives, for described corresponding retransmission unit distributes token; And if the judged result of described judge module for not, is described corresponding retransmission unit distribution token.
Preferably, the described retransmission unit that is provided with the set of master control token is provided with token increases cycle and token increase thresholding, and described retransmission unit also comprises:
Described judge module, judges whether the token quantity of disappearance in the described master control token set increases thresholding greater than described token at concrete being used for when the described token increase cycle arrives;
Token increases module, and described retransmission unit is provided with under the situation of master control token set and enables, and is used for if the judged result of described judge module is when being, the token quantity that increases in described master control token set is described token increase thresholding; Otherwise the token quantity that increases in described master control token set is the token quantity of described disappearance.
Through the above description of the embodiments, those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential general hardware platform, can certainly pass through hardware, but the former is better execution mode under a lot of situation.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words can embody with the form of software product, this computer software product is stored in the storage medium, comprise that some instructions are with so that a computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out the described method of each embodiment of the present invention.
It will be appreciated by those skilled in the art that accompanying drawing is the schematic diagram of a preferred embodiment, the module in the accompanying drawing or flow process might not be that enforcement the present invention is necessary.
It will be appreciated by those skilled in the art that the module in the device among the embodiment can be distributed in the device of embodiment according to the embodiment description, also can carry out respective change and be arranged in the one or more devices that are different from present embodiment.The module of above-described embodiment can be merged into a module, also can further split into a plurality of submodules.
The invention described above embodiment sequence number does not represent the quality of embodiment just to description.
More than disclosed only be several specific embodiment of the present invention, still, the present invention is not limited thereto, any those skilled in the art can think variation all should fall into protection scope of the present invention.

Claims (13)

1. flow control methods, be applied to comprise in the equipment of at least one retransmission unit, it is characterized in that, be provided with the local token set for this retransmission unit of control flow rate on each retransmission unit, also be provided with the set of master control token on the retransmission unit in the described equipment, described method comprises:
The retransmission unit that is provided with the set of master control token receives token application message;
When the token quantity in the described master control token set is non-vanishing, the described retransmission unit of master control token set that is provided with is according to the token quantity in described token application message and the set of described master control token, be corresponding retransmission unit distribution token, and reduce the token of respective numbers in the described master control token set;
The described retransmission unit that is provided with the set of master control token sends to described corresponding retransmission unit by the token grant message with the token that distributes, to increase the token quantity in the local token set that arranges in this retransmission unit.
2. the method for claim 1, it is characterized in that, when described token quantity in the set of master control token is non-vanishing, the described retransmission unit of master control token set that is provided with is according to the token quantity in described token application message and the set of described master control token, for corresponding retransmission unit distributes token, specifically comprise:
The described retransmission unit that is provided with master control token set is judged the token quantity whether the token quantity in the described master control token set apply for more than or equal to described token application message;
If judged result is for being, described to be provided with the retransmission unit that the master control token gathers be the token number that described corresponding retransmission unit distributes described token application message to ask;
If judged result is not, the described retransmission unit that is provided with the set of master control token is distributed to described corresponding retransmission unit with all tokens in the described master control token set.
3. the method for claim 1 is characterized in that, also comprises:
When the token quantity in the described master control token set was zero, the described retransmission unit that is provided with the set of master control token was that the token quantity that described corresponding retransmission unit distributes is zero.
4. the method for claim 1, it is characterized in that, the token quantity that promising described at least one retransmission unit of record distributed on the described retransmission unit that is provided with master control token set, and be described at least one retransmission unit setting priority from low to high from more to less according to the token quantity of described distribution;
When described token quantity in the set of master control token was non-vanishing, the described retransmission unit that is provided with the set of master control token, specifically comprised for corresponding retransmission unit distributes token according to the token quantity in described token application message and the set of described master control token:
The described retransmission unit that is provided with the set of master control token judges whether described corresponding retransmission unit is the minimum retransmission unit of priority;
If judged result is for being, the described retransmission unit that is provided with the set of master control token starts timer, when the described timer time arrives, is described corresponding retransmission unit distribution token;
If judged result is not, the described retransmission unit that is provided with the set of master control token is that described corresponding retransmission unit distributes token.
5. the method for claim 1 is characterized in that, the described retransmission unit that is provided with the set of master control token receives token application message, specifically comprises:
The described retransmission unit that is provided with master control token set receives the token application message that this retransmission unit generates according to self token requisition cycle; And/or
The described retransmission unit that is provided with master control token set receives the token application message that other retransmission units send according to self token requisition cycle.
6. method as claimed in claim 5 is characterized in that, the described retransmission unit that is provided with master control token set receives this retransmission unit according to the token application message that self token generates requisition cycle, specifically comprises:
The described retransmission unit that is provided with master control token set receives when the local token set of this retransmission unit self is discontented, and this retransmission unit is according to the token application message of self token generation requisition cycle;
The described retransmission unit that is provided with master control token set receives other retransmission units according to the token application message that self token sends requisition cycle, specifically comprises:
The described retransmission unit that is provided with master control token set receives when the local token set of described other retransmission units is discontented, and described other retransmission units are according to the token application message of self token transmission requisition cycle.
7. the method for claim 1 is characterized in that,
When the token quantity of the local token set disappearance that sends described token application message forwarding unit was less than or equal to the token application thresholding of self, the token quantity of described token application message application was the token quantity of described disappearance;
When the token quantity of the local token set disappearance that sends described token application message forwarding unit during greater than described self token application thresholding, the token quantity of described token application message application is described self token application thresholding.
8. the method for claim 1 is characterized in that, the described retransmission unit that is provided with the set of master control token is provided with token increases cycle and token increase thresholding, and described method also comprises:
When the described token increase cycle arrived, the described retransmission unit that is provided with the set of master control token judged whether the token quantity of disappearance in the described master control token set increases thresholding greater than described token;
If judged result is for being, the token quantity that the described retransmission unit that is provided with the set of master control token increases in described master control token set is described token increase thresholding;
Otherwise the token quantity that the described retransmission unit that is provided with the set of master control token increases in described master control token set is the token quantity of described disappearance.
9. retransmission unit, be applied to comprise in the equipment of at least one retransmission unit, it is characterized in that, be provided with the local token set for this retransmission unit of control flow rate on each retransmission unit, also be provided with the set of master control token on the retransmission unit in the described equipment, described retransmission unit comprises:
Sending module is used for sending token application message to the retransmission unit that is provided with the set of master control token;
Receiver module is used for after described sending module sends token application message, receives the token grant message that the described retransmission unit that is provided with the set of master control token returns according to described token application message, to increase the token in the local token set that self arranges;
Wherein, described receiver module, described retransmission unit are provided with under the situation of master control token set, also are used for receiving the token application message that described sending module sends;
Judge module, described retransmission unit are provided with under the situation of master control token set and enable, and are used for after described receiver module receives token application message, judge whether the token quantity in the described master control token set is zero;
The token distribution module, described retransmission unit is provided with under the situation of master control token set and enables, be used for when described judge module judges that token quantity in described master control token is gathered is non-vanishing, gather interior token quantity according to token application message and described master control token that described receiver module receives, be corresponding retransmission unit distribution token, and reduce the token of respective numbers in the described master control token set;
Described sending module, described retransmission unit is provided with under the situation of master control token set, also being used in described token distribution module is after described corresponding retransmission unit distributes token, by the token grant message token that distributes is sent to described corresponding retransmission unit, to increase the token quantity in the local token set that arranges in this retransmission unit.
10. retransmission unit as claimed in claim 9 is characterized in that,
Described judge module, the concrete token quantity that is used for judging that whether the interior token quantity of described master control token set apply for more than or equal to described token application message;
Described token distribution module, concrete being used for when described judge module is judged the token quantity that the token quantity in described master control token is gathered applies for more than or equal to described token application message, the token number that distributes described token application message to ask for described corresponding retransmission unit; During token quantity that the token quantity in described judge module is judged the set of described master control token is applied for less than described token application message, all interior tokens of described master control token set are distributed to described corresponding retransmission unit.
11. retransmission unit as claimed in claim 9 is characterized in that, described token distribution module, and concrete being used for when the token quantity in the described master control token set is zero, the token quantity of distributing for described corresponding retransmission unit is zero.
12. retransmission unit as claimed in claim 9 is characterized in that, also comprises:
Logging modle, described retransmission unit is provided with under the situation of master control token set and enables, be used for being recorded as the token quantity that described at least one retransmission unit distributed, and be described at least two retransmission unit settings priority from low to high from more to less according to the token quantity of described distribution;
Described judge module, the concrete priority that is used for according to described logging modle record judges whether described corresponding retransmission unit is the minimum retransmission unit of priority;
Timing module, described retransmission unit are provided with under the situation of master control token set and enable, and are used for if the judged result of described judge module is for being the startup timer;
Described token distribution module is used for when the described timer time of described timing module arrives, for described corresponding retransmission unit distributes token; And if the judged result of described judge module for not, is described corresponding retransmission unit distribution token.
13. retransmission unit as claimed in claim 9 is characterized in that, the described retransmission unit that is provided with the set of master control token is provided with token increases cycle and token increase thresholding, and described retransmission unit also comprises:
Described judge module, judges whether the token quantity of disappearance in the described master control token set increases thresholding greater than described token at concrete being used for when the described token increase cycle arrives;
Token increases module, and described retransmission unit is provided with under the situation of master control token set and enables, and is used for if the judged result of described judge module is when being, the token quantity that increases in described master control token set is described token increase thresholding; Otherwise the token quantity that increases in described master control token set is the token quantity of described disappearance.
CN201310136224.0A 2013-04-18 2013-04-18 A kind of flow control methods and retransmission unit Active CN103188160B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310136224.0A CN103188160B (en) 2013-04-18 2013-04-18 A kind of flow control methods and retransmission unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310136224.0A CN103188160B (en) 2013-04-18 2013-04-18 A kind of flow control methods and retransmission unit

Publications (2)

Publication Number Publication Date
CN103188160A true CN103188160A (en) 2013-07-03
CN103188160B CN103188160B (en) 2016-12-07

Family

ID=48679131

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310136224.0A Active CN103188160B (en) 2013-04-18 2013-04-18 A kind of flow control methods and retransmission unit

Country Status (1)

Country Link
CN (1) CN103188160B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103746928A (en) * 2013-12-30 2014-04-23 迈普通信技术股份有限公司 Method and system for controlling flow rate by utilizing access control list
WO2016082365A1 (en) * 2014-11-25 2016-06-02 中兴通讯股份有限公司 Traffic adjusting method and device
CN105991463A (en) * 2015-02-13 2016-10-05 阿里巴巴集团控股有限公司 Method and system for realizing flow control, message main node, and token server
CN107040478A (en) * 2015-07-29 2017-08-11 深圳市中兴微电子技术有限公司 Token application processing method and device
CN108667744A (en) * 2018-02-26 2018-10-16 华为技术有限公司 Flow control methods and device
CN108848038A (en) * 2018-08-30 2018-11-20 华为技术有限公司 Flow managing method and token bucket node based on token bucket
CN110198275A (en) * 2018-03-28 2019-09-03 腾讯科技(深圳)有限公司 A kind of flow control methods, system, server and storage medium
CN115941609A (en) * 2022-11-30 2023-04-07 京东科技信息技术有限公司 Distributed flow rate limiting method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1751481A (en) * 2003-02-14 2006-03-22 西门子公司 Method for allocating transmission bandwidth in a packet-oriented communications facility
CN1835447A (en) * 2005-03-16 2006-09-20 华为技术有限公司 Realizing method of data stream constraint control
CN101227410A (en) * 2008-02-03 2008-07-23 杭州华三通信技术有限公司 Flow monitoring method and flow monitoring equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1751481A (en) * 2003-02-14 2006-03-22 西门子公司 Method for allocating transmission bandwidth in a packet-oriented communications facility
CN1835447A (en) * 2005-03-16 2006-09-20 华为技术有限公司 Realizing method of data stream constraint control
CN101227410A (en) * 2008-02-03 2008-07-23 杭州华三通信技术有限公司 Flow monitoring method and flow monitoring equipment

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103746928A (en) * 2013-12-30 2014-04-23 迈普通信技术股份有限公司 Method and system for controlling flow rate by utilizing access control list
WO2016082365A1 (en) * 2014-11-25 2016-06-02 中兴通讯股份有限公司 Traffic adjusting method and device
CN105703928A (en) * 2014-11-25 2016-06-22 中兴通讯股份有限公司 Traffic adjustment method and traffic adjustment device
CN105991463A (en) * 2015-02-13 2016-10-05 阿里巴巴集团控股有限公司 Method and system for realizing flow control, message main node, and token server
CN107040478A (en) * 2015-07-29 2017-08-11 深圳市中兴微电子技术有限公司 Token application processing method and device
CN108667744A (en) * 2018-02-26 2018-10-16 华为技术有限公司 Flow control methods and device
CN110198275A (en) * 2018-03-28 2019-09-03 腾讯科技(深圳)有限公司 A kind of flow control methods, system, server and storage medium
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
CN115941609A (en) * 2022-11-30 2023-04-07 京东科技信息技术有限公司 Distributed flow rate limiting method, device, equipment and storage medium
CN115941609B (en) * 2022-11-30 2024-10-18 京东科技信息技术有限公司 Distributed flow rate limiting method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN103188160B (en) 2016-12-07

Similar Documents

Publication Publication Date Title
CN103188160A (en) Flow control method and forwarding unit
CN106817686B (en) Charging method and device
CN112737690B (en) Optical line terminal OLT equipment virtualization method and related equipment
CN103384237A (en) Method for sharing IaaS cloud account, shared platform and network device
CN102158420B (en) Service traffic scheduling method based on priority queue and device thereof
CN105005521A (en) Test method and apparatus
CN107332814B (en) Request message transmission method and device
CN105959090A (en) Service processing method and device of power wireless private network
CN102209030A (en) Service traffic splitting method, device and system
CN108718258B (en) Quality detection method and equipment for inter-board link
CN113938435A (en) Data transmission method, data transmission device, electronic device, storage medium, and program product
CN104994022A (en) Message transmission method and service board
Mark Distributed scheduling conflict-free multiple access for local area communication networks
CN106788948A (en) A kind of multi-host communication mechanism based on half-duplex operation
CN102271067B (en) Network detecting method, apparatus and system
CN113938955B (en) Data transmission method, device, equipment and system
CN103188171A (en) Message scheduling method and equipment
CN105991464B (en) Shunt method, master control borad, interface board and the gateway of network flow
CN110417687A (en) A kind of message sends and receives method and device
EP3435615B1 (en) Network service implementation method, service controller, and communication system
CN112087678B (en) Bandwidth allocation and bandwidth checking method and device
CN104202297A (en) Anti-attack method and device dynamically adapting to server performance
CN115378959A (en) Data transmission method, device, electronic equipment and storage medium
CN101990229A (en) RNC (Radio Network Control) aging test method, equipment, service board and interface board
CN103841221A (en) Strategy execution method, system and equipment, and control equipment

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: NEW H3C TECHNOLOGIES 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: HANGZHOU H3C TECHNOLOGIES Co.,Ltd.

CP03 Change of name, title or address
TR01 Transfer of patent right

Effective date of registration: 20230609

Address after: 310052 11th Floor, 466 Changhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: H3C INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 310052 Changhe Road, Binjiang District, Hangzhou, Zhejiang Province, No. 466

Patentee before: NEW H3C TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right