CN106254537A - Interface interchange method and apparatus - Google Patents

Interface interchange method and apparatus Download PDF

Info

Publication number
CN106254537A
CN106254537A CN201610844724.3A CN201610844724A CN106254537A CN 106254537 A CN106254537 A CN 106254537A CN 201610844724 A CN201610844724 A CN 201610844724A CN 106254537 A CN106254537 A CN 106254537A
Authority
CN
China
Prior art keywords
call
interface
state
call number
calling
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
CN201610844724.3A
Other languages
Chinese (zh)
Other versions
CN106254537B (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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201610844724.3A priority Critical patent/CN106254537B/en
Publication of CN106254537A publication Critical patent/CN106254537A/en
Application granted granted Critical
Publication of CN106254537B publication Critical patent/CN106254537B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Abstract

The disclosure is directed to a kind of interface interchange method and apparatus, the method includes: obtains and calls state at Preset Time inner joint;Described state of calling is qualified call state or allows to call state;When the state of calling of described interface is qualified call state, transmission interface qualified call message, for instruction, described interface qualified call message forbids that calling described interface provides service;Achieve restriction interface interchange, it is to avoid the phenomenon of the service pressure overload of interface, improve efficiency of service.

Description

Interface interchange method and apparatus
Technical field
It relates to Internet technical field, particularly relate to interface interchange method and apparatus.
Background technology
In correlation technique, server can externally provide interface service, and each user can be with being correlated with in invoking server Interface, to obtain corresponding service, if the invoked number of times of interface is the most, such as web crawlers, necessarily causes service pressure mistake Carry, affect efficiency of service.
Summary of the invention
For overcoming problem present in correlation technique, the disclosure provides a kind of interface interchange method and apparatus.
First aspect according to disclosure embodiment, it is provided that a kind of interface interchange method, including:
Obtain and call state at Preset Time inner joint;Described state of calling is qualified call state or allows to call State;
When the state of calling of described interface is qualified call state, transmission interface qualified call message, described interface limits Determine message call and forbid that calling described interface provides service for instruction.
Second aspect according to disclosure embodiment, it is provided that a kind of interface interchange device, including:
Acquisition module, is configured to obtain and calls state at Preset Time inner joint;Described state of calling is limited and sets the tone By state or allow to call state;
Judge module, is configured to judge whether the state of calling of described interface is qualified call state;
Sending module, is configured as described judge module and judges that the state of calling of described interface is qualified call state Time, transmission interface qualified call message, for instruction, described interface qualified call message forbids that calling described interface provides service.
The third aspect according to disclosure embodiment, it is provided that a kind of interface interchange device, including:
Processor;
For storing the memorizer of processor executable;
Wherein, described processor is configured to:
Obtain and call state at Preset Time inner joint;Described state of calling is qualified call state or allows to call State;
When the state of calling of described interface is qualified call state, transmission interface qualified call message, described interface limits Determine message call and forbid that calling described interface provides service for instruction.
Embodiment of the disclosure that the technical scheme of offer can include following beneficial effect: by obtaining in Preset Time Interface call state;Described state of calling is qualified call state or allows to call state;Shape is called when described interface When state is qualified call state, transmission interface qualified call message, described interface qualified call message forbids calling for instruction Described interface provides service;Achieve restriction interface interchange, it is to avoid the phenomenon of the service pressure overload of interface, improve service Efficiency.
It should be appreciated that it is only exemplary and explanatory, not that above general description and details hereinafter describe The disclosure can be limited.
Accompanying drawing explanation
Accompanying drawing herein is merged in description and constitutes the part of this specification, it is shown that meet the enforcement of the disclosure Example, and for explaining the principle of the disclosure together with description.
Fig. 1 is the flow chart according to a kind of interface interchange method shown in an exemplary embodiment.
Fig. 2 is the flow chart according to a kind of interface interchange method shown in another exemplary embodiment.
Fig. 3 is the flow chart according to a kind of interface interchange method shown in another exemplary embodiment.
Fig. 4 is the application schematic diagram according to a kind of interface interchange method shown in an exemplary embodiment.
Fig. 5 is the block diagram according to a kind of interface interchange device shown in an exemplary embodiment.
Fig. 6 is the block diagram according to a kind of interface interchange device shown in another exemplary embodiment.
Fig. 7 is the block diagram according to a kind of interface interchange device shown in another exemplary embodiment.
Fig. 8 is the block diagram according to a kind of interface interchange device shown in another exemplary embodiment.
Fig. 9 is the block diagram according to a kind of interface interchange device 1900 shown in an exemplary embodiment.
By above-mentioned accompanying drawing, it has been shown that the embodiment that the disclosure is clear and definite, hereinafter will be described in more detail.These accompanying drawings With word, the scope being not intended to be limited disclosure design by any mode is described, but by with reference to specific embodiment being Those skilled in the art illustrate the concept of the disclosure.
Detailed description of the invention
Here will illustrate exemplary embodiment in detail, its example represents in the accompanying drawings.Explained below relates to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represents same or analogous key element.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the disclosure.On the contrary, they are only with the most appended Described in detail in claims, the example of some aspects of the disclosure are consistent apparatus and method.
Fig. 1 is the flow chart according to a kind of interface interchange method shown in an exemplary embodiment, as it is shown in figure 1, this reality Execute the interface interchange method of example in server, comprise the following steps.
In step s 11, obtain and call state at Preset Time inner joint;Described state of calling is qualified call state Or allow to call state.
In step s 12, when the state of calling of described interface is qualified call state, transmission interface qualified call disappears Breath, for instruction, described interface qualified call message forbids that calling described interface provides service.
Can obtain interface state of calling in Preset Time in the present embodiment is that qualified call state still allows to adjust By state, alternatively, the present embodiment can be this interface once called service is provided after obtain this interface call state, Such as: the present embodiment is after receiving message call, and this message call is used for indicating this interface of acquisition the most called, the present embodiment According to this message call determine interface be called, then obtain this interface current call state.Then the tune of this interface is judged Whether it is qualified call state by state, when the state of calling of this interface is qualified call state, transmission interface qualified call Message;For instruction, this interface qualified call message forbids that calling this interface provides service.Alternatively, receive this interface to limit The device of message call, when receiving service request, this service request obtains service for interface described in request call, according to Described interface qualified call message, forbids providing service according to interface described in described service request call.
In sum, the interface interchange method that the present embodiment provides, call shape by obtaining at Preset Time inner joint State;Described state of calling is qualified call state or allows to call state;When the state of calling of described interface is qualified call During state, transmission interface qualified call message, for instruction, described interface qualified call message forbids that calling described interface provides Service;Achieve restriction interface interchange, it is to avoid the phenomenon of the service pressure overload of interface, improve efficiency of service.
Fig. 2 is the flow chart according to a kind of interface interchange method shown in another exemplary embodiment, as in figure 2 it is shown, this The interface interchange method of embodiment, in server, comprises the following steps.
In the step s 21, according to message call, interface call number in described Preset Time is called secondary by first Number is updated to the second call number, and described second call number is described first call number and preset times sum;Described tune It is used for indicating described interface the most called by message.
In step S22, it is judged that whether described second call number meets pre-conditioned.The most then perform step S23 and Step S24, if it is not, then perform step S25.
Described pre-conditioned be in Preset Time the call number of described interface not less than the first preset value.
In step S23, when described second call number meet described pre-conditioned time, obtain described interface calls shape State is qualified call state.
In step s 24, transmission interface qualified call message, described interface qualified call message forbids calling for instruction Described interface provides service.
In step s 25, when described second call number be unsatisfactory for described pre-conditioned time, obtain calling of described interface State is for allowing to call state.
In the present embodiment, when receiving message call every time, according to this message call docking port at described Preset Time Interior call number is adjusted.Specifically, the current call number of this interface is the first call number, namely receives tune It is the first call number by this interface call number in described Preset Time during message, this first call number for example, 3, Then determine that this interface is invoked according to this message call, and the first call number is added preset times obtain one and call time Number, this call number is referred to as the second call number, then is that the first call number changes to the second tune by the call number of this interface By number of times, this preset times for example, 1, this second call number for example, 3+1=4, by this interface in described Preset Time Call number changed to 4 by 3.Judging whether the second call number meets the most again pre-conditioned, this is pre-conditioned is default The call number of time inner joint is not less than the first preset value.When judging that the second call number meets pre-conditioned, obtaining should The state of calling of interface is qualified call state, then transmission interface qualified call message.When judging that the second call number is discontented with When foot is pre-conditioned, obtain the state of calling of this interface for allowing to call state.
In sum, the interface interchange method that the present embodiment provides, by according to message call, presetting interface described Call number in time is updated to the second call number by the first call number;When described second call number meets described pre- If during condition, the state of calling obtaining described interface is qualified call state, and transmission interface qualified call message, described interface For instruction, qualified call message forbids that calling described interface provides service;Achieve restriction interface interchange, it is to avoid interface The phenomenon of service pressure overload, improves efficiency of service;And the accuracy rate of the state of calling of the interface obtained is higher, faster Speed.
Alternatively, on the basis of above-described embodiment shown in Fig. 2, the present embodiment can also comprise the steps:
In step S26, when the counting duration of the call number of described interface is more than or equal to described Preset Time, will The call number of described interface changes to the second preset value.
In the present embodiment, interface call number counting duration more than or equal to Preset Time time, then need under Restart counting in one Preset Time, therefore this interface call number in Preset Time is changed to second and preset Value, this second preset value for example, 0, thus avoid the state of calling of this interface being defined as qualified call state, and always Avoid the defect that the offer service of this interface cannot be provided.As a example by Preset Time is one hour, the present embodiment can be often During individual integral point (such as 8 points, etc.), the call number of interface is changed to the second preset value at 9.
Alternatively, the present embodiment can also comprise the steps.
In step s 27, transmission interface allows message call, and described interface allows message call to allow to call for instruction Described interface provides service.
In the present embodiment, if the present embodiment is after transmission interface qualified call message, when the call number of described interface When counting duration is more than or equal to described Preset Time, the present embodiment can allow message call with transmission interface, and this interface is permitted Permitted message call to allow to call the offer service of this interface for instruction, it is ensured that again count interface when reaching Preset Time After call number, recover in time this interface allow call state, it is ensured that service can be provided by calling interface in time.Alternatively, connect Receiving this interface and allow the device of message call, when receiving service request, this service request connects for described in request call Mouth obtains service, allows message call and described service request according to described interface, calls the offer service of described interface.
Alternatively, above-mentioned pre-conditioned can be to pre-set, it is also possible to be dynamically by step as described below Obtain.
In step S28, receive configuration message, described configuration message for indicate described interface in Preset Time Big call number.
In step S29, according to described configuration message, generate described pre-conditioned.
In the present embodiment, before performing step S21, it is also possible to perform step S28 and step S29, but be not to hold every time Step S28 and step S29 it is performed both by before row step S21.
In the present embodiment, receiving configuration message, this configuration message is for indicating this interface maximum tune in Preset Time Not can exceed that this maximum call number with number of times, i.e. this interface call number in Preset Time, then disappear according to this configuration Breath, generates above-mentioned pre-conditioned, above-mentioned pre-conditioned in the first preset value for example, this maximum call number.This enforcement Example generates the pre-conditioned of state of calling for judging this interface by the configuration message received, can with dynamic flexible more Change pre-conditioned, therefore this interface is called restriction more flexible.
Fig. 3 is the flow chart according to a kind of interface interchange method shown in another exemplary embodiment, as it is shown on figure 3, this The interface interchange method of embodiment, in server, comprises the following steps.
In step S31, according to message call, interface residue call number in Preset Time is adjusted by the first residue Being updated to the second residue call number with number of times, described second residue call number is that described first residue calls secondary and default time The difference of number.
In step s 32, it is judged that whether described second residue call number meets pre-conditioned.The most then perform step S33 and step S34, if it is not, then perform step S35.
Described pre-conditioned in Preset Time the residue call number of described interface be not more than the 3rd preset value.
In step S33, when described second remain call number meet described pre-conditioned time, obtain the tune of described interface It is qualified call state by state.
In step S34, transmission interface qualified call message, described interface qualified call message forbids calling for instruction Described interface provides service.
In step s 35, when described second remain call number be unsatisfactory for described pre-conditioned time, obtain described interface State of calling is for allowing to call state.
In the present embodiment, when receiving message call every time, according to this message call docking port at described Preset Time Interior residue call number is adjusted.Specifically, the current residue call number of this interface is the first residue call number, also When being exactly to receive message call, this interface residue call number in described Preset Time is the first residue call number, should According to this message call, first residue call number for example, 3, then determines that this interface is invoked, and the first residue called Number of times subtracts preset times and obtains a residue call number, and this residue call number is referred to as the second residue call number, then should The residue call number of interface is that the first residue call number changes to the second residue call number, this preset times for example, 1, This second residue call number for example, 3-1=2, by this interface residue call number in described Preset Time by 3 changes It is 2.Judging whether the second residue call number meets pre-conditioned the most again, this is pre-conditioned for this interface in Preset Time Residue call number is not more than the second preset value.When judging that the second residue call number meets pre-conditioned, obtain this interface State of calling be qualified call state, then transmission interface qualified call message.When judging that the second residue call number is discontented with When foot is pre-conditioned, obtain the state of calling of this interface for allowing to call state.
In sum, the interface interchange method that the present embodiment provides, by according to message call, presetting interface described Residue call number in time is updated to the second residue call number by the first residue call number;When described second residue is adjusted With number of times meet described pre-conditioned time, the state of calling obtaining described interface is qualified call state, and transmission interface limit Message call, for instruction, described interface qualified call message forbids that calling described interface provides service;Achieve restriction interface Call, it is to avoid the phenomenon of the service pressure overload of interface, improve efficiency of service;And the state of calling of the interface obtained Accuracy rate is higher, more rapid.
Alternatively, on the basis of above-described embodiment shown in Fig. 3, the present embodiment can also comprise the steps:
In step S36, when the counting duration of the residue call number of described interface is more than or equal to described Preset Time Time, the residue call number of described interface is changed to the 4th preset value.
In the present embodiment, when the counting duration of the residue call number of interface is more than or equal to Preset Time, then need In next Preset Time, restart counting, therefore the residue call number of this interface is changed to the 4th preset value, should 4th preset value can be the maximum call number of this interface in Preset Time, thus avoids this interface being called shape always State is defined as qualified call state, and avoids the defect that cannot call the offer service of this interface.It it is one with Preset Time As a example by hour, the residue call number of interface can be changed at 9 by the present embodiment when each integral point (such as 8 points, etc.) Four preset values.
Alternatively, the present embodiment can also comprise the steps.
In step S37, transmission interface allows message call, and described interface allows message call to allow to call for instruction Described interface provides service.
In the present embodiment, if the present embodiment is after transmission interface qualified call message, when the residue of described interface is called secondary When the counting duration of number reaches described Preset Time, the present embodiment can allow message call with transmission interface, and this interface allows Message call allows to call this interface for instruction and provides service, it is ensured that again count this interface when reaching Preset Time After residue call number, recover in time this interface allow call state, it is ensured that service can be provided by calling interface in time.Optional Ground, receives this interface and allows the device of message call, and when receiving service request, this service request is for request call institute State interface and obtain service, allow message call and described service request according to described interface, call described interface and service is provided.
Alternatively, above-mentioned pre-conditioned can be to pre-set, it is also possible to be dynamically by step as described below Obtain.
In step S38, receiving configuration message, described configuration message is used for indicating described interface in described Preset Time Maximum call number.
In step S39, according to described configuration message, generate described pre-conditioned.
In the present embodiment, before performing step S31, it is also possible to perform step S38 and step S39, but be not to hold every time Step S38 and step S39 it is performed both by before row step S31.
In the present embodiment, receiving configuration message, this configuration message is for indicating this interface maximum tune in Preset Time This maximum call number is not can exceed that, then according to this configuration by number of times, i.e. this interface total call number in Preset Time Message, generates above-mentioned pre-conditioned, the 4th above-mentioned preset value for example, this maximum call number.The present embodiment is by receiving Configuration message generate the pre-conditioned of state of calling for judging this interface, default bar can be changed with dynamic flexible Part, therefore calls restriction more flexible to this interface.
Fig. 4 is the application schematic diagram according to a kind of interface interchange method shown in an exemplary embodiment, as shown in Figure 4, Dispatching device in Fig. 4 can perform the various embodiments described above, carries out illustrating to an implementation of dispatching device based on Fig. 4 Bright, configuration device sends configuration message to dispatching device, and this configuration message is for indicating the interface providing service in one hour Maximum call number be 6000.Dispatching device generates pre-conditioned according to this configuration message, and this is pre-conditioned can be that this connects Call number mouthful in Preset Time is less than 6000, and dispatching device is by this interface scheduling times in Preset Time Initial value be set to 0.
1) service request is used for dispatching this interface provides service, and this service is asked after receiving service request by agent apparatus It is sent to interface service device, interface service device dispatches this interface according to this dispatch request and service is provided.Then interface clothes Business device sends message call to dispatching device, and this message call is used for indicating this interface the most called.Dispatching device receives After this message call, this interface scheduling times in Preset Time is added 1, judge that this interface is in Preset Time the most again Whether scheduling times meets above-mentioned pre-conditioned.
2) when being unsatisfactory for above-mentioned pre-conditioned (such as this interface call number in Preset Time is less than 6000), say This interface bright can also recall in this Preset Time, and dispatching device does not sends message to agent apparatus, if agent apparatus is again Receive service request after, again perform 1) described in mode.
3) if meet above-mentioned pre-conditioned (such as this interface call number in Preset Time is 6000), this is described Interface can not recall in this Preset Time, and dispatching device is to agent apparatus transmission interface qualified call message, agent apparatus After receiving this interface qualified call message, then receive service request, then perform operation o, the most no longer please by this service Ask and be sent to interface service device, to forbid that calling this interface provides service.
Alternatively, can be called by internal interface between above-mentioned each device and communicate.
Following for disclosure device embodiment, may be used for performing method of disclosure embodiment.Real for disclosure device Execute the details not disclosed in example, refer to method of disclosure embodiment.
Fig. 5 is the block diagram according to a kind of interface interchange device shown in an exemplary embodiment.This interface interchange device can With by software, hardware or both be implemented in combination with become the some or all of of server.With reference to Fig. 5, the present embodiment Device includes: acquisition module 210, judge module 220 and sending module 230.
Acquisition module 210, is configured to obtain and calls state at Preset Time inner joint;Described state of calling is for limiting Call state or allow to call state.
Judge module 220, is configured to judge that whether the state of calling of the described interface that described acquisition module 210 obtains is Qualified call state.
Sending module 230, is configured as described judge module 220 and judges that the state of calling of described interface is qualified call During state, transmission interface qualified call message, for instruction, described interface qualified call message forbids that calling described interface provides Service.
About the device in above-described embodiment, concrete mode and the technique effect of wherein modules execution operation exist About the embodiment of the method has been described in detail, explanation will be not set forth in detail herein.
Fig. 6 is the block diagram according to a kind of interface interchange device shown in another exemplary embodiment.This interface interchange device Can pass through software, hardware or both be implemented in combination with become the some or all of of server.With reference to Fig. 6, the present embodiment Device on the basis of embodiment illustrated in fig. 5, described acquisition module 210, including: first updates submodule 211, first judges Submodule 212 and first obtains submodule 213.
First updates submodule 211, is configured to according to message call, by described interface tune in described Preset Time Being updated to the second call number with number of times by the first call number, described second call number is that described first call number is with pre- If number of times sum;Described message call is used for indicating described interface the most called.
First judges submodule 212, is configured to judge that described the second of described first renewal submodule 211 renewal is called It is pre-conditioned whether number of times meets;Described pre-conditioned be in Preset Time the call number of described interface not less than first pre- If value.
Described first obtains submodule 213, is configured as described first and judges that submodule 212 judges that described second calls Number of times meet described pre-conditioned time, the state of calling obtaining described interface is qualified call state;When described first judges son Module 212 judge described second call number be unsatisfactory for described pre-conditioned time, obtain the state of calling of described interface for allowing Call state.
Alternatively, the device of described embodiment can also include: the first change module 240.
First change module 240, is configured as the counting duration of call number of described interface more than or equal to described During Preset Time, the call number of described interface is changed to the second preset value.
About the device in above-described embodiment, concrete mode and the technique effect of wherein modules execution operation exist About the embodiment of the method has been described in detail, explanation will be not set forth in detail herein.
Fig. 7 is the block diagram according to a kind of interface interchange device shown in another exemplary embodiment.This interface interchange device Can pass through software, hardware or both be implemented in combination with become the some or all of of server.With reference to Fig. 7, the present embodiment Device on the basis of embodiment illustrated in fig. 5, described acquisition module 210, including: second updates submodule 214, second judges Submodule 215 and second obtains submodule 216.
Second updates submodule 214, is configured to according to message call, by described interface remaining in described Preset Time Remaining call number is updated to the second residue call number by the first residue call number, and described second residue call number is first Residue call number and the difference of preset times;Described message call is used for indicating described interface the most called.
Second judges submodule 215, is configured to judge that described second updates described second residue that submodule 214 updates It is pre-conditioned whether call number meets;Described pre-conditioned be that the residue call number of described interface in Preset Time is little In the 3rd preset value.
Second obtains submodule 216, is configured as described second and judges that submodule 215 judges that described second residue is called Number of times meet described pre-conditioned time, the state of calling obtaining described interface is qualified call state;When described second judges son Module 215 judge described second residue call number be unsatisfactory for described pre-conditioned time, the state of calling obtaining described interface is Allow to call state.
Alternatively, the device of described embodiment can also include: the second change module 250.
Described second change module 250, be configured as described interface residue call number counting duration be more than or During equal to described Preset Time, the residue call number of described interface is calculated as the 4th preset value.
About the device in above-described embodiment, concrete mode and the technique effect of wherein modules execution operation exist About the embodiment of the method has been described in detail, explanation will be not set forth in detail herein.
Fig. 8 is the block diagram according to a kind of interface interchange device shown in another exemplary embodiment.This interface interchange device Can pass through software, hardware or both be implemented in combination with become the some or all of of server.With reference to Fig. 8, the present embodiment Device on the basis of Fig. 6 or embodiment illustrated in fig. 7, the device of the present embodiment can also include: receiver module 260 and generate Module 270.
Described receiver module 260, is configured to receive configuration message, and described configuration message is used for indicating described interface in institute State the maximum call number in Preset Time.
Described generation module 270, is configured to, according to described configuration message, generate described pre-conditioned.
Alternatively, described sending module 230, it is additionally configured to transmission interface and allows message call, described interface allows to adjust Allow to call described interface by message for instruction and service is provided.
Wherein, the acquisition module 210 shown in Fig. 8 may refer to the description in Fig. 6 or Fig. 7, it addition, the device shown in Fig. 8 The first change module 240, or the second change module 250 can also be included, simply not shown in Fig. 8.
About the device in above-described embodiment, concrete mode and the technique effect of wherein modules execution operation exist About the embodiment of the method has been described in detail, explanation will be not set forth in detail herein.
Fig. 9 is the block diagram according to a kind of interface interchange device 1900 shown in an exemplary embodiment.Such as, device 1900 May be provided in a server.With reference to Fig. 9, device 1900 includes processing assembly 1922, and it farther includes one or more Processor, and by the memory resource representated by memorizer 1932, can be by the finger of the execution processing assembly 1922 for storage Order, such as application program.In memorizer 1932, the application program of storage can include each correspondence one or more Module in one group of instruction.It is configured to perform instruction, to perform above-mentioned interface interchange method additionally, process assembly 1922.
Device 1900 can also include a power supply module 1926 be configured to perform device 1900 power management, one Wired or wireless network interface 1950 is configured to be connected to device 1900 network, and input and output (I/O) interface 1958.Device 1900 can operate based on the operating system being stored in memorizer 1932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or similar.
Those skilled in the art, after considering description and putting into practice invention disclosed herein, will readily occur to its of the disclosure Its embodiment.The application is intended to any modification, purposes or the adaptations of the disclosure, these modification, purposes or Person's adaptations is followed the general principle of the disclosure and includes the undocumented common knowledge in the art of the disclosure Or conventional techniques means.Description and embodiments is considered only as exemplary, and the true scope of the disclosure and spirit are by following Claims are pointed out.
It should be appreciated that the disclosure is not limited to precision architecture described above and illustrated in the accompanying drawings, and And various modifications and changes can carried out without departing from the scope.The scope of the present disclosure is only limited by appending claims System.

