Cluster cost charging method and device based on charging item unit price, and electronic equipment

By responding to the cost billing request of the target cluster in cluster cost billing, filtering and sorting the pricing plan list, the problem that cluster cost billing does not support multi-cluster pricing information control and effective time control in the existing technology is solved, and the flexibility and accuracy of cluster cost billing are achieved.

CN119741074APending Publication Date: 2025-04-01INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 17 Cites 0 Cited by

Patent Information

Application Number
CN202411792227.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

The existing cluster cost billing strategy does not support real-time generation and modification of resource unit price information, does not support dynamic control of the effective time of resource unit price information, and does not support the organization of pricing information according to the cluster dimension, resulting in insufficient flexibility and ease of use.

Method used

A cluster cost billing method based on the unit price of the billing item is provided. By responding to the cost billing request of the target cluster, the current pricing plan list is obtained from the billing system, and the pricing plan list that meets the conditions for the effective cluster, the enabled status and the effective time are selected, and the target pricing plan list is determined to calculate the cluster cost based on priority sorting.

Benefits of technology

It realizes the control of pricing information of multiple clusters, supports dynamic control of effective time, improves the flexibility and ease of use of billing strategies, and ensures the accuracy and efficiency of cluster cost billing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741074A_ABST
    Figure CN119741074A_ABST
Patent Text Reader

Abstract

The invention discloses a cluster cost charging method and device based on a charging item unit price and electronic equipment, and relates to the technical field of cloud computing or other related fields, and the method comprises the steps: obtaining a current pricing scheme list in response to a charging request, putting the list into a first alternative list when a list effective cluster comprises a target cluster, and storing the list effective cluster into a second alternative list; obtaining the starting state of the pricing scheme list in the first alternative list, putting the list of which the starting state is starting into a second alternative list, obtaining the effective time of the pricing scheme list in the second alternative list, and putting the list of which the effective time comprises the current time point into a third alternative list, and determining the list ranked as the first priority in the third alternative list as a target pricing scheme list, and calculating a target cluster cost based on pricing details in the list, the pricing details including a charging item name, unit price data and a unit price unit. According to the invention, the technical problem that cluster cost charging does not support multi-cluster pricing information management and control and does not support effective time management and control in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud computing technology or other related fields, and in particular to a cluster cost billing method and device based on billing item unit prices, and electronic equipment. Background Art

[0002] With the popularity of cloud services, cluster management of computing resources has been widely used in computer systems, networks or data center environments. This strategy of centralizing and coordinating multiple servers or multiple nodes can improve the efficiency of computing resources and reduce management costs. In cluster management, cost billing for clusters is the key to achieving high-quality management, especially in business scenarios with high resource consumption. Accurate and real-time cost billing for clusters is not only related to cost control, but also affects the efficiency of resource allocation and the sustainable development of the business.

[0003] In the related technology, the existing cluster cost billing strategy is usually implemented based on pre-configured files. These files set the resource unit price information in advance and are released with the cluster application. When the cluster application is started, the cluster application reads the resource unit price information by loading the configuration file, and uses the read information to calculate the cluster cost. This static configuration strategy meets the needs of cluster cost billing to a certain extent, but it does not support the real-time generation and modification of resource unit price information, does not support dynamic control of the effective time of resource unit price information, and does not support organizing pricing information by cluster dimension. These defects lead to the existing cluster cost billing strategy being insufficient in flexibility and ease of use.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present invention provide a cluster cost billing method and device based on billing item unit price, and an electronic device, so as to at least solve the technical problem that cluster cost billing in the related art does not support multi-cluster pricing information control and does not support effective time control.

[0006] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a cluster cost billing method based on billing item unit price is provided, including: responding to a cost billing request of a target cluster, obtaining a current pricing scheme list from a billing system, and when the effective cluster list in the current pricing scheme list includes the target cluster, placing the current pricing scheme list into a first alternative list; obtaining the enabled status of all pricing scheme lists in the first alternative list, and placing the pricing scheme list with the enabled status as enabled into a second alternative list; obtaining the effective time of all pricing scheme lists in the second alternative list, and placing the pricing scheme list whose effective time includes the current time point into a third alternative list; determining the pricing scheme list sorted as the first priority in the third alternative list as the target pricing scheme list, and calculating the cost of the target cluster based on the pricing details in the target pricing scheme list, wherein the pricing details include: the billing item name, the billing item unit price data, and the billing item unit price unit.

[0007] Optionally, before responding to the cost billing request of the target cluster, it includes: the billing system receives a front-end interface login request initiated by an external terminal; the front-end interface receives a new pricing plan list creation request initiated by an external terminal and input data information of the new pricing plan list, or receives a modification request for the original pricing plan list and input data modification information of the original pricing plan list; wherein the data information or data modification information includes at least one of the following: pricing plan name, pricing plan description information, pricing details, effective cluster list, effective time, enabled status and priority.

[0008] Optionally, the step of receiving data information or data modification information input by an external terminal at the front-end interface of the billing system includes: receiving the pricing scheme name and pricing scheme description information input or modified by the external terminal at the pricing scheme editing page of the front-end interface, wherein the pricing scheme description information includes an introduction to the pricing scheme list; receiving the billing item unit price data input or modified by the external terminal based on the billing item name and the billing item unit price unit in the pricing details, wherein the billing item unit price data is a positive number.

[0009] Optionally, the step of receiving data information or data modification information input by an external terminal by the front-end interface of the billing system also includes: configuring an effective cluster list, receiving one or more clusters selected by the external terminal from the full number of clusters of the billing system, and generating an effective cluster of the pricing scheme list based on the selected cluster; configuring the effective time, receiving the effective time of the pricing scheme list input or modified by the external terminal, wherein the effective time includes: the starting effective time and the ending effective time of the pricing scheme list; configuring the enabled state, receiving the enabled state of the pricing scheme list input or modified by the external terminal, wherein the enabled state includes: started, not started; configuring the priority, receiving the priority of the pricing scheme list input or modified by the external terminal, wherein the priority is used to determine the target pricing scheme list based on the priority when the target cluster is associated with multiple pricing scheme lists.

