Data processing method, device, computer equipment and storage medium

By obtaining and analyzing resource subscription records and resource consumption logs in the cloud computing service platform, determining the target resource billing model and billing unit price model, the problem of not being able to generate detailed billing records under the monthly billing model is solved, and the resource user is realized automated resource billing and internal cost sharing.

CN114240416BActive Publication Date: 2025-02-21SHANGHAI PUDONG DEVELOPMENT BANK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111361553.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-17
Publication Date
2025-02-21
Estimated Expiration
2041-11-17

AI Technical Summary

Technical Problem

In the cloud computing service platform, under the monthly billing mode, the billing data generated by the cloud service platform cannot provide the specific resource allocation data details of the virtual machine, resulting in resource subscribers being unable to understand the situation where the internal departments consume virtual machine resources and cannot Generate detailed billing records for internal cost sharing.

Method used

By obtaining resource subscription records and resource consumption logs, identifying the role type of each resource user in the resource consumption log, determining the target resource billing model and the corresponding billing unit price model, generating the billing unit price of each resource user, and Determine the resource billing for each resource user based on the resource billing strategy that matches the billing unit price and the resource user's role type.

Benefits of technology

It realizes automated resource billing for resource users in the cloud computing service platform, and can generate detailed billing records based on specific resource usage, supporting internal cost sharing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114240416B_ABST
    Figure CN114240416B_ABST
Patent Text Reader

Abstract

The present application relates to a data processing method, device, computer equipment, storage medium and computer program product. The method comprises: obtaining resource subscription records and resource consumption logs; identifying the role type of each resource user in the resource consumption log; determining the target resource billing model according to the resource subscription records, resource consumption logs and the role type of each resource user, and determining the billing unit price model corresponding to the target resource billing model; the target resource billing model includes a resource billing strategy; generating the billing unit price corresponding to each resource user according to the determined billing unit price model; determining the resource billing of each resource user according to the billing unit price and the resource billing strategy matching the role type of the resource user. The method is adopted to realize the automatic resource billing within the subscription system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data processing method, apparatus, computer equipment, storage medium and computer program product. Background Art

[0002] The current cloud computing service platform has multiple resource billing modes, such as the pay-as-you-go billing mode and the monthly billing mode for virtual machines. For different billing modes, the cloud computing service platform generates corresponding billing data and pushes the billing data to the unified account of the resource subscriber, so that the resource subscriber can share the internal usage costs based on the transaction data in the billing data.

[0003] However, for the monthly billing model of virtual machines, since the billing data generated by the cloud computing service platform cannot provide the specific resource allocation data details of the virtual machine, but only includes the overall resource cost, based on the ambiguous billing data, resource subscribers cannot know the resource consumption of the virtual machine by various internal departments, and cannot generate detailed billing records for internal cost sharing. Summary of the invention

[0004] Based on this, it is necessary to provide a data processing method, apparatus, computer device, computer-readable storage medium and computer program product to address the above technical issues.

[0005] In a first aspect, the present application provides a data processing method. The method comprises:

[0006] Obtain resource subscription records and resource consumption logs;

[0007] Identifying the role type of each resource user in the resource consumption log;

[0008] Determine a target resource billing model according to the resource subscription record, the resource consumption log and the role type of each resource user, and determine a billing unit price model corresponding to the target resource billing model; the target resource billing model includes a resource billing strategy;

[0009] Generate a corresponding billing unit price for each resource user according to the determined billing unit price model;

[0010] The resource billing for each resource user is determined according to the billing unit price and the resource billing policy that matches the role type of the resource user.

[0011] In one embodiment, identifying the role type of each resource user in the resource consumption log includes:

[0012] Comparing the resource subscriber in the resource subscription record with the resource user in the resource consumption log;

[0013] If the resource consumption log contains the resource user that is consistent with the resource subscriber, determining that the role type of the resource user is a subscriber type;

[0014] If the resource user that is consistent with the resource subscriber does not exist in the resource consumption log, it is determined that the role type of the resource user is a non-subscriber type.

[0015] In one embodiment, determining the target resource billing model according to the resource subscription record, the resource consumption log, and the role type of each resource user includes:

[0016] Determine a target resource billing mode according to the total resource subscription amount in the resource subscription record and the total actual resource usage amount in the resource consumption log;

[0017] In the target resource billing mode, a target resource billing model is determined according to the role type of each resource user and the resource usage of each resource user.

[0018] In one of the embodiments, determining the target resource billing mode according to the total resource subscription amount in the resource subscription record and the total actual resource usage amount in the resource consumption log includes:

[0019] If the total amount of resource subscriptions in the resource subscription record is less than or equal to the actual amount of resource usage, determining an excess resource billing mode;

[0020] If the total amount of resource subscription in the resource subscription record is greater than the actual usage of the resource, a quantitative allocation resource billing mode is determined.

[0021] In one of the embodiments, in the target resource billing mode, determining the target resource billing model according to the role type of each resource user and the resource usage of each resource user includes:

[0022] In the excess resource billing mode, comparing the resource subscription amount of each resource subscriber in the resource subscription record with the resource usage amount of the target resource user; the target resource user is a resource user of the subscriber type;

[0023] If the resource usage of the target resource user is less than the corresponding resource subscription amount, determining an average billing model;

[0024] If there is no target resource user whose resource usage is less than the corresponding resource subscription amount, an overage billing model is determined.