Claims (11)

1. an interface interchange method, it is characterised in that including:
Obtain and call state at Preset Time inner joint;Described state of calling is qualified call state or allows to call shape State;
When the state of calling of described interface is qualified call state, transmission interface qualified call message, described interface limits to be adjusted Forbid that calling described interface provides service by message for instruction.
Method the most according to claim 1, it is characterised in that described acquisition calls state Preset Time inner joint, Including:
According to message call, described interface call number in described Preset Time is updated to second by the first call number Call number, described second call number is described first call number and preset times sum;Described message call is used for referring to Show that described interface is the most called;
Judge whether described second call number meets pre-conditioned;Described pre-conditioned connect described in described Preset Time The call number of mouth is not less than the first preset value;
When described second call number meet described pre-conditioned time, the state of calling obtaining described interface is qualified call shape State;
When described second call number be unsatisfactory for described pre-conditioned time, obtain the state of calling of described interface for allowing to call shape State.
Method the most according to claim 2, it is characterised in that also include:
When the counting duration of the call number of described interface is more than or equal to described Preset Time, by secondary for calling of described interface Number changes to the second preset value.
Method the most according to claim 1, it is characterised in that described acquisition calls state Preset Time inner joint, Including:
According to message call, by described interface residue call number in described Preset Time by the first residue call number more Being newly the second residue call number, described second residue call number is the difference of the first residue call number and preset times;Institute State message call for indicating described interface the most called;
Judge whether described second residue call number meets pre-conditioned;Described pre-conditioned for institute in described Preset Time The residue call number stating interface is not more than the 3rd preset value;
When described second remain call number meet described pre-conditioned time, the state of calling obtaining described interface is qualified call State;
When described second remain call number be unsatisfactory for described pre-conditioned time, obtain the state of calling of described interface for allowing to adjust Use state.
Method the most according to claim 4, it is characterised in that also include:
When the counting duration of the residue call number of described interface is more than or equal to described Preset Time, remaining described interface Remaining call number is calculated as the 4th preset value.
6. an interface interchange device, it is characterised in that including:
Acquisition module, is configured to obtain and calls state at Preset Time inner joint;Described state of calling is qualified call shape State or allow to call state;
Judge module, is configured to judge whether the state of calling of described interface is qualified call state;
Sending module, is configured as described judge module and judges, when the state of calling of described interface is qualified call state, to send out Send interface qualified call message, for instruction, described interface qualified call message forbids that calling described interface provides service.
Device the most according to claim 6, it is characterised in that described acquisition module, including: first update submodule, the One judges that submodule and first obtains submodule;
First updates submodule, is configured to according to message call, by described interface call number in described Preset Time Being updated to the second call number by the first call number, described second call number is described first call number and preset times Sum;Described message call is used for indicating described interface the most called;
First judges submodule, is configured to judge whether described second call number meets pre-conditioned;Described pre-conditioned Call number for interface described in Preset Time is not less than the first preset value;
Described first obtains submodule, is configured as described first and judges that submodule judges that described second call number meets institute When stating pre-conditioned, the state of calling obtaining described interface is qualified call state;When described first judges that submodule judges institute State the second call number be unsatisfactory for described pre-conditioned time, obtain the state of calling of described interface for allowing to call state.
Device the most according to claim 7, it is characterised in that described device also includes: the first change module, is configured to When the counting duration of the call number of described interface is more than or equal to described Preset Time, by the call number of described interface more Change the second preset value into.
Device the most according to claim 6, it is characterised in that described acquisition module, including: second update submodule, the Two judge that submodule and second obtains submodule;
Second updates submodule, is configured to, according to message call, described interface residue in described Preset Time be called Number of times is updated to the second residue call number by the first residue call number, and described second residue call number is that the first residue is adjusted Difference with number of times Yu preset times;Described message call is used for indicating described interface the most called;
Second judges submodule, is configured to judge whether described second residue call number meets pre-conditioned;Described default Condition is that the residue call number of described interface in Preset Time is not more than the 3rd preset value;
Second obtains submodule, is configured as described second and judges that submodule judges that described second residue call number meets institute When stating pre-conditioned, the state of calling obtaining described interface is qualified call state;When described second judges that submodule judges institute State the second residue call number be unsatisfactory for described pre-conditioned time, obtain the state of calling of described interface for allowing to call state.
Device the most according to claim 9, it is characterised in that described device also includes: the second change module;
Described second change module, is configured as the counting duration of residue call number of described interface more than or equal to described During Preset Time, the residue call number of described interface is calculated as the 4th preset value.
11. 1 kinds of interface interchange devices, it is characterised in that including:
Processor;
For storing the memorizer of processor executable;
Wherein, described processor is configured to:
Obtain and call state at Preset Time inner joint;Described state of calling is qualified call state or allows to call shape State;
When the state of calling of described interface is qualified call state, transmission interface qualified call message, described interface limits to be adjusted Forbid that calling described interface provides service by message for instruction.
CN201610844724.3A 2016-09-22 2016-09-22 Interface calling method and device Active CN106254537B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610844724.3A CN106254537B (en) 2016-09-22 2016-09-22 Interface calling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610844724.3A CN106254537B (en) 2016-09-22 2016-09-22 Interface calling method and device