[0010] Optionally, after putting the pricing scheme list whose effective time includes the current time into the third candidate list, the method includes: when the third candidate list is empty, ending the cost billing operation of the target cluster.

[0011] Optionally, before calculating the cost of the target cluster, the method includes: querying resource usage data of the target cluster, wherein the resource usage data includes usage data of all billing items.

[0012] Optionally, the step of calculating the cost of the target cluster based on the pricing details in the target pricing scheme list includes: obtaining the pricing details in the target pricing scheme list, and parsing the unit price data of all billing items from the pricing details; calculating the cost of each billing item based on the usage data and the parsed unit price data of the billing items, and adding up the costs of all billing items to obtain the cost of the target cluster.

[0013] According to another aspect of an embodiment of the present invention, a cluster cost billing device based on billing item unit price is also provided, including: a first acquisition unit, used to respond to a cost billing request of a target cluster, obtain a current pricing scheme list from a billing system, and put the current pricing scheme list into a first alternative list when the effective cluster list in the current pricing scheme list includes the target cluster; a second acquisition unit, used to obtain the activation status of all pricing scheme lists in the first alternative list, and put the pricing scheme list with the activation status as enabled into the second alternative list; a third acquisition unit, used to obtain the effective time of all pricing scheme lists in the second alternative list, and put the pricing scheme list whose effective time includes the current time point into the third alternative list; a calculation unit, used to determine the pricing scheme list sorted as the first priority in the third alternative list as the target pricing scheme list, and calculate the cost of the target cluster based on the pricing details in the target pricing scheme list, wherein the pricing details include: the billing item name, the billing item unit price data and the billing item unit price unit.

[0014] Optionally, the first acquisition unit includes: a first request module, used by the billing system to receive a front-end interface login request initiated by an external terminal; a second request module, used by the front-end interface to receive a new pricing plan list creation request initiated by an external terminal and input data information of a new pricing plan list, or, to receive an original pricing plan list modification request and input data modification information of the original pricing plan list, wherein the data information or data modification information includes at least one of the following: pricing plan name, pricing plan description information, pricing details, effective cluster list, effective time, enabled status and priority.

[0015] Optionally, the second request module includes: a first receiving sub-module, used to receive the pricing scheme name and pricing scheme description information input or modified by the external terminal on the pricing scheme editing page of the front-end interface, wherein the pricing scheme description information includes an introduction to the pricing scheme list; a second receiving sub-module, used to configure pricing details, and receive the billing item unit price data input or modified by the external terminal based on the billing item name and billing item unit price unit in the pricing details, wherein the billing item unit price data is a positive number.

[0016] Optionally, the second request module also includes: a third receiving sub-module, used to receive one or more clusters selected by an external terminal from the full number of clusters of the billing system, and generate an effective cluster of the pricing scheme list based on the selected cluster; a fourth receiving sub-module, used to receive the effective time of the pricing scheme list input or modified by the external terminal, wherein the effective time includes: the start effective time and the end effective time of the pricing scheme list; a fifth receiving sub-module, used to receive the enabled status of the pricing scheme list input or modified by the external terminal, wherein the enabled status includes: started, not started; a sixth receiving sub-module, used to receive the priority of the pricing scheme list input or modified by the external terminal, wherein the priority is used to determine the target pricing scheme list based on the priority when the target cluster is associated with multiple pricing scheme lists.

[0017] Optionally, the calculation unit includes: a termination module, configured to terminate the cost charging operation of the target cluster when the third candidate list is empty.

[0018] Optionally, the computing unit further includes: a query module, configured to query resource usage data of the target cluster, wherein the resource usage data includes usage data of all billing items.

[0019] Optionally, the calculation unit also includes: a parsing module, which is used to obtain the pricing details in the target pricing plan list and parse out the unit price data of all billing items from the pricing details; a cost calculation module, which calculates the cost of each billing item based on the usage data and the parsed unit price data of the billing items, and adds up the costs of all billing items to obtain the cost of the target cluster.

[0020] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, the computer-readable storage medium including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned cluster cost billing methods based on billing item unit prices.

[0021] According to another aspect of an embodiment of the present invention, an electronic device is also provided, including one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the above-mentioned cluster cost billing methods based on billing item unit prices.

[0022] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, which implements any of the steps of the above-mentioned cluster cost billing method based on billing item unit price when executed by a processor.

[0023] In the present disclosure, by responding to the cost billing request of the target cluster, the current pricing scheme list is obtained from the billing system. When the effective cluster list in the current pricing scheme list includes the target cluster, the current pricing scheme list is placed in the first alternative list, thereby achieving the purpose of controlling the pricing information of multiple clusters. By obtaining the activation status of all pricing scheme lists in the first alternative list, the pricing scheme list with the activation status of startup is placed in the second alternative list, and then the effective time of all pricing scheme lists in the second alternative list is obtained, and the pricing scheme list with the effective time including the current time point is placed in the third alternative list. Then, the pricing scheme list ranked as the first priority in the third alternative list is determined as the target pricing scheme list, thereby achieving the purpose of flexibly controlling the effective time and priority of the pricing scheme. Finally, by calculating the cost of the target cluster based on the pricing details in the target pricing scheme list, the cost billing of the target cluster is realized, thereby solving the technical problem that cluster cost billing in the related technology does not support multi-cluster pricing information control and effective time control. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0025] Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing a cluster cost billing method based on billing item unit price is shown;