[0025] In one embodiment, the billing unit price model is an average unit price model, and generating a billing unit price corresponding to each resource user according to the determined billing unit price model includes:

[0026] Determining the planned unit price in the resource subscription record according to the average unit price model;

[0027] Calculating a first resource billing total amount for the target resource user according to the planned unit price and the actual resource usage of the target resource user;

[0028] A ratio calculation is performed based on the actual total billing amount of the resource, the target resource subscription billing amount, the first resource billing total amount and the target resource usage in the resource consumption log to generate a billing unit price corresponding to each resource user.

[0029] In a second aspect, the present application also provides a data processing device. The device comprises:

[0030] The acquisition module is used to obtain resource subscription records and resource consumption logs;

[0031] An identification module, used to identify the role type of each resource user in the resource consumption log;

[0032] A determination module, configured to determine a target resource billing model according to the resource subscription record, the resource consumption log, and the role type of each resource user, and determine a billing unit price model corresponding to the target resource billing model; the target resource billing model includes a resource billing strategy;

[0033] A generating module, used to generate a corresponding billing unit price for each resource user according to the determined billing unit price model;

[0034] The charging module is used to determine the resource charging of each resource user according to the charging unit price and the resource charging policy matched with the role type of the resource user.

[0035] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0036] Obtain resource subscription records and resource consumption logs;

[0037] Identifying the role type of each resource user in the resource consumption log;

[0038] Determine a target resource billing model according to the resource subscription record, the resource consumption log and the role type of each resource user, and determine a billing unit price model corresponding to the target resource billing model; the target resource billing model includes a resource billing strategy;

[0039] Generate a corresponding billing unit price for each resource user according to the determined billing unit price model;

[0040] The resource billing for each resource user is determined according to the billing unit price and the resource billing policy that matches the role type of the resource user.

[0041] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0042] Obtain resource subscription records and resource consumption logs;

[0043] Identifying the role type of each resource user in the resource consumption log;

[0044] Determine a target resource billing model according to the resource subscription record, the resource consumption log and the role type of each resource user, and determine a billing unit price model corresponding to the target resource billing model; the target resource billing model includes a resource billing strategy;

[0045] Generate a corresponding billing unit price for each resource user according to the determined billing unit price model;

[0046] The resource billing for each resource user is determined according to the billing unit price and the resource billing policy that matches the role type of the resource user.

[0047] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0048] Obtain resource subscription records and resource consumption logs;

[0049] Identifying the role type of each resource user in the resource consumption log;

[0050] Determine a target resource billing model according to the resource subscription record, the resource consumption log and the role type of each resource user, and determine a billing unit price model corresponding to the target resource billing model; the target resource billing model includes a resource billing strategy;

[0051] Generate a corresponding billing unit price for each resource user according to the determined billing unit price model;

[0052] The resource billing for each resource user is determined according to the billing unit price and the resource billing policy that matches the role type of the resource user.

[0053] The above-mentioned data processing method, device, computer device, storage medium and computer program product, the computer device obtains resource subscription records and resource consumption logs; identifies the role type of each resource user in the resource consumption log. Then, the computer device determines the target resource billing model according to the resource subscription record, the resource consumption log and the role type of each resource user, and determines the billing unit price model corresponding to the target resource billing model. Among them, the target resource billing model includes a resource billing policy. Then, the computer device generates a billing unit price corresponding to each resource user according to the determined billing unit price model; then, according to the billing unit price and the resource billing policy matching the role type of the resource user, the resource billing of each resource user is determined. With this method, the target resource billing model is determined through the subscription information in the resource subscription record and the resource consumption log, and then the billing unit price is determined according to the resource billing policy and the billing unit price model in the target resource billing model, and resource billing is performed for each resource user, thereby realizing automatic resource billing within the subscription system. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 is a flow chart of a data processing method in one embodiment;

[0055] Figure 2 A flowchart of a step for identifying a resource user role type in one embodiment;

[0056] Figure 3 A schematic diagram of a flow chart of steps for determining a resource billing mode in an embodiment;

[0057] Figure 4 A schematic diagram of a flow chart of steps for dividing a target resource billing mode in an embodiment;

[0058] Figure 5 A schematic diagram of a flow chart of steps for determining a target resource billing model in an embodiment;

[0059] Figure 6 A schematic diagram of a flow chart of a step of calculating a billing unit price in an embodiment;

[0060] Figure 7 is an example flow chart of a data processing method in one embodiment;

[0061] Figure 8 is a structural block diagram of a data processing device in one embodiment;

[0062] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0063] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0064] The current cloud computing service platform (referred to as the cloud service platform) as a provider of cloud computing services has launched a variety of resource billing models. For example, the billing model for virtual machine resources can be divided into a monthly billing model and a pay-as-you-go billing model. In the monthly billing model, the cloud service platform charges on a monthly basis based on a full month (744 hours). The average billing price of each unit time (for example, each hour) of the virtual machine is less than the billing price of each unit time of resource usage in the pay-as-you-go billing model, which serves as a discount for this billing model. However, at the same time, when the actual number of virtual machine hours used by the user exceeds the number of hours specified in the monthly billing model, the cloud service platform will use the billing price in the pay-as-you-go billing model to bill the excess resources. Since the cloud service platform will open the resources subscribed by the user to the user's unified account and cannot restrict the use of resources by the user's internal systems, the cloud service platform will not provide charging details for the user's internal resource usage in the event of multiple resource usage situations in the user's internal system. Therefore, as a user of cloud services, the user cannot perform data statistics for either cost calculation or internal resource billing allocation.

