CN112256452A - Service item determination method, device, equipment and storage medium of cloud service platform - Google Patents

Service item determination method, device, equipment and storage medium of cloud service platform Download PDF

Info

Publication number
CN112256452A
CN112256452A CN202011131863.4A CN202011131863A CN112256452A CN 112256452 A CN112256452 A CN 112256452A CN 202011131863 A CN202011131863 A CN 202011131863A CN 112256452 A CN112256452 A CN 112256452A
Authority
CN
China
Prior art keywords
service
api
information
request
service item
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202011131863.4A
Other languages
Chinese (zh)
Inventor
陈家园
曾钢辉
李东辰
张凯浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Sensetime Intelligent Technology Co Ltd
Original Assignee
Shanghai Sensetime Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Sensetime Intelligent Technology Co Ltd filed Critical Shanghai Sensetime Intelligent Technology Co Ltd
Priority to CN202011131863.4A priority Critical patent/CN112256452A/en
Publication of CN112256452A publication Critical patent/CN112256452A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Abstract

The disclosure provides a method, a device, equipment and a storage medium for determining service items of a cloud service platform, wherein the method comprises the following steps: receiving a service calling request sent by a user side, wherein the service calling request is used for calling service items on the cloud service platform through an API (application programming interface); the API is used for calling at least one service item on the cloud service platform; analyzing the service calling request to obtain API information carried in the service calling request; different service items on the cloud service platform correspond to different API information; and determining a service item corresponding to the service calling request according to a preset mapping relation between the API information and the service item based on the API information carried in the service calling request. To perform quality of service control and service charging for the service item.

Description