[0026] Figure 2is a flow chart of an optional cluster cost billing method based on billing item unit price according to an embodiment of the present invention;

[0027] Figure 3 is a schematic diagram of an optional cluster cost billing device based on billing item unit price according to an embodiment of the present invention;

[0028] Figure 4 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0031] To facilitate those skilled in the art to understand the present invention, some terms or nouns involved in the embodiments of the present invention are explained below:

[0032] Billing item: It is the atomic pricing unit used for metering and billing in the cluster, including: CPU (Central Processing Unit), RAM (Random Access Memory), GPU (Graphics Processing Unit), and Network.

[0033] Pricing details: the unit price information of each billing item in the cluster. The unit price information includes: billing item name, billing item unit price data, and billing item unit price unit.

[0034] Pricing plan: a complete resource pricing plan created in the front-end interface. The plan content includes: pricing plan name, pricing plan description information, pricing details, effective cluster, effective time, priority, and enabled status.

[0035] Effective cluster: It is the effective cluster specified by the pricing plan. Select one or more clusters from all clusters as the effective clusters in the front-end interface.

[0036] Effective time: the start and end time of the plan specified by the pricing plan.

[0037] Plan priority: It is the plan priority specified by the pricing plan. When the same cluster is associated with multiple pricing plans, the pricing plan with the highest priority is used to calculate the cluster cost.

[0038] Plan activation status: It is the plan status of the pricing plan selected. The plan status includes: started and not started.

[0039] It should be noted that the cluster cost billing method based on billing item unit price and its device in the present disclosure can be used in the field of cloud computing technology. When the cluster cost is billed based on the billing item unit price, it can also be used in any field other than the field of cloud computing technology. When the cluster cost is billed based on the billing item unit price, the present disclosure does not limit the application field of the cluster cost billing method based on billing item unit price and its device.

[0040] It should be noted that the 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.) collected by this disclosure are information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data are in compliance with the relevant laws, regulations and standards of the relevant regions, necessary confidentiality measures are taken, and public order and good customs are not violated, and corresponding operation portals are provided for users to choose to authorize or refuse. For example, an interface is set up between this system and relevant users or organizations. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.

[0041] It should be noted that in the present disclosure, when collecting and analyzing customer information, corresponding operation entrances are provided for users to choose to agree or reject the automated decision results; if the user chooses to reject, the expert decision-making process is entered.

[0042] The following embodiments of the present invention can be applied to various systems / applications / devices for cluster cost billing based on billing item unit prices. The present invention obtains the current pricing scheme list from the billing system by responding to the cost billing request of the target cluster, and puts the current pricing scheme list into the first candidate list when the effective cluster list in the current pricing scheme list includes the target cluster, thereby achieving the purpose of controlling the pricing information of multiple clusters, and by obtaining the activation status of all pricing scheme lists in the first candidate list, putting the pricing scheme list with the activation status as enabled into the second candidate list, and then obtaining the effective time of all pricing scheme lists in the second candidate list, putting the pricing scheme list with the effective time including the current time point into the third candidate list, and then determining the pricing scheme list ranked as the first priority in the third candidate list as the target pricing scheme list, thereby achieving the purpose of flexibly controlling the effective time and priority of the pricing scheme, and finally calculating the cost of the target cluster based on the pricing details in the target pricing scheme list, thereby achieving the technical effect that cluster cost billing supports the control of multi-cluster pricing information and supports effective time control.

[0043] The present invention is described in detail below in conjunction with various embodiments.

[0044] Embodiment 1

[0045] According to an embodiment of the present invention, an embodiment of a cluster cost billing method based on billing item unit price is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0046] The cluster cost billing method embodiment based on the billing item unit price provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 The hardware structure block diagram of a computer terminal (or mobile device) for implementing a cluster cost billing method based on billing item unit price is shown. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more ( Figure 1 102a, 102b, ..., 102n are used to illustrate) processor 102 (processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0047] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0048] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the cluster cost billing method based on the unit price of billing items in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the cluster cost billing method based on the unit price of billing items is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0049] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0050] The display may be, for example, a touch screen liquid crystal display (LCD), which may enable a user to interact with a user interface of the computer terminal 10 (or mobile device).

[0051] Under the above operating environment, this application provides Figure 2 The cluster cost billing method shown is based on the unit price of the billing item. Figure 2 is a flow chart of an optional cluster cost billing method based on billing item unit price according to an embodiment of the present invention, such as Figure 2 As shown, the method comprises the following steps:

[0052] Step S201, responding to the cost charging request of the target cluster, obtaining a current pricing scheme list from the charging system, and putting the current pricing scheme list into a first candidate list when the effective cluster list in the current pricing scheme list includes the target cluster.

[0053] The billing system is always ready to receive cost billing requests for a specific cluster (target cluster). After receiving the request, it will first obtain the current latest pricing plan list from the internal cache of the billing system in real time, and then perform a preliminary screening of the obtained pricing plan list to determine the pricing plan list related to the target cluster.

[0054] During the preliminary screening, an "effective cluster list" is extracted from the currently acquired latest pricing plan list. The "effective cluster list" contains all clusters to which the currently acquired latest pricing plan list applies. The embodiment of the present invention determines whether the target cluster exists in the "effective cluster list". If so, the currently acquired latest pricing plan list is placed in the first alternative list; if not, the pricing plan list is skipped without any processing.

[0055] It should be noted that when the billing system needs to process a large number of cost billing requests at the same time, it will face high concurrency. In order to ensure the efficiency of cluster cost billing, the embodiment of the present invention uses a distributed cache to store the pricing scheme list. At the same time, when caching the pricing scheme list, the effective time, activation status and other information can be filtered in advance, and only a part of the pricing scheme list is saved in the cache.

