WO2015085813A1 - 一种流量控制方法及系统 - Google Patents

一种流量控制方法及系统 Download PDF

Info

Publication number
WO2015085813A1
WO2015085813A1 PCT/CN2014/087622 CN2014087622W WO2015085813A1 WO 2015085813 A1 WO2015085813 A1 WO 2015085813A1 CN 2014087622 W CN2014087622 W CN 2014087622W WO 2015085813 A1 WO2015085813 A1 WO 2015085813A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
client application
call
internal
calls
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.)
Ceased
Application number
PCT/CN2014/087622
Other languages
English (en)
French (fr)
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 Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Shangke Information Technology 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 Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Shangke Information Technology Co Ltd
Priority to AU2014361532A priority Critical patent/AU2014361532B2/en
Priority to US15/038,144 priority patent/US9940177B2/en
Priority to RU2016125449A priority patent/RU2644522C2/ru
Priority to CA2932745A priority patent/CA2932745C/en
Publication of WO2015085813A1 publication Critical patent/WO2015085813A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/74Admission control; Resource allocation measures in reaction to resource unavailability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/80Actions related to the user profile or the type of traffic
    • H04L47/803Application aware
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/80Actions related to the user profile or the type of traffic
    • H04L47/808User-type aware
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks

Definitions

  • the present invention relates to the field of communication related technologies, and in particular, to a flow control method and system.
  • An open platform for providing a variety of internal applications to the client can use the internal application of the open platform by calling the application interface of the development platform.
  • the same client application makes a large number of calls to the internal application of the development platform, occupies the resources of other client applications calling the internal application of the development platform, resulting in unfair distribution;
  • a flow control method comprising:
  • the gateway receives a call request from the client application to the internal application interface of the open platform
  • the gateway obtains a flow control rule of the client application or the internal application interface
  • the gateway detects whether the client application or the internal application interface satisfies the flow control rule, if the client application or the internal application interface meets the flow control rule Then, the calling request of the client application is allowed, otherwise the calling request of the client application is rejected.
  • a flow control system includes: a gateway, and a gateway disposed at:
  • Calling a request receiving module configured to receive a call request from a client application to an internal application interface of the open platform
  • the flow control rule obtaining module is configured to obtain a flow control rule of the client application or the internal application interface
  • a traffic detection module configured to detect whether the client application or the internal application interface meets the flow control rule, and if the client application or the internal application interface meets the flow control rule, permitting the calling request of the client application Otherwise, the call request of the client application is rejected.
  • the invention establishes a flow control rule by using a client application or an internal application interface of an open platform, and allows the client application to invoke the internal application interface only under the condition that the flow control rule is met.
  • the client application is controlled to call the internal application interface, thereby avoiding the same client application over calling the internal application through the internal application interface, and avoiding the same internal application being over-invoked. Therefore, system resource consumption is reduced and system stability is improved.
  • FIG. 1 is a flow chart showing the operation of a flow control method according to the present invention
  • FIG. 2 is a structural block diagram of a flow control system according to the present invention.
  • FIG. 3 is a schematic structural view of an example of a flow control system according to the present invention.
  • FIG. 1 is a flowchart of a flow control method according to the present invention, including:
  • Step S101 the gateway receives the internal application of the client application to the open platform. Call request of the mouth;
  • Step S102 The gateway acquires a flow control rule of the client application or the internal application interface.
  • Step S103 The gateway detects whether the client application or the internal application interface satisfies the flow control rule, and if the client application or the internal application interface satisfies the flow control rule, allowing the call request of the client application, otherwise The call request of the client application is rejected.
  • the gateway is the interface that communicates with the client, and all client requests are forwarded by the gateway.
  • the gateway performs step S102 to obtain a corresponding flow control rule, where the flow control rule of the client application, or the flow control rule of the internal application interface, or the traffic of the client application is selected.
  • the flow control rules of the control rules and internal application interfaces are determined by the gateway according to the configuration file.
  • the gateway obtains the flow control rule of the client application or the internal application interface, including one of the following three situations:
  • the flow control rule is:
  • the flow control rule is satisfied if the number of calls of the client application does not exceed the application call upper threshold corresponding to the client application in the preset application call metering period, otherwise the flow control rule is not satisfied. ,or;
  • the preset client application calls the internal application interface metering time period
  • the number of times the client application calls the internal application interface does not exceed the joint call upper threshold corresponding to the client application and the internal application interface, then the Flow control rules, otherwise the flow control rules are not met.
  • This embodiment includes three flow control rules, and the gateway may select one or more combinations according to a configuration file for different client applications and different internal application interfaces.
  • the flow control rule is satisfied if the number of calls of the client application does not exceed the application call upper threshold corresponding to the client application in the preset application call metering period, otherwise the flow control rule is not satisfied. .
  • the flow control rule is satisfied, otherwise the flow control rule is not satisfied.
  • the flow control rule can also be selected as a combination of the above two flow control rules, that is, the flow restriction on the call of the client application, and the call of the application interface is also restricted.
  • the flow control rule is:
  • the preset client application calls the internal application interface metering time period, the number of times the client application calls the internal application interface does not exceed the joint call upper threshold corresponding to the client application and the internal application interface, then the Flow control rules, Otherwise the flow control rules are not met.
  • the measurement time period of the application call, the measurement time period of the application interface being invoked, and the measurement time period of the internal application interface of the client application may be the same or different, and the size of the time period is selected according to actual needs, for example, one day may be selected. You can also choose to be one hour or one minute.
  • the method further includes:
  • the analysis control system that communicates with the gateway obtains the number of calls of the client application by calling the access log of the gateway. If the preset application calls the measurement time period, the number of calls of the client application is detected to exceed the number of calls with the client.
  • the application corresponding to the end application invokes the warning threshold, obtains the contact email address of the client application, and sends a reminder email to the contact email address, where the application call warning threshold is less than or equal to the application call limit. Threshold, or;
  • the analysis control system that communicates with the gateway obtains the number of times the client application calls the internal application interface by calling the access log of the gateway, and detects the client if the preset client application calls the internal application interface measurement time period.
  • the application calls the internal application interface more than the joint call warning threshold corresponding to the client application and the internal application interface, obtains the contact email address of the client application, and sends a reminder email to the contact email address.
  • the joint call warning threshold is less than or equal to the joint call upper threshold.
  • the reminder email is sent to the contact of the client application, if the contact feels it is necessary to raise the threshold. , you can send a confirmation request to the gateway to raise the threshold.
  • the threshold can be raised for client applications that need to raise the threshold.
  • the method further includes:
  • the analysis control system that communicates with the gateway obtains the call to the access log of the gateway.
  • the number of calls to the client application that counts the estimated number of calls to the client application during the future growth evaluation period, if the estimated number of calls exceeds the application call upper threshold associated with the client application, Saving the application call upper threshold is a historical application call upper threshold, using the client application's program identifier as the application identifier to be updated, and using the estimated call count as the upper limit threshold of the application to be updated, and sending Updating the application call upper threshold and the corresponding update application call upper threshold request for the application identifier to be updated, and after the growth evaluation period period, if the determined promotion application associated with the client application is not received
  • the upper limit threshold request is invoked, and the historical application call upper limit threshold is used as the application call upper limit threshold to be updated, and the update application call upper limit threshold request is sent;
  • the gateway receives an update application call upper threshold request sent by the analysis control system, and updates an application call upper threshold value associated with the application identifier to be updated to the application upper limit threshold to be updated;
  • the gateway Upon receiving the request to determine the elevated application call upper threshold, the gateway forwards to the analysis control system.
  • the analysis control system that communicates with the gateway obtains the number of calls of the client application by calling the access log of the gateway, and calculates the estimated number of calls of the client application in the future growth evaluation period, when the estimated call is found. If the number of times exceeds the application call upper threshold, an update application call upper threshold request is sent to the gateway to temporarily raise the application call upper threshold to avoid the client application becoming unusable because the upper limit is reached.
  • the upper limit is not unlimited. It requires the client application to send a request to determine the elevated application call upper threshold for a period of time. Otherwise, the application call upper threshold will be re-adjusted to the original reserved threshold, thus applying to the client. The calling of the program is restricted.
  • the method further includes:
  • the analysis control system that communicates with the gateway obtains the number of times the client application calls the internal application interface by calling the access log of the gateway, and calculates the evaluation period in the future growth period.
  • the estimated number of times the client application calls the internal application interface during the time period. If the estimated number exceeds the preset joint call upper threshold associated with the client application, saving the joint call upper threshold is a historical joint call.
  • the upper threshold, the application identifier of the client application is used as the identifier of the application to be updated, and the estimated number of times is used as the upper limit threshold for the joint call to be updated, and the update includes the upper limit threshold of the joint call to be updated and the corresponding update of the application identifier to be updated.
  • the upper limit threshold request is jointly invoked, and after the period of the growth evaluation period, if the determined promotion joint call upper threshold request associated with the client application is not received, the historical joint call upper threshold is used as the joint call to be updated.
  • An upper threshold sending the update joint call upper threshold request;
  • the gateway receives the update joint call upper threshold request sent by the analysis control system, and updates the joint call upper threshold value associated with the application identifier to be updated to the joint call upper limit threshold to be updated;
  • the gateway Upon receiving the request to determine the elevated application call upper threshold, the gateway forwards to the analysis control system.
  • the gateway When the gateway detects whether the client application or the internal application interface satisfies the flow control rule, it obtains from the cluster counter:
  • the number of calls of the client application, the number of times the internal application interface is called, and the number of times the client application calls the internal application interface are saved by the cluster counter. Off the workload.
  • the method further includes:
  • the gateway allocates at least one thread to the application interface in advance, and sets it as an idle thread
  • one of the idle threads of the internal application interface is selected as the current thread, and the client application invokes the internal application interface by using the current thread, and sets the current thread to work. Thread, when the client application ends calling the internal application interface, setting the current thread as an idle thread;
  • the call request of the client application is suspended until the internal application interface has at least one idle thread.
  • FIG. 2 is a structural block diagram of a flow control system according to the present invention, including: a gateway 21, and a gateway 21 disposed at:
  • the call request receiving module 2101 is configured to receive a call request of the client application to the internal application interface of the open platform;
  • the flow control rule obtaining module 2102 is configured to obtain a flow control rule of the client application or the internal application interface;
  • the traffic detection module 2103 is configured to detect whether the client application or the internal application interface satisfies the flow control rule, and if the client application or the internal application interface meets the flow control rule, permit the calling of the client application. Request, otherwise reject the call request from the client application.
  • the flow control rule is:
  • the calling time of the client application during the preset application call metering time period If the number does not exceed the application call upper threshold corresponding to the client application, the flow control rule is satisfied, otherwise the flow control rule is not satisfied, or
  • the preset client application calls the internal application interface metering time period
  • the number of times the client application calls the internal application interface does not exceed the joint call upper threshold corresponding to the client application and the internal application interface, then the Flow control rules, otherwise the flow control rules are not met.
  • an analysis control system 22 in communication with the gateway 21 is also included, and:
  • the traffic warning module 221 is disposed in the analysis control system 22, and is configured to acquire the number of calls of the client application by calling the access log of the gateway, if the client application is in the measurement time period of the preset application call If the number of calls exceeds the application call warning threshold corresponding to the client application, the contact email address of the client application is obtained, and a reminder email is sent to the contact email address, and the application call warning threshold is less than or equal to The application calls the upper threshold, or;
  • the number of times the client application calls the internal application interface is obtained by calling the access log of the gateway. If the preset client application calls the internal application interface measurement time period, the number of times the client application calls the internal application interface exceeds And a joint call warning threshold corresponding to the client application and the internal application interface, obtaining a contact email address of the client application, and sending a reminder email to the contact email address, where the joint call warning threshold is less than or equal to The joint call upper threshold is described.
  • an analysis control system 22 in communication with the gateway 21 is also included, and:
  • the update application call upper threshold request sending module 222 which is set in the analysis control system 22, is configured to acquire the number of calls of the client application by calling the access log of the gateway, and calculate the client in the future growth evaluation period period. App's estimated tune The number of times, if the estimated number of calls exceeds the application call upper threshold associated with the client application, saving the application call upper threshold is a historical application call upper threshold, and the client application's program identifier is used as An application identifier to be updated, the estimated number of calls is used as an upper limit threshold for an application to be updated, and an update application call upper threshold request including an application upper limit threshold to be updated and a corresponding application identifier to be updated is sent. After the growth evaluation period period, if the determined promotion application call upper threshold request associated with the client application is not received, the historical application call upper threshold is used as the application call upper threshold to be updated, and the update is sent. The application calls the upper threshold request.
  • An update application call upper limit threshold request receiving module 2104 disposed at the gateway 21, configured to receive an update application call upper limit threshold request sent by the analysis control system, and update an application call upper limit threshold associated with the application identifier to be updated to the The upper limit threshold for the application to be updated;
  • the determination promotion application call upper limit threshold request receiving module 2105 disposed at the gateway 21 is configured to forward the request to determine the promotion promotion application call upper limit threshold value to the analysis control system.
  • an analysis control system 22 in communication with the gateway 21 is also included, and:
  • the update joint call upper limit threshold request sending module 223 is configured to obtain the number of times the client application calls the internal application interface by calling the access log of the gateway, and calculating the time period of the future growth evaluation period.
  • the estimated number of times the client application calls the internal application interface, and if the estimated number exceeds a preset joint call upper threshold associated with the client application, saving the joint call upper threshold is a historical joint call upper threshold.
  • the program identifier of the client application is used as the identifier of the application to be updated, and the estimated number of times is used as the upper limit threshold of the joint call to be updated, and the joint call upper limit including the joint call upper limit threshold to be updated and the corresponding application identifier to be updated is sent.
  • a threshold request after the period of the growth evaluation period, if a determination to raise a joint call upper threshold request associated with the client application is not received, then And sending, by using the historical joint call upper threshold, as a joint call upper threshold to be updated, sending the update joint call upper threshold request;
  • the update joint call upper limit threshold request receiving module 2106 is configured to receive an update joint call upper limit threshold request sent by the analysis control system, and update the joint call upper limit threshold associated with the application identifier to be updated to the federation to be updated. Call the upper threshold;
  • the determination promotion application call upper limit threshold request receiving module 2107 disposed at the gateway 21 is configured to forward the request to determine the promotion application call upper limit threshold value to the analysis control system.
  • the method further includes:
  • the call number sending module 2108 is configured to increase the number of calls of the client application, increase the number of times the internal application interface is called, and increase the call of the client application when the call request of the client application is allowed.
  • the number of internal application interfaces is sent to the cluster counter 23 communicating with the gateway;
  • the traffic detection module 2103 disposed at the gateway 21 obtains from the cluster counter 23 when detecting whether the client application or the internal application interface satisfies the flow control rule:
  • the method further includes:
  • a thread allocation module 2109 disposed at the gateway 21, configured to allocate at least one thread to the application interface in advance, and set as an idle thread;
  • the thread detecting module 2110 disposed at the gateway 21 is configured to detect whether the internal application interface has an idle thread if the calling request of the client application is allowed:
  • the interface from the internal application is empty Selecting one of the idle threads as the current thread, the client application calls the internal application interface by using the current thread, and sets the current thread as a worker thread, and when the client application ends calling the internal application interface, Set the current thread to an idle thread;
  • the call request of the client application is suspended until the internal application interface has at least one idle thread.
  • FIG. 3 is a schematic structural diagram of an example of a flow control system according to the present invention.
  • the system includes a gateway 31, a distributed centralized counter 32, a log analysis system 33, and a service control system 34.
  • the gateway 31 is provided with a flow control dimension pool 311, which specifically calls the internal application interface to limit the traffic of the client application, and the distributed centralized counter 32 is used to save the number of calls of the client application and the internal application interface. The number of calls, and the number of times the client application called the internal application interface.
  • the log analysis system 33 and the service control system 34 jointly form the above-mentioned analysis control system, and the log analysis system 33 obtains the log from the gateway 31 for analysis, and calculates the client application in the preset application call measurement time period. Whether the number of calls exceeds the application call warning threshold corresponding to the client application, or whether the number of times the client application calls the internal application interface exceeds the client time within the preset client application call internal application interface metering time period. The joint call warning threshold corresponding to the application and the internal application interface, if not, informs the service control system 34 to send a reminder email.
  • the application invokes the metering time period and the client application calls the internal application interface to measure the time period to one day.
  • the log analysis system 33 obtains the number of calls of the client application, calculates the estimated number of calls of the client application in the future growth evaluation period, and obtains the number of times the client application calls the internal application interface, and calculates The estimated number of times the client application calls the internal application interface during the future growth evaluation period, and is determined by the business.
  • the control system 34 determines whether to send an update application call upper threshold request and an update joint call upper threshold request to the gateway 31 based on the calculation result of the log analysis system 33.
  • the growth evaluation period period is preferably 3 days.
  • the application call warning threshold corresponding to the client application or the number of times the client application calls the internal application interface exceeds the joint call corresponding to the client application and the internal application interface.
  • the threshold is warned, an alert message is sent, and the estimated number of calls to the client application during the future growth evaluation period and the client application calling the internal application interface during the future growth evaluation period are calculated.
  • Estimate the number of times appropriately increase the application call upper threshold and the joint call upper threshold, temporarily allow the client application to use the upper limit to avoid affecting the user experience.
  • the application call upper threshold and the joint call upper threshold are lowered to the original values, and the client application calls the application interface to be restricted. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephonic Communication Services (AREA)
  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Stored Programmes (AREA)

