WO2016165296A1 - 一种服务质量控制的方法、设备及系统 - Google Patents

一种服务质量控制的方法、设备及系统 Download PDF

Info

Publication number
WO2016165296A1
WO2016165296A1 PCT/CN2015/091976 CN2015091976W WO2016165296A1 WO 2016165296 A1 WO2016165296 A1 WO 2016165296A1 CN 2015091976 W CN2015091976 W CN 2015091976W WO 2016165296 A1 WO2016165296 A1 WO 2016165296A1
Authority
WO
WIPO (PCT)
Prior art keywords
app
user
identifier
user level
management device
Prior art date
Application number
PCT/CN2015/091976
Other languages
English (en)
French (fr)
Inventor
梁标
夏滨
王提政
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP15888993.1A priority Critical patent/EP3142323B1/en
Publication of WO2016165296A1 publication Critical patent/WO2016165296A1/zh
Priority to US15/376,153 priority patent/US10306014B2/en

Links

Images

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/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
    • H04L67/61Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources taking into account QoS or priority requirements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/80Responding to QoS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/06Generation of reports
    • H04L43/062Generation of reports related to network traffic
    • 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/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/16Central resource management; Negotiation of resources or communication parameters, e.g. negotiating bandwidth or QoS [Quality of Service]
    • H04W28/24Negotiating SLA [Service Level Agreement]; Negotiating QoS [Quality of Service]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/60Subscription-based services using application servers or record carriers, e.g. SIM application toolkits