Publications (2)

Publication Number Publication Date
CN106254537A true CN106254537A (en) 2016-12-21
CN106254537B CN106254537B (en) 2020-02-07

Family

ID=57610917

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610844724.3A Active CN106254537B (en) 2016-09-22 2016-09-22 Interface calling method and device

Country Status (1)

Country Link
CN (1) CN106254537B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107070807A (en) * 2017-04-18 2017-08-18 北京思特奇信息技术股份有限公司 Global traffic control method and system that a kind of distributed environment lower interface is called
CN107908438A (en) * 2017-11-15 2018-04-13 山东浪潮通软信息科技有限公司 A kind of method and device for improving data interaction stability
CN109246070A (en) * 2018-06-28 2019-01-18 中译语通科技股份有限公司 A kind of method that anti-data crawl
CN109309667A (en) * 2018-08-28 2019-02-05 东软集团股份有限公司 The authentication method and device, storage medium and electronic equipment that interface calls
CN111324476A (en) * 2020-02-20 2020-06-23 Oppo广东移动通信有限公司 Interface calling method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425526A (en) * 2012-05-18 2013-12-04 腾讯科技(深圳)有限公司 Control method and device for interface calls
US20140115587A1 (en) * 2011-11-14 2014-04-24 Huawei Technologies Co., Ltd. Exception handling method, apparatus, and client
CN105262821A (en) * 2015-10-29 2016-01-20 努比亚技术有限公司 Interface management apparatus and method
CN105893150A (en) * 2016-03-31 2016-08-24 腾讯科技(深圳)有限公司 Interface calling frequency control and interface calling request processing method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140115587A1 (en) * 2011-11-14 2014-04-24 Huawei Technologies Co., Ltd. Exception handling method, apparatus, and client
CN103425526A (en) * 2012-05-18 2013-12-04 腾讯科技(深圳)有限公司 Control method and device for interface calls
CN105262821A (en) * 2015-10-29 2016-01-20 努比亚技术有限公司 Interface management apparatus and method
CN105893150A (en) * 2016-03-31 2016-08-24 腾讯科技(深圳)有限公司 Interface calling frequency control and interface calling request processing method and device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107070807A (en) * 2017-04-18 2017-08-18 北京思特奇信息技术股份有限公司 Global traffic control method and system that a kind of distributed environment lower interface is called
CN107908438A (en) * 2017-11-15 2018-04-13 山东浪潮通软信息科技有限公司 A kind of method and device for improving data interaction stability
CN109246070A (en) * 2018-06-28 2019-01-18 中译语通科技股份有限公司 A kind of method that anti-data crawl
CN109246070B (en) * 2018-06-28 2021-04-30 中译语通科技股份有限公司 Anti-data crawling method
CN109309667A (en) * 2018-08-28 2019-02-05 东软集团股份有限公司 The authentication method and device, storage medium and electronic equipment that interface calls
CN111324476A (en) * 2020-02-20 2020-06-23 Oppo广东移动通信有限公司 Interface calling method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN106254537B (en) 2020-02-07