Abstract

本发明公开一种流量控制方法及系统,流量控制方法包括:网关接收到客户端应用程序对开放平台的内部应用接口的调用请求;网关获取客户端应用程序或者内部应用接口的流量控制规则;网关检测客户端应用程序或者内部应用接口是否满足所述流量控制规则,如果客户端应用程序或者内部应用接口满足所述流量控制规则,则允许客户端应用程序的所述调用请求,否则拒绝客户端应用程序的所述调用请求。本发明避免同一客户端应用程序过度通过内部应用接口调用内部应用程序,也避免了同一内部应用程序被过度调用。因此减少了系统资源消耗,提高系统稳定性。

Description

一种流量控制方法及系统 技术领域
本发明涉及通信相关技术领域,特别是一种流量控制方法及系统。
背景技术
开放平台,用于为客户端提供多种内部应用程序,客户端应用程序通过调用开发平台的应用接口,则能使用开放平台的内部应用程序。
然而,当大量的客户端应用程序对开放平台的内部应用程序进行调用时,有可能出现如下问题:
1.同一客户端应用程序对开发平台的内部应用程序进行大量调用,占用了其他客户端应用程序调用开发平台的内部应用程序的资源,造成分配不公;
2.同一内部应用程序被大量调用,某些内部应用程序是极为消耗系统资源的,如果被过分大量的调用,则容易导致系统出现故障,甚至出现崩溃。
发明内容
基于此,有必要针对现有技术的开发平台未能对客户端应用程序调用内部应用程序进行有效的流量控制,提供一种流量控制方法及系统。
一种流量控制方法,包括:
网关接收到客户端应用程序对开放平台的内部应用接口的调用请求;
网关获取客户端应用程序或者内部应用接口的流量控制规则;
网关检测客户端应用程序或者内部应用接口是否满足所述流量控制规则,如果客户端应用程序或者内部应用接口满足所述流量控制规 则,则允许客户端应用程序的所述调用请求,否则拒绝客户端应用程序的所述调用请求。
一种流量控制系统,包括:网关,以及设置在网关的:
调用请求接收模块,用于接收到客户端应用程序对开放平台的内部应用接口的调用请求;
流量控制规则获取模块,用于获取客户端应用程序或者内部应用接口的流量控制规则;
流量检测模块,用于检测客户端应用程序或者内部应用接口是否满足所述流量控制规则,如果客户端应用程序或者内部应用接口满足所述流量控制规则,则允许客户端应用程序的所述调用请求,否则拒绝客户端应用程序的所述调用请求。
本发明通过对客户端应用程序或者开放平台的内部应用接口建立流量控制规则,仅在满足流量控制规则的条件下允许客户端应用程序调用内部应用接口。通过设定适当的流量控制规则,控制客户端应用程序调用内部应用接口,从而避免同一客户端应用程序过度通过内部应用接口调用内部应用程序,也避免了同一内部应用程序被过度调用。因此减少了系统资源消耗,提高系统稳定性。
附图说明
图1为本发明一种流量控制方法的工作流程图;
图2为本发明一种流量控制系统的结构模块图;
图3为本发明一种流量控制系统一个例子的结构示意图。
具体实施方式
下面结合附图和具体实施例对本发明做进一步详细的说明。
如图1所示为本发明一种流量控制方法的工作流程图,包括:
步骤S101,网关接收到客户端应用程序对开放平台的内部应用接 口的调用请求;
步骤S102,网关获取客户端应用程序或者内部应用接口的流量控制规则;
步骤S103,网关检测客户端应用程序或者内部应用接口是否满足所述流量控制规则,如果客户端应用程序或者内部应用接口满足所述流量控制规则,则允许客户端应用程序的所述调用请求,否则拒绝客户端应用程序的所述调用请求。
网关是与客户端通信的接口,所有客户端的请求都经网关转发。当客户端应用程序需要调用应用接口时,网关执行步骤S102获取对应的流量控制规则,其中,选择客户端应用程序的流量控制规则,或者内部应用接口的流量控制规则,或者客户端应用程序的流量控制规则和内部应用接口的流量控制规则,由网关根据配置文件决定。步骤S102中,网关获取客户端应用程序或者内部应用接口的流量控制规则,包括如下三种情况之一:
情况一,获取客户端应用程序的流量控制规则;
情况二,获取内部应用接口的流量控制规则;
情况三,获取客户端应用程序和内部应用接口的流量控制规则。
在其中一个实施例中,所述流量控制规则为:
在预设的应用程序调用计量时间段内,客户端应用程序的调用次数未超过与客户端应用程序对应的应用程序调用上限阈值,则满足所述流量控制规则,否则不满足所述流量控制规则,或者;
在预设的应用接口被调用计量时间段内,内部应用接口的被调用次数超过与内部应用接口对应的应用接口阈值,则满足所述流量控制规则,否则不满足所述流量控制规则,或者;
在预设的客户端应用程序调用内部应用接口计量时间段内,客户端应用程序调用内部应用接口的次数未超过与客户端应用程序和内部应用接口共同对应的联合调用上限阈值,则满足所述流量控制规则,否则不满足所述流量控制规则。
本实施例包括三种流量控制规则,网关可以根据配置文件,针对不同的客户端应用程序以及不同的内部应用接口,选择其中一个或者多个组合。
例如,对于客户端应用程序A调用应用接口B,可以选择流量控制规则为:
在预设的应用程序调用计量时间段内,客户端应用程序的调用次数未超过与客户端应用程序对应的应用程序调用上限阈值,则满足所述流量控制规则,否则不满足所述流量控制规则。
此时,仅对客户端应用程序的调用进行限制,而不限制应用接口。
或者,也可以选择流量控制规则为:
在预设的应用接口被调用计量时间段内,内部应用接口的被调用次数超过与内部应用接口对应的应用接口阈值,则满足所述流量控制规则,否则不满足所述流量控制规则。
则此时,仅对应用接口的被调用进行限制,而不对客户端应用程序进行限制。
然而,还可以选择流量控制规则为上述两种流量控制规则的组合,即对客户端应用程序的调用进行流量限制,也对应用接口的被调用进行限制。
同时,还可以精细到对特定客户端应用程序调用特定应用接口进行限制,即流量控制规则为:
在预设的客户端应用程序调用内部应用接口计量时间段内,客户端应用程序调用内部应用接口的次数未超过与客户端应用程序和内部应用接口共同对应的联合调用上限阈值,则满足所述流量控制规则, 否则不满足所述流量控制规则。
其中,应用程序调用计量时间段、应用接口被调用计量时间段、客户端应用程序调用内部应用接口计量时间段可以相同也可以不同,其时间段的大小根据实际需要选择,例如可以选择为一天,也可以选择为一小时或者一分钟。
在其中一个实施例中,还包括:
与网关通信的分析控制系统通过对网关的访问日志的调用,获取客户端应用程序的调用次数,如果在预设的应用程序调用计量时间段内,检测到客户端应用程序的调用次数超过与客户端应用程序对应的应用程序调用警告阈值,则获取客户端应用程序的联系人邮件地址,向所述联系人邮件地址发送提醒邮件,所述应用程序调用警告阈值小于或等于所述应用程序调用上限阈值,或者;
与网关通信的分析控制系统通过对网关的访问日志的调用,获取客户端应用程序调用内部应用接口的次数,如果在预设的客户端应用程序调用内部应用接口计量时间段内,检测到客户端应用程序调用内部应用接口的次数超过与客户端应用程序和内部应用接口共同对应的联合调用警告阈值,则获取客户端应用程序的联系人邮件地址,向所述联系人邮件地址发送提醒邮件,所述联合调用警告阈值小于或等于所述联合调用上限阈值。
本实施例,在客户端应用程序的调用次数或者客户端应用程序调用内部应用接口的次数超过警告阈值时,向该客户端应用程序的联系人发送提醒邮件,如果该联系人觉得有必要提升阈值,则可以向网关发送确认请求,从而提升阈值。通过该实施例的方式,可以为有需要提升阈值的客户端应用程序提升阈值。
在其中有一个实施例中,还包括:
与网关通信的分析控制系统通过对网关的访问日志的调用,获取 客户端应用程序的调用次数,计算在未来的增长评估期时间段内客户端应用程序的预估调用次数,如果所述预估调用次数超过与客户端应用程序关联的应用程序调用上限阈值,则保存所述应用程序调用上限阈值为历史应用程序调用上限阈值,将客户端应用程序的程序标识作为待更新应用程序标识,将所述预估调用次数作为待更新应用程序调用上限阈值,发送包括待更新应用程序调用上限阈值和对应的待更新应用程序标识的更新应用程序调用上限阈值请求,且在经过所述增长评估期时间段后,如果没有接收到与客户端应用程序关联的确定提升应用程序调用上限阈值请求,则将历史应用程序调用上限阈值作为待更新应用程序调用上限阈值,发送所述更新应用程序调用上限阈值请求;
网关接收到分析控制系统发送的更新应用程序调用上限阈值请求,将与待更新应用程序标识关联的应用程序调用上限阈值更新为所述待更新应用程序调用上限阈值;
网关接收到确定提升应用程序调用上限阈值请求,则转发到分析控制系统。
与网关通信的分析控制系统通过对网关的访问日志的调用,获取客户端应用程序的调用次数,计算在未来的增长评估期时间段内客户端应用程序的预估调用次数,当发现预估调用次数将会超过应用程序调用上限阈值,则向网关发送更新应用程序调用上限阈值请求,暂时提升应用程序调用上限阈值,从而避免因为达到上限而客户端应用程序无法使用。然而,上限上调并不是无限制的,需要客户端应用程序在一段时间内发送确定提升应用程序调用上限阈值请求,否则将会重新调整应用程序调用上限阈值为原来保留的阈值,从而对客户端应用程序的调用进行限制。
在其中一个实施例中,还包括:
与网关通信的分析控制系统通过对网关的访问日志的调用,获取客户端应用程序调用内部应用接口的次数,计算在未来的增长评估期 时间段内客户端应用程序调用内部应用接口的预估次数,如果所述预估次数超过预设的与客户端应用程序关联的联合调用上限阈值,则保存所述联合调用上限阈值为历史联合调用上限阈值,将客户端应用程序的程序标识作为待更新应用程序标识,将所述预估次数作为待更新联合调用上限阈值,发送包括待更新联合调用上限阈值和对应的待更新应用程序标识的更新联合调用上限阈值请求,在经过所述增长评估期时间段后,如果没有接收到与客户端应用程序关联的确定提升联合调用上限阈值请求,则将所述历史联合调用上限阈值作为待更新联合调用上限阈值,发送所述更新联合调用上限阈值请求;
网关接收到分析控制系统发送的更新联合调用上限阈值请求,将与待更新应用程序标识关联的联合调用上限阈值更新为所述待更新联合调用上限阈值;
网关接收到确定提升应用程序调用上限阈值请求,则转发到分析控制系统。
在其中一个实施例中:
当网关允许客户端应用程序的所述调用请求,则增加客户端应用程序的调用次数、增加内部应用接口的被调用次数,增加客户端应用程序调用内部应用接口的次数并发送到与网关通信的集群计数器;
当网关检测客户端应用程序或者内部应用接口是否满足所述流量控制规则时,从集群计数器中获取:
在预设的应用程序调用计量时间段内,客户端应用程序的调用次数,或者;
在预设的应用接口被调用计量时间段内,内部应用接口的被调用次数,或者;
在预设的客户端应用程序调用内部应用接口计量时间段内,客户端应用程序调用内部应用接口的次数。
客户端应用程序的调用次数、内部应用接口的被调用次数和客户端应用程序调用内部应用接口的次数均采用集群计数器保存,减少网 关的工作量。
在其中一个实施例中,还包括:
网关预先为应用接口分配至少一个线程,并设置为空闲线程;
如果网关允许客户端应用程序的所述调用请求,则检测内部应用接口是否有空闲线程:
如果内部应用接口有至少一个空闲线程,则从内部应用接口的空闲线程中选择一个作为当前线程,所述客户端应用程序采用所述当前线程调用所述内部应用接口,并将当前线程设置为工作线程,当所述客户端应用程序结束调用内部应用接口,则将当前线程设置为空闲线程;
如果内部应用接口没有空闲线程,则暂停客户端应用程序的所述调用请求直到内部应用接口有至少一个空闲线程。
通过线程对内部应用接口的限制,从而避免对同一个内部应用接口大量的并发调用。
如图2所示为本发明一种流量控制系统的结构模块图,包括:网关21,以及设置在网关21的:
调用请求接收模块2101,用于接收到客户端应用程序对开放平台的内部应用接口的调用请求;
流量控制规则获取模块2102,用于获取客户端应用程序或者内部应用接口的流量控制规则;
流量检测模块2103,用于检测客户端应用程序或者内部应用接口是否满足所述流量控制规则,如果客户端应用程序或者内部应用接口满足所述流量控制规则,则允许客户端应用程序的所述调用请求,否则拒绝客户端应用程序的所述调用请求。
在其中一个实施例中,所述流量控制规则为:
在预设的应用程序调用计量时间段内,客户端应用程序的调用次 数未超过与客户端应用程序对应的应用程序调用上限阈值,则满足所述流量控制规则,否则不满足所述流量控制规则,或者;
在预设的应用接口被调用计量时间段内,内部应用接口的被调用次数超过与内部应用接口对应的应用接口阈值,则满足所述流量控制规则,否则不满足所述流量控制规则,或者;
在预设的客户端应用程序调用内部应用接口计量时间段内,客户端应用程序调用内部应用接口的次数未超过与客户端应用程序和内部应用接口共同对应的联合调用上限阈值,则满足所述流量控制规则,否则不满足所述流量控制规则。
在其中一个实施例中,还包括与网关21通信的分析控制系统22,以及:
设置在分析控制系统22的流量警告模块221,用于通过对网关的访问日志的调用,获取客户端应用程序的调用次数,如果在预设的应用程序调用计量时间段内,客户端应用程序的调用次数超过与客户端应用程序对应的应用程序调用警告阈值,则获取客户端应用程序的联系人邮件地址,向所述联系人邮件地址发送提醒邮件,所述应用程序调用警告阈值小于或等于所述应用程序调用上限阈值,或者;
通过对网关的访问日志的调用,获取客户端应用程序调用内部应用接口的次数,如果在预设的客户端应用程序调用内部应用接口计量时间段内,客户端应用程序调用内部应用接口的次数超过与客户端应用程序和内部应用接口共同对应的联合调用警告阈值,则获取客户端应用程序的联系人邮件地址,向所述联系人邮件地址发送提醒邮件,所述联合调用警告阈值小于或等于所述联合调用上限阈值。
在其中一个实施例中,还包括与网关21通信的分析控制系统22,以及:
设置在分析控制系统22的更新应用程序调用上限阈值请求发送模块222,用于通过对网关的访问日志的调用,获取客户端应用程序的调用次数,计算在未来的增长评估期时间段内客户端应用程序的预估调 用次数,如果所述预估调用次数超过与客户端应用程序关联的应用程序调用上限阈值,则保存所述应用程序调用上限阈值为历史应用程序调用上限阈值,将客户端应用程序的程序标识作为待更新应用程序标识,将所述预估调用次数作为待更新应用程序调用上限阈值,发送包括待更新应用程序调用上限阈值和对应的待更新应用程序标识的更新应用程序调用上限阈值请求,在经过所述增长评估期时间段后,如果没有接收到与客户端应用程序关联的确定提升应用程序调用上限阈值请求,则将历史应用程序调用上限阈值作为待更新应用程序调用上限阈值,发送所述更新应用程序调用上限阈值请求。
设置在网关21的更新应用程序调用上限阈值请求接收模块2104,用于接收分析控制系统发送的更新应用程序调用上限阈值请求,将与待更新应用程序标识关联的应用程序调用上限阈值更新为所述待更新应用程序调用上限阈值;
设置在网关21的确定提升应用程序调用上限阈值请求接收模块2105,用于将接收到确定提升应用程序调用上限阈值请求,转发到分析控制系统。
在其中一个实施例中,还包括与网关21通信的分析控制系统22,以及:
设置在分析控制系统22的更新联合调用上限阈值请求发送模块223,用于通过对网关的访问日志的调用,获取客户端应用程序调用内部应用接口的次数,计算在未来的增长评估期时间段内客户端应用程序调用内部应用接口的预估次数,如果所述预估次数超过预设的与客户端应用程序关联的联合调用上限阈值,则保存所述联合调用上限阈值为历史联合调用上限阈值,将客户端应用程序的程序标识作为待更新应用程序标识,将所述预估次数作为待更新联合调用上限阈值,发送包括待更新联合调用上限阈值和对应的待更新应用程序标识的更新联合调用上限阈值请求,在经过所述增长评估期时间段后,如果没有接收到与客户端应用程序关联的确定提升联合调用上限阈值请求,则 将所述历史联合调用上限阈值作为待更新联合调用上限阈值,发送所述更新联合调用上限阈值请求;
设置在网关21的更新联合调用上限阈值请求接收模块2106,用于接收分析控制系统发送的更新联合调用上限阈值请求,将与待更新应用程序标识关联的联合调用上限阈值更新为所述待更新联合调用上限阈值;
设置在网关21的确定提升应用程序调用上限阈值请求接收模块2107,用于将接收到确定提升应用程序调用上限阈值请求,转发到分析控制系统。
在其中一个实施例中,还包括:
设置在网关21的调用次数发送模块2108,用于当允许客户端应用程序的所述调用请求,则增加客户端应用程序的调用次数、增加内部应用接口的被调用次数,增加客户端应用程序调用内部应用接口的次数并发送到与网关通信的集群计数器23;
设置在网关21的流量检测模块2103,当检测客户端应用程序或者内部应用接口是否满足所述流量控制规则时,从集群计数器23中获取:
在预设的应用程序调用计量时间段内,客户端应用程序的调用次数,或者;
在预设的应用接口被调用计量时间段内,内部应用接口的被调用次数,或者;
在预设的客户端应用程序调用内部应用接口计量时间段内,客户端应用程序调用内部应用接口的次数。
在其中一个实施例中,还包括:
设置在网关21的线程分配模块2109,用于预先为应用接口分配至少一个线程,并设置为空闲线程;
设置在网关21的线程检测模块2110,用于如果允许客户端应用程序的所述调用请求,则检测内部应用接口是否有空闲线程:
如果内部应用接口有至少一个空闲线程,则从内部应用接口的空 闲线程中选择一个作为当前线程,所述客户端应用程序采用所述当前线程调用所述内部应用接口,并将当前线程设置为工作线程,当所述客户端应用程序结束调用内部应用接口,则将当前线程设置为空闲线程;
如果内部应用接口没有空闲线程,则暂停客户端应用程序的所述调用请求直到内部应用接口有至少一个空闲线程。
如图3所示为本发明一种流量控制系统一个例子的结构示意图。包括:网关31、分布式集中计数器32、日志分析系统33,业务控制系统34。
其中,网关31中设置有流控维度池311,专门对客户端应用程序调用内部应用接口进行流量限制,而分布式集中计数器32则用于保存客户端应用程序的调用次数、内部应用接口的被调用次数,以及客户端应用程序调用内部应用接口的次数。
其中,日志分析系统33,业务控制系统34共同组成上述的分析控制系统,日志分析系统33从网关31中获取日志进行分析,计算在预设的应用程序调用计量时间段内,客户端应用程序的调用次数是否超过与客户端应用程序对应的应用程序调用警告阈值,或者在预设的客户端应用程序调用内部应用接口计量时间段内,客户端应用程序调用内部应用接口的次数是否超过与客户端应用程序和内部应用接口共同对应的联合调用警告阈值,如果超过则通知业务控制系统34发送提醒邮件。其中,应用程序调用计量时间段和客户端应用程序调用内部应用接口计量时间段为1天。
同时,日志分析系统33获取客户端应用程序的调用次数,计算在未来的增长评估期时间段内客户端应用程序的预估调用次数,以及获取客户端应用程序调用内部应用接口的次数,计算在未来的增长评估期时间段内客户端应用程序调用内部应用接口的预估次数,并由业务 控制系统34根据日志分析系统33的计算结果,决定是否向网关31发送更新应用程序调用上限阈值请求和更新联合调用上限阈值请求。增长评估期时间段优选为3天。
因此,当客户端应用程序的调用次数超过与客户端应用程序对应的应用程序调用警告阈值,或者客户端应用程序调用内部应用接口的次数超过与客户端应用程序和内部应用接口共同对应的联合调用警告阈值时,则会发送提醒邮件,同时,计算在未来的增长评估期时间段内客户端应用程序的预估调用次数和在未来的增长评估期时间段内客户端应用程序调用内部应用接口的预估次数,适当提高应用程序调用上限阈值和联合调用上限阈值,暂时允许客户端应用程序超上限使用,避免影响用户体验。而经过增长评估期时间段,即3天后,如果客户端应用程序并未确认提高上限,则将应用程序调用上限阈值和联合调用上限阈值下调至原来数值,对客户端应用程序调用应用接口进行限制。
以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。