[0065] In one embodiment, Figure 1 As shown, a data processing method is provided. This embodiment uses the method applied to a terminal as an example for illustration. It is understandable that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. Among them, the terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices, etc., and this embodiment of the application does not limit this. In this embodiment, the terminal devices are collectively referred to as computer devices for illustration, and the method includes the following steps:

[0066] Step 102: Obtain resource subscription records and resource consumption logs.

[0067] In implementation, the user subscribes to cloud service resources according to the expected demand, generates corresponding cloud service resource subscription records, and submits the resource subscription records to the cloud service platform for resource subscription. At the same time, the user's internal computer system retains the resource subscription records for resource data billing analysis. Specifically, the resource subscription record contains the resource subscribers who plan to subscribe to resources within the user and the planned resource subscription amount corresponding to each resource subscriber. For example, the virtual machine subscription record for the monthly subscription model includes: user A system, subscribing to 1 monthly subscription virtual machine; user B system, subscribing to 2 monthly subscription virtual machines; user C system, subscribing to 1 monthly subscription virtual machine, and the user as a whole subscribes to 4 monthly subscription virtual machines.

[0068] Among them, the monthly subscription form of virtual machine subscription refers to the billing model for virtual machines, which does not measure resource usage by the traffic, bandwidth, number of times, etc. of specific virtual machines, but quantifies the usage of virtual machines according to the number of monthly subscription hours. Therefore, the resource usage for the monthly subscription form in the following embodiments of this application refers to the number of hours consumed by the monthly subscription virtual machine, not the specific traffic data. The meaning of this term will not be repeated in the following embodiments of this application. In the above example, taking the number of hours for the monthly subscription as 744 hours as an example, the total amount of virtual machine resources (i.e., the number of hours) of the user in the virtual machine subscription record is 744*4 hours.

[0069] In the specific resource usage process, when each system of the user uses the virtual machine, the resource consumption log records each resource user and the corresponding resource usage. Then, when resource billing is required, the computer device obtains the locally stored resource subscription record and resource consumption log of the month, and performs resource billing for each resource user in the internal system based on the resource subscription record and resource consumption log.

[0070] Step 104: Identify the role type of each resource user in the resource consumption log.

[0071] In an implementation, the computer device identifies the role type of each resource consumer in the resource consumption log of the internal system, wherein the role type of the resource consumer includes a subscriber type and a non-subscriber type.

[0072] Specifically, after the user platform subscribes to cloud service resources, the cloud service platform will open cloud service resources to the user account and perform resource usage statistics. However, the cloud service platform cannot set the permissions for the internal system of the user account to use the cloud service resources (for example, virtual machine resources). Instead, it adopts a "first come, first served" approach to realize the consumption and use of monthly virtual machine resources. Therefore, under a unified user platform account, each system within the user can consume the total resource subscription amount. This will result in the following situation within the user system: Subsystem A is a resource subscriber and can consume resources. At the same time, subsystem D is a non-resource subscriber (has not subscribed to resources) and can also consume resources. Therefore, the computer device needs to pre-identify the role type of each resource user in the resource subscription record.

[0073] Step 106: Determine a target resource billing model based on the resource subscription record, the resource consumption log, and the role type of each resource user, and determine a billing unit price model corresponding to the target resource billing model.

[0074] The target resource charging model includes a resource charging strategy.

[0075] In implementation, the computer device determines the resource billing mode of the cloud service according to the role type of each resource user identified, and according to the relationship between the resource subscription information contained in the resource subscription record and the resource usage corresponding to each resource user in the resource consumption log. Then, under different resource billing modes, the computer device determines the corresponding target resource billing model and the billing unit price model corresponding to the target resource billing model. For example, according to the relationship between the resource subscription amount and the actual resource usage, the computer device determines the excess resource billing mode or the quantitative allocation resource billing mode. In the excess resource billing mode, there are corresponding average billing models and excess billing models, and in the quantitative allocation resource billing mode, there is corresponding allocation billing models. Each target resource billing model contains a resource billing strategy formulated for each user role type. At the same time, the target resource billing model under different resource billing modes also corresponds to a billing unit price model under the resource billing model. Therefore, the computer device can determine the billing unit price required for the billing strategy in the target resource billing model based on the billing unit price model, and perform resource billing based on the billing unit price and the actual resource usage of each user.

[0076] Step 108: Generate a corresponding billing price for each resource user according to the determined billing price model.

[0077] In implementation, under the determined resource billing mode, the user's computer equipment calculates the corresponding billing unit price of each resource user according to the determined billing unit price model.

[0078] Step 110: Determine the resource billing for each resource user according to the billing unit price and the resource billing policy that matches the role type of the resource user.

[0079] During implementation, the computer device determines the resource billing for each resource user according to the billing unit price and a resource billing policy that matches the role type of the resource user.

[0080] Specifically, under the determined target resource billing model, the corresponding target resource billing model contains the resource billing strategies corresponding to the resource users of each role type under the resource billing model, and the billing unit price model corresponding to the target resource billing model can be used to calculate the billing unit price required for each billing strategy in the target resource billing model. Therefore, the computer device can perform resource billing for each resource user recorded in the resource consumption log according to the target resource billing model and the billing unit price model.

