A cloud computing resource metering method, device, system, equipment and medium
By generating instance snapshot information and decoupling metering and ordering functions, the problems of inaccurate billing and high business complexity in cloud computing resource metering and billing are solved, and metering efficiency is improved.
Patent Information
- Application Number
- CN202011017625.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-24
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2040-09-24
AI Technical Summary
The existing cloud computing resource metering and billing methods have low billing accuracy and high business complexity, mainly due to the strong coupling between the metering function and the order function, resulting in low efficiency.
By receiving instance update information to generate instance snapshot information and sending it to the metering module, cloud computing resource metering based on snapshot information is realized, thereby decoupling metering and order functions.
It reduces the complexity of metering business, improves metering efficiency, and solves the problem of bill inaccuracies caused by metering methods.
Smart Images

Figure CN112181650B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a cloud computing resource metering method, device, system, equipment and medium. Background Art
[0002] Cloud computing is a service related to information technology, software, and the Internet. Cloud computing can quickly provide a shared pool of computing resources including networks, servers, storage, application software, and services. Its typical feature is on-demand use, and metering and billing of these resources is the basis for the commercialization of cloud platforms.
[0003] At present, since the resource information of cloud computing resources is not static during the entire life cycle from activation to release, customers will change the size and usage time of cloud computing resources according to their own needs. Cloud computing vendors can obtain order records related to the current billing period from the order module according to the billing cycle to calculate the usage and charge. However, the above metering and billing method has low accuracy in billing, and due to the strong business coupling of the metering and billing function to the order function, it causes problems of high business complexity and low efficiency. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a cloud computing resource metering method, apparatus, system, device and medium.
[0005] The present disclosure provides a cloud computing resource metering method, the method comprising:
[0006] Receiving instance update information, wherein the instance update information is information sent by the instance module when the instance state changes;
[0007] Generate instance snapshot information based on the instance update information;
[0008] The instance snapshot information is sent to a metering module, so that the metering module performs metering of cloud computing resources based on the instance snapshot information.
[0009] The present disclosure also provides a cloud computing resource metering device, the device comprising:
[0010] An instance update information receiving module, used to receive instance update information, wherein the instance update information is information sent by the instance module when the instance state changes;
[0011] An instance snapshot generation module, used to generate instance snapshot information based on the instance update information;
[0012] The cloud computing resource metering module is used to send the instance snapshot information to the metering module so that the metering module measures the cloud computing resources based on the instance snapshot information.
[0013] The embodiments of the present disclosure also provide a cloud computing resource metering system, which includes an instance snapshot module, an instance module and a metering module. The instance snapshot module is communicatively connected with the instance module and the metering module to execute the cloud computing resource metering method provided in the embodiments of the present disclosure.
[0014] An embodiment of the present disclosure also provides an electronic device, comprising: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the cloud computing resource metering method provided in the embodiment of the present disclosure.
[0015] The embodiments of the present disclosure also provide a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the cloud computing resource metering method provided by the embodiments of the present disclosure.
[0016] The technical solution provided by the embodiment of the present disclosure has the following advantages over the prior art: the cloud computing resource metering solution provided by the embodiment of the present disclosure receives instance update information, wherein the instance update information is information sent by the instance module when the instance state changes, generates instance snapshot information based on the instance update information, and sends the instance snapshot information to the metering module, so that the metering module measures the cloud computing resources based on the instance snapshot information. By adopting the above technical solution, instance snapshot information can be generated according to the instance update information when the instance state changes, and then the cloud computing resources can be metered according to the instance snapshot information, decoupling the order function and metering function of the cloud computing resources, which can reduce the business complexity of metering, improve metering efficiency, and solve the problem of inaccurate bills caused by the metering method. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] 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 present disclosure.
[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0019] Figure 1A schematic diagram of a process flow of a cloud computing resource metering method provided by an embodiment of the present disclosure;
[0020] Figure 2 A flowchart of another cloud computing resource metering method provided by an embodiment of the present disclosure;
[0021] Figure 3 A schematic diagram of the structure of a cloud computing resource metering system provided by an embodiment of the present disclosure;
[0022] Figure 4 A schematic diagram of the structure of a cloud computing resource metering device provided in an embodiment of the present disclosure;
[0023] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0024] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0025] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0026] At present, cloud computing vendors adopt a post-payment model when some large public cloud customers purchase cloud computing resources, that is, they first place an order to activate cloud computing resources, and then after a billing cycle, the cloud computing vendor will measure and bill the customer based on the actual usage of cloud computing resources used in the previous billing cycle, and issue a post-payment bill. The above billing cycle generally includes three granularities: one hour, one day, and one month. Alternatively, some cloud computing resources need to be used before they can be paid according to usage.
[0027] Since the resource information of cloud computing resources is not static during the entire life cycle from activation to release, customers will change the size and usage time according to their needs, such as re-allocation or renewal. The metering and billing module can obtain the order records related to the current billing period through the order module according to the billing cycle to calculate the usage and bill. However, the above metering and billing method has the following disadvantages: 1. The accuracy of billing depends entirely on the order module. For all resource change records, order records are required to ensure the accuracy of metering and billing. However, the order module is not equivalent to the resource change record, that is, some resource operations do not require orders, which may affect the accuracy of the bill. For example, if a user makes a project-based change to a resource, since there will be no order record, it will affect the accuracy of the project-based bill. 2. The strong business coupling of the metering and billing module to the order module causes excessive business complexity. The data required for resource billing in the metering and billing module cannot be met by the order module alone. It is necessary to obtain the corresponding product information in the product module and the corresponding instance information in the instance module according to the order record to obtain all the data required for the billing cycle. These data themselves are the business logic of the order system, so the metering and billing module needs to pay attention to the business logic of the order system to obtain the data to be billed.
[0028] Therefore, the above metering and billing method has low accuracy in billing, and the strong business coupling of metering and billing functions to order functions causes problems of high business complexity and low efficiency. In order to solve the above problems, the embodiments of the present disclosure provide a cloud computing resource metering method.
[0029] Figure 1 The present invention provides a flow chart of a cloud computing resource metering method provided in an embodiment of the present invention. The method can be performed by a cloud computing resource metering device, wherein the device can be implemented by software and / or hardware and can generally be integrated in an electronic device. Figure 1 As shown, the method includes:
[0030] Step 101: Receive instance update information, where the instance update information is information sent by the instance module when the instance state changes.
[0031] In the embodiments of the present disclosure, an instance can be understood as a specific cloud computing resource applied for by a user according to user needs. An instance can include hardware or software resources, for example, an instance can be a host. An instance module can be understood as a functional module for managing configuration information such as the state and time of an instance.
[0032] Situations in which the instance status changes include but are not limited to creating an instance, reconfiguring an instance, changing the instance project system, shutting down an instance due to arrears, and canceling an instance, among which, creating an instance means creating a new instance based on user needs, reconfiguring an instance means changing the specific resource size of the instance, changing the instance project system means changing the project group corresponding to the instance, shutting down an instance due to arrears means temporarily shutting down an instance when the user is in arrears, and canceling an instance means canceling an instance when the user no longer needs cloud computing resources. After canceling, the instance no longer exists, and the user must create a new instance when purchasing again.
[0033] Instance update information is information related to changes in the instance module, and may specifically include at least one of the change type, instance information, order information, product information, and metering and billing methods. The change type may represent the classification of instance status changes, for example, it may be divided into billing update type and non-billing update type according to whether the billing has changed. Instance information may include information related to the latest instance status, such as instance ID and instance update time; order information may include order information, such as order ID and order service time; and product information may include product information, such as product ID and instance configuration information.
[0034] Specifically, the instance snapshot module can receive instance update information sent by the instance module when the instance state changes for subsequent use. It is understandable that when the instance state changes to instance creation failure, the instance module does not need to send instance update information to the instance snapshot module because resource metering and billing are not required.
[0035] Step 102: Generate current instance snapshot information based on the instance update information.
[0036] The instance snapshot information can be understood as an image record of relevant information when the instance state changes, which is a kind of integrated information.
[0037] In an embodiment of the present disclosure, generating instance snapshot information based on instance update information may include: determining a snapshot start time based on a change type, instance information, and order information; generating a snapshot identifier based on the instance information; obtaining instance configuration information based on a product identifier in product information; and integrating a default snapshot end time, a snapshot start time, a snapshot identifier, and an instance configuration information to obtain instance snapshot information.
[0038] Specifically, the snapshot start time is determined based on the change type, instance information, and order information, which may include: if the change type is a non-billing update type, the snapshot start time is the instance update time in the instance information; otherwise, the snapshot start time is the order service start time in the order information. If the change type is a non-billing update type, it means that the current instance status change does not affect billing, such as changing the instance project system, there is no order record, and the instance update time in the instance information can be used as the snapshot start time; if the change type is a billing update type, it means that the current instance status change affects billing, such as changing the instance configuration, there is an order record, and the order service start time can be obtained from the order module based on the order identifier in the order information, and the order service start time is used as the snapshot start time.
[0039] The instance information may include the latest status information of the instance, such as the instance identifier, instance update time, and instance data version. The snapshot identifier corresponds to the instance snapshot information one by one. Generate a snapshot identifier based on the instance information. Specifically, encrypt the string obtained by concatenating the instance identifier (i.e., instance ID), instance update time, and instance data version to obtain the snapshot identifier. The snapshot identifier is unique, and one snapshot identifier corresponds to one instance snapshot information. Obtain instance configuration information based on the product identifier in the product information. Specifically, the instance configuration information can be obtained from the product module through the interface of the product module based on the product identifier. The instance configuration information refers to the information related to the resources purchased by the user.
[0040] After integrating key fields such as snapshot start time, snapshot identifier, instance configuration information, and default snapshot end time, instance snapshot information is generated. Then, the snapshot identifier can be used as the key, and the information integrated in other key fields can be used as the value to store the instance snapshot information in the database. The above default snapshot end time can be a distant future time, which means that it does not end. It can be set according to actual conditions. For example, the default snapshot end time can be December 31, 2099.
[0041] Step 103: Send the instance snapshot information to the metering module, so that the metering module performs metering of cloud computing resources based on the instance snapshot information.
[0042] After the instance snapshot module generates the instance snapshot information, the instance snapshot information can be sent to the metering module when it needs to perform metering. The specific metering module can send an information acquisition request to the instance snapshot module according to the metering time. When the instance snapshot module receives the information acquisition request, the instance snapshot information can be sent to the metering module, so that the metering module can measure the cloud computing resources based on the instance snapshot information, and then perform billing and billing. In the disclosed embodiment, since the metering function and the order function are decoupled, the problem of inaccurate billing due to not generating order records can be solved, and the metering efficiency can be improved.
[0043] The cloud computing resource metering solution provided by the embodiment of the present disclosure receives instance update information, wherein the instance update information is information sent by the instance module when the instance state changes, generates instance snapshot information based on the instance update information, and sends the instance snapshot information to the metering module, so that the metering module measures the cloud computing resources based on the instance snapshot information. By adopting the above technical solution, instance snapshot information can be generated according to the instance update information when the instance state changes, and then the cloud computing resources can be metered according to the instance snapshot information, decoupling the order function and metering function of the cloud computing resources, which can reduce the business complexity of metering, improve metering efficiency, and solve the problem of inaccurate bills caused by the metering method.
[0044] In some embodiments, after generating instance snapshot information based on instance update information, the cloud computing resource metering method may further include: modifying the default snapshot end time in the previous instance snapshot information to the snapshot start time in the instance snapshot information. By modifying, errors in subsequent metering and billing can be avoided.
[0045] Figure 2 This is a flow chart of another cloud computing resource metering method provided by the embodiment of the present disclosure. Based on the above embodiment, this embodiment further specifically describes the above cloud computing resource metering method. Figure 2 As shown, the method includes:
[0046] Step 201: Receive instance update information.
[0047] The instance update information is information sent by the instance module when the instance state changes. The instance update information may include at least one of the change type, instance information, order information, product information, and metering and billing methods.
[0048] In the disclosed embodiments, the specific process when a user purchases cloud computing resources may include: generating a commodity based on the information of the cloud computing resources required by the user, generating an order based on the commodity after the user places an order, and generating a specific instance after payment; when the user changes the instance, a changed commodity may be generated, and a new order may be generated based on the commodity, but a new instance will not be created. The change type may characterize the classification of instance status changes, for example, it may be divided into billing update type and non-billing update type based on whether the billing has changed. Instance information may include instance identification, instance update time and other information related to the latest instance status, order information may include order identification and order service time and other order related information, and commodity information may include commodity identification and instance configuration information and other commodity related information.
[0049] After step 201, steps 202 to 205 may be executed, wherein steps 202 to 204 may be executed in parallel or in sequence. The execution sequence of steps 202 to 204 is not limited in the embodiment of the present disclosure. Figure 2 These are examples only.
[0050] Step 202: Determine the snapshot start time based on the change type, instance information, and order information.
[0051] Specifically, determining the snapshot start time based on the change type, instance information and order information may include: if the change type is a non-billing update type, the snapshot start time is the instance update time in the instance information; otherwise, the snapshot start time is the order service start time in the order information.
[0052] Step 203: Generate a snapshot identifier based on the instance information.
[0053] Step 204: Obtain instance configuration information based on the product identifier in the product information.
[0054] Step 205: Integrate the default snapshot end time, snapshot start time, snapshot identifier and instance configuration information to obtain instance snapshot information.
[0055] Step 206: Modify the default snapshot end time in the previous instance snapshot information to the snapshot start time in the instance snapshot information.
[0056] The previous instance snapshot information refers to the instance snapshot information of the previous record for the currently generated instance snapshot information. Since the default snapshot end time when each instance snapshot information is generated is a time that represents an incomplete time, when a new instance snapshot information is generated, it means that the previous instance change has ended. In this case, the default snapshot end time in the previous instance snapshot information needs to be modified to the snapshot start time in the current instance snapshot information to avoid errors in subsequent metering and billing.
[0057] Step 207: Send the instance snapshot information and the previous instance snapshot information to the metering module, so that the metering module performs metering of the cloud computing resources based on the instance snapshot information and the previous instance snapshot information.
[0058] The instance snapshot module may send all snapshot information, such as the instance snapshot information and the previous instance snapshot information, to the metering module, so that the metering module performs metering and billing based on each instance snapshot information.
[0059] The cloud computing resource metering solution provided by the embodiment of the present disclosure receives instance update information, determines the snapshot start time based on the change type, instance information and order information, generates a snapshot identifier based on the instance information, obtains instance configuration information based on the commodity identifier in the commodity information, integrates the default snapshot end time, snapshot start time, snapshot identifier and instance configuration information to obtain instance snapshot information, modifies the default snapshot end time in the previous instance snapshot information to the snapshot start time in the instance snapshot information, and sends the instance snapshot information and the previous instance snapshot information to the metering module, so that the metering module performs metering of cloud computing resources based on the instance snapshot information and the previous instance snapshot information. By adopting the above technical solution, instance snapshot information can be generated according to the instance update information when the instance state changes, and then the cloud computing resources can be metered according to the instance snapshot information, decoupling the order function and metering function of the cloud computing resources, which can reduce the business complexity of metering, improve metering efficiency, and solve the problem of inaccurate bills caused by metering methods.
[0060] Figure 3 A structural schematic diagram of a cloud computing resource metering system provided in an embodiment of the present disclosure, the cloud computing resource metering system may include an instance snapshot module 10, an instance module 20 and a metering module 30, the instance snapshot module 10 is communicatively connected with the instance module 20 and the metering module 30, and is used to execute the cloud computing resource metering method provided in an embodiment of the present disclosure, specifically, it may receive instance update information sent by the instance module 20 when the instance state changes, generate instance snapshot information based on the instance update information, and send the instance snapshot information to the metering module 30, so that the metering module 30 measures the cloud computing resources based on the instance snapshot information.
[0061] The instance module 20 is used to generate and manage instances, and the metering module 30 is used to implement metering and billing of cloud computing resources. In addition, the cloud computing resource metering system may also include a commodity module 40 and an order module 50. The commodity module 40 is used to manage commodities, and the order module 50 is used to manage orders. Both the commodity module 40 and the order module 50 are in communication with the instance snapshot module 10 and can perform data transmission.
[0062] Based on the above cloud computing resource metering system, the complete process of the cloud computing resource metering method may include:
[0063] 1. When the instance status changes, the instance module sends the instance update information to the instance snapshot module.
[0064] 2. After receiving the instance update information, the instance snapshot module performs the following operations on the instance update information and stores it in the database:
[0065] a) Perform different operations according to the change type, such as obtaining different time information as the snapshot start time of the snapshot. If there is an order record, obtain the order service start time through the order ID as the snapshot start time of this snapshot record. If there is no order record, use the instance update time as the snapshot start time of this snapshot record;
[0066] b) Generate a snapshot ID for this snapshot based on the instance ID, instance update time, and instance data version, and use the snapshot ID as the unique key for data storage;
[0067] c) Obtain instance configuration information of the commodity module through the commodity module interface according to the commodity ID;
[0068] d) storing the processed instance snapshot information in a database. Each record of instance snapshot information in the database includes but is not limited to key fields such as snapshot ID, snapshot start time, default snapshot end time, instance information, and instance configuration information. Specifically, the instance snapshot information is stored in the database using the snapshot ID as the key and other information in the processed instance snapshot information of each system as the value.
[0069] e) Modify the snapshot end time of the previous instance snapshot information of the instance snapshot information, that is, modify it to the snapshot start time of the current instance snapshot information.
[0070] 3. The metering module can directly obtain the instance snapshot information in the instance snapshot module according to the billing period to measure and bill cloud computing resources without having to worry about the business logic related to the order system.
[0071] The cloud computing resource metering system provided by the embodiment of the present disclosure adds an instance snapshot module. When the instance state changes, a corresponding snapshot record is generated. That is, the configuration information, instance information and the time point of the event at that time of the instance are processed and stored continuously in time, so that the subsequent metering module can obtain the records related to the current billing account period from the instance snapshot module according to the account period for metering and billing, without having to care about the business logic related to the order system, thereby reducing the business complexity of metering and billing, and being able to solve the problem of inaccurate bills caused by the metering method.
[0072] Figure 4 This is a schematic diagram of the structure of a cloud computing resource metering device provided by an embodiment of the present disclosure. The device can be implemented by software and / or hardware and can generally be integrated into an electronic device. Figure 4 As shown, the device comprises:
[0073] An instance update information receiving module 301 is used to receive instance update information, wherein the instance update information is information sent by the instance module when the instance state changes;
[0074] An instance snapshot generating module 302, configured to generate instance snapshot information based on the instance update information;
[0075] The cloud computing resource metering module 303 is used to send the instance snapshot information to the metering module, so that the metering module measures the cloud computing resources based on the instance snapshot information.
[0076] The cloud computing resource metering solution provided by the embodiment of the present disclosure receives instance update information, wherein the instance update information is information sent by the instance module when the instance state changes, generates instance snapshot information based on the instance update information, and sends the instance snapshot information to the metering module, so that the metering module measures the cloud computing resources based on the instance snapshot information. By adopting the above technical solution, instance snapshot information can be generated according to the instance update information when the instance state changes, and then the cloud computing resources can be metered according to the instance snapshot information, decoupling the order function and metering function of the cloud computing resources, which can reduce the business complexity of metering, improve metering efficiency, and solve the problem of inaccurate bills caused by the metering method.
[0077] Optionally, the instance update information includes at least one of a change type, instance information, order information, product information, and a metering and billing method.
[0078] Optionally, the instance snapshot generating module 302 is specifically used for:
[0079] Determine a snapshot start time based on the change type, the instance information, and the order information;
[0080] generating a snapshot identifier based on the instance information;
[0081] Acquire instance configuration information based on the product identifier in the product information;
[0082] The default snapshot end time, the snapshot start time, the snapshot identifier and the instance configuration information are integrated to obtain instance snapshot information.
[0083] Optionally, the instance snapshot generating module 302 is specifically used for:
[0084] If the change type is a non-billing update type, the snapshot start time is the instance update time in the instance information; otherwise, the snapshot start time is the order service start time in the order information.
[0085] Optionally, the instance information includes an instance identifier, an instance update time, and an instance data version, and the snapshot identifier corresponds one-to-one to the instance snapshot information.
[0086] Optionally, the device further includes an end time modification module, which is specifically configured to: after generating the instance snapshot information based on the instance update information,
[0087] The default snapshot end time in the previous instance snapshot information is modified to the snapshot start time in the instance snapshot information.
[0088] The cloud computing resource metering device provided in the embodiments of the present disclosure can execute the cloud computing resource metering method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0089] Figure 5 The structure diagram of an electronic device provided by the embodiment of the present disclosure is shown in FIG. Figure 5 As shown, the electronic device 400 includes one or more processors 401 and a memory 402 .
[0090] The processor 401 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 400 to perform desired functions.
[0091] The memory 402 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 401 may run the program instructions to implement the cloud computing resource metering method of the embodiment of the present disclosure described above and / or other desired functions. Various contents such as input signals, signal components, noise components, etc. may also be stored in the computer-readable storage medium.
[0092] In one example, the electronic device 400 may further include: an input device 403 and an output device 404, and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0093] In addition, the input device 403 may also include, for example, a keyboard, a mouse, and the like.
[0094] The output device 404 can output various information to the outside, including the determined distance information, direction information, etc. The output device 404 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.
[0095] Of course, to simplify, Figure 5 Only some of the components related to the present disclosure in the electronic device 400 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 400 may also include any other appropriate components.
[0096] In addition to the above-mentioned method and device, the embodiments of the present disclosure may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the cloud computing resource metering method provided by the embodiments of the present disclosure.
[0097] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0098] In addition, the embodiments of the present disclosure may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the cloud computing resource metering method provided by the embodiments of the present disclosure.
[0099] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0100] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0101] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A cloud computing resource measurement method, It is characterized in that include: Receive instance update information, wherein the instance update information is information sent by the instance module when the instance state changes, and the instance update information includes at least one of the change type, instance information, order information, product information, and metering and billing method; Generate instance snapshot information based on the instance update information; Sending the instance snapshot information to a metering module so that the metering module performs metering of cloud computing resources based on the instance snapshot information; The generating instance snapshot information based on the instance update information includes: Determine a snapshot start time based on the change type, the instance information, and the order information; generating a snapshot identifier based on the instance information; Acquire instance configuration information based on the product identifier in the product information; Integrate the default snapshot end time, the snapshot start time, the snapshot identifier and the instance configuration information to obtain instance snapshot information; The determining the snapshot start time based on the change type, the instance information, and the order information includes: If the change type is a non-billing update type, the snapshot start time is the instance update time in the instance information; otherwise, the snapshot start time is the order service start time in the order information.
2. The method according to claim 1, It is characterized in that The instance information includes an instance identifier, an instance update time, and an instance data version, and the snapshot identifier corresponds to the instance snapshot information in a one-to-one manner.
3. The method according to claim 1, It is characterized in that After the instance snapshot information is generated based on the instance update information, the method further includes: The default snapshot end time in the previous instance snapshot information is modified to the snapshot start time in the instance snapshot information.
4. A cloud computing resource metering device, It is characterized in that include: An instance update information receiving module, used to receive instance update information, wherein the instance update information is information sent by the instance module when the instance state changes, and the instance update information includes at least one of the change type, instance information, order information, product information, and metering and billing method; An instance snapshot generation module, used to generate instance snapshot information based on the instance update information; A cloud computing resource metering module, configured to send the instance snapshot information to a metering module, so that the metering module performs metering of cloud computing resources based on the instance snapshot information; The instance snapshot generation module is specifically used to determine the snapshot start time based on the change type, the instance information and the order information; generate a snapshot identifier based on the instance information; obtain instance configuration information based on the product identifier in the product information; integrate the default snapshot end time, the snapshot start time, the snapshot identifier and the instance configuration information to obtain the instance snapshot information; The instance snapshot generation module is also specifically configured to, if the change type is a non-billing update type, the snapshot start time is the instance update time in the instance information; otherwise, the snapshot start time is the order service start time in the order information.
5. A cloud computing resource metering system, It is characterized in that It includes an instance snapshot module, an instance module and a metering module. The instance snapshot module is communicated with the instance module and the metering module and is used to execute the cloud computing resource metering method described in any one of claims 1-3.
6. An electronic device, It is characterized in that include: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the cloud computing resource metering method described in any one of claims 1-3 above.
7. A computer-readable storage medium, It is characterized in that The storage medium stores a computer program, and the computer program is used to execute the cloud computing resource metering method described in any one of claims 1-3 above.
Citation Information
Patent Citations
Method and apparatus for snapshot of account data, method for balancing account and real time billing system
CN101350727A
Method and device for determining configuration of cloud resources and electronic equipment
CN108900361A