Claims (14)

  1. 一种流量控制方法,其特征在于,包括:
    网关接收到客户端应用程序对开放平台的内部应用接口的调用请求;
    网关获取客户端应用程序或者内部应用接口的流量控制规则;
    网关检测客户端应用程序或者内部应用接口是否满足所述流量控制规则,如果客户端应用程序或者内部应用接口满足所述流量控制规则,则允许客户端应用程序的所述调用请求,否则拒绝客户端应用程序的所述调用请求。
  2. 根据权利要求1所述的流量控制方法,其特征在于,所述流量控制规则为:
    在预设的应用程序调用计量时间段内,客户端应用程序的调用次数未超过与客户端应用程序对应的应用程序调用上限阈值,则满足所述流量控制规则,否则不满足所述流量控制规则,或者;
    在预设的应用接口被调用计量时间段内,内部应用接口的被调用次数超过与内部应用接口对应的应用接口阈值,则满足所述流量控制规则,否则不满足所述流量控制规则,或者;
    在预设的客户端应用程序调用内部应用接口计量时间段内,客户端应用程序调用内部应用接口的次数未超过与客户端应用程序和内部应用接口共同对应的联合调用上限阈值,则满足所述流量控制规则,否则不满足所述流量控制规则。
  3. 根据权利要求2所述的流量控制方法,其特征在于,还包括:
    与网关通信的分析控制系统通过对网关的访问日志的调用,获取客户端应用程序的调用次数,如果在预设的应用程序调用计量时间段内,检测到客户端应用程序的调用次数超过与客户端应用程序对应的应用程序调用警告阈值,则获取客户端应用程序的联系人邮件地址, 向所述联系人邮件地址发送提醒邮件,所述应用程序调用警告阈值小于或等于所述应用程序调用上限阈值,或者;
    与网关通信的分析控制系统通过对网关的访问日志的调用,获取客户端应用程序调用内部应用接口的次数,如果在预设的客户端应用程序调用内部应用接口计量时间段内,检测到客户端应用程序调用内部应用接口的次数超过与客户端应用程序和内部应用接口共同对应的联合调用警告阈值,则获取客户端应用程序的联系人邮件地址,向所述联系人邮件地址发送提醒邮件,所述联合调用警告阈值小于或等于所述联合调用上限阈值。
  4. 根据权利要求2所述的流量控制方法,其特征在于,还包括:
    与网关通信的分析控制系统通过对网关的访问日志的调用,获取客户端应用程序的调用次数,计算在未来的增长评估期时间段内客户端应用程序的预估调用次数,如果所述预估调用次数超过与客户端应用程序关联的应用程序调用上限阈值,则保存所述应用程序调用上限阈值为历史应用程序调用上限阈值,将客户端应用程序的程序标识作为待更新应用程序标识,将所述预估调用次数作为待更新应用程序调用上限阈值,发送包括待更新应用程序调用上限阈值和对应的待更新应用程序标识的更新应用程序调用上限阈值请求,且在经过所述增长评估期时间段后,如果没有接收到与客户端应用程序关联的确定提升应用程序调用上限阈值请求,则将历史应用程序调用上限阈值作为待更新应用程序调用上限阈值,发送所述更新应用程序调用上限阈值请求;
    网关接收到分析控制系统发送的更新应用程序调用上限阈值请求,将与待更新应用程序标识关联的应用程序调用上限阈值更新为所述待更新应用程序调用上限阈值;
    网关接收到确定提升应用程序调用上限阈值请求,则转发到分析控制系统。
  5. 根据权利要求2所述的流量控制方法,其特征在于,还包括:
    与网关通信的分析控制系统通过对网关的访问日志的调用,获取客户端应用程序调用内部应用接口的次数,计算在未来的增长评估期时间段内客户端应用程序调用内部应用接口的预估次数,如果所述预估次数超过预设的与客户端应用程序关联的联合调用上限阈值,则保存所述联合调用上限阈值为历史联合调用上限阈值,将客户端应用程序的程序标识作为待更新应用程序标识,将所述预估次数作为待更新联合调用上限阈值,发送包括待更新联合调用上限阈值和对应的待更新应用程序标识的更新联合调用上限阈值请求,在经过所述增长评估期时间段后,如果没有接收到与客户端应用程序关联的确定提升联合调用上限阈值请求,则将所述历史联合调用上限阈值作为待更新联合调用上限阈值,发送所述更新联合调用上限阈值请求;
    网关接收到分析控制系统发送的更新联合调用上限阈值请求,将与待更新应用程序标识关联的联合调用上限阈值更新为所述待更新联合调用上限阈值;
    网关接收到确定提升应用程序调用上限阈值请求,则转发到分析控制系统。
  6. 根据权利要求1所述的流量控制方法,其特征在于,还包括:
    当网关允许客户端应用程序的所述调用请求,则增加客户端应用程序的调用次数、增加内部应用接口的被调用次数,增加客户端应用程序调用内部应用接口的次数并发送到与网关通信的集群计数器;
    当网关检测客户端应用程序或者内部应用接口是否满足所述流量控制规则时,从集群计数器中获取:
    在预设的应用程序调用计量时间段内,客户端应用程序的调用次数,或者;
    在预设的应用接口被调用计量时间段内,内部应用接口的被调用次数,或者;
    在预设的客户端应用程序调用内部应用接口计量时间段内,客户端应用程序调用内部应用接口的次数。
  7. 根据权利要求1所述的流量控制方法,其特征在于,还包括:
    网关预先为应用接口分配至少一个线程,并设置为空闲线程;
    如果网关允许客户端应用程序的所述调用请求,则检测内部应用接口是否有空闲线程:
    如果内部应用接口有至少一个空闲线程,则从内部应用接口的空闲线程中选择一个作为当前线程,所述客户端应用程序采用所述当前线程调用所述内部应用接口,并将当前线程设置为工作线程,当所述客户端应用程序结束调用内部应用接口,则将当前线程设置为空闲线程;
    如果内部应用接口没有空闲线程,则暂停客户端应用程序的所述调用请求直到内部应用接口有至少一个空闲线程。
  8. 一种流量控制系统,其特征在于,包括:网关,以及设置在网关的:
    调用请求接收模块,用于接收到客户端应用程序对开放平台的内部应用接口的调用请求;
    流量控制规则获取模块,用于获取客户端应用程序或者内部应用接口的流量控制规则;
    流量检测模块,用于检测客户端应用程序或者内部应用接口是否满足所述流量控制规则,如果客户端应用程序或者内部应用接口满足所述流量控制规则,则允许客户端应用程序的所述调用请求,否则拒绝客户端应用程序的所述调用请求。
  9. 根据权利要求8所述的流量控制系统,其特征在于,所述流量控制规则为:
    在预设的应用程序调用计量时间段内,客户端应用程序的调用次数未超过与客户端应用程序对应的应用程序调用上限阈值,则满足所述流量控制规则,否则不满足所述流量控制规则,或者;
    在预设的应用接口被调用计量时间段内,内部应用接口的被调用次数超过与内部应用接口对应的应用接口阈值,则满足所述流量控制 规则,否则不满足所述流量控制规则,或者;
    在预设的客户端应用程序调用内部应用接口计量时间段内,客户端应用程序调用内部应用接口的次数未超过与客户端应用程序和内部应用接口共同对应的联合调用上限阈值,则满足所述流量控制规则,否则不满足所述流量控制规则。
  10. 根据权利要求9所述的流量控制系统,其特征在于,还包括与网关通信的分析控制系统,以及:
    设置在分析控制系统的流量警告模块,用于通过对网关的访问日志的调用,获取客户端应用程序的调用次数,如果在预设的应用程序调用计量时间段内,客户端应用程序的调用次数超过与客户端应用程序对应的应用程序调用警告阈值,则获取客户端应用程序的联系人邮件地址,向所述联系人邮件地址发送提醒邮件,所述应用程序调用警告阈值小于或等于所述应用程序调用上限阈值,或者;
    通过对网关的访问日志的调用,获取客户端应用程序调用内部应用接口的次数,如果在预设的客户端应用程序调用内部应用接口计量时间段内,客户端应用程序调用内部应用接口的次数超过与客户端应用程序和内部应用接口共同对应的联合调用警告阈值,则获取客户端应用程序的联系人邮件地址,向所述联系人邮件地址发送提醒邮件,所述联合调用警告阈值小于或等于所述联合调用上限阈值。
  11. 根据权利要求9所述的流量控制系统,其特征在于,还包括与网关通信的分析控制系统,以及:
    设置在分析控制系统的更新应用程序调用上限阈值请求发送模块,用于通过对网关的访问日志的调用,获取客户端应用程序的调用次数,计算在未来的增长评估期时间段内客户端应用程序的预估调用次数,如果所述预估调用次数超过与客户端应用程序关联的应用程序调用上限阈值,则保存所述应用程序调用上限阈值为历史应用程序调用上限阈值,将客户端应用程序的程序标识作为待更新应用程序标识,将所述预估调用次数作为待更新应用程序调用上限阈值,发送包括待 更新应用程序调用上限阈值和对应的待更新应用程序标识的更新应用程序调用上限阈值请求,在经过所述增长评估期时间段后,如果没有接收到与客户端应用程序关联的确定提升应用程序调用上限阈值请求,则将历史应用程序调用上限阈值作为待更新应用程序调用上限阈值,发送所述更新应用程序调用上限阈值请求;
    设置在网关的更新应用程序调用上限阈值请求接收模块,用于接收分析控制系统发送的更新应用程序调用上限阈值请求,将与待更新应用程序标识关联的应用程序调用上限阈值更新为所述待更新应用程序调用上限阈值;
    设置在网关的确定提升应用程序调用上限阈值请求接收模块,用于将接收到确定提升应用程序调用上限阈值请求,转发到分析控制系统。
  12. 根据权利要求9所述的流量控制系统,其特征在于,还包括与网关通信的分析控制系统,以及:
    设置在分析控制系统的更新联合调用上限阈值请求发送模块,用于通过对网关的访问日志的调用,获取客户端应用程序调用内部应用接口的次数,计算在未来的增长评估期时间段内客户端应用程序调用内部应用接口的预估次数,如果所述预估次数超过预设的与客户端应用程序关联的联合调用上限阈值,则保存所述联合调用上限阈值为历史联合调用上限阈值,将客户端应用程序的程序标识作为待更新应用程序标识,将所述预估次数作为待更新联合调用上限阈值,发送包括待更新联合调用上限阈值和对应的待更新应用程序标识的更新联合调用上限阈值请求,在经过所述增长评估期时间段后,如果没有接收到与客户端应用程序关联的确定提升联合调用上限阈值请求,则将所述历史联合调用上限阈值作为待更新联合调用上限阈值,发送所述更新联合调用上限阈值请求;
    设置在网关的更新联合调用上限阈值请求接收模块,用于接收分析控制系统发送的更新联合调用上限阈值请求,将与待更新应用程序标识关联的联合调用上限阈值更新为所述待更新联合调用上限阈值;
    设置在网关的确定提升应用程序调用上限阈值请求接收模块,用于将接收到确定提升应用程序调用上限阈值请求,转发到分析控制系统。
  13. 根据权利要求8所述的流量控制系统,其特征在于,还包括:
    设置在网关的调用次数发送模块,用于当允许客户端应用程序的所述调用请求,则增加客户端应用程序的调用次数、增加内部应用接口的被调用次数,增加客户端应用程序调用内部应用接口的次数并发送到与网关通信的集群计数器;
    设置在网关的流量检测模块,当检测客户端应用程序或者内部应用接口是否满足所述流量控制规则时,从集群计数器中获取:
    在预设的应用程序调用计量时间段内,客户端应用程序的调用次数,或者;
    在预设的应用接口被调用计量时间段内,内部应用接口的被调用次数,或者;
    在预设的客户端应用程序调用内部应用接口计量时间段内,客户端应用程序调用内部应用接口的次数。
  14. 根据权利要求8所述的流量控制系统,其特征在于,还包括:
    设置在网关的线程分配模块,用于预先为应用接口分配至少一个线程,并设置为空闲线程;
    设置在网关的线程检测模块,用于如果允许客户端应用程序的所述调用请求,则检测内部应用接口是否有空闲线程:
    如果内部应用接口有至少一个空闲线程,则从内部应用接口的空闲线程中选择一个作为当前线程,所述客户端应用程序采用所述当前线程调用所述内部应用接口,并将当前线程设置为工作线程,当所述客户端应用程序结束调用内部应用接口,则将当前线程设置为空闲线程;
    如果内部应用接口没有空闲线程,则暂停客户端应用程序的所述调用请求直到内部应用接口有至少一个空闲线程。