[0056] Step S202, obtaining the activation status of all pricing scheme lists in the first candidate list, and putting the pricing scheme lists with the activation status of "started" into the second candidate list.

[0057] After obtaining the first alternative list, the billing system performs a second screening of the pricing plan list. In this stage, the billing system checks the "enabled status" of each pricing plan list in the first alternative list, which is a key indicator of whether the pricing plan list can take effect. When the "enabled status" is "enabled", it indicates that the corresponding pricing plan list is valid, and the billing system puts the pricing plan list into the second alternative list; when the "enabled status" is "not enabled", it indicates that the corresponding pricing plan list is invalid, and the billing system skips the pricing plan list, does not process it, and continues to obtain the next pricing plan list in the first alternative list.

[0058] Step S203, obtaining the effective time of all pricing scheme lists in the second candidate list, and putting the pricing scheme lists whose effective time includes the current time point into the third candidate list.

[0059] After obtaining the second candidate list, the billing system screens the pricing plan list for the third time to ensure that only the pricing plan list that is valid at the current time point is used for cluster cost calculation. In this stage, the billing system obtains the "effective time" of each pricing plan list in the second candidate list. The "effective time" defines the effective start and end time of the pricing plan list. When the current time point is in the "effective time", it indicates that the corresponding pricing plan list is valid, and the billing system puts the pricing plan list into the third candidate list; when the current time point is outside the "effective time", it indicates that the corresponding pricing plan list is invalid, and the billing system skips the pricing plan list, does not process it, and continues to obtain the next pricing plan list in the second candidate list.

[0060] Step S204, determine the pricing scheme list ranked as the first priority in the third alternative list as the target pricing scheme list, and calculate the cost of the target cluster based on the pricing details in the target pricing scheme list, where the pricing details include: billing item name, billing item unit price data and billing item unit price unit.

[0061] After obtaining the third candidate list, the billing system screens the pricing scheme list for the fourth time. In this stage, the billing system sorts all the pricing scheme lists in the third candidate list according to the pre-configured priority, and selects the pricing scheme list with the highest priority as the target pricing scheme list, that is, when the target cluster is associated with multiple pricing scheme lists, the pricing scheme list with the highest priority will be selected for subsequent cluster cost calculation, which reflects the logic and efficiency of the billing system in handling conflicts among multiple schemes.

[0062] After the target pricing plan list is determined, the billing system calculates the cost of the target cluster based on the pricing details in the target pricing plan list. The pricing details include the unit price information of each billing item, such as the unit price data and unit price units of resources such as CPU (central processing unit), RAM (random access memory), GPU (graphics processing unit), and Network. The billing system parses these data from the pricing details, and then calculates the cost of the target cluster based on the actual resource usage of the target cluster on the corresponding billing items.

[0063] Through a series of screening mechanisms including preliminary screening, second screening, third screening, and fourth screening, the target pricing plan list finally determined by the billing system is the most suitable and highest priority valid pricing plan list at the current time point. This screening mechanism ensures the accuracy and rigor of the cluster cost billing process.

[0064] Optionally, before responding to the cost billing request of the target cluster, it includes: the billing system receives a front-end interface login request initiated by an external terminal; the front-end interface receives a new pricing plan list creation request initiated by the external terminal and input data information of the new pricing plan list, or receives an original pricing plan list modification request and input data modification information of the original pricing plan list.

[0065] It should be noted that the data information or data modification information includes at least one of the following: pricing plan name, pricing plan description information, pricing details, effective cluster list, effective time, enabled status and priority.

[0066] In step S201, before responding to the cost billing request of the target cluster, the external terminal or operation object logs in to the front-end interface of the billing system, creates and modifies the pricing plan list in the front-end interface, and then the billing system receives the login request, creation request and modification request initiated by the external terminal or operation object.

[0067] When an external terminal or operation object decides to create a new pricing plan list, a new pricing plan list can be created through the front-end interface and the data information therein can be configured. Then the billing system receives the creation request for the new pricing plan list and receives the data information of the new pricing plan list. The received data information includes: pricing plan name, pricing plan description information, pricing details, effective cluster list, effective time, enabled status and priority.

[0068] When the external terminal or operation object decides to modify the pricing plan list, select any original pricing plan list from the front-end interface to initiate a modification request, and then the billing system receives the modification request for the original pricing plan list and receives the data modification information of the original pricing plan list. The received data modification information includes any one or more of the pricing plan name, pricing plan description information, pricing details, effective cluster list, effective time, enabled status and priority of the list.

[0069] It should be noted that the billing system is a pre-built platform for cluster cost billing, which includes a front-end interface and a back-end. In the embodiment of the present invention, it is possible to realize the real-time reception of multiple creation and modification requests and corresponding data initiated by an external terminal or an operation object at the same time, and after receiving the creation and modification requests and corresponding data, the embodiment of the present invention will synchronously update the data information to the internal cache data of the billing system and save it in time.

[0070] Optionally, the step of receiving data information or data modification information input by an external terminal at the front-end interface of the billing system includes: receiving the pricing scheme name and pricing scheme description information input or modified by the external terminal at the pricing scheme editing page of the front-end interface, wherein the pricing scheme description information includes an introduction to the pricing scheme list; receiving the billing item unit price data input or modified by the external terminal based on the billing item name and the billing item unit price unit in the pricing details, wherein the billing item unit price data is a positive number.

[0071] In the embodiment of the present invention, the pricing scheme name is used to distinguish different pricing scheme lists. The external terminal or the operating object can input the pricing scheme name through the front-end interface of the billing system. The pricing scheme name must be a clear and descriptive name to facilitate subsequent management and identification. The input pricing scheme name is then received by the billing system. The pricing scheme description information is an additional description of the pricing scheme list, which may include the target, applicable scenarios, special conditions, etc. of the pricing scheme list, which helps the external terminal or the operating object understand the intention and scope of application of the pricing scheme list.