Similar Documents

Publication Publication Date Title
CN106254537A (en) Interface interchange method and apparatus
US9432868B2 (en) Methods and apparatus to collect wireless information
CN110187912B (en) Node selection method and device
EP2876865B1 (en) Communication apparatus, communication system, communication method and recording medium
US10499240B2 (en) Location change reporting method, device, and system
US11496913B2 (en) Load migration method, apparatus, and system
CN106817432A (en) The method of virtual resource elastic stretch, system and equipment under cloud computing environment
TWI545980B (en) Internet traffic management system and method
CN111242316A (en) Longitudinal federated learning model training optimization method, device, equipment and medium
CN109379445A (en) A kind of sending method and device of PUSH message
CN106411517A (en) Password resetting method and device
EP2316193A1 (en) Service enablement/disablement based on service relationships
CN105635124B (en) Flow control methods and device
JP2013065207A (en) Portable communication system, portable communication terminal and server
CN108023938B (en) Message sending method and server
CN111400743B (en) Transaction processing method, device, electronic equipment and medium based on blockchain network
CN107766212A (en) Determine the method and device of the installment state of application program
US20130177149A1 (en) Apply time for temporary administrative changes
CN106528192A (en) Service logic updating method and device
KR20100027218A (en) Methods, apparatuses, and computer program products, for automatically finding configuration settings for services
CN111273939B (en) Information processing method, information processing device and terminal equipment
CN113778850A (en) Data processing method and device, electronic equipment and computer readable medium
CN113419865A (en) Cloud resource processing method, related device and computer program product
CN108924668B (en) Picture loading and data providing method and device
CN104808915A (en) Key control method and electronic 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
GR01 Patent grant
GR01 Patent grant