PCT/CN2014/087622 2013-12-13 2014-09-26 一种流量控制方法及系统 Ceased WO2015085813A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
AU2014361532A AU2014361532B2 (en) 2013-12-13 2014-09-26 Traffic control method and system
US15/038,144 US9940177B2 (en) 2013-12-13 2014-09-26 Traffic control method and system
RU2016125449A RU2644522C2 (ru) 2013-12-13 2014-09-26 Способ и система для управления трафиком
CA2932745A CA2932745C (en) 2013-12-13 2014-09-26 Method and system for traffic control

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310683050.XA CN103701709B (zh) 2013-12-13 2013-12-13 一种流量控制方法及系统
CN201310683050.X 2013-12-13

Publications (1)

Publication Number Publication Date
WO2015085813A1 true WO2015085813A1 (zh) 2015-06-18

Family

ID=50363111

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/087622 Ceased WO2015085813A1 (zh) 2013-12-13 2014-09-26 一种流量控制方法及系统

Country Status (7)

Country Link
US (1) US9940177B2 (zh)
CN (1) CN103701709B (zh)
AU (1) AU2014361532B2 (zh)
CA (1) CA2932745C (zh)
RU (1) RU2644522C2 (zh)
TW (1) TWI530871B (zh)
WO (1) WO2015085813A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111352967A (zh) * 2020-02-27 2020-06-30 携程旅游网络技术(上海)有限公司 滑动窗口算法的频次控制方法、系统、设备及介质
CN115996197A (zh) * 2023-03-17 2023-04-21 之江实验室 一种流量拥塞前置的分布式计算流量仿真系统与方法