Definitions

  • the present invention relates to the field of computer technologies, and in particular, to a method, device and system for quality of service control.
  • Open API is an open API that can be opened to third-party application (Application, APP) developers for a fee or free.
  • APP developers can quickly develop apps based on the Open API and put them into the app market.
  • the Open API of Google Maps APP developers can quickly develop a simple APP to implement the map search function by consulting the manual provided by Google. In this way, APP developers can free themselves from the complicated core function implementation and concentrate on interface design and user interaction design.
  • the API developer hosts the API on the API management device, and the APP developer subscribes to the required API on the API management device, and each user needs corresponding service quality control.
  • each APP needs to develop a set of QoS management functions, which puts high requirements on the experience and skills of the APP developers.
  • the development of a set of QoS management functions is very large, objectively extending the development cycle and test cycle of the APP, and deviating from the original intention of rapidly developing the APP based on OpenAPI, which is not conducive to the rapid listing of the APP.
  • the embodiment of the invention provides a method for service quality control, which can provide service quality control for an APP registered on an API management device, and accelerates the development efficiency of the APP.
  • the embodiments of the present invention also provide corresponding devices and systems.
  • a first aspect of the present invention provides a method for quality of service control, the method being applied to an API management device that provides an open application programming interface API for an application APP, the method comprising:
  • the API call request sent by the user terminal is triggered, and the API call is requested.
  • the request carries the user identifier of the APP and the identifier of the APP;
  • the obtaining a service quality control policy of the APP according to the identifier of the APP and the user identifier of the APP includes:
  • the method further includes:
  • the acquiring the APP corresponding to the user identifier of the APP according to the identifier of the APP and the user identifier of the APP User ratings including:
  • the user identifier corresponding to the APP is obtained from the cached data.
  • the APP that has been stored in the non-cache area Obtaining a user level of the APP corresponding to the user identifier of the APP, in a correspondence between the user identifier and the user level of the APP;
  • the obtaining the service quality control policy of the APP corresponding to the user level of the APP according to the user level of the APP includes:
  • the service quality control policy of the APP corresponding to the user level of the APP is obtained from the buffer area;
  • the service quality control policy of the APP corresponding to the user level of the APP is obtained from the non-cache area.
  • the method before the receiving application APP is used to trigger an API call request sent by the user terminal, the method further includes:
  • the acquiring, according to the identifier of the APP and the user identifier of the APP, the APP corresponding to the user identifier of the APP User ratings including:
  • the user identifier corresponding to the APP is obtained from the cached data.
  • the cached data of the correspondence between the user identifier of the APP and the user level of the APP does not exist in the buffer area of the API management device, send a query to the application server according to the first lookup indication identifier.
  • the query request carries a user identifier of the APP, and the user identifier of the APP is used by the application server to search for the APP corresponding to the user identifier of the APP.
  • a user level receiving a query response message sent by the application server, where the query response message carries a user level of the APP;
  • the obtaining the service quality control policy of the APP corresponding to the user level of the APP according to the user level of the APP includes:
  • the service quality control policy of the APP corresponding to the user level of the APP is obtained from the buffer area;
  • the service quality control policy of the APP corresponding to the user level of the APP is obtained from the non-cache area.
  • the method before the receiving application APP is used to trigger an API call request sent by the user terminal, the method further includes:
  • the acquiring, according to the identifier of the APP and the user identifier of the APP, the APP corresponding to the user identifier of the APP User ratings including:
  • the user identifier corresponding to the APP is obtained from the cached data.
  • the cached data of the corresponding relationship between the user identifier of the APP and the user level of the APP does not exist in the buffer area of the API management device, the user identifier of the APP that has been stored in the non-cache area Obtaining a user level of the APP corresponding to the user identifier of the APP, in a corresponding relationship with a user level of the APP;
  • the service quality control policy of the APP includes:
  • the service quality control policy of the APP corresponding to the user level of the APP is obtained from the buffer area;
  • the query request is sent to the application server according to the second lookup indication identifier, where the query request carries the user level of the APP, and the APP
  • the user level is used by the application server to search for a quality of service control policy of the APP corresponding to the user level of the APP; and receiving a query response message sent by the application server, where the query response message carries the service of the APP Quality control strategy.
  • the method before the receiving application APP is used to trigger an API call request sent by the user terminal, the method further includes:
  • the third lookup indication identifier is used to indicate a correspondence between a user identifier of the APP and an application level of the APP from an application server, and Corresponding relationship between the user level of the APP and the service quality control policy of the APP;
  • the acquiring, according to the user identifier of the APP, the user level of the APP corresponding to the user identifier of the APP, according to the The user quality level of the APP, and the service quality control policy of the APP corresponding to the user level of the APP including:
  • the user identifier corresponding to the APP is obtained from the cached data.
  • a user level of the APP the service quality control policy of the APP corresponding to the user level of the APP is obtained from the buffer area;
  • the cached data of the correspondence between the user identifier of the APP and the user level of the APP does not exist in the buffer area of the API management device, send a query to the application server according to the third lookup indication identifier.
  • the query request carries a user identifier of the APP, and the APP
  • the user identifier is used by the application server to search for a user level of the APP corresponding to the user identifier of the APP, and a quality of service control policy of the APP corresponding to the user level of the APP, and receiving the sent by the application server.
  • Querying a response message where the query response message carries a quality of service control policy of the APP.
  • the method further includes:
  • Corresponding relationship between the user identifier of the APP and the user level of the APP, and the correspondence between the user level of the APP and the service quality control policy of the APP are stored in a buffer area of the API management device.
  • the service quality control policy is obtained from the buffer area when the user level is obtained in the buffer area.
  • the user level of the APP is obtained from the cache area, and the quality of service control policy of the APP is obtained from the non-cache area or the APP server.
  • the method further includes:
  • the user name of the APP is obtained as the user identifier
  • the user identifier is obtained from an appointment field pre-agreed with the user terminal.
  • any one of the first to the eleventh possible implementation manners of the first aspect in the twelfth possible implementation, the method further includes:
  • any one of the first to the eleventh possible implementation manners of the first aspect in a thirteenth possible implementation manner, the method further includes:
  • the expired data is cleared from the buffer area of the API management device according to the time stamp.
  • a second aspect of the present invention provides a method for quality of service control, the method being applied to an API management device that provides an open application programming interface API for an application APP, the method comprising:
  • the identifier of the APP and the identifier of the user level of the APP are obtained, and the quality of service control policy of the APP corresponding to the user level of the APP is obtained, including :
  • the user level corresponding to the APP is obtained from the cached data.
  • the cached data of the corresponding relationship of the quality of service control policy of the APP corresponding to the user level of the APP does not exist in the buffer area of the API management device, the user of the APP that has been stored from the non-cache area
  • the service quality control policy of the APP corresponding to the user level of the APP is obtained in the correspondence between the service quality control policies of the APP corresponding to the level.
  • the obtaining, according to the identifier of the APP and the identifier of the user level of the APP, the service quality control policy of the APP corresponding to the user level of the APP include:
  • the user level corresponding to the APP is obtained from the cached data.
  • the cached data of the correspondence between the quality of service control policies of the APP corresponding to the user level of the APP does not exist in the buffer area of the API management device, send an inquiry request to the application server.
  • the identifier of the user level of the APP is used in the query request, and the identifier of the user level of the APP is used by the application server to search for a quality of service control policy of the APP corresponding to the user level of the APP;
  • the second aspect of the embodiments of the present invention further provides various implementations of the ninth to twelfth aspects of the first aspect, such as buffering, confirming, and cleaning.
  • the twelfth kind of scheme of caching, confirmation, and cleaning is understood, and we will not repeat it here.
  • the scheme for determining the service quality control policy by using the identifier of the user level may be used in a local area network or in a quarantined area (DMZ, Demilitarized Zone) in a securely isolated network environment: the identifier of the user level is directly in the request. Carrying, the user's logo is optional. It may also be that the identifier of the user level is directly carried in the ciphertext of the request during the network transmission, and the identifier of the user may be optional. The user level identifier is directly carried in the request in plain text or cipher text, and the user's logo may be optional.
  • a third aspect of the present invention provides an application programming interface API management device, including:
  • a receiving module configured to receive an API call request sent by the user terminal when the application APP is used, where the API call request carries the user identifier of the APP and the identifier of the APP;
  • An obtaining module configured to acquire a service quality control policy of the APP according to the identifier of the APP and the user identifier of the APP received by the receiving module;
  • control module configured to control, according to the quality of service control policy of the APP acquired by the acquiring module, a service quality of the user indicated by the user identifier.
  • the acquiring module includes:
  • a first obtaining sub-module configured to acquire, according to the identifier of the APP and the user identifier of the APP, the user level of the APP corresponding to the user identifier of the APP;
  • a second obtaining sub-module configured to acquire, according to a user level of the APP acquired by the first acquiring sub-module, a service quality control policy of the APP corresponding to a user level of the APP;
  • the API management device further includes a first registration module and a first storage module,
  • the receiving module is further configured to receive a registration request of the APP, and receive a correspondence between a user identifier of the APP and a user level of the APP, and a user level of the APP and a service quality control of the APP Correspondence relationship of the strategy;
  • the first registration module is configured to register the APP according to the registration request received by the receiving module;
  • the first storage module is configured to store a correspondence between a user identifier of the APP received by the receiving module and a user level of the APP, and a user level of the APP and a service quality control policy of the APP Correspondence relationship.
  • the first acquiring sub-module is specifically used to: if the user of the APP exists in a cache area of the API management device And the cached data that is associated with the user level of the APP, the user level of the APP corresponding to the user identifier of the APP is obtained from the cached data; if not in the cache area of the API management device In the cached data of the correspondence between the user identifier of the APP and the user level of the APP, the correspondence between the user identifier of the APP and the user level of the APP that has been stored in the non-cache area is Obtaining the user level of the APP corresponding to the user identifier of the APP
  • the second obtaining sub-module is specifically configured to: when the user level of the APP is obtained from the buffer area, obtain a service quality control policy of the APP corresponding to the user level of the APP from the buffer area.
  • the service quality control policy of the APP corresponding to the user level of the APP is obtained from the non-cache area.
  • the API management device further includes a second registration module and a second storage module,
  • the receiving module is further configured to receive a registration request of the APP, and receive a first search indication identifier, a correspondence between a user level of the APP, and a quality of service control policy of the APP, where the first search indication identifier is Corresponding to indicate a correspondence between a user identifier of the APP that needs to be searched from the application server and a user level of the APP;
  • the second registration module is configured to register the APP according to the registration request received by the receiving module;
  • the second storage module is configured to store the first lookup indicator received by the receiving module The corresponding relationship between the user level of the APP and the service quality control policy of the APP.
  • the first acquiring sub-module is specifically configured to: if the user of the APP exists in a cache area of the API management device And the cached data that is associated with the user level of the APP, the user level of the APP corresponding to the user identifier of the APP is obtained from the cached data; if not in the cache area of the API management device And the cached data of the corresponding relationship between the user identifier of the APP and the user level of the APP, the query request is sent to the application server according to the first lookup indication identifier, where the query request carries the APP a user identifier, where the user identifier of the APP is used by the application server to search for a user level of the APP corresponding to the user identifier of the APP; and receiving a query response message sent by the application server, where the query response message carries The user level of the APP;
  • the second obtaining sub-module is specifically configured to: when the user level of the APP is obtained from the buffer area, obtain a service quality control policy of the APP corresponding to the user level of the APP from the buffer area.
  • the service quality control policy of the APP corresponding to the user level of the APP is obtained from the non-cache area.
  • the API management device further includes a third registration module and a third storage module,
  • the receiving module is configured to receive a registration request of the APP, and receive a second lookup indication identifier, a correspondence between a user identifier of the APP and a user level of the APP, where the second lookup indication identifier is used to indicate The corresponding relationship between the user level of the APP and the service quality control policy of the APP needs to be searched from the application server;
  • the third registration module is configured to register the APP according to the registration request received by the receiving module;
  • the third storage module is configured to store a correspondence between the second lookup indication identifier received by the receiving module, a user identifier of the APP, and a user level of the APP.
  • the first obtaining sub-module is specifically configured to: if the cached data of the correspondence between the user identifier of the APP and the user level of the APP exists in a buffer area of the API management device, from the cached data Obtaining a user level of the APP corresponding to the user identifier of the APP; if in the API The cached data of the corresponding relationship between the user identifier of the APP and the user level of the APP does not exist in the buffer area of the management device, and the user identifier of the APP that has been stored in the non-cache area and the APP is Obtaining a user level of the APP corresponding to the user identifier of the APP in a correspondence between user levels;
  • the second obtaining sub-module is specifically configured to: when the user level of the APP is obtained from the buffer area, obtain a service quality control policy of the APP corresponding to the user level of the APP from the buffer area.
  • the query request is sent to the application server according to the second lookup indication identifier, where the query request carries the user level of the APP.
  • the user level of the APP is used by the application server to search for a quality of service control policy of the APP corresponding to the user level of the APP; and receiving a query response message sent by the application server, where the query response message carries the APP Service quality control strategy.
  • the API management device further includes a fourth registration module and a fourth storage module,
  • the receiving module is further configured to receive a registration request of the APP, and receive a third lookup indication identifier, where the third lookup indication identifier is used to indicate that the user identifier of the APP is searched from the application server and the APP Correspondence between the user level and the correspondence between the user level of the APP and the service quality control policy of the APP;
  • the fourth registration module is configured to register the APP according to the registration request received by the receiving module;
  • the fourth storage module is configured to store the third lookup indication identifier received by the receiving module.
  • the first obtaining sub-module is specifically configured to: if the cached data of the correspondence between the user identifier of the APP and the user level of the APP exists in a buffer area of the API management device, obtain the cached data from the cached data. a user level of the APP corresponding to the user identifier of the APP;
  • the second obtaining sub-module is specifically configured to: when the user level of the APP corresponding to the user identifier of the APP is obtained from the cached data, obtain a user level corresponding to the APP from the cache area.
  • the quality of service control policy of the APP or, if in the buffer area of the API management device
  • the cached data of the corresponding relationship between the user identifier of the APP and the user level of the APP is not present, and the query request is sent to the application server according to the third lookup indication identifier, where the query request carries the a user identifier of the APP, the user identifier of the APP is used by the application server to search for a user level of the APP corresponding to the user identifier of the APP, and a service quality control policy of the APP corresponding to the user level of the APP And receiving a query response message sent by the application server, where the query response message carries a quality of service control policy of the APP.
  • control module is further configured to: when the quality of service control policy of the APP is not from When the buffer area is obtained, the correspondence between the user identifier of the APP and the user level of the APP, and the correspondence between the user level of the APP and the service quality control policy of the APP are stored in the API. Manage the device's cache area.
  • the service quality control policy is obtained from the buffer area when the user level is obtained in the buffer area.
  • the user level of the APP is obtained from the cache area, and the quality of service control policy of the APP is obtained from the non-cache area or the APP server.
  • the API management device further includes: a confirmation module,
  • the confirmation module is configured to confirm whether the APP is authenticated
  • the first obtaining submodule is further configured to: when the confirming module confirms that the authentication is performed, obtain the user name of the APP as the user identifier; when not authenticated, from an appointment field pre-agreed with the user terminal Obtain the user ID.
  • the API management device further includes a first cleaning module
  • the receiving module is further configured to receive a offline request of the APP sent by the user terminal;
  • the first cleaning module is configured to: after the receiving module receives the offline request of the APP, clear data corresponding to the user identifier from a buffer area of the API management device.
  • the API management device further includes an adding module, a setting module, and Second cleaning module,
  • the adding module is configured to add data corresponding to the user identifier generated by the APP operation received by the receiving module to a buffer area of the API management device;
  • the setting module is configured to set a time stamp for the data added by the adding module to the cache
  • the second cleaning module is configured to: after the preset time is reached, clear out the expired data from the buffer area of the API management device according to the time stamp set by the setting module.
  • a fourth aspect of the present invention provides an API management device, including:
  • a receiving module configured to receive an API call request sent by the user terminal when the user uses the application APP, where the API call request carries an identifier of the APP and an identifier of a user level of the APP;
  • An obtaining module configured to acquire, according to the identifier of the APP and the identifier of the user level of the APP, the service quality control policy of the APP corresponding to the user level of the APP;
  • control module configured to control, according to the quality of service control policy of the APP acquired by the acquiring module, a service quality of the user indicated by the user identifier.
  • the obtaining module is specifically configured to: if the cached data of the correspondence between the service quality control policies of the APP corresponding to the user level of the APP exists in the buffer area of the API management device, Obtaining a service quality control policy of the APP corresponding to the user level of the APP; if there is no correspondence between the service quality control policies of the APP corresponding to the user level of the APP in the buffer area of the API management device Obtaining the service quality control of the APP corresponding to the user level of the APP, from the corresponding relationship of the service quality control policy of the APP corresponding to the user level of the APP stored in the non-buffer area Strategy.
  • the obtaining module is specifically configured to: if the cached data of the correspondence between the service quality control policies of the APP corresponding to the user level of the APP exists in the buffer area of the API management device, Obtaining a quality of service control policy of the APP corresponding to the user level of the APP; if the user level of the APP does not exist in the buffer area of the API management device, The cached data of the corresponding relationship of the service quality control policy of the APP sends a query request to the application server, where the query request carries the identifier of the user level of the APP, and the identifier of the user level of the APP is used by the application server. Searching for a service quality control policy of the APP corresponding to the user level of the APP; receiving a query response message sent by the application server, where the query response message carries the service quality of the APP corresponding to the user level of the APP Control Strategy.
  • the fourth aspect of the embodiments of the present invention further provides various implementations of buffering, confirming, and cleaning in the ninth to twelfth aspects of the third aspect, and may refer to the ninth to the third aspect.
  • the twelfth kind of scheme of caching, confirmation, and cleaning is understood, and we will not repeat it here.
  • the scheme for determining the service quality control policy by using the identifier of the user level may be used in a local area network or in a quarantined area (DMZ, Demilitarized Zone) in a securely isolated network environment: the identifier of the user level is directly in the request. Carrying, the user's logo is optional. It may also be that the identifier of the user level is directly carried in the ciphertext of the request during the network transmission, and the identifier of the user may be optional. The user level identifier is directly carried in the request in plain text or cipher text, and the user's logo may be optional.
  • a fifth aspect of the present invention provides a service quality control system, comprising: a user terminal and an application programming interface API management device, wherein the API management device is the API management device according to any one of the above third aspects.
  • a sixth aspect of the present invention provides a service quality control system, comprising: a user terminal and an application programming interface API management device, wherein the API management device is the API management device according to any one of the above fourth aspects.
  • the embodiment of the present invention adopts an API management device that provides an open application programming interface API for an application APP, and receives an API call request sent by the user terminal when the application APP is used, where the API call request carries the user identifier of the APP and the The identifier of the APP is obtained, and the service quality control policy of the APP is obtained according to the identifier of the APP and the user identifier of the APP; and the quality of service indicated by the user identifier is controlled according to the service quality control policy of the APP.
  • the service quality control method provided by the embodiment of the present invention can provide service quality control for the APP registered on the API management device, and accelerates the development of the APP. effectiveness.
  • the APP developer only needs to perform a simple configuration when the API is registered, and further Steps reduce the experience and skills of APP developers, lower the threshold for APP developers; save the development and testing cycle of APP, make APP more fast, and take the market opportunity.
  • FIG. 1 is a schematic diagram of an embodiment of a method for quality of service control according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of another embodiment of a method for quality of service control in an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of another embodiment of a method for quality of service control in an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of another embodiment of a method for quality of service control in an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of another embodiment of a method for quality of service control according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of another embodiment of a method for quality of service control in an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of an embodiment of an API management device according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of another embodiment of an API management device according to an embodiment of the present invention.
  • FIG. 9 is a schematic diagram of another embodiment of an API management device according to an embodiment of the present invention.
  • FIG. 10 is a schematic diagram of another embodiment of an API management device according to an embodiment of the present invention.
  • FIG. 11 is a schematic diagram of another embodiment of an API management device according to an embodiment of the present invention.
  • FIG. 12 is a schematic diagram of another embodiment of an API management device according to an embodiment of the present invention.
  • FIG. 13 is a schematic diagram of another embodiment of an API management device according to an embodiment of the present invention.
  • FIG. 14 is a schematic diagram of another embodiment of an API management device according to an embodiment of the present invention.
  • FIG. 15 is a schematic diagram of another embodiment of an API management device according to an embodiment of the present invention.
  • FIG. 16 is a schematic diagram of another embodiment of an API management device according to an embodiment of the present invention.
  • FIG. 17 is a schematic diagram of another embodiment of an API management device according to an embodiment of the present invention.
  • FIG. 18 is a schematic diagram of another embodiment of an API management device according to an embodiment of the present invention.
  • FIG. 19 is a schematic diagram of an embodiment of a system for quality of service management in an embodiment of the present invention.
  • the embodiment of the invention provides a method for service quality control, which can be registered in an API management device.
  • the APP provides quality control and accelerates the development efficiency of the APP.
  • the embodiments of the present invention also provide corresponding devices and systems. The details are described below separately.
  • the embodiment of the present invention proposes a method for implementing the QoS control of the APP user on the API management device.
  • the APP developer configures the QoS control policy of the APP for each user identity, and the storage is API management.
  • the API call request initiated by the user when the user uses the APP carries the identifier and the user identifier of the APP; that is, the API call request sent by the user terminal to the API management device when the APP is used, the API
  • the management device obtains the identifier of the APP and the user identifier of the APP, queries the user identifier of the APP and the corresponding QoS control policy, and performs QoS control according to the QoS control policy.
  • the identifier of the APP refers to an identifier that can uniquely indicate the APP, and the identifier of the APP can be represented by one character.
  • the identifier of the WeChat, the identifier of the navigation application, etc., the user identifier of the APP refers to the identifier of the user who can represent the APP, and the user name of the APP can be used as the user identifier of the APP, for example, by using the mobile phone number.
  • the mobile phone number is the user ID of WeChat.
  • the Taobao account registered with the mailbox is the user ID of Taobao.
  • the API management device provides a Service Level Agreement (SLA) at the API and APP level in order to protect the application and fair use of the backend application server (AS).
  • SLA Service Level Agreement
  • AS backend application server
  • the APP developer registers the APP on the API management device, it is necessary to set the SLA control of the APP, and to control the SLA of the APP, such as the number of API calls allowed per unit time, etc.
  • the same APP will have multiple users at the same time.
  • the SLA of the APP is a limited resource, and there are competing relationships among multiple users. Therefore, the APP supports users to obtain different Quality of Service (QoS) experiences according to the package and user level when purchasing the APP service.
  • QoS Quality of Service
  • the user level refers to the priority of the user's enjoyment of the service.
  • the user level may include (Very Important Person (VIP) users, gold users, silver users, and bronze users.
  • VIP Very Important Person
  • the VIP user is the highest user level, followed by the gold users, Silver Card users, bronze users.
  • Different user levels correspond to different QoS packages, and each QoS package corresponds to a different QoS service policy.
  • the APP will give priority to VIP users, and users of the same level will use the fairness as much as possible. It is necessary to provide user QoS functions, maintain the SLA of each user, and perform QoS control for different levels of users.
  • the present invention is based on an API management device, and proposes a method for implementing QoS control of an APP user on an API management device, and the APP developer configures a relationship between a user identifier of the APP and a user level, and a user level of the APP.
  • the corresponding level of the QoS control policy is configured to be stored on the API management device or the application APP server.
  • the API call request initiated by the user when the user uses the APP carries the identifier and the user identifier of the APP; that is, when the APP is used.
  • An API call request sent by the user terminal to the API management device the API management device obtains the identifier of the APP and the user identifier of the APP, and queries the user level of the APP and the QoS control policy of the corresponding level, according to the Qos control policy. Perform QoS management.
  • the original APP developer needs to develop a set of user level and QoS management tasks, which are implemented by the API management device.
  • the APP developer only needs to perform the corresponding APP user level and the corresponding level of the Qos control policy configuration when the API is registered. Thereby speeding up the development efficiency of the APP and improving the APP development cycle.
  • the APP user level and the corresponding level of the Qos control policy configuration can be:
  • Gold users 100 times / minute, speed limit 1000 (kbps), direction: up / down;
  • Silver card users 10 times / minute, speed limit 100 (kbps), direction: up / down;
  • An application example of the APP user level and the corresponding level of the Qos control policy can be:
  • the high-level user quota After the high-level user quota is used up, it is allowed to occupy the quota of low-level users.
  • the present invention can be divided into a fully managed scenario, a semi-hosted scenario, and a weakly managed scenario.
  • the fully hosted scenario refers to that the user level of the APP and the corresponding level of the Qos control policy are all managed on the API management device, and the semi-hosted
  • the scenario refers to one of the user level of the APP and the corresponding level of the QoS control policy is hosted on the API management device.
  • the weakly managed scenario refers to the user level of the APP and the corresponding level of the QoS control policy are stored on the APP server. It is not hosted on the API management device.
  • the API management device communicates with the API server through the internet network, thereby enabling the API server to perform functions such as billing.
  • the APP user level and the corresponding level of the Qos control policy are specifically the correspondence between the user identifier of the APP and the user level of the APP, and the correspondence between the user level of the APP and the service quality control policy of the APP.
  • the two correspondences may be recorded in the form of a correspondence relationship table or two correspondence relationship tables; or a correspondence relationship table directly records the user identifier of the APP and the service quality control policy of the APP corresponding to the user, and these
  • the correspondence table is prepared by the APP development manager, and is configured to the API management device when the APP is registered to the API management device, or one of the corresponding relationship tables is configured to the API management device, or both correspondence tables are configured to the APP server. That is, the corresponding hosting situation in the case of fully hosted scenarios, semi-hosted scenarios, and weakly hosted scenarios.
  • FIG. 1 is a schematic diagram of a fully managed scenario in an embodiment of the present invention.
  • an embodiment of a method for quality of service control provided by an embodiment of the present invention includes:
  • the APP registration request and the QoS data are sent to the API management device by the user device used by the APP developer.
  • the Qos data in the embodiment of the present invention includes an APP user level and a corresponding level of the Qos control policy, specifically, a correspondence between the user identifier of the APP and the user level of the APP, and the user level of the APP and the service quality control policy of the APP. Correspondence relationship.
  • the API management device registers the APP according to the registration request, and stores a correspondence between a user identifier of the APP and a user level of the APP, and a user level of the APP and a service quality of the APP.
  • the correspondence of the control policies is related to the API management device.
  • the API management device receives an API call request sent by the user terminal when the application APP is used, where the API call request carries the user identifier of the APP and the identifier of the APP.
  • the API management device acquires, from the API call request, a user identifier of the APP and an identifier of the APP.
  • the user ID of the APP There are two ways to carry the user ID.
  • the user name used by the API management device is used as the user ID of the APP.
  • the APP does not pass the API management device authentication field, and adds the user identification field agreed by both parties in the API request initiated by the APP.
  • HTTP Hypertext transfer protocol
  • Restfull interface can be stored in the Uniform Resource Locator (URL), Header, or Body of the message.
  • the user level of the APP corresponding to the user identifier of the APP is obtained from the correspondence between the user identifier of the APP and the user level of the APP.
  • the service quality control policy of the APP corresponding to the user level of the APP is obtained from a correspondence between a user level of the APP and a quality of service control policy of the APP.
  • the method for controlling the quality of service provided by the embodiment of the present invention can provide service quality control for the APP registered on the API management device, which is faster than the prior art, which requires the APP developer to develop a set of user SLA and QoS management functions. APP development efficiency.
  • the buffer area may also be viewed first, and if the buffer area stores the correspondence between the user identifier of the APP and the user level of the APP, and the APP
  • the correspondence between the user level and the service quality control policy of the APP directly determines the QoS control policy from the buffer area and performs QoS control.
  • the API management device is further configured.
  • Corresponding relationship between the user identifier of the APP and the user level of the APP, and the user of the APP Correspondence between the level and the service quality control policy of the APP.
  • the QoS control can be accelerated. speed. If the APP is enabled for the first time, the corresponding relationship between the user identifier of the APP and the user level of the APP is not stored in the cache area, and the user level of the APP and the service of the APP are not stored.
  • Corresponding relationship between the quality control policy, the user identifier of the APP and the user level of the APP, and the user level of the APP are obtained from other storage devices of the API management device, that is, the non-cache area.
  • Corresponding relationship between the service quality control policy of the APP, and after the obtaining, the correspondence between the user identifier of the APP and the user level of the APP, and the user level of the APP and the service quality control of the APP The correspondence of the policies is stored in a buffer area of the API device. In order to facilitate the next search, it can be directly obtained from the buffer area to improve the speed of QoS control.
  • FIG. 2 An embodiment of a method for increasing quality of service control of a query buffer can be understood with reference to FIG. 2:
  • the API management device receives an API call request of the APP, where the API call request carries the user identifier of the APP and the identifier of the APP.
  • the API management device acquires an identifier of the APP and a user identifier.
  • step S160 Query the service quality control policy corresponding to the user identifier from the buffer area of the API device according to the user identifier. If the query is successful, go to step S165. If the query fails, go to step S170.
  • the service quality control policy is executed to control the quality of service indicated by the user identifier.
  • the API management device will clear the data of the user in the buffer area in time to alleviate the buffer pressure and improve the running speed.
  • the timestamp is recorded.
  • the API management device periodically ages the buffer data, configures the aging period of the buffer data, and compares the recorded timestamps to determine the aging. Clear the aged cache record.
  • the user level of the APP may be obtained from the cache area, and the quality of service control policy of the APP is obtained from the non-cache area or the APP server.
  • FIG. 3 is a schematic diagram of a semi-managed scenario in an embodiment of the present invention.
  • an embodiment of a method for quality of service control provided by an embodiment of the present invention includes:
  • the user registration device used by the APP developer sends an APP registration request to the API management device, and issues Qos data and a first search indication.
  • the QoS data in the embodiment of the present invention includes the APP user level and the QoS control policy of the corresponding level, specifically, the correspondence between the user identifier of the APP and the user level of the APP, and the user level and location of the APP.
  • the first lookup indication identifier is used to indicate that a correspondence between the user identifier of the APP and the user level of the APP needs to be searched from the application server.
  • mapping between the user level of the APP and the service quality control policy of the APP in the embodiment of the present invention is stored on the API management device, and the correspondence between the user identifier of the APP and the user level of the APP is on the APP server. Storage can actually be reversed.
  • the API management device registers the APP according to the registration request, and stores a correspondence between the first lookup indication identifier, a user level of the APP, and a quality of service control policy of the APP.
  • the APP server stores a correspondence between a user identifier of the APP and a user level of the APP.
  • the API management device receives an API call request sent by the user terminal when the user uses the application APP, where the API call request carries the identifier of the APP and the user identifier.
  • the API management device acquires the identifier of the APP and the user identifier from the API call request.
  • the APP does not pass the API management device authentication field, and adds the user identification field agreed by both parties in the API request initiated by the APP.
  • HTTP Hypertext transfer protocol
  • Restfull interface can be stored in the Uniform Resource Locator (URL), Header, or Body of the message.
  • the user level of the APP corresponding to the user identifier of the APP is obtained from the correspondence between the user identifier of the APP and the user level of the APP stored by the API management device.
  • the second lookup indication identifier is used to indicate that the user level of the APP needs to be searched from the application server and the corresponding relationship between the quality of service control policy of the APP.
  • the corresponding relationship between the user level of the APP and the service quality control policy of the APP is stored on the APP server, and the correspondence between the user identifier of the APP and the user level of the APP is stored on the API management device, and
  • the user level of the APP corresponding to the user identifier of the APP is obtained from the corresponding relationship between the user identifier of the APP and the user level of the APP, and the query request is sent to the application server.
  • the user level of the APP is carried in the query request, and the user level of the APP is used by the application server to search for a quality of service control policy of the APP corresponding to the user level of the APP.
  • the method for controlling the quality of service provided by the embodiment of the present invention can provide service quality control for the APP registered on the API management device, which is faster than the prior art, which requires the APP developer to develop a set of user SLA and QoS management functions. APP development efficiency.
  • the buffer area may be viewed first, if the corresponding relationship between the user identifier of the APP and the user level of the APP is stored in the buffer area, and Corresponding relationship between the user level of the APP and the service quality control policy of the APP System, the QoS control policy is determined directly from the buffer area, and QoS control is performed.
  • the local storage or APP is The server obtains a correspondence between the user identifier of the APP and a user level of the APP, and a user level of the APP and a service quality control policy of the APP. In this way, if the correspondence between the user identifier of the APP and the user level of the APP, and the user level of the APP and the service quality control policy of the APP can be obtained directly from the buffer area, the speed of QoS control can be accelerated. .
  • the quality control policy needs to obtain the correspondence between the user identifier of the APP and the user level of the APP, and the user of the APP, from other storage devices of the API management device, that is, the non-cache area or the QPP application server.
  • Level and the quality of service control policy of the APP and after obtaining, the correspondence between the user identifier of the APP and the user level of the APP, and the user level of the APP and the service quality control policy of the APP Stored in the buffer area of the API device.
  • the API management device will clear the data of the user in the buffer area in time to alleviate the buffer pressure and improve the running speed.
  • the API management device periodically ages the buffer data and configures the aging period of the buffer data.
  • the aging judgment is performed by comparing the recorded time stamps. Clear the aged cache record.
  • the user level of the APP may be obtained from the cache area, and the quality of service control policy of the APP is obtained from the non-cache area or the APP server.
  • FIG. 4 is a schematic diagram of a weak hosting scenario in an embodiment of the present invention.
  • an embodiment of a method for quality of service control provided by an embodiment of the present invention includes:
  • the management device sends an APP registration request and issues Qos data.
  • the QoS data in the embodiment of the present invention includes the APP user level and the QoS control policy of the corresponding level, specifically, the correspondence between the user identifier of the APP and the user level of the APP, and the user level and location of the APP.
  • the correspondence between the user identifier of the APP and the user level of the APP, and the correspondence between the user level of the APP and the service quality control policy of the APP are all stored on the APP server.
  • the API management device registers the APP according to the registration request.
  • the APP server stores a correspondence between a user identifier of the APP and a user level of the APP, and a correspondence between a user level of the APP and a service quality control policy of the APP.
  • the API management device receives an API call request sent by the user terminal when the application APP is used, where the API call request carries the user identifier of the APP and the identifier of the APP.
  • the API management device acquires a user identifier and a user identifier of the APP from the API call request.
  • the API management device uses the user name registered by the APP as the user ID.
  • the APP does not pass the API management device authentication field, and adds the user identification field agreed by both parties in the API request initiated by the APP.
  • HTTP Hypertext transfer protocol
  • Restfull interface can be stored in the Uniform Resource Locator (URL), Header, or Body of the message.
  • S325 Send a query request to the application server, where the query request carries a user identifier of the APP, where the user identifier is used by the application server to search for a user level of an APP corresponding to the user identifier of the APP, and The service quality control policy of the APP corresponding to the user level of the APP receives the query response message sent by the application server, where the query response message carries the service quality control policy of the APP.
  • the method for quality of service control provided by the embodiment of the invention can provide service quality control for an APP registered on an API management device, and accelerates the development efficiency of the APP.
  • the buffer area may also be viewed first, and if the buffer area stores the correspondence between the user identifier of the APP and the user level of the APP, and the APP
  • the correspondence between the user level and the service quality control policy of the APP directly determines the QoS control policy from the buffer area and performs QoS control.
  • the corresponding relationship between the user identifier of the APP and the user level of the APP, and the correspondence between the user level of the APP and the service quality control policy of the APP is not stored in the cache area, and then obtained from the application server.
  • the correspondence between the user identifier of the APP and the user level of the APP, and the correspondence between the user level of the APP and the service quality control policy of the APP are stored in the API device.
  • the cache area In order to facilitate the next search, it can be directly obtained from the buffer area to improve the speed of QoS control.
  • the process of querying from the buffer area it can be understood by referring to the description in the part of FIG. 2, except that the steps of S170 in FIG. 2 may be all queried from the APP server.
  • the API management device will clear the data of the user in the buffer area in time to alleviate the buffer pressure and improve the running speed.
  • the API management device periodically ages the buffer data and configures the aging period of the buffer data.
  • the aging judgment is performed by comparing the recorded time stamps. Clear the aged cache record.
  • the correspondence between the user identifier and the user level may be also included, and the correspondence between the user level and the service quality control policy is simultaneously stored on the API management device and the application server.
  • FIG. 5 is a schematic diagram of an embodiment of a method for quality of service control according to an embodiment of the present invention. As shown in FIG. 5, an embodiment of a method for quality of service control in an embodiment of the present invention includes:
  • the API management device that provides an open application programming interface API for the application APP, when the application application is used, triggers an API call request sent by the user terminal, where the API call request carries the user identifier of the APP and the identifier of the APP. .
  • the API management device acquires a service quality control policy of the APP according to the identifier of the APP and the user identifier of the APP.
  • the API management device controls, according to the quality of service control policy of the APP, a service quality of the user indicated by the user identifier.
  • the embodiment of the present invention adopts an API management device that provides an open application programming interface API for an application APP, and receives an API call request sent by the user terminal when the application APP is used, where the API call request carries the user identifier of the APP and the The identifier of the APP is obtained, and the service quality control policy of the APP is obtained according to the identifier of the APP and the user identifier of the APP; and the quality of service indicated by the user identifier is controlled according to the service quality control policy of the APP.
  • the service quality control method provided by the embodiment of the present invention can provide service quality control for the APP registered on the API management device, and accelerates the APP, as compared with the prior art, which requires the APP developer to develop a user's QoS management function. Development efficiency. Moreover, APP developers only need to perform simple configuration during API registration, which further reduces the requirements for APP developers' experience and skills, lowers the threshold for APP developers, saves the development and testing cycle of APP, and makes APP faster. Listing, occupying market opportunities.
  • the identifier according to the APP and the APP are
  • the user identifier, the service quality control policy of the APP may include:
  • the embodiment of the present invention provides a scheme when the user ranks.
  • the method may further include:
  • the embodiment of the present invention is a service quality control scheme in a full-hosting scenario, and the correspondence between the user identifier and the user level, and the correspondence between the user level and the service quality control policy are all managed on the API management device, and the API call can be improved. s efficiency.
  • the identifier according to the APP is selected, according to the second optional embodiment corresponding to FIG.
  • the user identifier of the APP, and the user level of the APP corresponding to the user identifier of the APP may include:
  • the user identifier corresponding to the APP is obtained from the cached data.
  • the cached data of the corresponding relationship between the user identifier of the APP and the user level of the APP does not exist in the buffer area of the API management device, the user identifier of the APP that has been stored in the non-cache area Obtaining a user level of the APP corresponding to the user identifier of the APP, in a corresponding relationship with a user level of the APP;
  • the obtaining the service quality control policy of the APP corresponding to the user level of the APP according to the user level of the APP includes:
  • the service quality control policy of the APP corresponding to the user level of the APP is obtained from the non-cache area.
  • a buffer area is set in the API management device, and if the buffer area stores the correspondence between the user identifier of the APP and the user level of the APP, and the user level of the APP and the APP.
  • the corresponding relationship of the service quality control policy is directly obtained from the cache area, and the efficiency of the service quality control policy can be improved. If there is no storage in the buffer area, it is obtained from the non-cache area of the API management device.
  • the method further includes:
  • Corresponding relationship between the user identifier of the APP and the user level of the APP, and the correspondence between the user level of the APP and the service quality control policy of the APP are stored in a buffer area of the API management device.
  • the correspondence between the user identifier of the APP and the user level of the APP is obtained from the non-cache area, and the correspondence between the user level of the APP and the service quality control policy of the APP is stored in the buffer area. In order to facilitate the next time the same APP is used, it can be quickly obtained.
  • the method may further include:
  • the embodiment of the present invention is a service quality control scheme in a semi-hosted scenario, and the correspondence between the user level of the APP and the service quality control policy of the APP may be dragged on the API management device.
  • the identifier according to the APP is selected, according to the fourth optional embodiment corresponding to the foregoing FIG.
  • the user identifier of the APP, and the user level of the APP corresponding to the user identifier of the APP may include:
  • the user identifier corresponding to the APP is obtained from the cached data.
  • the cached data of the correspondence between the user identifier of the APP and the user level of the APP does not exist in the buffer area of the API management device, send a query to the application server according to the first lookup indication identifier.
  • the query request carries a user identifier of the APP
  • the user identifier of the APP is used by the application server to search for a user level of the APP corresponding to the user identifier of the APP
  • the obtaining the service quality control policy of the APP corresponding to the user level of the APP according to the user level of the APP may include:
  • the service quality control policy of the APP corresponding to the user level of the APP is obtained from the buffer area;
  • the service quality control policy of the APP corresponding to the user level of the APP is obtained from the non-cache area.
  • the method further includes:
  • Corresponding relationship between the user identifier of the APP and the user level of the APP, and the correspondence between the user level of the APP and the service quality control policy of the APP are stored in a buffer area of the API management device.
  • the correspondence between the user identifier of the APP and the user level of the APP is obtained from the non-cache area, and the correspondence between the user level of the APP and the service quality control policy of the APP is stored in the buffer area. In order to facilitate the next time the same APP is used, it can be quickly obtained.
  • the embodiment of the present invention provides in a sixth optional embodiment of the method for providing quality of service control, before the receiving application APP is used to trigger an API call request sent by the user terminal, the method further includes:
  • the embodiment of the present invention is a service quality control scheme in a semi-hosted scenario, and the correspondence between the user identifier of the APP and the user level of the APP may be dragged on the API management device.
  • the identifier according to the APP is And the user identifier of the APP, and the user level of the APP corresponding to the user identifier of the APP may include:
  • the user identifier corresponding to the APP is obtained from the cached data.
  • the cached data of the corresponding relationship between the user identifier of the APP and the user level of the APP does not exist in the buffer area of the API management device, the user identifier of the APP that has been stored in the non-cache area Obtaining a user level of the APP corresponding to the user identifier of the APP, in a corresponding relationship with a user level of the APP;
  • the obtaining the service quality control policy of the APP corresponding to the user level of the APP according to the user level of the APP may include:
  • the service quality control policy of the APP corresponding to the user level of the APP is obtained from the buffer area;
  • the query request is sent to the application server according to the second lookup indication identifier, where the query request carries the user level of the APP, and the APP User level for the application server to find the user level corresponding to the APP
  • the service quality control policy of the APP is received by the application server, and the query response message carries the service quality control policy of the APP.
  • the method further includes:
  • Corresponding relationship between the user identifier of the APP and the user level of the APP, and the correspondence between the user level of the APP and the service quality control policy of the APP are stored in a buffer area of the API management device.
  • the correspondence between the user identifier of the APP and the user level of the APP is obtained from the non-cache area, and the correspondence between the user level of the APP and the service quality control policy of the APP is stored in the buffer area. In order to facilitate the next time the same APP is used, it can be quickly obtained.
  • the method may further include:
  • the third lookup indication identifier is used to indicate a correspondence between a user identifier of the APP and an application level of the APP from an application server, and Corresponding relationship between the user level of the APP and the service quality control policy of the APP;
  • the user according to the APP is provided on the basis of the eighth optional embodiment corresponding to FIG. And obtaining the user level of the APP corresponding to the user identifier of the APP, and acquiring the service quality control policy of the APP corresponding to the user level of the APP according to the user level of the APP, which may include:
  • the user identifier corresponding to the APP is obtained from the cached data.
  • a user level of the APP the service quality control policy of the APP corresponding to the user level of the APP is obtained from the buffer area;
  • the cached data of the correspondence between the user identifier of the APP and the user level of the APP does not exist in the buffer area of the API management device, send a query to the application server according to the third lookup indication identifier.
  • the query request carries a user identifier of the APP
  • the user identifier of the APP is used by the application server to search for a user level of the APP corresponding to the user identifier of the APP, and a user level of the APP And corresponding to the service quality control policy of the APP, receiving a query response message sent by the application server, where the query response message carries a service quality control policy of the APP.
  • the method further includes:
  • Corresponding relationship between the user identifier of the APP and the user level of the APP, and the correspondence between the user level of the APP and the service quality control policy of the APP are stored in a buffer area of the API management device.
  • the correspondence between the user identifier of the APP and the user level of the APP is obtained from the non-cache area, and the correspondence between the user level of the APP and the service quality control policy of the APP is stored in the buffer area. In order to facilitate the next time the same APP is used, it can be quickly obtained.
  • the embodiment of the present invention is a weak hosting scenario scheme in the foregoing embodiment.
  • the method may further include:
  • Corresponding relationship between the user identifier of the APP and the user level of the APP, and the correspondence between the user level of the APP and the service quality control policy of the APP are stored in a buffer area of the API management device.
  • the method may further include:
  • the user name of the APP is obtained as the user identifier
  • the user identifier is obtained from an appointment field pre-agreed with the user terminal.
  • the user identifier may be obtained according to the authentication status of the APP.
  • the method may further include:
  • the related data of the user in the buffer area can be cleared in time to reduce the pressure of the buffer area and improve the running speed.
  • the embodiment of the foregoing FIG. may further include:
  • the expired data is cleared from the buffer area of the API management device according to the time stamp.
  • the data generated by the APP for the user may be added to the buffer, and time stamps are set for the data of the user, and the cached data is periodically aged and configured.
  • the aging period of the buffer data is judged by comparing the recorded timestamps. Clear the aged cache record.
  • FIG. 5 The corresponding embodiment or the alternative embodiment of FIG. 5 can be understood by referring to the description in FIG. 1 to FIG. 4, and no further description is made herein.
  • FIG. 6 another embodiment of a method for quality of service control provided by an embodiment of the present invention includes:
  • the API management device that provides an open application programming interface API for the application APP receives an API call request sent by the user terminal when the user uses the application APP, where the API call request carries the identifier of the APP and the user of the APP. The rating of the rating.
  • Control according to the quality of service control policy of the APP, the user indicated by the user identifier. Quality of service.
  • an API management device that provides an open application programming interface API for an application APP receives an API call request sent by a user terminal when the user uses the application APP, where the API call request carries the identifier and the location of the APP.
  • the identifier of the user level of the APP is obtained;
  • the service quality control policy of the APP corresponding to the user level of the APP is obtained according to the identifier of the APP and the identifier of the user level of the APP; and the quality of service control is controlled according to the APP
  • the policy controls the quality of service of the indicated user of the user identifier.
  • the method for controlling the quality of service provided by the embodiment of the present invention can provide service quality control for the APP registered on the API management device, which is faster than the prior art, which requires the APP developer to develop a set of user SLA and QoS management functions.
  • APP development efficiency Moreover, APP developers only need to perform simple configuration during API registration, which further reduces the requirements for APP developers' experience and skills, lowers the threshold for APP developers, saves the development and testing cycle of APP, and makes APP faster. Listing, occupying market opportunities.
  • the identifier of the APP and the user level according to the APP the service quality control policy of the APP corresponding to the user level of the APP, including:
  • the user level corresponding to the APP is obtained from the cached data.
  • the cached data of the corresponding relationship of the quality of service control policy of the APP corresponding to the user level of the APP does not exist in the buffer area of the API management device, the user of the APP that has been stored from the non-cache area
  • the service quality control policy of the APP corresponding to the user level of the APP is obtained in the correspondence between the service quality control policies of the APP corresponding to the level.
  • the embodiment of the present invention is a service quality control scheme in a full-hosting scenario, and the correspondence between the user-level identifier and the service quality control policy can be all managed on the API management device, which can improve the efficiency of the API call.
  • the identifier according to the APP and the APP are optionally used on the basis of the foregoing embodiment corresponding to FIG.
  • the identifier of the user level, and the service quality control policy of the APP corresponding to the user level of the APP may include:
  • the user level corresponding to the APP is obtained from the cached data.
  • the embodiment of the present invention is a service quality control scheme in a weak pipe scenario, and the service quality control policy corresponding to the identifier of the user level may be stored on the App server.
  • the solution of the service quality control provided by the embodiment of the present invention is not fully listed, and the solution of the service quality control provided by the embodiment of the present invention may also include any alternative in the embodiment corresponding to FIG. 5, such as : Cache scheme, regular cleaning scheme, etc.
  • Cache scheme regular cleaning scheme
  • FIG. 5 These optional schemes can be understood by referring to the relevant descriptions in the parts of Figure 1 to Figure 4, and will not be repeated here.
  • the scheme for determining the service quality control policy by using the identifier of the user level may be used in a local area network or in a quarantined area (DMZ, Demilitarized Zone) in a securely isolated network environment: the identifier of the user level is directly in the request. Carrying, the user's logo is optional. It may also be that the identifier of the user level is directly carried in the ciphertext of the request during the network transmission, and the identifier of the user may be optional. The user level identifier is directly carried in the request in plain text or cipher text, and the user's logo may be optional.
  • FIG. 7 is a schematic diagram of an embodiment of an API management device 50 according to an embodiment of the present invention. As shown in FIG. 7, an embodiment of the API management device 50 includes:
  • the receiving module 501 is configured to obtain, according to the identifier of the APP and the user identifier of the APP, the user level of the APP corresponding to the user identifier of the APP;
  • the obtaining module 502 is configured to obtain a service quality control policy of the APP according to the identifier of the APP and the user identifier of the APP received by the receiving module.
  • the control module 503 is configured to control the quality of service indicated by the user identifier according to the quality of service control policy of the APP acquired by the obtaining module 502.
  • the API management device provided by the embodiment of the present invention includes: the receiving module 501, according to the identifier of the APP and the user identifier of the APP, the user level of the APP corresponding to the user identifier of the APP;
  • the module 502 acquires a service quality control policy of the APP according to the identifier of the APP and the user identifier of the APP, and the control module 503 is configured to obtain the APP according to the acquiring module 502.
  • a quality of service control policy controls the quality of service of the user indicated by the user identifier.
  • the API management device provided by the embodiment of the present invention can provide the service quality control for the APP registered on the API management device, and accelerate the development of the APP. effectiveness.
  • the obtaining module 502 includes:
  • the first obtaining sub-module 5021 is configured to obtain, according to the identifier of the APP and the user identifier of the APP, the user level of the APP corresponding to the user identifier of the APP;
  • the second obtaining sub-module 5022 is configured to obtain, according to the user level of the APP acquired by the first acquiring sub-module, a service quality control policy of the APP corresponding to the user level of the APP.
  • the API management device 50 further includes a first registration.
  • the receiving module 501 is further configured to receive a registration request of the APP, and receive a correspondence between a user identifier of the APP and a user level of the APP, and a user level of the APP and a service quality of the APP. Correspondence of control strategies;
  • the first registration module 505 is configured to register the APP according to the registration request received by the receiving module 501.
  • the first storage module 506 is configured to store a correspondence between a user identifier of the APP received by the receiving module 501 and a user level of the APP, and a user level of the APP and the APP Correspondence of service quality control strategies.
  • the first obtaining sub-module 5021 is configured to: if the cached data of the correspondence between the user identifier of the APP and the user level of the APP exists in a buffer area of the API management device, the cached data is obtained from the cached data. Obtaining a user level of the APP corresponding to the user identifier of the APP; if there is no cache data of a correspondence between the user identifier of the APP and the user level of the APP in the buffer area of the API management device, Obtaining, from the corresponding relationship between the user identifier of the APP and the user level of the APP that is stored in the non-cache area, acquiring the user level of the APP corresponding to the user identifier of the APP
  • the second obtaining sub-module 5022 is specifically configured to: when obtaining the user level of the APP from the buffer area, obtain the service quality control of the APP corresponding to the user level of the APP from the buffer area. a policy of obtaining a quality of service of the APP corresponding to a user level of the APP from the non-cache area when the user level of the APP is obtained from the non-cache area.
  • the API management device further includes a second registration module. 507 and a second storage module 508,
  • the receiving module 501 is further configured to receive a registration request of the APP, and receive a first search indication identifier, a correspondence between a user level of the APP, and a quality of service control policy of the APP, where the first search indication is The identifier is used to indicate a correspondence between a user identifier of the APP that needs to be searched from the application server and a user level of the APP;
  • the second registration module 507 is configured to register the APP according to the registration request received by the receiving module 501.
  • the second storage module 508 is configured to store the first lookup indication identifier received by the receiving module 501, the correspondence between the user level of the APP and the service quality control policy of the APP.
  • the first obtaining submodule 5021 is specifically configured to be stored in a buffer area of the API management device. And the cached data of the corresponding relationship between the user identifier of the APP and the user level of the APP, the user level of the APP corresponding to the user identifier of the APP is obtained from the cached data; if the API is managed in the API If the cached data of the corresponding relationship between the user identifier of the APP and the user level of the APP does not exist in the buffer area of the device, the query request is sent to the application server according to the first lookup indication identifier, and the query request is sent.
  • the second obtaining sub-module 5022 is specifically configured to: when obtaining the user level of the APP from the buffer area, obtain the service quality control of the APP corresponding to the user level of the APP from the buffer area.
  • the policy of obtaining the quality of service of the APP corresponding to the user level of the APP is obtained from the non-cache area when the user level of the APP is obtained from the application server.
  • the API management device further includes a third registration module. 509 and a third storage module 511,
  • the receiving module 501 is configured to receive a registration request of the APP, and receive a second lookup indication identifier, a correspondence between a user identifier of the APP and a user level of the APP, where the second lookup indication identifier is used for Instructing to search for a correspondence between a user level of the APP and a quality of service control policy of the APP from an application server;
  • the third registration module 509 is configured to register the APP according to the registration request received by the receiving module 501.
  • the third storage module 511 is configured to store, by the receiving module 501, the second lookup indication identifier received by the module, the correspondence between the user identifier of the APP and the user level of the APP.
  • the first obtaining sub-module 5021 is configured to: if the cached data of the correspondence between the user identifier of the APP and the user level of the APP exists in a buffer area of the API management device, the cached data is obtained from the cached data. Obtaining a user level of the APP corresponding to the user identifier of the APP; The cached data of the corresponding relationship between the user identifier of the APP and the user level of the APP does not exist in the buffer area of the API management device, and the user identifier of the APP stored in the non-cache area and the APP are The user level of the APP corresponding to the user identifier of the APP is obtained in the corresponding relationship of the user level;
  • the second obtaining sub-module 5022 is specifically configured to: when obtaining the user level of the APP from the buffer area, obtain the service quality control of the APP corresponding to the user level of the APP from the buffer area.
  • a policy when the user level of the APP is obtained from the non-cache area, sending a query request to the application server according to the second lookup indication identifier, where the query request carries the user level of the APP,
  • the user level of the APP is used by the application server to search for a quality of service control policy of the APP corresponding to the user level of the APP; and receiving a query response message sent by the application server, where the query response message carries the APP Service quality control strategy.
  • the API management device further includes a fourth registration module. 512 and fourth storage module 513,
  • the receiving module 501 is further configured to receive a registration request of the APP, and receive a third lookup indication identifier, where the third lookup indication identifier is used to indicate that the user identifier of the APP is searched from the application server and the APP Correspondence of the user level, and the correspondence between the user level of the APP and the service quality control policy of the APP;
  • the fourth registration module 512 is configured to register the APP according to the registration request received by the receiving module;
  • the fourth storage module 513 is configured to store the third lookup indication identifier received by the receiving module 501.
  • the first obtaining sub-module 5021 is configured to: if the cached data of the correspondence between the user identifier of the APP and the user level of the APP exists in a buffer area of the API management device, from the cached data. Obtaining a user level of the APP corresponding to the user identifier of the APP;
  • the second obtaining submodule 5022 is specifically configured to: when the APP is obtained from the cached data When the user identifier of the APP corresponding to the user identifier is obtained, the service quality control policy of the APP corresponding to the user level of the APP is obtained from the buffer area; or, if not in the buffer area of the API management device And the cached data of the corresponding relationship between the user identifier of the APP and the user level of the APP, and sending a query request to the application server according to the third lookup indication identifier, where the query request carries the APP a user identifier, the user identifier of the APP is used by the application server to search for a user level of the APP corresponding to the user identifier of the APP, and a quality of service control policy of the APP corresponding to the user level of the APP, and receiving The query response message sent by the application server, where the query response message carries the quality of service control policy of the APP.
  • the control module 503 is further configured to: when the quality of service control policy of the APP is not obtained from the buffer, the correspondence between the user identifier of the APP and the user level of the APP, and the APP The correspondence between the user level and the service quality control policy of the APP is stored in the buffer area of the API management device.
  • the API The management device also includes a first cleaning module 514,
  • the receiving module 501 is further configured to receive a offline request of the APP sent by the user terminal;
  • the first cleaning module 514 is configured to: after the receiving module 501 receives the offline request of the APP, clear data corresponding to the user identifier from a buffer area of the API management device.
  • the API is The management device further includes an adding module 515, a setting module 516, and a second cleaning module 517,
  • the adding module 515 is configured to add data corresponding to the user identifier generated by the APP operation received by the receiving module 501 to a buffer area of the API management device;
  • the setting module 516 is configured to set a time stamp for the data added to the cache by the adding module 515;
  • the second cleaning module 517 is configured to set according to the setting module 516 after the preset time is reached. Time stamp to clear out stale data from the cache of the API management device.
  • the API management device also includes a confirmation module 518,
  • the confirmation module element 518 is configured to confirm whether the APP is authenticated
  • the first obtaining sub-module 502 is further configured to: when the confirmation module 518 confirms that the authentication is performed, obtain the user name of the APP as the user identifier; when not authenticated, from an agreement agreed in advance with the user terminal.
  • the user ID is obtained in the field.
  • the API management device described in FIG. 7 to FIG. 15 can be understood by referring to the description in the parts of FIG. 1 to FIG. 5, and no further description is made herein.
  • FIG. 16 another embodiment of an API management device provided by an embodiment of the present invention includes:
  • the receiving module 521 is configured to receive an API call request sent by the user terminal when the user uses the application APP, where the API call request carries an identifier of the APP and an identifier of a user level of the APP;
  • the obtaining module 522 is configured to obtain, according to the identifier of the APP and the identifier of the user level of the APP, the service quality control policy of the APP corresponding to the user level of the APP;
  • the control module 523 is configured to control the quality of service indicated by the user identifier according to the quality of service control policy of the APP acquired by the acquiring module 522.
  • the receiving module 521 is configured to: when the user uses the application APP, trigger an API call request sent by the user terminal, where the API call request carries an identifier of the APP and an identifier of a user level of the APP;
  • the obtaining module 522 is configured to obtain, according to the identifier of the APP and the identifier of the user level of the APP, the service quality control policy of the APP corresponding to the user level of the APP, and the control module 523. And controlling, according to the quality of service control policy of the APP acquired by the obtaining module 522, a quality of service of the user indicated by the user identifier.
  • the method for controlling the quality of service provided by the embodiment of the present invention can provide service quality control for the APP registered on the API management device, which is faster than the prior art, which requires the APP developer to develop a set of user SLA and QoS management functions.
  • APP development efficiency Moreover, APP developers only need to register at the API. Simple configuration can further reduce the requirements for APP developers' experience and skills, lower the threshold for APP developers, save the development and testing cycle of APP, and make APP appear faster and take the lead in the market.
  • the obtaining module 522 is specifically configured to: if the cached data of the corresponding relationship between the service quality control policies of the APP corresponding to the user level of the APP exists in the buffer area of the API management device, the cached data is obtained from the cached data. Obtaining a service quality control policy of the APP corresponding to the user level of the APP; if there is no corresponding service quality control policy of the APP corresponding to the user level of the APP in the buffer area of the API management device. The cached data of the relationship, the service quality of the APP corresponding to the user level of the APP is obtained from the correspondence between the quality of service policies of the APP corresponding to the user level of the APP that is stored in the non-buffer area. Control Strategy.
  • the obtaining module 522 is specifically configured to: if the cached data of the corresponding relationship between the service quality control policies of the APP corresponding to the user level of the APP exists in the buffer area of the API management device, the cached data is obtained from the cached data. Obtaining a service quality control policy of the APP corresponding to the user level of the APP; if there is no corresponding service quality control policy of the APP corresponding to the user level of the APP in the buffer area of the API management device
  • the cached data of the relationship is sent to the application server, where the query request carries the identifier of the user level of the APP, and the identifier of the user level of the APP is used by the application server to search for the user level of the APP.
  • the service quality control policy of the APP is received; the query response message sent by the application server is received, and the query response message carries the service quality control policy of the APP corresponding to the user level of the APP.
  • the receiving and transmitting functions in the receiving module, the first obtaining sub-module, and the second obtaining sub-module may be input/output.
  • the I/O device such as a network card
  • the registration module, the adding module, the setting module, the first cleaning module, and the second cleaning module may be implemented by the processor executing a program or an instruction in the memory (in other words, by the processor) And interworking with special instructions in the memory coupled to the processor
  • the receiving and transmitting functions in the receiving module, the first obtaining submodule, and the second obtaining submodule may be implemented by an input/output I/O device (such as a network card), and registration
  • the module, the adding module, the setting module, the first cleaning module, and the second cleaning module can also be implemented by using a dedicated circuit.
  • the receiving and transmitting functions in the first obtaining submodule and the second obtaining submodule may be implemented by an input/output I/O device (such as a network card), a registration module, an adding module, a setting module, a first cleaning module, and a first
  • the second cleaning module can also be implemented by a Field-Programmable Gate Array (FPGA).
  • FPGA Field-Programmable Gate Array
  • This embodiment provides a hardware structure of an API management device.
  • the hardware structure of an API management device may include:
  • Transceiver device software device and hardware device
  • the transceiver device is a hardware circuit for completing packet transmission and reception
  • Hardware devices can also be called “hardware processing modules", or simpler, or simply “hardware”. Hardware devices mainly include dedicated hardware circuits based on FPGAs, ASICs (and other supporting devices, such as memory). The hardware circuits of certain functions are often processed much faster than general-purpose processors, but once the functions are customized, they are difficult to change. Therefore, they are not flexible to implement and are usually used to handle some fixed functions. It should be noted that the hardware device may also include an MCU (microprocessor, such as a single chip microcomputer) or a processor such as a CPU in practical applications, but the main function of these processors is not to complete the processing of big data, but mainly used for processing. Some control is performed. In this application scenario, the system that is paired with these devices is a hardware device.
  • MCU microprocessor, such as a single chip microcomputer
  • Software devices mainly include general-purpose processors (such as CPU) and some supporting devices (such as memory, hard disk and other storage devices), which can be programmed to let the processor have the corresponding processing functions.
  • general-purpose processors such as CPU
  • some supporting devices such as memory, hard disk and other storage devices
  • the processed data can be sent through the transceiver device through the hardware device, or the processed data can be sent to the transceiver device through an interface connected to the transceiver device.
  • the transceiver device is configured to perform the sending of the query request and the information receiving in the foregoing embodiment, and the software device or the hardware device is used for APP registration, service quality control, and the like.
  • the receiving and transmitting functions in the receiving module, the first obtaining sub-module and the second acquiring sub-module may be implemented by an input/output I/O device (such as a network card), a registration module, an adding module, and a setting module.
  • the first cleaning module and the second cleaning module may be described in detail by a technical solution that can be implemented by a processor executing a program or instruction in a memory:
  • FIG. 18 is a schematic structural diagram of an API management device 50 according to an embodiment of the present invention.
  • the API management device 50 includes a processor 510, a memory 550, and an input/output I/O device 530, which may include read only memory and random access memory, and provides operational instructions and data to the processor 510.
  • a portion of the memory 550 may also include non-volatile random access memory (NVRAM).
  • NVRAM non-volatile random access memory
  • the memory 550 stores elements, executable modules or data structures, or a subset thereof, or their extension set:
  • the operation instruction can be stored in the operating system
  • the service quality control method provided by the embodiment of the present invention can provide service quality control for the APP registered on the API management device, and accelerate The development efficiency of the APP.
  • APP developers only need to perform simple configuration when the API is registered, further reducing the requirements for APP developers' experience and skills. Reduce the threshold of APP developers; save the development and testing cycle of APP, make APP more fast, and take the lead in the market.
  • the processor 510 controls the operation of the API management device 50, which may also be referred to as a CPU (Central Processing Unit).
  • Memory 550 can include read only memory and random access memory and provides instructions and data to processor 510. A portion of the memory 550 may also include non-volatile random access memory (NVRAM).
  • the components of the API management device 50 are coupled together by a bus system 520 in a specific application.
  • the bus system 520 may include a power bus, a control bus, a status signal bus, and the like in addition to the data bus. However, for clarity of description, various buses are labeled as bus system 520 in the figure.
  • Processor 510 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 510 or an instruction in a form of software.
  • the processor 510 described above may be a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or discrete hardware. Component.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA off-the-shelf programmable gate array
  • the methods, steps, and logical block diagrams disclosed in the embodiments of the present invention may be implemented or carried out.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present invention may be directly implemented by the hardware decoding processor, or may be performed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a conventional storage medium such as random access memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory, registers, and the like.
  • the storage medium is located in the memory 550, and the processor 510 reads the information in the memory 550 and performs the steps of the above method in combination with its hardware.
  • the identifier of the APP acquires a user level corresponding to the user identifier of the APP.
  • the processor 510 is specifically configured to acquire, according to the identifier of the APP and the user identifier of the APP, a user level of the APP corresponding to the user identifier of the APP;
  • the I/O device 530 is further configured to receive a registration request of the APP, and receive the APP. Correspondence between the user identifier and the user level of the APP, and the correspondence between the user level of the APP and the service quality control policy of the APP;
  • the processor 510 is further configured to register the APP according to the registration request;
  • the memory 550 is further configured to store a correspondence between a user identifier of the APP and a user level of the APP, and a correspondence between a user level of the APP and a quality of service control policy of the APP to the API management. device.
  • the processor 510 is specifically configured to:
  • the user identifier corresponding to the APP is obtained from the cached data.
  • the cached data of the corresponding relationship between the user identifier of the APP and the user level of the APP does not exist in the buffer area of the API management device, the user identifier of the APP that has been stored in the non-cache area Obtaining a user level of the APP corresponding to the user identifier of the APP, in a corresponding relationship with a user level of the APP;
  • the service quality control policy of the APP corresponding to the user level of the APP is obtained from the buffer area;
  • the service quality control policy of the APP corresponding to the user level of the APP is obtained from the non-cache area.
  • the I/O device 530 is further configured to receive a registration request of the APP, and receive a first lookup indication identifier, a correspondence between a user level of the APP, and a quality of service control policy of the APP, where a lookup indication identifier is used to indicate that a correspondence between the user identifier of the APP and the user level of the APP needs to be searched from the application server;
  • the processor 510 is further configured to register the APP according to the registration request;
  • the memory 550 is further configured to store, by the first lookup indication identifier, a correspondence between a user level of the APP and a quality of service control policy of the APP, to the API management device.
  • the processor 510 is specifically configured to:
  • the user identifier of the APP is obtained from the cached data. Knowing the user level of the corresponding APP;
  • the I/O device 530 is used according to the first lookup indication identifier.
  • the application server sends a query request, where the query request carries the user identifier of the APP, and the user identifier of the APP is used by the application server to search for the user level of the APP corresponding to the user identifier of the APP;
  • the query response message sent by the application server, where the query response message carries the user level of the APP;
  • the service quality control policy of the APP corresponding to the user level of the APP is obtained from the buffer area;
  • the service quality control policy of the APP corresponding to the user level of the APP is obtained from the non-cache area.
  • the I/O device 530 is further configured to receive a registration request of the APP, and receive a second lookup indication identifier, a correspondence between a user identifier of the APP and a user level of the APP, and the second search
  • the indication identifier is used to indicate a correspondence between a user level of the APP that needs to be searched from the application server and a quality of service control policy of the APP;
  • the processor 510 is further configured to register the APP according to the registration request;
  • the memory 550 is further configured to store the correspondence between the second lookup indication identifier, the user identifier of the APP, and the user level of the APP to the API management device.
  • the processor 510 is specifically configured to:
  • the user identifier corresponding to the APP is obtained from the cached data.
  • the cached data of the corresponding relationship between the user identifier of the APP and the user level of the APP does not exist in the buffer area of the API management device, the user identifier of the APP that has been stored in the non-cache area Obtaining a user level of the APP corresponding to the user identifier of the APP, in a corresponding relationship with a user level of the APP;
  • the service quality control policy of the APP corresponding to the user level of the APP is obtained from the buffer area;
  • the query request is sent to the application server by using the I/O device 530 according to the second lookup indication identifier, where the query request carries the APP.
  • the user level of the APP is used by the application server to search for a quality of service control policy of the APP corresponding to the user level of the APP; and receiving a query response message sent by the application server, the query response message
  • the service quality control policy of the APP is carried in the middle.
  • the I/O device 530 is further configured to receive a registration request of the APP, and receive a third lookup indication identifier, where the third lookup indication identifier is used to indicate that the user identifier of the APP is searched from an application server. Corresponding relationship between the user level of the APP and the corresponding relationship between the user level of the APP and the service quality control policy of the APP;
  • the processor 510 is further configured to register the APP according to the registration request;
  • the memory 550 is further configured to store the third lookup indication identifier to the API management device.
  • the I/O device 530 is specifically configured to:
  • the user identifier corresponding to the APP is obtained from the cached data.
  • a user level of the APP the service quality control policy of the APP corresponding to the user level of the APP is obtained from the buffer area;
  • the I/O device 530 is used according to the third lookup indication identifier.
  • the application server sends a query request, where the query request carries the user identifier of the APP, and the user identifier of the APP is used by the application server to search for the user level of the APP corresponding to the user identifier of the APP, and
  • the service quality control policy of the APP corresponding to the user level of the APP receives the query response message sent by the application server, where the query response message carries the service quality control policy of the APP.
  • the processor 510 is further configured to: when the quality of service control policy of the APP is not obtained from the buffer, the correspondence between the user identifier of the APP and the user level of the APP, and the The correspondence between the user level of the APP and the quality of service control policy of the APP is stored in a buffer area of the API management device.
  • the processor 510 is further configured to confirm whether the APP is authenticated; when authenticated, obtain The user name of the APP is used as the user identifier; when not authenticated, the user identifier is obtained from an appointment field pre-agreed with the user terminal.
  • the I/O device 530 is further configured to receive a offline request of the APP sent by the user terminal;
  • the processor 510 is further configured to clear data corresponding to the user identifier from a buffer area of the API management device.
  • the processor 510 is further configured to add data corresponding to the user identifier generated by the APP running to a buffer area of the API management device, and set a time stamp for the data; after the preset time is reached, According to the time stamp, outdated data is cleared from the buffer area of the API management device.
  • the API management device provided by the embodiment of the present invention refers to FIG. 18.
  • the operation instruction can be stored in the operating system
  • the I/O device 530 Receiving, by the I/O device 530, an API call request sent by the user terminal when the user uses the application APP, where the API call request carries the identifier of the APP and the identifier of the user level of the APP; according to the identifier of the APP And the identifier of the user level of the APP, the service quality control policy of the APP corresponding to the user level of the APP is obtained; and the service quality of the user indicated by the user identifier is controlled according to the service quality control policy of the APP.
  • the processor 510 is specifically configured to: if the cached data of the correspondence between the quality of service control policies of the APP corresponding to the user level of the APP exists in a buffer area of the API management device, Obtaining, in the data, a service quality control policy of the APP corresponding to the user level of the APP; if there is no service quality control policy of the APP corresponding to the user level of the APP in the buffer area of the API management device And the corresponding data of the APP, the service of the APP corresponding to the user level of the APP is obtained from the correspondence between the service quality control policies of the APP corresponding to the user level of the APP that is stored in the non-cache area. Quality control strategy.
  • the processor 510 is specifically configured to: if the cached data of the correspondence between the quality of service control policies of the APP corresponding to the user level of the APP exists in a buffer area of the API management device, Obtaining the service quality control of the APP corresponding to the user level of the APP in the data If the cached data of the corresponding relationship of the service quality control policy of the APP corresponding to the user level of the APP does not exist in the buffer area of the API management device, the query is sent to the application server by using the I/O device.
  • the query request carries an identifier of a user level of the APP, and an identifier of a user level of the APP is used by the application server to search for a quality of service control policy of the APP corresponding to a user level of the APP;
  • the query response message sent by the application server where the query response message carries the quality of service control policy of the APP corresponding to the user level of the APP.
  • FIG. 18 The corresponding embodiment of FIG. 18 and other optional embodiments can be understood by referring to the description in FIG. 1 to FIG. 15 , and no further description is made herein.
  • an embodiment of a system for quality of service control provided by an embodiment of the present invention includes: a user terminal 40 and an application programming interface API management device 50,
  • the API management device 50 is configured to:
  • the API call request sent by the user terminal is triggered, where the API call request carries the user identifier of the APP and the identifier of the APP;
  • the API management device 50 is configured to:
  • the method for quality of service control provided by the embodiment can provide quality of service control for the APP registered on the API management device, and accelerates the development efficiency of the APP.
  • the program may be stored in a computer readable storage medium, and the storage medium may include: ROM, RAM, disk or CD.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Security & Cryptography (AREA)
  • Telephonic Communication Services (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Information Transfer Between Computers (AREA)
  • Telephone Function (AREA)

Abstract

本发明公开了一种服务质量控制的方法,包括:接收应用APP被使用时触发用户终端发送的API调用请求,所述API调用请求中携带所述APP的用户标识和所述APP的标识;根据所述APP的标识和所述APP的用户标识,获取所述APP的服务质量控制策略;根据所述APP的服务质量控制策略,控制所述用户标识所指示用户的服务质量。发明实施例提供的服务质量控制的方法,可以为注册在API管理设备上的APP提供服务质量控制,加快了APP的开发效率。

Description

一种服务质量控制的方法、设备及系统
本申请要求于2015年4月17日提交中国专利局、申请号为201510185919.7、发明名称为“一种服务质量控制的方法、设备及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及计算机技术领域,具体涉及一种服务质量控制的方法、设备及系统。
背景技术
开放应用程序编程接口(Open Application Programming Interface,Open API)即对外开放的API,可以将该Open API以收费或免费的方式开放给第三方应用(Application,APP)开发者使用。
APP开发者可以基于Open API快速开发APP,并投放到应用市场中。比如google地图的Open API,APP开发者可以通过查阅google提供的手册,快速的开发出一个简单的APP,实现地图搜索功能。这样APP开发者可以从繁杂的核心功能实现中解脱出来,把精力集中在界面设计,用户交互设计等方面。
API开发者把API托管在API管理设备上,APP开发者在API管理设备上订阅所需要的API,针对每个用户都需要相应的服务质量控制。
现有技术中,每一个APP需要开发一套QoS管理功能,对APP开发者的经验和技能提出了很高的要求。开发一套QoS管理功能的工作量很大,客观上延长了APP的开发周期和测试周期,与基于OpenAPI快速开发APP的初衷有背离,不利于APP快速上市。
发明内容
本发明实施例提供一种服务质量控制的方法,可以为注册在API管理设备上的APP提供服务质量控制,加快了APP的开发效率。本发明实施例还提供了相应的设备及系统。
本发明第一方面提供一种服务质量控制的方法,所述方法应用于为应用APP提供开放应用程序编程接口API的API管理设备,所述方法包括:
接收应用APP被使用时触发用户终端发送的API调用请求,所述API调用请 求中携带所述APP的用户标识和所述APP的标识;
根据所述APP的标识和所述APP的用户标识,获取所述APP的服务质量控制策略;
根据所述APP的服务质量控制策略,控制所述用户标识所指示用户的服务质量。
结合第一方面,在第一种可能的实现方式中,所述根据所述APP的标识和所述APP的用户标识,获取所述APP的服务质量控制策略,包括:
根据所述APP的标识和所述APP的用户标识,获取所述APP的用户标识对应的所述APP的用户等级;
根据所述APP的用户等级,获取所述APP的用户等级对应的所述APP的服务质量控制策略。
结合第一方面第一种可能的实现方式,在第二种可能的实现方式中,所述接收应用APP被使用时触发用户终端发送的API调用请求之前,所述方法还包括:
接收所述APP的注册请求,并接收所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系;
根据所述注册请求为所述APP进行注册,并存储所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系到所述API管理设备。
结合第一方面第二种可能的实现方式,在第三种可能的实现方式中,所述根据所述APP的标识和所述APP的用户标识,获取所述APP的用户标识对应的所述APP的用户等级,包括:
若在所述API管理设备的缓存区中存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户标识对应的所述APP的用户等级;
若在所述API管理设备的缓存区中不存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述非缓存区中已存储的所述APP的 用户标识与所述APP的用户等级的对应关系中,获取所述APP的用户标识对应的所述APP的用户等级;
对应的,所述根据所述APP的用户等级,获取所述APP的用户等级对应的所述APP的服务质量控制策略,包括:
当从所述缓存区中获取所述APP的用户等级时,从所述缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略;
当从所述非缓存区中获取所述APP的用户等级时,从所述非缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略。
结合第一方面第一种可能的实现方式,在第四种可能的实现方式中,所述接收应用APP被使用时触发用户终端发送的API调用请求之前,所述方法还包括:
接收所述APP的注册请求,并接收第一查找指示标识、所述APP的用户等级与所述APP的服务质量控制策略的对应关系,所述第一查找指示标识用于指示需要从应用服务器中查找所述APP的用户标识与所述APP的用户等级的对应关系;
根据所述注册请求为所述APP进行注册,并存储所述第一查找指示标识、所述APP的用户等级与所述APP的服务质量控制策略的对应关系到所述API管理设备。
结合第一方面第四种可能的实现方式,在第五种可能的实现方式中,所述根据所述APP的标识和所述APP的用户标识,获取所述APP的用户标识对应的所述APP的用户等级,包括:
若在所述API管理设备的缓存区中存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户标识对应的所述APP的用户等级;
若在所述API管理设备的缓存区中不存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则根据所述第一查找指示标识,向所述应用服务器发送查询请求,所述查询请求中携带所述APP的用户标识,所述APP的用户标识用于所述应用服务器查找所述APP的用户标识对应的所述APP的 用户等级;接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的用户等级;
对应的,所述根据所述APP的用户等级,获取所述APP的用户等级对应的所述APP的服务质量控制策略,包括:
当从所述缓存区中获取所述APP的用户等级时,从所述缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略;
当从所述应用服务器获取所述APP的用户等级时,从所述非缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略。
结合第一方面第一种可能的实现方式,在第六种可能的实现方式中,所述接收应用APP被使用时触发用户终端发送的API调用请求之前,所述方法还包括:
接收所述APP的注册请求、并接收第二查找指示标识、所述APP的用户标识与所述APP的用户等级的对应关系,所述第二查找指示标识用于指示需要从应用服务器中查找所述APP的用户等级与所述APP的服务质量控制策略的对应关系;
根据所述注册请求为所述APP进行注册,并存储所述第二查找指示标识、所述APP的用户标识与所述APP的用户等级的对应关系到所述API管理设备。
结合第一方面第六种可能的实现方式,在第七种可能的实现方式中,所述根据所述APP的标识和所述APP的用户标识,获取所述APP的用户标识对应的所述APP的用户等级,包括:
若在所述API管理设备的缓存区中存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户标识对应的所述APP的用户等级;
若在所述API管理设备的缓存区中不存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述非缓存区中已存储的所述APP的用户标识与所述APP的用户等级的对应关系中,获取所述APP的用户标识对应的所述APP的用户等级;
对应的,所述根据所述APP的用户等级,获取所述APP的用户等级对应的 所述APP的服务质量控制策略,包括:
当从所述缓存区中获取所述APP的用户等级时,从所述缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略;
当从所述非缓存区中获取所述APP的用户等级时,根据所述第二查找指示标识向所述应用服务器发送查询请求,所述查询请求中携带所述APP的用户等级,所述APP的用户等级用于所述应用服务器查找所述APP的用户等级对应的所述APP的服务质量控制策略;接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的服务质量控制策略。
结合第一方面第一种可能的实现方式,在第八种可能的实现方式中,所述接收应用APP被使用时触发用户终端发送的API调用请求之前,所述方法还包括:
接收所述APP的注册请求、并接收第三查找指示标识,所述第三查找指示标识用于指示从应用服务器中查找所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系;
根据所述注册请求为所述APP进行注册,并存储所述第三查找指示标识到所述API管理设备。
结合第一方面第八种可能的实现方式,在第九种可能的实现方式中,所述根据所述APP的用户标识,获取所述APP的用户标识对应的所述APP的用户等级,根据所述APP的用户等级,获取所述APP的用户等级对应的所述APP的服务质量控制策略,包括:
若在所述API管理设备的缓存区中存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户标识对应的所述APP的用户等级,从所述缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略;
若在所述API管理设备的缓存区中不存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则根据所述第三查找指示标识,向所述应用服务器发送查询请求,所述查询请求中携带所述APP的用户标识,所述APP 的用户标识用于所述应用服务器查找所述APP的用户标识对应的所述APP的用户等级,以及所述APP的用户等级对应的所述APP的服务质量控制策略,接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的服务质量控制策略。
结合第一方面第三、第五、第七、第九种可能的实现方式,在第十种可能的实现方式中,当所述APP的服务质量控制策略不是从所述缓存区获取得到时,所述方法还包括:
将所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系存储到所述API管理设备的缓存区中。
需要说明的是,在第一方面第三、第五、第七、第九种可能的实现方式中只描述了当缓存区中获取用户等级时,服务质量控制策略也从缓存区中获取到,实际上,也可以是所述APP的用户等级从缓存区中获取到,所述APP的服务质量控制策略从非缓存区或者APP服务器获取到。
结合第一方面、第一方面第一至第十种可能实现方式中的任意一种,在第十一种可能的实现方式中,所述根据所述APP的用户标识,获取所述APP的用户标识对应的所述APP的用户等级之前,所述方法还包括:
确认所述APP是否已认证;
当已认证时,获取所述APP的用户名作为所述用户标识;
当未认证,从与所述用户终端预先约定的约定字段中获取所述用户标识。
结合第一方面、第一方面第一至第十一种可能实现方式中的任意一种,在第十二种可能的实现方式中,所述方法还包括:
接收所述用户终端发送的所述APP的下线请求;
从所述API管理设备的缓存区中清除所述用户标识对应的数据。
结合第一方面、第一方面第一至第十一种可能实现方式中的任意一种,在第十三种可能的实现方式中,所述方法还包括:
将所述APP运行所产生所述用户标识对应的数据添加到所述API管理设备的缓存区,并为所述数据设置时间标记;
到达预置时间后,根据所述时间标记,从所述API管理设备的缓存区中清理出过期的数据。
本发明第二方面提供一种服务质量控制的方法,所述方法应用于为应用APP提供开放应用程序编程接口API的API管理设备,所述方法包括:
接收用户在使用应用APP时触发用户终端发送的API调用请求,所述API调用请求中携带所述APP的标识和所述APP的用户等级的标识;
根据所述APP的标识和所述APP的用户等级的标识,获取所述APP的用户等级对应的所述APP的服务质量控制策略;
根据所述APP的服务质量控制策略,控制所述用户标识所指示用户的服务质量。
结合第二方面,在第一种可能的实现方式中,所述APP的标识和根据所述APP的用户等级的标识,获取所述APP的用户等级对应的所述APP的服务质量控制策略,包括:
若在所述API管理设备的缓存区中存在所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户等级对应的所述APP的服务质量控制策略;
若在所述API管理设备的缓存区中不存在所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系的缓存数据,则从非缓存区中已存储的所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系中,获取所述APP的用户等级对应的所述APP的服务质量控制策略。
结合第二方面,在第二种可能的实现方式中,所述根据所述APP的标识和所述APP的用户等级的标识,获取所述APP的用户等级对应的所述APP的服务质量控制策略,包括:
若在所述API管理设备的缓存区中存在所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户等级对应的所述APP的服务质量控制策略;
若在所述API管理设备的缓存区中不存在所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系的缓存数据,则向应用服务器发送查询请 求,所述查询请求中携带所述APP的用户等级的标识,所述APP的用户等级的标识用于所述应用服务器查找所述APP的用户等级对应的所述APP的服务质量控制策略;
接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的用户等级对应的所述APP的服务质量控制策略。
另外,需要说明的是,本发明实施例的第二方面还提供了第一方面中第九至第十二种中缓存、确认、清理的多种实现方案,可以参阅第一方面中第九至第十二种中缓存、确认、清理的方案进行理解,本处不做过多赘述。
本发明实施例所提供的通过用户等级的标识确定服务质量控制策略的方案可以使用于局域网或者在一个安全隔离的网络环境内隔离区(DMZ,Demilitarized Zone):用户等级的标识直接在请求中明文携带,用户的标识可有可无。也可以是在网络传输时用户等级的标识直接在请求中密文携带,用户的标识可有可无。用户等级的标识直接在请求中明文或密文携带,用户的标识可有可无。
本发明第三方面提供一种应用程序编程接口API管理设备,包括:
接收模块,用于接收应用APP被使用时触发用户终端发送的API调用请求,所述API调用请求中携带所述APP的用户标识和所述APP的标识;
获取模块,用于根据所述接收模块接收的所述APP的标识和所述APP的用户标识,获取所述APP的服务质量控制策略;
控制模块,用于根据所述获取模块获取的所述APP的服务质量控制策略,控制所述用户标识所指示用户的服务质量。
结合第三方面,在第一种可能的实现方式中,所述获取模块包括:
第一获取子模块,用于根据所述接收模块接收的所述APP的标识和所述APP的用户标识,获取所述APP的用户标识对应的所述APP的用户等级;
第二获取子模块,用于根据所述第一获取子模块获取的所述APP的用户等级,获取所述APP的用户等级对应的所述APP的服务质量控制策略;
结合第三方面第一种可能的实现方式,在第二种可能的实现方式中,所述API管理设备还包括第一注册模块和第一存储模块,
所述接收模块,还用于接收所述APP的注册请求,并接收所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系;
所述第一注册模块,用于根据所述接收模块接收的所述注册请求为所述APP进行注册;
所述第一存储模块,用于存储所述接收模块接收的所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系。
结合第三方面第二种可能的实现方式,在第三种可能的实现方式中,所述第一获取子模块,具体用于若在所述API管理设备的缓存区中存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户标识对应的所述APP的用户等级;若在所述API管理设备的缓存区中不存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述非缓存区中已存储的所述APP的用户标识与所述APP的用户等级的对应关系中,获取所述APP的用户标识对应的所述APP的用户等级
所述第二获取子模块,具体用于当从所述缓存区中获取所述APP的用户等级时,从所述缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略;当从所述非缓存区中获取所述APP的用户等级时,从所述非缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略。
结合第三方面第一种可能的实现方式,在第四种可能的实现方式中,所述API管理设备还包括第二注册模块和第二存储模块,
所述接收模块,还用于接收所述APP的注册请求,并接收第一查找指示标识、所述APP的用户等级与所述APP的服务质量控制策略的对应关系,所述第一查找指示标识用于指示需要从应用服务器中查找所述APP的用户标识与所述APP的用户等级的对应关系;
所述第二注册模块,用于根据所述接收模块接收的注册请求为所述APP进行注册;
所述第二存储模块,用于存储所述接收模块接收的所述第一查找指示标 识、所述APP的用户等级与所述APP的服务质量控制策略的对应关系。
结合第三方面第四种可能的实现方式,在第五种可能的实现方式中,所述第一获取子模块,具体用于若在所述API管理设备的缓存区中存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户标识对应的所述APP的用户等级;若在所述API管理设备的缓存区中不存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则根据所述第一查找指示标识,向所述应用服务器发送查询请求,所述查询请求中携带所述APP的用户标识,所述APP的用户标识用于所述应用服务器查找所述APP的用户标识对应的所述APP的用户等级;接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的用户等级;
所述第二获取子模块,具体用于当从所述缓存区中获取所述APP的用户等级时,从所述缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略;当从所述应用服务器获取所述APP的用户等级时,从所述非缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略。
结合第三方面第一种可能的实现方式,在第六种可能的实现方式中,所述API管理设备还包括第三注册模块和第三存储模块,
所述接收模块,用于接收所述APP的注册请求、并接收第二查找指示标识、所述APP的用户标识与所述APP的用户等级的对应关系,所述第二查找指示标识用于指示需要从应用服务器中查找所述APP的用户等级与所述APP的服务质量控制策略的对应关系;
所述第三注册模块,用于根据所述接收模块接收的注册请求为所述APP进行注册;
所述第三存储模块,用于存储所述接收模块接收的所述第二查找指示标识、所述APP的用户标识与所述APP的用户等级的对应关系。
结合第三方面第六种可能的实现方式,在第七种可能的实现方式中,
所述第一获取子模块,具体用于若在所述API管理设备的缓存区中存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户标识对应的所述APP的用户等级;若在所述API 管理设备的缓存区中不存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述非缓存区中已存储的所述APP的用户标识与所述APP的用户等级的对应关系中,获取所述APP的用户标识对应的所述APP的用户等级;
所述第二获取子模块,具体用于当从所述缓存区中获取所述APP的用户等级时,从所述缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略;当从所述非缓存区中获取所述APP的用户等级时,根据所述第二查找指示标识向所述应用服务器发送查询请求,所述查询请求中携带所述APP的用户等级,所述APP的用户等级用于所述应用服务器查找所述APP的用户等级对应的所述APP的服务质量控制策略;接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的服务质量控制策略。
结合第三方面第一种可能的实现方式,在第八种可能的实现方式中,所述API管理设备还包括第四注册模块和第四存储模块,
所述接收模块,还用于接收所述APP的注册请求、并接收第三查找指示标识,所述第三查找指示标识用于指示从应用服务器中查找所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系;
所述第四注册模块,用于根据所述接收模块接收的注册请求为所述APP进行注册;
所述第四存储模块,用于存储所述接收模块接收的所述第三查找指示标识。
结合第三方面第八种可能的实现方式,在第九种可能的实现方式中,
所述第一获取子模块,具体用于若在所述API管理设备的缓存区中存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,从所述缓存数据中获取所述APP的用户标识对应的所述APP的用户等级;
所述第二获取子模块,具体用于当从所述缓存数据中获取所述APP的用户标识对应的所述APP的用户等级时,从所述缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略;或者,若在所述API管理设备的缓存区 中不存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则根据所述第三查找指示标识,向所述应用服务器发送查询请求,所述查询请求中携带所述APP的用户标识,所述APP的用户标识用于所述应用服务器查找所述APP的用户标识对应的所述APP的用户等级,以及所述APP的用户等级对应的所述APP的服务质量控制策略,接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的服务质量控制策略。
结合第三方面第三、第五、第七、第九种可能的实现方式,在第十种可能的实现方式中,所述控制模块,还用于当所述APP的服务质量控制策略不是从所述缓存区获取得到时,将所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系存储到所述API管理设备的缓存区中。
需要说明的是,在第三方面第三、第五、第七、第九种可能的实现方式中只描述了当缓存区中获取用户等级时,服务质量控制策略也从缓存区中获取到,实际上,也可以是所述APP的用户等级从缓存区中获取到,所述APP的服务质量控制策略从非缓存区或者APP服务器获取到。
结合第三方面、第三方面第一至第十种可能实现方式中的任意一种,在第十一种可能的实现方式中,所述API管理设备还包括:确认模块,
所述确认模块,用于确认所述APP是否已认证;
所述第一获取子模块,还用于当所述确认模块确认已认证时,获取所述APP的用户名作为所述用户标识;当未认证,从与所述用户终端预先约定的约定字段中获取所述用户标识。
结合第三方面、第三方面第一至第十一种可能实现方式中的任意一种,在第十二种可能的实现方式中,所述API管理设备还包括第一清理模块,
所述接收模块,还用于接收所述用户终端发送的所述APP的下线请求;
所述第一清理模块,用于在所述接收模块接收到所述APP的下线请求后,从所述API管理设备的缓存区中清除所述用户标识对应的数据。
结合第三方面、第三方面第一至第十一种可能实现方式中的任意一种,在第十三种可能的实现方式中,所述API管理设备还包括添加模块、设置模块和 第二清理模块,
所述添加模块,用于将所述接收模块接收的所述APP运行所产生所述用户标识对应的数据添加到所述API管理设备的缓存区;
所述设置模块,用于为所述添加模块添加到所述缓存中的数据设置时间标记;
所述第二清理模块,用于到达预置时间后,根据所述设置模块设置的时间标记,从所述API管理设备的缓存区中清理出过期的数据。
本发明第四方面提供一种API管理设备,包括:
接收模块,用于接收用户在使用应用APP时触发用户终端发送的API调用请求,所述API调用请求中携带所述APP的标识和所述APP的用户等级的标识;
获取模块,用于根据所述接收模块接收的所述APP的标识和所述APP的用户等级的标识,获取所述APP的用户等级对应的所述APP的服务质量控制策略;
控制模块,用于根据所述获取模块获取的所述APP的服务质量控制策略,控制所述用户标识所指示用户的服务质量。
结合第四方面,在第一种可能的实现方式中,
所述获取模块,具体用于若在所述API管理设备的缓存区中存在所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户等级对应的所述APP的服务质量控制策略;若在所述API管理设备的缓存区中不存在所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系的缓存数据,则从非缓存区中已存储的所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系中,获取所述APP的用户等级对应的所述APP的服务质量控制策略。
结合第四方面,在第二种可能的实现方式中,
所述获取模块,具体用于若在所述API管理设备的缓存区中存在所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户等级对应的所述APP的服务质量控制策略;若在所述API管理设备的缓存区中不存在所述APP的用户等级对应的所述 APP的服务质量控制策略的对应关系的缓存数据,则向应用服务器发送查询请求,所述查询请求中携带所述APP的用户等级的标识,所述APP的用户等级的标识用于所述应用服务器查找所述APP的用户等级对应的所述APP的服务质量控制策略;接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的用户等级对应的所述APP的服务质量控制策略。
另外,需要说明的是,本发明实施例的第四方面还提供了第三方面中第九至第十二种中缓存、确认、清理的多种实现方案,可以参阅第三方面中第九至第十二种中缓存、确认、清理的方案进行理解,本处不做过多赘述。
本发明实施例所提供的通过用户等级的标识确定服务质量控制策略的方案可以使用于局域网或者在一个安全隔离的网络环境内隔离区(DMZ,Demilitarized Zone):用户等级的标识直接在请求中明文携带,用户的标识可有可无。也可以是在网络传输时用户等级的标识直接在请求中密文携带,用户的标识可有可无。用户等级的标识直接在请求中明文或密文携带,用户的标识可有可无。
本发明第五方面提供一种服务质量控制的系统,包括:用户终端和应用程序编程接口API管理设备,所述API管理设备为上述第三方面任一所述的API管理设备。
本发明第六方面提供一种服务质量控制的系统,包括:用户终端和应用程序编程接口API管理设备,所述API管理设备为上述第四方面任一所述的API管理设备。
本发明实施例采用为应用APP提供开放应用程序编程接口API的API管理设备接收应用APP被使用时触发用户终端发送的API调用请求,所述API调用请求中携带所述APP的用户标识和所述APP的标识;根据所述APP的标识和所述APP的用户标识,获取所述APP的服务质量控制策略;根据所述APP的服务质量控制策略,控制所述用户标识所指示用户的服务质量。与现有技术中需要APP开发者开发一套QoS管理功能相比,本发明实施例提供的服务质量控制的方法,可以为注册在API管理设备上的APP提供服务质量控制,加快了APP的开发效率。而且,APP开发者只需要在API注册时进行简单的配置即可,进一 步降低对APP开发者经验和技能的要求,降低APP开发者的门槛;节省了APP的开发和测试周期,使得APP更快速上市,占据市场先机。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例中服务质量控制的方法的一实施例示意图;
图2是本发明实施例中服务质量控制的方法的另一实施例示意图;
图3是本发明实施例中服务质量控制的方法的另一实施例示意图;
图4是本发明实施例中服务质量控制的方法的另一实施例示意图;
图5是本发明实施例中服务质量控制的方法的另一实施例示意图;
图6是本发明实施例中服务质量控制的方法的另一实施例示意图;
图7是本发明实施例中API管理设备的一实施例示意图;
图8是本发明实施例中API管理设备的另一实施例示意图;
图9是本发明实施例中API管理设备的另一实施例示意图;
图10是本发明实施例中API管理设备的另一实施例示意图;
图11是本发明实施例中API管理设备的另一实施例示意图;
图12是本发明实施例中API管理设备的另一实施例示意图;
图13是本发明实施例中API管理设备的另一实施例示意图;
图14是本发明实施例中API管理设备的另一实施例示意图;
图15是本发明实施例中API管理设备的另一实施例示意图;
图16是本发明实施例中API管理设备的另一实施例示意图;
图17是本发明实施例中API管理设备的另一实施例示意图;
图18是本发明实施例中API管理设备的另一实施例示意图;
图19是本发明实施例中服务质量管理的系统的一实施例示意图。
具体实施方式
本发明实施例提供一种服务质量控制的方法,可以为注册在API管理设备 上的APP提供服务质量控制,加快了APP的开发效率。本发明实施例还提供了相应的设备及系统。以下分别进行详细说明。
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明实施例基于API管理设备,提出了一种在API管理设备上实现APP用户的服务质量QoS控制的方法,APP开发者将APP针对每个用户标识的Qos控制策略配置好,存放是API管理设备或者应用APP服务器上,用户通过用户终端使用APP时发起的API调用请求中携带所述APP的标识和用户标识;也就是APP被使用时触发用户终端向API管理设备发送的API调用请求,API管理设备获取到该所述APP的标识和所述APP的用户标识,查询所述APP的用户标识和对应的Qos控制策略,按照Qos控制策略执行QoS管控。其中,APP的标识是指可以唯一指示该APP的标识,APP的标识可以用一个字符来表示。例如:微信的标识、导航应用的标识等,APP的用户标识是指可以表示该APP的使用者的标识,可以用该APP的用户名来作为该APP的用户标识,例如:用手机号注册的微信号,则该手机号为微信的用户标识。用邮箱注册的淘宝账号,则该邮箱为淘宝的用户标识。
考虑到API管理设备为了保护后端应用服务器(Application Server,AS)计费、公平使用的考虑,提供了API和APP级的服务等级协议(Service-Level Agreemen,SLA)。APP开发者在API管理设备上注册APP时,需要设置APP的SLA控制,以APP为对象,控制APP的SLA,如单位时间允许API调用的次数等。同一个APP会有多个用户同时使用,因为APP SLA的存在,APP的SLA作为有限的资源,多个用户之间存在竞争关系。因此,APP支持用户在购买APP服务时,可以按照套餐,用户等级等方式获得不同的服务质量(Quality of Service,QoS)体验。用户等级是指用户享受服务的优先级,例如:用户等级可以包括(Very Important Person,VIP)用户、金牌用户、银牌用户、铜牌用户,VIP用户是最高的用户等级,接下来依次是金牌用户、银 牌用户、铜牌用户。不同的用户等级对应着不同的Qos套餐,每一种Qos套餐对应着不同的Qos服务策略。APP会优先保障VIP用户,同等级的用户尽可能公平使用,需要提供用户QoS功能,维护每一个用户的SLA,并对不同等级用户进行QoS控制。
进一步的,本发明基于API管理设备,提出了一种在API管理设备上实现APP用户的服务质量QoS控制的方法,APP开发者将配置APP的用户标识和用户等级的关系,以及APP的用户等级和相应等级的QoS控制策略配置,存放是API管理设备或者应用APP服务器上,用户通过用户终端使用APP时发起的API调用请求中携带所述APP的标识和用户标识;也就是APP被使用时触发用户终端向API管理设备发送的API调用请求,API管理设备获取到该所述APP的标识和所述APP的用户标识,查询所述APP的用户等级和相应等级的Qos控制策略,按照Qos控制策略执行QoS管控。
这样,原先需要APP开发者开发一套用户等级和QoS管理的任务,由API管理设备实现,APP开发者只需要在API注册时进行相应的APP用户等级和相应等级的Qos控制策略配置即可。从而加快了APP的开发效率,提高了APP开发周期。
为了方便理解,这里列举一个简单例子。
APP用户等级和相应等级的Qos控制策略配置可以是:
APP SLA配额:1000次/分钟;
金牌用户:100次/分钟,限速1000(kbps),方向:上行/下行;
银牌用户:10次/分钟,限速100(kbps),方向:上行/下行;
铜牌用户:1次/分钟,限速10(kbps),方向:上行/下行;
APP用户等级和相应等级的Qos控制策略应用举例可以是:
初始预留
500次:预留给金牌用户;
400次:预留给银牌用户;
100次:预留给铜牌用户;
同等级用户相互竞争;
高等级用户配额用完后,允许占用低等级用户的配额。
本发明实施例中,可以分为全托管场景、半托管场景和弱托管场景,其中,全托管场景指的是APP的用户等级和相应等级的Qos控制策略都托管在API管理设备上,半托管场景指的是APP的用户等级和相应等级的Qos控制策略中的一个托管在API管理设备上,弱托管的场景指的是APP的用户等级和相应等级的Qos控制策略都存储在APP服务器上,没有在API管理设备上托管,在每个场景下,API管理设备都通过internet网络与API服务器通信,从而使API服务器完成计费等功能。
APP用户等级和相应等级的Qos控制策略,具体来说就是APP的用户标识与APP的用户等级的对应关系,以及APP的用户等级与APP的服务质量控制策略的对应关系。这两个对应关系可以用一张对应关系表或两张对应关系表的形式来记录;也可以一张对应关系表直接记录APP的用户标识和该用户对应的该APP的服务质量控制策略,这些对应关系表由APP开发管理者制作好,并在向API管理设备注册该APP时配置到API管理设备、或者其中一个对应关系表配置到API管理设备,或者两个对应关系表都配置到APP服务器,也就是分别对应的全托管场景、半托管场景和弱托管场景时的托管情况。
下面结合附图分别介绍全托管场景、半托管场景和弱托管场景下服务质量控制的过程。
图1为本发明实施例中的全托管场景示意图。如图1所示,在全托管场景下,本发明实施例提供的服务质量控制的方法的一实施例包括:
S100、APP开发者开发出APP后,通过APP开发者所使用的用户设备向API管理设备发送APP注册请求和Qos数据。
本发明实施例中的Qos数据包括APP用户等级和相应等级的Qos控制策略,具体来说就是APP的用户标识与APP的用户等级的对应关系,以及APP的用户等级与APP的服务质量控制策略的对应关系。
S105、API管理设备根据所述注册请求为所述APP进行注册,并存储所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系到所述API管理设备。
S110、API管理设备接收应用APP被使用时触发用户终端发送的API调用请求,所述API调用请求中携带所述APP的用户标识和所述APP的标识。
S115、API管理设备从所述API调用请求中获取APP的用户标识和所述APP的标识。
用户标识的携带方式有两种方式:第一种,在APP通过API管理平台认证场景下,在用户认证时,API管理设备使用APP登录的用户名作为APP的用户标识。
第二种,APP不通过API管理设备认证场下,在APP发起的API请求中,添加双方约定的用户标识字段。以超文本传送协议(Hypertext transfer protocol,HTTP)Restfull接口为例,用户标识可以存放在消息的统一资源定位符(Uniform Resource Locator,URL)、头(Header)或体(Body)中。
S120、从所述API管理设备存储的APP的用户标识与所述APP的用户等级的对应关系中,获取所述APP的用户标识对应的所述APP的用户等级。
S125、从所述API管理设备存储的所述APP的用户等级与所述APP的服务质量控制策略的对应关系中,获取所述APP的用户等级对应的所述APP的服务质量控制策略。
S130、根据所述APP的服务质量控制策略,控制所述用户标识所指示用户的服务质量。
与现有技术中需要APP开发者开发一套用户SLA和QoS管理功能相比,本发明实施例提供的服务质量控制的方法,可以为注册在API管理设备上的APP提供服务质量控制,加快了APP的开发效率。
实际上,在全托管场景下,在获取用户标识后,还可以先查看缓存区,如果缓存区中存储有所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系,则直接从缓存区中确定QoS控制策略,进行QoS控制。在缓存区中未存储有所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系时,再从API管理设备的本地存储中获取所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户 等级与所述APP的服务质量控制策略的对应关系。这样,如果可以直接从缓存区中所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系,可以加快QoS控制的速度。如果该APP是该用户第一次启用,则缓存区中一定不会存储有所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系,则需要从API管理设备的其他存储设备,也就是非缓存区中获取所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系,并在获取后,将所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系存储在所述API设备的缓存区中。以方便下次查找时可以从缓存区直接获取,提高QoS控制的速度。
关于增加查询缓存区的服务质量控制的方法的一实施例可以参阅图2进行理解:
S150、API管理设备接收到APP的API调用请求,所述API调用请求中携带所述APP的用户标识和所述APP的标识。
S155、API管理设备获取所述APP的标识和用户标识。
S160、根据用户标识从API设备的缓存区查询该用户标识对应的服务质量控制策略,如查询成功,则执行步骤S165,如查询失败,则执行步骤S170。
S165、查询成功时,执行服务质量控制策略,控制所述用户标识所指示用户的服务质量。
S170、查询失败时,从API管理设备的非缓存区查询该用户标识对应用户等级,以及用户等级对应的服务质量控制策略。
S175、缓存所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系。
另外,API管理设备收到下线请求后,会及时清除该用户在缓存区中的数据,以缓解缓存区压力,提高运行速度。
当然,也可以不及时清理,而是在APP运行产生针对该用户的数据时,在 将该数据添加缓存区时,记录时间戳,API管理设备定期老化缓存区数据,配置缓存区数据的老化周期,通过比较记录的时间戳,进行老化判断。对老化的缓存区记录进行清除。
另外需要说明的是,也可以是所述APP的用户等级从缓存区中获取到,所述APP的服务质量控制策略从非缓存区或者APP服务器获取到。
图3为本发明实施例中的半托管场景示意图。如图3所示,在半托管场景下,本发明实施例提供的服务质量控制的方法的一实施例包括:
S200、APP开发者开发出APP后,通过APP开发者所使用的用户设备向API管理设备发送APP注册请求,并发出Qos数据和第一查找指示。
本发明实施例中的Qos数据包括APP用户等级和相应等级的Qos控制策略,具体来说就是所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系。
所述第一查找指示标识用于指示需要从应用服务器中查找所述APP的用户标识与所述APP的用户等级的对应关系。
本发明实施例中所述APP的用户等级与所述APP的服务质量控制策略的对应关系存储在API管理设备上,所述APP的用户标识与所述APP的用户等级的对应关系在APP服务器上存储,实际上也可以反过来。
S205、API管理设备根据所述注册请求为所述APP进行注册,并存储所述第一查找指示标识、所述APP的用户等级与所述APP的服务质量控制策略的对应关系。
S210、APP服务器存储所述APP的用户标识与所述APP的用户等级的对应关系。
S215、API管理设备接收用户在使用应用APP时触发用户终端发送的API调用请求,所述API调用请求中携带所述APP的标识和用户标识。
S220、API管理设备从所述API调用请求中获取所述APP的标识和用户标识。
用户标识的携带方式有两种方式:第一种,在APP通过API管理平台认证场景下,在用户认证时,API管理设备使用APP登录的用户名作为所述APP的 用户标识。
第二种,APP不通过API管理设备认证场下,在APP发起的API请求中,添加双方约定的用户标识字段。以超文本传送协议(Hypertext transfer protocol,HTTP)Restfull接口为例,用户标识可以存放在消息的统一资源定位符(Uniform Resource Locator,URL)、头(Header)或体(Body)中。
S225、从所述API管理设备存储的所述APP的用户标识与所述APP的用户等级的对应关系中,获取所述APP的用户标识对应的所述APP的用户等级。
S230、向所述应用服务器发送查询请求,所述查询请求中携带所述APP的用户标识,所述APP的用户标识用于所述应用服务器查找所述用户标识对应的用户等级;接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的用户等级。
如果是API管理设备接收到的是第二查找指示,所述第二查找指示标识用于指示需要从应用服务器中查找所述APP的用户等级与所述APP的服务质量控制策略的对应关系,则表示所述APP的用户等级与所述APP的服务质量控制策略的对应关系存储在APP服务器上,所述APP的用户标识与所述APP的用户等级的对应关系存储在API管理设备上,则可以是,从所述API管理设备存储的所述APP的用户标识与所述APP的用户等级的对应关系中,获取所述APP的用户标识对应的APP的用户等级,向所述应用服务器发送查询请求,所述查询请求中携带所述APP的用户等级,所述APP的用户等级用于所述应用服务器查找所述APP的用户等级对应的所述APP的服务质量控制策略。
S235、根据所述APP的服务质量控制策略,控制所述用户标识所指示用户的服务质量。
与现有技术中需要APP开发者开发一套用户SLA和QoS管理功能相比,本发明实施例提供的服务质量控制的方法,可以为注册在API管理设备上的APP提供服务质量控制,加快了APP的开发效率。
实际上,在半托管场景下,在获取所述APP的用户标识后,还可以先查看缓存区,如果缓存区中存储有所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关 系,则直接从缓存区中确定QoS控制策略,进行QoS控制。如在缓存区中未存储有所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略时,再从本地存储中或者APP服务器中获取所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略。这样,如果可以直接从缓存区中获取所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略,可以加快QoS控制的速度。如果该APP是该用户第一次启用,则缓存区中一定不会存储有所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略,则需要从API管理设备的其他存储设备中,也就是非缓存区或QPP应用服务器中获取所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略,并在获取后,将所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略存储在所述API设备的缓存区区中。以方便下次查找时可以从缓存区直接获取,提高QoS控制的速度。关于从缓存区中查询的过程,可以参阅图2部分的描述进行理解,只是图2中S170的步骤可能是部分从APP服务器中查询得到的。
另外,API管理设备收到下线请求后,会及时清除该用户在缓存区中的数据,以缓解缓存区压力,提高运行速度。
当然,也可以不及时清理,而是在APP运行产生针对该用户的数据时,在将该数据添加缓存区时,记录时间戳,API管理设备定期老化缓存区数据,配置缓存区数据的老化周期,通过比较记录的时间戳,进行老化判断。对老化的缓存区记录进行清除。
另外需要说明的是,也可以是所述APP的用户等级从缓存区中获取到,所述APP的服务质量控制策略从非缓存区或者APP服务器获取到。
图4为本发明实施例中的弱托管场景示意图。如图4所示,在弱托管场景下,本发明实施例提供的服务质量控制的方法的一实施例包括:
S300、APP开发者开发出APP后,通过APP开发者所使用的用户设备向API 管理设备发送APP注册请求,并发出Qos数据。
本发明实施例中的Qos数据包括APP用户等级和相应等级的Qos控制策略,具体来说就是所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系。
本发明实施例中,所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系都在APP服务器上存储。
S305、API管理设备根据所述注册请求为所述APP进行注册。
S310、APP服务器存储所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系。
S315、API管理设备接收应用APP被使用时触发用户终端发送的API调用请求,所述API调用请求中携带所述APP的用户标识和所述APP的标识。
S320、API管理设备从所述API调用请求中获取所述APP的用户标识和用户标识。
用户标识的携带方式有两种方式:第一种,在APP通过API管理平台认证场景下,在用户认证时,API管理设备使用APP登录的用户名作为用户标识。
第二种,APP不通过API管理设备认证场下,在APP发起的API请求中,添加双方约定的用户标识字段。以超文本传送协议(Hypertext transfer protocol,HTTP)Restfull接口为例,用户标识可以存放在消息的统一资源定位符(Uniform Resource Locator,URL)、头(Header)或体(Body)中。
S325、向所述应用服务器发送查询请求,所述查询请求中携带所述APP的用户标识,所述用户标识用于所述应用服务器查找所述APP的用户标识对应的APP的用户等级,以及所述APP的用户等级对应的APP的服务质量控制策略,接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的服务质量控制策略。
S330、根据所述APP的服务质量控制策略,控制所述用户标识所指示用户的服务质量。
与现有技术中需要APP开发者开发一套用户SLA和QoS管理功能相比,本 发明实施例提供的服务质量控制的方法,可以为注册在API管理设备上的APP提供服务质量控制,加快了APP的开发效率。
实际上,在弱托管场景下,在获取用户标识后,还可以先查看缓存区,如果缓存区中存储有所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系,则直接从缓存区中确定QoS控制策略,进行QoS控制。在缓存区中未存储有所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系时,再从应用服务器获取所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系。这样,如果可以直接从缓存区中所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系,可以加快QoS控制的速度。如果该APP是该用户第一次启用,则缓存区中一定不会存储有所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系,则需要从应用服务器中获取所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系,并在获取后,将所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系存储在所述API设备的缓存区中。以方便下次查找时可以从缓存区直接获取,提高QoS控制的速度。关于从缓存区中查询的过程,可以参阅图2部分的描述进行理解,只是图2中S170的步骤可能是全部从APP服务器中查询得到的。
另外,API管理设备收到下线请求后,会及时清除该用户在缓存区中的数据,以缓解缓存区压力,提高运行速度。
当然,也可以不及时清理,而是在APP运行产生针对该用户的数据时,在将该数据添加缓存区时,记录时间戳,API管理设备定期老化缓存区数据,配置缓存区数据的老化周期,通过比较记录的时间戳,进行老化判断。对老化的缓存区记录进行清除。
需要说明的是,除了以上几种托管方式,还可以是用户标识与用户等级的对应关系,以及用户等级与服务质量控制策略的对应关系同时存储在API管理设备和应用服务器上。
图5为本发明实施例中服务质量控制的方法的一实施例示意图。如图5所示,本发明实施例中服务质量控制的方法的一实施例包括:
S401、为应用APP提供开放应用程序编程接口API的API管理设备接收应用APP被使用时触发用户终端发送的API调用请求,所述API调用请求中携带所述APP的用户标识和所述APP的标识。
S402、所述API管理设备根据所述APP的标识和所述APP的用户标识,获取所述APP的服务质量控制策略。
S403、所述API管理设备根据所述APP的服务质量控制策略,控制所述用户标识所指示用户的服务质量。
本发明实施例采用为应用APP提供开放应用程序编程接口API的API管理设备接收应用APP被使用时触发用户终端发送的API调用请求,所述API调用请求中携带所述APP的用户标识和所述APP的标识;根据所述APP的标识和所述APP的用户标识,获取所述APP的服务质量控制策略;根据所述APP的服务质量控制策略,控制所述用户标识所指示用户的服务质量。与现有技术中需要APP开发者开发一套用户的QoS管理功能相比,本发明实施例提供的服务质量控制的方法,可以为注册在API管理设备上的APP提供服务质量控制,加快了APP的开发效率。而且,APP开发者只需要在API注册时进行简单的配置即可,进一步降低对APP开发者经验和技能的要求,降低APP开发者的门槛;节省了APP的开发和测试周期,使得APP更快速上市,占据市场先机。
可选地,在上述图5对应的实施例的基础上,本发明实施例提供的服务质量控制的方法的第一个可选实施例中,所述根据所述APP的标识和所述APP的用户标识,获取所述APP的服务质量控制策略,可以包括:
根据所述APP的标识和所述APP的用户标识,获取所述APP的用户标识对应的所述APP的用户等级;
根据所述APP的用户等级,获取所述APP的用户等级对应的所述APP的服 务质量控制策略。
本发明实施例为提供了用户等级时的方案。
可选地,在上述图5对应的第一个可选实施例的基础上,本发明实施例提供的服务质量控制的方法的第二个可选实施例中,所述接收应用APP被使用时触发用户终端发送的API调用请求之前,所述方法还可以包括:
接收所述APP的注册请求,并接收所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系;
根据所述注册请求为所述APP进行注册,并存储所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系到所述API管理设备。
本发明实施例为全托管场景下的服务质量控制的方案,可以将户标识与用户等级的对应关系,以及用户等级与服务质量控制策略的对应关系全部托管在API管理设备上,可以提高API调用的效率。
可选地,在上述图5对应的第二个可选实施例的基础上,本发明实施例提供的服务质量控制的方法的第三个可选实施例中,所述根据所述APP的标识和所述APP的用户标识,获取所述APP的用户标识对应的所述APP的用户等级,可以包括:
若在所述API管理设备的缓存区中存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户标识对应的所述APP的用户等级;
若在所述API管理设备的缓存区中不存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述非缓存区中已存储的所述APP的用户标识与所述APP的用户等级的对应关系中,获取所述APP的用户标识对应的所述APP的用户等级;
对应的,所述根据所述APP的用户等级,获取所述APP的用户等级对应的所述APP的服务质量控制策略,包括:
当从所述缓存区中获取所述APP的用户等级时,从所述缓存区中获取所述 APP的用户等级对应的所述APP的服务质量控制策略;
当从所述非缓存区中获取所述APP的用户等级时,从所述非缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略。
本发明实施例中,在API管理设备中设置有缓存区,如果缓存区中存储有所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系,则从缓存区中直接获取,可以提高服务质量控制策略的效率,如果缓存区中没有存储,从所述API管理设备的非缓存区中获取。
另外,在从所述非缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略之后,所述方法还包括:
将所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系存储到所述API管理设备的缓存区中。
也就是在从非缓存区中获取所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系后存储到缓存区中,以方便下次同一APP使用时可以快速获取到。
可选地,在上述图5对应的第一个可选实施例的基础上,本发明实施例提供的服务质量控制的方法的第四个可选实施例中,所述接收应用APP被使用时触发用户终端发送的API调用请求之前,所述方法还可以包括:
接收所述APP的注册请求,并接收第一查找指示标识、所述APP的用户等级与所述APP的服务质量控制策略的对应关系,所述第一查找指示标识用于指示需要从应用服务器中查找所述APP的用户标识与所述APP的用户等级的对应关系;
根据所述注册请求为所述APP进行注册,并存储所述第一查找指示标识、所述APP的用户等级与所述APP的服务质量控制策略的对应关系到所述API管理设备。
本发明实施例为半托管场景下的服务质量控制的方案,可以将所述APP的用户等级与所述APP的服务质量控制策略的对应关系拖管在API管理设备上。
可选地,在上述图5对应的第四个可选实施例的基础上,本发明实施例提供的服务质量控制的方法的第五个可选实施例中,所述根据所述APP的标识和所述APP的用户标识,获取所述APP的用户标识对应的所述APP的用户等级,可以包括:
若在所述API管理设备的缓存区中存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户标识对应的所述APP的用户等级;
若在所述API管理设备的缓存区中不存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则根据所述第一查找指示标识,向所述应用服务器发送查询请求,所述查询请求中携带所述APP的用户标识,所述APP的用户标识用于所述应用服务器查找所述APP的用户标识对应的所述APP的用户等级;接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的用户等级;
对应的,所述根据所述APP的用户等级,获取所述APP的用户等级对应的所述APP的服务质量控制策略,可以包括:
当从所述缓存区中获取所述APP的用户等级时,从所述缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略;
当从所述应用服务器获取所述APP的用户等级时,从所述非缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略。
另外,在从所述非缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略之后,所述方法还包括:
将所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系存储到所述API管理设备的缓存区中。
也就是在从非缓存区中获取所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系后存储到缓存区中,以方便下次同一APP使用时可以快速获取到。
可选地,在上述图5对应的第一个可选实施例的基础上,本发明实施例提 供的服务质量控制的方法的第六个可选实施例中,所述接收应用APP被使用时触发用户终端发送的API调用请求之前,所述方法还包括:
接收所述APP的注册请求、并接收第二查找指示标识、所述APP的用户标识与所述APP的用户等级的对应关系,所述第二查找指示标识用于指示需要从应用服务器中查找所述APP的用户等级与所述APP的服务质量控制策略的对应关系;
根据所述注册请求为所述APP进行注册,并存储所述第二查找指示标识、所述APP的用户标识与所述APP的用户等级的对应关系到所述API管理设备。
本发明实施例为半托管场景下的服务质量控制的方案,可以将所述APP的用户标识与所述APP的用户等级的对应关系拖管在API管理设备上。
可选地,在上述图5对应的第六个可选实施例的基础上,本发明实施例提供的服务质量控制的方法的第七个可选实施例中,所述根据所述APP的标识和所述APP的用户标识,获取所述APP的用户标识对应的所述APP的用户等级,可以包括:
若在所述API管理设备的缓存区中存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户标识对应的所述APP的用户等级;
若在所述API管理设备的缓存区中不存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述非缓存区中已存储的所述APP的用户标识与所述APP的用户等级的对应关系中,获取所述APP的用户标识对应的所述APP的用户等级;
对应的,所述根据所述APP的用户等级,获取所述APP的用户等级对应的所述APP的服务质量控制策略,可以包括:
当从所述缓存区中获取所述APP的用户等级时,从所述缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略;
当从所述非缓存区中获取所述APP的用户等级时,根据所述第二查找指示标识向所述应用服务器发送查询请求,所述查询请求中携带所述APP的用户等级,所述APP的用户等级用于所述应用服务器查找所述APP的用户等级对应的 所述APP的服务质量控制策略;接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的服务质量控制策略。
另外,在从接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的服务质量控制策略之后,所述方法还包括:
将所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系存储到所述API管理设备的缓存区中。
也就是在从非缓存区中获取所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系后存储到缓存区中,以方便下次同一APP使用时可以快速获取到。
可选地,在上述图5对应的第一个可选实施例的基础上,本发明实施例提供的服务质量控制的方法的第八个可选实施例中,所述接收应用APP被使用时触发用户终端发送的API调用请求之前,所述方法还可以包括:
接收所述APP的注册请求、并接收第三查找指示标识,所述第三查找指示标识用于指示从应用服务器中查找所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系;
根据所述注册请求为所述APP进行注册,并存储所述第三查找指示标识到所述API管理设备。
可选地,在上述图5对应的第八个可选实施例的基础上,本发明实施例提供的服务质量控制的方法的第九个可选实施例中,所述根据所述APP的用户标识,获取所述APP的用户标识对应的所述APP的用户等级,根据所述APP的用户等级,获取所述APP的用户等级对应的所述APP的服务质量控制策略,可以包括:
若在所述API管理设备的缓存区中存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户标识对应的所述APP的用户等级,从所述缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略;
若在所述API管理设备的缓存区中不存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则根据所述第三查找指示标识,向所述应用服务器发送查询请求,所述查询请求中携带所述APP的用户标识,所述APP的用户标识用于所述应用服务器查找所述APP的用户标识对应的所述APP的用户等级,以及所述APP的用户等级对应的所述APP的服务质量控制策略,接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的服务质量控制策略。
另外,在接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的服务质量控制策略之后,所述方法还包括:
将所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系存储到所述API管理设备的缓存区中。
也就是在从非缓存区中获取所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系后存储到缓存区中,以方便下次同一APP使用时可以快速获取到。
本发明实施例为上述实施例中的弱托管场景方案。
可选地,在上述图5对应的第三、第五、第七或第九个可选实施例基础上,本发明实施例提供的服务质量控制的方法的第十个可选实施例中,当所述APP的服务质量控制策略不是从所述缓存区获取得到时,所述方法还可以包括:
将所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系存储到所述API管理设备的缓存区中。
可选地,在上述图5对应的实施例、第一至第十任一可选实施例的基础上,本发明实施例提供的服务质量控制的方法的第十一个可选实施例中,所述根据所述用户标识,获取所述用户标识对应的用户等级之前,所述方法还可以包括:
确认所述APP是否已认证;
当已认证时,获取所述APP的用户名作为所述用户标识;
当未认证,从与所述用户终端预先约定的约定字段中获取所述用户标识。
本发明实施例中,可以根据APP的认证情况,获取用户标识。
可选地,在上述图5对应的实施例、第一至第十一任一可选实施例的基础上,本发明实施例提供的服务质量控制的方法的第十二个可选实施例中,所述方法还可以包括:
接收所述用户终端发送的所述APP的下线请求;
从所述API管理设备的缓存区中清除所述用户标识对应的数据。
本发明实施例中,在一个使用APP的用户下线后,可以及时清除缓存区中该用户的相关数据,以减轻缓存区的压力,提高运行速度。
可选地,在上述图5对应的实施例、第一至第十任一可选实施例的基础上,本发明实施例提供的服务质量控制的方法的第十三个可选实施例中,所述方法还可以包括:
将所述APP运行所产生所述用户标识对应的数据添加到所述API管理设备的缓存区,并为所述数据设置时间标记;
到达预置时间后,根据所述时间标记,从所述API管理设备的缓存区中清理出过期的数据。
本发明实施例中,在一个用户的APP运行过程中,可以将APP运行所产生的针对该用户的数据添加到缓存区中,并为该用户的数据设置时间标记,并定期老化缓存数据,配置缓存区数据的老化周期,通过比较记录的时间戳,进行老化判断。对老化的缓存区记录进行清除。
图5对应的实施例或可选实施例可以参阅图1至图4中的描述进行理解,本处不做过多赘述。
参阅图6,本发明实施例提供的服务质量控制的方法的另一实施例包括:
S411、为应用APP提供开放应用程序编程接口API的API管理设备接收用户在使用应用APP时触发用户终端发送的API调用请求,所述API调用请求中携带所述APP的标识和所述APP的用户等级的标识。
S412、根据所述APP的标识和所述APP的用户等级的标识,获取所述APP的用户等级对应的所述APP的服务质量控制策略。
S413、根据所述APP的服务质量控制策略,控制所述用户标识所指示用户 的服务质量。
本发明实施例中,为应用APP提供开放应用程序编程接口API的API管理设备接收用户在使用应用APP时触发用户终端发送的API调用请求,所述API调用请求中携带所述APP的标识和所述APP的用户等级的标识;根据所述APP的标识和所述APP的用户等级的标识,获取所述APP的用户等级对应的所述APP的服务质量控制策略;根据所述APP的服务质量控制策略,控制所述用户标识所指示用户的服务质量。与现有技术中需要APP开发者开发一套用户SLA和QoS管理功能相比,本发明实施例提供的服务质量控制的方法,可以为注册在API管理设备上的APP提供服务质量控制,加快了APP的开发效率。而且,APP开发者只需要在API注册时进行简单的配置即可,进一步降低对APP开发者经验和技能的要求,降低APP开发者的门槛;节省了APP的开发和测试周期,使得APP更快速上市,占据市场先机。
可选地,在上述图6对应的实施例的基础上,本发明实施例提供的服务质量控制的方法的第一个可选实施例中,所述APP的标识和根据所述APP的用户等级的标识,获取所述APP的用户等级对应的所述APP的服务质量控制策略,包括:
若在所述API管理设备的缓存区中存在所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户等级对应的所述APP的服务质量控制策略;
若在所述API管理设备的缓存区中不存在所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系的缓存数据,则从非缓存区中已存储的所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系中,获取所述APP的用户等级对应的所述APP的服务质量控制策略。
本发明实施例为全托管场景下的服务质量控制的方案,可以将用户等级的标识与服务质量控制策略的对应关系全部托管在API管理设备上,可以提高API调用的效率。
可选地,在上述图6对应的实施例的基础上,本发明实施例提供的服务质量控制的方法的第二个可选实施例中,所述根据所述APP的标识和所述APP的 用户等级的标识,获取所述APP的用户等级对应的所述APP的服务质量控制策略,可以包括:
若在所述API管理设备的缓存区中存在所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户等级对应的所述APP的服务质量控制策略;
若在所述API管理设备的缓存区中不存在所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系的缓存数据,则向应用服务器发送查询请求,所述查询请求中携带所述APP的用户等级的标识,所述APP的用户等级的标识用于所述应用服务器查找所述APP的用户等级对应的所述APP的服务质量控制策略;
接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的用户等级对应的所述APP的服务质量控制策略。
本发明实施例为弱管场景下的服务质量控制的方案,可以将用户等级的标识对应的服务质量控制策略存储在App服务器上。
实际上,本发明实施例所提供的服务质量控制的方案没有完全列出,本发明实施例所提供的服务质量控制的方案也可以包含图5对应的实施例中的任一可选方案,如:缓存方案,定期清理方案等,这些可选的方案,可以参阅图1至图4部分的相关描述进行理解,本处不做过多赘述。
本发明实施例所提供的通过用户等级的标识确定服务质量控制策略的方案可以使用于局域网或者在一个安全隔离的网络环境内隔离区(DMZ,Demilitarized Zone):用户等级的标识直接在请求中明文携带,用户的标识可有可无。也可以是在网络传输时用户等级的标识直接在请求中密文携带,用户的标识可有可无。用户等级的标识直接在请求中明文或密文携带,用户的标识可有可无。
图7为本发明实施例中API管理设备50的一实施例示意图。如图7所示,API管理设备50的一实施例包括:
接收模块501,用于根据所述接收模块接收的所述APP的标识和所述APP的用户标识,获取所述APP的用户标识对应的所述APP的用户等级;
获取模块502,用于根据所述接收模块接收的所述APP的标识和所述APP的用户标识,获取所述APP的服务质量控制策略;
控制模块503,用于根据所述获取模块502获取的所述APP的服务质量控制策略,控制所述用户标识所指示用户的服务质量。
本发明实施例提供的API管理设备包括接收模块501根据所述接收模块接收的所述APP的标识和所述APP的用户标识,获取所述APP的用户标识对应的所述APP的用户等级;获取模块502根据所述接收模块接收的所述APP的标识和所述APP的用户标识,获取所述APP的服务质量控制策略;控制模块503,用于根据所述获取模块502获取的所述APP的服务质量控制策略,控制所述用户标识所指示用户的服务质量。与现有技术中需要APP开发者开发一套用户的QoS管理功能相比,本发明实施例提供的API管理设备,可以为注册在API管理设备上的APP提供服务质量控制,加快了APP的开发效率。
可选地,在上述图7对应的实施例的基础上,参阅图8,本发明实施例提供的API管理设备的第一个可选实施例中,所述获取模块502包括:
第一获取子模块5021,用于根据所述接收模块接收的所述APP的标识和所述APP的用户标识,获取所述APP的用户标识对应的所述APP的用户等级;
第二获取子模块5022,用于根据所述第一获取子模块获取的所述APP的用户等级,获取所述APP的用户等级对应的所述APP的服务质量控制策略。
可选地,在上述图8对应的实施例的基础上,参阅图9,本发明实施例提供的API管理设备的第二个可选实施例中,所述API管理设备50还包括第一注册模块505和第一存储模块506,
所述接收模块501,还用于接收所述APP的注册请求,并接收所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系;
所述第一注册模块505,用于根据所述接收模块501接收的所述注册请求为所述APP进行注册;
所述第一存储模块506,用于存储所述接收模块501接收的所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP 的服务质量控制策略的对应关系。
可选地,在上述图9对应的实施例的基础上,本发明实施例提供的API管理设备的第三个可选实施例中,
所述第一获取子模块5021,具体用于若在所述API管理设备的缓存区中存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户标识对应的所述APP的用户等级;若在所述API管理设备的缓存区中不存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述非缓存区中已存储的所述APP的用户标识与所述APP的用户等级的对应关系中,获取所述APP的用户标识对应的所述APP的用户等级
所述第二获取子模块5022,具体用于当从所述缓存区中获取所述APP的用户等级时,从所述缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略;当从所述非缓存区中获取所述APP的用户等级时,从所述非缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略。
可选地,在上述图8对应的实施例的基础上,参阅图10,本发明实施例提供的API管理设备的第四个可选实施例中,所述API管理设备还包括第二注册模块507和第二存储模块508,
所述接收模块501,还用于接收所述APP的注册请求,并接收第一查找指示标识、所述APP的用户等级与所述APP的服务质量控制策略的对应关系,所述第一查找指示标识用于指示需要从应用服务器中查找所述APP的用户标识与所述APP的用户等级的对应关系;
所述第二注册模块507,用于根据所述接收模块501接收的注册请求为所述APP进行注册;
所述第二存储模块508,用于存储所述接收模块501接收的所述第一查找指示标识、所述APP的用户等级与所述APP的服务质量控制策略的对应关系。
可选地,在上述图10对应的实施例的基础上,本发明实施例提供的API管理设备的第五个可选实施例中,
所述第一获取子模块5021,具体用于若在所述API管理设备的缓存区中存 在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户标识对应的所述APP的用户等级;若在所述API管理设备的缓存区中不存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则根据所述第一查找指示标识,向所述应用服务器发送查询请求,所述查询请求中携带所述APP的用户标识,所述APP的用户标识用于所述应用服务器查找所述APP的用户标识对应的所述APP的用户等级;接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的用户等级;
所述第二获取子模块5022,具体用于当从所述缓存区中获取所述APP的用户等级时,从所述缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略;当从所述应用服务器获取所述APP的用户等级时,从所述非缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略。
可选地,在上述图8对应的实施例的基础上,参阅图11,本发明实施例提供的API管理设备的第六个可选实施例中,所述API管理设备还包括第三注册模块509和第三存储模块511,
所述接收模块501,用于接收所述APP的注册请求、并接收第二查找指示标识、所述APP的用户标识与所述APP的用户等级的对应关系,所述第二查找指示标识用于指示需要从应用服务器中查找所述APP的用户等级与所述APP的服务质量控制策略的对应关系;
所述第三注册模块509,用于根据所述接收模块501接收的注册请求为所述APP进行注册;
所述第三存储模块511,用于存储所述接收模块501接收模块接收的所述第二查找指示标识、所述APP的用户标识与所述APP的用户等级的对应关系。
可选地,在上述图11对应的实施例的基础上,本发明实施例提供的API管理设备的第七个可选实施例中,
所述第一获取子模块5021,具体用于若在所述API管理设备的缓存区中存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户标识对应的所述APP的用户等级;若在所述 API管理设备的缓存区中不存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述非缓存区中已存储的所述APP的用户标识与所述APP的用户等级的对应关系中,获取所述APP的用户标识对应的所述APP的用户等级;
所述第二获取子模块5022,具体用于当从所述缓存区中获取所述APP的用户等级时,从所述缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略;当从所述非缓存区中获取所述APP的用户等级时,根据所述第二查找指示标识向所述应用服务器发送查询请求,所述查询请求中携带所述APP的用户等级,所述APP的用户等级用于所述应用服务器查找所述APP的用户等级对应的所述APP的服务质量控制策略;接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的服务质量控制策略。
可选地,在上述图8对应的实施例的基础上,参阅图12,本发明实施例提供的API管理设备的第八个可选实施例中,所述API管理设备还包括第四注册模块512和第四存储模块513,
所述接收模块501,还用于接收所述APP的注册请求、并接收第三查找指示标识,所述第三查找指示标识用于指示从应用服务器中查找所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系;
所述第四注册模块512,用于根据所述接收模块接收的注册请求为所述APP进行注册;
所述第四存储模块513,用于存储所述接收模块501接收的所述第三查找指示标识。
可选地,在上述图12对应的实施例的基础上,本发明实施例提供的API管理设备的第九个可选实施例中,
所述第一获取子模块5021,具体用于若在所述API管理设备的缓存区中存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,从所述缓存数据中获取所述APP的用户标识对应的所述APP的用户等级;
所述第二获取子模块5022,具体用于当从所述缓存数据中获取所述APP的 用户标识对应的所述APP的用户等级时,从所述缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略;或者,若在所述API管理设备的缓存区中不存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则根据所述第三查找指示标识,向所述应用服务器发送查询请求,所述查询请求中携带所述APP的用户标识,所述APP的用户标识用于所述应用服务器查找所述APP的用户标识对应的所述APP的用户等级,以及所述APP的用户等级对应的所述APP的服务质量控制策略,接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的服务质量控制策略。
可选地,在上述第三、第五、第七、第九个可选实施例的基础上,本发明实施例提供的API管理设备的第十个可选实施例中,
所述控制模块503,还用于当所述APP的服务质量控制策略不是从所述缓存区获取得到时,将所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系存储到所述API管理设备的缓存区中。
可选地,在上述图8对应的实施例或任一可选实施例的基础上,参阅图13,本发明实施例提供的API管理设备的第十一个可选实施例中,所述API管理设备还包括第一清理模块514,
所述接收模块501,还用于接收所述用户终端发送的所述APP的下线请求;
所述第一清理模块514,用于在所述接收模块501接收到所述APP的下线请求后,从所述API管理设备的缓存区中清除所述用户标识对应的数据。
可选地,在上述图8对应的实施例或任一可选实施例的基础上,参阅图14,本发明实施例提供的API管理设备的第十二个可选实施例中,所述API管理设备还包括添加模块515、设置模块516和第二清理模块517,
所述添加模块515,用于将所述接收模块501接收的所述APP运行所产生所述用户标识对应的数据添加到所述API管理设备的缓存区;
所述设置模块516,用于为所述添加模块515添加到所述缓存中的数据设置时间标记;
所述第二清理模块517,用于到达预置时间后,根据所述设置模块516设置 的时间标记,从所述API管理设备的缓存区中清理出过期的数据。
可选地,在上述图8对应的实施例或其任一可选实施例的基础上,参阅图14,本发明实施例提供的API管理设备的第十三个可选实施例中,所述API管理设备还包括:确认模块518,
所述确认模块元518,用于确认所述APP是否已认证;
所述第一获取子模块502,还用于当所述确认模块518确认已认证时,获取所述APP的用户名作为所述用户标识;当未认证,从与所述用户终端预先约定的约定字段中获取所述用户标识。
图7至图15所描述的API管理设备可以参阅图1-图5部分的描述进行理解,本处不做过多赘述。
参阅图16,本发明实施例提供的API管理设备的另一实施例包括:
接收模块521,用于接收用户在使用应用APP时触发用户终端发送的API调用请求,所述API调用请求中携带所述APP的标识和所述APP的用户等级的标识;
获取模块522,用于根据所述接收模块521接收的所述APP的标识和所述APP的用户等级的标识,获取所述APP的用户等级对应的所述APP的服务质量控制策略;
控制模块523,用于根据所述获取模块522获取的所述APP的服务质量控制策略,控制所述用户标识所指示用户的服务质量。
本发明实施例中,接收模块521,用于接收用户在使用应用APP时触发用户终端发送的API调用请求,所述API调用请求中携带所述APP的标识和所述APP的用户等级的标识;获取模块522,用于根据所述接收模块521接收的所述APP的标识和所述APP的用户等级的标识,获取所述APP的用户等级对应的所述APP的服务质量控制策略;控制模块523,用于根据所述获取模块522获取的所述APP的服务质量控制策略,控制所述用户标识所指示用户的服务质量。与现有技术中需要APP开发者开发一套用户SLA和QoS管理功能相比,本发明实施例提供的服务质量控制的方法,可以为注册在API管理设备上的APP提供服务质量控制,加快了APP的开发效率。而且,APP开发者只需要在API注册时 进行简单的配置即可,进一步降低对APP开发者经验和技能的要求,降低APP开发者的门槛;节省了APP的开发和测试周期,使得APP更快速上市,占据市场先机。
可选地,在上述图16对应的实施例的基础上,本发明实施例提供的API管理设备的第一个可选实施例中,
所述获取模块522,具体用于若在所述API管理设备的缓存区中存在所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户等级对应的所述APP的服务质量控制策略;若在所述API管理设备的缓存区中不存在所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系的缓存数据,则从非缓存区中已存储的所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系中,获取所述APP的用户等级对应的所述APP的服务质量控制策略。
可选地,在上述图16对应的实施例的基础上,本发明实施例提供的API管理设备的第二个可选实施例中,
所述获取模块522,具体用于若在所述API管理设备的缓存区中存在所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户等级对应的所述APP的服务质量控制策略;若在所述API管理设备的缓存区中不存在所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系的缓存数据,则向应用服务器发送查询请求,所述查询请求中携带所述APP的用户等级的标识,所述APP的用户等级的标识用于所述应用服务器查找所述APP的用户等级对应的所述APP的服务质量控制策略;接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的用户等级对应的所述APP的服务质量控制策略。
在上述API管理设备的多个实施例中,应当理解的是,在一种实现方式下,接收模块、第一获取子模块和第二获取子模块中的接收和发送功能可以是由输入/输出I/O设备(比如网卡)来实现,注册模块、添加模块、设置模块、第一清理模块、第二清理模块可以由处理器执行存储器中的程序或指令来实现的(换言之,即由处理器以及与所述处理器耦合的存储器中的特殊指令相互配合 来实现);在另一种实现方式下,接收模块、第一获取子模块和第二获取子模块中的接收和发送功能可以是由输入/输出I/O设备(比如网卡)来实现,注册模块、添加模块、设置模块、第一清理模块、第二清理模块也可以分别通过专有电路来实现,具体实现方式参见现有技术,这里不再赘述;在再一种实现方式下,接收模块、第一获取子模块和第二获取子模块中的接收和发送功能可以是由输入/输出I/O设备(比如网卡)来实现,注册模块、添加模块、设置模块、第一清理模块、第二清理模块也可以通过现场可编程门阵列(FPGA,Field-Programmable Gate Array)来实现,具体实现方式参见现有技术,这里不再赘述,本发明包括但不限于前述实现方式,应当理解的是,只要按照本发明的思想实现的方案,都落入本发明实施例所保护的范围。
本实施例提供了一种API管理设备的硬件结构,参见图17所示,一种API管理设备的硬件结构可以包括:
收发器件、软件器件以及硬件器件三部分;
收发器件为用于完成包收发的硬件电路;
硬件器件也可称“硬件处理模块”,或者更简单的,也可简称为“硬件”,硬件器件主要包括基于FPGA、ASIC之类专用硬件电路(也会配合其他配套器件,如存储器)来实现某些特定功能的硬件电路,其处理速度相比通用处理器往往要快很多,但功能一经定制,便很难更改,因此,实现起来并不灵活,通常用来处理一些固定的功能。需要说明的是,硬件器件在实际应用中,也可以包括MCU(微处理器,如单片机)、或者CPU等处理器,但这些处理器的主要功能并不是完成大数据的处理,而主要用于进行一些控制,在这种应用场景下,由这些器件搭配的系统为硬件器件。
软件器件(或者也简单“软件”)主要包括通用的处理器(例如CPU)及其一些配套的器件(如内存、硬盘等存储设备),可以通过编程来让处理器具备相应的处理功能,用软件来实现时,可以根据业务需求灵活配置,但往往速度相比硬件器件来说要慢。软件处理完后,可以通过硬件器件将处理完的数据通过收发器件进行发送,也可以通过一个与收发器件相连的接口向收发器件发送处理完的数据。
本实施例中,收发器件用于进行上述实施例中查询请求的发送和信息的接收,软件器件或硬件器件用于APP注册、服务质量控制等。
硬件器件及软件器件的其他功能在前述实施例中已经详细论述,这里不再赘述。
下面结合附图就接收模块、第一获取子模块和第二获取子模块中的接收和发送功能可以是由输入/输出I/O设备(比如网卡)来实现,注册模块、添加模块、设置模块、第一清理模块、第二清理模块可以是可以由处理器执行存储器中的程序或指令来实现的技术方案来做详细的介绍:
图18是本发明实施例提供的API管理设备50的结构示意图。所述API管理设备50包括处理器510、存储器550和输入/输出I/O设备530,存储器550可以包括只读存储器和随机存取存储器,并向处理器510提供操作指令和数据。存储器550的一部分还可以包括非易失性随机存取存储器(NVRAM)。
在一些实施方式中,存储器550存储了如下的元素,可执行模块或者数据结构,或者他们的子集,或者他们的扩展集:
在本发明实施例中,通过调用存储器550存储的操作指令(该操作指令可存储在操作系统中),
通过I/O设备接收应用APP被使用时触发用户终端发送的API调用请求,所述API调用请求中携带所述APP的用户标识和所述APP的标识;
根据所述APP的标识和所述APP的用户标识,获取所述APP的服务质量控制策略;
根据所述APP的用户等级,获取所述APP的用户等级对应的所述APP的服务质量控制策略;
根据所述APP的服务质量控制策略,控制所述用户标识所指示用户的服务质量。
可见,与现有技术中需要APP开发者开发一套用户的QoS管理功能相比,本发明实施例提供的服务质量控制的方法,可以为注册在API管理设备上的APP提供服务质量控制,加快了APP的开发效率。而且,APP开发者只需要在API注册时进行简单的配置即可,进一步降低对APP开发者经验和技能的要求, 降低APP开发者的门槛;节省了APP的开发和测试周期,使得APP更快速上市,占据市场先机。
处理器510控制API管理设备50的操作,处理器510还可以称为CPU(Central Processing Unit,中央处理单元)。存储器550可以包括只读存储器和随机存取存储器,并向处理器510提供指令和数据。存储器550的一部分还可以包括非易失性随机存取存储器(NVRAM)。具体的应用中API管理设备50的各个组件通过总线系统520耦合在一起,其中总线系统520除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图中将各种总线都标为总线系统520。
上述本发明实施例揭示的方法可以应用于处理器510中,或者由处理器510实现。处理器510可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器510中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器510可以是通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器550,处理器510读取存储器550中的信息,结合其硬件完成上述方法的步骤。
所述APP的标识,获取所述APP的用户标识对应的用户等级。
可选地,处理器510具体用于根据所述APP的标识和所述APP的用户标识,获取所述APP的用户标识对应的所述APP的用户等级;
根据所述APP的用户等级,获取所述APP的用户等级对应的所述APP的服务质量控制策略。
可选地,I/O设备530还用于接收所述APP的注册请求,并接收所述APP的 用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系;
处理器510还用于根据所述注册请求为所述APP进行注册;
所述存储器550,还用于存储所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系到所述API管理设备。
处理器510具体用于:
若在所述API管理设备的缓存区中存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户标识对应的所述APP的用户等级;
若在所述API管理设备的缓存区中不存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述非缓存区中已存储的所述APP的用户标识与所述APP的用户等级的对应关系中,获取所述APP的用户标识对应的所述APP的用户等级;
当从所述缓存区中获取所述APP的用户等级时,从所述缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略;
当从所述非缓存区中获取所述APP的用户等级时,从所述非缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略。
可选地,I/O设备530还用于接收所述APP的注册请求,并接收第一查找指示标识、所述APP的用户等级与所述APP的服务质量控制策略的对应关系,所述第一查找指示标识用于指示需要从应用服务器中查找所述APP的用户标识与所述APP的用户等级的对应关系;
处理器510还用于根据所述注册请求为所述APP进行注册;
所述存储器550,还用于存储所述第一查找指示标识、所述APP的用户等级与所述APP的服务质量控制策略的对应关系到所述API管理设备。
处理器510具体用于:
若在所述API管理设备的缓存区中存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户标 识对应的所述APP的用户等级;
若在所述API管理设备的缓存区中不存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则根据所述第一查找指示标识,通过I/O设备530向所述应用服务器发送查询请求,所述查询请求中携带所述APP的用户标识,所述APP的用户标识用于所述应用服务器查找所述APP的用户标识对应的所述APP的用户等级;接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的用户等级;
当从所述缓存区中获取所述APP的用户等级时,从所述缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略;
当从所述应用服务器获取所述APP的用户等级时,从所述非缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略。
可选地,I/O设备530还用于接收所述APP的注册请求、并接收第二查找指示标识、所述APP的用户标识与所述APP的用户等级的对应关系,所述第二查找指示标识用于指示需要从应用服务器中查找所述APP的用户等级与所述APP的服务质量控制策略的对应关系;
处理器510还用于根据所述注册请求为所述APP进行注册;
所述存储器550,还用于存储所述第二查找指示标识、所述APP的用户标识与所述APP的用户等级的对应关系到所述API管理设备。
处理器510具体用于:
若在所述API管理设备的缓存区中存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户标识对应的所述APP的用户等级;
若在所述API管理设备的缓存区中不存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述非缓存区中已存储的所述APP的用户标识与所述APP的用户等级的对应关系中,获取所述APP的用户标识对应的所述APP的用户等级;
当从所述缓存区中获取所述APP的用户等级时,从所述缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略;
当从所述非缓存区中获取所述APP的用户等级时,根据所述第二查找指示标识,通过I/O设备530向所述应用服务器发送查询请求,所述查询请求中携带所述APP的用户等级,所述APP的用户等级用于所述应用服务器查找所述APP的用户等级对应的所述APP的服务质量控制策略;接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的服务质量控制策略。
可选地,I/O设备530还用于接收所述APP的注册请求、并接收第三查找指示标识,所述第三查找指示标识用于指示从应用服务器中查找所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系;
处理器510还用于根据所述注册请求为所述APP进行注册;
存储器550还用于存储所述第三查找指示标识到所述API管理设备。
I/O设备530具体用于:
若在所述API管理设备的缓存区中存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户标识对应的所述APP的用户等级,从所述缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略;
若在所述API管理设备的缓存区中不存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则根据所述第三查找指示标识,通过I/O设备530向所述应用服务器发送查询请求,所述查询请求中携带所述APP的用户标识,所述APP的用户标识用于所述应用服务器查找所述APP的用户标识对应的所述APP的用户等级,以及所述APP的用户等级对应的所述APP的服务质量控制策略,接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的服务质量控制策略。
可选地,处理器510还用于当所述APP的服务质量控制策略不是从所述缓存区获取得到时,将所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系存储到所述API管理设备的缓存区中。
可选地,处理器510还用于确认所述APP是否已认证;当已认证时,获取 所述APP的用户名作为所述用户标识;当未认证,从与所述用户终端预先约定的约定字段中获取所述用户标识。
可选地,I/O设备530还用于接收所述用户终端发送的所述APP的下线请求;
处理器510还用于从所述API管理设备的缓存区中清除所述用户标识对应的数据。
可选地,处理器510还用于将所述APP运行所产生所述用户标识对应的数据添加到所述API管理设备的缓存区,并为所述数据设置时间标记;到达预置时间后,根据所述时间标记,从所述API管理设备的缓存区中清理出过期的数据。
另外一方面,本发明实施例提供的API管理设备,参阅图18,在本发明实施例中,通过调用存储器550存储的操作指令(该操作指令可存储在操作系统中),
通过I/O设备530接收用户在使用应用APP时触发用户终端发送的API调用请求,所述API调用请求中携带所述APP的标识和所述APP的用户等级的标识;根据所述APP的标识和所述APP的用户等级的标识,获取所述APP的用户等级对应的所述APP的服务质量控制策略;根据所述APP的服务质量控制策略,控制所述用户标识所指示用户的服务质量。
可选地,处理器510具体用于若在所述API管理设备的缓存区中存在所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户等级对应的所述APP的服务质量控制策略;若在所述API管理设备的缓存区中不存在所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系的缓存数据,则从非缓存区中已存储的所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系中,获取所述APP的用户等级对应的所述APP的服务质量控制策略。
可选地,处理器510具体用于若在所述API管理设备的缓存区中存在所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户等级对应的所述APP的服务质量控 制策略;若在所述API管理设备的缓存区中不存在所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系的缓存数据,则通过I/O设备向应用服务器发送查询请求,所述查询请求中携带所述APP的用户等级的标识,所述APP的用户等级的标识用于所述应用服务器查找所述APP的用户等级对应的所述APP的服务质量控制策略;接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的用户等级对应的所述APP的服务质量控制策略。
图18对应的实施例以及其他可选实施例可以参阅图1-图15部分描述进行理解,本处不做过多赘述。
如图19所示,本发明实施例提供的服务质量控制的系统的一实施例包括:用户终端40和应用程序编程接口API管理设备50,
所述API管理设备50用于:
接收应用APP被使用时触发用户终端发送的API调用请求,所述API调用请求中携带所述APP的用户标识和所述APP的标识;
根据所述APP的标识和所述APP的用户标识,获取所述APP的用户标识对应的所述APP的用户等级;
根据所述APP的用户等级,获取所述APP的用户等级对应的所述APP的服务质量控制策略;
根据所述APP的服务质量控制策略,控制所述用户标识所指示用户的服务质量。
另外一方面,所述API管理设备50用于:
接收用户在使用应用APP时触发用户终端发送的API调用请求,所述API调用请求中携带所述APP的标识和所述APP的用户等级的标识;
根据所述APP的标识和所述APP的用户等级的标识,获取所述APP的用户等级对应的所述APP的服务质量控制策略;
根据所述APP的服务质量控制策略,控制所述用户标识所指示用户的服务质量。
与现有技术中需要APP开发者开发一套用户的QoS管理功能相比,本发明 实施例提供的服务质量控制的方法,可以为注册在API管理设备上的APP提供服务质量控制,加快了APP的开发效率。
本发明实施例提供的系统实施例还可以参阅图1-图18部分的描述进行理解,本处不做过多赘述。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:ROM、RAM、磁盘或光盘等。
以上对本发明实施例所提供的服务质量控制的方法、API管理设备以及系统进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。

Claims (38)

  1. 一种服务质量控制的方法,其特征在于,所述方法应用于为应用APP提供开放应用程序编程接口API的API管理设备,所述方法包括:
    接收应用APP被使用时触发用户终端发送的API调用请求,所述API调用请求中携带所述APP的用户标识和所述APP的标识;
    根据所述APP的标识和所述APP的用户标识,获取所述APP的服务质量控制策略;
    根据所述APP的服务质量控制策略,控制所述用户标识所指示用户的服务质量。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述APP的标识和所述APP的用户标识,获取所述APP的服务质量控制策略,包括:
    根据所述APP的标识和所述APP的用户标识,获取所述APP的用户标识对应的所述APP的用户等级;
    根据所述APP的用户等级,获取所述APP的用户等级对应的所述APP的服务质量控制策略。
  3. 根据权利要求2所述的方法,其特征在于,所述接收应用APP被使用时触发用户终端发送的API调用请求之前,所述方法还包括:
    接收所述APP的注册请求,并接收所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系;
    根据所述注册请求为所述APP进行注册,并存储所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系到所述API管理设备。
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述APP的标识和所述APP的用户标识,获取所述APP的用户标识对应的所述APP的用户等级,包括:
    若在所述API管理设备的缓存区中存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户标 识对应的所述APP的用户等级;
    若在所述API管理设备的缓存区中不存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述非缓存区中已存储的所述APP的用户标识与所述APP的用户等级的对应关系中,获取所述APP的用户标识对应的所述APP的用户等级;
    对应的,所述根据所述APP的用户等级,获取所述APP的用户等级对应的所述APP的服务质量控制策略,包括:
    当从所述缓存区中获取所述APP的用户等级时,从所述缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略;
    当从所述非缓存区中获取所述APP的用户等级时,从所述非缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略。
  5. 根据权利要求2所述的方法,其特征在于,所述接收应用APP被使用时触发用户终端发送的API调用请求之前,所述方法还包括:
    接收所述APP的注册请求,并接收第一查找指示标识、所述APP的用户等级与所述APP的服务质量控制策略的对应关系,所述第一查找指示标识用于指示需要从应用服务器中查找所述APP的用户标识与所述APP的用户等级的对应关系;
    根据所述注册请求为所述APP进行注册,并存储所述第一查找指示标识、所述APP的用户等级与所述APP的服务质量控制策略的对应关系到所述API管理设备。
  6. 根据权利要求5所述的方法,其特征在于,所述根据所述APP的标识和所述APP的用户标识,获取所述APP的用户标识对应的所述APP的用户等级,包括:
    若在所述API管理设备的缓存区中存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户标识对应的所述APP的用户等级;
    若在所述API管理设备的缓存区中不存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则根据所述第一查找指示标识,向所述应 用服务器发送查询请求,所述查询请求中携带所述APP的用户标识,所述APP的用户标识用于所述应用服务器查找所述APP的用户标识对应的所述APP的用户等级;接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的用户等级;
    对应的,所述根据所述APP的用户等级,获取所述APP的用户等级对应的所述APP的服务质量控制策略,包括:
    当从所述缓存区中获取所述APP的用户等级时,从所述缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略;
    当从所述应用服务器获取所述APP的用户等级时,从所述非缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略。
  7. 根据权利要求2所述的方法,其特征在于,所述接收应用APP被使用时触发用户终端发送的API调用请求之前,所述方法还包括:
    接收所述APP的注册请求、并接收第二查找指示标识、所述APP的用户标识与所述APP的用户等级的对应关系,所述第二查找指示标识用于指示需要从应用服务器中查找所述APP的用户等级与所述APP的服务质量控制策略的对应关系;
    根据所述注册请求为所述APP进行注册,并存储所述第二查找指示标识、所述APP的用户标识与所述APP的用户等级的对应关系到所述API管理设备。
  8. 根据权利要求7所述的方法,其特征在于,所述根据所述APP的标识和所述APP的用户标识,获取所述APP的用户标识对应的所述APP的用户等级,包括:
    若在所述API管理设备的缓存区中存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户标识对应的所述APP的用户等级;
    若在所述API管理设备的缓存区中不存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述非缓存区中已存储的所述APP的用户标识与所述APP的用户等级的对应关系中,获取所述APP的用户标识对应的所述APP的用户等级;
    对应的,所述根据所述APP的用户等级,获取所述APP的用户等级对应的所述APP的服务质量控制策略,包括:
    当从所述缓存区中获取所述APP的用户等级时,从所述缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略;
    当从所述非缓存区中获取所述APP的用户等级时,根据所述第二查找指示标识向所述应用服务器发送查询请求,所述查询请求中携带所述APP的用户等级,所述APP的用户等级用于所述应用服务器查找所述APP的用户等级对应的所述APP的服务质量控制策略;接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的服务质量控制策略。
  9. 根据权利要求2所述的方法,其特征在于,所述接收应用APP被使用时触发用户终端发送的API调用请求之前,所述方法还包括:
    接收所述APP的注册请求、并接收第三查找指示标识,所述第三查找指示标识用于指示从应用服务器中查找所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系;
    根据所述注册请求为所述APP进行注册,并存储所述第三查找指示标识到所述API管理设备。
  10. 根据权利要求9所述的方法,其特征在于,所述根据所述APP的用户标识,获取所述APP的用户标识对应的所述APP的用户等级,根据所述APP的用户等级,获取所述APP的用户等级对应的所述APP的服务质量控制策略,包括:
    若在所述API管理设备的缓存区中存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户标识对应的所述APP的用户等级,从所述缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略;
    若在所述API管理设备的缓存区中不存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则根据所述第三查找指示标识,向所述应用服务器发送查询请求,所述查询请求中携带所述APP的用户标识,所述APP 的用户标识用于所述应用服务器查找所述APP的用户标识对应的所述APP的用户等级,以及所述APP的用户等级对应的所述APP的服务质量控制策略,接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的服务质量控制策略。
  11. 根据权利要求4、6、8或10所述的方法,其特征在于,当所述APP的服务质量控制策略不是从所述缓存区获取得到时,所述方法还包括:
    将所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系存储到所述API管理设备的缓存区中。
  12. 根据权利要求1-11任一所述的方法,其特征在于,所述根据所述APP的用户标识,获取所述APP的用户标识对应的所述APP的用户等级之前,所述方法还包括:
    确认所述APP是否已认证;
    当已认证时,获取所述APP的用户名作为所述用户标识;
    当未认证,从与所述用户终端预先约定的约定字段中获取所述用户标识。
  13. 根据权利要求1-12任一所述的方法,其特征在于,所述方法还包括:
    接收所述用户终端发送的所述APP的下线请求;
    从所述API管理设备的缓存区中清除所述用户标识对应的数据。
  14. 根据权利要求1-12任一所述的方法,其特征在于,所述方法还包括:
    将所述APP运行所产生所述用户标识对应的数据添加到所述API管理设备的缓存区,并为所述数据设置时间标记;
    到达预置时间后,根据所述时间标记,从所述API管理设备的缓存区中清理出过期的数据。
  15. 一种服务质量控制的方法,其特征在于,所述方法应用于为应用APP提供开放应用程序编程接口API的API管理设备,所述方法包括:
    接收用户在使用应用APP时触发用户终端发送的API调用请求,所述API调用请求中携带所述APP的标识和所述APP的用户等级的标识;
    根据所述APP的标识和所述APP的用户等级的标识,获取所述APP的用户 等级对应的所述APP的服务质量控制策略;
    根据所述APP的服务质量控制策略,控制所述用户标识所指示用户的服务质量。
  16. 根据权利要求15所述的方法,其特征在于,所述APP的标识和根据所述APP的用户等级的标识,获取所述APP的用户等级对应的所述APP的服务质量控制策略,包括:
    若在所述API管理设备的缓存区中存在所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户等级对应的所述APP的服务质量控制策略;
    若在所述API管理设备的缓存区中不存在所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系的缓存数据,则从非缓存区中已存储的所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系中,获取所述APP的用户等级对应的所述APP的服务质量控制策略。
  17. 根据权利要求15所述的方法,其特征在于,所述根据所述APP的标识和所述APP的用户等级的标识,获取所述APP的用户等级对应的所述APP的服务质量控制策略,包括:
    若在所述API管理设备的缓存区中存在所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户等级对应的所述APP的服务质量控制策略;
    若在所述API管理设备的缓存区中不存在所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系的缓存数据,则向应用服务器发送查询请求,所述查询请求中携带所述APP的用户等级的标识,所述APP的用户等级的标识用于所述应用服务器查找所述APP的用户等级对应的所述APP的服务质量控制策略;
    接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的用户等级对应的所述APP的服务质量控制策略。
  18. 一种应用程序编程接口API管理设备,其特征在于,包括:
    接收模块,用于接收应用APP被使用时触发用户终端发送的API调用请求, 所述API调用请求中携带所述APP的用户标识和所述APP的标识;
    获取模块,用于根据所述接收模块接收的所述APP的标识和所述APP的用户标识,获取所述APP的服务质量控制策略;
    控制模块,用于根据所述获取模块获取的所述APP的服务质量控制策略,控制所述用户标识所指示用户的服务质量。
  19. 根据权利要求18所述的API管理设备,其特征在于,所述获取模块包括:
    第一获取子模块,用于根据所述接收模块接收的所述APP的标识和所述APP的用户标识,获取所述APP的用户标识对应的所述APP的用户等级;
    第二获取子模块,用于根据所述第一获取子模块获取的所述APP的用户等级,获取所述APP的用户等级对应的所述APP的服务质量控制策略。
  20. 根据权利要求19所述的API管理设备,其特征在于,所述API管理设备还包括第一注册模块和第一存储模块,
    所述接收模块,还用于接收所述APP的注册请求,并接收所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系;
    所述第一注册模块,用于根据所述接收模块接收的所述注册请求为所述APP进行注册;
    所述第一存储模块,用于存储所述接收模块接收的所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系。
  21. 根据权利要求20所述的API管理设备,其特征在于,
    所述第一获取子模块,具体用于若在所述API管理设备的缓存区中存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户标识对应的所述APP的用户等级;若在所述API管理设备的缓存区中不存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述非缓存区中已存储的所述APP的用户标识与所述APP的用户等级的对应关系中,获取所述APP的用户标识对应的所述APP的用 户等级;
    所述第二获取子模块,具体用于当从所述缓存区中获取所述APP的用户等级时,从所述缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略;当从所述非缓存区中获取所述APP的用户等级时,从所述非缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略。
  22. 根据权利要求19所述的API管理设备,其特征在于,所述API管理设备还包括第二注册模块和第二存储模块,
    所述接收模块,还用于接收所述APP的注册请求,并接收第一查找指示标识、所述APP的用户等级与所述APP的服务质量控制策略的对应关系,所述第一查找指示标识用于指示需要从应用服务器中查找所述APP的用户标识与所述APP的用户等级的对应关系;
    所述第二注册模块,用于根据所述接收模块接收的注册请求为所述APP进行注册;
    所述第二存储模块,用于存储所述接收模块接收的所述第一查找指示标识、所述APP的用户等级与所述APP的服务质量控制策略的对应关系。
  23. 根据权利要求22所述的API管理设备,其特征在于,
    所述第一获取子模块,具体用于若在所述API管理设备的缓存区中存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户标识对应的所述APP的用户等级;若在所述API管理设备的缓存区中不存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则根据所述第一查找指示标识,向所述应用服务器发送查询请求,所述查询请求中携带所述APP的用户标识,所述APP的用户标识用于所述应用服务器查找所述APP的用户标识对应的所述APP的用户等级;接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的用户等级;
    所述第二获取子模块,具体用于当从所述缓存区中获取所述APP的用户等级时,从所述缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略;当从所述应用服务器获取所述APP的用户等级时,从所述非缓存区中 获取所述APP的用户等级对应的所述APP的服务质量控制策略。
  24. 根据权利要求19所述的API管理设备,其特征在于,所述API管理设备还包括第三注册模块和第三存储模块,
    所述接收模块,用于接收所述APP的注册请求、并接收第二查找指示标识、所述APP的用户标识与所述APP的用户等级的对应关系,所述第二查找指示标识用于指示需要从应用服务器中查找所述APP的用户等级与所述APP的服务质量控制策略的对应关系;
    所述第三注册模块,用于根据所述接收模块接收的注册请求为所述APP进行注册;
    所述第三存储模块,用于存储所述接收模块接收的所述第二查找指示标识、所述APP的用户标识与所述APP的用户等级的对应关系。
  25. 根据权利要求24所述的API管理设备,其特征在于,
    所述第一获取子模块,具体用于若在所述API管理设备的缓存区中存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户标识对应的所述APP的用户等级;若在所述API管理设备的缓存区中不存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则从所述非缓存区中已存储的所述APP的用户标识与所述APP的用户等级的对应关系中,获取所述APP的用户标识对应的所述APP的用户等级;
    所述第二获取子模块,具体用于当从所述缓存区中获取所述APP的用户等级时,从所述缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略;当从所述非缓存区中获取所述APP的用户等级时,根据所述第二查找指示标识向所述应用服务器发送查询请求,所述查询请求中携带所述APP的用户等级,所述APP的用户等级用于所述应用服务器查找所述APP的用户等级对应的所述APP的服务质量控制策略;接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的服务质量控制策略。
  26. 根据权利要求19所述的API管理设备,其特征在于,所述API管理设备还包括第四注册模块和第四存储模块,
    所述接收模块,还用于接收所述APP的注册请求、并接收第三查找指示标识,所述第三查找指示标识用于指示从应用服务器中查找所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系;
    所述第四注册模块,用于根据所述接收模块接收的注册请求为所述APP进行注册;
    所述第四存储模块,用于存储所述接收模块接收的所述第三查找指示标识。
  27. 根据权利要求26所述的API管理设备,其特征在于,
    所述第一获取子模块,具体用于若在所述API管理设备的缓存区中存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,从所述缓存数据中获取所述APP的用户标识对应的所述APP的用户等级;
    所述第二获取子模块,具体用于当从所述缓存数据中获取所述APP的用户标识对应的所述APP的用户等级时,从所述缓存区中获取所述APP的用户等级对应的所述APP的服务质量控制策略;或者,若在所述API管理设备的缓存区中不存在所述APP的用户标识与所述APP的用户等级的对应关系的缓存数据,则根据所述第三查找指示标识,向所述应用服务器发送查询请求,所述查询请求中携带所述APP的用户标识,所述APP的用户标识用于所述应用服务器查找所述APP的用户标识对应的所述APP的用户等级,以及所述APP的用户等级对应的所述APP的服务质量控制策略,接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的服务质量控制策略。
  28. 根据权利要求21、23、25或27所述的API管理设备,其特征在于,
    所述控制模块,还用于当所述APP的服务质量控制策略不是从所述缓存区获取得到时,将所述APP的用户标识与所述APP的用户等级的对应关系,以及所述APP的用户等级与所述APP的服务质量控制策略的对应关系存储到所述API管理设备的缓存区中。
  29. 根据权利要求19-28任一所述的API管理设备,其特征在于,所述API管理设备还包括:确认模块,
    所述确认模块,用于确认所述APP是否已认证;
    所述第一获取子模块,还用于当所述确认模块确认已认证时,获取所述APP的用户名作为所述用户标识;当未认证,从与所述用户终端预先约定的约定字段中获取所述用户标识。
  30. 根据权利要求19-29任一所述的API管理设备,其特征在于,所述API管理设备还包括第一清理模块,
    所述接收模块,还用于接收所述用户终端发送的所述APP的下线请求;
    所述第一清理模块,用于在所述接收模块接收到所述APP的下线请求后,从所述API管理设备的缓存区中清除所述用户标识对应的数据。
  31. 根据权利要求19-29任一所述的API管理设备,其特征在于,所述API管理设备还包括添加模块、设置模块和第二清理模块,
    所述添加模块,用于将所述接收模块接收的所述APP运行所产生所述用户标识对应的数据添加到所述API管理设备的缓存区;
    所述设置模块,用于为所述添加模块添加到所述缓存中的数据设置时间标记;
    所述第二清理模块,用于到达预置时间后,根据所述设置模块设置的时间标记,从所述API管理设备的缓存区中清理出过期的数据。
  32. 一种API管理设备,其特征在于,包括:
    接收模块,用于接收用户在使用应用APP时触发用户终端发送的API调用请求,所述API调用请求中携带所述APP的标识和所述APP的用户等级的标识;
    获取模块,用于根据所述接收模块接收的所述APP的标识和所述APP的用户等级的标识,获取所述APP的用户等级对应的所述APP的服务质量控制策略;
    控制模块,用于根据所述获取模块获取的所述APP的服务质量控制策略,控制所述用户标识所指示用户的服务质量。
  33. 根据权利要求32所述的API管理设备,其特征在于,
    所述获取模块,具体用于若在所述API管理设备的缓存区中存在所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户等级对应的所述APP的服务质量控制策 略;若在所述API管理设备的缓存区中不存在所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系的缓存数据,则从非缓存区中已存储的所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系中,获取所述APP的用户等级对应的所述APP的服务质量控制策略。
  34. 根据权利要求32所述的API管理设备,其特征在于,
    所述获取模块,具体用于若在所述API管理设备的缓存区中存在所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系的缓存数据,则从所述缓存数据中获取所述APP的用户等级对应的所述APP的服务质量控制策略;若在所述API管理设备的缓存区中不存在所述APP的用户等级对应的所述APP的服务质量控制策略的对应关系的缓存数据,则向应用服务器发送查询请求,所述查询请求中携带所述APP的用户等级的标识,所述APP的用户等级的标识用于所述应用服务器查找所述APP的用户等级对应的所述APP的服务质量控制策略;接收所述应用服务器发送的查询响应消息,所述查询响应消息中携带所述APP的用户等级对应的所述APP的服务质量控制策略。
  35. 一种应用程序编程接口API管理设备,其特征在于,包括:输入/输出设备、处理器和存储器,所述输入/输出设备、所述处理器和所述存储器通过总线通信连接;
    所述输入/输出设备用于接收应用APP被使用时触发用户终端发送的API调用请求,所述API调用请求中携带所述APP的用户标识和所述APP的标识;
    所述处理器用于根据所述APP的标识和所述APP的用户标识,获取所述APP的服务质量控制策略;根据所述APP的服务质量控制策略,控制所述用户标识所指示用户的服务质量。
  36. 一种应用程序编程接口API管理设备,其特征在于,包括:输入/输出设备、处理器和存储器,所述输入/输出设备、所述处理器和所述存储器通过总线通信连接;
    所述输入/输出设备用于接收用户在使用应用APP时触发用户终端发送的API调用请求,所述API调用请求中携带所述APP的标识和所述APP的用户等级的标识;
    所述处理器用于根据所述APP的标识和所述APP的用户等级的标识,获取所述APP的用户等级对应的所述APP的服务质量控制策略;根据所述APP的服务质量控制策略,控制所述用户标识所指示用户的服务质量。
  37. 一种服务质量控制的系统,其特征在于,包括:用户终端和应用程序编程接口API管理设备,所述API管理设备为上述权利要求19-31任一所述的API管理设备。
  38. 一种服务质量控制的系统,其特征在于,包括:用户终端和应用程序编程接口API管理设备,所述API管理设备为上述权利要求32-34任一所述的API管理设备。
PCT/CN2015/091976 2015-04-17 2015-10-15 一种服务质量控制的方法、设备及系统 WO2016165296A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP15888993.1A EP3142323B1 (en) 2015-04-17 2015-10-15 Service quality control method, device and system
US15/376,153 US10306014B2 (en) 2015-04-17 2016-12-12 Method, device, and system for controlling quality of service

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510185919.7A CN104836800B (zh) 2015-04-17 2015-04-17 一种服务质量控制的方法、设备及系统
CN201510185919.7 2015-04-17

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/376,153 Continuation US10306014B2 (en) 2015-04-17 2016-12-12 Method, device, and system for controlling quality of service

Publications (1)

Publication Number Publication Date
WO2016165296A1 true WO2016165296A1 (zh) 2016-10-20

Family

ID=53814436

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/091976 WO2016165296A1 (zh) 2015-04-17 2015-10-15 一种服务质量控制的方法、设备及系统

Country Status (4)

Country Link
US (1) US10306014B2 (zh)
EP (1) EP3142323B1 (zh)
CN (1) CN104836800B (zh)
WO (1) WO2016165296A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104836800B (zh) * 2015-04-17 2018-10-30 华为技术有限公司 一种服务质量控制的方法、设备及系统
CN107689969B (zh) * 2016-08-03 2020-01-17 华为技术有限公司 一种缓存策略的确定方法及装置
US10581825B2 (en) * 2017-01-27 2020-03-03 Equifax Inc. Integrating sensitive data from a data provider into instances of third-party applications executed on user devices
CN106792923B (zh) * 2017-02-09 2019-12-17 华为软件技术有限公司 一种配置QoS策略的方法及装置
EP3766277B1 (en) * 2018-03-12 2024-06-26 Privilege Wireless Llc Method of measuring the quality of service in a wireless communications network
CN111209060A (zh) * 2018-11-21 2020-05-29 中国移动通信集团广东有限公司 能力开发平台处理方法及装置
US11343285B2 (en) * 2020-01-31 2022-05-24 Palo Alto Networks, Inc. Multi-access edge computing services security in mobile networks by parsing application programming interfaces

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120215911A1 (en) * 2009-03-02 2012-08-23 Raleigh Gregory G Flow tagging for service policy implementation
CN104284324A (zh) * 2013-07-05 2015-01-14 思科技术公司 移动数据网络和企业网络之间的集成信令
CN104836800A (zh) * 2015-04-17 2015-08-12 华为技术有限公司 一种服务质量控制的方法、设备及系统

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060149845A1 (en) * 2004-12-30 2006-07-06 Xinnia Technology, Llc Managed quality of service for users and applications over shared networks
US9858559B2 (en) * 2009-01-28 2018-01-02 Headwater Research Llc Network service plan design
US9557889B2 (en) * 2009-01-28 2017-01-31 Headwater Partners I Llc Service plan design, user interfaces, application programming interfaces, and device management
US9392462B2 (en) * 2009-01-28 2016-07-12 Headwater Partners I Llc Mobile end-user device with agent limiting wireless data communication for specified background applications based on a stored policy
US8893009B2 (en) * 2009-01-28 2014-11-18 Headwater Partners I Llc End user device that secures an association of application to service policy with an application certificate check
US9270559B2 (en) * 2009-01-28 2016-02-23 Headwater Partners I Llc Service policy implementation for an end-user device having a control application or a proxy agent for routing an application traffic flow
US8982893B2 (en) * 2010-03-04 2015-03-17 Telefonaktiebolaget L M Ericsson (Publ) System and method of quality of service enablement for over the top applications in a telecommunications system
US9271188B2 (en) 2012-12-18 2016-02-23 At&T Intellectual Property I, L.P. Dynamic in-band service control mechanism in mobile network
WO2014169455A1 (zh) * 2013-04-18 2014-10-23 华为技术有限公司 一种控制服务质量的方法、应用服务器及终端

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120215911A1 (en) * 2009-03-02 2012-08-23 Raleigh Gregory G Flow tagging for service policy implementation
CN104284324A (zh) * 2013-07-05 2015-01-14 思科技术公司 移动数据网络和企业网络之间的集成信令
CN104836800A (zh) * 2015-04-17 2015-08-12 华为技术有限公司 一种服务质量控制的方法、设备及系统

Also Published As

Publication number Publication date
US10306014B2 (en) 2019-05-28
US20170094015A1 (en) 2017-03-30
EP3142323A4 (en) 2017-07-12
EP3142323A1 (en) 2017-03-15
CN104836800A (zh) 2015-08-12
EP3142323B1 (en) 2019-04-10
CN104836800B (zh) 2018-10-30

Similar Documents

Publication Publication Date Title
WO2016165296A1 (zh) 一种服务质量控制的方法、设备及系统
US9225840B2 (en) System and method for providing a communication endpoint information service
US9118718B2 (en) Techniques to monitor connection paths on networked devices
EP3198825A1 (en) Proxy servers within computer subnetworks
EP3531749B1 (en) Management method, management unit and system for network function
WO2019210675A1 (en) NF SERVICE CONSUMER RESTART DETECTION USING DIRECT SIGNALING BETWEEN NFs
WO2021057128A1 (zh) 一种基于nf的通信方法、设备及存储介质
WO2019214054A1 (zh) 域名获取方法、网站访问方法及服务器
WO2022171051A1 (zh) 一种通信方法和通信装置
CN113206753A (zh) 一种信息配置方法和管理单元
WO2017071087A1 (zh) 信息的传输方法、装置和设备
WO2020125074A1 (zh) 消息到达率确定方法、装置、数据统计服务器及存储介质
US20220103571A1 (en) Messaging source verification method, apparatus, and system
WO2021062793A1 (zh) 一种通信方法、设备、系统及存储介质
WO2021063051A1 (en) Terminal device, application server, network exposure function node and methods therein
US20170134177A1 (en) Charging method and device, access device, service quality control method and device
WO2010121645A1 (en) Priority service invocation and revocation
US10129320B2 (en) QoS improvement method, apparatus, and system
WO2019161600A1 (zh) 一种向社区添加成员的方法、装置、服务器及介质
JP2015528154A (ja) コンピュータ・ネットワークにおいてサーバからのコンテンツに対するアクセスのための要求を評価するための方法およびサーバ
US10574526B2 (en) Control method for application feature rules and application feature server
TW201608510A (zh) 網頁伺服器及其網路連線方法
KR20230175294A (ko) 활성화된 에지 애플리케이션 서버들 및 연관된 프로파일들의 에지 애플리케이션 서버 발견 및 식별
CN117792886A (zh) 转发规则配置方法、装置、终端及网络侧设备
US20160285947A1 (en) Sdk for providing content to users without charging for data transmission

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: 15888993

Country of ref document: EP

Kind code of ref document: A1

REEP Request for entry into the european phase

Ref document number: 2015888993

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2015888993

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE