CN103188160B - A kind of flow control methods and retransmission unit - Google Patents

A kind of flow control methods and retransmission unit Download PDF

Info

Publication number
CN103188160B
CN103188160B CN201310136224.0A CN201310136224A CN103188160B CN 103188160 B CN103188160 B CN 103188160B CN 201310136224 A CN201310136224 A CN 201310136224A CN 103188160 B CN103188160 B CN 103188160B
Authority
CN
China
Prior art keywords
token
retransmission unit
master control
application message
retransmission
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310136224.0A
Other languages
Chinese (zh)
Other versions
CN103188160A (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

Landscapes

  • Small-Scale Networks (AREA)

Abstract

The invention discloses a kind of flow control methods and retransmission unit, it is applied to include the equipment of at least one retransmission unit, each retransmission unit is provided with the local token set controlling this retransmission unit flow rate, being additionally provided with master control token set on a retransmission unit in equipment, the method includes: the retransmission unit being provided with master control token set receives token application message;When the token quantity of master control token set is not zero, it is provided with the retransmission unit of master control token set according to token application message and the token quantity of master control token set, distributes token for corresponding retransmission unit, and reduce respective numbers token in master control token set;The token of distribution is issued corresponding retransmission unit by token grant message by the retransmission unit being provided with master control token set, to increase the token quantity of local token set in this retransmission unit.By using the present invention, it is possible to achieve the global traffic of multiple veneers or chip is supervised, it is to avoid the flow that veneer or chip pass through exceedes the flow allowing to pass through.

Description

A kind of flow control methods and retransmission unit
Technical field
The present invention relates to communication technical field, particularly relate to a kind of flow control methods and retransmission unit.
Background technology
Flow is controlled by traffic policing exactly, is entered the flow rate of network by supervision, to exceeding The flow of part carries out " punishment ", make the flow of entrance be limited in one reasonably within the scope of, with guarantor Protect the interests of Internet resources and operator, the net of 50% can not be occupied over as HTTP message can be limited Network bandwidth, if it find that certain flow connected exceeds standard, traffic policing can select dropping packets, or weight The priority of newly configured message, traffic policing is called for short CAR(Committed Access Rate, promises to undertake and visits Ask speed).
Distributed apparatus is the equipment including polylith veneer, and veneer is provided with chip, every piece of veneer tool There is the independent ability receiving and dispatching message, i.e. every piece veneer all can produce flow, for distributed apparatus, when When multiple veneers are arranged to be applied to same overall situation CAR, need the plurality of veneer is unified Flow-control, when applying CAR on a VLAN, reply distributed apparatus is in this VLAN Interface carries out unified flow-control.
In prior art, for above-mentioned situation, operation CAR function on veneer, but the effect actually reached Fruit remains and every piece of veneer carries out flow-control, and cannot realize carrying out flow control to multiple veneers are unified System.
Summary of the invention
The problem to be solved in the present invention is how the retransmission unit in equipment to be carried out global traffic control.
For reaching above-mentioned purpose, the invention provides a kind of flow control methods, be applied to include at least one In the equipment of individual retransmission unit, each retransmission unit is provided with for controlling this retransmission unit flow speed The local token set of rate, a retransmission unit in described equipment is additionally provided with master control token set, Described method includes:
The retransmission unit being provided with master control token set receives token application message;
When the token quantity in described master control token set is not zero, described in be provided with master control token set Retransmission unit according to the token quantity in described token application message and described master control token set, for phase Answer retransmission unit to distribute token, and reduce the token of respective numbers in described master control token set;
The token of distribution is sent out by the described retransmission unit being provided with master control token set by token grant message Give described corresponding retransmission unit, to increase the token in the local token set arranged in this retransmission unit Quantity.
Preferably, described when the token quantity in master control token set is not zero, described in be provided with master control The retransmission unit of token set is according to the token number in described token application message and described master control token set Amount, distributes token for corresponding retransmission unit, specifically includes:
The described retransmission unit being provided with master control token set judges the token number in described master control token set Whether amount is more than or equal to described token application message apllied token quantity;
If the determination result is YES, the retransmission unit being provided with master control token set described in is described corresponding forwarding Unit distributes the token number that described token application message is asked;
If judged result is no, described in be provided with the retransmission unit of master control token set by described master control token All tokens in set distribute to described corresponding retransmission unit.
Preferably, also include:
When the token quantity in described master control token set is zero, described in be provided with master control token set Retransmission unit be described corresponding retransmission unit distribution token quantity be zero.
Preferably, be provided with described on the retransmission unit of master control token set record promising described at least one The token quantity that retransmission unit distributed, and according to the described token quantity distributed from more to less for described At least one retransmission unit arranges priority from low to high;
Described when the token quantity in master control token set is not zero, described in be provided with master control token set Retransmission unit according to the token quantity in described token application message and described master control token set, for phase Answer retransmission unit to distribute token, specifically include:
The described retransmission unit being provided with master control token set judges whether described corresponding retransmission unit is preferential The retransmission unit that level is minimum;
If the determination result is YES, described in be provided with master control token set retransmission unit start timer, when When described timer periods arrives, distribute token for described corresponding retransmission unit;
If judged result is no, described in be provided with the retransmission unit of master control token set be described corresponding forwarding Unit distribution token.
Preferably, the retransmission unit being provided with master control token set described in receives token application message, specifically Including:
The described retransmission unit being provided with master control token set receives this retransmission unit according to own token application The token application message that cycle generates;And/or
The described retransmission unit being provided with master control token set receives other retransmission units according to own token Shen The token application message that please send in the cycle.
Preferably, the retransmission unit being provided with master control token set described in receives this retransmission unit according to self The token application message of token generation requisition cycle, specifically includes:
The described retransmission unit being provided with master control token set receives the local token when this retransmission unit self When set is discontented, this retransmission unit is according to the token application message of own token generation requisition cycle;
The described retransmission unit being provided with master control token set receives other retransmission units according to own token Shen The token application message that please send in the cycle, specifically includes:
The described retransmission unit being provided with master control token set receives the local order when other retransmission units described When board set is discontented with, other retransmission units described are according to the token application report of own token transmission requisition cycle Literary composition.
Preferably,
When the token quantity of the local token set disappearance of the retransmission unit sending described token application message is little In or during equal to self token application thresholding, the token quantity of described token application message application is described The token quantity of disappearance;
When the token quantity of the local token set disappearance of the retransmission unit sending described token application message is big When self token application thresholding described, the token quantity of described token application message application be described from The token application thresholding of body.
Preferably, be provided with described on the retransmission unit of master control token set be provided with token increase the cycle and Token increases thresholding, and described method also includes:
When described token increase the cycle arrive time, described in be provided with master control token set retransmission unit judge In described master control token set, whether the token quantity of disappearance increases thresholding more than described token;
If the determination result is YES, the retransmission unit of master control token set it is provided with described at described master control token The token quantity increased in set is that described token increases thresholding;
Otherwise, the retransmission unit being provided with master control token set described in increases in described master control token set The token quantity that token quantity is described disappearance.
Present invention also offers a kind of retransmission unit, be applied to include in the equipment of at least one retransmission unit, The local token set for controlling this retransmission unit flow rate, institute it is provided with on each retransmission unit Stating and be additionally provided with master control token set in equipment retransmission unit, described retransmission unit includes:
Sending module, for sending token application message to the retransmission unit being provided with master control token set;
Receiver module, after sending token application message at described sending module, is provided with described in reception The token grant message that the retransmission unit of master control token set returns according to described token application message, to increase Add the token in the local token set self arranged;
Wherein, described receiver module, in the case of described retransmission unit is provided with master control token set, It is additionally operable to receive the token application message that described sending module sends;
Judge module, enables in the case of being provided with master control token set, be used on described retransmission unit After described receiver module receives token application message, it is judged that the token number in described master control token set Whether amount is zero;
Token distribution module, enables in the case of being provided with master control token set on described retransmission unit, When token quantity in judging described master control token set when described judge module is not zero, according to institute State the token quantity in the token application message and described master control token set that receiver module receives, for phase Answer retransmission unit to distribute token, and reduce the token of respective numbers in described master control token set;
Described sending module, in the case of being provided with master control token set, also uses on described retransmission unit After being described corresponding retransmission unit distribution token in described token distribution module, by token grant message The token of distribution is sent to described corresponding retransmission unit, to increase the local order arranged in this retransmission unit Token quantity in board set.
Preferably,
Described judge module, specifically for judging whether the token quantity in described master control token set is more than Or equal to described token application message apllied token quantity;
Described token distribution module, in judging described master control token set when described judge module Token quantity more than or equal to described token application message apllied token quantity time, for described accordingly Retransmission unit distributes the token number that described token application message is asked;When described judge module judges described When token quantity in master control token set is less than described token application message apllied token quantity, will All tokens in described master control token set distribute to described corresponding retransmission unit.
Preferably, described token distribution module, specifically for when the token number in described master control token set When amount is zero, the token quantity for the distribution of described corresponding retransmission unit is zero.
Preferably, also include:
Logging modle, enables in the case of being provided with master control token set, be used on described retransmission unit It is recorded as the token quantity that at least one retransmission unit described distributed, and according to the described token distributed Quantity is the priority that described at least two retransmission unit arranges from low to high from more to less;
Described judge module, specifically for the priority according to described logging modle record, it is judged that described phase Answer whether retransmission unit is the retransmission unit that priority is minimum;
Timing module, enables in the case of being provided with master control token set, be used on described retransmission unit If the judged result of described judge module is yes, start timer;
Described token distribution module, is used for when the described timer periods in described timing module arrives, Token is distributed for described corresponding retransmission unit;And if the judged result of described judge module is no, for institute State corresponding retransmission unit distribution token.
Preferably, be provided with described on the retransmission unit of master control token set be provided with token increase the cycle and Token increases thresholding, and described retransmission unit also includes:
Described judge module, specifically for when described token increases cycle arrival, it is judged that described master control makes In board set, whether the token quantity of disappearance increases thresholding more than described token;
Token increases module, enables in the case of being provided with master control token set on described retransmission unit, If for the judged result of described judge module for being time, the token increased in described master control token set Quantity is that described token increases thresholding;Otherwise, the token quantity increased in described master control token set is The token quantity of described disappearance.
In the present invention, the veneer being provided with master control token set receives token application message, when master control token When token quantity in set is not zero, it is provided with the veneer of master control token set according to token application message With the token quantity in described master control token set, distribute token for corresponding veneer, and reduce master control token The token of respective numbers in set, the veneer being provided with master control token set will be divided by token grant message The token joined is sent to corresponding veneer, to increase the token number in the local token set arranged in this veneer Amount.By using the present invention, it is possible to achieve multiple veneers or chip are carried out global traffic supervision, it is to avoid Veneer or the chip actual flow passed through exceed the flow allowing to pass through.
Accompanying drawing explanation
The structural representation of a kind of distributed apparatus that Fig. 1 provides for the embodiment of the present invention;
The schematic flow sheet of a kind of flow control methods that Fig. 2 provides for the embodiment of the present invention;
The structural representation of a kind of distributed apparatus that Fig. 3 provides for the embodiment of the present invention;
The schematic flow sheet of a kind of flow control methods that Fig. 4 provides for the embodiment of the present invention;
The structural representation of the veneer that Fig. 5 provides for the embodiment of the present invention.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the present invention, the technical scheme in the present invention is carried out clearly and completely Describe, it is clear that described embodiment is only a part of embodiment of the present invention rather than whole Embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art are not making creative labor The every other embodiment obtained under dynamic premise, broadly falls into the scope of protection of the invention.
Embodiments providing a kind of flow control methods, the method can apply to distributed apparatus Or in centralized device, for distributed apparatus, retransmission unit is the veneer in distributed apparatus, such as Fig. 1 Shown in, the structural representation of a kind of distributed apparatus provided for the embodiment of the present invention, in distributed apparatus Each veneer on be both provided with one or more local token set, one of them veneer sets simultaneously Being equipped with master control token set, for centralized device, retransmission unit is to arrange on the veneer of centralized device Chip, the veneer in centralized device is provided with one or more chip, each chip is provided with One or more local token set, one of them chip is provided with master control token set simultaneously, In embodiments of the invention, the token that all local token set are obtained is distributed by master control token set.
Below, in conjunction with specific embodiment, method proposed by the invention is described further, In the present embodiment, equipment is distributed apparatus, it is contemplated that the place of the usual not responsible service message of master control borad Reason, is therefore arranged on master control token set on master control borad, and certainly, master control token set can be arranged at On any veneer, or being arranged on third party device, the present embodiment is only to be arranged on master control token set Illustrate as a example by master control borad.
As in figure 2 it is shown, the schematic flow sheet of a kind of flow control methods provided for the embodiment of the present invention, bag Include following steps:
Step 201, business board sends token application message to master control borad.
Concrete, be provided with token requisition cycle in business board, business board when token arrives requisition cycle, Send token application message to master control borad, token application message carries veneer numbering, adds token week Phase, the information such as token number of application, for different veneers, token requisition cycle can be identical or different. It should be noted that master control borad self can also have local token set, master control borad is according to the order of self Board requisition cycle, generate token application message, and be this locality token set application from master control token set Token.
Wherein, token application thresholding, token application thresholding=maximum allowable through-rate it are provided with in business board * (token requisition cycle+propagation delay time), lack when the local token set of the veneer sending token application message When the token quantity lost is less than or equal to the token application thresholding of self, the token of token application message application Quantity be disappearance token quantity, when send token application message veneer local token set disappearance When token quantity is more than the token application thresholding of self, the token quantity of token application message application is self Token application thresholding.
Preferably, for master control borad and business board, when the token of himself arrives requisition cycle, permissible Judge that the local token set of self is the fullest, when local token set is expired, master control borad and business Plate does not generates or does not send token application message at this token requisition cycle, when local token set is discontented with Time, master control borad and business board generate or send token application message.
Preferably, business board can also locally record non-response identification after sending token application message, If when next token arrives requisition cycle, this non-response identification still exists, then business board is in this order Board does not send token application message requisition cycle.
Preferably, this non-response identification can be configured so that and only exists a token requisition cycle, such as, When this token arrives requisition cycle, there is non-response identification in this locality, then business board does not sends to master control borad Token application message, and non-response identification is deleted.
Step 202, master control borad receives token application message.
Step 203, master control borad judges whether the token quantity in master control token set is zero, if result is yes, Perform step 204, otherwise perform step 205.
Concrete, master control borad is provided with token increases cycle and token increase thresholding, whenever token increases When cycle arrives, master control borad judges in master control token set, whether the token quantity of disappearance increases more than token Thresholding, time if the determination result is YES, the token quantity that master control borad increases in master control token set is token Increasing thresholding, otherwise, the token quantity that master control borad increases in master control token set is the token number of disappearance Amount.The token exceeded in master control token set when frequency and the quantity of each business board application token is accelerated Time, the token quantity in master control token set may be depleted.
Step 204, master control borad is numbered according to the veneer in token application message, sends order to corresponding service plate Board entitlement message, the token quantity that this token grant message is distributed is zero, and performs step 207.
Step 205, master control borad is numbered and the order in master control token set according to the veneer in token application message Board quantity, distributes token for corresponding service plate, and reduces the token of respective numbers in master control token set.
Concrete, master control borad may determine that whether the token quantity in master control token set is more than or equal to order Board application message apllied token quantity;If the determination result is YES, master control borad is according to the numbered phase of veneer Answer the token number that veneer distribution token application message is asked;If judged result is no, master control borad is according to list All tokens that plate is numbered in just master control token set distribute to corresponding veneer.
Preferably, master control borad can record the token quantity that promising all veneers distributed, and according to dividing The token quantity joined arranges priority from low to high for all veneers from more to less.When master control borad receives During the token application message that business board sends, search priority according to veneer numbering, and judge this business board Whether it is the veneer that priority is minimum, if the determination result is YES, master control board starting timer, work as timer When time arrives, distributing token for this business board, otherwise directly this business board distributes token.
Step 206, the token of distribution is sent to business board by token grant message by master control borad, to increase Token quantity in the local token set arranged in this veneer.
Step 207, business board receives the token grant message that master control borad sends, according in token grant message The token quantity carried, increases the token quantity in local token set.
Preferably, if business board is locally recording non-response identification after sending token application message, After receiving token grant message, business board deletes this non-response identification.
It should be noted that for centralized device, it is achieved flow process and the realization stream of above-mentioned distributed apparatus Journey is similar to, and differs only in due to centralized device only one of which veneer, and therefore the set of master control token is with many Individual local token set is safeguarded by each chip on veneer, for centralized device, there is not plate due to it Between communicate, need not consider propagation delay time, therefore application this method can obtain compared to distributed apparatus more Good speed limit effect.
For local token set, each veneer can be provided with multiple local token set, if veneer Need for multiple local token aggregate requests tokens, its can a time unification that set will be for each The token of ground token set application is sent to be provided with the list of master control token set by a combination message Plate, sends token application message to avoid veneer to be individually for each local token set, and the plate caused leads to Letter is frequent, and then the hydraulic performance decline produced.
The present invention passes through to arrange master control token set and local token set on veneer, and by being provided with master The token quantity that the veneer of control token set is uniformly controlled in equipment in the local token set of all veneers, Can realize multiple veneers or chip are carried out global traffic supervision, it is to avoid veneer or chip is actual passes through Flow exceed and allow the flow that passes through.
Below in conjunction with specific embodiment, describe the present invention, in embodiments of the present invention, with Master control token collection is combined into master control token bucket, local token collection is described as a example by being combined into local token bucket, right In master control token bucket, its CBS(Committed Burst Size, maximum information frame sign can be promised to undertake) can To be configured according to actual flow control strategy, its token increases the CIR that the cycle can be user's permission (Committed Information Rate, can commitment information transfer rate), for local token bucket, examines Considering to problems such as propagation delay times, the size of its CBS can be local token bucket CBS=this locality token bucket CIR*(token requisition cycle+propagation delay time), with ensure veneer can before getting request token, with The CIR allowed normally sends message, and herein, the CIR of local token bucket and master control token bucket can be different.
As it is shown on figure 3, in the present embodiment, veneer 1 is provided with master control token bucket and local order simultaneously Being provided with local token bucket on board bucket, veneer 2 and veneer 3, in master control token bucket, residue token quantity is 90, the token of veneer 2 be requisition cycle 5s, local token bucket CBS be 500, real surplus token number Amount is 300, and local token bucket CIR is 20.
As shown in Figure 4, a kind of flow control methods provided for the embodiment of the present invention, comprise the following steps:
Step 401, when the token of self arrives requisition cycle, and veneer 2 judges whether this locality has recorded and do not rings Should indicate, if the determination result is YES, perform step 402, otherwise perform step 403.
Step 402, veneer 2 waits when next token arrives requisition cycle, returns and perform step 401.
Step 403, according to token requisition cycle and local token bucket CIR, veneer 2 determines that token application thresholding is 100, less than disappearance token number 200, therefore send token application message to veneer 1, ask 100 tokens, And locally recording non-response identification.
Step 404, after veneer 1 receives the token application message that veneer 2 sends, it is judged that veneer 2 preferential Whether level is minimum, if the determination result is YES, performs step 405, otherwise performs step 406.
Concrete, veneer 1 records the token quantity that promising veneer 1, veneer 2 and veneer 3 distributed.
Wherein, if the token quantity that veneer 1 distributed is 200, the token quantity distributed for veneer 2 is 400, the token quantity distributed for veneer 3 is 300, and veneer 1 is according to this record, by veneer 1, veneer 2 It is set to 1,3,2 with the priority of veneer 3, now performs step 405.
If the token quantity that veneer 1 distributed is 400, the token quantity distributed for veneer 2 is 100, The token quantity distributed for veneer 3 is 300, and veneer 1 is according to this record, by veneer 1, veneer 2 and veneer The priority of 3 is set to 3,1,2, now performs step 406.
Step 405, veneer 1 starts timer, wouldn't distribute token for veneer 2, and timer then after, Perform step 406.
Wherein, if veneer 1 is before timer is not timed out, receive the token application message that veneer 3 sends, institute The token quantity of request is 220, and veneer 1 determines that veneer 3 is not the veneer that priority is minimum, therefore to veneer 3 send token grant message, distribute 220 tokens for veneer 3, and are adjusted by the token number in master control token bucket Whole is 80.
Step 406, the token application message that veneer 1 sends according to veneer 2, according to remaining in master control token bucket Token quantity, return token grant message.
Concrete, if veneer 1 is before distributing token for veneer 2, it is assigned with 220 tokens for veneer 3, this Time this locality token bucket in remaining token lazy weight 100, therefore distribute 80 tokens for veneer 2, and Token number in master control token bucket is adjusted to 0.
If veneer 1 is when distributing token for veneer 2, the token quantity in local token bucket is more than or equal to 100 Individual, veneer 1 distributes 100 tokens for veneer 2, and by token grant message notifying veneer 2.
Step 407, after veneer 2 receives token grant message, according to the order carried in token grant message Board quantity, increases the token in local token bucket, and deletes non-response identification.
In the present embodiment, arrange for its token Number dynamics distributed according to the priority of each veneer, Such as, in the present embodiment, before this sub-distribution token, if the token quantity that veneer 1 distributed is 200, The token quantity distributed for veneer 2 is 400, and the token quantity distributed for veneer 3 is 300, at this After being assigned with 80 tokens for veneer 2, be assigned with 220 tokens for veneer 3, now, veneer 1 is veneer 2 The token sum distributed is 480, and the token sum distributed for veneer 3 is 520, and therefore, veneer 1 will The priority of veneer 1, veneer 2 and veneer 3 is adjusted to 1,2,3.
Based on same as mentioned above or similar thought, present invention also offers a kind of retransmission unit, should In the equipment including at least one retransmission unit, each retransmission unit is provided with for controlling this The local token set of retransmission unit flow rate, a retransmission unit in described equipment is additionally provided with Master control token set, as it is shown in figure 5, the structural representation of the retransmission unit provided for the embodiment of the present invention, Described retransmission unit includes:
Sending module 501, for sending token application report to the retransmission unit being provided with master control token set Literary composition;
Receiver module 502, for after described sending module 501 sends token application message, receives described It is provided with the token grant report that the retransmission unit of master control token set returns according to described token application message Literary composition, to increase the token in the local token set self arranged;
Wherein, described receiver module 502, described retransmission unit is provided with the situation of master control token set Under, it is additionally operable to receive the token application message that described sending module sends;
Judge module 503, enables in the case of being provided with master control token set on described retransmission unit, uses After receiving token application message at described receiver module 502, it is judged that the order in described master control token set Whether board quantity is zero;
Token distribution module 504, opens in the case of being provided with master control token set on described retransmission unit With, it is used for when the token quantity in described judge module 503 judges described master control token set is not zero, Token in the token application message received according to described receiver module 502 and described master control token set Quantity, distributes token for corresponding retransmission unit, and reduces the order of respective numbers in described master control token set Board;
Described sending module 501, in the case of described retransmission unit is provided with master control token set, also After being described corresponding retransmission unit distribution token in described token distribution module 504, pass through token grant The token of distribution is sent to described corresponding retransmission unit by message, to increase the basis arranged in this retransmission unit Token quantity in ground token set.
Preferably,
Described judge module, specifically for judging whether the token quantity in described master control token set is more than Or equal to described token application message apllied token quantity;
Described token distribution module, in judging described master control token set when described judge module Token quantity more than or equal to described token application message apllied token quantity time, for described accordingly Retransmission unit distributes the token number that described token application message is asked;When described judge module judges described When token quantity in master control token set is less than described token application message apllied token quantity, will All tokens in described master control token set distribute to described corresponding retransmission unit.
Preferably, described token distribution module, specifically for when the token number in described master control token set When amount is zero, the token quantity for the distribution of described corresponding retransmission unit is zero.
Preferably, also include:
Logging modle, enables in the case of being provided with master control token set, be used on described retransmission unit It is recorded as the token quantity that at least one retransmission unit described distributed, and according to the described token distributed Quantity is the priority that described at least two retransmission unit arranges from low to high from more to less;
Described judge module, specifically for the priority according to described logging modle record, it is judged that described phase Answer whether retransmission unit is the retransmission unit that priority is minimum;
Timing module, enables in the case of being provided with master control token set, be used on described retransmission unit If the judged result of described judge module is yes, start timer;
Described token distribution module, is used for when the described timer periods in described timing module arrives, Token is distributed for described corresponding retransmission unit;And if the judged result of described judge module is no, for institute State corresponding retransmission unit distribution token.
Preferably, be provided with described on the retransmission unit of master control token set be provided with token increase the cycle and Token increases thresholding, and described retransmission unit also includes:
Described judge module, specifically for when described token increases cycle arrival, it is judged that described master control makes In board set, whether the token quantity of disappearance increases thresholding more than described token;
Token increases module, enables in the case of being provided with master control token set on described retransmission unit, If for the judged result of described judge module for being time, the token increased in described master control token set Quantity is that described token increases thresholding;Otherwise, the token quantity increased 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 is it can be understood that arrive this Bright can add the mode of required general hardware platform by software and realize, naturally it is also possible to by hardware, But the former is more preferably embodiment in the case of a lot.Based on such understanding, technical scheme The part contributed prior art the most in other words can embody with the form of software product, This computer software product is stored in a storage medium, including some instructions with so that a calculating Machine equipment (can be personal computer, server, or the network equipment etc.) performs the present invention, and each is real Execute the method described in example.
It will be appreciated by those skilled in the art that accompanying drawing is the schematic diagram of a preferred embodiment, in accompanying drawing Module or flow process are not necessarily implemented necessary to the present invention.
It will be appreciated by those skilled in the art that the module in the device in embodiment can describe according to embodiment Carry out being distributed in the device of embodiment, it is also possible to carry out respective change and be disposed other than the one of the present embodiment In individual or multiple device.The module of above-described embodiment can merge into a module, it is also possible to tears open further It is divided into multiple submodule.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
The several specific embodiments being only the present invention disclosed above, but, the present invention is not limited to this, The changes that any person skilled in the art can think of all should fall into protection scope of the present invention.

Claims (11)

1. a flow control methods, is applied to include in the equipment of at least one retransmission unit, its feature It is, each retransmission unit is provided with the local token collection for controlling this retransmission unit flow rate Closing, a retransmission unit in described equipment is additionally provided with master control token set, described method includes:
The retransmission unit being provided with master control token set receives token application message;
When the token quantity in described master control token set is not zero, described in be provided with master control token set Retransmission unit according to the token quantity in described token application message and described master control token set, for phase Answer retransmission unit to distribute token, and reduce the token of respective numbers in described master control token set;
The token of distribution is sent out by the described retransmission unit being provided with master control token set by token grant message Give described corresponding retransmission unit, to increase the token in the local token set arranged in this retransmission unit Quantity;
Wherein, described in be provided with master control token set retransmission unit receive token application message, specifically wrap Include:
The described retransmission unit being provided with master control token set receives the local token when this retransmission unit self When set is discontented, this retransmission unit is according to the token application message of own token generation requisition cycle;And/or
The described retransmission unit being provided with master control token set receives the local token collection when other retransmission units When closing discontented, other retransmission units described are according to the token application message of own token transmission requisition cycle.
2. the method for claim 1, it is characterised in that described when the order in master control token set When board quantity is not zero, described in be provided with the retransmission unit of master control token set according to described token application report Token quantity in civilian and described master control token set, distributes token for corresponding retransmission unit, specifically includes:
The described retransmission unit being provided with master control token set judges the token number in described master control token set Whether amount is more than or equal to described token application message apllied token quantity;
If the determination result is YES, the retransmission unit being provided with master control token set described in is described corresponding forwarding Unit distributes the token number that described token application message is asked;
If judged result is no, described in be provided with the retransmission unit of master control token set by described master control token All tokens in set distribute to described corresponding retransmission unit.
3. the method for claim 1, it is characterised in that also include:
When the token quantity in described master control token set is zero, described in be provided with master control token set Retransmission unit be described corresponding retransmission unit distribution token quantity be zero.
4. the method for claim 1, it is characterised in that described in be provided with master control token set The token quantity that promising at least one retransmission unit described distributed is recorded on retransmission unit, and according to described The token quantity distributed arranges from low to high preferential at least one retransmission unit described from more to less Level;
Described when the token quantity in master control token set is not zero, described in be provided with master control token set Retransmission unit according to the token quantity in described token application message and described master control token set, for phase Answer retransmission unit to distribute token, specifically include:
The described retransmission unit being provided with master control token set judges whether described corresponding retransmission unit is preferential The retransmission unit that level is minimum;
If the determination result is YES, described in be provided with master control token set retransmission unit start timer, when When described timer periods arrives, distribute token for described corresponding retransmission unit;
If judged result is no, described in be provided with the retransmission unit of master control token set be described corresponding forwarding Unit distribution token.
5. the method for claim 1, it is characterised in that
When the token quantity of the local token set disappearance of the retransmission unit sending described token application message is little In or during equal to self token application thresholding, the token quantity of described token application message application is described The token quantity of disappearance;
When the token quantity of the local token set disappearance of the retransmission unit sending described token application message is big When self token application thresholding described, the token quantity of described token application message application be described from The token application thresholding of body.
6. the method for claim 1, it is characterised in that described in be provided with master control token set Being provided with token on retransmission unit and increase cycle and token increase thresholding, described method also includes:
When described token increase the cycle arrive time, described in be provided with master control token set retransmission unit judge In described master control token set, whether the token quantity of disappearance increases thresholding more than described token;
If the determination result is YES, the retransmission unit of master control token set it is provided with described at described master control token The token quantity increased in set is that described token increases thresholding;
Otherwise, the retransmission unit being provided with master control token set described in increases in described master control token set The token quantity that token quantity is described disappearance.
7. a retransmission unit, is applied to include in the equipment of at least one retransmission unit, it is characterised in that The local token set for controlling this retransmission unit flow rate, institute it is provided with on each retransmission unit Stating and be additionally provided with master control token set in equipment retransmission unit, described retransmission unit includes:
Sending module, for sending token application message to the retransmission unit being provided with master control token set;
Receiver module, after sending token application message at described sending module, is provided with described in reception The token grant message that the retransmission unit of master control token set returns according to described token application message, to increase Add the token in the local token set self arranged;
Wherein, described receiver module, in the case of described retransmission unit is provided with master control token set, It is additionally operable to receive the token application message that described sending module sends;
Judge module, enables in the case of being provided with master control token set, be used on described retransmission unit After described receiver module receives token application message, it is judged that the token number in described master control token set Whether amount is zero;
Token distribution module, enables in the case of being provided with master control token set on described retransmission unit, When token quantity in judging described master control token set when described judge module is not zero, according to institute State the token quantity in the token application message and described master control token set that receiver module receives, for phase Answer retransmission unit to distribute token, and reduce the token of respective numbers in described master control token set;
Described sending module, in the case of being provided with master control token set, also uses on described retransmission unit After being described corresponding retransmission unit distribution token in described token distribution module, by token grant message The token of distribution is sent to described corresponding retransmission unit, to increase the local order arranged in this retransmission unit Token quantity in board set;
Wherein, described in be provided with master control token set retransmission unit receive token application message, specifically wrap Include:
The described retransmission unit being provided with master control token set receives the local token when this retransmission unit self When set is discontented, this retransmission unit is according to the token application message of own token generation requisition cycle;And/or
The described retransmission unit being provided with master control token set receives the local token collection when other retransmission units When closing discontented, other retransmission units described are according to the token application message of own token transmission requisition cycle.
8. retransmission unit as claimed in claim 7, it is characterised in that
Described judge module, specifically for judging whether the token quantity in described master control token set is more than Or equal to described token application message apllied token quantity;
Described token distribution module, in judging described master control token set when described judge module Token quantity more than or equal to described token application message apllied token quantity time, for described accordingly Retransmission unit distributes the token number that described token application message is asked;When described judge module judges described When token quantity in master control token set is less than described token application message apllied token quantity, will All tokens in described master control token set distribute to described corresponding retransmission unit.
9. retransmission unit as claimed in claim 7, it is characterised in that described token distribution module, tool Body, for when the token quantity in described master control token set is zero, distributes for described corresponding retransmission unit Token quantity be zero.
10. retransmission unit as claimed in claim 7, it is characterised in that also include:
Logging modle, enables in the case of being provided with master control token set, be used on described retransmission unit It is recorded as the token quantity that at least one retransmission unit described distributed, and according to the described token distributed Quantity is the priority that described at least two retransmission unit arranges from low to high from more to less;
Described judge module, specifically for the priority according to described logging modle record, it is judged that described phase Answer whether retransmission unit is the retransmission unit that priority is minimum;
Timing module, enables in the case of being provided with master control token set, be used on described retransmission unit If the judged result of described judge module is yes, start timer;
Described token distribution module, is used for when the described timer periods in described timing module arrives, Token is distributed for described corresponding retransmission unit;And if the judged result of described judge module is no, for institute State corresponding retransmission unit distribution token.
11. retransmission units as claimed in claim 7, it is characterised in that described in be provided with master control token Being provided with token on the retransmission unit of set and increase cycle and token increase thresholding, described retransmission unit also wraps Include:
Described judge module, specifically for when described token increases cycle arrival, it is judged that described master control makes In board set, whether the token quantity of disappearance increases thresholding more than described token;
Token increases module, enables in the case of being provided with master control token set on described retransmission unit, If for the judged result of described judge module for being time, the token increased in described master control token set Quantity is that described token increases thresholding;Otherwise, the token quantity increased 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 CN103188160A (en) 2013-07-03
CN103188160B true 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)