Families Citing this family (43)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103701709B (zh) 2013-12-13 2015-07-01 北京京东尚科信息技术有限公司 一种流量控制方法及系统
CN104092624A (zh) * 2014-06-27 2014-10-08 北京思特奇信息技术股份有限公司 一种信息下发流量及优先级控制系统及方法
CN104410550B (zh) * 2014-12-10 2018-05-01 深圳中兴网信科技有限公司 Web服务监控方法和Web服务监控装置
US10176012B2 (en) 2014-12-12 2019-01-08 Nxp Usa, Inc. Method and apparatus for implementing deterministic response frame transmission
US10505757B2 (en) * 2014-12-12 2019-12-10 Nxp Usa, Inc. Network interface module and a method of changing network configuration parameters within a network device
CN104683457A (zh) * 2015-02-13 2015-06-03 小米科技有限责任公司 并发控制的方法及装置
CN104657152B (zh) * 2015-03-16 2019-03-29 联想(北京)有限公司 数据传输管理方法以及电子设备
CN106603256B (zh) * 2015-10-14 2020-01-10 阿里巴巴集团控股有限公司 一种流量控制方法及装置
CN106803815B (zh) * 2015-11-26 2020-03-24 阿里巴巴集团控股有限公司 一种流量控制方法和装置
CN105553996B (zh) * 2015-12-23 2019-07-26 北京奇虎科技有限公司 处理数据访问请求的方法及装置
CN105635124B (zh) * 2015-12-24 2019-05-14 小米科技有限责任公司 流量控制方法和装置
WO2017115116A1 (en) * 2015-12-31 2017-07-06 Pismo Labs Technology Ltd. Methods and systems for restricting data usage at a network device
CN107222426B (zh) * 2016-03-21 2021-07-20 阿里巴巴集团控股有限公司 控流的方法、装置及系统
CN105893150B (zh) * 2016-03-31 2021-04-20 腾讯科技(深圳)有限公司 接口调用频度控制、接口调用请求处理方法及装置
US10628352B2 (en) 2016-07-19 2020-04-21 Nxp Usa, Inc. Heterogeneous multi-processor device and method of enabling coherent data access within a heterogeneous multi-processor device
CN108112038B (zh) * 2016-11-24 2021-06-01 深圳市云网万店科技有限公司 一种控制访问流量的方法及装置
CN107070807A (zh) * 2017-04-18 2017-08-18 北京思特奇信息技术股份有限公司 一种分布式环境下接口调用的全局流量控制方法和系统
CN107332784B (zh) * 2017-06-19 2020-12-18 上海高顿教育科技有限公司 一种用于服务器接口的安全防护系统
CN107678861B (zh) * 2017-10-16 2020-11-24 广州酷狗计算机科技有限公司 处理功能执行请求的方法和装置
CN108400963A (zh) * 2017-10-23 2018-08-14 平安科技(深圳)有限公司 电子装置、访问请求控制方法和计算机可读存储介质
CN107819876A (zh) * 2017-11-27 2018-03-20 北京旷视科技有限公司 一种基于云平台的数据处理方法及系统
CN108491234A (zh) * 2018-03-19 2018-09-04 深圳乐信软件技术有限公司 一种实时流量控制方法、装置、设备及存储介质
CN108845869B (zh) * 2018-05-31 2023-04-07 中国平安人寿保险股份有限公司 并发请求控制方法、装置、计算机设备和存储介质
CN109032813B (zh) * 2018-06-29 2021-01-26 Oppo(重庆)智能科技有限公司 一种移动终端及其进程间通信的限制方法、存储介质
CN109145020A (zh) * 2018-07-23 2019-01-04 程之琴 信息查询方法、从服务器、客户端及计算机可读存储介质
CN109450806B (zh) * 2018-10-31 2022-05-06 中国联合网络通信集团有限公司 一种流量控制方法及装置、分布式集群
CN109729500B (zh) * 2018-11-12 2021-06-29 斑马网络技术有限公司 流量控制方法、装置、系统、设备以及存储介质
CN109542646A (zh) * 2018-11-20 2019-03-29 北京京东尚科信息技术有限公司 用于调用应用程序编程接口的方法和装置
CN111953635B (zh) * 2019-05-15 2022-09-06 福建天晴数码有限公司 接口请求处理方法及计算机可读存储介质
CN110245029A (zh) * 2019-05-21 2019-09-17 中国平安财产保险股份有限公司 一种数据处理方法、装置、存储介质和服务器
CN110188083B (zh) * 2019-05-29 2020-11-03 口碑(上海)信息技术有限公司 接口信息挖掘方法及装置
CN110535777B (zh) * 2019-08-12 2022-07-12 新华三大数据技术有限公司 访问请求控制方法、装置、电子设备以及可读存储介质
CN110768912B (zh) * 2019-10-21 2022-11-18 中国民航信息网络股份有限公司 Api网关限流方法及装置
CN110661815A (zh) * 2019-10-22 2020-01-07 中国林业科学研究院热带林业研究所 基于频率限制微服务的请求处理方法、装置、系统及介质
CN111314381A (zh) * 2020-03-20 2020-06-19 重庆富民银行股份有限公司 安全隔离网关
CN111600807A (zh) * 2020-04-14 2020-08-28 网宿科技股份有限公司 一种基于api网关设备的流量控制方法和系统
CN111817972B (zh) * 2020-06-16 2023-08-11 上海中通吉网络技术有限公司 物流业务系统流量接口的限流方法及相关设备
CN112202682A (zh) * 2020-09-27 2021-01-08 平安国际智慧城市科技股份有限公司 接口流量控制方法、装置、计算机设备及存储介质
CN113890853B (zh) * 2021-09-27 2024-04-19 北京字跳网络技术有限公司 一种限流方法、装置、存储介质及电子设备
CN115967930B (zh) * 2021-10-11 2025-12-05 中国移动通信集团浙江有限公司 数据处理方法、装置、设备及计算机可读存储介质
CN115643217B (zh) * 2022-12-14 2023-03-10 泰德网聚(北京)科技股份有限公司 一种用于接口管理的低码中枢系统
CN116032808B (zh) * 2022-12-29 2025-08-05 浪潮通信技术有限公司 流量保护方法、装置、电子设备和存储介质
CN120238507B (zh) * 2025-05-29 2025-07-25 广东联想懂的通信有限公司 一种用于流量池的用户流量分配管理方法及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101577681A (zh) * 2009-06-02 2009-11-11 华为技术有限公司 一种流量控制方法、装置以及系统
CN102325148A (zh) * 2011-05-25 2012-01-18 重庆新媒农信科技有限公司 一种WebService服务调用方法
CN103051623A (zh) * 2012-12-20 2013-04-17 微梦创科网络科技(中国)有限公司 限制开放平台的调用的方法
CN103701709A (zh) * 2013-12-13 2014-04-02 北京京东尚科信息技术有限公司 一种流量控制方法及系统

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6237024B1 (en) * 1998-03-20 2001-05-22 Sun Microsystem, Inc. Method and apparatus for the suspension and continuation of remote processes
US7234139B1 (en) * 2000-11-24 2007-06-19 Catharon Productions, Inc. Computer multi-tasking via virtual threading using an interpreter
WO2005107204A1 (en) * 2004-05-04 2005-11-10 Telecom Italia S.P.A. Method and system for access control in distributed object-oriented systems
US7873074B1 (en) * 2006-06-01 2011-01-18 Avaya Inc. Adaptive selection of bandwidth parameters to meet a service provider pricing model
DE102006041058B4 (de) * 2006-09-01 2008-09-11 Nokia Siemens Networks Gmbh & Co.Kg Verfahren zur Nachführung von Netzparametern
US20130031201A1 (en) * 2008-04-03 2013-01-31 Electro Industries/Gauge Tech Intelligent electronic device communication solutions for network topologies
CN101309220A (zh) * 2008-06-27 2008-11-19 华为技术有限公司 一种流量控制方法和装置
CN101640666B (zh) * 2008-08-01 2012-06-06 北京启明星辰信息技术股份有限公司 一种面向目标网络的流量控制装置及方法
US8738970B2 (en) * 2010-07-23 2014-05-27 Salesforce.Com, Inc. Generating performance alerts
CN102045363B (zh) * 2010-12-31 2013-10-09 华为数字技术(成都)有限公司 网络流量特征识别规则的建立方法、识别控制方法及装置
US8671385B2 (en) * 2011-01-07 2014-03-11 Mastercard International Incorporated Methods and systems for throttling calls to a service application through an open API
CN102123446A (zh) * 2011-03-14 2011-07-13 中兴通讯股份有限公司 一种进行业务控制的方法、系统及装置
US9800483B2 (en) * 2012-04-13 2017-10-24 CirrusWorks, Inc. Method and apparatus for dynamic bandwidth allocation for optimizing network utilization

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101577681A (zh) * 2009-06-02 2009-11-11 华为技术有限公司 一种流量控制方法、装置以及系统
CN102325148A (zh) * 2011-05-25 2012-01-18 重庆新媒农信科技有限公司 一种WebService服务调用方法
CN103051623A (zh) * 2012-12-20 2013-04-17 微梦创科网络科技(中国)有限公司 限制开放平台的调用的方法
CN103701709A (zh) * 2013-12-13 2014-04-02 北京京东尚科信息技术有限公司 一种流量控制方法及系统

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111352967A (zh) * 2020-02-27 2020-06-30 携程旅游网络技术(上海)有限公司 滑动窗口算法的频次控制方法、系统、设备及介质
CN111352967B (zh) * 2020-02-27 2024-02-06 携程旅游网络技术(上海)有限公司 滑动窗口算法的频次控制方法、系统、设备及介质
CN115996197A (zh) * 2023-03-17 2023-04-21 之江实验室 一种流量拥塞前置的分布式计算流量仿真系统与方法

