CN102868770A - Method, equipment and system for distributing interface - Google Patents

Method, equipment and system for distributing interface Download PDF

Info

Publication number
CN102868770A
CN102868770A CN 201110187476 CN201110187476A CN102868770A CN 102868770 A CN102868770 A CN 102868770A CN 201110187476 CN201110187476 CN 201110187476 CN 201110187476 A CN201110187476 A CN 201110187476A CN 102868770 A CN102868770 A CN 102868770A
Authority
CN
China
Prior art keywords
service
type
middle tier
frequency
tier server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 201110187476
Other languages
Chinese (zh)
Other versions
CN102868770B (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.)
Tencent Technology Beijing Co Ltd
Original Assignee
Tencent Technology Beijing 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 Tencent Technology Beijing Co Ltd filed Critical Tencent Technology Beijing Co Ltd
Priority to CN201110187476.7A priority Critical patent/CN102868770B/en
Publication of CN102868770A publication Critical patent/CN102868770A/en
Application granted granted Critical
Publication of CN102868770B publication Critical patent/CN102868770B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a method, equipment and a system for distributing an interface, belonging to the field of communication. The method comprises the steps of: receiving a call request transmitted by a middle layer service, wherein the call request at least carries an interface mark and a service type; acquiring a call frequency and a frequency threshold corresponding to the service type, according to the call frequency and the frequency threshold corresponding to the service type, determining whether the middle layer server has an authority to call the interface, and if so, distributing a corresponding interface to the middle layer server according to the interface mark. The equipment comprises a receiving module, a determination module and a distribution module. The system comprises the middle layer server and an access layer server. According to the method, the equipment and the system, the overload can be avoided.

Description