[0081] Optionally, the computer device can write the resource billing data of each resource user into a pre-designed fee template to generate a resource billing invoice for each resource user. Each resource billing invoice carries the identification information of the corresponding resource user (for example, the name information of the resource user). The resource billing invoice is pushed to the systems of each internal resource user based on the identification information carried and the distribution path corresponding to the identification information for bill notification.

[0082] In the above data processing method, the computer device obtains resource subscription records and resource consumption logs; identifies the role type of each resource user in the resource consumption log. Then, the computer device determines the target resource billing model according to the resource subscription record, the resource consumption log and the role type of each resource user, and determines the billing unit price model corresponding to the target resource billing model. Among them, the target resource billing model includes a resource billing strategy. Then, the computer device generates a billing unit price corresponding to each resource user according to the determined billing unit price model; then, the resource billing of each resource user is determined according to the billing unit price and the resource billing strategy matching the role type of the resource user. With this method, the target resource billing model is determined through the subscription information in the resource subscription record and the resource consumption log, and then the billing unit price is determined according to the resource billing strategy and the billing unit price model in the target resource billing model, and resource billing is performed for each resource user, thereby realizing automatic resource billing within the subscription system.

[0083] In one embodiment, Figure 2As shown, in the process of resource use, both non-resource subscribers and resource subscribers under the unified account of the user can use resources, and corresponding resource billing is required for different role types, so the computer device needs to pre-identify the role type of each resource user in the resource consumption log. There are many methods for identifying the role type of the resource user. In the embodiment of the present application, the method of identifying with the help of resource subscription records is used as an example for explanation, and the specific processing process of step 102 includes the following steps:

[0084] Step 202: Compare the resource subscriber in the resource subscription record with the resource user in the resource consumption log.

[0085] In implementation, since the resource subscription records pre-record the resource subscription status of each system within the user, the computer device can identify the role type of each resource user in the resource consumption log by querying the subscriber information in the resource subscription records.

[0086] Specifically, the computer device compares the resource subscriber in the resource subscription record with the resource user in the resource consumption log to determine whether the resource user in the resource consumption log exists in the resource subscription record. For example, the resource users included in the resource consumption log are system A, system B, system C, system D, and system H. Based on the resource subscribers recorded in the resource subscription record: system A, system B, and system C, the role type of the resource user is compared and determined.

[0087] Step 204: If the resource consumption log contains a resource user that is consistent with the resource subscriber, it is determined that the role type of the resource user is a subscriber type.

[0088] In implementation, if the resource consumption log contains a resource user that is consistent with the resource subscriber, the role type of the resource user is determined to be the subscriber type. For example, if the system A (resource user) contained in the resource consumption log is the system A that has been previously subscribed to the resource and can be found in the resource subscription record (the system name identifiers of the two are consistent), then the role type of the resource user, system A, in the resource billing process is determined to be the subscriber type.

[0089] Step 206: If there is no resource user consistent with the resource subscriber in the resource consumption log, it is determined that the role type of the resource user is a non-subscriber type.

[0090] In implementation, if there is no resource user consistent with the resource subscriber in the resource consumption log, the computer device determines that the role type of the resource user is a non-subscriber type. For example, if the system H (resource user) included in the resource consumption log does not exist in the resource subscription record, it is determined that the role type of the resource user system H in the resource billing process is a non-subscriber type.

[0091] Optionally, in addition to identifying the role type of each resource user through resource subscription records, the resource subscriber can also be identified by tagging the resource subscriber. Then, when the resource subscriber uses the resource, the resource user in the resource consumption log will carry the subscriber identity, so that during the resource billing process, the resource user in the resource consumption log as the resource subscriber can be identified. In summary, there are many methods for identifying the role type of a resource user, which are not limited in the embodiments of the present application.

[0092] In one embodiment, Figure 3 As shown, for the comparison relationship between the user's subscription amount and the actual resource usage, there are different target resource billing models corresponding to the comparison relationship between the user's subscription amount and the actual resource usage. The specific process of determining the target resource billing model in step 106 includes the following steps:

[0093] Step 302: Determine the target resource billing mode according to the total resource subscription amount in the resource subscription record and the total resource actual usage amount in the resource consumption log.

[0094] In implementation, the computer device determines the target resource billing mode according to the total resource subscription amount in the resource subscription record and the total actual resource usage amount in the resource consumption log. Specifically, the resource subscription record contains the total resource subscription amount of the user as a whole (also referred to as the total resource subscription hours). Therefore, the computer device can determine the overall resource usage of the user according to the relationship between the total resource subscription amount and the actual resource usage amount recorded in the resource consumption log, that is, determine the corresponding target resource billing mode.

[0095] Step 304: Under the target resource billing mode, a target resource billing model is determined according to the role type of each resource user and the resource usage of each resource user.

[0096] In implementation, under the determined target resource billing model, the computer device determines the target resource billing model according to the role type of each resource user and the resource usage of each resource user. For example, under the determined excess resource billing model, since the overall resource usage of the user exceeds the total resource subscription, an excess resource billing model including an excess resource billing strategy is determined, and the excess resource billing model includes a resource billing allocation strategy that when the actual user usage exceeds the subscription amount, the cloud service platform charges the excess resource usage according to the excess unit price.

