CN114240416A - Data processing method, data processing device, computer equipment and storage medium - Google Patents

Data processing method, data processing device, computer equipment and storage medium Download PDF

Info

Publication number
CN114240416A
CN114240416A CN202111361553.6A CN202111361553A CN114240416A CN 114240416 A CN114240416 A CN 114240416A CN 202111361553 A CN202111361553 A CN 202111361553A CN 114240416 A CN114240416 A CN 114240416A
Authority
CN
China
Prior art keywords
resource
charging
user
unit price
model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111361553.6A
Other languages
Chinese (zh)
Inventor
徐欢欢
卞坚宇
李维舟
庄彦宇
崔潇丹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Pudong Development Bank Co Ltd
Original Assignee
Shanghai Pudong Development Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Pudong Development Bank Co Ltd filed Critical Shanghai Pudong Development Bank Co Ltd
Priority to CN202111361553.6A priority Critical patent/CN114240416A/en
Publication of CN114240416A publication Critical patent/CN114240416A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/14Payment architectures specially adapted for billing systems
    • G06Q20/145Payments according to the detected use or quantity

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present application relates to a data processing method, apparatus, computer device, storage medium and computer program product. The method comprises the following steps: acquiring a resource subscription record and a resource consumption log; identifying the role type of each resource user in the resource consumption log; determining a target resource charging model according to the resource subscription record, the resource consumption log and the role type of each resource user, and determining a charging unit price model corresponding to the target resource charging model; the target resource charging model comprises a resource charging strategy; generating a charging unit price corresponding to each resource user according to the determined charging unit price model; and determining the resource charging of each resource user according to the charging unit price and the resource charging strategy matched with the role type of the resource user. The method realizes the automatic resource charging in the subscription system.

Description

