CN113037836A - Cloud service trial method, API gateway, electronic equipment and storage medium - Google Patents

Cloud service trial method, API gateway, electronic equipment and storage medium Download PDF

Info

Publication number
CN113037836A
CN113037836A CN202110246854.8A CN202110246854A CN113037836A CN 113037836 A CN113037836 A CN 113037836A CN 202110246854 A CN202110246854 A CN 202110246854A CN 113037836 A CN113037836 A CN 113037836A
Authority
CN
China
Prior art keywords
trial
user
api
type
cloud service
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.)
Pending
Application number
CN202110246854.8A
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.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202110246854.8A priority Critical patent/CN113037836A/en
Publication of CN113037836A publication Critical patent/CN113037836A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/14Charging, metering or billing arrangements for data wireline or wireless communications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M15/00Arrangements for metering, time-control or time indication ; Metering, charging or billing arrangements for voice wireline or wireless communications, e.g. VoIP
    • H04M15/70Administration or customization aspects; Counter-checking correct charges
    • H04M15/77Administration or customization aspects; Counter-checking correct charges involving multiple accounts per user
    • H04M15/772Administration or customization aspects; Counter-checking correct charges involving multiple accounts per user per service, e.g. prepay or post-pay

Abstract

The embodiment of the disclosure relates to a trial method of cloud services, an API gateway, electronic equipment and a storage medium, and relates to the field of cloud computing. The method comprises the following steps: acquiring a trial threshold and a trial type of the cloud service by a user, wherein the trial threshold is the free calling times of the user to an API (application program interface) of the cloud service; monitoring whether the times of calling the API by the user reaches a trial threshold value; under the condition that the trial type is the first type, after the number of times that the user calls the API reaches a trial threshold value, prohibiting the user from continuing to use the cloud service; and under the condition that the trial type is the second type, after the number of times that the user calls the API reaches the trial threshold value, starting to charge according to the number of times that the user calls the API.

Description