A kind of method of distribution interface, equipment and system
Technical field
The present invention relates to the communications field, particularly a kind of method of distribution interface, equipment and system.
Background technology
At present, the scene of many Internets background service comprises intermediate layer and Access Layer, and the intermediate layer is comprised of middle tier server, and Access Layer is comprised of the Access Layer server; When foreground client during to the backstage requested service, middle tier server sends call request to the Access Layer server, and request Access Layer server is its distribution interface.
At present, prior art provides a kind of method of distribution interface, be specially: the Access Layer server receives the call request that middle tier server sends, obtain this middle tier server corresponding call frequency, do not surpass frequency threshold corresponding to this middle tier server if call frequency, then distribute interface corresponding to this interface identifier to this middle tier server, otherwise return error message to this middle tier server; Behind the complete interface of Access Layer server-assignment, the packet of the business that middle tier server is asked to Access Layer server request foreground client by this interface, wherein, the technical staff arranges corresponding frequency threshold for this middle tier server in advance in the Access Layer server.
In realizing process of the present invention, the inventor finds that there is following problem at least in prior art:
As long as the frequency of calling of middle tier server does not surpass frequency threshold corresponding to this middle tier server, then the Access Layer server will distribution interface be given this middle tier server, so when a large amount of foreground client is arranged to different middle tier server requested service, can make middle tier server large to the professional quantitative change of Access Layer server request business, so that the load of Access Layer server becomes large, be easy to transship.
Summary of the invention
For fear of transshipping, the invention provides a kind of method, equipment and system of distribution interface.Described technical scheme is as follows:
A kind of method of distribution interface, described method comprises:
Receive the call request that middle tier server sends, described call request is carried interface identifier and type of service at least;
Obtain described type of service corresponding call frequency and frequency threshold, according to described type of service corresponding call frequency and frequency threshold determines whether described middle tier server has the authority calling interface;
If so, then distribute corresponding interface to described middle tier server according to described interface identifier.
Obtain described type of service correspondence and call frequency and frequency threshold, according to described type of service corresponding call frequency and frequency threshold determines that whether described middle tier server has the authority calling interface, comprising:
According to the corresponding relation of described type of service and the type of service of having stored, call number and timer, obtain described type of service corresponding call frequency;
According to the corresponding relation of described type of service and the type of service of having stored and frequency threshold, obtain frequency threshold corresponding to described type of service;
According to described type of service corresponding call frequency and frequency threshold, determine whether described middle tier server has the authority calling interface.
According to the corresponding relation of described type of service and the type of service of having stored, call number and timer, obtain described type of service corresponding call frequency, comprising:
According to described type of service, from the corresponding relation of the type of service of having stored, call number and timer, find out corresponding call number and timer;
Increase described call number of searching, according to the Time Calculation of the call number of described increase and described timer timing go out described type of service corresponding call frequency.
According to described type of service corresponding call frequency and frequency threshold, determine that whether described middle tier server has the authority calling interface, comprising:
Judge that whether the frequency of calling corresponding to described type of service surpass frequency threshold corresponding to described type of service, if do not surpass, then determining described middle tier server has the authority calling interface, if surpass, then determining described middle tier server does not have the authority calling interface.
Described method also comprises:
If there is the record of timer expired in the corresponding relation of described type of service, call number and timer, then empties the call number in the described record, and make timer overtime in the described record restart timing.
Described call request is also carried the sign of described middle tier server;
Correspondingly, according to described type of service corresponding call frequency and frequency threshold, determine that whether described middle tier server has the authority calling interface, comprising:
Judge that whether the frequency of calling corresponding to described type of service surpass frequency threshold corresponding to described type of service, if surpass, then determining described middle tier server does not have the authority calling interface;
If do not surpass, then according to the sign of described middle tier server obtain described middle tier server corresponding call frequency and frequency threshold, according to described middle tier server corresponding call frequency and frequency threshold determines whether described middle tier server has the authority calling interface.
A kind of equipment of distribution interface, described equipment comprises:
Receiver module is used for receiving the call request that middle tier server sends, and described call request is carried interface identifier and type of service at least;
Determination module, be used for obtaining described type of service corresponding call frequency and frequency threshold, according to described type of service corresponding call frequency and frequency threshold determines whether described middle tier server has the authority calling interface;
Distribution module is yes if be used for the definite result of described determination module, then distributes corresponding interface to described middle tier server according to described interface identifier.
Described determination module comprises:
The first acquiring unit is used for the corresponding relation according to described type of service and the type of service of having stored, call number and timer, obtain described type of service corresponding call frequency;
Second acquisition unit is used for the corresponding relation according to described type of service and the type of service of having stored and frequency threshold, obtains frequency threshold corresponding to described type of service;
Determining unit, be used for according to described type of service corresponding call frequency and frequency threshold, determine whether described middle tier server has the authority calling interface.
Described the first acquiring unit comprises:
Search subelement, be used for according to described type of service, from the corresponding relation of the type of service of having stored, call number and timer, find out corresponding call number and timer;
Computation subunit, for increasing described call number of searching, according to the Time Calculation of the call number of described increase and described timer timing go out described type of service corresponding call frequency.
Described determining unit, concrete be used for judging corresponding the calling frequency and whether surpass frequency threshold corresponding to described type of service of described type of service, if do not surpass, then determine described middle tier server the authority calling interface is arranged, if surpass, then determining described middle tier server does not have the authority calling interface.
Described equipment also comprises:
Empty module, if be used for the record that there is timer expired in the corresponding relation of described type of service, call number and timer, then empty the call number in the described record, and make timer overtime in the described record restart timing.
Described call request is also carried the sign of described middle tier server;
Correspondingly, described determining unit comprises:
Judgment sub-unit is used for judging corresponding the calling frequency and whether surpass frequency threshold corresponding to described type of service of described type of service, if surpass, then determining described middle tier server does not have the authority calling interface;
Determine subelement, do not surpass if be used for, then according to the sign of described middle tier server obtain described middle tier server corresponding call frequency and frequency threshold, according to described middle tier server corresponding call frequency and frequency threshold determines whether described middle tier server has the authority calling interface.
A kind of system of distribution interface, described system comprise middle tier server and Access Layer server;
Described middle tier server, be used for determining corresponding type of service and determining corresponding interface identifier according to the command word that described foreground client sends according to the user profile that foreground client sends, send call request, described call request is carried described type of service and interface identifier;
Described Access Layer server, be used for receiving the call request that middle tier server sends, obtain described type of service corresponding call frequency and frequency threshold, according to described type of service corresponding call frequency and frequency threshold determines whether described middle tier server has the authority calling interface, if so, then distribute corresponding interface to described middle tier server according to described interface identifier.
In the present invention, the Access Layer server obtain type of service that middle tier server sends corresponding call frequency and frequency threshold, according to this type of service corresponding call frequency and frequency threshold is controlled the authority of calling of middle tier server, and the kind of type of service is less, so when a large amount of foreground client are arranged to different middle tier server requested service, can control the authority of calling of middle tier server, thereby the load that can prevent the Access Layer server becomes large, avoids overload to occur.
Description of drawings
Fig. 1 is the network architecture diagram that the embodiment of the invention is used;
Fig. 2 is the method flow diagram of a kind of distribution interface of providing of the embodiment of the invention 1;
Fig. 3 is the method flow diagram of a kind of distribution interface of providing of the embodiment of the invention 2;
Fig. 4 is the method flow diagram of a kind of distribution interface of providing of the embodiment of the invention 3;
Fig. 5 is the equipment schematic diagram of a kind of distribution interface of providing of the embodiment of the invention 4;
Fig. 6 is the system schematic of a kind of distribution interface of providing of the embodiment of the invention 5.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, embodiment of the present invention is described further in detail below in conjunction with accompanying drawing.
Referring to Fig. 1, the network architecture that the embodiment of the invention is used, comprise foreground client and background service end, the background service end is divided into three layers, comprise intermediate layer, Access Layer and bottom, the intermediate layer comprises that one or more middle tier servers, Access Layer comprise that one or more Access Layer servers and bottom comprise one or more bottom storage servers; Foreground client sends the user and asks to the background service end, this user's request is used for to the needed business of backstage service end request, the middle tier server that is positioned at the intermediate layer receives user's request that foreground client sends, send and be used for asking the call request of distribution interface to the Access Layer server that is positioned at Access Layer, the Access Layer server receives and utilizes the method for distribution interface provided by the invention after this call request is this middle tier server distribution interface, this middle tier server sends to this Access Layer server by the interface that distributes with this user's request again, this Access Layer server is transmitted to the bottom storage server that is positioned at bottom with this user's request again, this bottom storage server obtains the business that this user asks again, and Packet Generation that should business is given this Access Layer server, this Access Layer server is transmitted this professional packet again to this middle tier server, and this middle tier server is transmitted this professional packet again to foreground client.
Embodiment 1
As shown in Figure 2, the embodiment of the invention provides a kind of method of distribution interface, comprising:
Step 101: receive the call request that middle tier server sends, and this call request is carried interface identifier and type of service at least;
Step 102: obtain this type of service correspondence and call frequency and frequency threshold, according to this type of service corresponding call frequency and frequency threshold determines whether middle tier server has the authority calling interface;
Step 103: if then distribute corresponding interface to middle tier server according to this interface identifier.
In embodiments of the present invention, the Access Layer server obtain type of service that middle tier server sends corresponding call frequency and frequency threshold, according to this type of service corresponding call frequency and frequency threshold is controlled the authority of calling of middle tier server, and the kind of type of service is less, so when a large amount of foreground client are arranged to different middle tier server requested service, can control the authority of calling of middle tier server, thereby the load that can prevent the Access Layer server becomes large, avoids overload to occur.
Embodiment 2
As shown in Figure 3, the embodiment of the invention provides a kind of method of distribution interface, comprising:
Step 201: middle tier server receives user's request that foreground client sends, and command word and user profile are carried in this user's request at least;
Wherein, foreground client can send the user and ask to the needed business of middle tier server request, and every kind of business is corresponding a kind of user profile all, middle tier server need to obtain the business that foreground client is asked by interface, the business that to obtain again returns to foreground client, and the corresponding command word of each interface.
Step 202: the command word that middle tier server carries according to this user's request is determined corresponding interface identifier, and determines corresponding professional type of service according to the user profile that this user's request is carried;
Wherein, configured in advance has the corresponding relation of command word and interface identifier in middle tier server.Particularly, the command word that middle tier server carries according to this user's request, from the corresponding relation of the command word of having stored and interface identifier, obtain corresponding interface identifier, the user profile of carrying according to this user's request is again determined the business that foreground client is asked, and then determines the type of service of foreground client institute requested service.
Step 203: middle tier server sends call request to the Access Layer server, and this call request is carried definite interface identifier and type of service;
Wherein, middle tier server asks the Access Layer server to distribute needed interface for it by call request.
Suppose, the interface identifier that middle tier server is determined and type of service are respectively interface and close tethers, and then to send to the interface identifier that the call request of Access Layer server carries be that interface and type of service are for closing tethers to middle tier server.
Step 204: the Access Layer server receives this call request, the type of service of carrying according to this call request and the corresponding relation of the type of service of having stored, call number and timer, obtain this type of service corresponding call frequency;
Particularly, the type of service of carrying according to this call request, from the corresponding relation of type of service, call number and the timer stored, find out corresponding call number and timer, increase the call number of searching, according to the time of the call number after increasing and the timer timing of searching, calculate this type of service corresponding call frequency.
Wherein, in the Access Layer server, configure in advance the corresponding relation of type of service, call number and timer as shown in table 1, the Access Layer server all can increase call number corresponding to type of service that this call request is carried in the corresponding relation of type of service, call number and timer after receiving call request.In addition, increasing the call number search can be specially: for the call number of searching increases by 1 or 2 etc., at the present embodiment the value that increases is not specifically limited.
Table 1
Type of service Call number Timer
Close tethers 29 Timer 1
…… …… ……
For example, the type of service that the Access Layer server carries according to this call request is the pass tethers, from the corresponding relation of type of service as shown in table 1, call number and timer, find out corresponding call number and be 29 and timer be timer 1, obtaining call number for the call number increase by 1 of searching is 30, the time of supposing timer 1 timing is 5s, and then calculating type of service according to the time 5s of call number 30 and timer 1 timing, to close the frequency of calling corresponding to tethers be 6; In addition, need to prove: after increasing by 1 to the call number of searching, the corresponding relation of the type of service that obtains, call number and timer is as shown in table 2.
Table 2
Type of service Call number Timer
Close tethers 30 Timer 1
…… …… ……
Wherein, for the timer in every record in the corresponding relation of type of service, call number and timer, if timer expired, then the Access Layer server empties the call number in the overtime timer place record, and restarts timing behind the overtime timer expired.For example, suppose that timer 1 is overtime, then the Access Layer server empties the call number in the record of timer 1 place in the corresponding relation of type of service as shown in table 2, call number and timer, obtain the corresponding relation of type of service as shown in table 3, call number and timer, and timer 1 restarts timing after overtime in the corresponding relation of type of service as shown in table 3, call number and timer.
Table 3
Type of service Call number Timer
Close tethers 0 Timer 1
…… …… ……
Step 205: the type of service that the Access Layer server carries according to this call request and the corresponding relation of the type of service of having stored and frequency threshold, obtain frequency threshold corresponding to this type of service;
Particularly, the type of service that the Access Layer server carries according to this call request is obtained corresponding frequency threshold from the corresponding relation of the type of service of having stored and frequency threshold, and the frequency threshold that obtains is frequency threshold corresponding to this type of service.
Wherein, the technical staff arranges a corresponding frequency threshold for every kind of type of service in advance, and is stored in the corresponding relation of type of service and frequency threshold with every kind of type of service and for the frequency threshold of every kind of type of service setting.
For example, a corresponding frequency threshold is set is 10 to the technical staff for type of service is closed tethers in advance, and the frequency threshold 10 that type of service is closed tethers and setting is stored in the corresponding relation of type of service as shown in table 4 and frequency threshold; Correspondingly, the type of service that the Access Layer server carries according to call request is for closing tethers, and obtaining frequency threshold corresponding to type of service pass tethers from the corresponding relation of type of service as shown in table 4 and frequency threshold is 10.
Table 4
Type of service Frequency threshold
Close tethers 10
…… ……
Step 206: the Access Layer server according to this type of service corresponding call frequency and frequency threshold determines whether this middle tier server has the authority calling interface, if having, then execution in step 207;
Particularly, the Access Layer server judges that whether the frequency of calling corresponding to this type of service surpass frequency threshold corresponding to this type of service, if do not surpass, then determining this middle tier server has the authority calling interface, if surpass, then determining this middle tier server does not have the authority calling interface.
Wherein, do not have the authority calling interface if determine this middle tier server, then the Access Layer server returns error message to middle tier server, end operation.
For example, the Access Layer server judge close tethers corresponding call frequency 5 less than closing frequency threshold 10 corresponding to tethers, then determining this middle tier server has the authority calling interface, execution in step 207.
Step 207: the interface identifier that the Access Layer server carries according to call request distributes corresponding interface to this middle tier server.
For example, the interface identifier interface that carries according to call request of Access Layer server distributes corresponding interface to middle tier server.
Wherein, after middle tier server is assigned to interface, call the interface of distribution, and by the interface that distributes the user's request that receives is sent to the Access Layer server, the Access Layer server is transmitted to the bottom storage server with this user's request again, after the bottom storage server receives this user's request, obtain corresponding business according to the user profile that this user's request is carried, the Packet Generation that this is professional is to the Access Layer server, the Access Layer server again by the interface that distributes should business Packet Generation to this middle tier server, this middle tier server again should business Packet Generation to foreground client, foreground client receives this professional packet, thereby gets access to self needed business.
In embodiments of the present invention, the Access Layer server obtain type of service that middle tier server sends corresponding call frequency and frequency threshold, according to this type of service corresponding call frequency and frequency threshold is controlled the authority of calling of middle tier server, and the kind of type of service is less, so when a large amount of foreground client are arranged to different middle tier server requested service, can control the authority of calling of middle tier server, thereby the load that can prevent the Access Layer server becomes large, avoids overload to occur.
Embodiment 3
As shown in Figure 4, the embodiment of the invention provides a kind of method of distribution interface, comprising:
Step 301: middle tier server receives user's request that foreground client sends, and command word and user profile are carried in this user's request at least;
Step 302: the command word that middle tier server carries according to this user's request is determined corresponding interface identifier, and determines corresponding professional type of service according to the user profile that this user's request is carried;
Particularly, the command word that middle tier server carries according to this user's request, from the corresponding relation of the command word of having stored and interface identifier, obtain corresponding interface identifier, the user profile of carrying according to this user's request is again determined the business that foreground client is asked, and then determines the type of service of foreground client institute requested service.
Step 303: middle tier server sends call request to the Access Layer server, and this call request is carried definite interface identifier and type of service and the sign of self;
Wherein, middle tier server is asked the needed interface of Access Layer server-assignment by call request, behind the needed interface of Access Layer server-assignment middle tier server, middle tier server just can call the interface of distribution and obtain the needed business of foreground client by the interface that distributes to the Access Layer server request.In addition, each middle tier server that is positioned at the intermediate layer has the sign of oneself, the sign of middle tier server can be IP (the Internet Protocol of middle tier server, the agreement that interconnects between the network) information such as address or URL (Uniform/Universal Resource Locator, URL(uniform resource locator)).
Suppose, the interface identifier that middle tier server is determined and type of service are respectively interface and close tethers, and middle tier server be designated IP1, then to carry interface identifier be that interface, type of service are for closing the IP1 that is designated of tethers and middle tier server to the middle tier server call request of issuing the Access Layer server.
Step 304: the Access Layer server receives this call request, the type of service of carrying according to this call request and the corresponding relation of the type of service of having stored, call number and timer, obtain this type of service corresponding call frequency;
Particularly, the type of service of carrying according to this call request, from the corresponding relation of type of service, call number and the timer stored, find out corresponding call number and timer, increase the call number of searching, time according to the call number after increasing and the timer timing of searching calculates and calls frequency, calculate call frequency for this type of service corresponding call frequency.
Wherein, the Access Layer server all can increase call number corresponding to type of service that this call request is carried in the corresponding relation at type of service, call number and timer whenever receiving call request; In addition, for the timer in every record in the corresponding relation of type of service, call number and timer, if timer expired, then the Access Layer server empties the call number in the overtime timer place record, and restarts timing behind the overtime timer expired.
For example, the type of service that the Access Layer server carries according to this call request is the pass tethers, from the corresponding relation of type of service as shown in table 1, call number and timer, find out corresponding call number and be 29 and timer be timer 1, obtaining call number for the call number increase by 1 of searching is 30, the time of supposing timer 1 timing is 5s, and then calculating type of service according to the time 5s of call number 30 and timer 1 timing, to close the frequency of calling corresponding to tethers be 6.
Step 305: the type of service that the Access Layer server carries according to this call request and the corresponding relation of the type of service of having stored and frequency threshold, obtain frequency threshold corresponding to this type of service;
Particularly, the type of service that the Access Layer server carries according to this call request is obtained corresponding frequency threshold from the corresponding relation of the type of service of having stored and frequency threshold, and the frequency threshold that obtains is frequency threshold corresponding to this type of service.
Wherein, the technical staff arranges a corresponding frequency threshold for every kind of type of service in advance, and is stored in the corresponding relation of type of service and frequency threshold with every kind of type of service and for the frequency threshold of every kind of type of service setting.
For example, the type of service that the Access Layer server carries according to call request is for closing tethers, and obtaining frequency threshold corresponding to type of service pass tethers from the corresponding relation of type of service as shown in table 4 and frequency threshold is 10.
Step 306: the Access Layer server judges that whether the frequency of calling corresponding to this type of service surpass frequency threshold corresponding to this type of service, if do not surpass, then execution in step 307;
Wherein, surpass frequency threshold corresponding to this type of service if judge the frequency of calling corresponding to this type of service, then the Access Layer server is determined this middle tier server does not have the authority calling interface, and returns error message to middle tier server, end operation.
For example, the Access Layer server judge close tethers corresponding call frequency 5 less than closing frequency threshold 10 corresponding to tethers, then execution in step 307.
Step 307: the sign of the middle tier server that the Access Layer server carries according to this call request and the corresponding relation of the sign of having stored, call number and timer obtain this middle tier server corresponding call frequency;
Particularly, the sign of this middle tier server that carries according to this call request, from the corresponding relation of sign, call number and the timer of the middle tier server stored, find out corresponding call number and timer, increase the call number of searching, according to the time of the call number after increasing and the timer timing of searching, calculate this middle tier server corresponding call frequency.
Wherein, in the Access Layer server, configure in advance the corresponding relation of sign, call number and the timer of middle tier server as shown in table 5, the Access Layer server all can increase the call number corresponding to sign of the middle tier server that this call request carries in the corresponding relation of the sign of middle tier server, call number and timer after receiving call request; In addition, for the timer in every record in the corresponding relation of sign, call number and the timer of middle tier server, if timer expired, then the Access Layer server empties the call number in the overtime timer place record, and restarts timing behind the overtime timer expired.
Table 5
The sign of middle tier server Call number Timer
IP1 39 Timer 2
…… …… ……
For example, the sign IP1 of the middle tier server that the Access Layer server carries according to this call request, from the corresponding relation of the sign of middle tier server as shown in table 5, call number and timer, find out corresponding call number and be 39 and timer be timer 2, obtaining call number for the call number increase by 1 of searching is 40, the time of supposing timer 2 timing is 8s, and then calculating the frequency of calling corresponding to this middle tier server according to the time 8s of call number 40 and timer 2 timing is 5; In addition, need to prove that the corresponding relation of the sign of the middle tier server that obtains, call number and timer is as shown in table 6 to after the call number increase by 1 of searching.
Table 6
The sign of middle tier server Call number Timer
IP1 40 Timer 2
…… …… ……
Suppose that timer 2 is overtime, then the Access Layer server empties the call number in the record of timer 2 places in the corresponding relation of sign, call number and the timer of middle tier server as shown in table 6, obtain the corresponding relation of sign, call number and the timer of middle tier server as shown in table 7, and timer 2 restarts timing after overtime in the corresponding relation of sign, call number and the timer of middle tier server as shown in table 7.
Table 7
Type of service Call number Timer
Close tethers 0 Timer 1
…… …… ……
Step 308: the sign of the middle tier server that the Access Layer server carries according to this call request and the sign of the middle tier server of having stored and the corresponding relation of frequency threshold, obtain frequency threshold corresponding to this middle tier server;
Particularly, the sign of the middle tier server that the Access Layer server carries according to this call request, obtain corresponding frequency threshold from the corresponding relation of the sign of the middle tier server stored and frequency threshold, the frequency threshold that obtains is frequency threshold corresponding to this middle tier server.
Wherein, the technical staff arranges a corresponding frequency threshold for each middle tier server in advance, and with the sign of each middle tier server and be stored in for the frequency threshold of each middle tier server setting in the corresponding relation of the sign of middle tier server and frequency threshold.
For example, the technical staff is 9 for this middle tier server arranges a corresponding frequency threshold in advance, and the frequency threshold 10 of the sign IP1 of this middle tier server and setting is stored in the corresponding relation of the sign of middle tier server as shown in table 8 and frequency threshold; Correspondingly, the sign IP1 of the middle tier server that the Access Layer server carries according to call request, from the corresponding relation of the sign of middle tier server as shown in table 8 and frequency threshold, obtaining frequency threshold corresponding to this middle tier server is 9.
Table 8
The sign of middle tier server Frequency threshold
IP1 9
…… ……
Step 309: the Access Layer server according to this middle tier server corresponding call frequency and frequency threshold determines whether this middle tier server has the authority calling interface, if having, then execution in step 310;
Particularly, the Access Layer server judges that whether the frequency of calling corresponding to this middle tier server surpass frequency threshold corresponding to this middle tier server, if do not surpass, then determine this middle tier server the authority calling interface is arranged, if surpass, then determining this middle tier server does not have the authority calling interface.
Wherein, do not have the authority calling interface if determine this middle tier server, then the Access Layer server returns error message to middle tier server, end operation.
For example, the Access Layer server judge this middle tier server corresponding call frequency 8 less than frequency threshold 9 corresponding to this middle tier server, then determining this middle tier server has the authority calling interface, execution in step 310.
Step 310: the interface identifier that the Access Layer server carries according to call request distributes corresponding interface to this middle tier server.
For example, the interface identifier interface that carries according to call request of Access Layer server distributes corresponding interface to middle tier server.
Wherein, after middle tier server is assigned to interface, call the interface of distribution, and by the interface that calls the user's request that receives is sent to the Access Layer server, the Access Layer server is transmitted to the bottom storage server with this user's request again, after the bottom storage server receives this user's request, obtain corresponding business according to the user profile that this user's request is carried, the Packet Generation that this is professional is to the Access Layer server, the interface that the Access Layer server calls by this middle tier server again should business Packet Generation give this middle tier server, this middle tier server again should business Packet Generation to foreground client, foreground client receives this professional packet, thereby gets access to self needed business.
In embodiments of the present invention, the Access Layer server obtain type of service that middle tier server sends corresponding call frequency and frequency threshold, according to this type of service corresponding call frequency and frequency threshold is controlled the authority of calling of middle tier server, and the kind of type of service is less, so when a large amount of foreground client are arranged to different middle tier server requested service, can control the authority of calling of middle tier server, thereby the load that can prevent the Access Layer server becomes large, avoids overload to occur.
Embodiment 4
As shown in Figure 5, the embodiment of the invention provides a kind of equipment of distribution interface, comprising:
Receiver module 401 be used for receiving the call request that middle tier server sends, and this call request is carried interface identifier and type of service at least;
Determination module 402, be used for obtaining this type of service corresponding call frequency and frequency threshold, according to this type of service corresponding call frequency and frequency threshold determines whether this middle tier server has the authority calling interface;
Distribution module 403 is yes if be used for determination module 402 definite results, then distributes corresponding interface to this middle tier server according to this interface identifier.
Wherein, determination module 402 comprises:
The first acquiring unit is used for the corresponding relation according to this type of service and the type of service of having stored, call number and timer, obtain this type of service corresponding call frequency;
Second acquisition unit is used for the corresponding relation according to this type of service and the type of service of having stored and frequency threshold, obtains frequency threshold corresponding to this type of service;
Determining unit, be used for according to this type of service corresponding call frequency and frequency threshold, determine whether this middle tier server has the authority calling interface.
Wherein, the first acquiring unit comprises:
Search subelement, be used for according to this type of service, from the corresponding relation of the type of service of having stored, call number and timer, find out corresponding call number and timer;
Computation subunit, for increasing the call number of searching, according to the Time Calculation of the call number that increases and the timer timing of searching this type of service corresponding call frequency.
Wherein, determining unit, concrete be used for judging this type of service corresponding whether call frequency above frequency threshold corresponding to this type of service, if do not surpass, then determine this middle tier server the authority calling interface is arranged, if surpass, then determining this middle tier server does not have the authority calling interface.
Further, this equipment also comprises:
Empty module, if be used for the record that there is timer expired in the corresponding relation of type of service, call number and timer, then empty the call number in this record, and make timer overtime in this record restart timing.
Further, call request is also carried the sign of this middle tier server;
Correspondingly, determining unit comprises:
Judgment sub-unit, be used for judging this type of service corresponding whether call frequency above frequency threshold corresponding to this type of service, if surpass, then determining this middle tier server does not have the authority calling interface;
Determine subelement, do not surpass if be used for, then according to the sign of this middle tier server obtain this middle tier server corresponding call frequency and frequency threshold, according to this middle tier server corresponding call frequency and frequency threshold determines whether this middle tier server has the authority calling interface.
In embodiments of the present invention, the Access Layer server obtain type of service that middle tier server sends corresponding call frequency and frequency threshold, according to this type of service corresponding call frequency and frequency threshold is controlled the authority of calling of middle tier server, and the kind of type of service is less, so when a large amount of foreground client are arranged to different middle tier server requested service, can control the authority of calling of middle tier server, thereby the load that can prevent the Access Layer server becomes large, avoids overload to occur.
Embodiment 5
As shown in Figure 6, the system of a kind of distribution interface of the embodiment of the invention comprises middle tier server 501 and Access Layer server 502;
Middle tier server 501, be used for determining corresponding type of service and determining corresponding interface identifier according to the command word that foreground client sends according to the user profile that foreground client sends, send call request, this call request is carried definite type of service and interface identifier;
Access Layer server 502, be used for receiving the call request that middle tier server 501 sends, obtain this type of service correspondence and call frequency and frequency threshold, according to this type of service corresponding call frequency and frequency threshold determines whether middle tier server 501 has the authority calling interface, if so, then distribute corresponding interface to middle tier server 501 according to this interface identifier.
In embodiments of the present invention, the Access Layer server obtain type of service that middle tier server sends corresponding call frequency and frequency threshold, according to this type of service corresponding call frequency and frequency threshold is controlled the authority of calling of middle tier server, and the kind of type of service is less, so when a large amount of foreground client are arranged to different middle tier server requested service, can control the authority of calling of middle tier server, thereby the load that can prevent the Access Layer server becomes large, avoids overload to occur.
The all or part of step that one of ordinary skill in the art will appreciate that realization above-described embodiment can be finished by hardware, also can come the relevant hardware of instruction to finish by program, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be read-only memory, disk or CD etc.
The above only is preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (13)