[0097] In one embodiment, Figure 4 As shown, in the above embodiment, the computer device determines the target resource billing mode according to the relationship between the total resource subscription amount and the actual resource usage amount, and its specific processing process, i.e., the specific process of step 302, includes the following steps:

[0098] Step 402: If the total amount of resource subscriptions in the resource subscription record is less than or equal to the actual amount of resource usage, determine the excess resource billing mode.

[0099] During implementation, if the total resource subscription amount in the resource subscription record is less than or equal to the actual resource usage, the computer device determines that the user has overused resources based on the resource subscription amount. Furthermore, based on the excess resource usage, the computer device pre-matches an excess resource billing mode and triggers entry into the excess resource billing mode to calculate the resource billing.

[0100] Step 404: If the total amount of resource subscription in the resource subscription record is greater than the actual resource usage, a quantitative allocation resource billing mode is determined.

[0101] During implementation, if the total amount of resource subscriptions in the resource subscription record is greater than the actual resource usage, the computer device determines that the user has not fully used the subscribed resources. Furthermore, based on the fact that the subscribed resources have not been fully used, the computer device pre-matches a quantitatively allocated resource billing mode, triggering entry into the quantitatively allocated resource billing mode to calculate the resource billing.

[0102] Specifically, the quantitative shared resource billing mode corresponds to a shared billing model (ie, one of the target resource billing models), and the shared billing model corresponds to a shared unit price model (one of the billing unit price models).

[0103] In the case where the resource subscription amount is greater than the resource usage amount, each resource user is charged for the shared cost. Therefore, under this target resource charging model (shared charging model), the role type of the resource user is not limited, and the resource charging strategies are:

[0104] Resource billing = actual resource usage * allocated unit price

[0105] The allocated unit price is determined by the allocated unit price model, which is allocated unit price = total resource subscription amount ÷ total actual resource usage (i.e., actual resource usage hours).

[0106] In one embodiment, Figure 5 As shown, there are multiple target resource billing modes. The excess resource billing mode in the above step 404 is used as an example for illustration. It is worth noting that in the excess resource billing mode, due to the different role types of resource users, the excess resource usage can be caused by resource users of various role types. The first is the resource excess situation caused by the use of resources by all resource subscribers (that is, the role type of the resource users is all subscriber type); the second is the resource excess situation caused by the use of resources by resource subscribers and non-resource subscribers; the third is the resource excess situation caused by the use of resources by all non-resource subscribers (since in actual applications it is rare for resource subscribers to subscribe to resources but not use them, this situation can be ignored). Therefore, in order to achieve fairness in resource billing, there are differences in the billing algorithms for resource subscribers and non-resource subscribers. In the excess resource billing mode, the target resource billing model corresponding to each situation is further determined. The specific processing process of step 304 includes the following steps:

[0107] Step 502: Under the excess resource billing mode, compare the resource subscription amount of each resource subscriber in the resource subscription record with the resource usage amount of the target resource user.

[0108] The target resource user is a resource user of the subscriber type.

[0109] In implementation, under the excess resource billing mode, the computer device checks whether the resource subscribers (i.e., resource users of subscriber type) recorded in the resource consumption log use the resources according to the planned resource usage (i.e., resource subscription amount) of each resource subscriber in the resource subscription amount. Specifically, the computer device can compare the resource subscription amount of each resource subscriber in the resource subscription record with the resource usage of the target resource user (resource user of subscriber type).

[0110] Step 504: If the resource usage of the target resource user is less than the corresponding resource subscription amount, an average billing model is determined.

[0111] During implementation, if there is a target resource user (subscriber-type resource user) whose resource usage is less than the corresponding resource subscription amount, it means that within the resource usage range that the target resource user can enjoy, the target resource user has not fully used the resources, and there are other resource users who have taken advantage of the resource usage that enjoys the preferential price in the form of a monthly subscription.

[0112] For example, resource subscribers A, B, and C recorded in the resource subscription record have all subscribed to virtual machines on a monthly basis. During the actual use of resources, the actual resource usage of system B is less than its resource subscription. In the case of an overall overage on the user side, this means that other users have enjoyed the unused resources of system B at the monthly price of the virtual machine in the process of using virtual machine resources, and the amount of unused resources has exceeded the amount, resulting in an overage. At this time, if subscriber system B still pays the monthly fee for the resources (i.e., virtual machines) for the entire month, and other users enjoy the unused resource usage of system B, then it will lead to unreasonable resource billing. Therefore, for this situation, the computer device determines the average billing model for resource billing.

[0113] Specifically, when the above-mentioned resource subscriber (i.e., resource user of subscriber type) has not used up its own resource subscription, but the user party has used resources in excess as a whole, in the embodiment of the present application, there is first an average unit price model (billing unit price model) corresponding to the average billing model to determine the resource billing unit price of the remaining resource usage. For the sake of ease of description, in the present application, the resource subscriber who has not used up the resource subscription, such as the resource subscriber of system B type, is referred to as the first resource subscriber. In this case, except for the first resource subscriber, other resource users have occupied the resource subscription of the first resource subscriber, and also caused the user party's overall resource usage to exceed the limit. Therefore, no matter whether other resource users use the resources first or later, they all need to share the billing of the remaining resource subscription of the first resource user and the billing of the excess portion calculated according to the excess unit price. Therefore, the average unit price model counts the total amount of resource subscription minus the actual resource usage of the first resource subscriber and the total amount of resource usage that exceeds the total amount of resource subscription, and calculates the billing unit price (i.e., the average allocated unit price) after the total amount is allocated among the target objects (i.e., other resource users except the first resource subscriber).