Cloud service trial method, API gateway, electronic equipment and storage medium
Technical Field
The invention relates to a cloud technology, in particular to a trial method of cloud service, an API gateway, electronic equipment and a storage medium.
Background
Cloud services are an emerging technology, and resources or software services can be distributed on a resource pool formed by a large number of computers, so that various application systems can acquire corresponding resources or software services, such as computing capacity and storage space, as required. When the user uses the cloud service, the user only needs to apply for the corresponding used resource or software service to the cloud service provider according to the use requirement of the user, and corresponding cost is paid for the used resource or software service, so that the cloud service can be used.
The cloud service platform often initiates trial activities in order to promote business, and provides product trial services for customers. Due to the consideration of trial cost, when the platform side provides product trial service, a trial amount is set, and when the using amount of a client exceeds the trial amount, the user is prohibited from using the product. For the trial mode, if the user needs to continue to use the cloud service, the user can continue to use the cloud service only by carrying out corresponding operation, and the trial mode is inflexible and cannot meet the requirements of different users.
Therefore, a scheme for trial use of the cloud service is provided, so that the trial process of the cloud service by the user can be flexibly controlled.
Disclosure of Invention
The purpose of the present disclosure is to provide a cloud service trial method, an API gateway, an electronic device, and a storage medium, so as to flexibly control a trial process of a user on a cloud service.
According to a first aspect of the present disclosure, a method for trying a cloud service is provided, including:
acquiring a trial threshold and a trial type of a cloud service of a user, wherein the trial threshold is the free calling times of the user to an API (application program interface) of the cloud service;
monitoring whether the number of times that the user calls the API reaches the trial threshold value;
under the condition that the trial type is a first type, after the number of times that the user calls the API reaches the trial threshold value, prohibiting the user from continuing to use the cloud service;
and under the condition that the trial type is a second type, after the number of times that the user calls the API reaches the trial threshold value, starting to charge according to the number of times that the user calls the API.
Optionally, the prohibiting the user from continuing to use the cloud service includes:
prohibiting the user from invoking the API.
Optionally, the monitoring whether the number of times the user calls the API reaches the trial threshold includes:
when the user calls the API, the number of the remaining free calls of the user is deducted, and the initial value of the number of the remaining free calls is the trial threshold;
and when the number of the remaining free calls is zero, determining that the number of the calls of the API by the user reaches the trial threshold.
Optionally, the method further comprises:
acquiring a trial effective date of the user;
and when the trial effective date arrives, setting the number of the remaining free calling times of the user to be zero.
Optionally, when the trial type is the second type, after the number of times that the user calls the API reaches the trial threshold, starting to charge according to the number of times that the user calls the API, including:
counting the number of times that the user calls the API from zero as the number of times of calling for payment after the number of the remaining free calls is zero;
and sending the payment calling times to a charging system so that the charging system charges according to the payment calling times.
Optionally, the method is implemented by an API gateway corresponding to the cloud service.
Optionally, before obtaining the trial threshold and the trial type of the cloud service by the user, the method further includes:
providing a trial configuration page to the user, wherein the trial configuration page contains the trial threshold, the API payment calling charging rule and a trial type configuration item which can be configured by the user;
and determining the trial type of the user according to the configuration result of the user on the trial type configuration item.
According to a second aspect of the present disclosure, there is provided an API gateway comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a trial threshold and a trial type of a cloud service of a user, and the trial threshold is the free calling times of the user to an API (application program interface) of the cloud service;
the monitoring module is used for monitoring whether the times of calling the API by the user reaches the trial threshold value;
the forbidding module is used for forbidding the user to continue using the cloud service after the number of times that the user calls the API reaches the trial threshold value under the condition that the trial type is the first type;
and the charging module is used for starting to charge according to the times of calling the API by the user when the times of calling the API by the user reaches the trial threshold value under the condition that the trial type is the second type.
Optionally, the prohibiting module is specifically configured to prohibit the user from calling the API after the number of times that the user calls the API reaches the trial threshold, if the trial type is the first type.
Optionally, the monitoring module includes:
a deduction unit, configured to deduct the remaining free calling times of the user when the user calls the API, where an initial value of the remaining free calling times is the trial threshold;
and the determining unit is used for determining that the number of times of calling the API by the user reaches the trial threshold when the number of the remaining free calling times is zero.
Optionally, the method further comprises:
the second acquisition module is used for acquiring the trial effective date of the user;
and the setting module is used for setting the number of the remaining free calling times of the user to be zero when the trial effective date arrives.
Optionally, the charging module includes:
the counting unit is used for counting the number of times that the user calls the API from zero as the number of times of calling for payment after the number of times of calling for the remaining free is zero under the condition that the trial type is a second type;
a sending unit, configured to send the payment calling times to a charging system, so that the charging system performs charging according to the payment calling times
According to a third aspect of the present disclosure, there is provided an electronic device comprising a processor and a memory; the memory is for storing computer instructions which, when executed by the processor, implement the method disclosed in the first aspect of the present disclosure.
According to a fourth aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the method disclosed in the first aspect of the present disclosure.
According to the embodiment of the disclosure, under the condition that the trial type is the first type, after the number of times that the user calls the API reaches the trial threshold value, the user is prohibited from continuing to use the cloud service; and under the condition that the trial type is the second type, after the number of times that the user calls the API reaches the trial threshold value, starting to charge according to the number of times that the user calls the API. Therefore, the trial service can be provided according to the trial type of the cloud service selected by the user, the trial scheme is more flexible, and the requirements of different users can be met. Meanwhile, a large amount of resources can be avoided from being consumed, and the operation cost can be reduced while the trial service is provided for the user.
Other features of the present disclosure and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a schematic diagram of a cloud service trial scheme of an embodiment of the present disclosure;
fig. 2 is one of the flow diagrams of a trial method of the cloud service according to the embodiment of the disclosure;
fig. 3 is a second flowchart illustrating a trial method of cloud services according to an embodiment of the disclosure;
fig. 4 is a block diagram of an API gateway according to an embodiment of the present disclosure.
Fig. 5 is a block diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
Fig. 1 is a schematic diagram of a cloud service trial scheme provided by an embodiment of the present disclosure. Referring to fig. 1, the cloud service trial scheme includes a cloud service platform 101 and a terminal 102. The terminal 102 may communicate with the cloud service platform 101 through a network 103, and the network 103 may be a wired network or a wireless network.
The cloud service platform 101 may be a server, a server cluster composed of several servers, or a cloud computing service center. The cloud service platform 101 is used for providing specific cloud services for users.
In the embodiment of the present disclosure, the cloud service platform 101 includes an API (Application Programming Interface) gateway and one or more servers. The API gateway is used for processing a plurality of API groups, the API groups are a set of the same business API, one API group can be regarded as one service, and the API gateway is used for receiving an API request sent by a user and sending the API request to a corresponding cloud service in a cloud service layer so as to obtain a corresponding resource or software service and provide the resource or software service for the user.
In one embodiment of the present disclosure, the cloud service platform 101 may be used to provide a trial service for cloud products. The cloud service platform 101 may include a service console, a service operations back office, and an API gateway. The service console is used for providing a trial configuration page for the user, and the user can configure the trial type of the cloud service through the service console. The API gateway is used for receiving an API request sent by a user and sending the API request to a corresponding cloud service in the service operation background so as to obtain a corresponding resource or software service and provide the resource or software service for the user.
In one embodiment of the present disclosure, the cloud service platform 101 may be as shown in fig. 1, including but not limited to: processor 1011, memory 1012, interface 1013, communication device 1014, input device 1015, output device 1016. The processor 1011 may include, but is not limited to, a central processing unit CPU, a microprocessor MCU, and the like. The memory 1012 may include, but is not limited to, a ROM (read only memory), a RAM (random access memory), a nonvolatile memory such as a hard disk, and the like. Interface device 1013 may include, but is not limited to, a USB interface, a serial interface, a parallel interface, and the like. The communication device 1014 is capable of wired or wireless communication, for example, and may specifically include WiFi communication, bluetooth communication, 2G/3G/4G/5G communication, and the like. Input devices 1015 may include, but are not limited to, a keyboard, a mouse, a touch screen, and the like. Output device 1016 may include, but is not limited to, a display screen or the like. In other embodiments, the cloud service platform 101 may further include a speaker, a microphone, and the like, which are not limited herein.
The terminal 102 may be, for example, an electronic device installed with an intelligent operating system (e.g., android, IOS, Windows, Linux, etc.) including, but not limited to, a server, a laptop, a desktop computer, a mobile phone, a tablet computer, etc.
In one embodiment of the present disclosure, the terminal 102 may be as shown in fig. 1, including but not limited to a processor 1021, a memory 1022, an interface device 1023, a communication device 1024, a display device 1025, an input device 1026, a speaker 1027, a microphone 1028, and the like. The processor 1021 may be a microprocessor MCU or the like. The memory 1022 includes, for example, a ROM (read only memory), a RAM (random access memory), a nonvolatile memory such as a hard disk, and the like. The interface 1023 includes a USB (Universal Serial Bus) interface, a headphone interface, and the like. The communication device 1024 is capable of wired or wireless communication, for example, and also of short-range and long-range communication, for example. The display unit 1025 is, for example, a liquid crystal display panel, a touch panel, or the like. The input device 1026 may comprise, for example, a touch screen, a keyboard, or the like. A user can input/output voice information through the speaker 1027 and the microphone 1028.
In an embodiment applied to this specification, a user may send a request for using the cloud service to the cloud service platform 101 through the terminal 102, and the cloud service platform 101 may respond after receiving the trial request and issue a resource package to the terminal 102 to help the user try the cloud service.
Fig. 1 shows a plurality of terminals 102, and for the same user, a specific cloud service can be tried out through one or more terminals 102.
The cloud service platform 101 shown in fig. 1 is not meant to imply any limitations on the embodiments of this specification, their applications, or uses. It should be understood by those skilled in the art that although the foregoing describes a plurality of devices of the cloud service platform 101 and the terminal 102, the present specification embodiment may only refer to some of the devices. For example, the cloud service platform 101 may only involve a processor, a memory, and a communication device, and the terminal 102 may only involve a processor, a memory, a communication device, and a display screen. Those skilled in the art can design instructions according to the scheme disclosed in the embodiments of the present specification, and how the instructions control the processor to operate is well known in the art, and will not be described in detail herein.
Referring to fig. 2, a trial method of a cloud service provided by an embodiment of the present disclosure is described. The method comprises steps S202-208.
The method may be implemented by the cloud service platform 101 in fig. 1. It should be noted that the method may be implemented by an API gateway corresponding to the cloud service, may also be implemented by the API gateway and a service operation background together, and may also be implemented by a service console and a service operation background together.
S202, acquiring a trial threshold and a trial type of the cloud service by the user, wherein the trial threshold is the free calling times of the user to the API of the cloud service.
In this embodiment, the cloud service platform may provide trial services of a plurality of cloud service products to the user. The trial services of different cloud service products are provided with corresponding trial threshold values. A trial threshold value is set for each cloud service, so that the user can be guided to trial and experience a plurality of functions of the cloud service. The trial threshold may be used to define an amount or number of times that the user uses the cloud service product free of charge. The trial threshold may be, for example, a free number of calls made by the user to an API of the cloud service. That is to say, when the user uses the trial service provided by the cloud service platform, if the number of times of calling the API of the cloud service by the user reaches the trial threshold of the cloud service, the trial service is stopped.
In this embodiment, the cloud service platform may further set a trial threshold according to historical trial data of the cloud service. For example, the cloud service platform can set a trial threshold for a customer in a certain industry according to historical trial data of the cloud service for the trial of the customer in the industry, so that the setting of the trial threshold is more reasonable, actual requirements of the user are better met, and trial experience of the user is improved.
In this embodiment, the trial service of each cloud service product may include multiple trial types to meet the needs of different users.
Illustratively, for some users, it is customary to automatically start formal billing usage after free trial cloud services. For other users, for example, users with a large cloud service usage amount, after the trial cloud service is finished, the users need to communicate with the cloud service provider further to implement charging rules, and then start formal charging for usage. Based on this, the trial type may include a first type and a second type. For the first type, after the number of times that the user calls the API reaches a trial threshold, the user is prohibited from continuing to use the cloud service. For the second type, after the number of times that the user calls the API reaches the trial threshold, the user can charge according to the number of times that the user calls the API when continuing to call the API.
In this embodiment, the user may select the trial type of the cloud service according to actual needs. In particular implementation, the cloud service platform may provide a trial configuration page to the user for the user to configure a trial type of the cloud service. For example, the cloud service platform at least comprises a service console, and the service console is used for providing a trial configuration page for a user, and the user can configure trial types of the cloud service through the service console.
In a more specific example, before obtaining the trial threshold and trial type of the cloud service by the user, the trial method of the cloud service may further include: s302-304.
S302, providing a trial configuration page for the user, wherein the trial configuration page contains a trial threshold, an API payment calling charging rule and a trial type configuration item which can be configured by the user.
The API payment calling charging rule is a charging rule which is set for the cloud service in advance by the cloud service platform. The API payment calling charging rules may be charged according to the number of times the user calls the API, for example, the unit price for calling the API once. The API pay call charging rule may also be a monthly payment, e.g., comprising 200 times per month.
The trial type configuration item is used for configuring trial types of the cloud service by the user. For example, the trial configuration page includes an interaction control labeled with a first type and an interaction control labeled with a second type.
The trial threshold is displayed on the trial configuration page, so that the user can be helped to know the maximum use amount of the cloud service, which can be tried out freely. The method has the advantages that the API payment calling charging rule is displayed on the trial configuration page, so that the user can be helped to know the charging rule of the cloud service, and the trial type of the cloud service can be selected according to the requirement under the condition that the user knows the API payment calling charging rule of the cloud service.
S304, determining the trial type of the user according to the configuration result of the user on the trial type configuration item.
The embodiment may determine the trial type of the user according to the configuration result of the user on the trial type configuration item, and after determining the trial type of the user, further may provide a corresponding trial service for the user according to the trial type of the user.
According to the embodiment of the disclosure, the trial configuration page is provided for the user, so that the user can select the trial type of the cloud service according to actual needs, the trial scheme is more flexible, and different user requirements can be met.
And S204, monitoring whether the times of calling the API by the user reach a trial threshold value.
In this embodiment, the number of times that the user calls the API may be monitored to determine whether the number of times that the user calls the API reaches the trial threshold, so as to determine whether the trial service is ended.
In an embodiment of the present disclosure, the step of monitoring whether the number of times that the user calls the API reaches a trial threshold may further include: s402-404.
S402, when the user calls the API, the number of the remaining free calls of the user is deducted, and the initial value of the number of the remaining free calls is a trial threshold value.
S404, when the number of the remaining free calling times is zero, determining that the number of times of calling the API by the user reaches a trial threshold value.
It is understood that, when the user does not start the trial service, the remaining free call number is the free call number of the user to the API of the cloud service. After the user starts the trial service, the user deducts 1 time from the remaining free calling times of the user every time the user calls the API. When the number of the remaining free calls is reduced to zero, the number of times that the user calls the API reaches a trial threshold value, and the user is determined to finish the trial service.
According to the embodiment of the disclosure, the number of times that the user calls the API is monitored in real time, whether the number of times that the user calls the API reaches the trial threshold is judged, whether the trial service is finished is determined, the user can be prohibited from continuing to use the corresponding cloud service when the number of times that the user calls the API reaches the trial threshold, a large amount of resources can be avoided being consumed, and the operation cost can be reduced while the trial service is provided for the user.
S206, under the condition that the trial type is the first type, after the number of times that the user calls the API reaches the trial threshold value, the user is prohibited from continuously using the cloud service.
In one embodiment of the disclosure, prohibiting the user from continuing to use the cloud service may be prohibiting the user from calling an API.
And S208, under the condition that the trial type is the second type, after the number of times that the user calls the API reaches the trial threshold value, starting to charge according to the number of times that the user calls the API.
It should be noted that, after the number of times that the user calls the API reaches the trial threshold, the number of times that the user calls the API is charged according to the API payment call charging rule shown in advance.
In an embodiment of the present disclosure, in a case that the trial type is the second type, after the number of times that the user calls the API reaches the trial threshold, the step of starting to perform charging according to the number of times that the user calls the API may further include: s502-504.
And S502, counting the times of calling the API by the user from zero as the payment calling times after the residual free calling times are zero.
The number of paid calls may be the number of times the user calls the API, charged by the number of times the user calls the API. The initial value of the number of paid invocations is zero.
S504, the payment calling times are sent to a charging system, so that the charging system can charge according to the payment calling times.
After the trial service is finished, namely when the formal charging is started, when the user calls the API once, the charging calling times are increased by 1 time, and the counted charging calling times are sent to the charging system, so that the charging system charges according to the charging calling times.
In one embodiment of the disclosure, a trial effective date may be set for the trial service, and whether the trial service is ended or not may be determined according to the trial effective date.
In a specific example, the trial method of the cloud service may further include: s602-604.
S602, acquiring the effective trial date of the user.
And S604, when the trial effective date arrives, setting the number of the remaining free calls of the user to be zero.
The trial effective date is a trial effective date which is preset for a certain cloud service by the cloud service platform. After the trial validity period, the user should be prohibited from continuing to try the cloud service. For example, the trial effective date of the cloud service is 31 days 10 and 31 months of 2020, after 31 days 10 and 31 days, the trial service of the cloud service is disabled, and the user may not continue to trial the cloud service.
When the trial effective date is reached, the number of the remaining free calls of the user is set to be zero, so that the cloud service platform can prohibit the user from continuously trying a certain cloud service.
According to the embodiment of the disclosure, the trial effective date is set for the trial service, so that the user can be prompted to enjoy the trial service within the trial effective date as soon as possible, and the probability of conversion into the formal charging user can be improved while the trial service is provided for the user.
According to the embodiment of the disclosure, under the condition that the trial type is the first type, after the number of times that the user calls the API reaches the trial threshold value, the user is prohibited from continuing to use the cloud service; and under the condition that the trial type is the second type, after the number of times that the user calls the API reaches the trial threshold value, starting to charge according to the number of times that the user calls the API. Therefore, the trial service can be provided according to the trial type of the cloud service selected by the user, the trial scheme is more flexible, and different user requirements can be met. Meanwhile, a large amount of resources can be avoided from being consumed, and the operation cost can be reduced while the trial service is provided for the user.
The following describes a trial method of the cloud service by using a specific example. Referring to fig. 3, the trial method of the cloud service includes the following steps.
S1001, the terminal receives operation of a user on a trial type configuration item on a trial configuration page, and sends a configuration result to the service console when the user clicks a submit button on the trial configuration page.
S2001, the service console receives the configuration result and sends the configuration result to the service operation background.
S3001, the service operation background receives the configuration result and determines the trial type of the cloud service by the user.
S3002, the service operation background sends the cloud service trial threshold and trial type of the user to the API gateway.
S1002, the terminal sends an API request to the API gateway, and the API gateway receives the API request.
S4001, the API gateway judges whether the number of the remaining free calls of the user is zero.
S4002, when the remaining free calling times of the user are not zero, subtracting 1 time from the remaining free calling times of the user.
S4003, when the number of remaining free calling times of the user is zero, if the trial type of the user is the first type, prohibiting the API from requesting calling the API; if the trial type of the user is the second type, the number of the payment calls is accumulated.
When the number of remaining free calls of the user is zero, if the trial type of the user is the first type, the API gateway may send a notification to the service operation background to prohibit the user from continuing to use the cloud service. And after receiving the notice for prohibiting the user from continuing to use the cloud service, the service operation background sends a prompt for finishing the trial to the user through the service console. When the number of remaining free calls of the user is zero, if the trial type of the user is the second type, the API gateway may send a notification of starting charging to the service operation background, and after receiving the notification of starting charging, the service operation background forwards the notification to the user to remind the user to start charging. After the charging is started, the API gateway may send the payment calling times of the user to the charging system according to a preset period, so that the charging system charges the user according to the payment calling times.
The embodiment of the present disclosure further provides an API gateway, which may be applied to an electronic device, for example, the cloud service platform 101 shown in fig. 1, where the API gateway is configured to receive an API request sent by a user, and send the API request to a corresponding cloud service in the cloud service platform, so as to obtain a corresponding resource or software service and provide the resource or software service to the user. As shown in fig. 4, the API gateway 40 may include a first obtaining module 41, a monitoring module 42, a disabling module 43, and a billing module 44.
The first obtaining module 41 is configured to obtain a trial threshold and a trial type of the cloud service for the user, where the trial threshold is a free number of times that the user calls an API of the cloud service.
And the monitoring module 42 is configured to monitor whether the number of times that the user calls the API reaches a trial threshold.
And the disabling module 43 is configured to prohibit the user from continuing to use the cloud service after the number of times that the user calls the API reaches the trial threshold value, if the trial type is the first type.
And the charging module 44 is configured to, when the trial type is the second type, start charging according to the number of times that the user calls the API after the number of times that the user calls the API reaches the trial threshold.
In one embodiment, in the case that the trial type is the first type, when prohibiting the user from continuing to use the cloud service, the prohibition module 43 may be configured to: and under the condition that the trial type is the first type, forbidding the user to call the API after the number of times that the user calls the API reaches the trial threshold value.
In one embodiment, the monitoring module 42 includes a deduction unit and a determination unit. The deduction unit is used for deducting the residual free calling times of the user when the user calls the API, and the initial value of the residual free calling times is a trial threshold value. The determining unit is used for determining that the number of times of calling the API by the user reaches a trial threshold when the number of the remaining free calling times is zero.
In one embodiment, the API gateway 40 further includes a second obtaining module and a setting module. The second acquisition module is used for acquiring the effective trial date of the user. The setting module is used for setting the number of the remaining free calling times of the user to be zero when the trial effective date arrives.
In one embodiment, the billing module 44 further includes a statistics unit and a sending unit. The counting unit is used for counting the number of times that the user calls the API from zero as the number of times of calling for payment after the number of times of calling for free is zero under the condition that the trial type is the second type. The sending unit is used for sending the payment calling times to the charging system so that the charging system can charge according to the payment calling times.
Referring to fig. 5, an embodiment of the present disclosure also provides an electronic device 500 including a processor 501 and a memory 502.
The memory 502 is used to store computer instructions that when executed by the processor 501 implement a trial method of cloud services as disclosed in any of the previous embodiments.
The electronic device 500 may be a server, for example, the electronic device 500 may be the cloud service platform 101 in fig. 1, and the like.
Embodiments of the present disclosure provide a computer-readable storage medium having stored thereon computer instructions that, when executed by a processor, implement a trial method of cloud services as disclosed in any of the foregoing embodiments.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the server, the apparatus, the device, and the computer storage medium, since they are substantially similar to the embodiments of the method, the description is simple, and for the relevant points, reference may be made to the partial description of the embodiments of the method.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Disclosed may be a system, method, and/or computer instruction product. The computer instruction product may include a computer readable storage medium having computer readable program instructions embodied thereon for causing a processor to implement various aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer instruction instructions for carrying out operations of the present disclosure may be assembly instructions, Instruction Set Architecture (ISA) instructions, machine related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer instruction products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer instruction products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, implementation by software, and implementation by a combination of software and hardware are equivalent.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present disclosure is defined by the appended claims.