[0072] The pricing details are the core part of the pricing plan list, including the unit price information of each billing item, specifically including the billing item name, billing item unit price data and billing item unit price unit of each billing item, where the billing item name is the resource type of the billing item, for example: CPU (central processing unit), RAM (random access memory), GPU (graphics processing unit), Network; the billing item unit price data is the actual billing amount entered or modified by the external terminal or operation object, reflecting the cost consumed per unit resource (per unit billing item), and the billing system receives the billing item unit price data entered or modified by the external terminal or operation object; the billing item unit price unit is the unit of measurement for billing item pricing, for example: RMB / hour / core, RMB / GB / month, etc. It should be noted that the billing item name and billing item unit price unit are predefined in the billing system and cannot be changed.

[0073] The external terminal or operation object configures the pricing plan name, pricing plan description information and pricing details on the pricing plan editing page of the front-end interface. After receiving this configuration information, the billing system uses it in subsequent cluster cost calculation operations.

[0074] It should be noted that when the billing system receives the unit price data of the billing item in the pricing details, it will verify whether the input unit price data of the billing item is a positive number and whether it contains special characters. When the input unit price data of the billing item is not a positive number or contains special characters, the billing system will issue an error prompt.

[0075] Optionally, the step of receiving data information or data modification information input by an external terminal by the front-end interface of the billing system also includes: receiving one or more clusters selected by the external terminal from the full number of clusters of the billing system, and generating an effective cluster of the pricing scheme list based on the selected cluster; receiving the effective time of the pricing scheme list input or modified by the external terminal, wherein the effective time includes: the starting effective time and the ending effective time of the pricing scheme list; receiving the enabled status of the pricing scheme list input or modified by the external terminal, wherein the enabled status includes: started, not started; receiving the priority of the pricing scheme list input or modified by the external terminal, wherein the priority is used to determine the target pricing scheme list based on the priority when the target cluster is associated with multiple pricing scheme lists.

[0076] In an embodiment of the present invention, the effective cluster list is a set of clusters to which the pricing plan list is applicable. The external terminal or operation object can select one or more clusters from the full set of clusters provided by the billing system as applicable clusters (i.e., effective clusters) for the pricing plan list, and then the billing system receives the effective clusters, where the effective clusters are presented in the form of a list.

[0077] The effective time is the effective period of the pricing plan list, including the starting effective time and the ending effective time. The external terminal or operation object can input or modify the effective time through the front-end interface of the billing system based on the business cycle and market conditions, and then the effective time is received by the billing system. When the current time point is within the effective time range, the pricing plan list can be used. When the current time point is outside the effective time range, the pricing plan list cannot be used. By receiving the input or modified effective time in real time, the cluster cost billing strategy can be adjusted dynamically in real time, thereby responding to cluster changes and optimizing operating costs.

[0078] The enablement status is a binary attribute. The external terminal or operation object can select "start" or "not start" a pricing file list through the front-end interface of the billing system, and then the billing system receives the enablement status. When the enablement status is "start", the pricing plan list can be used. When the enablement status is "not started", the pricing plan list cannot be used. By receiving the selected enablement status in real time, a specific pricing plan list can be flexibly started and stopped, especially when emergency adjustments are required, the cluster cost billing strategy can respond quickly to needs.

[0079] Priority is the basis for the billing system to select the target pricing plan list when a cluster is associated with multiple pricing plan lists. The pricing plan list with a high priority will be used first. The external terminal or operation object enters or modifies the priority through the front-end interface of the billing system, and then the billing system receives the priority. By receiving the input or modified priority in real time, it can adapt to the priority requirements of different scenarios.

[0080] The external terminal or operation object selects, enters or modifies the effective cluster list, effective period, enabled status and priority through the pricing plan editing page of the billing system front interface. After receiving this data information, the billing system uses it in subsequent cluster cost calculation operations. After completing the configuration of all data information in the pricing plan list, the external terminal or operation object saves the data information and exits the pricing plan editing page.

[0081] Optionally, after putting the pricing scheme list whose effective time includes the current time into the third candidate list, the method includes: when the third candidate list is empty, ending the cost billing operation of the target cluster.

[0082] In the embodiment of the present invention, after completing the verification of the effective time of the pricing scheme list in the second candidate list and putting the pricing scheme lists whose effective time includes the current time point into the third candidate list, the billing system will detect whether the third candidate list is empty. If it is found that the third candidate list is empty, it means that there is no effective pricing scheme list that can be applied to the cost calculation of the target cluster at the current time point. In this case, the billing system will end the cost billing operation of the target cluster and issue an alarm prompt.

[0083] Optionally, before calculating the cost of the target cluster, the method includes: querying resource usage data of the target cluster, wherein the resource usage data includes usage data of all billing items.

[0084] In the embodiment of the present invention, before calculating the cost of the target cluster, it is necessary to query the resource usage data of the target cluster. The resource usage data directly reflects the actual usage resources of all billing items in the target cluster, and the resource usage data is presented in a numerical form.

[0085] Optionally, the step of calculating the cost of the target cluster based on the pricing details in the target pricing scheme list includes: obtaining the pricing details in the target pricing scheme list, and parsing the unit price data of all billing items from the pricing details; calculating the cost of each billing item based on the usage data and the parsed unit price data of the billing items, and adding up the costs of all billing items to obtain the cost of the target cluster.

[0086] In the embodiment of the present invention, when calculating the cost of the target cluster, the pricing details are obtained from the target pricing scheme list, and then the unit price data of all billing items are parsed from the pricing details, and then the resource usage data is matched with the corresponding unit price data of the billing items. The unit price data of each billing item is multiplied by the corresponding resource usage to obtain the cost of the billing item, and the billing system then adds up the costs of all billing items to calculate the cost of the target cluster.