[0114] Furthermore, after the billing unit price is determined, each resource user is charged using the multiple resource charging strategies included in the average charging model (target resource charging model) as shown below:

[0115] Resource billing for resource users of the subscriber type who use excessive resources = virtual machine monthly fee + (actual resource usage - resource subscription amount) * billing unit price.

[0116] Resource billing for resource users of the subscriber type that do not exceed resource usage = actual resource usage * planned unit price.

[0117] Resource billing for non-subscription resource users = actual resource usage * billing unit price.

[0118] The resource usage may correspond to the number of hours of use of the virtual machine, and the planned unit price is the monthly billing unit price of the virtual machine determined by averaging the monthly fee of the virtual machine according to the number of hours of the monthly billing. The billing unit price is the apportioned unit price determined by the average unit price model (i.e., the billing unit price model corresponding to the target resource billing model). Specifically, the process of determining the apportioned unit price by the average unit price model is described in detail in the subsequent embodiments, and the embodiments of this application will not be described in detail here.

[0119] Step 506: If there is no target resource user whose resource usage is less than the corresponding resource subscription amount, an overage billing model is determined.

[0120] In implementation, if there is no target resource user (i.e., resource subscriber) whose resource usage is less than the corresponding resource subscription amount, it means that the resource subscription amount pre-planned by the resource subscriber has been fully used up, and there is no resource usage in the resource billing that is charged at a preferential price in the form of a monthly subscription. Therefore, for this situation, the computer device is triggered to determine the overcharge billing model.

[0121] Specifically, the overage billing model includes a resource policy that matches the role type and resource usage of each resource user, as shown below:

[0122] For subscriber-type resource users: Resource billing = virtual machine monthly fee + (actual usage hours - monthly planned hours) * excess pay-as-you-go unit price.

[0123] For non-subscriber resource users: Resource billing = actual usage hours * excess pay-as-you-go unit price.

[0124] In one embodiment, Figure 6 As shown, based on the description in the above embodiment, the specific processing process of determining the charging unit price by the average unit price model, that is, step 108 includes the following steps:

[0125] Step 602: Determine the planned unit price in the resource subscription record according to the average unit price model.

[0126] During implementation, the computer device executes the unit price algorithm in the billing unit price model to determine the planned unit price in the resource subscription record. Specifically, based on the monthly fee of a single virtual machine in a monthly subscription form recorded in the resource subscription record and the corresponding monthly resource usage (monthly hours) of the single virtual machine, the unit price of the resource usage in the monthly subscription form can be determined, that is, the planned unit price = monthly fee of a single virtual machine ÷ monthly hours, where the planned unit price is the preferential unit price that enjoys the monthly subscription discount, and can also be called the virtual machine monthly unit price.

[0127] Step 604: Calculate the first resource billing total amount of the target resource user according to the planned unit price and the actual resource usage of the target resource user.

[0128] In implementation, the computer device calculates the first resource billing amount of the target resource user based on the planned unit price and the actual resource usage of the target resource user (the resource subscriber who has not used up the resource subscription, that is, the first resource subscriber). Specifically, the formula for the first resource billing amount is as follows:

[0129] The total billing amount of the first resource = actual resource usage (actual usage hours) * planned unit price.

[0130] Step 606, a ratio calculation is performed based on the actual total billing amount of the resource, the target resource subscription billing amount, the first resource billing total amount and the target resource usage in the resource consumption log to generate a corresponding billing unit price for each resource user.

[0131] During implementation, the computer calculates the ratio based on the actual total billing amount of the resources, the target resource subscription billing amount (i.e., the monthly fee for the virtual machine corresponding to the resource subscriber who has used up the resource subscription amount), the first resource billing amount, and the target resource usage in the resource consumption log (i.e., the total actual usage hours of the virtual machine excluding the first resource subscriber), and generates a billing unit price corresponding to each resource user.

[0132] The specific formula is as follows:

[0133] Billing unit price = (actual total resource billing amount - target resource subscription billing amount - first resource billing amount) / (actual total hours consumed - target resource subscription hours - first resource subscriber actual hours consumed)

[0134] Optionally, in addition to the resource usage fees in the cloud service platform, there may be other special fees, which are usually a fixed value. Therefore, in the resource billing strategy included in the resource billing model in each of the above cases, an apportionment of other special fees is added to the resource billing of each resource user.

[0135] The allocation and billing of other special expenses = amount of other expenses ÷ number of resource users.

[0136] Among them, if the cloud service platform fails to provide detailed data on other fee amounts, the computer equipment can also deduct the virtual machine fee from the total resource fee provided by the cloud service platform to equal the other fee amount.

[0137] In one embodiment, Figure 7 As shown, an example of a data processing method is provided, which includes the following steps:

[0138] Step 701, compare the total resource subscription amount in the resource subscription record with the total resource actual usage amount in the resource consumption log, if the total resource subscription amount is greater than the total resource actual usage amount, execute step 702. If the total resource subscription amount is less than or equal to the total resource actual usage amount, execute step 703.

[0139] Step 702, determine a quantitative allocation resource billing mode, and under the quantitative allocation resource billing mode, determine an allocation billing model and an allocation stand-alone model corresponding to the allocation billing model.

[0140] The allocated unit price determined by the allocated unit price model = the total amount of resource subscriptions ÷ the total amount of actual resource usage (i.e. the actual number of hours the resource is used)

[0141] Resource billing is performed for each resource user in the resource consumption log according to the allocated billing model: resource billing = actual resource usage * allocated unit price.

[0142] Step 703, determine the excess resource billing mode, and under the excess resource billing mode, compare the resource subscription amount of each resource subscriber in the resource subscription record with the resource usage of the subscriber-type resource user. If there is a subscriber-type resource user whose resource usage is less than the resource subscription amount, execute step 704; if there is no subscriber-type resource user whose resource usage is less than the resource subscription amount, execute step 706.

[0143] Step 704: determine an average charging model, and determine an average unit price model corresponding to the average charging model.

[0144] Step 705 , calculating the charging unit price according to the average unit price model, and performing resource charging for the resource user of each role type according to the multiple resource charging strategies included in the average charging model.

[0145] Resource billing for resource users of the subscriber type who use excessive resources = virtual machine monthly fee + (actual resource usage - resource subscription amount) * billing unit price.

[0146] Resource billing for resource users of the subscriber type that do not exceed resource usage = actual resource usage * planned unit price.

[0147] Resource billing for non-subscription resource users = actual resource usage * billing unit price.

[0148] Step 706: determine an excess billing model, and perform resource billing according to the resource policy for the role type and resource usage of each resource user included in the excess billing model.

[0149] For subscriber-type resource users: Resource billing = virtual machine monthly fee + (actual usage hours - monthly planned hours) * excess pay-as-you-go unit price.

[0150] For non-subscriber resource users: Resource billing = actual usage hours * excess pay-as-you-go unit price.

[0151] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0152] Based on the same inventive concept, the embodiment of the present application also provides a data processing device for implementing the data processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more data processing device embodiments provided below can refer to the limitations on the data processing method above, and will not be repeated here.

[0153] In one embodiment, Figure 8 As shown, a data processing device 800 is provided, comprising: an acquisition module 801, an identification module 802, a determination module 803, a generation module 804 and a charging module 805, wherein:

[0154] Acquisition module 801, used to acquire resource subscription records and resource consumption logs;

[0155] Identification module 802, used to identify the role type of each resource user in the resource consumption log;

[0156] Determination module 803, used for root resource subscription records, resource consumption logs and the role type of each resource user, determining the target resource billing model, and determining the billing unit price model corresponding to the target resource billing model; wherein the target resource billing model includes a resource billing strategy;

[0157] A generating module 804 is used to generate a corresponding billing unit price for each resource user according to the determined billing unit price model;

[0158] The charging module 805 is used to determine the resource charging of each resource user according to the charging unit price and the resource charging policy matching the role type of the resource user.

[0159] In one of the embodiments, the identification module 802 is specifically used to compare the resource subscriber in the resource subscription record with the resource user in the resource consumption log;

[0160] If the resource consumption log contains a resource user that is consistent with the resource subscriber, the role type of the resource user is determined to be a subscriber type;

[0161] If there is no resource consumer that is consistent with the resource subscriber in the resource consumption log, it is determined that the role type of the resource consumer is a non-subscriber type.

[0162] In one of the embodiments, the determination module 803 is specifically used to determine the target resource billing mode according to the total resource subscription amount in the resource subscription record and the total resource actual usage amount in the resource consumption log;

[0163] In the target resource billing mode, the target resource billing model is determined according to the role type of each resource user and the resource usage of each resource user.

[0164] In one of the embodiments, the determination module 803 is further used to determine an excess resource billing mode if the total resource subscription amount in the resource subscription record is less than or equal to the actual resource usage;

[0165] If the total amount of resource subscriptions in the resource subscription record is greater than the actual resource usage, a quantitative allocation resource billing mode is determined.

[0166] In one embodiment, the determination module 803 is specifically used to compare the resource subscription amount of each resource subscriber in the resource subscription record with the resource usage amount of the target resource user in the excess resource billing mode; the target resource user is a resource user of the subscriber type;

[0167] If the resource usage of the target resource user is less than the corresponding resource subscription amount, the average billing model is determined;

[0168] If there is no target resource user whose resource usage is less than the corresponding resource subscription amount, the overage billing model is determined.

[0169] In one embodiment, the billing unit price model is an average unit price model, and the generating module 804 is specifically used to determine the planned unit price in the resource subscription record according to the average unit price model;

[0170] Calculate the total first resource billing amount of the target resource user according to the planned unit price and the actual resource usage of the target resource user;

[0171] The billing unit price corresponding to each resource user is generated by performing a ratio calculation based on the actual total billing amount of the resource, the target resource subscription billing amount, the first resource billing total amount and the target resource usage in the resource consumption log.

[0172] Each module in the above data processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0173] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig. 9 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a data processing method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, a trackball or a touch pad set on the computer device housing, or an external keyboard, touch pad or mouse, etc.