1. the method for a distribution interface is characterized in that, described method comprises:
Receive the call request that middle tier server sends, described call request is carried interface identifier and type of service at least;
Obtain described type of service corresponding call frequency and frequency threshold, according to described type of service corresponding call frequency and frequency threshold determines whether described middle tier server has the authority calling interface;
If so, then distribute corresponding interface to described middle tier server according to described interface identifier.
2. the method for claim 1, it is characterized in that, obtain described type of service corresponding call frequency and frequency threshold, according to described type of service corresponding call frequency and frequency threshold determines that whether described middle tier server has the authority calling interface, comprising:
According to the corresponding relation of described type of service and the type of service of having stored, call number and timer, obtain described type of service corresponding call frequency;
According to the corresponding relation of described type of service and the type of service of having stored and frequency threshold, obtain frequency threshold corresponding to described type of service;
According to described type of service corresponding call frequency and frequency threshold, determine whether described middle tier server has the authority calling interface.
3. method as claimed in claim 2 is characterized in that, according to the corresponding relation of described type of service and the type of service of having stored, call number and timer, obtain described type of service corresponding call frequency, comprising:
According to described type of service, from the corresponding relation of the type of service of having stored, call number and timer, find out corresponding call number and timer;
Increase described call number of searching, according to the Time Calculation of the call number of described increase and described timer timing go out described type of service corresponding call frequency.
4. method as claimed in claim 2 is characterized in that, according to described type of service corresponding call frequency and frequency threshold, determine that whether described middle tier server has the authority calling interface, comprising:
Judge that whether the frequency of calling corresponding to described type of service surpass frequency threshold corresponding to described type of service, if do not surpass, then determining described middle tier server has the authority calling interface, if surpass, then determining described middle tier server does not have the authority calling interface.
5. such as the described method of each claim of claim 2-4, it is characterized in that, described method also comprises:
If there is the record of timer expired in the corresponding relation of described type of service, call number and timer, then empties the call number in the described record, and make timer overtime in the described record restart timing.
6. method as claimed in claim 4 is characterized in that, described call request is also carried the sign of described middle tier server;
Correspondingly, according to described type of service corresponding call frequency and frequency threshold, determine that whether described middle tier server has the authority calling interface, comprising:
Judge that whether the frequency of calling corresponding to described type of service surpass frequency threshold corresponding to described type of service, if surpass, then determining described middle tier server does not have the authority calling interface;
If do not surpass, then according to the sign of described middle tier server obtain described middle tier server corresponding call frequency and frequency threshold, according to described middle tier server corresponding call frequency and frequency threshold determines whether described middle tier server has the authority calling interface.
7. the equipment of a distribution interface is characterized in that, described equipment comprises:
Receiver module is used for receiving the call request that middle tier server sends, and described call request is carried interface identifier and type of service at least;
Determination module, be used for obtaining described type of service corresponding call frequency and frequency threshold, according to described type of service corresponding call frequency and frequency threshold determines whether described middle tier server has the authority calling interface;
Distribution module is yes if be used for the definite result of described determination module, then distributes corresponding interface to described middle tier server according to described interface identifier.
8. equipment as claimed in claim 7 is characterized in that, described determination module comprises:
The first acquiring unit is used for the corresponding relation according to described type of service and the type of service of having stored, call number and timer, obtain described type of service corresponding call frequency;
Second acquisition unit is used for the corresponding relation according to described type of service and the type of service of having stored and frequency threshold, obtains frequency threshold corresponding to described type of service;
Determining unit, be used for according to described type of service corresponding call frequency and frequency threshold, determine whether described middle tier server has the authority calling interface.
9. equipment as claimed in claim 8 is characterized in that, described the first acquiring unit comprises:
Search subelement, be used for according to described type of service, from the corresponding relation of the type of service of having stored, call number and timer, find out corresponding call number and timer;
Computation subunit, for increasing described call number of searching, according to the Time Calculation of the call number of described increase and described timer timing go out described type of service corresponding call frequency.
10. equipment as claimed in claim 8 is characterized in that,
Described determining unit, concrete be used for judging corresponding the calling frequency and whether surpass frequency threshold corresponding to described type of service of described type of service, if do not surpass, then determine described middle tier server the authority calling interface is arranged, if surpass, then determining described middle tier server does not have the authority calling interface.
11. such as the described equipment of each claim of claim 9-10, it is characterized in that, described equipment also comprises:
Empty module, if be used for the record that there is timer expired in the corresponding relation of described type of service, call number and timer, then empty the call number in the described record, and make timer overtime in the described record restart timing.
12. equipment as claimed in claim 8 is characterized in that, described call request is also carried the sign of described middle tier server;
Correspondingly, described determining unit comprises:
Judgment sub-unit is used for judging corresponding the calling frequency and whether surpass frequency threshold corresponding to described type of service of described type of service, if surpass, then determining described middle tier server does not have the authority calling interface;
Determine subelement, do not surpass if be used for, then according to the sign of described middle tier server obtain described middle tier server corresponding call frequency and frequency threshold, according to described middle tier server corresponding call frequency and frequency threshold determines whether described middle tier server has the authority calling interface.
13. the system of a distribution interface is characterized in that, described system comprises middle tier server and Access Layer server;
Described middle tier server, be used for determining corresponding type of service and determining corresponding interface identifier according to the command word that described foreground client sends according to the user profile that foreground client sends, send call request, described call request is carried described type of service and interface identifier;
Described Access Layer server, be used for receiving the call request that middle tier server sends, obtain described type of service corresponding call frequency and frequency threshold, according to described type of service corresponding call frequency and frequency threshold determines whether described middle tier server has the authority calling interface, if so, then distribute corresponding interface to described middle tier server according to described interface identifier.
CN201110187476.7A 2011-07-05 2011-07-05 A kind of method of distribution interface, equipment and system Active CN102868770B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110187476.7A CN102868770B (en) 2011-07-05 2011-07-05 A kind of method of distribution interface, equipment and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110187476.7A CN102868770B (en) 2011-07-05 2011-07-05 A kind of method of distribution interface, equipment and system