[0087] It should be noted that the process of cost billing for a target cluster in an embodiment of the present invention can be called a cycle. If the billing system encounters an exception during the current execution cycle, such as network interruption or cache connection loss, the billing system will try to reconnect. If it still fails after multiple retries, the billing system will record the exception and send an alarm, then skip the current cycle and execute the tasks of the next cycle.

[0088] The steps provided by the above-mentioned cluster cost billing method based on unit price of billing items realize the technical effect of creating and modifying the pricing scheme including the unit price information of billing items in real time by receiving the data information of the pricing scheme list input or modified by the external terminal or operation object in real time by the billing system, and the changed pricing scheme takes effect immediately. At the same time, the embodiment of the present invention can simultaneously receive the creation and modification data of multiple pricing schemes, and has both flexibility and efficiency.

[0089] By responding to the cost billing request of the target cluster, the current pricing plan list is obtained from the billing system. When the effective cluster list in the current pricing plan list includes the target cluster, the current pricing plan list is placed in the first alternative list, thereby achieving the technical effect of managing and controlling multi-cluster pricing information.

[0090] In this embodiment, by obtaining the enabled status of all pricing scheme lists in the first alternative list, the pricing scheme lists with enabled status of enabled are placed in the second alternative list, and then the effective time of all pricing scheme lists in the second alternative list is obtained, and the pricing scheme lists whose effective time includes the current time point are placed in the third alternative list, and then the pricing scheme list ranked as the first priority in the third alternative list is determined as the target pricing scheme list, thereby achieving the technical effect of flexibly controlling the effective time and priority of the pricing scheme.

[0091] Finally, by calculating the cost of the target cluster based on the pricing details in the target pricing plan list, the resource cost billing of the target cluster is realized, thereby solving the technical problems in related technologies that cluster cost billing does not support multi-cluster pricing information management and control and does not support effective time management.

[0092] The following is a detailed description in conjunction with another embodiment.

[0093] Embodiment 2

[0094] A cluster cost billing device based on billing item unit price provided in this embodiment includes multiple implementation units, each implementation unit corresponds to each implementation step in the above-mentioned embodiment 1.

[0095] Figure 3 is a schematic diagram of an optional cluster cost billing device based on billing item unit price according to an embodiment of the present invention, such as Figure 3 As shown, the cluster cost charging device based on the charging item unit price may include: a first acquiring unit 31 , a second acquiring unit 32 , a third acquiring unit 33 , and a calculating unit 34 .

[0096] The first acquisition unit 31 is used to respond to the cost billing request of the target cluster, obtain the current pricing scheme list from the billing system, and put the current pricing scheme list into the first candidate list when the effective cluster list in the current pricing scheme list includes the target cluster.

[0097] The second acquisition unit 32 is used to acquire the activation status of all pricing scheme lists in the first candidate list, and put the pricing scheme lists with the activation status of "started" into the second candidate list.

[0098] The third acquisition unit 33 is used to acquire the effective time of all pricing scheme lists in the second candidate list, and put the pricing scheme lists whose effective time includes the current time point into the third candidate list.

[0099] The calculation unit 34 is used to determine the pricing scheme list ranked as the first priority in the third alternative list as the target pricing scheme list, and calculate the cost of the target cluster based on the pricing details in the target pricing scheme list, wherein the pricing details include: billing item name, billing item unit price data and billing item unit price unit.

[0100] The above-mentioned cluster cost billing device based on the unit price of billing items can respond to the cost billing request of the target cluster through the first acquisition unit 31, obtain the current pricing scheme list from the billing system, and put the current pricing scheme list into the first candidate list when the effective cluster list in the current pricing scheme list includes the target cluster, so as to achieve the purpose of controlling the pricing information of multiple clusters, obtain the activation status of all pricing scheme lists in the first candidate list through the second acquisition unit 32, put the pricing scheme list with the activation status as enabled into the second candidate list, and then obtain the effective time of all pricing scheme lists in the second candidate list through the third acquisition unit 33, put the pricing scheme list with the effective time including the current time point into the third candidate list, and then determine the pricing scheme list ranked as the first priority in the third candidate list as the target pricing scheme list through the calculation unit 34, so as to achieve the purpose of flexibly controlling the effective time and priority of the pricing scheme, and finally calculate the cost of the target cluster based on the pricing details in the target pricing scheme list, so as to realize the cost billing of the target cluster, thereby solving the technical problem that cluster cost billing does not support the control of multi-cluster pricing information and the effective time control in the related technology.

[0101] Optionally, the first acquisition unit 31 includes: a first request module, used by the billing system to receive a front-end interface login request initiated by an external terminal; a second request module, used by the front-end interface to receive a new pricing plan list creation request initiated by an external terminal and input data information of a new pricing plan list, or, to receive an original pricing plan list modification request and input data modification information of the original pricing plan list, wherein the data information or data modification information includes at least one of the following: pricing plan name, pricing plan description information, pricing details, effective cluster list, effective time, enabled status and priority.

[0102] Optionally, the second request module includes: a first receiving sub-module, used to receive the pricing scheme name and pricing scheme description information input or modified by the external terminal on the pricing scheme editing page of the front-end interface, wherein the pricing scheme description information includes an introduction to the pricing scheme list; a second receiving sub-module, used to configure pricing details, and receive the billing item unit price data input or modified by the external terminal based on the billing item name and billing item unit price unit in the pricing details, wherein the billing item unit price data is a positive number.

[0103] Optionally, the second request module also includes: a third receiving sub-module, used to receive one or more clusters selected by an external terminal from the full number of clusters of the billing system, and generate an effective cluster of the pricing scheme list based on the selected cluster; a fourth receiving sub-module, used to receive the effective time of the pricing scheme list input or modified by the external terminal, wherein the effective time includes: the start effective time and the end effective time of the pricing scheme list; a fifth receiving sub-module, used to receive the enabled status of the pricing scheme list input or modified by the external terminal, wherein the enabled status includes: started, not started; a sixth receiving sub-module, used to receive the priority of the pricing scheme list input or modified by the external terminal, wherein the priority is used to determine the target pricing scheme list based on the priority when the target cluster is associated with multiple pricing scheme lists.

[0104] Optionally, the calculation unit 34 includes: a termination module, configured to terminate the cost charging operation of the target cluster when the third candidate list is empty.

[0105] Optionally, the calculation unit 34 further includes: a query module, configured to query resource usage data of the target cluster, wherein the resource usage data includes usage data of all billing items.

[0106] Optionally, the calculation unit 34 also includes: a parsing module, which is used to obtain pricing details in the target pricing plan list and parse out the unit price data of all billing items from the pricing details; a cost calculation module, which calculates the cost of each billing item based on the usage data and the parsed unit price data of the billing items, and adds up the costs of all billing items to obtain the cost of the target cluster.

[0107] The above-mentioned cluster cost billing device based on the unit price of billing items may also include a processor and a memory. The above-mentioned first acquisition unit 31, second acquisition unit 32, third acquisition unit 33, calculation unit 34, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.

[0108] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the cluster cost is charged based on the unit price of the billing item by adjusting the kernel parameters.

[0109] The above-mentioned memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory (fl ash RAM), and the memory includes at least one storage chip.

[0110] Embodiment 3

[0111] An embodiment of the present application may provide an electronic device, Figure 4 is a structural block diagram of an electronic device according to an embodiment of the present application. Figure 4 As shown, the electronic device may include: one or more ( Figure 4 (only one is shown) processor 402, memory 404, storage controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.

[0112] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the methods and devices in the embodiments of the present application, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0113] The processor can call the information and application programs stored in the memory through the transmission device to perform the following steps: respond to the cost billing request of the target cluster, obtain the current pricing scheme list from the billing system, and put the current pricing scheme list into the first alternative list when the effective cluster list in the current pricing scheme list includes the target cluster; obtain the activation status of all pricing scheme lists in the first alternative list, and put the pricing scheme list with the activation status as enabled into the second alternative list; obtain the effective time of all pricing scheme lists in the second alternative list, and put the pricing scheme list with the effective time including the current time point into the third alternative list; determine the pricing scheme list ranked as the first priority in the third alternative list as the target pricing scheme list, and calculate the cost of the target cluster based on the pricing details in the target pricing scheme list, wherein the pricing details include: the billing item name, the billing item unit price data and the billing item unit price unit.

[0114] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: the billing system receives a front-end interface login request initiated by an external terminal; the front-end interface receives a new pricing plan list creation request initiated by an external terminal and the input data information of the new pricing plan list, or receives a modification request for the original pricing plan list and the input data modification information of the original pricing plan list, wherein the data information or the data modification information includes at least one of the following: pricing plan name, pricing plan description information, pricing details, effective cluster list, effective time, enabled status and priority.

[0115] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: receiving the pricing plan name and pricing plan description information input or modified by the external terminal on the pricing plan editing page of the front-end interface, wherein the pricing plan description information includes an introduction to the pricing plan list; receiving the billing item unit price data input or modified by the external terminal based on the billing item name and billing item unit price unit in the pricing details, wherein the billing item unit price data is a positive number.

[0116] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: receiving one or more clusters selected by an external terminal from the full number of clusters of the billing system, and generating an effective cluster of the pricing plan list based on the selected clusters; receiving the effective time of the pricing plan list input or modified by the external terminal, wherein the effective time includes: the starting effective time and the ending effective time of the pricing plan list; receiving the enabled status of the pricing plan list input or modified by the external terminal, wherein the enabled status includes: started, not started; receiving the priority of the pricing plan list input or modified by the external terminal, wherein the priority is used to determine the target pricing plan list based on the priority when the target cluster is associated with multiple pricing plan lists.

[0117] The processor may also call the information and application program stored in the memory through the transmission device to perform the following steps: when the third candidate list is empty, end the cost billing operation of the target cluster.

[0118] The processor may also call the information and application programs stored in the memory through the transmission device to perform the following steps: querying resource usage data of the target cluster, wherein the resource usage data includes usage data of all billing items.

[0119] The processor can also call the information and applications stored in the memory through the transmission device to perform the following steps: obtain the pricing details in the target pricing plan list, and parse the unit price data of all billing items from the pricing details; based on the usage data and the parsed unit price data of the billing items, calculate the cost of each billing item, and add up the costs of all billing items to obtain the cost of the target cluster.

[0120] By adopting the embodiment of the present application, a solution of a cluster cost billing method based on the unit price of billing items is provided. By responding to the cost billing request of the target cluster, the current pricing scheme list is obtained from the billing system. When the effective cluster list in the current pricing scheme list includes the target cluster, the current pricing scheme list is placed in the first alternative list, thereby achieving the purpose of controlling the pricing information of multiple clusters. By obtaining the activation status of all pricing scheme lists in the first alternative list, the pricing scheme list with the activation status of startup is placed in the second alternative list, and then the effective time of all pricing scheme lists in the second alternative list is obtained, and the pricing scheme list with the effective time including the current time point is placed in the third alternative list. Then, the pricing scheme list ranked as the first priority in the third alternative list is determined as the target pricing scheme list, thereby achieving the purpose of flexibly controlling the effective time and priority of the pricing scheme. Finally, the cost of the target cluster is calculated based on the pricing details in the target pricing scheme list, thereby realizing the cost billing of the target cluster, thereby solving the technical problem that cluster cost billing in the related technology does not support the control of multi-cluster pricing information and does not support the control of the effective time.

