Summary of the invention
The application provides a kind of flow control methods and device, more intense to solve existing flow control methods specific aim, the problem that durability is lower.
In order to address the above problem, the application discloses a kind of flow control methods, comprising:
Receive flow control request, wherein, described flow control request comprises first-class control main body;
Obtain described first-class control main body Pei Ge information, wherein, described Pei Ge information comprises the requesting threshold of described first-class control main body;
For all kinds of business demands, by card i/f, call business plug-in unit corresponding to described first-class control main body, whether such meets business demand to detect described first-class control main body, and wherein, described business plug-in unit is used for preserving business demand strategy;
Meeting under the prerequisite of all kinds of business demands, when the current accessed amount of described first-class control main body is less than described requesting threshold, current accessed amount is being added and returns in the lump successfully sign;
When not meeting business demand, or, when the current accessed amount of described first-class control main body is more than or equal to described requesting threshold, return to unsuccessfully sign.
Preferably, in described flow control request, also comprise Flow Control strategy,
Described current accessed amount also comprises after being more than or equal to described requesting threshold:
Flow Control strategy in flow control request is judged;
When Flow Control strategy is refusal, return to unsuccessfully sign;
When Flow Control strategy is when switching, what be switched to the second Flow Control main body and obtain described the second Flow Control main body joins Ge information.
Preferably, in described Pei Ge information, also comprise the classification of first-class control main body, in described flow control request, also comprise switching threshold;
The described step that is switched to the second Flow Control main body comprises:
Joining in Ge information of query caching, under the classification of described first-class control main body, whether there is the second Flow Control main body;
If there is not described the second Flow Control main body, handoff failure, returns to unsuccessfully sign;
If there is described the second Flow Control main body, detect switching times and whether be less than switching threshold;
If switching times is not less than switching threshold, handoff failure, returns to unsuccessfully sign;
If switching times is less than switching threshold, chooses at random the second Flow Control main body under the classification of a described first-class control main body and carry out and switch.
Preferably, described meeting under the prerequisite of all kinds of business demands, when current accessed amount is less than described requesting threshold, current accessed amount is added and returns in the lump successfully sign, comprising:
Meeting under the prerequisite of all kinds of business demands, when requesting threshold is greater than 0, from buffer memory, obtain current accessed amount;
Detect current accessed amount and whether be less than described requesting threshold;
When current accessed amount is less than described requesting threshold, current accessed amount is added to one, and be updated in buffer memory;
Return to successfully sign.
Preferably, also comprise flow method for releasing:
Receive flow releasing request, wherein, described flow releasing request comprises first-class control main body;
Obtain described first-class control main body Pei Ge information, wherein, described Pei Ge information comprises requesting threshold;
When described requesting threshold is greater than 0, from buffer memory, obtain current accessed amount;
When described current accessed amount is greater than 0, current accessed amount is subtracted in the lump and is updated in buffer memory.
Preferably, also comprise the time-out time of described first-class control main body in described Pei Ge information, described method also comprises:
While not receiving flow releasing request in time-out time, empty described current accessed amount.
Accordingly, disclosed herein as well is a kind of volume control device, comprising:
Receiver module, for receiving flow control request, wherein, described flow control request comprises first-class control main body;
Acquisition module, for obtaining described first-class control main body Pei Ge information, wherein, described Pei Ge information comprises the requesting threshold of described first-class control main body;
Call and detection module, for for all kinds of business demands, by card i/f, call business plug-in unit corresponding to described first-class control main body, detect described first-class control main body and whether meet such business demand, wherein, described business plug-in unit is used for preserving business demand strategy;
First returns to module, for meeting under the prerequisite of all kinds of business demands, when the current accessed amount of described first-class control main body is less than described requesting threshold, current accessed amount is added and returns in the lump successfully sign;
Second returns to module, for ought not meeting business demand, or, when the current accessed amount of described first-class control main body is more than or equal to described requesting threshold, return to unsuccessfully sign.
Preferably, in described flow control request, also comprise Flow Control strategy, described device also comprises:
Strategy judge module, judges for the Flow Control strategy to flow control request;
Handover module, for when Flow Control strategy is when switching, what be switched to the second Flow Control main body and obtain described the second Flow Control main body joins Ge information;
Described second returns to module, also for when Flow Control strategy is refusal, returns to unsuccessfully sign.
Preferably, in described Pei Ge information, also comprise the classification of first-class control main body, in described flow control request, also comprise switching threshold;
Described handover module comprises:
Inquiry submodule, for query caching join Ge information, under the classification of described first-class control main body, whether there is the second Flow Control main body;
Described second returns to module, if also for not there is not described the second Flow Control main body, handoff failure, returns to unsuccessfully sign;
Threshold decision submodule, if for there being described the second Flow Control main body, detect switching times and whether be less than switching threshold;
Described second returns to module, if be also not less than switching threshold for switching times, handoff failure, returns to unsuccessfully sign;
Main body switching submodule, if be less than switching threshold for switching times, choose at random the second Flow Control main body under the classification of a described first-class control main body and carries out and switch.
Preferably, described first returns to module, comprising:
Obtain visit capacity submodule, for meeting under the prerequisite of all kinds of business demands, when requesting threshold is greater than 0, from buffer memory, obtain current accessed amount;
Whether threshold test submodule, be less than described requesting threshold for detection of current accessed amount;
Increase visit capacity submodule, for when current accessed amount is less than described requesting threshold, current accessed amount is added to one, and be updated in buffer memory;
Return to submodule, for returning to successfully sign.
Preferably, also comprise flow release module, comprising:
Receive submodule, for receiving flow releasing request, wherein, described flow releasing request comprises first-class control main body;
Obtain Pei Ge information submodule, for obtaining described first-class control main body Pei Ge information, wherein, described Pei Ge information comprises requesting threshold;
Obtain visit capacity submodule, for when described requesting threshold is greater than 0, from buffer memory, obtain current accessed amount;
Reduce visit capacity submodule, for when described current accessed amount is greater than 0, current accessed amount is subtracted in the lump and is updated in buffer memory.
Preferably, also comprise the time-out time of described first-class control main body in described Pei Ge information, described device also comprises:
Empty visit capacity module, when not receiving flow releasing request in time-out time, empty described current accessed amount.
Compared with prior art, the application comprises following advantage:
First, in flow control methods, different business demand corresponding to business, and meeting under the prerequisite of business demand, control method for visit capacity is basically identical, therefore the flow control methods described in the application, independent by unique business demand, and consistent visit capacity control method is integrated.Therefore after receiving flow control request, first obtain first-class control main body Pei Ge information, then for all kinds of business demands, by card i/f, call business plug-in unit corresponding to described first-class control main body, by described business plug-in unit, judge whether described first-class control main body meets such business demand, and then the judgement of the amount of conducting interviews.Therefore, the application can, for different first-class control main bodys, call corresponding with it all kinds of Flow Control plug-in unit judgement business demands, and adopt consistent visit capacity control method, thereby make the flow control methods described in the application be applicable to various business, durability is very high.
Secondly, the application, when the current accessed amount of first-class control main body is more than or equal to described requesting threshold, follow-uply can carry out Flow Control strategy.According to the classification of first-class control main body, search the second Flow Control main body under described classification, be then switched to the second Flow Control main body, and obtain described the second Flow Control main body join Ge information, re-start flow control.The application's flow control methods is more flexible, and Flow Control strategy is various.
Again, the application will join Ge information and current accessed amount is kept in buffer memory, can reduce the call operation to database, thereby reduces the burden in flow control, database being caused.
Again, also there is flow dispose procedure in the application, and, when not receiving flow releasing request in time-out time, can automatically empty described current accessed amount, avoid occurring because flow slowly can not get discharging, and cause the waste of resource.
Embodiment
For the application's above-mentioned purpose, feature and advantage can be become apparent more, below in conjunction with the drawings and specific embodiments, the application is described in further detail.
Prior art has been solidificated in business demand in flow control methods, thereby the specific aim of method is more intense, causes each business demand, all needs the flow control methods of a kind of uniqueness that Pei Ge is corresponding with it, and flow control methods durability is lower.
The application provides a kind of flow control methods, and business demand is independent, can call different Flow Control plug-in units for different first-class control main bodys, thereby make the flow control methods described in the application be applicable to various business, and durability is very high.
With reference to Fig. 1, provided a kind of flow control methods flow chart described in the embodiment of the present application.
Step 11, receives flow control request, and wherein, described flow control request comprises first-class control main body;
When access services device, need to control flow, therefore can transmitted traffic control request.Correspondence can receive flow control request, and wherein, described flow control request comprises first-class control main body.
Flow Control main body refers to the main body of carrying out flow control, with concrete traffic aided.For example, in banking, described Flow Control main body can be the POS machine paying; In social network-i i-platform, described Flow Control main body can be the user of this platform, or logins the IP address of this platform.
Wherein, described POS(Point Of Sale) machine is point-of-sale terminal, it is a kind of multi-functional terminal end, it is arranged on to the franchised business of credit card and accepts in site and be unified into network with computer, just can realize electronic funds automatic account transfer, it has the functions such as the consumption of support, pre-authorization, inquiry into balance and account transfer, uses safety, quick, reliable.The machine of POS described in the application can be virtual POS machine.
Wherein, there is not the body of physics POS machine in described virtual POS machine, but comprise the various data that POS machine possesses itself, as POS terminal number, and trade company number, key etc.When third party pays Yu bank of company docking and realizes POS and receive single business, bank is considered as Yi Ge trade company by third party's payment company conventionally, distribute a lot of terminal datas (being virtual POS machine) to this trade company, third party pays company and just can carry out with the virtual POS machine that bank distributes the single operation of POS receipts like this.
IP is Internet Protocol, and Internet protocol is computer network and interconnects the agreement that communicates and design.
Step 12, obtains described first-class control main body Pei Ge information, and wherein, described Pei Ge information comprises the requesting threshold of described first-class control main body;
Above-mentionedly in flow control request, get after first-class control main body, that can obtain described first-class control main body joins Ge information, in actual treatment, described in can obtaining, joins Ge information from buffer memory, can from database, obtain described Pei Ge information, the application does not limit this yet.
Wherein, described Pei Ge information comprises the requesting threshold of described first-class control main body, certainly, can also comprise the data such as classification of first-class control main body in described Pei Ge information, and the application does not limit this.
Step 13, for all kinds of business demands, calls business plug-in unit corresponding to described first-class control main body by card i/f, judges whether described first-class control main body meets such business demand, and wherein, described business plug-in unit is used for preserving business demand strategy;
Because different business exists different business demands, prior art has been solidificated in business demand in flow control methods, but in actual treatment, judgement for visit capacity is comparison general character, and be comparison individual character for the judgement of business demand, this has just caused existing flow control methods specific aim more intense, and durability is lower.
Therefore the application is when carrying out flow control, independent by the business demand that compares individual character, and the judgement of comparing the visit capacity of general character is integrated.In specific implementation, can pass through She Ge card i/f, for all kinds of business demands, by described card i/f and concrete traffic aided connection, wherein, described business plug-in unit is used for preserving business demand strategy, and for example, whether POS machine is not frozen.Business demand She Ge is judged in plug-in unit, therefore, when needing business to participate in flow control, call corresponding business plug-in unit and carry out business demand judgement.
Therefore, can call business plug-in unit corresponding to described first-class control main body by card i/f, judge whether described first-class control main body meets business demand.For example, described first-class control main body is POS-A1, and business plug-in unit corresponding to described first-class control main body is financial business plug-in unit, can call described financial business plug-in unit by described card i/f, judge whether POS-A1 meets business demand, whether not frozen etc. such as POS-A1.
If so, meet all kinds of business demands, performstep 14; If not, do not meet certain class business demand, performstep 16.
Step 14, judges whether the current accessed amount of described first-class control main body is less than described requesting threshold;
If meet all kinds of business demands, can further compare the determining step of the visit capacity of general character, can detect first-class control main body and whether reach requesting threshold, if described first-class control main body has reached requesting threshold, described first-class control main body can not conduct interviews; If described first-class control main body does not reach requesting threshold, described first-class control main body can conduct interviews.In concrete enforcement, can judge whether the current accessed amount of described first-class control main body is less than described requesting threshold.
If so, performstep 15; If not, performstep 16.
For example, POS-A1 is not frozen, and the requesting threshold of POS-A1 is 5.If the current accessed amount of POS-A1 is 3<5, follow-upexecution step 15, if the current accessed amount of POS-A1 is 5=5, follow-upexecution step 16.
Step 15, adds current accessed amount to return in the lump successfully sign;
Meeting under the prerequisite of business demand, if described first-class control main body does not reach requesting threshold, when the current accessed amount of described first-class control main body is less than described requesting threshold, described first-class control main body can conduct interviews, and therefore current accessed amount can be added and return in the lump successfully sign.
In upper example, the current accessed amount of POS-A1 is 3, the current accessed amount of POS-A1 can be added to one, and current accessed amount is 3+1=4, then returns to successfully sign, and POS-A1 can continue follow-up access, carries out corresponding business etc.
Step 16, returns to unsuccessfully sign.
When not meeting business demand, described first-class control main body can not conduct interviews, and returns to unsuccessfully sign.Or described first-class control main body has reached requesting threshold,, when the current accessed amount of described first-class control main body is more than or equal to described requesting threshold, described first-class control main body can not conduct interviews, and returns to unsuccessfully sign.
As above in example, POS-A1 is not frozen, and the current accessed amount of POS-A1 is 5, now will return to unsuccessfully sign, and POS-A1 can not continue candidate's access.And for example, POS-A1 is frozen, now will return to equally unsuccessfully sign, and POS-A1 can not continue candidate's access.
In sum, in flow control methods, different business demand corresponding to business, and meeting under the prerequisite of business demand, control method for visit capacity is basically identical, therefore the flow control methods described in the application, independent by unique business demand, and consistent visit capacity control method is integrated.Therefore after receiving flow control request, first obtain first-class control main body Pei Ge information, then for all kinds of business demands, by card i/f, call business plug-in unit corresponding to described first-class control main body, by described business plug-in unit, judge whether described first-class control main body meets such business demand, and then the judgement of the amount of conducting interviews.Therefore, the application can, for different first-class control main bodys, call corresponding with it all kinds of Flow Control plug-in unit judgement business demands, and adopt consistent visit capacity control method, thereby make the flow control methods described in the application be applicable to various business, durability is very high.
Preferably, in described flow control request, also comprise Flow Control strategy,
Described current accessed amount also comprises after being more than or equal to described requesting threshold:
Flow Control strategy in flow control request is judged; When Flow Control strategy is refusal, return to unsuccessfully sign; When Flow Control strategy is when switching, what be switched to the second Flow Control main body and obtain described the second Flow Control main body joins Ge information.
As above in example, POS-A1 is not frozen, and the current accessed amount of POS-A1 is 5, can also detect the Flow Control strategy in flow control request, if Flow Control strategy is refusal, now will return to unsuccessfully sign, and POS-A1 can not continue candidate's access.If Flow Control strategy, for switching, is switched to the second Flow Control main body as POS-A2, and obtain described the second Flow Control main body join Ge information.Then can re-execute above-mentionedsteps 13, described the second Flow Control main body is carried out to flow control.
Preferably, in described Pei Ge information, also comprise the classification of first-class control main body, in described flow control request, also comprise switching threshold.
Described in the application, join the classification that also comprises first-class control main body in Ge information, under described classification, comprise a plurality of Flow Control main bodys, as first-class control main body, the second Flow Control main body etc.If the classification of POS-A1 is user A, user A also has POS-A2 and POS-A3.
With reference to Fig. 2, provided described in the application's preferred embodiment main body switching flow figure in a kind of flow switch method.
The described step that is switched to the second Flow Control main body comprises:
Step 201, whether joining in Ge information of query caching, there is the second Flow Control main body under the classification of described first-class control main body;
If Flow Control strategy is carried out in above-mentioned judgement, follow-uply join Ge information in can query caching, then search under the classification of described first-class control main body whether have the second Flow Control main body.
If so, there is described the second Flow Control main body, performstep 202; If not, there is not described the second Flow Control main body, performstep 204.
For example, the classification of POS-A1 is user A, and user A also has POS-A2 and POS-A3.
Step 202, detects switching times and whether is less than switching threshold;
Wherein, described switching times is for same flow control request, from receiving a certain flow control request, till return to successfully sign or end mark for this flow control request, during the number of times of the Flow Control main body switched of described flow control request.As above in example, user A comprises that 3 Flow Control main bodys are respectively POS-A1, POS-A2 and POS-A3, if initial first-class control main body is POS-A1, when being switched to POS-A2 by POS-A1, switching times is 1, when being switched to POS-A3 by POS-A2 again, switching times is 2, by that analogy, every switching 1 time, switching times+1.
Therefore, be if so, that switching times is less than switching threshold, performstep 203; If not, switching times is not less than switching threshold, performsstep 204.
Whether the switching times that detects described classification is less than switching threshold, and for example, switching threshold is 10, if the switching times of user A be 3<10, performstep 203; If the switching times of user A is 10=10, performstep 204.
Step 203, chooses at random the second Flow Control main body under the classification of a described first-class control main body and carries out and switch;
If switching times is less than switching threshold, can chooses at random the second Flow Control main body under the classification of a described first-class control main body and carry out and switch.
For example, the switching times of user A is 3< switching threshold 10, can from POS-A2 and POS-A3, as the second Flow Control main body, then carry out and switch by an optional POS machine, use described second control volume to carry out business, and described second control volume is carried out to flow control.
Step 204, handoff failure, returns to unsuccessfully sign;
If there is not described the second Flow Control main body, or, there is described the second Flow Control main body but switching times is not less than switching threshold, handoff failure, returns to unsuccessfully sign.
In sum, the application, when the current accessed amount of first-class control main body is more than or equal to described requesting threshold, follow-uply can carry out Flow Control strategy.According to the classification of first-class control main body, search the second Flow Control main body under described classification, be then switched to the second Flow Control main body, and obtain described the second Flow Control main body join Ge information, re-start flow control.The application's flow control methods is more flexible, and Flow Control strategy is various.
With reference to Fig. 3, provided described in the application's preferred embodiment the determination methods flow chart of visit capacity in a kind of flow control methods.
Described meeting under the prerequisite of all kinds of business demands, when current accessed amount is less than described requesting threshold, current accessed amount is added and returns in the lump successfully sign, comprising:
Whetherstep 301, is meeting under the prerequisite of all kinds of business demands, detect current accessed amount and exist;
Meeting under the prerequisite of business demand, detecting current accessed amount and whether exist, in query caching, whether having current accessed amount, if there is not described current accessed amount, performingstep 302; If there is described current accessed amount, performstep 303.
Step 302 is 0 by current accessed Liang She Ge;
If there is not described current accessed amount, for the first time described first-class control main body is carried out to flow control, so can be 0 by current accessed Liang She Ge, then follow-upexecution step 305.
Step 303 is obtained current accessed amount from buffer memory;
When there being described current accessed amount, can from buffer memory, obtain current accessed amount.
Step 304, detects current accessed amount and whether is less than described requesting threshold;
If so, be that current accessed amount is less than described requesting threshold, performstep 305; If not, performstep 307.
Step 305, adds one by current accessed amount, and is updated in buffer memory;
When current accessed amount is less than described requesting threshold, or, after current accessed Liang She Ge is 0, current accessed amount can be added to one, and be updated in buffer memory;
Step 306, returns to successfully sign;
Step 307, returns to unsuccessfully sign.
In sum, the application will join Ge information and current accessed amount is kept in buffer memory, can reduce the call operation to database, thereby reduces the burden in flow control, database being caused.
With reference to Fig. 4, provided described in the application's preferred embodiment flow in a kind of flow control methods and discharged flow chart.
Preferably, also comprise flow method for releasing:
Step 401, receives flow releasing request, and wherein, described flow releasing request comprises first-class control main body;
In the application, also comprise flow method for releasing, when described first-class control main body executes after business, can transmitted traffic releasing request, after receiving flow releasing request, can carry out flow release, now described flow releasing request comprises first-class control main body.
In actual treatment, after Flow Control is processed successfully, the controlled Flow Control main body of correspondence can be returned, therefore, after business execution finishes, just can know which Flow Control main body to carry out flow to has discharged.
Therefore, Flow Control main body in described flow releasing request is not limited to described first-class control main body, for example, if above-mentioned, carry out in flow control, be switched to the second Flow Control main body, in described the second Flow Control main body, execute after business, equally can transmitted traffic releasing request, discharge the current accessed amount of described the second Flow Control main body.
Step 402, obtains described first-class control main body Pei Ge information, and wherein, described Pei Ge information comprises requesting threshold;
Step 403, whether test access amount threshold value is greater than 0;
If so, be that requesting threshold is greater than 0, performstep 404, if not, requesting threshold is not more than 0, and mistake appears in the request of illustrating, can carry out the operation of end.
Step 404 is obtained current accessed amount from buffer memory;
When described requesting threshold is greater than 0, from buffer memory, obtain current accessed amount;
Step 405, detects current accessed amount and whether is greater than 0;
If so, be that current accessed amount is greater than 0, performstep 406, if not, current accessed amount is not more than 0, and mistake appears in the request of illustrating, can carry out the operation of end.
Step 406, subtracts current accessed amount in the lump and is updated in buffer memory.
When described current accessed amount is greater than 0, current accessed amount is subtracted in the lump and is updated in buffer memory.
Preferably, also comprise the time-out time of described first-class control main body in described Pei Ge information, described method also comprises:
While not receiving flow releasing request in time-out time, empty described current accessed amount.
The application Hai She Ge in Pei Ge information Hai She Ge the time-out time of described first-class control main body, therefore, if do not receive the flow releasing request for described first-class control main body in time-out time, just can empty described current accessed amount, avoid occurring because current accessed amount can not get discharging all the time, and the obstructing problem occurring.
In sum, also there is flow dispose procedure in the application, and, when not receiving flow releasing request in time-out time, can automatically empty described current accessed amount, avoid occurring because flow slowly can not get discharging, and cause the waste of resource.
With reference to Fig. 5, provided a kind of flow control methods overview flow chart described in the application's preferred embodiment.
In actual treatment, can pass through the described flow control methods of the common execution of Service Component, Flow Control assembly and buffer memory assembly.
Wherein, mainly carrying out in Flow Control assembly in flow control methods, when needs carry out business demand judgement, can call the business plug-in unit in Service Component by card i/f, according to the judgement that returns results of plug-in unit, is to carry out follow-up operation.Wherein, because business demand may have multiclass, therefore in order to meet the demand of all kinds of business, business plug-in unit also may have a plurality of, and concrete quantity can be depending on business demand, and the application does not limit this.
The result of flow control, as successfully sign or unsuccessfully sign, can send in the Flow Control result to Service Component, and then Service Component can carry out follow-up business judgement.And, also controlled Flow Control main body can be returned to result, in follow-up Flow Control main body of carrying out can knowing when Flow Control discharges release.
In flow control, current accessed amount can be stored in the cache information of buffer memory assembly, therefore, when needs inquiry or renewal current accessed amount, can call the cache information of buffer memory assembly.
Meanwhile, buffer memory assembly also can be controlled cache information according to the Flow Control time-out time in Pei Ge information, when a certain Flow Control main body surpasses Flow Control time-out time, can remove the current accessed amount of the main body of Flow Control described in buffer memory.
With reference to Fig. 6, provided a kind of volume control device structure chart described in the embodiment of the present application.
Accordingly, the application also provides a kind of volume control device, and comprisereceiver module 11,acquisition module 12, call anddetection module 13, first returns tomodule 14 and second and returns tomodule 15, wherein:
Receiver module 11, for receiving flow control request, wherein, described flow control request comprises first-class control main body;
Acquisition module 12, for obtaining described first-class control main body Pei Ge information, wherein, described Pei Ge information comprises the requesting threshold of described first-class control main body;
Call anddetection module 13, for for all kinds of business demands, by card i/f, call business plug-in unit corresponding to described first-class control main body, detect described first-class control main body and whether meet such business demand, wherein, described business plug-in unit is used for preserving business demand strategy;
First returns tomodule 14, for meeting under the prerequisite of all kinds of business demands, when the current accessed amount of described first-class control main body is less than described requesting threshold, current accessed amount is added and returns in the lump successfully sign;
Second returns tomodule 15, for ought not meeting business demand, or, when the current accessed amount of described first-class control main body is more than or equal to described requesting threshold, return to unsuccessfully sign.
Preferably, in described flow control request, also comprise Flow Control strategy, described device also comprises:
Strategy judge module, judges for the Flow Control strategy to flow control request;
Handover module, for when Flow Control strategy is when switching, what be switched to the second Flow Control main body and obtain described the second Flow Control main body joins Ge information;
Described second returns to module, also for when Flow Control strategy is refusal, returns to unsuccessfully sign.
Preferably, in described Pei Ge information, also comprise the classification of first-class control main body, in described flow control request, also comprise switching threshold;
Described handover module comprises:
Inquiry submodule, for query caching join Ge information, under the classification of described first-class control main body, whether there is the second Flow Control main body;
Described second returns to module, if also for not there is not described the second Flow Control main body, handoff failure, returns to unsuccessfully sign;
Threshold decision submodule, if for there being described the second Flow Control main body, detect switching times and whether be less than switching threshold;
Described second returns to module, if be also not less than switching threshold for switching times, handoff failure, returns to unsuccessfully sign;
Main body switching submodule, if be less than switching threshold for switching times, choose at random the second Flow Control main body under the classification of a described first-class control main body and carries out and switch.
Preferably, described first returns to module, comprising:
Obtain visit capacity submodule, for meeting under the prerequisite of all kinds of business demands, when requesting threshold is greater than 0, from buffer memory, obtain current accessed amount;
Whether threshold test submodule, be less than described requesting threshold for detection of current accessed amount;
Increase visit capacity submodule, for when current accessed amount is less than described requesting threshold, current accessed amount is added to one, and be updated in buffer memory;
Return to submodule, for returning to successfully sign.
Preferably, described device also comprises flow release module, comprising:
Receive submodule, for receiving flow releasing request, wherein, described flow releasing request comprises first-class control main body;
Obtain Pei Ge information submodule, for obtaining described first-class control main body Pei Ge information, wherein, described Pei Ge information comprises requesting threshold;
Obtain visit capacity submodule, for when described requesting threshold is greater than 0, from buffer memory, obtain current accessed amount;
Reduce visit capacity submodule, for when described current accessed amount is greater than 0, current accessed amount is subtracted in the lump and is updated in buffer memory.
Preferably, also comprise the time-out time of described first-class control main body in described Pei Ge information, described device also comprises:
Empty visit capacity module, when not receiving flow releasing request in time-out time, empty described current accessed amount.
For device embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, relevant part is referring to the part explanation of embodiment of the method.
Each embodiment in this specification all adopts the mode of going forward one by one to describe, and each embodiment stresses is the difference with other embodiment, between each embodiment identical similar part mutually referring to.
Those skilled in the art should understand, the application's embodiment can be provided as method, system or computer program.Therefore, the application can adopt complete hardware implementation example, implement software example or in conjunction with the form of the embodiment of software and hardware aspect completely.And the application can adopt the form that wherein includes the upper computer program of implementing of computer-usable storage medium (including but not limited to magnetic disc store, CD-ROM, optical memory etc.) of computer usable program code one or more.
Although described the application's preferred embodiment, once those skilled in the art obtain the basic creative concept of cicada, can make other change and modification to these embodiment.So claims are intended to all changes and the modification that are interpreted as comprising preferred embodiment and fall into the application's scope.
The application is with reference to describing according to flow chart and/or the block diagram of the method for the embodiment of the present application, equipment (system) and computer program.Should understand can be in computer program instructions realization flow figure and/or block diagram each flow process and/or the flow process in square frame and flow chart and/or block diagram and/or the combination of square frame.Can provide these computer program instructions to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce a machine, the instruction of carrying out by the processor of computer or other programmable data processing device is produced for realizing the device in the function of flow process of flow chart or a plurality of flow process and/or square frame of block diagram or a plurality of square frame appointments.
These computer program instructions also can be stored in energy vectoring computer or the computer-readable memory of other programmable data processing device with ad hoc fashion work, the instruction that makes to be stored in this computer-readable memory produces the manufacture that comprises command device, and this command device is realized the function of appointment in flow process of flow chart or a plurality of flow process and/or square frame of block diagram or a plurality of square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make to carry out sequence of operations step to produce computer implemented processing on computer or other programmable devices, thereby the instruction of carrying out is provided for realizing the step of the function of appointment in flow process of flow chart or a plurality of flow process and/or square frame of block diagram or a plurality of square frame on computer or other programmable devices.
Finally, also it should be noted that, in this article, relational terms such as the first and second grades is only used for an entity or operation to separate with another entity or operating space, and not necessarily requires or imply and between these entities or operation, have the relation of any this reality or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thereby the process, method, commodity or the equipment that make to comprise a series of key elements not only comprise those key elements, but also comprise other key elements of clearly not listing, or be also included as the intrinsic key element of this process, method, commodity or equipment.The in the situation that of more restrictions not, the key element being limited by statement " comprising ... ", and be not precluded within process, method, commodity or the equipment that comprises described key element and also have other identical element.
A kind of flow control methods and the device that above the application are provided, be described in detail, applied specific case herein the application's principle and execution mode are set forth, the explanation of above embodiment is just for helping to understand the application's method and core concept thereof; Meanwhile, for one of ordinary skill in the art, the thought according to the application, all will change in specific embodiments and applications, and in sum, this description should not be construed as the restriction to the application.