Publications (2)

Publication Number Publication Date
CN102868770A true CN102868770A (en) 2013-01-09
CN102868770B CN102868770B (en) 2016-12-28

Family

ID=47447356

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110187476.7A Active CN102868770B (en) 2011-07-05 2011-07-05 A kind of method of distribution interface, equipment and system

Country Status (1)

Country Link
CN (1) CN102868770B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105099766A (en) * 2015-06-29 2015-11-25 北京奇虎科技有限公司 Method and device for preventing interface from occupying resource excessively
CN105893150A (en) * 2016-03-31 2016-08-24 腾讯科技(深圳)有限公司 Interface calling frequency control and interface calling request processing method and device
CN106550010A (en) * 2016-09-21 2017-03-29 南京途牛科技有限公司 A kind of real-time control distributed system calls external system to service the method and system of the frequency
CN110505273A (en) * 2019-07-12 2019-11-26 苏州浪潮智能科技有限公司 A kind of application method, equipment and the readable medium of service ability limitation
CN111064677A (en) * 2019-11-11 2020-04-24 福建天泉教育科技有限公司 Flow control method based on back-end access quantity and storage medium
CN111142960A (en) * 2018-11-02 2020-05-12 中国电信股份有限公司 Interface providing method, device and system
CN113434228A (en) * 2021-06-21 2021-09-24 青岛海尔科技有限公司 Page request method and device, storage medium and electronic device
CN113742084A (en) * 2021-09-13 2021-12-03 城云科技(中国)有限公司 Method and apparatus for allocating computing resources based on interface characteristics
CN113760398A (en) * 2020-09-29 2021-12-07 北京沃东天骏信息技术有限公司 Interface calling method, server, system and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6594667B2 (en) * 1999-08-23 2003-07-15 International Business Machines Corporation Method, system and program products for modifying coupling facility structures
JP2005044277A (en) * 2003-07-25 2005-02-17 Fuji Xerox Co Ltd Unauthorized communication detection device
CN100461679C (en) * 2007-06-04 2009-02-11 中国移动通信集团公司 Method for raising business identification effect
EP2234397A1 (en) * 2009-03-24 2010-09-29 Thomson Licensing Methods for delivering and receiving interactive multimedia data attached to an audio video content

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105099766A (en) * 2015-06-29 2015-11-25 北京奇虎科技有限公司 Method and device for preventing interface from occupying resource excessively
CN105099766B (en) * 2015-06-29 2019-03-05 北京奇虎科技有限公司 Prevent interface from excessively occupying the method and device of resource
CN105893150A (en) * 2016-03-31 2016-08-24 腾讯科技(深圳)有限公司 Interface calling frequency control and interface calling request processing method and device
CN106550010A (en) * 2016-09-21 2017-03-29 南京途牛科技有限公司 A kind of real-time control distributed system calls external system to service the method and system of the frequency
CN111142960A (en) * 2018-11-02 2020-05-12 中国电信股份有限公司 Interface providing method, device and system
CN111142960B (en) * 2018-11-02 2023-11-14 中国电信股份有限公司 Interface providing method, device and system
CN110505273A (en) * 2019-07-12 2019-11-26 苏州浪潮智能科技有限公司 A kind of application method, equipment and the readable medium of service ability limitation
CN110505273B (en) * 2019-07-12 2022-04-22 苏州浪潮智能科技有限公司 Service capability limitation using method, device and readable medium
CN111064677A (en) * 2019-11-11 2020-04-24 福建天泉教育科技有限公司 Flow control method based on back-end access quantity and storage medium
CN113760398A (en) * 2020-09-29 2021-12-07 北京沃东天骏信息技术有限公司 Interface calling method, server, system and storage medium
CN113434228A (en) * 2021-06-21 2021-09-24 青岛海尔科技有限公司 Page request method and device, storage medium and electronic device
CN113742084A (en) * 2021-09-13 2021-12-03 城云科技(中国)有限公司 Method and apparatus for allocating computing resources based on interface characteristics