Also Published As

Publication number Publication date
CN103701709B (zh) 2015-07-01
HK1195831A1 (zh) 2014-11-21
US9940177B2 (en) 2018-04-10
CA2932745C (en) 2018-08-21
US20160292017A1 (en) 2016-10-06
CA2932745A1 (en) 2015-06-18
AU2014361532A1 (en) 2016-07-14
CN103701709A (zh) 2014-04-02
AU2014361532B2 (en) 2018-01-25
TW201523442A (zh) 2015-06-16
RU2644522C2 (ru) 2018-02-12
TWI530871B (zh) 2016-04-21

Similar Documents

Publication Publication Date Title
WO2015085813A1 (zh) 一种流量控制方法及系统
JP6168576B2 (ja) 仮想マシンマイグレーション管理の方法、装置およびシステム
JP5327220B2 (ja) 管理プログラム、管理装置および管理方法
CN103763378A (zh) 基于分布式流式计算系统的任务处理方法、系统及节点
CN109814994A (zh) 一种动态调度线程池的方法及终端
CN105468619A (zh) 用于数据库连接池的资源分配方法和装置
CN106161076A (zh) 虚拟网络功能扩展方法和装置
MX2021013229A (es) Gestion de datos y uso de datos en la red iot.
CN105847891A (zh) 一种资源抢占方法和装置
EP2996382B1 (en) Physical resource adjustment method, device and controller
CN108572898A (zh) 一种控制接口的方法、装置、设备、以及存储介质
CN108156091A (zh) 一种流量控制方法及系统
CN111352710B (zh) 进程管理方法及装置、计算设备、存储介质
CN107609133A (zh) 日志文件转存方法、装置、设备及其计算机可读存储介质
CN102056201B (zh) 一种业务流程中异常情况的处理方法和装置
TWI644540B (zh) 多租戶軟體定義網路中虛擬網路之流表彈性切割系統
CN114500661A (zh) 一种限流设备、方法、装置及存储介质
CN105007192A (zh) 一种网络接口管理方法、系统及网络接口管理服务器
CN107809323B (zh) 一种资源的控制方法、装置及系统
RU2019108616A (ru) СПОСОБ И СЕТЕВОЙ ОБЪЕКТ ДЛЯ УПРАВЛЕНИЯ КАЧЕСТВОМ QoS
CN102833786B (zh) 一种多载波系统中独立载波调度方法
CN110865885A (zh) 面向分布式数据处理与聚合的任务部署装置和方法
CN104579975B (zh) 一种软件定义网络控制器集群的调度方法
CN102811154A (zh) 资源获取方法与网络服务器系统
CN107396451A (zh) 同一系统内小区间资源调整方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14869520

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 15038144

Country of ref document: US

ENP Entry into the national phase

Ref document number: 2932745

Country of ref document: CA

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: IDP00201604262

Country of ref document: ID

ENP Entry into the national phase

Ref document number: 2016125449

Country of ref document: RU

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2014361532

Country of ref document: AU

Date of ref document: 20140926

Kind code of ref document: A

122 Ep: pct application non-entry in european phase

Ref document number: 14869520

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC ( EPO FORM 1205A DATED 08/06/2017 )

122 Ep: pct application non-entry in european phase

Ref document number: 14869520

Country of ref document: EP

Kind code of ref document: A1