Families Citing this family (7)

* 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
CN105703928A (en) * 2014-11-25 2016-06-22 中兴通讯股份有限公司 Traffic adjustment method and traffic adjustment device
CN105991463B (en) * 2015-02-13 2020-12-25 创新先进技术有限公司 Method, message main node, token server and system for realizing flow control
CN107040478A (en) * 2015-07-29 2017-08-11 深圳市中兴微电子技术有限公司 Token application processing method and device
CN108667744B (en) * 2018-02-26 2020-09-25 华为技术有限公司 Flow control method and device
CN110198275B (en) * 2018-03-28 2022-03-29 腾讯科技(深圳)有限公司 Flow control method, system, server and storage medium
CN108848038B (en) * 2018-08-30 2021-01-29 华为技术有限公司 Token bucket-based traffic management method and token bucket node

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

Also Published As

Publication number Publication date
CN103188160A (en) 2013-07-03

Similar Documents

Publication Publication Date Title
CN103188160B (en) A kind of flow control methods and retransmission unit
CN102035660B (en) Internet data center (IDC) network-based service processing method, equipment and system
CN103501297B (en) A kind of gate verification method and apparatus
CN108009028A (en) Message treatment method, device, equipment and computer-readable recording medium
CN108810903A (en) A kind of configuration of data transmission and data transmission method and device
US20020038330A1 (en) Method for economically sub-optimizing interactions in data communications network environments, and a device according to the method
CN105743947B (en) Resource sharing method and device
CN102143088B (en) Method and equipment for forwarding data based on security socket layer (SSL) virtual private network (VPN)
CN103220650A (en) Method and device for WiFi terminal to visit different service domains
CN104125170A (en) Router based user accessed bandwidth adjusting method, device and system
CN103873513B (en) Adaptive method for down loading and system
CN103795750B (en) A kind of file transmitting method and its system
CN104125006A (en) Satellite communication network bandwidth distributing method
CN107135241A (en) A kind of method and device for business processing
CN107818013A (en) A kind of application scheduling method thereof and device
CN107659464A (en) A kind of router realizes the method and system of traffic monitoring
CN103874133B (en) A kind of method, device and the access point apparatus of bandwidth control
CN105357239B (en) Method and device for providing service and method and device for obtaining service
CN107846341A (en) Method, relevant apparatus and the system of schedules message
CN104348753B (en) Data packet forwarding method and packet transfer device, packet
CN106685671A (en) Directional traffic card realization method and device and traffic service platform
CN109525544A (en) A kind of operation system access method and system based on cipher machine cluster
CN103873585B (en) A kind of Radius authentication devices and method
CN106161340A (en) Service shunting method and system
CN109286580A (en) A kind of passive optic network up bandwidth distribution method and device

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