Also Published As

Publication number Publication date
CN102868770B (en) 2016-12-28

Similar Documents

Publication Publication Date Title
CN102868770A (en) Method, equipment and system for distributing interface
CN109040259B (en) CDN node distribution method and system based on MEC
CN109151009B (en) CDN node distribution method and system based on MEC
CN102045321B (en) Flow control method and system for software downloading
CN103176790A (en) Application releasing method and application releasing system
CN102387222B (en) Address distribution method, apparatus and system thereof
CN102315968B (en) Network configuration method in virtual machine environment
CN101771723A (en) Data synchronization method
CN104350802A (en) Wireless local area network WLAN access method, terminal and server
CN103595566B (en) A kind of method and device for detecting free IP addresses
CN1929482B (en) Network business identification method and device
CN112465615B (en) Method, device and system for processing bill data
CN104348798A (en) Network assigning method and device, scheduling server, and system
CN111107171A (en) Security defense method and device for DNS (Domain name Server), communication equipment and medium
CN104219069A (en) Access frequency control method, device and control system
CN100405765C (en) IP address distributing method and device
CN101308467A (en) Task processing method and device
CN104506457A (en) Bandwidth adjusting method and system and intelligent pipeline platform
CN101997931A (en) Position information acquiring method and equipment
CN109743357B (en) Method and device for realizing service access continuity
CN113194012B (en) Multi-agent management method, device, equipment and storage medium based on Internet of things
CN110417876A (en) Node server and main control device in session method, distributed system
CN107786680A (en) Method and apparatus for being managed to IP address resources
CN103870471B (en) Two degree of good friend's inquiry systems, method and apparatus
CN108429641A (en) A kind of network device management 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