Service item determination method, device, equipment and storage medium of cloud service platform
Technical Field
The disclosure relates to the technical field of cloud services, and in particular to a method, an apparatus, a device and a storage medium for determining service items of a cloud service platform.
Background
On a cloud service platform, various service items are generally provided. The platform user may purchase different service items to obtain different services. In the process of calling the purchased Service item to provide the corresponding Service, the platform side needs to perform QOS (Quality of Service) control and Service charging on the Service item. When the platform side performs service quality control and service charging on the service items, it is first required to determine which service item in the corresponding platform is called by the current service of the user side.
Disclosure of Invention
The disclosure provides a method, a device, equipment and a storage medium for determining service items of a cloud service platform.
According to a first aspect of the embodiments of the present disclosure, a method for determining service items of a cloud service platform is provided, where the method includes: receiving a service calling request sent by a user side, wherein the service calling request is used for calling service items on the cloud service platform through an API (application programming interface); the API is used for calling at least one service item on the cloud service platform; analyzing the service calling request to obtain API information carried in the service calling request; different service items on the cloud service platform correspond to different API information; and determining a service item corresponding to the service calling request according to a preset mapping relation between the API information and the service item based on the API information carried in the service calling request.
In some optional embodiments, the API information in the mapping relationship includes at least one first sub-information; the analyzing the service call request to obtain the API information carried in the service call request includes: analyzing the service calling request to obtain at least one piece of second sub-information included in API information in the service calling request; determining a service item corresponding to the service call request according to a preset mapping relationship between the API information and the service item based on the API information carried in the service call request, including: under the condition that at least one piece of first sub information included by the API information in the mapping relation is matched and consistent with at least one piece of second sub information included by the API information in the service calling request, determining that the API information in the mapping relation is matched and consistent API information; and determining the service item corresponding to the API information which is matched with the API information in the mapping relation as the service item corresponding to the service calling request.
In some optional embodiments, the API information in the mapping relationship includes three first sub-information: first API method information, first API address information and first API content information; the analyzing the service call request to obtain the API information carried in the service call request includes: analyzing the service calling request to obtain three second sub-information included by API information in the service calling request: second API method information, second API address information, and second API content information; determining a service item corresponding to the service call request according to a preset mapping relationship between the API information and the service item based on the API information carried in the service call request, including: under the condition that three first sub-information included by the API information in the mapping relation are matched and consistent with three second sub-information included by the API information in the service calling request, determining that the API information in the mapping relation is matched and consistent API information; and determining the service item corresponding to the API information which is matched with the API information in the mapping relation as the service item corresponding to the service calling request.
In some optional embodiments, before determining, according to a preset mapping relationship between API information and service items, a service item corresponding to the service call request, the method further includes: receiving modification information of the mapping relation between the API information and the service items; and updating the corresponding relation between the API information and the service item in the mapping relation based on the modification information.
In some optional embodiments, after determining the service item corresponding to the service invocation request, the method further includes: acquiring a user identifier carried in the service calling request, and determining a target user for sending the service calling request based on the user identifier; determining the quality control condition of the service item corresponding to the service calling request corresponding to the target user according to the service item corresponding to the service calling request corresponding to the target user; and under the condition that the service calling request meets the quality control condition, sending the service calling request to a service item corresponding to the service calling request.
In some optional embodiments, the determining, according to the service item corresponding to the service invocation request by the target user, the quality control condition of the service item corresponding to the service invocation request by the target user includes: determining an initial quota and a used quota of a service item corresponding to the service calling request by the target user according to the service item corresponding to the service calling request by the target user; determining the remaining quota of the service item corresponding to the service calling request corresponding to the target user according to the initial quota and the used quota; determining whether the service invocation request satisfies the quality control condition based on the remaining quota.
In some optional embodiments, after sending the service invocation request to the service item corresponding to the service invocation request, the method further includes: and updating the used quota of the service item corresponding to the service calling request of the target user.
In some optional embodiments, the quality control condition comprises at least one of: a data volume condition or a rate condition.
In some optional embodiments, the sending the service invocation request to the service item corresponding to the service invocation request includes: and recording log information of a service item corresponding to the service calling request called by the target user, and sending the log information to a charging module of the cloud service platform so that the charging module can charge the service for the target user.
According to a second aspect of the embodiments of the present disclosure, there is provided a service item determination apparatus of a cloud service platform, the apparatus including: the request receiving module is used for receiving a service calling request sent by a user side, and the service calling request is used for calling service items on the cloud service platform through an API (application programming interface); the API is used for calling at least one service item on the cloud service platform; the request analysis module is used for analyzing the service calling request to obtain API information carried in the service calling request; different service items on the cloud service platform correspond to different API information; and the service item determining module is used for determining a service item corresponding to the service calling request according to a preset mapping relation between the API information and the service item based on the API information carried in the service calling request.
In some optional embodiments, the API information in the mapping relationship includes at least one first sub-information; the request analysis module is configured to analyze the service invocation request to obtain API information carried in the service invocation request, and includes: analyzing the service calling request to obtain at least one piece of second sub-information included in API information in the service calling request; the service item determining module, configured to determine, based on API information carried in the service invocation request and according to a preset mapping relationship between API information and a service item, a service item corresponding to the service invocation request, includes: under the condition that at least one piece of first sub information included by the API information in the mapping relation is matched and consistent with at least one piece of second sub information included by the API information in the service calling request, determining that the API information in the mapping relation is matched and consistent API information; and determining the service item corresponding to the API information which is matched with the API information in the mapping relation as the service item corresponding to the service calling request.
In some optional embodiments, the API information in the mapping relationship includes three first sub-information: first API method information, first API address information and first API content information; the request analysis module is configured to analyze the service invocation request to obtain API information carried in the service invocation request, and includes: analyzing the service calling request to obtain three second sub-information included by API information in the service calling request: second API method information, second API address information, and second API content information; the service item determining module, configured to determine, based on API information carried in the service invocation request and according to a preset mapping relationship between API information and a service item, a service item corresponding to the service invocation request, includes: under the condition that three first sub-information included by the API information in the mapping relation are matched and consistent with three second sub-information included by the API information in the service calling request, determining that the API information in the mapping relation is matched and consistent API information; and determining the service item corresponding to the API information which is matched with the API information in the mapping relation as the service item corresponding to the service calling request.
In some optional embodiments, the service item determining apparatus of the cloud service platform further includes: the updating module is used for receiving modification information of the mapping relation between the API information and the service items; and updating the corresponding relation between the API information and the service item in the mapping relation based on the modification information.
In some optional embodiments, the service item determining apparatus of the cloud service platform further includes: the target user determining module is used for acquiring the user identification carried in the service calling request and determining a target user for sending the service calling request based on the user identification; a quality control condition determining module, configured to determine, according to the service item corresponding to the service invocation request and the target user, a quality control condition of the service item corresponding to the service invocation request and corresponding to the target user; and the sending module is used for sending the service calling request to a service item corresponding to the service calling request under the condition that the service calling request meets the quality control condition.
In some optional embodiments, the quality control condition determining module, when determining, according to the service item corresponding to the service invocation request by the target user, the quality control condition of the service item corresponding to the service invocation request by the target user, includes: determining an initial quota and a used quota of a service item corresponding to the service calling request by the target user according to the service item corresponding to the service calling request by the target user; determining the remaining quota of the service item corresponding to the service calling request corresponding to the target user according to the initial quota and the used quota; determining whether the service invocation request satisfies the quality control condition based on the remaining quota.
In some optional embodiments, the sending module, configured to send the service invocation request to a service item corresponding to the service invocation request, further includes: and updating the used quota of the service item corresponding to the service calling request of the target user.
In some optional embodiments, the quality control condition comprises at least one of: a data volume condition or a rate condition.
In some optional embodiments, the sending module, when sending the service invocation request to the service item corresponding to the service invocation request, includes: and recording log information of a service item corresponding to the service calling request called by the target user, and sending the log information to a charging module of the cloud service platform so that the charging module can charge the service for the target user.
According to a third aspect of the embodiments of the present disclosure, there is provided a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the service item determination method of the cloud service platform according to any one of the first aspect when executing the program.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing the service item determination method of the cloud service platform according to any one of the first aspects.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product, including a computer program, which when executed by a processor, implements the service item determination method of the cloud service platform according to any one of the first aspects.
In the embodiment of the disclosure, a mapping relationship between the API information and the service item may be preset, after receiving a service call request sent by a user, the API information may be obtained by parsing the service call request, and the service item corresponding to the service call request may be determined according to the preset mapping relationship. Thus, reasonable service quality control or service charging can be performed for the service item. The service item and the API information are accurately mapped, and the service access gateway can more efficiently identify the service item corresponding to the current API call.
According to the method for determining the service items of the cloud service platform, the API design of the service items is not required to meet the API design requirement of the cloud service platform, and developers can dynamically adjust the mapping relation between the API information and the service items, so that the access cost of the service items from the cloud service platform is reduced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow diagram illustrating a method for determining service items for a cloud services platform in accordance with an exemplary embodiment;
FIG. 2 is a flow diagram illustrating a method for determining service items for yet another cloud service platform in accordance with an illustrative embodiment;
FIG. 3 is a flow diagram illustrating a method for determining service items for yet another cloud service platform in accordance with an illustrative embodiment;
FIG. 4 is a schematic diagram illustrating a service item determination apparatus of a cloud service platform in accordance with an illustrative embodiment;
FIG. 5 is a schematic diagram illustrating another cloud service platform service item determination device, according to an example embodiment;
FIG. 6 is a schematic diagram illustrating a service item determination apparatus of yet another cloud service platform in accordance with an illustrative embodiment;
FIG. 7 is a block diagram illustrating a computer device according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The specific manner described in the following exemplary embodiments does not represent all aspects consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
On a cloud service platform, various service items are generally provided. For example, a Platform-as-a-Service (PaaS)/Infrastructure as-a-Service (IaaS) Platform typically provides many different types of services/offerings.
The platform side may sell the respective service/sale items on the platform in the form of goods. The platform user can purchase each service item on the platform, so that each service item provides corresponding service for the platform user.
For example, service item a may be provided on a cloud service platform: identification card information identification service, service item B: and bank card information identification service. The platform user can obtain the 'identity card information identification service' provided by the service item A by purchasing the service item A; by purchasing the service item B, "bank card information identification service" provided by the service item B is obtained.
For example, after purchasing the service item a of the cloud service platform, the security company a may send acquired identity card data (for example, identity card photo data) to the service item a when identity card information identification is required, perform identity card information identification on the acquired identity card data by the service item a, and feed back the identity card information obtained by identification to the security company a. Therefore, the security company A can further perform security work according to the identity card information fed back by the service item A.
When a platform user purchases a service item on the cloud service platform, the quality control condition of the purchased service item can be determined at the same time. Wherein the quality control condition may control a quality of service when the purchased service item provides the service. For example, the rate at which the purchased service item provides a service, the size of the amount of data providing the service, and the like may be specified in the quality control condition.
In the process of calling the purchased service item to provide the corresponding service, the platform side needs to perform service quality control on each service call. For example, the platform side needs to check whether the size of the data volume of the service to be provided in the service call meets the data volume requirement in the quality control condition.
Take the service item a of the first purchase cloud service platform of the security company as an example. When the security company A calls the service item A to provide the identification information identification service, the platform side needs to verify whether the identification data provided by the security company A meets the data quantity requirement in the quality control condition in the calling process.
Illustratively, if the data volume of the identity card data provided by the security company A is larger than the upper limit of the data volume in the quality control condition, the call cannot be realized; if the data volume of the identity card data provided by the security company A is smaller than or equal to the data volume upper limit in the quality control condition, the corresponding identity card information identification service can be provided by the calling.
Therefore, if the platform side needs to perform quality of service control on the service item on the cloud service platform, it is necessary to determine the service item corresponding to the current service invocation of the user side, so as to determine the quality control condition corresponding to the service item of the user side.
In the process that the user side calls the purchased service item to provide the corresponding service, the platform side also needs to charge the service of the currently called service item. For example, the platform side may calculate the service fee that the user side needs to pay for the service item a by counting the number of times the user side calls the service item a and combining the single call unit price of the service item a.
Therefore, if the platform side needs to perform service charging on the service item on the cloud service platform, it is necessary to determine the service item corresponding to the current service invocation of the user side, so as to determine the price information corresponding to the service item.
Based on the above, if the platform needs to perform service quality control and service charging on the service item invoked by the user, it needs to be determined which service item in the cloud service platform the user invokes at present.
In the related art, API (Application Programming Interface) design of service items on a cloud service platform is designed according to different service items in the cloud service platform in a differentiated manner. For example, in the API design of the service items on the cloud service platform, the API address information and different service items on the cloud service platform may be designed in a corresponding manner.
An example of the OCR (Optical Character Recognition) service is described. Assume that two OCR service items are provided in the cloud service platform: service item A: identification card information identification service, service item B: and bank card information identification service.
Illustratively, taking Ruby language as an example, the API interface-API 1 of service item A can be designed as follows:
Figure BDA0002735428730000081
Figure BDA0002735428730000091
illustratively, taking Ruby language as an example, API interface-API 2 of service item B can be designed as follows:
Figure BDA0002735428730000092
the API address information in the API interface design of the service item A is '/ocr-service/templet/SFZ'; the API address information in the API interface design of the service item B is '/ocr-service/templet/YHK'. It can be seen that the API addresses in the API interfaces designed by the service item a and the service item B are designed differently.
Therefore, the platform side can identify different API address information through the service access gateway and determine the service item corresponding to the service call initiated by the user side.
However, before some service items are installed on the cloud service platform, the API interface is not designed differently according to different service items on the cloud service platform. For example, when the service item is designed for the API interface, the API address information is not correspondingly designed to be distinguished from different service items in the cloud service platform.
The above-mentioned OCR service is still used as an example for explanation. Wherein, two service items are still provided on the cloud service platform: service item a and service item B.
The API interface-API 3 for service item A or service item B can be designed as follows:
Figure BDA0002735428730000093
Figure BDA0002735428730000101
the service item A can provide identification card information identification service for the user party by using an identification card ocr template through the API 3; the service item B can provide the user with the bank card information identification service using the bank card ocr template through the API 3.
In this API design, API addresses are not designed to be distinguished in the API interface design of the service item a and the service item B. Therefore, the platform side cannot distinguish and determine the service item corresponding to the service call initiated by the user by identifying the API address information through the service access gateway.
For a service item which is not designed by distinguishing the API address information from different service items in the cloud service platform during API interface design, when a user calls the service item, how to determine the service item corresponding to the current service call becomes a problem to be solved.
In the embodiment of the disclosure, a method for determining a service item of a cloud service platform is provided, which may analyze API information carried in a service call request after receiving the service call request sent by a user, and determine a service item corresponding to the service call request according to a preset mapping relationship between the API information and the service item.
In order to make the service item determination method of the cloud service platform provided by the present disclosure clearer, the following describes in detail a scheme execution process provided by the present disclosure with reference to the accompanying drawings and specific embodiments.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for determining a service item of a cloud service platform according to an embodiment of the present disclosure. As shown in fig. 1, the process includes:
step 101, receiving a service calling request sent by a user, wherein the service calling request is used for calling a service item on the cloud service platform through an API (application programming interface); the API is used for calling at least one service item on the cloud service platform.
In the embodiment of the disclosure, the user side is a platform user which can use the service item on the cloud service platform.
For example, the security company a purchases the service item a on the cloud service platform, and may use the "identification card information identification service" provided by the service item a. The security company A can be called a user side.
After a user side purchases a service item on a cloud service platform, when the purchased service item is required to provide a corresponding service, a service call request needs to be initiated to the platform side so as to call the purchased service item through a corresponding API interface to provide the corresponding cloud service. Wherein, the corresponding API interface can be used for calling one or more service items on the cloud service platform. For example, service a or service B on the cloud service platform may be invoked through API interface-API 3. The user side can send a service call request to the platform side by means of a conventional user terminal, network equipment and the like.
Taking security company A as the user side as an example. Suppose that the security company A purchases a service item A of the cloud service platform. When the identity card information identification is needed, the security company A can send a service calling request for calling the service item A to the platform side by means of security equipment (such as an intelligent camera).
In this step, a service invocation request sent by a user side may be received. For example, the platform side may intercept or receive a service invocation request sent by the user side via the network device. For example, the platform side may receive a service invocation request sent by the user side by using the service access gateway.
102, analyzing the service calling request to obtain API information carried in the service calling request; and different service items on the cloud service platform correspond to different API information.
In the embodiment of the present disclosure, the API information carried in the service invocation request is related information of an API interface corresponding to the service item requested by the service invocation request.
For example, the user sends a service invocation request to the platform side to request that the identity card information identification service is provided by using the purchased service item a on the cloud service platform. Take the example where the API interface of service item A is designed as API 3. The service call request sent by the user side may include complete information of the API3, or may include partial information of the API 3.
Illustratively, the API information carried in the service invocation request may include information in the API 3:
"POST", "/ocr-service/templet" and "ocr _ templet: string// ID ocr template".
The API information carried in the corresponding service calling request is different for different service items on the cloud service platform.
For example, the user sends a service invocation request to the platform side to request that the bank card information identification service is provided by using the purchased service item B on the cloud service platform. Take the example where the API interface of service item B is designed as API 3. The service call request sent by the user side may carry the relevant information of the API 3.
Since the service item B is another service item different from the service item a, the API information carried in the service invocation request is different from the API information carried in the service invocation request when the service item a is requested.
For example, the API information carried in the service call request requesting the service item a may be:
"POST", "/ocr-service/templet" and "ocr _ templet: string// ID ocr template".
For example, the API information carried in the service call request requesting the service item B may be:
"POST", "/ocr-service/templet" and "ocr _ templet: string// bank card ocr template".
Therefore, when two different service items are called, the API information carried in the service calling request is different between the service item a and the service item B on the cloud service platform.
In this step, the received service call request can be analyzed to obtain the API information carried therein. For example, a plug-in may be set in the service access gateway, and the service call request received by the service access gateway is parsed to obtain the API information carried therein.
And 103, determining a service item corresponding to the service calling request according to a preset mapping relation between the API information and the service item based on the API information carried in the service calling request.
In the embodiment of the present disclosure, a mapping relationship between API information and service items needs to be set in advance.
For example, a developer may set a mapping relationship between each service item and the API according to different service items on the cloud service platform. Since the API information corresponding to different service items is different, the service items on the corresponding cloud service platform may be determined by using different API information based on the preset mapping relationship.
The explanation will be given taking API3 as an API interface of service item a and service item B as an example. The mapping relationship between the API information and the service items may be preset as follows:
service item a, Method ═ post & & URL &/ocr-service/templet & (http.request.body) · ocr _ templet ═ identity card
Service item B, Method ═ post & & URL &/ocr-service/templet & (http.request.body) · ocr _ templet ═ bank card
In this step, based on the API information carried in the service invocation request, the service item corresponding to the carried API information is determined according to the preset mapping relationship.
For example, the API information carried in the service invocation request is: and the service item corresponding to the service call request can be determined to be the service item A according to a preset mapping relation, wherein the "POST", "/ocr-service/templet" and "ocr _ templet: string// ID card ocr template".
For example, the API information carried in the service invocation request is: and the service item corresponding to the service call request can be determined to be the service item B according to a preset mapping relation, wherein the service item comprises POST, a/ocr-service/templet and a ocr _ templet, namely string/bank card ocr template.
In the embodiment of the present disclosure, a mapping relationship between the API information and the service item may be preset, after receiving a service invocation request sent by a user, the API information may be obtained by parsing the service invocation request, and the service item corresponding to the service invocation request may be determined according to the preset mapping relationship. Thus, reasonable service quality control or service charging can be performed for the service item. The service item and the API information are accurately mapped, and the service access gateway can more efficiently identify the service item corresponding to the current API call.
The service item determining method of the cloud service platform can be executed by a plug-in arranged in a service access gateway, and developers can dynamically set the mapping relation between the API information and the service items in the plug-in, so that the preset mapping relation can be updated more conveniently, and the service items corresponding to the current service calling request can be determined more accurately. For the service items with the API design not meeting the API design requirement of the cloud service platform, the service items can be put on the cloud service platform without redesigning or modifying the API of the service items, and the access cost of putting the service items on the cloud service platform is reduced.
In some optional embodiments, before determining, according to a preset mapping relationship between API information and service items, a service item corresponding to the service call request, the method further includes: receiving modification information of the mapping relation between the API information and the service items; and updating the corresponding relation between the API information and the service item in the mapping relation based on the modification information.
In the above embodiment, before determining the service item of the current service invocation request according to the preset mapping relationship, the plug-in the service access gateway may receive modification information of the mapping relationship between the API information and the service item, and update the mapping relationship based on the received modification information.
The modification information is received, and the time for updating the mapping relationship by using the modification information can be flexibly selected or set according to a specific application condition, which is not limited in the present disclosure.
For example, after the developer modifies the mapping relationship, the developer may actively trigger the update of the mapping relationship, so that the service access gateway receives the corresponding modification information and updates the newly set mapping relationship in time. Or, a plug-in set in the service access gateway may receive the modification information according to a preset rule, and update the mapping relationship according to the preset rule. For example, the modification information for the mapping relationship may be received once every 2 seconds. Or, before using the preset mapping relationship each time, receiving modification information of the mapping relationship and updating the modification information, so as to ensure that the mapping relationship used each time is the latest mapping relationship.
In the above embodiment, it can be ensured that the preset mapping relationship is updated in time. The developer can dynamically set the mapping relation between the API information and the service items, is flexible and convenient, and is beneficial to timely and efficiently determining the service items corresponding to the current service calling request.
In some optional embodiments, as shown in fig. 2, after determining the service item corresponding to the service invocation request in step 103, the method further includes the following steps:
step 201, obtaining a user identifier carried in the service invocation request, and determining a target user sending the service invocation request based on the user identifier.
The user identification may uniquely identify the user who may invoke the service item. For example, in the case that the user has the right to invoke the service item, the platform may assign different user identifiers to different users, so as to distinguish or mark different users with different user identifiers.
In the embodiment of the present disclosure, the service invocation request may carry the user identifier. For example, "app-id" may be carried in the sent service invocation request, and different users may be distinguished by using different "app-id" as the user identifier. Illustratively, the app-id may be carried in API information, such as "POST/{ app _ id }/ocr-service/templet".
In this step, the user identifier carried in the service invocation request can be obtained, and the user corresponding to the user identifier carried in the service invocation request is determined according to the pre-stored corresponding relationship between the user identifier and the user, and is used as the target user for sending the service invocation request.
Step 202, determining the quality control condition of the service item corresponding to the service call request corresponding to the target user according to the service item corresponding to the service call request corresponding to the target user.
After determining the target user sending the service invocation request and determining the service item that the target user needs to invoke, the quality control condition of the service item corresponding to the target user can be determined according to the "target user" and the "service item" so as to utilize the quality control condition to perform service quality control on the service item invoked by the target user.
For example, if the service item corresponding to the current service invocation request is a service item a on the cloud service platform, the corresponding quality control condition may be determined according to the service item a and the target user. For example, the quality control conditions may include: the data amount is 1Mb or less. The platform side can control the service quality of the calling service item A according to the quality control condition.
Taking the service item a of the security company a calling the cloud service platform as an example. When the security company A calls the service item A to provide the identification information identification service, the platform side needs to verify whether the identification data provided by the security company A meets the data quantity requirement in the quality control condition in the calling process. If the data volume of the identity card data provided by the security company A is more than 1Mb, the calling cannot be realized; if the data volume of the identity card data provided by the security company A is less than or equal to 1Mb, the corresponding identity card information identification service can be provided by the call.
The quality control condition is condition information for performing quality of service control. Illustratively, the quality control conditions may include, but are not limited to, at least one of: data volume condition, rate condition.
The data volume condition is used for controlling the size of data volume sent when the target user calls the service item. For example, when the target user purchases the corresponding service item, the upper limit of the size of the data amount corresponding to the purchased single-call service item is 5Mb, and the 5Mb may be used as the data amount condition. In this step, the upper limit of the data volume of the service item called by the target user can be determined according to the target user and the service item corresponding to the service calling request. Thus, the service calling can be subjected to service quality control on the data volume level.
And the rate condition is used for controlling the calling rate when the target user calls the service item. For example, when the target user purchases a service item, it may be determined that the upper limit of the rate of providing the service by the purchased service item is 5 times/second, and the 5 times/second may be used as the rate condition. In this step, the rate of the target user calling the service item can be determined according to the target user and the service item corresponding to the service calling request. Providing the service under the condition that the service call conforms to the upper limit of the rate; and refusing to provide the service under the condition that the service call does not exceed the upper limit of the rate. Thus, the service invocation can be subjected to service quality control at the rate layer.
Step 203, sending the service calling request to a service item corresponding to the service calling request under the condition that the service calling request meets the quality control condition.
This step can determine whether the service invocation request satisfies the corresponding quality control condition. For example, it is determined whether the size of the data volume requested to provide the service by the service invocation request meets the requirement of the data volume condition in the quality control condition. Or, judging whether the service calling request is corresponding to the speed for calling the service item, and whether the speed meets the requirement of the speed condition in the quality control condition.
In the case where the service invocation request satisfies all of the quality control conditions, it may be determined that the service invocation request satisfies the quality control conditions. At this time, the service invocation request may be sent to the service item corresponding to the service invocation request, so that the service item provides the corresponding cloud service for the target user.
In the above embodiment, the user identifier carried in the service invocation request may be obtained, the target user is determined according to the user identifier, and the quality control condition for the target user to invoke the service item is determined based on the determined service item, so that the service invocation may be performed with the service quality control according to the quality control condition. And only when the quality control condition is met, the service calling request is sent to the corresponding service item, and the corresponding cloud service is provided.
In some optional embodiments, after sending the service invocation request to the service item corresponding to the service invocation request, the method further includes: and updating the used quota of the service item corresponding to the service calling request of the target user.
When a target user purchases a service item, an initial quota for the service item by the target user may be determined at the same time. Wherein the initial quota is the maximum quota for which the target user can invoke the service item. For example, the initial quota that the target user determines when purchasing the service item may be: 500 times, the target user may invoke the service item 500 times at most. After more than 500 times, when the target user invokes the service item, the service item will no longer provide the corresponding cloud service.
In the above embodiment, after the service invocation request is sent to the service item corresponding to the service invocation request, the corresponding service item may provide the corresponding cloud service for the target user. By this point, the target user has completed a complete call for the service item. At this time, the amount of the service used by the target user may be updated statistically, that is: and updating the used quota of the service item corresponding to the service call request by the target user. For example, after sending the service invocation request to the service item corresponding to the service invocation request, 1 may be added to the corresponding used quota. When the used quota is less than the initial quota, the target user may call the corresponding service item to provide the corresponding cloud service; and under the condition that the used quota is greater than or equal to the initial quota, the target user cannot call the corresponding service item to provide the corresponding cloud service.
In some optional embodiments, as shown in fig. 3, the determining, in step 202, a quality control condition of a service item corresponding to the service invocation request by the target user according to the service item corresponding to the service invocation request by the target user may include the following steps:
step 301, determining an initial quota and a used quota of a service item corresponding to the service invocation request by the target user according to the service item corresponding to the service invocation request by the target user.
In this embodiment of the present disclosure, the determination manner of the initial quota corresponding to the target user may include multiple manners. For example, the target user may be an independent user of the cloud service platform, and when purchasing a service item on the cloud service platform, the initial quota of the purchased service item is determined at the same time. When both the target user and the service item are determined, an initial quota of the service item corresponding to the target user can be determined.
Illustratively, the target user may be a child user of the tenant. Wherein a tenant may comprise a plurality of different sub-users. When a tenant purchases a service item, initial quotas corresponding to different sub-users can be determined at the same time. The target user is used as a sub-user of the tenant, and the initial quota of the service item corresponding to the target user can be obtained by inquiring predetermined initial quota information of different sub-users.
It is to be understood that the above-described manner of determining the initial quota based on the target user and the service item is merely exemplary. For a description of the used quota, see the above embodiment. In this step, the corresponding used quota may be determined according to the service item corresponding to the service invocation request and the target user.
Step 302, determining a remaining quota of the service item corresponding to the service invocation request by the target user according to the initial quota and the used quota.
In this step, a corresponding remaining quota may be calculated according to the determined initial quota and the used quota. Wherein, the remaining quota can reflect the remaining available quota of the calling service item of the target user. For example, the remaining quota may be obtained by subtracting the used quota from the initial quota.
Step 303, determining whether the service invocation request meets the quality control condition based on the remaining quota.
After the remaining quota of the target user calling service item is obtained through calculation, the service quality control can be performed on the current service calling request according to the remaining quota. For example, in a case that the remaining quota is greater than zero, it may be determined that the service invocation request satisfies the quality control condition, and the service invocation request may be sent to a service item corresponding to the service invocation request, so that the service item provides a corresponding cloud service. For example, in a case that the remaining quota is equal to zero, it may be determined that the service invocation request does not satisfy the quality control condition, and the service item cannot provide the corresponding cloud service.
In the above embodiment, the initial quota and the used quota of the corresponding service item may be determined according to the target user and the service item, and the corresponding remaining quota is obtained through calculation, so that whether the service invocation request meets the quality control condition may be determined according to the remaining quota, and the service quality control on the service item is realized.
In some optional embodiments, the sending the service invocation request to the service item corresponding to the service invocation request includes:
and recording log information of a service item corresponding to the service calling request called by the target user, and sending the log information to a charging module of the cloud service platform so that the charging module can charge the service for the target user.
In the above embodiment, the log information is history information in the process of providing the corresponding service by the service item. Illustratively, the usage log information may include: the service item provides user information of the service and information of times of using the service item by different users.
For example, the usage log information corresponding to service item a may include: the number of times security company a calls service item a. In the embodiment of the present disclosure, the usage log information corresponding to the service item a may be recorded, and the usage log information is sent to the charging module, so as to perform service charging on the service item a.
In some optional embodiments, the service item determination method of the cloud service platform may be performed by a service access gateway on the platform side. For example, a plug-in may be provided in the service access gateway, and the service item determination method of the cloud service platform may be performed.
In some optional embodiments, the API information in the preset mapping relationship includes at least one first sub-information. The first sub-information is information related to the API interface of the service item corresponding to the API information in the mapping relation.
The API interface designed for the service item a is exemplified by the API 3. Among them, API3 may include various information: "POST", "/ocr-service/templet" and "ocr _ templet: string// ID ocr template". In the embodiment of the present disclosure, these pieces of information may be referred to as first sub information in the API information corresponding to the service item a.
One API message may include one first sub message, or may include a plurality of first sub messages. For example, the API information corresponding to the service item a in the mapping relationship may include only one piece of first sub information: "ocr _ templet" string// ID ocr template ". Or, the API information corresponding to the service item a in the mapping relationship may include a plurality of first sub information: "POST", "/ocr-service/templet" and "ocr _ templet: string// ID ocr template".
In step 102, analyzing the service invocation request to obtain API information carried in the service invocation request, including: and analyzing the service calling request to obtain at least one piece of second sub-information included in the API information in the service calling request.
In the embodiment of the present disclosure, the API information carried in the service invocation request includes one or more second sub information. And the second sub-information is information related to the API of the service item corresponding to the service call request.
The API designed for the service item a is also exemplified as API 3. In the embodiment of the present disclosure, the service call request may carry the relevant information of the API3 as corresponding API information. For example, various information in the API3 may be carried: "POST", "/ocr-service/templet" and "ocr _ templet: string// ID ocr template". In the embodiment of the present disclosure, the API information carried in the service invocation request may be referred to as second sub information.
The API information carried in the service invocation request may include one second sub-information, or may include a plurality of second sub-information. For example, the API information corresponding to the service item a corresponding to the service call request may include only one piece of second sub information: "ocr _ templet" string// ID ocr template ". Or, the API information corresponding to the service item a corresponding to the service call request may include a plurality of second sub information: "POST", "/ocr-service/templet" and "ocr _ templet: string// ID ocr template".
In step 103, determining a service item corresponding to the service invocation request according to a preset mapping relationship between API information and the service item based on API information carried in the service invocation request, including:
under the condition that at least one piece of first sub information included by the API information in the mapping relation is matched and consistent with at least one piece of second sub information included by the API information in the service calling request, determining that the API information in the mapping relation is matched and consistent API information; and determining the service item corresponding to the API information which is matched with the API information in the mapping relation as the service item corresponding to the service calling request.
For example, the API information in the mapping relationship includes three first sub-information: "POST", "/ocr-service/templet" and "ocr _ templet: string// ID ocr template". The API information carried in the service invocation request includes three second pieces of sub-information: "POST", "/ocr-service/templet" and "ocr _ templet: string// ID ocr template". And, if the three pieces of first sub information and the three pieces of second sub information are matched and consistent respectively, it may be determined that the two pieces of API information are matched and consistent. The service item corresponding to the API information that is matched and consistent in the mapping relationship may be determined as the service item corresponding to the current service invocation request.
In some optional embodiments, the API information in the mapping relationship includes three first sub-information: first API method information, first API address information, and first API content information.
In the above embodiment, the first API method information is information related to an API function of a service item corresponding to the API information in the mapping relationship. For example, if the API information in the mapping relationship corresponds to the service item a and the API of the service item a is designed as the API3, "POST" in the API3 may be referred to as first API method information.
The first API address information is information related to the address of the API of the service item corresponding to the API information in the mapping relationship. For example, if the API information in the mapping relationship corresponds to the service item a, and the API of the service item a is designed as the API3, the "/ocr-service/templet" in the API3 may be referred to as first API address information.
The first API content information is information related to the service content of the API of the service item corresponding to the API information in the mapping relationship. For example, if the API information in the mapping relationship corresponds to the service item a, and the API of the service item a is designed as the API3, the ocr _ templet string// id card ocr template in the API3 may be referred to as the first API content information.
For example, the mapping relationships between the service item a and the API information and the service item B may be set in the mapping relationships:
a service item a, namely, a Method ═ post & & URL ═ ocr-service/templet & (http.request.body) · ocr _ templet ═ identity card;
service item B, Method ═ post & & URL &/ocr-service/templet & (http.request.body) · ocr _ templet ═ bank card
In step 102, analyzing the service invocation request to obtain API information carried in the service invocation request, including: analyzing the service calling request to obtain three second sub-information included by API information in the service calling request: second API method information, second API address information, and second API content information.
And the second API method information is the relevant information of the API function of the service item corresponding to the API information carried in the service calling request. For example, if the API information carried in the service call request corresponds to the service item a and the API of the service item a is designed as the API3, "POST" in the API3 may be referred to as second API method information.
The second API address information is information related to an address of an API of the service item corresponding to the API information carried in the service call request. For example, the API information carried in the service call request corresponds to the service item a, and the API of the service item a is designed as the API3, so the "/ocr-service/templet" in the API3 may be referred to as second API address information.
The second API content information is information related to the service content of the API of the service item corresponding to the API information carried in the service call request. For example, the API information carried in the service call request corresponds to the service item a, and the API of the service item a is designed as the API3, so that the ocr _ templet: string// id card ocr template "in the API3 may be referred to as second API content information.
For example, three pieces of second sub-information may be obtained by parsing API information carried in the service call request: second API method information: "POST", second API address information: "/ocr-service/templet" and second API content information: "ocr _ templet" string// ID ocr template ". For example, the three second sub-information may be assembled into { second API method information, second API address information, and second API content information } triple information to match with the API information in the mapping management relationship using the triple information.
In step 103, determining a service item corresponding to the service invocation request according to a preset mapping relationship between API information and the service item based on API information carried in the service invocation request, including:
under the condition that three first sub-information included by the API information in the mapping relation are matched and consistent with three second sub-information included by the API information in the service calling request, determining that the API information in the mapping relation is matched and consistent API information; and determining the service item corresponding to the API information which is matched with the API information in the mapping relation as the service item corresponding to the service calling request.
Illustratively, the mapping relationship is set as follows:
a service item a, namely, a Method ═ post & & URL ═ ocr-service/templet & (http.request.body) · ocr _ templet ═ identity card;
service item B, Method ═ post & & URL &/ocr-service/templet & (http.request.body) · ocr _ templet ═ bank card
If the API information carried in the service invocation request includes three second sub-information: the "POST", "/ocr-service/temp" and "ocr _ temp: string// id card ocr template", it can be determined that the service item corresponding to the current service invocation request is the service item a.
If the API information carried in the service invocation request includes three second sub-information: "POST", "/ocr-service/temp" and "ocr _ temp: string// bank card ocr template", it can be determined that the service item corresponding to the current service invocation request is service item B.
As shown in fig. 4, the present disclosure provides a service item determination apparatus of a cloud service platform, which may execute a service item determination method of a cloud service platform according to any embodiment of the present disclosure. The apparatus may include a request receiving module 401, a request parsing module 402, and a service item determination module 403. Wherein:
a request receiving module 401, configured to receive a service invocation request sent by a user, where the service invocation request is used to invoke a service item on the cloud service platform through an API interface; the API is used for calling at least one service item on the cloud service platform;
a request analysis module 402, configured to analyze the service invocation request to obtain API information carried in the service invocation request; different service items on the cloud service platform correspond to different API information;
a service item determining module 403, configured to determine, based on the API information carried in the service invocation request, a service item corresponding to the service invocation request according to a preset mapping relationship between the API information and the service item.
Optionally, the API information in the mapping relationship includes at least one first sub-information;
the request analysis module 402 is configured to analyze the service invocation request to obtain API information carried in the service invocation request, and includes: analyzing the service calling request to obtain at least one piece of second sub-information included in API information in the service calling request;
the service item determining module 403, configured to determine, based on API information carried in the service invocation request and according to a preset mapping relationship between API information and a service item, a service item corresponding to the service invocation request, where the service item determining module includes: under the condition that at least one piece of first sub information included by the API information in the mapping relation is matched and consistent with at least one piece of second sub information included by the API information in the service calling request, determining that the API information in the mapping relation is matched and consistent API information; and determining the service item corresponding to the API information which is matched with the API information in the mapping relation as the service item corresponding to the service calling request.
Optionally, the API information in the mapping relationship includes three pieces of first sub information: first API method information, first API address information and first API content information;
the request analysis module 402 is configured to analyze the service invocation request to obtain API information carried in the service invocation request, and includes: analyzing the service calling request to obtain three second sub-information included by API information in the service calling request: second API method information, second API address information, and second API content information;
the service item determining module 403, configured to determine, based on API information carried in the service invocation request and according to a preset mapping relationship between API information and a service item, a service item corresponding to the service invocation request, where the service item determining module includes: under the condition that three first sub-information included by the API information in the mapping relation are matched and consistent with three second sub-information included by the API information in the service calling request, determining that the API information in the mapping relation is matched and consistent API information; and determining the service item corresponding to the API information which is matched with the API information in the mapping relation as the service item corresponding to the service calling request.
Optionally, as shown in fig. 5, the service item determining apparatus of the cloud service platform further includes: an update module 501, configured to receive modification information of a mapping relationship between the API information and a service item; and updating the corresponding relation between the API information and the service item in the mapping relation based on the modification information.
Optionally, as shown in fig. 6, the service item determining apparatus of the cloud service platform further includes:
a target user determining module 601, configured to obtain a user identifier carried in the service invocation request, and determine, based on the user identifier, a target user that sends the service invocation request;
a quality control condition determining module 602, configured to determine, according to the service item corresponding to the service invocation request and the target user, a quality control condition of the service item corresponding to the service invocation request and corresponding to the target user;
a sending module 603, configured to send the service invocation request to a service item corresponding to the service invocation request when the service invocation request meets the quality control condition.
Optionally, the quality control condition determining module 602, configured to determine, according to the service item corresponding to the service invocation request and the target user, a quality control condition of the service item corresponding to the service invocation request and corresponding to the target user, includes: determining an initial quota and a used quota of a service item corresponding to the service calling request by the target user according to the service item corresponding to the service calling request by the target user; determining the remaining quota of the service item corresponding to the service calling request corresponding to the target user according to the initial quota and the used quota; determining whether the service invocation request satisfies the quality control condition based on the remaining quota.
Optionally, the sending module 603 is configured to, after sending the service invocation request to the service item corresponding to the service invocation request, further include: and updating the used quota of the service item corresponding to the service calling request of the target user.
Optionally, the quality control conditions comprise at least one of: a data volume condition or a rate condition.
Optionally, the sending module 603 is configured to, when sending the service invocation request to the service item corresponding to the service invocation request, include: and recording log information of a service item corresponding to the service calling request called by the target user, and sending the log information to a charging module of the cloud service platform so that the charging module can charge the service for the target user.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of at least one embodiment of the present disclosure. One of ordinary skill in the art can understand and implement it without inventive effort.
The present disclosure also provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the program, the method for determining the service item of the cloud service platform according to any embodiment of the present disclosure can be implemented.
Fig. 7 is a schematic diagram illustrating a more specific hardware structure of a computer device according to an embodiment of the present disclosure, where the computer device may include: a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050. Wherein the processor 1010, memory 1020, input/output interface 1030, and communication interface 1040 are communicatively coupled to each other within the device via bus 1050.
The processor 1010 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 1020 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 1020 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 1020 and called to be executed by the processor 1010.
The input/output interface 1030 is used for connecting an input/output module to input and output information. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface 1040 is used for connecting a communication module (not shown in the drawings) to implement communication interaction between the present apparatus and other apparatuses. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).
Bus 1050 includes a path that transfers information between various components of the device, such as processor 1010, memory 1020, input/output interface 1030, and communication interface 1040.
It should be noted that although the above-mentioned device only shows the processor 1010, the memory 1020, the input/output interface 1030, the communication interface 1040 and the bus 1050, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
The present disclosure also provides a computer-readable storage medium on which a computer program is stored, which, when executed by a processor, is capable of implementing the service item determination method of the cloud service platform of any embodiment of the present disclosure.
The non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc., which is not limited in this application.
In some optional embodiments, the present disclosure provides a computer program product, including computer readable code, when the computer readable code is run on a device, a processor in the device executes a service item determination method for implementing a cloud service platform as provided in any one of the above embodiments. The computer program product may be embodied in hardware, software or a combination thereof.
Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
The above description is only exemplary of the present disclosure and is not intended to limit the present disclosure, so that any modification, equivalent replacement, or improvement made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (12)

1. A method for determining service items of a cloud service platform is characterized by comprising the following steps:
receiving a service calling request sent by a user side, wherein the service calling request is used for calling service items on the cloud service platform through an API (application programming interface); the API is used for calling at least one service item on the cloud service platform;
analyzing the service calling request to obtain API information carried in the service calling request; different service items on the cloud service platform correspond to different API information;
and determining a service item corresponding to the service calling request according to a preset mapping relation between the API information and the service item based on the API information carried in the service calling request.
2. The method according to claim 1, wherein the API information in the mapping relationship comprises at least one first sub-information;
the analyzing the service call request to obtain the API information carried in the service call request includes:
analyzing the service calling request to obtain at least one piece of second sub-information included in API information in the service calling request;
determining a service item corresponding to the service call request according to a preset mapping relationship between the API information and the service item based on the API information carried in the service call request, including:
under the condition that at least one piece of first sub information included by the API information in the mapping relation is matched and consistent with at least one piece of second sub information included by the API information in the service calling request, determining that the API information in the mapping relation is matched and consistent API information;
and determining the service item corresponding to the API information which is matched with the API information in the mapping relation as the service item corresponding to the service calling request.
3. The method according to claim 1 or 2, wherein the API information in the mapping relationship comprises three first sub-information: first API method information, first API address information and first API content information;
the analyzing the service call request to obtain the API information carried in the service call request includes:
analyzing the service calling request to obtain three second sub-information included by API information in the service calling request: second API method information, second API address information, and second API content information;
determining a service item corresponding to the service call request according to a preset mapping relationship between the API information and the service item based on the API information carried in the service call request, including:
under the condition that three first sub-information included by the API information in the mapping relation are matched and consistent with three second sub-information included by the API information in the service calling request, determining that the API information in the mapping relation is matched and consistent API information;
and determining the service item corresponding to the API information which is matched with the API information in the mapping relation as the service item corresponding to the service calling request.
4. The method according to any one of claims 1 to 3, wherein before determining the service item corresponding to the service call request according to the preset mapping relationship between the API information and the service item, the method further comprises:
receiving modification information of the mapping relation between the API information and the service items;
and updating the corresponding relation between the API information and the service item in the mapping relation based on the modification information.
5. The method according to any one of claims 1 to 4, wherein after determining the service item corresponding to the service invocation request, further comprising:
acquiring a user identifier carried in the service calling request, and determining a target user for sending the service calling request based on the user identifier;
determining the quality control condition of the service item corresponding to the service calling request corresponding to the target user according to the service item corresponding to the service calling request corresponding to the target user;
and under the condition that the service calling request meets the quality control condition, sending the service calling request to a service item corresponding to the service calling request.
6. The method according to claim 5, wherein the determining, according to the service item corresponding to the service invocation request by the target user, the quality control condition of the service item corresponding to the service invocation request by the target user comprises:
determining an initial quota and a used quota of a service item corresponding to the service calling request by the target user according to the service item corresponding to the service calling request by the target user;
determining the remaining quota of the service item corresponding to the service calling request corresponding to the target user according to the initial quota and the used quota;
determining whether the service invocation request satisfies the quality control condition based on the remaining quota.
7. The method according to claim 5 or 6, wherein after sending the service invocation request to the service item corresponding to the service invocation request, further comprising: and updating the used quota of the service item corresponding to the service calling request of the target user.
8. The method according to any of claims 5 to 7, wherein the quality control conditions comprise at least one of: a data volume condition or a rate condition.
9. The method according to any one of claims 5 to 8, wherein the sending the service invocation request to the service item corresponding to the service invocation request includes: and recording log information of a service item corresponding to the service calling request called by the target user, and sending the log information to a charging module of the cloud service platform so that the charging module can charge the service for the target user.
10. A service item determination apparatus of a cloud service platform, the apparatus comprising:
the request receiving module is used for receiving a service calling request sent by a user side, and the service calling request is used for calling service items on the cloud service platform through an API (application programming interface); the API is used for calling at least one service item on the cloud service platform;
the request analysis module is used for analyzing the service calling request to obtain API information carried in the service calling request; different service items on the cloud service platform correspond to different API information;
and the service item determining module is used for determining a service item corresponding to the service calling request according to a preset mapping relation between the API information and the service item based on the API information carried in the service calling request.
11. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1-9 when executing the program.
12. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1-9.
CN202011131863.4A 2020-10-21 2020-10-21 Service item determination method, device, equipment and storage medium of cloud service platform Withdrawn CN112256452A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011131863.4A CN112256452A (en) 2020-10-21 2020-10-21 Service item determination method, device, equipment and storage medium of cloud service platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011131863.4A CN112256452A (en) 2020-10-21 2020-10-21 Service item determination method, device, equipment and storage medium of cloud service platform