Claims (14)

1. A trial method of cloud services is characterized by comprising the following steps:
acquiring a trial threshold and a trial type of a cloud service of a user, wherein the trial threshold is the free calling times of the user to an API (application program interface) of the cloud service;
monitoring whether the number of times that the user calls the API reaches the trial threshold value;
under the condition that the trial type is a first type, after the number of times that the user calls the API reaches the trial threshold value, prohibiting the user from continuing to use the cloud service;
and under the condition that the trial type is a second type, after the number of times that the user calls the API reaches the trial threshold value, starting to charge according to the number of times that the user calls the API.
2. The method of claim 1, wherein the prohibiting the user from continuing to use the cloud service comprises:
prohibiting the user from invoking the API.
3. The method of claim 1, wherein the monitoring whether the number of times the user invokes the API reaches the trial threshold comprises:
when the user calls the API, the number of the remaining free calls of the user is deducted, and the initial value of the number of the remaining free calls is the trial threshold;
and when the number of the remaining free calls is zero, determining that the number of the calls of the API by the user reaches the trial threshold.
4. The method of claim 3, further comprising:
acquiring a trial effective date of the user;
and when the trial effective date arrives, setting the number of the remaining free calling times of the user to be zero.
5. The method according to claim 3, wherein when the trial type is the second type, starting charging according to the number of times that the user calls the API after the number of times that the user calls the API reaches the trial threshold, includes:
counting the number of times that the user calls the API from zero as the number of times of calling for payment after the number of the remaining free calls is zero;
and sending the payment calling times to a charging system so that the charging system charges according to the payment calling times.
6. The method of any of claims 1-5, wherein the method is implemented by an API gateway corresponding to the cloud service.
7. The method of claim 6, wherein prior to obtaining the user's trial threshold and trial type for the cloud service, the method further comprises:
providing a trial configuration page to the user, wherein the trial configuration page contains the trial threshold, the API payment calling charging rule and a trial type configuration item which can be configured by the user;
and determining the trial type of the user according to the configuration result of the user on the trial type configuration item.
8. An API gateway, comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a trial threshold and a trial type of a cloud service of a user, and the trial threshold is the free calling times of the user to an API (application program interface) of the cloud service;
the monitoring module is used for monitoring whether the times of calling the API by the user reaches the trial threshold value;
the forbidding module is used for forbidding the user to continue using the cloud service after the number of times that the user calls the API reaches the trial threshold value under the condition that the trial type is the first type;
and the charging module is used for starting to charge according to the times of calling the API by the user when the times of calling the API by the user reaches the trial threshold value under the condition that the trial type is the second type.
9. The gateway according to claim 8, wherein the prohibiting module is specifically configured to prohibit the user from calling the API after the number of times that the user called the API reaches the trial threshold, if the trial type is the first type.
10. The gateway of claim 8, wherein the monitoring module comprises:
a deduction unit, configured to deduct the remaining free calling times of the user when the user calls the API, where an initial value of the remaining free calling times is the trial threshold;
and the determining unit is used for determining that the number of times of calling the API by the user reaches the trial threshold when the number of the remaining free calling times is zero.
11. The gateway of claim 10, further comprising:
the second acquisition module is used for acquiring the trial effective date of the user;
and the setting module is used for setting the number of the remaining free calling times of the user to be zero when the trial effective date arrives.
12. The gateway of claim 10, wherein the billing module comprises:
the counting unit is used for counting the number of times that the user calls the API from zero as the number of times of calling for payment after the number of times of calling for the remaining free is zero under the condition that the trial type is a second type;
and the sending unit is used for sending the payment calling times to a charging system so that the charging system can charge according to the payment calling times.
13. An electronic device comprising a processor and a memory;
the memory is for storing computer instructions which, when executed by the processor, implement the method of any one of claims 1-7.
14. A computer-readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the method of any one of claims 1-7.
CN202110246854.8A 2021-03-05 2021-03-05 Cloud service trial method, API gateway, electronic equipment and storage medium Pending CN113037836A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110246854.8A CN113037836A (en) 2021-03-05 2021-03-05 Cloud service trial method, API gateway, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110246854.8A CN113037836A (en) 2021-03-05 2021-03-05 Cloud service trial method, API gateway, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113037836A true CN113037836A (en) 2021-06-25