[0121] It can be understood by those skilled in the art that Figure 4 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Figure 4 The structure of the electronic device is not limited. Figure 4 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 4Different configurations shown.

[0122] A person of ordinary skill in the art may understand that all or part of the steps in the various cluster cost billing methods based on the unit price of billing items in the above-mentioned embodiments may be completed by instructing the hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0123] Embodiment 4

[0124] The embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the cluster cost billing method based on the billing item unit price provided in the first embodiment.

[0125] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, the computer-readable storage medium including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the cluster cost billing method based on the billing item unit price of any one of the above-mentioned embodiments 1.

[0126] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0127] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the cluster cost billing method based on the unit price of billing items described in each embodiment of the present application.

[0128] The present application also provides a computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the cluster cost billing method based on the unit price of billing items described in each embodiment of the present application are implemented.

[0129] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0130] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0131] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0132] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0133] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0134] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0135] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A cluster cost billing method based on billing item unit price, characterized in that: include: In response to a cost charging request of the target cluster, a current pricing scheme list is obtained from a charging system, and if a valid cluster list in the current pricing scheme list includes the target cluster, the current pricing scheme list is put into a first candidate list; Obtaining the activation status of all pricing scheme lists in the first candidate list, and putting the pricing scheme lists whose activation status is activated into the second candidate list; Obtain the effective time of all pricing scheme lists in the second candidate list, and put the pricing scheme lists whose effective time includes the current time point into the third candidate list; The pricing scheme list ranked as the first priority in the third alternative list is determined as the target pricing scheme list, and the cost of the target cluster is calculated based on the pricing details in the target pricing scheme list, wherein the pricing details include: billing item name, billing item unit price data and billing item unit price unit.

2. The cluster cost billing method according to claim 1, characterized in that: Before responding to the cost billing request for the target cluster, include: The billing system receives a front-end interface login request initiated by an external terminal; The front-end interface receives a new pricing scheme list creation request initiated by the external terminal and input data information of the new pricing scheme list, or receives an original pricing scheme list modification request and input data modification information of the original pricing scheme list; The data information or the data modification information includes at least one of the following: pricing scheme name, pricing scheme description information, pricing details, effective cluster list, effective time, enabled status and priority.

3. The cluster cost billing method according to claim 2, characterized in that: The step of receiving the data information or the data modification information input by the external terminal through the front-end interface of the billing system comprises: The pricing scheme editing page of the front-end interface receives the pricing scheme name and the pricing scheme description information input or modified by the external terminal, wherein the pricing scheme description information includes an introduction to the pricing scheme list; The charging item unit price data input or modified by the external terminal based on the charging item name and the charging item unit price unit in the pricing details is received, wherein the charging item unit price data is a positive number.

4. The cluster cost billing method according to claim 2, characterized in that: The step of receiving the data information or the data modification information input by the external terminal through the front-end interface of the billing system further includes: Receiving one or more clusters selected by the external terminal from all clusters of the billing system, and generating an effective cluster of a pricing scheme list based on the selected clusters; Receiving the effective time of the pricing scheme list input or modified by the external terminal, wherein the effective time includes: the starting effective time and the ending effective time of the pricing scheme list; receiving the activation status of the pricing scheme list input or modified by the external terminal, wherein the activation status includes: activation and deactivation; The priority of the pricing scheme list input or modified by the external terminal is received, wherein the priority is used to determine the target pricing scheme list based on the priority when a target cluster is associated with multiple pricing scheme lists.

5. The cluster cost billing method according to claim 1, characterized in that: After putting the pricing scheme list whose effective time includes the current time into the third candidate list, the method includes: when the third candidate list is empty, ending the cost charging operation of the target cluster.

6. The cluster cost billing method according to claim 1, characterized in that: Before calculating the cost of the target cluster, it includes: querying resource usage data of the target cluster, wherein the resource usage data includes usage data of all billing items.

7. The cluster cost billing method according to claim 6, characterized in that: The step of calculating the cost of the target cluster based on the pricing details in the target pricing scheme list includes: Obtaining pricing details in the target pricing scheme list, and parsing unit price data of all billing items from the pricing details; Based on the usage data and the parsed billing item unit price data, the cost of each billing item is calculated, and the costs of all billing items are added together to obtain the cost of the target cluster.

8. A cluster cost billing device based on billing item unit price, characterized in that: include: A first acquisition unit is configured to respond to a cost billing request of a target cluster, acquire a current pricing scheme list from a billing system, and put the current pricing scheme list into a first candidate list when a valid cluster list in the current pricing scheme list includes the target cluster; A second acquisition unit is used to acquire the activation status of all pricing scheme lists in the first candidate list, and put the pricing scheme list with the activation status as started into the second candidate list; A third acquisition unit is used to acquire the effective time of all pricing scheme lists in the second candidate list, and put the pricing scheme list whose effective time includes the current time point into the third candidate list; A calculation unit is used to determine the pricing scheme list ranked as the first priority in the third alternative list as the target pricing scheme list, and calculate the cost of the target cluster based on the pricing details in the target pricing scheme list, wherein the pricing details include: billing item name, billing item unit price data and billing item unit price unit.

9. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the cluster cost billing method based on the unit price of billing items as described in any one of claims 1 to 7.

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 cluster cost billing method based on the unit price of billing items as described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Accounting method in cloud computing system

    CN103067185A

  • Cloud computing service charging method and device

    CN104333457A

  • Charging method and device

    CN104574051A

  • PhiCloud cloud charging method and system

    CN105049218A

  • Cloud computing charging system and method based on data dictionary user-defined product

    CN109951302A