[0174] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0175] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0176] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0177] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0178] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0179] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0180] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0181] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A data processing method, characterized in that: The method comprises: Obtain resource subscription records and resource consumption logs; Identifying the role type of each resource user in the resource consumption log; Determine a target resource billing model according to the resource subscription record, the resource consumption log and the role type of each resource user, and determine a billing unit price model corresponding to the target resource billing model; the target resource billing model includes a resource billing strategy; Generate a corresponding billing unit price for each resource user according to the determined billing unit price model; Determining resource billing for each resource user according to the billing unit price and the resource billing policy that matches the role type of the resource user; The determining of the target resource billing model according to the resource subscription record, the resource consumption log and the role type of each resource user includes: Determine a target resource billing mode according to the total resource subscription amount in the resource subscription record and the total actual resource usage amount in the resource consumption log; Under the target resource billing mode, a target resource billing model is determined according to the role type of each resource user and the resource usage of each resource user; The determining the target resource billing mode according to the total resource subscription amount in the resource subscription record and the total resource actual usage amount in the resource consumption log includes: If the total amount of resource subscriptions in the resource subscription record is less than or equal to the actual amount of resource usage, determining an excess resource billing mode; If the total amount of resource subscription in the resource subscription record is greater than the actual usage of the resource, determining a quantitative allocation resource billing mode; Among them, the excess resource billing mode corresponds to an average billing model and an excess billing model, and the quantitative shared resource billing mode corresponds to a shared billing model.

2. The method according to claim 1, characterized in that The identifying the role type of each resource user in the resource consumption log includes: Comparing the resource subscriber in the resource subscription record with the resource user in the resource consumption log; If the resource consumption log contains the resource user that is consistent with the resource subscriber, determining that the role type of the resource user is a subscriber type; If the resource user that is consistent with the resource subscriber does not exist in the resource consumption log, it is determined that the role type of the resource user is a non-subscriber type.

3. The method according to claim 1, characterized in that In the target resource billing mode, determining the target resource billing model according to the role type of each resource user and the resource usage of each resource user includes: In the excess resource billing mode, the resource subscription amount of each resource subscriber in the resource subscription record is compared with the resource usage amount of the target resource user; the target resource user is a resource user of the subscriber type; If the resource usage of the target resource user is less than the corresponding resource subscription amount, determining an average billing model; If there is no target resource user whose resource usage is less than the corresponding resource subscription amount, an overage billing model is determined.

4. The method according to claim 1, characterized in that: The charging price model corresponding to the average charging model in the excess resource charging mode is the average price model, and the charging price corresponding to each resource user is generated according to the determined charging price model, including: Determining the planned unit price in the resource subscription record according to the average unit price model; The first resource billing total amount of the target resource user is calculated according to the planned unit price and the actual resource usage of the target resource user; the planned unit price is the monthly billing unit price of the virtual machine determined by averaging the monthly fee of the virtual machine according to the number of monthly hours; the target resource user is a resource user of the subscriber type; A billing unit price corresponding to each resource user is generated by performing a ratio calculation based on the actual total billing amount of the resource, the target resource subscription billing amount, the first resource billing total amount, and the target resource usage in the resource consumption log; The target resource subscription billing amount is the monthly fee for the virtual machine corresponding to the resource subscriber who has used up the resource subscription amount; the target resource usage is the total actual usage hours of the virtual machine other than the first resource subscriber; the first resource subscriber is a resource subscriber who has not used the resource subscription amount.

5. A data processing device, characterized in that: The device comprises: The acquisition module is used to obtain resource subscription records and resource consumption logs; An identification module, used to identify the role type of each resource user in the resource consumption log; A determination module, configured to determine a target resource billing model according to the resource subscription record, the resource consumption log, and the role type of each resource user, and determine a billing unit price model corresponding to the target resource billing model; the target resource billing model includes a resource billing strategy; A generating module, used to generate a corresponding billing unit price for each resource user according to the determined billing unit price model; A billing module, used to determine the resource billing of each resource user according to the billing unit price and the resource billing policy matching the role type of the resource user; The determination module is specifically used to determine the target resource billing mode according to the total resource subscription amount in the resource subscription record and the total actual resource usage amount in the resource consumption log; Under the target resource billing mode, a target resource billing model is determined according to the role type of each resource user and the resource usage of each resource user; The determination module is further configured to determine an excess resource billing mode if the total resource subscription amount in the resource subscription record is less than or equal to the actual resource usage amount; If the total amount of resource subscription in the resource subscription record is greater than the actual usage of the resource, determining a quantitative allocation resource billing mode; Among them, the excess resource billing mode corresponds to an average billing model and an excess billing model, and the quantitative shared resource billing mode corresponds to a shared billing model.

6. The device according to claim 5, characterized in that The identification module is specifically used to compare the resource subscriber in the resource subscription record with the resource user in the resource consumption log; If the resource consumption log contains the resource user that is consistent with the resource subscriber, determining that the role type of the resource user is a subscriber type; If the resource user that is consistent with the resource subscriber does not exist in the resource consumption log, it is determined that the role type of the resource user is a non-subscriber type.

7. The device according to claim 5, characterized in that The determination module is specifically used to compare the resource subscription amount of each resource subscriber in the resource subscription record with the resource usage amount of the target resource user under the excess resource billing mode; the target resource user is a resource user of the subscriber type; If the resource usage of the target resource user is less than the corresponding resource subscription amount, determining an average billing model; If there is no target resource user whose resource usage is less than the corresponding resource subscription amount, an overage billing model is determined.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Service charging method and system under cloud computing environment

    CN104333456A

  • Management method and apparatus for network sharing

    CN105264925A