Family

ID=76468213

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110246854.8A Pending CN113037836A (en) 2021-03-05 2021-03-05 Cloud service trial method, API gateway, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113037836A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113746646A (en) * 2021-08-30 2021-12-03 中国银联股份有限公司 Application program interface API gateway charging method, device, equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080046378A1 (en) * 2006-08-18 2008-02-21 Siemens Aktiengesellschaft System and method for selling software on a pay-per-use basis
CN101945366A (en) * 2009-07-07 2011-01-12 中国移动通信集团公司 Experiential accounting method, proxy module, terminal and system
CN110135892A (en) * 2019-04-15 2019-08-16 深圳职业技术学院 Calling charging method, device, electronic equipment and the storage medium of API
CN110570225A (en) * 2019-06-25 2019-12-13 上海达龙信息科技有限公司 Virtual cloud desktop use charging method, system, medium and electronic equipment
CN110633074A (en) * 2019-09-19 2019-12-31 北京猎户星空科技有限公司 Use control method and device of software development kit

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080046378A1 (en) * 2006-08-18 2008-02-21 Siemens Aktiengesellschaft System and method for selling software on a pay-per-use basis
CN101945366A (en) * 2009-07-07 2011-01-12 中国移动通信集团公司 Experiential accounting method, proxy module, terminal and system
CN110135892A (en) * 2019-04-15 2019-08-16 深圳职业技术学院 Calling charging method, device, electronic equipment and the storage medium of API
CN110570225A (en) * 2019-06-25 2019-12-13 上海达龙信息科技有限公司 Virtual cloud desktop use charging method, system, medium and electronic equipment
CN110633074A (en) * 2019-09-19 2019-12-31 北京猎户星空科技有限公司 Use control method and device of software development kit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113746646A (en) * 2021-08-30 2021-12-03 中国银联股份有限公司 Application program interface API gateway charging method, device, equipment and medium

