Metering data transmission method and system of cloud application, electronic device and storage medium
By using an internal network to transmit metering data between cloud applications and the sales platform and employing a digital signature mechanism, the problem of missed metering data reporting and security risks caused by public network outages has been solved. This simplifies the access process for metering software and ensures the stability and security of data transmission.
Patent Information
- Application Number
- CN202310223093.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-03
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2043-03-03
AI Technical Summary
In the pay-as-you-go model for cloud applications, existing technologies suffer from issues such as missed or incomplete reporting of metering data due to public network outages, as well as security risks such as malicious interception or tampering of metering information. Furthermore, the access process for metering software is cumbersome.
Metering data from cloud applications is transmitted to internal nodes and the sales platform via an internal network. This avoids the impact of public network outages by utilizing the internal network communication between the internal nodes and the sales platform, and ensures the security and accuracy of data transmission through a digital signature mechanism, thereby reducing reliance on metering software.
It effectively avoids the omission and underreporting of metering data caused by public network outages, reduces the security risks of metering data during transmission, simplifies the access process for metering software, and improves the stability and security of data transmission.
Smart Images

Figure CN116318944B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of cloud computing, and particularly relates to a metering data transmission method and system of cloud application, an electronic device and a storage medium. BACKGROUND
[0002] In a scenario where a user uses a cloud application, for a pay-per-use selling mode, how to accurately count the usage and safely report the usage is a core problem of the selling mode. In a traditional mode, access to metering software, metering and reporting data, and matching a pricing model are all completed by a provider of the cloud application, and a selling platform is only responsible for calculating a fee according to resource usage reported by the cloud application and a pricing strategy. In this scenario, the following problems may exist: first, data is transmitted between the cloud application and the selling platform through a public network, and therefore there may be a problem that data cannot be reported due to a public network outage. For example, if a machine where the cloud application is located does not have a public network or is maliciously disconnected, the cloud application will not be able to report data, which results in missing reports and false reports. Second, if metering information is maliciously intercepted and tampered with during the reporting process, the metering information cannot be accurately reported, and there is a security risk. Finally, if a metering software is used, software integration, product registration, creation of an authorized role and other processes may be required for the early access, and the process is cumbersome. SUMMARY
[0003] To solve the above technical problems, the present application provides a metering data transmission method and system of a cloud application, an electronic device and a storage medium.
[0004] In a first aspect, an embodiment of the present application provides a metering data transmission method of a cloud application, applied to a predetermined node in a predetermined network, wherein the predetermined network further includes a selling platform, the selling platform, the predetermined node and a cloud application are communicatively connected through the predetermined network, and the metering data transmission method includes: receiving first metering data reported by the cloud application, the first metering data being cloud application layer metering data; reporting the first metering data to the selling platform; receiving first response information returned by the selling platform; and sending the first response information to the cloud application.
[0005] In a second aspect, the embodiments of the present application provide a metering data transmission system of a cloud application, which is deployed in a predetermined node in a predetermined network, and the predetermined network further comprises a selling platform, wherein the selling platform, the predetermined node and the cloud application are communicatively connected through the predetermined network, and the metering data transmission system comprises a processor and a memory connected with the processor, and the memory is configured to provide the processor with instructions for processing the following steps: receiving first metering data reported by the cloud application, wherein the first metering data is metering data at the cloud application level; reporting the first metering data to the selling platform; receiving first response information returned by the selling platform; and sending the first response information to the cloud application.
[0006] In a third aspect, the embodiments of the present application provide an electronic device, which comprises a memory, a processor and a computer program stored in the memory, and the processor implements the method of the first aspect when executing the computer program.
[0007] In a fourth aspect, the embodiments of the present application provide a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the method of the first aspect.
[0008] Compared with the prior art, the present application has the following advantages: on the one hand, the cloud application can report the metering data to the internal node and the selling platform through the internal network, which can effectively avoid the problems of missing report and incomplete report caused by public network disconnection when the cloud application reports the metering data using the public network; on the other hand, the communication between the internal node and the selling platform is also through the internal network, which avoids the interference from the outside world, thereby avoiding the malicious interception and tampering of the metering data during the reporting process, and reducing the security risk. Moreover, the metering data transmission method does not need to use metering software, thereby avoiding the cumbersome processes such as software integration, product registration, and creation of authorized roles when using metering software.
[0009] The above description is only a summary of the technical solutions of the present application, in order to more clearly understand the technical means of the present application, the embodiments can be implemented in accordance with the content of the description, and in order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the following specific embodiments of the present application are described. BRIEF DESCRIPTION OF DRAWINGS
[0010] In the drawings, the same reference numbers in the several figures indicate corresponding or similar components or elements. The drawings are not necessarily to scale, and the emphasis is on illustrating the principles of the application. It is to be understood that the drawings only depict certain embodiments of the application and are not to be considered as limiting the scope of the application.
[0011] Figure 1Ais a flowchart of a metering data transmission method according to a first embodiment of the present application;
[0012] Figure 1B is a schematic diagram of a metering data transmission method according to the first embodiment of the present application;
[0013] Figure 2A is a flowchart of a metering data transmission method according to a second embodiment of the present application;
[0014] Figure 2B is a schematic diagram of a metering data transmission method according to the second embodiment of the present application;
[0015] Figure 3A is a flowchart of a metering data transmission method of a cloud application according to a third embodiment of the present application;
[0016] Figure 3B is a schematic diagram of a metering data transmission method of a cloud application according to the third embodiment of the present application;
[0017] Figure 4A is a flowchart of a metering data transmission method of a cloud application according to a fourth embodiment of the present application;
[0018] Figure 4B is a schematic diagram of a metering data transmission method of a cloud application according to the fourth embodiment of the present application;
[0019] Figure 5A is a flowchart of a metering data transmission method of a cloud application according to a fifth embodiment of the present application;
[0020] Figure 5B is a schematic diagram of a metering data transmission method of a cloud application according to the fifth embodiment of the present application;
[0021] Figure 5C is a diagram showing a specification of a cloud resource according to an embodiment of the present application; and
[0022] Figure 6 is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0023] In the following, only certain exemplary embodiments are simply described. As those skilled in the art will recognize, the described embodiments can be modified in various different ways without departing from the idea or scope of the present application. The drawings and the description are therefore to be considered as being exemplary in nature, rather than limiting.
[0024] For the convenience of understanding the technical solutions of the embodiments of the present application, the related technologies of the embodiments of the present application are described below. The following related technologies can be combined with the technical solutions of the embodiments of the present application in any manner, and all of them belong to the protection scope of the embodiments of the present application.
[0025] The present application provides a metering data transmission method of a cloud application, applied to a predetermined node in a predetermined network, wherein the predetermined network further comprises a selling platform, and the selling platform, the predetermined node and the cloud application are communicatively connected through the predetermined network.
[0026] The cloud application refers to application software on a cloud server, such as relational database software, graph database software, ERP (Enterprise Resource Planning) software and other enterprise-level software running on a cloud server. Those skilled in the art can select the cloud application according to the specific application scenario and in combination with the technical principles of the present application.
[0027] The selling platform may, for example, be a pay-per-use cloud service platform, which can provide services including computing, storage, database, analysis, artificial intelligence, security, etc. For example, the selling platform is a platform of cloud computing vendor A. On the platform of cloud computing vendor A, users can pay according to the actual use, such as hourly billing, pay-per-use billing, etc. The selling platform can also provide various tools and services to help users manage and optimize resource usage, such as metering and monitoring tools, etc. The selling platform can also provide security functions such as encryption, identity access management, etc.
[0028] The predetermined network may, for example, be an internally deployed network in an enterprise, also known as an “internal network”, used to connect various computers and servers within the enterprise. The internal network comprises a selling platform and an internal node (which will be described below). In the internal network, the selling platform, the internal node and the cloud application are communicatively connected through the predetermined network. For example, various computers and servers may, for example, access each other through a VPN connection. The cloud application can also be connected to the internal node through such an internal network and report resource usage information (such as metering data, which will be described below) through the internal network, which can not only ensure the security and privacy of the data, but also avoid the problems of network delay and network jitter that may occur when using external networks by cloud service providers. In addition, the internal node can also obtain some key information of the cloud application from the internal network, such as resource usage, billing information, etc., which can be reported to the selling platform as metering data. The design of such an internal network can improve the data security and privacy of the enterprise, and also can more accurately report the usage of the cloud application.
[0029] The predetermined node can be, for example, an internal node in the internal network. The internal node can communicate with the cloud application and the selling platform through the internal network. For example, the internal node can receive metering data reported by the cloud application through the internal network, and report the metering data to the selling platform through the internal network.
[0030] The internal node can be, for example, a cloud host internal node. In a cloud host, the internal node can be deployed inside a virtual machine, for example, to assist the virtual machine in completing metering and usage reporting. The internal node can also obtain CPU, memory, disk, and other usage information of the virtual machine, and convert the information into a standard metering data format for reporting.
[0031] The internal node can be, for example, a container internal node. For example, the internal node can be deployed inside a container to assist the container in completing metering and usage reporting. The internal node can obtain CPU, memory, network traffic, and other usage information of the container, and convert the information into a standard metering data format for reporting.
[0032] The internal node can be, for example, a database internal node. In a cloud database, the internal node can be deployed inside a database instance to assist the database in completing metering and usage reporting. The internal node can obtain CPU, memory, disk, network traffic, and other usage information of the database, and convert the information into a standard metering data format for reporting.
[0033] The internal node is described above for illustrative purposes. However, the internal node described in the present application is not limited to the illustrative description above. The specific implementation of the internal node can vary depending on the type of cloud application, the selling mode, the internal network, and the like, but these internal nodes can all complete the transmission of metering data and information feedback between the cloud application and the selling platform. Those skilled in the art can select the internal node according to the actual situation, as long as the technical principles of the present application can be realized.
[0034] In the following, a database software will be taken as an example of a cloud application, a platform of cloud computing vendor A will be taken as an example of a selling platform, and a database software running on a cloud server of cloud computing vendor A used by a user will be taken as an example of an application scenario.
[0035] The metering data transmission method of the cloud application provided by the present application will be described below. Figure 1A and Figure 1B The metering data transmission method of the cloud application provided by the present application will be described below. Figure 1A is a flowchart of the metering data transmission method 100 according to the first embodiment of the present application. Figure 1Bis a schematic diagram of a metering data transmission method 100 according to a first embodiment of the present application.
[0036] As shown in Figure 1A The metering data transmission method 100 can include the following steps S101-S104. In step S101, first metering data reported by a cloud application is received, the first metering data being metering data at the cloud application level. In step S102, the first metering data is reported to a sales platform. In step S103, first response information returned by the sales platform is received. In step S104, the first response information is sent to the cloud application.
[0037] The steps S101-S104 will be described in detail below in conjunction with specific embodiments.
[0038] In step S101, the first metering data reported by the cloud application is received, the first metering data being metering data at the cloud application level.
[0039] The first metering data can be, for example, metering data generated when a user uses a cloud application, which can be used to calculate the fee to be paid by the user for using the cloud application. In an embodiment, the first metering data can represent the length of time the user uses the cloud application. In an embodiment, the first metering data can represent how much traffic is consumed during the user's use of the cloud application. In an embodiment, the first metering data can represent the size of the storage space used during the user's use of the cloud application. In an embodiment, the first metering data can represent at least two of the following: the length of time the user uses the cloud application, how much traffic is consumed during the user's use of the cloud application, and the size of the storage space used during the user's use of the cloud application. It will be understood by those skilled in the art that the above examples of the first metering data are for illustrative purposes only and are not intended to limit the content of the first metering data, and those skilled in the art can selectively set the first metering data as described in the present application according to actual needs, as long as the technical principles of the present application can be achieved.
[0040] It should be noted that in the scenario of the cloud application of the present application, both the metering data at the level of the cloud application and the metering data at the level of the cloud resource can be involved. As described above, the metering data at the level of the cloud application refers to the metering data generated based on the traffic consumed by the user or the cloud application and / or the time length used and / or the storage space used, etc. during the use of the cloud application, which reflects the dynamic data related to the use of the cloud application. In an embodiment, the metering data at the level of the cloud resource can be, for example, the cloud resource data purchased by the cloud application provider (for example, the database software provider) from the cloud service provider (for example, the cloud computing vendor A) (for example, the database software provider purchases 100G of cloud server resources from the cloud computing vendor A). In another embodiment, the metering data at the level of the cloud resource can be, for example, the cloud resource data purchased by the user (for example, the user of the database software) from the cloud service provider (for example, the cloud computing vendor A) (for example, the user of the database software purchases 100G of cloud server resources from the cloud computing vendor A). The cloud resource data is static, but can also change (also known as "variable allocation" in the art) with the difference in the frequency, time length, etc. of the use of the user.
[0041] The cloud application can report the first metering data to the internal node through an internal network (for example, the "internal channel" shown in Figure 1B The internal network has been described above and will not be described here again.
[0042] Next, step S102 is entered. In step S102, the first metering data is reported to the sales platform.
[0043] The internal node can report the first metering data to the sales platform through the internal network. For example, the internal node can report the time length data of the use of the database software by the user as the first metering data to the sales platform of the cloud computing vendor A through the internal network of the cloud computing vendor A. The internal node, the internal network, and how the internal node communicates with the cloud application have been described above and will not be described here again.
[0044] Next, step S103 is entered. In step S103, the first response information returned by the sales platform is received.
[0045] In an embodiment, the first response information can be a response information of the selling platform to the reporting operation of the internal node. In other words, after the selling platform receives the first metering data reported by the internal node, the selling platform can send a response information to the internal node to inform the internal node whether the first metering data reported by the internal node has been correctly received by the selling platform. If the first metering data has been correctly received by the selling platform, the first response information is a positive response; otherwise, if the first metering data has not been correctly received by the selling platform, the first response information is a negative response.
[0046] In an embodiment, the first response information can be whether the first metering data is successfully received by the selling platform. After the selling platform receives the first metering data reported by the internal node, the selling platform can calculate the fee information (i.e., billing information) required to be paid by the user for using the cloud application according to the first metering data. For example, taking the user using the database software (i.e., cloud application) on the cloud server of the cloud computing company A as an example, the first response information returned by the platform (i.e., selling platform) of the cloud computing company A can include the information of success (true) or failure (false).
[0047] The above description of the first response information is only exemplary and does not limit the first response information described in the present application. For example, the first response information can include the above-mentioned response information and other response information. Those skilled in the art can select the content of the first response information according to the embodiment description of the present application, as long as the technical principles of the present application can be implemented.
[0048] Next, step S104 is entered. In step S104, the first response information is sent to the cloud application.
[0049] The internal node can send the first response information from the selling platform to the cloud application. For example, the internal node can send the response information from the platform of the cloud computing company A to the database software through the internal network, so that the database software knows whether the metering data reported by itself is successful.
[0050] It can be known from the metering data transmission method 100 described above in combination with the specific embodiments that, on the one hand, the cloud application can report the metering data to the internal node and the selling platform through the internal network, which can effectively avoid the problems of missing report and incomplete report caused by public network disconnection when the cloud application uses the public network to report the metering data; on the other hand, the communication between the internal node and the selling platform is also carried out through the internal network, which avoids the interference from the outside world, thereby avoiding the malicious interception and tampering of the metering data in the reporting process and reducing the security risk. Moreover, the metering data transmission method 100 does not need to use metering software, thereby avoiding the cumbersome processes such as software integration, registration of products, creation of authorized roles and the like when using the metering software.
[0051] The second embodiment of the metering data transmission method of the present application will be described below. Figures 2A-2B The second embodiment of the metering data transmission method of the present application will be described below. Figure 2A is a flow chart of the metering data transmission method 200 according to the second embodiment of the present application. Figure 2B is a schematic diagram of the metering data transmission method 200 according to the second embodiment of the present application. As shown in Figures 2A-2B , the metering data transmission method 200 comprises the following steps S201-S205: in step S201, receiving the first metering data reported by the cloud application, the first metering data being the metering data at the cloud application level; in step S202, reporting the first metering data to the selling platform; in step S203, receiving the first response information returned by the selling platform; in step S204, adding digital signature or authentication information in the first response information, the digital signature or the authentication information being used to ensure the authenticity of the first response information; in step S205, sending the first response information to the cloud application.
[0052] It should be noted that the step S201, the step S202, the step S203 and the step S205 are the same as or similar to the step S101, the step S102, the step S103 and the step S104 described above with reference to the first embodiment of the metering data transmission method 100. In order to simplify the description, the description of the step S201, the step S202, the step S203 and the step S205 is omitted here. Those skilled in the art can understand these omitted steps in combination with the technical principles of the metering data transmission method 100 of the first embodiment described above. The step S204 in the metering data transmission method 200 will be described in detail below. Figure 1A In step S204, digital signature or authentication information is added in the first response information, the digital signature or the authentication information being used to ensure the authenticity of the first response information.
[0053]
[0054] A digital signature is a method of signing information in electronic form, such as the first response information. In an embodiment, a digital signature can be implemented by generating signature data based on the content of a data unit of the first response information and adding the signature data to the first response information, or by encrypting the data unit in the first response information. The additional data or the encryption can enable a receiver (e.g., a cloud application) to confirm the origin of the first response information and the integrity of the data unit of the first response information, and to provide protection for the data unit against tampering. A digital signature can be implemented by a public-key cryptography mechanism or a private-key cryptography mechanism. In an embodiment, a digital signature algorithm such as RSA algorithm, Fiat-Shamir algorithm, Elliptic Curve Digital Signature Algorithm, Finite Automata Digital Signature Algorithm, or the like can be used to digitally sign the first response information.
[0055] In another embodiment, authentication information can be added to the first response information. For example, a cloud application can issue an access token to an internal node in advance. Based on this, the internal node can add the access token to the first response information sent to the cloud application to prove its true identity, avoiding a false internal node from sending a false first response information to the cloud application.
[0056] Those skilled in the art can understand that the above description of the digital signature and the authentication information is only exemplary, and the examples are not intended to limit the digital signature and the authentication information described in the present application. Those skilled in the art can select the digital signature and the authentication information according to the actual application scenario, as long as the technical principles of the present application can be implemented.
[0057] After the cloud application receives the first response information, the cloud application can parse the first response information to obtain the digital signature. Since the digital signature is generated based on the data unit of the first response information, the digital signature corresponds to the data unit, and thus the cloud application can compare the parsed digital signature with the data unit of the first response information to determine whether the first response information is tampered with. If the digital signature matches the data unit of the first response information, the cloud application can determine that the first response information is not tampered with. If the digital signature does not match the data unit of the first response information, the cloud application can determine that there is a possibility that the first response information is tampered with, in which case the cloud application can request the internal node to resend the first response information. The above description of the tampering of the first response information and the request of the cloud application to the internal node to resend the first response information is only exemplary, and those skilled in the art can select the processing manner of the cloud application according to the actual application scenario, as long as the technical principles of the present application can be implemented.
[0058] From the metering data transmission method 200 described above in combination with the specific embodiments, it can be known that the communication between the internal node and the cloud application can be improved in security through the digital signature mechanism. As described above, the first response information can include the reply information and the billing information from the selling platform, and therefore the digital signature mechanism can effectively verify whether the reply information and the billing information are tampered. If the reply information or the billing information is tampered, the cloud application can request the internal node to resend the first response information, thereby improving the accuracy and security of the information transmission between the cloud application and the internal node.
[0059] In the prior art, there is also the following disadvantage: if the cloud application fails to report the metering information, resulting in a failure of a certain report, the cloud application needs to re-initiate the reporting process, and this part of the code logic needs to be integrated by the cloud application, thereby increasing the burden of the cloud application.
[0060] The third embodiment of the present application will be described below in combination with Figures 3A-3B The metering data transmission method of the third embodiment of the present application will be described below. Figure 3A FIG. 3 is a flowchart of a metering data transmission method 300 of a cloud application according to the third embodiment of the present application. Figure 3B FIG. 3 is a flowchart of a metering data transmission method 300 of a cloud application according to the third embodiment of the present application. Figure 3A As shown in FIG. 3, the metering data transmission method 300 can include the following steps S301-S305: in step S301, receiving first metering data reported by the cloud application, the first metering data being metering data at the cloud application level; in step S302, reporting the first metering data to the selling platform; in step S303, receiving first response information returned by the selling platform; in step S304, judging whether a predetermined value in the first response information is erroneous, wherein if the predetermined value in the first response information is not erroneous, proceeding to step S305, sending the first response information to the cloud application; and if the predetermined value in the first response information is erroneous, re-executing the reporting operation of the first metering data and the receiving operation of the first response information until the predetermined value in the first response information is not erroneous.
[0061] It should be noted that the step S301, the step S302, the step S303 and the step S305 correspond to the step S101, the step S102, the step S103 and the step S104 of the first embodiment described above with reference to the FIG. 1, respectively. For the sake of simplicity, the description of the step S301, the step S302, the step S303 and the step S305 is omitted here. The omitted steps can be understood by those skilled in the art in combination with the technical principles of the metering data transmission method 100 of the first embodiment described above. The step S304 of the metering data transmission method 300 will be described in detail below.
[0062] In the step S304, it is determined whether the predetermined value in the first response information is erroneous.
[0063] In an embodiment, the predetermined value in the first response information can be a predetermined field (e.g. true or false) in the response information of the selling platform. The predetermined field can indicate whether the first metering data reported by the internal node has been correctly received by the selling platform. For example, true indicates that the first metering data has been correctly received by the selling platform; false indicates that the first metering data has not been correctly received by the selling platform. If the predetermined value is true, the metering data transmission method 300 proceeds to the step S305; if the predetermined value is false, the internal node repeats the step S302, the step S303 and the step S304, in other words, the internal node reports the first metering data to the selling platform again, and the selling platform provides the first response information to the internal node again, and the internal node determines again whether the predetermined value in the first response information is true. The step S302, the step S303 and the step S304 can be repeated until the internal node determines that the predetermined value in the first response information is true (i.e. the first response information has been correctly received by the selling platform). The above-mentioned retry mechanism performed by the internal node is applied to the following scenarios: network jitter, network delay, network timeout in the reporting process or errors caused by the selling platform itself. If the error is caused by the cloud application itself, the above-mentioned retry mechanism is not applicable.
[0064] In an embodiment, the predetermined value in the first response information can be a predetermined field in the charging information provided by the selling platform. The predetermined field may, for example, represent a charging type. The charging type has a corresponding relationship with the metering data (e.g., the first metering data described above). For example, if the metering data is the length of time used by the user, the charging type is in units of time length; if the metering data is the traffic consumed by the user, the charging type is in units of traffic size. After receiving the first response information sent by the selling platform, the internal node can parse the first response information, thereby obtaining the predetermined field of the charging information in the first response information, and comparing the charging type represented by the predetermined field with the first metering data uploaded by the internal node previously, thereby judging whether the charging type corresponds to the first metering data. If the charging type corresponds to the first metering data, the predetermined value in the first response information is correct, and the metering data transmission method 300 continues to step S305; if the charging type does not correspond to the first metering data, the internal node repeats steps S302, S303 and S304, in other words, the internal node reports the first metering data to the selling platform again, and the selling platform provides the internal node with the first response information again, and the internal node judges again whether the predetermined value in the first response information is correct. Steps S302, S303 and S304 can be repeated until the internal node judges that the predetermined value in the first response information is correct.
[0065] As can be seen from the metering data transmission method 300 described above in combination with the specific embodiments, the internal node has a retry mechanism. If the metering data (e.g., the first metering data) has an error in the reporting process, causing the selling platform to not correctly receive the metering data, the internal node can continue to retry until the selling platform correctly receives the metering data, without the need for the cloud application to perform a re-reporting operation. In this way, the stability of reporting the metering data can be improved, and the computational overhead of the cloud application is reduced.
[0066] The prior art also has the following disadvantages: it is difficult for the cloud application to obtain the usage information of the cloud resource layer (such as the number of virtual CPUs, the total amount of storage, etc.), and it can even be impossible to obtain the usage information.
[0067] The metering data transmission method according to the fourth embodiment of the present application will be described below in combination with Figures 4A-4B The metering data transmission method according to the fourth embodiment of the present application will be described below in combination with Figure 4A is a flowchart of the metering data transmission method 400 of the cloud application according to the fourth embodiment of the present application. Figure 4B is a schematic diagram of the metering data transmission method 400 of the cloud application according to the fourth embodiment of the present application. As can be seen from Figure 4AAs shown, the metering data transmission method 400 can include steps S401 to S405: in step S401, receiving first metering data reported by the cloud application, the first metering data being metering data at the cloud application level; in step S402, receiving a request for second metering data from the cloud application, the second metering data being metering data at the cloud resource level; in step S403, reporting the first metering data to the sales platform; in step S404, receiving a first response information returned by the sales platform; and in step S405, sending the first response information and the second metering data to the cloud application, respectively.
[0068] It should be noted that the first response information sending operations in steps S401, S403, S404 and S405 respectively correspond to steps S101, S102, S103 and S104 in the first embodiment described above with reference to FIG. 1, respectively. For the sake of simplicity, the description of the first response information sending operations in steps S401, S403, S404 and S405 is omitted here. Those omitted steps can be understood by those skilled in the art in combination with the technical principles of the metering data transmission method 100 of the first embodiment described above. The step S402 in the metering data transmission method 400 and the second metering data sending operation in step S405 will be described in detail below.
[0069] In step S402, a request for second metering data from the cloud application is received, the second metering data being metering data at the cloud resource level.
[0070] The second metering data may, for example, be metering data at the cloud resource level. The metering data at the cloud resource level has been described above and will not be described again here. In the scenario of a cloud application, the cloud application can not be able to know the size of the cloud resources purchased by the cloud application provider, and therefore the cloud application can request the internal node to inform it of the size of the cloud resources. For example, the cloud application can send a request to the internal node, so as to request the internal node to send the cloud application metering data at the cloud resource level. The internal node can know the size of the cloud resources purchased by the cloud application provider through the internal network, and provide the cloud application with metering data at the cloud resource level.
[0071] Those skilled in the art should understand that the above description of the second metering data is only exemplary and is not intended to limit the second metering data described in the present application. Those skilled in the art can select the second metering data according to actual needs, as long as the technical principles of the present application can be implemented. The request for the second metering data can be sent through the internal network.
[0072] In step S405, the first response information and the second metering data are respectively sent to the cloud application.
[0073] As described above, the second metering data can be metering data at the level of cloud resources. The second metering data can be sent to the cloud application through the internal network. The sending mode of the second metering data is the same as or similar to the first response information described above. For example, the internal node can add a digital signature in the second metering data, and the cloud application can verify the second metering data through the digital signature to determine whether the second metering data is tampered.
[0074] As can be seen from the metering data transmission method 400 described above in combination with the specific embodiments, the cloud application can obtain metering data at the level of cloud resources through the internal node, thereby overcoming the problem that the cloud application cannot obtain cloud resource usage information.
[0075] In an embodiment, after receiving the request for the second metering data, the metering data transmission method further includes: reporting the second metering data to the selling platform; and receiving second response information returned by the selling platform. The reporting mode of the second metering data is the same as or similar to the reporting mode of the first metering data described above, which will not be described here.
[0076] In an embodiment, the second response information can be response information of the selling platform to the reporting operation of the second metering data. In another embodiment, the second response information can be charging information determined by the selling platform according to the second metering data. The embodiments of the response information and the charging information can refer to the descriptions of the response information and the charging information in the embodiments of the first embodiment of the cloud application and the second embodiment of the cloud application described above, which will not be described here. Figure 1A
[0077] The prior art also has the following disadvantages: different pricing standards can exist for different cloud resource specifications for the cloud application, however, since the cloud application and the selling platform usually do not belong to the same provider, the cloud application usually cannot obtain specific selling information of the selling platform, in which case, the cloud application usually needs to record multiple charging models in advance, and if the charging model is modified due to business changes, the code needs to be modified in the cloud application, resulting in poor flexibility of the cloud application.
[0078] The following will be described in combination with Figures 5A-5B The metering data transmission method of the fifth embodiment of the present application is exemplarily described. Figure 5A is a flowchart of the metering data transmission method 500 of the cloud application according to the fifth embodiment of the present application. Figure 5B is a schematic diagram of the metering data transmission method 500 of the cloud application according to the fifth embodiment of the present application. As Figure 5A As shown, the metering data transmission method 500 can include steps S501-S506: in step S501, receiving first metering data reported by the cloud application, the first metering data being metering data at the cloud application level; in step S502, determining a selling specification and a metering dimension at the application level of the cloud application according to the first metering data; in step S503, determining a pricing mapping item at the application level of the cloud application according to the determined selling specification and metering dimension at the application level; in step S504, reporting the determined pricing mapping item at the application level and the first metering data to the selling platform, respectively; in step S505, receiving first response information returned by the selling platform; and in step S506, sending the first response information to the cloud application.
[0079] It should be noted that the metering data transmission method 500 is different from the metering data transmission method 100 described above with reference to Figure 1A and Figure 1B the sending operation of the pricing mapping item in steps S502, S503, and S504. The other steps and operations in the metering data transmission method 500 are the same as or similar to the corresponding steps and operations of the metering data transmission method 100, and these same or similar steps and operations are omitted here for simplicity. Those skilled in the art can understand these omitted steps and operations in combination with the technical principles of the metering data transmission method 100 of the first embodiment described above. The sending operation of the pricing mapping item in steps S502, S503, and S504 of the metering data transmission method 500 will be described in detail below.
[0080] In step S502, a selling specification and a metering dimension at the application level of the cloud application are determined according to the first metering data.
[0081] The selling specification can correspond to the metering data at the cloud resource level described above. For example, the selling specification can be the specification of the cloud resource purchased by the cloud application provider (e.g., a database software provider) from the cloud service provider (e.g., a cloud computing vendor A), including the number of CPU cores, the number of servers, the capacity of memory, the size of traffic, etc. Figure 5C is a diagram showing the specification of a cloud resource according to an embodiment of the present application. As shown in Figure 5C the specification of the cloud resource includes the number of database servers, which is Figure 5C In the example shown in
[0082] The metering dimension can correspond to the metering data at the cloud application level described above. The metering dimension can be at least one of a time dimension, a bandwidth dimension, and a traffic dimension. The metering dimension can also include a storage dimension, a number of virtual CPU cores, a number of virtual memories, a number of daily active (DAU) users, a number of users, and the like. For example, the time dimension can correspond to "usage duration", i.e., a length of time that a user uses a cloud application (e.g., a length of time that a user uses a database software); the traffic dimension can be "consumed traffic", corresponding to a size of traffic consumed by a user during use of a cloud application (e.g., a size of traffic consumed by a user during use of a database software). Those skilled in the art should understand that the above description of the selling specification and the metering dimension is merely exemplary and is not intended to limit the selling specification and the metering dimension described in the present application, and those skilled in the art can selectively set them according to actual conditions, as long as the technical principles of the present application can be implemented.
[0083] According to the above description, there can be multiple specifications of the selling specification, and multiple dimensions of the metering dimension. The selling specification and the metering dimension have a mapping relationship. The mapping relationship can be pre-stored in the internal node in the form of a mapping relationship table. The internal node can also obtain the mapping relationship table from the internal network. Table 1 below shows an example of a mapping relationship table between the selling specification and the metering dimension.
[0084]
[0085] Table 1
[0086] After the internal node receives the first metering data reported by the cloud application, the selling specification and the metering data can be determined according to the first metering data. For example, if the first metering data indicates a length of time that a user uses a cloud application, the internal node can determine that the metering dimension is "time dimension" in Table 1; if the first metering data indicates that the cloud application uses 1 database server, the internal node can determine that the selling specification is "selling specification A (1 database server)".
[0087] In step S503, the application level pricing mapping item of the cloud application is determined according to the determined selling specification and metering dimension at the application level.
[0088] In an embodiment, the internal node can determine the corresponding pricing mapping item from the mapping relationship table according to the selling specification and the metering dimension. For example, taking Table 1 above as an example, if the internal node determines that the selling specification is "selling specification A (1 database server)", and determines that the metering dimension is "time dimension", the internal node can determine that the pricing mapping item is "1 yuan / 1 minute" according to Table 1.
[0089] At step S504, the determined pricing mapping item at the application layer and the first metering data are respectively reported to the selling platform.
[0090] The internal node can report the pricing mapping item and the first metering data to the selling platform respectively, and the selling platform can calculate the price to be paid by the user according to the pricing mapping item and the first metering data. For example, if the pricing mapping item is "1 yuan / 1 minute" and the first metering data is "10 minutes", the price to be paid by the user is "10 yuan".
[0091] The internal node can report the pricing mapping item through the internal network. The reporting process of the pricing mapping item is the same as or similar to the reporting process of the first metering data. For example, if an error occurs in the reporting process of the pricing mapping item, the selling platform can also indicate the internal node to re-upload the pricing mapping item by returning the first response information, and the process is similar to the process shown in steps S302 to S304 in FIG. 3. Figure 3A The steps S302 to S304 in FIG. 3 are not described herein again.
[0092] As can be known from the metering data transmission method 500 described above in combination with the specific embodiments, the internal node can determine the pricing mapping item through the mapping relationship between the selling price and the metering dimension, so that the cloud application does not need to record various charging models in advance. Moreover, if the mapping relationship between the selling price and the metering dimension changes, only the mapping relationship table on the internal node needs to be modified, and the code of the cloud application does not need to be modified, thereby improving the use flexibility of the cloud application.
[0093] The embodiment of the present application also provides a metering data transmission system of a cloud application, which is deployed in a predetermined node in a predetermined network, and the predetermined network further includes a selling platform. The selling platform, the predetermined node and the cloud application are communicatively connected through the predetermined network. The metering data transmission system includes a processor and a memory connected with the processor, and the memory is configured to provide the processor with instructions for processing the following processing steps: receiving first metering data reported by the cloud application, the first metering data being metering data at the cloud application layer; reporting the first metering data to the selling platform; receiving first response information returned by the selling platform; and sending the first response information to the cloud application.
[0094] Corresponding to the application scenario and the method of the method provided by the embodiment of the present application, the embodiment of the present application also provides an electronic device. The electronic device is, for example, the internal node described above. For the use scenario (such as the cloud application, the selling platform, the internal network, etc.) of the electronic device, reference can be made to the embodiments described above, and the description is not repeated here.
[0095] Figure 6 is a structural block diagram of an electronic device 600 according to an embodiment of the present application. As shown in FIG. 6, the electronic device 600 includes a processor 601, a memory 602, a communication interface 603 and a communication bus 604.Figure 6 As shown, the electronic device 600 includes a memory 601, a processor 602, and a communication interface 603. The processor 602 is configured to perform the following operations by means of the communication interface 603: receiving first metering data reported by a cloud application, the first metering data being metering data at a cloud application level; reporting the first metering data to a selling platform; receiving first response information returned by the selling platform; and sending the first response information to the cloud application.
[0096] For specific embodiments of the electronic device 600, reference can be made to the respective embodiments of the above Figures 1A-1B 、 Figures 2A-2B 、 Figures 3A-3B 、 Figures 4A-4B 、 Figures 5A-5B , which will not be repeated here.
[0097] The processor 602 implements the method in the above embodiments when executing the computer program. The number of the memory 601 and the processor 602 can be one or more.
[0098] If the memory 601, the processor 602, and the communication interface 603 are independently implemented, the memory 601, the processor 602, and the communication interface 603 can be connected to each other through a bus and complete communication therebetween. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, Figure 6 only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.
[0099] Optionally, in specific implementation, if the memory 601, the processor 602, and the communication interface 603 are integrated on a chip, the memory 601, the processor 602, and the communication interface 603 can complete communication therebetween through an internal interface.
[0100] The embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement the method provided in the embodiment of the present application.
[0101] The embodiment of the present application further provides a chip, which includes a processor, is used for calling and running instructions stored in a memory from the memory, and makes a communication device installed with the chip execute the method provided in the embodiment of the present application.
[0102] The embodiment of the present application further provides a chip, comprising: an input interface, an output interface, a processor and a memory, the input interface, the output interface, the processor and the memory are connected through internal connection channels, the processor is used for executing the code in the memory, and when the code is executed, the processor is used for executing the method provided by the embodiment of the present application.
[0103] It should be understood that the processor described above can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. It should be noted that the processor can be a processor supporting an advanced RISC machine (ARM) architecture.
[0104] Further, the memory can optionally include a read-only memory and a random access memory. The memory can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memory. The non-volatile memory can include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically EPROM (EEPROM), or a flash memory, among others. The volatile memory can include a random access memory (RAM), which is used as an external cache. By way of example, and not limitation, many forms of RAM are available. For example, a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate SDRAM (DDR SDRAM), an enhanced SDRAM (ESDRAM), a Sync link DRAM (SLDRAM), and a direct Rambus RAM (DR RAM), among others.
[0105] In the above-described embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the present disclosure are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable apparatus. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium.
[0106] In the description of the application, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the application. Moreover, the specific features, structures, materials or characteristics described can be combined in any suitable manner in one or more embodiments or examples. In addition, different embodiments or examples described in the specification and characteristics of different embodiments or examples can be combined and combined by those skilled in the art without contradiction.
[0107] In addition, the terms "first", "second" are only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In the description of the application, the meaning of "multiple" is two or more, unless otherwise specifically limited.
[0108] Any process or method described in the flowchart or otherwise described herein can be understood as representing a module, a segment or a portion of code including one or more executable instructions for implementing specific logical functions or processes. And the scope of the preferred embodiments of the application includes additional implementations, in which the functions can be performed in the order shown or discussed, including in a substantially simultaneous manner or in reverse order according to the functions involved.
[0109] The logic and / or steps described in the flowchart or otherwise described herein, for example, can be considered as a list of executable instructions for implementing logical functions, which can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus, such as a computer-based system, a system including a processor or other system that can fetch and execute instructions from the instruction execution system, device or apparatus, or in conjunction with these instructions execution system, device or apparatus.
[0110] It should be understood that parts of the application can be implemented in hardware, software, firmware or a combination thereof. In the above embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the above-described embodiment method can be instructed by the relevant hardware through a program, which can be stored in a computer-readable storage medium, and the program includes one or a combination of the steps of the method embodiment when executed.
[0111] In addition, each of the function units in each embodiment of the present application can be integrated in one processing module, or each unit can be physically present separately, or two or more units can be integrated in one module. The integrated module can be realized in the form of hardware or in the form of a software function module. When the integrated module is realized in the form of a software function module and sold or used as an independent product, it can also be stored in a computer readable storage medium. The storage medium can be a read-only memory, a magnetic disk or an optical disk, etc.
[0112] The above is only exemplary embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of various changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A metering data transmission method of a cloud application, applied to a predetermined node in a predetermined network, the predetermined network further comprising a selling platform, wherein, The selling platform, the predetermined node, and the cloud application are connected through the predetermined network communication; the predetermined node is pre-configured with a pricing mapping table, the pricing mapping table includes a plurality of pricing mapping items, each of the plurality of pricing mapping items corresponds to a mapping relationship between a selling specification and a measurement dimension of the cloud application, and the measurement data transmission method includes: receiving first measurement data reported by the cloud application, the first measurement data being cloud application level measurement data; reporting the first measurement data to the selling platform; receiving first response information returned by the selling platform; and sending the first response information to the cloud application; wherein, after receiving the first measurement data reported by the cloud application, the measurement data transmission method further includes: determining a selling specification and a measurement dimension of the cloud application at an application level according to the first measurement data; determining a pricing mapping item of the cloud application at the application level according to the determined selling specification and the measurement dimension at the application level; and reporting the determined pricing mapping item at the application level to the selling platform.
2. The metering data transmission method of claim 1, wherein, Before sending the first response information to the cloud application, the measurement data transmission method further includes: adding a digital signature or authentication information in the first response information, the digital signature or the authentication information being used to ensure the authenticity of the first response information.
3. The metering data transmission method of claim 1, wherein, After receiving the first response information returned by the selling platform and before sending the first response information to the cloud application, the measurement data transmission method further includes: judging whether a predetermined value in the first response information is incorrect, wherein, if the predetermined value in the first response information is not incorrect, sending the first response information to the cloud application; and if the predetermined value in the first response information is incorrect, re-executing the reporting operation of the first measurement data and the receiving operation of the first response information until the predetermined value in the first response information is not incorrect.
4. The measurement data transmission method of claim 1, further comprising: receiving a request for second measurement data from the cloud application, the second measurement data being cloud resource level measurement data; and returning the second measurement data to the cloud application.
5. The measurement data transmission method of claim 4, after receiving the request for the second measurement data, the measurement data transmission method further includes: reporting the second measurement data to the selling platform; receiving second response information returned by the selling platform. After receiving the first measurement data reported by the cloud application, the measurement data transmission method further includes:
6. The metering data transmission method of claim 1, wherein, determining a selling specification and a measurement dimension of the cloud application at a resource level according to the second measurement data; determining a pricing mapping item of the cloud application at the resource level according to the determined selling specification and the measurement dimension at the resource level; and reporting the determined pricing mapping item at the resource level to the selling platform. The measurement dimension includes at least one of the following dimensions: a time dimension, a bandwidth dimension, and a traffic dimension.
7. The metering data transmission method of claim 1, wherein, 8. A metering data transmission system of a cloud application, deployed at a predetermined node in a predetermined network, the predetermined network further comprising a selling platform, wherein, The selling platform, the predetermined node and the cloud application are connected through the predetermined network communication, the predetermined node is pre-configured with a pricing mapping table, the pricing mapping table includes a plurality of pricing mapping items, each of the plurality of pricing mapping items corresponds to a mapping relationship between a selling specification and a measurement dimension of the cloud application; The metering data transmission system includes: A processor; and a memory connected with the processor, for providing the processor with instructions to process the following processing steps: Receiving first metering data reported by the cloud application, the first metering data being cloud application level metering data; Reporting the first metering data to the selling platform; Receiving first response information returned by the selling platform; and Sending the first response information to the cloud application; Wherein, after receiving the first metering data reported by the cloud application, further comprising: Determining the selling specification and the measurement dimension of the cloud application at the application level according to the first metering data; Determining the pricing mapping item of the cloud application at the application level according to the determined selling specification and the measurement dimension at the application level; and Reporting the determined pricing mapping item at the application level to the selling platform.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory, the processor, when executing the computer program, implements the method of any one of claims 1-7.
10. A computer readable storage medium, the computer readable storage medium stores a computer program, the computer program, when executed by a processor, implements the method of any one of claims 1-7.
Citation Information
Patent Citations
Charging method and system used for cloud computing
CN102387023A
Method and system for realizing application content charging
CN103686658A