Publications (1)

Publication Number Publication Date
CN112256452A true CN112256452A (en) 2021-01-22

Family

ID=74264491

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011131863.4A Withdrawn CN112256452A (en) 2020-10-21 2020-10-21 Service item determination method, device, equipment and storage medium of cloud service platform

Country Status (1)

Country Link
CN (1) CN112256452A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103095479A (en) * 2011-11-04 2013-05-08 华为技术有限公司 Method and device of business configuration
CN105872051A (en) * 2016-03-31 2016-08-17 浪潮通信信息系统有限公司 Capacity open control service platform in government-enterprise cloud platform
CN107423085A (en) * 2017-04-24 2017-12-01 北京百度网讯科技有限公司 Method and apparatus for application deployment
CN107464107A (en) * 2016-06-06 2017-12-12 阿尔卡特朗讯 Method, system and equipment for the online charging of cloud system
WO2019052526A1 (en) * 2017-09-14 2019-03-21 北京金山云网络技术有限公司 Api invoking system, method and apparatus, electronic device and storage medium
CN109597854A (en) * 2018-10-31 2019-04-09 深圳壹账通智能科技有限公司 A kind of method for routing of service request, device, computer equipment and computer storage medium
CN109818836A (en) * 2018-11-08 2019-05-28 平安科技(深圳)有限公司 Service cut-in method, device, computer equipment and computer storage medium
CN110392068A (en) * 2018-04-17 2019-10-29 阿里巴巴集团控股有限公司 A kind of data transmission method, device and its equipment
CN111427613A (en) * 2020-03-12 2020-07-17 北京明略软件系统有限公司 Application program interface API management method and device
US20200236187A1 (en) * 2019-01-17 2020-07-23 Servicenow, Inc. Discovery and service mapping of application programming interface proxies
CN111722947A (en) * 2020-06-28 2020-09-29 深圳壹账通智能科技有限公司 Service calling method and system

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103095479A (en) * 2011-11-04 2013-05-08 华为技术有限公司 Method and device of business configuration
CN105872051A (en) * 2016-03-31 2016-08-17 浪潮通信信息系统有限公司 Capacity open control service platform in government-enterprise cloud platform
CN107464107A (en) * 2016-06-06 2017-12-12 阿尔卡特朗讯 Method, system and equipment for the online charging of cloud system
CN107423085A (en) * 2017-04-24 2017-12-01 北京百度网讯科技有限公司 Method and apparatus for application deployment
WO2019052526A1 (en) * 2017-09-14 2019-03-21 北京金山云网络技术有限公司 Api invoking system, method and apparatus, electronic device and storage medium
CN110392068A (en) * 2018-04-17 2019-10-29 阿里巴巴集团控股有限公司 A kind of data transmission method, device and its equipment
CN109597854A (en) * 2018-10-31 2019-04-09 深圳壹账通智能科技有限公司 A kind of method for routing of service request, device, computer equipment and computer storage medium
CN109818836A (en) * 2018-11-08 2019-05-28 平安科技(深圳)有限公司 Service cut-in method, device, computer equipment and computer storage medium
US20200236187A1 (en) * 2019-01-17 2020-07-23 Servicenow, Inc. Discovery and service mapping of application programming interface proxies
CN111427613A (en) * 2020-03-12 2020-07-17 北京明略软件系统有限公司 Application program interface API management method and device
CN111722947A (en) * 2020-06-28 2020-09-29 深圳壹账通智能科技有限公司 Service calling method and system

Similar Documents

Publication Publication Date Title
CN107748985B (en) Network-based payment method and network payment server
EP3079326B1 (en) Network payment method, apparatus and system
US10742582B2 (en) Launching a client application based on a message
CN109636309B (en) Task processing method and device, electronic equipment and storage medium
CN108958711B (en) Method and device for realizing interface platform
CN106649638B (en) Big data acquisition method
CN107835228B (en) Instruction processing method and device based on dynamic generalized routing
CN110602056B (en) Service parameter transmission method and device
CN111770052B (en) Cloud game payment method, device, equipment and medium
CN109034603B (en) Business process execution method, device and computer readable storage medium
CN112232794A (en) Payment method and device, storage medium and electronic equipment
CN110750780A (en) User role permission fusion method, device and equipment based on multi-service system
CN106817296B (en) Information recommendation test method and device and electronic equipment
CN113779346A (en) Method and device for identifying one person with multiple accounts
CN112256452A (en) Service item determination method, device, equipment and storage medium of cloud service platform
CN115454576B (en) Virtual machine process management method and system and electronic equipment
CN106910055A (en) A kind of payment data treating method and apparatus based on mobile terminal
CN111797149B (en) Data acquisition method, device, equipment and computer readable storage medium
CN109120661B (en) Method and apparatus for distributing electronic card, server and readable storage medium
CN110827009B (en) Fund transfer method and device based on account balance limit
CN111782282B (en) Start program loading method and device, electronic equipment and storage medium
CN114219476A (en) Account association method, device, equipment and medium
CN116016379A (en) Method, device, electronic equipment and storage medium for resource sharing
CN113919829A (en) Account transaction request processing method, device and system and electronic equipment
CN115514534A (en) Data processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20210122