Similar Documents

Publication Publication Date Title
US8249552B1 (en) Pre and post-paid service plan manager
CN113657886B (en) Payment system, method, server device, medium and device
US10848931B2 (en) System and method for modifying settings on wireless devices
CN109165157B (en) Method for testing application program and test platform
CN110072151B (en) Virtual gift display method, electronic device and computer-readable storage medium
CN105376719A (en) Information pushing method and device
CN111291396B (en) Form data processing method and device, electronic equipment and storage medium
CN111209060A (en) Capability development platform processing method and device
CN113037836A (en) Cloud service trial method, API gateway, electronic equipment and storage medium
CN114116495A (en) Test method and device, electronic equipment and storage medium
CN112990952A (en) Cloud computing metering charging method and device, electronic equipment and storage medium
CN114629732A (en) Charging method and device for cloud resources, electronic equipment and medium
CN112203266A (en) Call method and electronic equipment
CN108156206B (en) Data transfer method, server, client and system
CN111190670A (en) Page display method and device and electronic equipment
CN110673908A (en) Interface generation method, device, medium and electronic equipment
CN111694571A (en) Compiling method and device
KR101287133B1 (en) System for advertising wireless internet using smart phone
CN114612091A (en) Automatic account checking method and device, electronic equipment and storage medium
CN108197961B (en) User management method and device
CN108197930B (en) DOI display and transaction information verification method, device and equipment
CN111553681A (en) Electronic card acquisition method and device
CN112764676B (en) Resource allocation system and method
CN110827009B (en) Fund transfer method and device based on account balance limit
CN114845257B (en) Multi-level charging method, device and storage medium based on embedded script

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210625