Data processing method, data processing device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data processing method, an apparatus, a computer device, a storage medium, and a computer program product.
Background
The resource charging of the current cloud computing service platform is divided into a plurality of modes, for example, a volume charging mode and a monthly payment charging mode for a virtual machine. And aiming at different charging modes, the cloud computing service platform generates corresponding bill data and pushes the bill data to a unified account of the resource subscriber so that the resource subscriber can share the internal use cost based on the transaction data in the bill data.
However, in the monthly payment mode for the virtual machine, because the specific resource allocation data details of the virtual machine cannot be given in the bill data generated by the cloud computing service platform, and only the total cost of the resource is included, based on the fuzzy bill data, the resource subscriber cannot know the resource consumption condition of the virtual machine by each department inside, and cannot generate detailed bill records to share the internal cost.
Disclosure of Invention
In view of the above, it is necessary to provide a data processing method, an apparatus, a computer device, a computer readable storage medium, and a computer program product for solving the above technical problems.
In a first aspect, the present application provides a data processing method. The method comprises the following steps:
acquiring a resource subscription record and a resource consumption log;
identifying a role type for each resource user in the resource consumption log;
determining a target resource charging model according to the resource subscription record, the resource consumption log and the role type of each resource user, and determining a charging unit price model corresponding to the target resource charging model; the target resource charging model comprises a resource charging strategy;
generating a charging unit price corresponding to each resource user according to the determined charging unit price model;
and determining the resource charging of each resource user according to the charging unit price and the resource charging strategy matched with the role type of the resource user.
In one embodiment, the identifying the role type of each resource user in the resource consumption log comprises:
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 consistent with the resource subscriber, determining the role type of the resource user as the subscriber type;
and if the resource user consistent with the resource subscriber does not exist in the resource consumption log, determining that the role type of the resource user is a non-subscriber type.
In one embodiment, the determining a target resource billing model according to the resource subscription record, the resource consumption log, and the role type of each resource user includes:
determining a target resource charging mode according to the resource subscription total amount in the resource subscription record and the actual resource use total amount in the resource consumption log;
and under the target resource charging mode, determining a target resource charging model according to the role type of each resource user and the resource usage amount of each resource user.
In one embodiment, the determining 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 includes:
if the total resource subscription amount in the resource subscription record is less than or equal to the actual usage amount of the resource, determining an excess resource charging mode;
and if the total resource subscription amount in the resource subscription record is larger than the actual resource usage amount, determining a quantitative apportionment resource charging mode.
In one embodiment, in the target resource charging mode, determining a target resource charging model according to the role type of each resource user and the resource usage amount of each resource user includes:
comparing the resource subscription amount of each resource subscriber in the resource subscription record with the resource usage amount of the target resource user in an excess resource charging mode; the target resource user is a subscriber type resource user;
if the resource usage amount of the target resource user is smaller than the corresponding resource subscription amount, determining an average charging model;
and if the resource usage amount of the target resource user is not smaller than the corresponding resource subscription amount, determining an excess charging model.
In one embodiment, the charging unit price model is an average unit price model, and generating the charging unit price corresponding to each resource user according to the determined charging unit price model includes:
determining a plan unit price in the resource subscription record according to an average unit price model;
calculating a first resource charging sum of the target resource user according to the planned unit price and the actual resource usage amount of the target resource user;
and calculating a ratio according to the actual charging total amount of the resources, the target resource subscription charging amount, the first resource charging total amount and the target resource usage amount in the resource consumption log to generate a charging unit price corresponding to each resource user.
In a second aspect, the present application further provides a data processing apparatus. The device comprises:
the acquisition module is used for acquiring resource subscription records and resource consumption logs;
the identification module is used for identifying the role type of each resource user in the resource consumption log;
the determining module is used for determining a target resource charging model according to the resource subscription record, the resource consumption log and the role type of each resource user and determining a charging unit price model corresponding to the target resource charging model; the target resource charging model comprises a resource charging strategy;
the generating module is used for generating the charging unit price corresponding to each resource user according to the determined charging unit price model;
and the charging module is used for determining the resource charging of each resource user according to the charging unit price and the resource charging strategy matched with the role type of the resource user.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the following steps when executing the computer program:
acquiring a resource subscription record and a resource consumption log;
identifying a role type for each resource user in the resource consumption log;
determining a target resource charging model according to the resource subscription record, the resource consumption log and the role type of each resource user, and determining a charging unit price model corresponding to the target resource charging model; the target resource charging model comprises a resource charging strategy;
generating a charging unit price corresponding to each resource user according to the determined charging unit price model;
and determining the resource charging of each resource user according to the charging unit price and the resource charging strategy matched with the role type of the resource user.
In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
acquiring a resource subscription record and a resource consumption log;
identifying a role type for each resource user in the resource consumption log;
determining a target resource charging model according to the resource subscription record, the resource consumption log and the role type of each resource user, and determining a charging unit price model corresponding to the target resource charging model; the target resource charging model comprises a resource charging strategy;
generating a charging unit price corresponding to each resource user according to the determined charging unit price model;
and determining the resource charging of each resource user according to the charging unit price and the resource charging strategy matched with the role type of the resource user.
In a fifth aspect, the present application further provides a computer program product. The computer program product comprising a computer program which when executed by a processor performs the steps of:
acquiring a resource subscription record and a resource consumption log;
identifying a role type for each resource user in the resource consumption log;
determining a target resource charging model according to the resource subscription record, the resource consumption log and the role type of each resource user, and determining a charging unit price model corresponding to the target resource charging model; the target resource charging model comprises a resource charging strategy;
generating a charging unit price corresponding to each resource user according to the determined charging unit price model;
and determining the resource charging of each resource user according to the charging unit price and the resource charging strategy matched with the role type of the resource user.
According to the data processing method, the data processing device, the computer equipment, the storage medium and the computer program product, the computer equipment acquires the resource subscription record and the resource consumption log; a role type for each resource consumer in the resource consumption log is identified. Then, the computer equipment determines a target resource charging model according to the resource subscription record, the resource consumption log and the role type of each resource user, and determines a charging unit price model corresponding to the target resource charging model. Wherein the target resource charging model comprises a resource charging policy. Further, the computer equipment generates a charging unit price corresponding to each resource user according to the determined charging unit price model; and then, determining the resource charging of each resource user according to the charging unit price and the resource charging strategy matched with the role type of the resource user. By adopting the method, the target resource charging model is determined through the resource subscription record and the subscription information in the resource consumption log, the charging unit price is further determined according to the resource charging strategy and the charging unit price model in the target resource charging model, and the resource charging is carried out aiming at each resource user, so that the automatic resource charging in the subscription system is realized.
Drawings
FIG. 1 is a flow diagram illustrating a data processing method according to one embodiment;
FIG. 2 is a flowchart illustrating the step of identifying a role type for a resource consumer in one embodiment;
FIG. 3 is a flowchart illustrating the steps of determining a resource charging mode in one embodiment;
FIG. 4 is a flowchart illustrating the steps of dividing the charging mode of the target resource in one embodiment;
FIG. 5 is a flowchart illustrating the steps of determining a target resource billing model in one embodiment;
FIG. 6 is a flowchart illustrating the step of calculating a billing unit price in one embodiment;
FIG. 7 is an exemplary flow diagram of a data processing method in one embodiment;
FIG. 8 is a block diagram showing the structure of a data processing apparatus according to an embodiment;
FIG. 9 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The current cloud computing service platform (referred to as a cloud service platform for short) is used as a provider of cloud computing services, and a plurality of resource charging modes are provided, for example, charging modes for virtual machine resources can be divided into a monthly charging mode and a volume charging mode, in the monthly charging mode, the cloud service platform charges monthly by taking a whole month (744 hours) as a unit, wherein an average charging price per unit time (for example, per hour) of a virtual machine is less than a charging price of the resource usage per unit time in the volume charging mode, and the charging price is used as a benefit of the charging mode. Because the cloud service platform can open the resources subscribed by the user to the unified account of the user, and cannot limit the use of the resources by each system in the user, the cloud service platform cannot give detailed charging according to the use condition of the resources in the user even under the possible use condition of multiple resources in the system in the user, and therefore, the user as the cloud service user cannot carry out data statistics on cost calculation or internal resource charging apportionment.
In an embodiment, as shown in fig. 1, a data processing method is provided, and this embodiment is illustrated by applying the method to a terminal, and it is to be understood that the method may also be applied to a server, and may also be applied to a system including the terminal and the server, and is implemented by interaction between the terminal and the server. The terminal may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, and the like, which is not limited in this application. In this embodiment, terminal devices are collectively referred to as computer devices, and the method includes the following steps:
step 102, obtaining a resource subscription record and a resource consumption log.
In implementation, a user side subscribes to cloud service resources according to expected requirements, generates corresponding cloud service resource subscription records, submits the resource subscription records to a cloud service platform for resource subscription, and meanwhile, a computer system in the user side reserves the resource subscription records for resource data charging analysis. Specifically, the resource subscription record includes resource subscribers who plan to subscribe to resources inside the user and a planned resource subscription amount corresponding to each resource subscriber, for example, the virtual machine subscription record for the monthly subscription mode includes: a user side A system subscribes 1 virtual machine in the monthly wrapping form; the user side B system subscribes 2 virtual machines in the monthly wrapping form; and the user side C system subscribes 1 virtual machine in the monthly subscription form, and the user side integrally subscribes 4 virtual machines in the monthly subscription form.
The monthly subscription form of the virtual machine means that in the charging mode for the virtual machine, the resource use condition is not measured by the flow, bandwidth, times and the like of the specific virtual machine, but the use condition of the virtual machine is quantified according to the monthly hours. Therefore, the resource usage amount in the form of Baumy in the embodiments of the present application refers to the number of hours of the consumed Baumy virtual machine, and is not specific to the traffic data, and the meaning of the noun in the embodiments of the present application is not repeated. In the above example, taking the number of hours for each month of the month as an example, the total amount of the user-side total virtual machine resources (i.e., the number of hours) in the virtual machine subscription record is 744 × 4 hours.
In a specific resource using process, each system of a user side records each resource using party and corresponding resource using amount along with a resource consumption log in the process of using a virtual machine, and further, when resource charging is required, the computer device acquires a locally stored resource subscription record of the month and a resource consumption log of the month, so as to charge the resource of each resource using party of an internal system according to the resource subscription record and the resource consumption log.
Step 104, identifying the role type of each resource user in the resource consumption log.
In an implementation, a computer device identifies a role type for each resource consumer in a resource consumption log of an internal system, wherein the role types for the resource consumers include a subscriber type and a non-subscriber type.
Specifically, after the user side platform subscribes the cloud service resources, the cloud service platform opens the cloud service resources to the user side account and performs resource usage amount statistics, but the cloud service platform cannot set the authority of the internal system of the user side account to use the cloud service resources (for example, virtual machine resources), and the consumption and the use of the virtual machine resources in the monthly payment are realized in a first-come first-get mode, so that all systems in the user side can consume the total resource subscription amount under the unified user side platform account number. This results inside the user side system: the subsystem a is a resource subscriber and can perform resource consumption, and the subsystem D is a non-resource subscriber (not performing resource subscription) and can also perform resource consumption. Thus, the computer device needs to identify in advance the role type of each resource user in the resource subscription record.
And step 106, determining a target resource charging model according to the resource subscription record, the resource consumption log and the role type of each resource user, and determining a charging unit price model corresponding to the target resource charging model.
Wherein the target resource charging model comprises a resource charging policy.
In implementation, the computer device determines a resource charging mode of the cloud service according to the identified role type of each resource user, and according to the resource subscription information contained in the resource subscription record and the size relationship between the resource usage amount corresponding to each resource user in the resource consumption log, and further, under different resource charging modes, the computer device determines a corresponding target resource charging model and a charging unit price model corresponding to the target resource charging model. For example, according to the relationship between the resource subscription amount and the actual resource usage amount, the computer device determines an excess resource charging mode or a quantitative apportionment resource charging mode, where the excess resource charging mode corresponds to an average charging model and an excess charging model, and the quantitative apportionment resource charging mode corresponds to an apportionment charging model. Each target resource charging model comprises a resource charging strategy formulated aiming at each user side role type. Meanwhile, the target resource charging model in different resource charging modes also corresponds to the charging unit price model in the resource charging mode, so that the computer equipment can determine the charging unit price required by the charging strategy in the target resource charging model according to the charging unit price model and charge the resources based on the charging unit price and the actual resource usage of each user party.
And 108, generating a charging unit price corresponding to each resource user according to the determined charging unit price model.
In implementation, under the determined resource charging mode, the user side computer device calculates the charging unit price corresponding to each resource user according to the determined charging unit price model.
Step 110, determining 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.
In an implementation, the computer device determines a resource charge for each resource consumer based on the charging unit price and a resource charging policy that matches the role type of the resource consumer.
Specifically, in the determined target resource charging mode, the corresponding target resource charging model includes the resource charging policy corresponding to the resource user of each role type in the resource charging mode, and the charging unit price model corresponding to the target resource charging model can be used for calculating the charging unit price required by each charging policy in the target resource charging model, so that the computer device can perform resource charging on each resource user recorded in the resource consumption log according to the target resource charging model and the charging unit price model.
Optionally, the computer device may write the resource charging data of each resource user into a preset charging template, generate a resource charging bill of each resource user, where each resource charging bill carries identification information (for example, name information of the resource user) of the corresponding resource user, and push the resource charging bill to a system of each internal resource user according to the carried identification information and a distribution path corresponding to the identification information, so as to perform a bill announcement.
In the data processing method, the computer equipment acquires a resource subscription record and a resource consumption log; the role type of each resource user in the resource consumption log is identified. Then, the computer equipment determines a target resource charging model according to the resource subscription record, the resource consumption log and the role type of each resource user, and determines a charging unit price model corresponding to the target resource charging model. Wherein the target resource charging model comprises a resource charging policy. Further, the computer equipment generates a charging unit price corresponding to each resource user according to the determined charging unit price model; and then, determining the resource charging of each resource user according to the charging unit price and the resource charging strategy matched with the role type of the resource user. By adopting the method, the target resource charging model is determined through the resource subscription record and the subscription information in the resource consumption log, the charging unit price is further determined according to the resource charging strategy and the charging unit price model in the target resource charging model, and the resource charging is carried out aiming at each resource user, so that the automatic resource charging in the subscription system is realized.
In an embodiment, as shown in fig. 2, in the process of resource usage, a non-resource subscriber and a resource subscriber under a unified account of a user side may both perform resource usage, and corresponding resource charging is required for different role types, so that a computer device needs to identify a role type of each resource user in a resource consumption log in advance, and there are a plurality of methods for identifying a role type of a resource user, in this embodiment, a method for identifying by using a resource subscription record is taken as an example for description, and then the specific processing procedure of step 102 includes the following steps:
step 202, comparing the resource subscriber in the resource subscription record with the resource user in the resource consumption log.
In implementation, since the resource subscription records pre-record the resource subscription conditions of each system inside 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.
Specifically, the computer device compares the resource subscriber in the resource subscription record with the resource user in the resource consumption log, and determines whether the resource user in the resource consumption log exists in the resource subscription record. For example, the resource consumers included in the resource consumption log are system a, system B, system C, system D, and system H. According to the resource subscriber recorded in the resource subscription record: and the system A, the system B and the system C compare and judge the role types of the resource users.
Step 204, if the resource consumption log contains the resource user consistent with the resource subscriber, determining the role type of the resource user as the subscriber type.
In implementation, if the resource consumption log includes a resource user consistent with the resource subscriber, the role type of the resource user is determined to be the subscriber type. For example, the system a (resource user) included in the resource consumption log is the system a of the resource subscriber in advance that can be queried in the resource subscription record (the system names of the two are identified as identical), and it is determined that the role type of the resource user, system a, in the resource charging process is the subscriber type.
In step 206, if there is no resource user consistent with the resource subscriber in the resource consumption log, the role type of the resource user is determined to be a non-subscriber type.
In an implementation, if there is no resource consumer in the resource consumption log that is consistent with the resource subscriber, the computer device determines that the role type of the resource consumer 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, i.e. the system H, in the resource charging process is the non-subscriber type.
Optionally, in addition to identifying the role type of each resource user through the resource subscription record, the resource users may also be identified in a form of tagging, and further, when the resource users use the resources, the resource users in the resource consumption log may carry the subscriber identities, so that the resource users serving as the resource subscribers in the resource consumption log are identified in the resource charging process. In summary, there are various methods for identifying a role type of a resource user, and the embodiments of the present application are not limited.
In an embodiment, as shown in fig. 3, if different target resource charging models correspond to the comparison relationship between the subscription amount of the user and the actual resource usage, the specific process of determining the target resource charging model in step 106 includes the following steps:
step 302, determining a target resource charging 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.
In implementation, the computer device determines the target resource charging 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. Specifically, the resource subscription record includes the total resource subscription amount (also referred to as total resource subscription hours) of the user, so that the computer device may determine the use condition of the user's entire resource, that is, determine the corresponding target resource charging mode, according to the size relationship between the total resource subscription amount and the actual resource usage amount recorded in the resource consumption log.
And step 304, under the target resource charging mode, determining a target resource charging model according to the role type of each resource user and the resource usage amount of each resource user.
In implementation, under the determined target resource charging mode, the computer device determines a target resource charging model according to the role type of each resource user and the resource available amount of each resource user. For example, in the determined excess resource charging mode, since the total resource usage of the user side exceeds the total resource subscription amount, an excess resource charging model containing an excess resource charging policy is determined, and the resource charging apportionment policy for charging the excess resource usage according to the excess unit price when the actual usage of the user exceeds the subscription amount is contained in the excess resource charging model.
In an embodiment, as shown in fig. 4, in the above embodiment, the computer device determines the target resource charging mode according to the size relationship between the total resource subscription amount and the actual resource usage amount, and a specific processing procedure thereof, that is, a specific procedure of step 302, includes the following steps:
step 402, if the total resource subscription amount in the resource subscription record is less than or equal to the actual usage amount of the resource, determining an excess resource charging mode.
In implementation, if the total resource subscription amount in the resource subscription record is less than or equal to the actual resource usage amount, the computer device determines that the resource is overused on the basis of the resource subscription amount of the user side, and further, according to the resource overuse condition, the computer device is matched with an overresource charging mode in advance, and is triggered to enter the overresource charging mode to calculate the resource charging.
And step 404, if the total resource subscription amount in the resource subscription record is larger than the actual resource usage amount, determining a quantitative apportionment resource charging mode.
In implementation, if the total resource subscription amount in the resource subscription record is greater than the actual resource usage amount, the computer device determines that the user does not completely use the subscription resource, and further, according to the condition that the subscription resource is not completely used, the computer device matches a quantitative apportionment resource charging mode in advance, and triggers to enter the quantitative apportionment resource charging mode to calculate the resource charging.
Specifically, the quantitative apportionment resource charging model corresponds to an apportionment charging model (i.e., one of the target resource charging models), and the apportionment charging model corresponds to an apportionment unit price model (one of the charging unit price models).
For the condition that the resource subscription amount is larger than the resource usage amount, charging sharing is performed among each resource user, so under the target resource charging model (sharing charging model), the role types of the resource users are not limited, and the resource charging strategies are as follows:
resource charge is the actual resource usage by the apportionment unit price
The apportioned unit price is determined by an apportioned unit price model, and is the total amount of subscribed resources divided by the total amount of actually used resources (i.e. the number of actually used hours of the resources).
In one embodiment, as shown in fig. 5, the target resource charging mode includes a plurality of charging modes, which is exemplified by the excess resource charging mode in step 404, and it is noted that in the excess resource charging mode, due to the different role types of the resource users, the excess situation for the resource usage can be caused by resource users with a plurality of role types. First, resource excess conditions caused by the use of resources by all resource subscribers (i.e., the role types of the resource users are all subscriber types); second, resource overruns caused by resource subscribers and non-resource subscribers using resources; third, resource overburdening caused by the use of resources by all non-resource subscribers (this situation is negligible because in practical applications it is rare for a resource subscriber to subscribe to a resource and not use it). Therefore, in order to implement fairness of resource charging, if there is a difference between charging algorithms of a resource subscriber and a non-resource subscriber, a target resource charging model corresponding to each situation is further determined in an excess resource charging mode, and the specific processing procedure of step 304 includes the following steps:
step 502, comparing 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 charging mode.
Wherein the target resource user is a subscriber type resource user.
In an implementation, in the excess resource billing mode, the computer device checks whether the resource subscribers (i.e. the resource users of the subscriber type) recorded in the resource consumption log use the resources according to the planned resource usage (i.e. the resource subscription) of each resource subscriber in the resource subscription amount, and specifically, the computer device may compare the resource subscription amount of each resource subscriber in the resource subscription record with the resource usage amount of the target resource user (the resource users of the subscriber type).
Step 504, if the resource usage amount of the target resource user is smaller than the corresponding resource subscription amount, determining an average charging model.
In implementation, if the resource usage amount of a target resource user (a resource user of a subscriber type) is smaller than the corresponding resource subscription amount, it indicates that the target resource user does not fully use the resource in the resource usage amount interval that the target resource user can enjoy, but there is another resource user that utilizes the resource usage amount that enjoys the monthly subscription-type discount price.
For example, the resource subscriber a system, the resource subscriber B system, and the resource subscriber C system recorded in the resource subscription record all subscribe to the virtual machine in a monthly subscription form, and in the actual use process of the resources, the actual resource usage amount of the system B is smaller than the resource subscription amount thereof, and in the case of the overall excess amount on the user side, this means that other users enjoy the resources unused by the virtual machine monthly subscription unit price in the process of using the resources of the virtual machine, and the excess amount of the unused resources is caused. At this time, if the subscriber system B still pays the monthly payment of the resources (i.e. virtual machines) of the whole month, and other users enjoy the resource usage amount which is not fully used by the system B, the resource charging would be unreasonable, and therefore, the computer device determines the average charging model to perform resource charging for such a situation.
Specifically, when the resource subscriber (i.e. the resource using party of the subscriber type) does not use its own resource subscription amount but the user party uses the resource in excess as a whole, the resource charging unit price of the remaining resource usage amount is determined according to an average unit price model (charging unit price model) corresponding to the average charging model in the embodiment of the present application. For convenience of description, a resource subscriber who has not used up the resource subscription amount, for example, a resource subscriber of system B type, is referred to as a first resource subscriber in this application, in this case, except the first resource subscriber, other resource subscribers all occupy the resource subscription amount of the first resource subscriber, and also cause an excess of the entire resource usage amount of the user, so that no matter other resource subscribers use the resource, they all need to share the charging of the resource subscription amount remaining by the first resource subscriber and the charging of the excess portion calculated according to the excess price amount. Therefore, the average unit price model counts the total amount corresponding to the actual resource usage amount of the first resource subscriber and the resource usage amount exceeding the total resource subscription amount subtracted from the total resource subscription amount, and calculates the charging unit price (i.e., the average apportioned unit price) after the total amount is apportioned among the target objects (i.e., other resource subscribers except the first resource subscriber).
Further, after the charging unit price is determined, each resource user is charged by using a plurality of resource charging policies included in the average charging model (target resource charging model) as follows:
the resource charging of the resource user for the subscriber type with excess resource usage is the virtual machine monthly fee + (actual resource usage-resource subscription amount) × charging unit price.
The resource usage for the subscriber type that does not over-use the resource is billed as the actual resource usage by the projected unit price.
Charging the resource of the resource user of the non-subscription type, namely the actual resource usage amount.
The resource usage amount can correspond to the number of hours of use of the virtual machine, and the planning unit price is a virtual machine monthly payment unit price which is determined by averaging the monthly payment of the virtual machine according to the monthly payment number. The charging unit price is an apportioned unit price determined by an average unit price model (i.e., a charging unit price model corresponding to the target resource charging model), specifically, a process of determining the apportioned unit price by the average unit price model is described in detail in the following embodiments, which are not described in detail herein.
Step 506, if the resource usage amount of the target resource user is not less than the corresponding resource subscription amount, determining an excess charging model.
In implementation, if the resource usage amount of the target resource user (i.e. the resource subscriber) is not less than the corresponding resource subscription amount, it indicates that all the resource subscription amounts planned in advance by the resource subscriber are used up, and there is no resource usage amount for resource charging at a preferential price in the form of monthly payment in the resource charging, so that the computer device is triggered to determine the excess charging model for such a situation.
Specifically, the excess charging model includes a resource policy that matches a role type and a resource usage amount of each resource user, which is specifically as follows:
resource usage for subscriber type: the resource charging is the virtual machine monthly fee + (actual using hours-monthly planning hours) and the excess unit price per volume.
Resource usage for non-subscriber types: resource billing is the actual hours of use by the premium per-volume unit price.
In an embodiment, as shown in fig. 6, based on the description in the foregoing embodiment, a specific process of determining the charging unit price by the average unit price model, that is, step 108 includes the following steps:
step 602, determining a planning unit price in the resource subscription record according to the average unit price model.
In the implementation, the computer device executes a unit price algorithm in the charging unit price model, determines a planned unit price in the resource subscription record, and specifically, according to the monthly payment of a single virtual machine in the monthly payment form recorded in the resource subscription record and the corresponding monthly payment resource usage (monthly payment hours) of the single virtual machine, may determine a unit price of the monthly payment resource usage, that is, the planned unit price is the monthly payment of the single virtual machine divided by the monthly payment hours, where the planned unit price is a preferential unit price enjoying the monthly payment form, and may also be referred to as monthly payment of the virtual machine.
Step 604, calculating a first resource billing sum of the target resource user according to the planned unit price and the actual resource usage amount of the target resource user.
In an implementation, the computer device calculates a first resource billing sum of the target resource user according to the planned unit price and an actual resource usage amount of the target resource user (a resource user who does not use the resource subscription amount, that is, a first resource user). Specifically, the formula of the first resource charging sum is as follows:
the first total resource charge is the actual resource usage (actual hours of use) per projected unit price.
Step 606, calculating the ratio according to the actual charging total amount of the resource, the target resource subscription charging amount, the first resource charging total amount and the target resource usage amount in the resource consumption log, and generating the charging unit price corresponding to each resource user.
In implementation, the computer performs ratio calculation according to the actual charging total amount of the resource, the target resource subscription charging amount (i.e. the monthly fee of the virtual machine corresponding to the resource subscriber who has used up the resource subscription amount), the first resource charging total amount, and the target resource usage amount (i.e. the total hours of actual usage of the virtual machines except the first resource subscriber) in the resource consumption log, so as to generate the charging unit price corresponding to each resource usage party.
The specific formula is as follows:
charging unit price (resource actual charging total amount-target resource subscription charging amount-first resource charging total amount)/(actual consumption total hours-target resource subscription hours-first resource subscriber actual consumption hours)
Optionally, in addition to the usage cost of the used resources, there may be other special costs in the cloud service platform, and such a cost is generally a fixed value, so in the resource charging policy included in the resource charging model in each of the above cases, the resource charging of each resource user is added with the apportionment charging of one other special cost.
The apportionment charging of other special fees is divided into other fees and resource user quantity.
If the cloud service platform fails to provide the detailed data of the other charge amount, the computer device may also subtract the virtual machine charge from the total resource charge provided by the cloud service platform, so as to be equal to the other charge amount.
In one embodiment, as shown in fig. 7, an example of a data processing method is provided, the example comprising the steps of:
step 701, comparing the total resource subscription amount in the resource subscription record with the total resource actual usage amount in the resource consumption log, and if the total resource subscription amount is greater than the total resource actual usage amount, executing step 702. If the total resource subscription amount is less than or equal to the total resource actually used, step 703 is executed.
Step 702, determining a quantitative apportioned resource charging mode, and determining an apportioned charging model and an apportioned single machine model corresponding to the apportioned charging model in the quantitative apportioned resource charging mode.
The apportioned unit price determined by the apportioned unit price model is the total amount of the resource subscription and the total amount of the actual use of the resource (namely the actual use hours of the resource)
And (3) carrying out resource charging on each resource user in the resource consumption log according to the apportionment charging model: the resource charge is the actual resource usage amount per unit price.
Step 703, determining an excess resource charging mode, and comparing the resource subscription amount of each resource subscriber in the resource subscription record with the resource usage amount of the resource user of the subscriber type in the excess resource charging mode, if the resource usage amount of the resource user of the subscriber type is less than the resource subscription amount, executing step 704, and if the resource usage amount of the resource user of the subscriber type is not less than the resource subscription amount, executing step 706.
Step 704, determine the average charging model, and determine the average unit price model corresponding to the average charging model.
Step 705, calculating the charging unit price according to the average unit price model, and charging the resource using party of each role type according to the multiple resource charging policies contained in the average charging model.
The resource charging of the resource user for the subscriber type with excess resource usage is the virtual machine monthly fee + (actual resource usage-resource subscription amount) × charging unit price.
The resource usage for the subscriber type that does not over-use the resource is billed as the actual resource usage by the projected unit price.
Charging the resource of the resource user of the non-subscription type, namely the actual resource usage amount.
Step 706, determining an excess charging model, and charging the resources according to the role type and resource usage amount of each resource user included in the excess charging model.
Resource usage for subscriber type: the resource charging is the virtual machine monthly fee + (actual using hours-monthly planning hours) and the excess unit price per volume.
Resource usage for non-subscriber types: resource billing is the actual hours of use by the premium per-volume unit price.
It should be understood that, although the steps in the flowcharts related to the embodiments as described above are sequentially displayed as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the flowcharts related to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or stages is not necessarily sequential, but may be rotated or alternated with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the present application further provides a data processing apparatus for implementing the above-mentioned data processing method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more embodiments of the data processing device provided below may refer to the limitations on the data processing method in the above description, and are not described herein again.
In one embodiment, as shown in fig. 8, there is provided a data processing apparatus 800 comprising: an obtaining module 801, an identifying module 802, a determining module 803, a generating module 804 and a charging module 805, wherein:
an obtaining module 801, configured to obtain a resource subscription record and a resource consumption log;
an identifying module 802, configured to identify a role type of each resource user in the resource consumption log;
a determining module 803, configured to determine a target resource charging model according to the resource subscription record, the resource consumption log, and the role type of each resource user, and determine a charging unit price model corresponding to the target resource charging model; the target resource charging model comprises a resource charging strategy;
a generating module 804, configured to generate a charging unit price corresponding to each resource user according to the determined charging unit price model;
the charging module 805 is configured to determine 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.
In one embodiment, the identifying module 802 is specifically configured 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 consistent with the resource subscriber, determining the role type of the resource user as the subscriber type;
and if the resource using party consistent with the resource subscriber does not exist in the resource consumption log, determining that the role type of the resource using party is a non-subscriber type.
In one embodiment, the determining module 803 is specifically configured to determine the target resource charging 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;
and under the target resource charging mode, determining a target resource charging model according to the role type of each resource user and the resource usage amount of each resource user.
In one embodiment, the determining module 803 is further configured to determine an excess resource charging mode if the total resource subscription amount in the resource subscription record is less than or equal to the actual resource usage amount;
and if the total resource subscription amount in the resource subscription record is larger than the actual resource usage amount, determining a quantitative apportionment resource charging mode.
In one embodiment, the determining module 803 is specifically configured 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 charging mode; the target resource user is a resource user of a subscriber type;
if the resource usage amount of the target resource user is smaller than the corresponding resource subscription amount, determining an average charging model;
and if the resource usage amount of the target resource user is not less than the corresponding resource subscription amount, determining an excess charging model.
In one embodiment, if the charging unit price model is an average unit price model, the generating module 804 is specifically configured to determine a planned unit price in the resource subscription record according to the average unit price model;
calculating a first resource charging sum of the target resource user according to the planned unit price and the actual resource usage amount of the target resource user;
and calculating a ratio according to the actual charging total amount of the resources, the target resource subscription charging amount, the first resource charging total amount and the target resource usage amount in the resource consumption log to generate a charging unit price corresponding to each resource user.
The various modules in the data processing apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 9. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile 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 an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a data processing method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 9 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is further provided, which includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
In an embodiment, a computer program product is provided, comprising a computer program which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
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 for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high-density embedded nonvolatile Memory, resistive Random Access Memory (ReRAM), Magnetic Random Access Memory (MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (10)

1. A method of data processing, the method comprising:
acquiring a resource subscription record and a resource consumption log;
identifying a role type for each resource user in the resource consumption log;
determining a target resource charging model according to the resource subscription record, the resource consumption log and the role type of each resource user, and determining a charging unit price model corresponding to the target resource charging model; the target resource charging model comprises a resource charging strategy;
generating a charging unit price corresponding to each resource user according to the determined charging unit price model;
and determining the resource charging of each resource user according to the charging unit price and the resource charging strategy matched with the role type of the resource user.
2. The method of claim 1, wherein the identifying a role type for each resource consumer in the resource consumption log comprises:
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 consistent with the resource subscriber, determining the role type of the resource user as the subscriber type;
and if the resource user consistent with the resource subscriber does not exist in the resource consumption log, determining that the role type of the resource user is a non-subscriber type.
3. The method of claim 1, wherein determining a target resource billing model based on the resource subscription record, the resource consumption log, and the role type of each of the resource consumers comprises:
determining a target resource charging mode according to the resource subscription total amount in the resource subscription record and the actual resource use total amount in the resource consumption log;
and under the target resource charging mode, determining a target resource charging model according to the role type of each resource user and the resource usage amount of each resource user.
4. The method of claim 3, wherein determining a target resource billing model according to the total amount of resource subscriptions in the resource subscription record and the total amount of actual resource usage in the resource consumption log comprises:
if the total resource subscription amount in the resource subscription record is less than or equal to the actual usage amount of the resource, determining an excess resource charging mode;
and if the total resource subscription amount in the resource subscription record is larger than the actual resource usage amount, determining a quantitative apportionment resource charging mode.
5. The method according to claim 3 or 4, wherein in the target resource charging mode, determining a target resource charging model according to the role type of each resource user and the resource usage amount of each resource user comprises:
comparing the resource subscription amount of each resource subscriber in the resource subscription record with the resource usage amount of the target resource user in an excess resource charging mode; the target resource user is a subscriber type resource user;
if the resource usage amount of the target resource user is smaller than the corresponding resource subscription amount, determining an average charging model;
and if the resource usage amount of the target resource user is not smaller than the corresponding resource subscription amount, determining an excess charging model.
6. The method according to claim 1, wherein the charging unit price model is an average unit price model, and the generating a charging unit price corresponding to each resource user according to the determined charging unit price model includes:
determining a plan unit price in the resource subscription record according to an average unit price model;
calculating a first resource charging sum of the target resource user according to the planned unit price and the actual resource usage amount of the target resource user;
and calculating a ratio according to the actual charging total amount of the resources, the target resource subscription charging amount, the first resource charging total amount and the target resource usage amount in the resource consumption log to generate a charging unit price corresponding to each resource user.
7. A data processing apparatus, characterized in that the apparatus comprises:
the acquisition module is used for acquiring resource subscription records and resource consumption logs;
the identification module is used for identifying the role type of each resource user in the resource consumption log;
the determining module is used for determining a target resource charging model according to the resource subscription record, the resource consumption log and the role type of each resource user and determining a charging unit price model corresponding to the target resource charging model; the target resource charging model comprises a resource charging strategy;
the generating module is used for generating the charging unit price corresponding to each resource user according to the determined charging unit price model;
and the charging module is used for determining the resource charging of each resource user according to the charging unit price and the resource charging strategy matched with the role type of the resource user.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 6.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program realizes the steps of the method of any one of claims 1 to 6 when executed by a processor.
CN202111361553.6A 2021-11-17 2021-11-17 Data processing method, data processing device, computer equipment and storage medium Pending CN114240416A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111361553.6A CN114240416A (en) 2021-11-17 2021-11-17 Data processing method, data processing device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111361553.6A CN114240416A (en) 2021-11-17 2021-11-17 Data processing method, data processing device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114240416A true CN114240416A (en) 2022-03-25

Family

ID=80749825

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111361553.6A Pending CN114240416A (en) 2021-11-17 2021-11-17 Data processing method, data processing device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114240416A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114679459A (en) * 2022-05-07 2022-06-28 阿里巴巴(中国)有限公司 Cloud function calling method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114679459A (en) * 2022-05-07 2022-06-28 阿里巴巴(中国)有限公司 Cloud function calling method and device
CN114679459B (en) * 2022-05-07 2024-03-12 阿里巴巴(中国)有限公司 Cloud function calling method and device

Similar Documents

Publication Publication Date Title
CN108090225B (en) Database instance running method, device and system and computer readable storage medium
CN110233741B (en) Service charging method, device, equipment and storage medium
CN108171540A (en) For the method and apparatus of resource metering and billing
CN109325537A (en) Power consumption management method, apparatus, computer equipment and storage medium
Hu et al. Optimal pricing strategy for electric vehicle battery swapping: Pay-per-swap or subscription?
US10944874B2 (en) Telecommunication system for monitoring and controlling of a network providing resource to a user
CN114240416A (en) Data processing method, data processing device, computer equipment and storage medium
CN113037510A (en) Charging method, charging device and computer readable storage medium
US8873083B2 (en) User centric print usage
CN112184278A (en) Capability commodity charging method, capability open platform and capability commodity ordering system
EP3331196B1 (en) Telecommunication system for monitoring and controlling of a network providing resource to a user
CN113315642B (en) Resource metering processing method and device and cloud service system
CN114493598A (en) Computing resource management method, device, computer equipment and storage medium
CN114493756A (en) Resource management method, device, equipment and storage medium
CN111524002A (en) Method and device for determining credit line of joint name card
CN111061558A (en) Method, device, computer equipment and storage medium for processing virtual resource data
CN117196543B (en) Multi-purpose ammeter recharging management method and system based on fund pool
CN111078390A (en) Server resource allocation method and device
WO2024067672A1 (en) Cloud resource charging method, cloud management platform, computing device, and storage medium
WO2023207951A1 (en) Cloud resource billing method and apparatus based on public cloud technology, and cloud management platform
CN114429341B (en) Grouped payment method, device and equipment
CN109801135B (en) Bill generation method and device, computer equipment and storage medium
CN111445229B (en) Internet of things card secret management method, system, equipment and medium
CN116228350A (en) Resource recommendation method and device, storage medium and computer equipment
CN117829929A (en) Resource interaction method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination