Billing method, device, node, system and medium for containerized cloud computing resources

By running the execution program and billing sidecar program on the cloud computing node, monitoring the task execution status in real time and generating billing information based on the status for deductions, the problems of excessive costs and resource waste caused by cloud computing resource billing in the existing technology are solved, and the rational utilization and flexible billing are realized.

CN115412383BActive Publication Date: 2025-03-28INDUSTRIAL AND COMMERCIAL BANK OF CHINA +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211027874.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-25
Publication Date
2025-03-28
Estimated Expiration
2042-08-25

AI Technical Summary

Technical Problem

The billing method of existing cloud computing resources leads to excessive costs and waste of resources, especially the prepaid model based on fixed-duty time cannot effectively constrain users' settlement behavior.

Method used

By running the execution program and billing sidecar program on the cloud computing node, the task execution status is monitored in real time, and the billing information is generated every preset time period based on the task status and the cloud computing node is recycled when the task is completed.

Benefits of technology

It realizes reasonable and flexible billing of cloud computing resources, reduces resource waste, and supports elastic scaling, avoiding the problems of excess billing and overuse of resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115412383B_ABST
    Figure CN115412383B_ABST
Patent Text Reader

Abstract

The present application provides a billing method, device, node, system and medium for containerized cloud computing resources, wherein a cloud computing node stores an execution program and a billing sidecar program connected to the execution program, wherein the execution program is used to execute container tasks, and the billing sidecar program is used to obtain the task execution status of the execution program, and the method includes: receiving heartbeat information of the billing sidecar program; generating billing information based on the heartbeat information at preset time intervals, and deducting fees based on the billing information; if the current task execution status is execution completion, generating first indication information, and sending the first indication information to a cloud computing control cluster, so that the cloud computing control cluster reclaims the cloud computing node corresponding to the billing sidecar program based on the first indication information. Through the above method, the present application can realize reasonable and flexible billing of containerized cloud computing resources, and achieve the purpose of effectively saving cloud computing resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a billing method, device, node, system and medium for containerized cloud computing resources. Background Art

[0002] With the continuous development of cloud computing, cloud computing resources have been widely used in various fields. The most common method is to execute computing tasks based on containerization. The billing method of containerized cloud computing resources has gradually become the focus of researchers.

[0003] The current billing method is mainly through a one-time prepayment of a fixed duration. If the task is completed before the fixed duration, the billing also needs to be calculated according to the fixed duration. The cloud computing platform resources also operate according to the fixed duration. For example, the fixed duration is 1 hour. If the task execution time is completed in 15 minutes, it is also required to be billed and settled as 1 hour. At the same time, the platform resources continue to operate until the end of 1 hour, resulting in excessive costs and waste of cloud computing resources.

[0004] Therefore, proposing a billing solution that can reasonably charge and save cloud computing resources is an urgent problem to be solved. Summary of the invention

[0005] In order to solve the above problems, that is, to solve the problems of excessively high costs and waste of cloud computing resources generated by the current billing method, the present application provides a billing method, device, node, system and medium for containerized cloud computing resources.

[0006] In order to achieve the above objectives, this application provides the following technical solutions:

[0007] According to a first aspect of the present application, a billing method for containerized cloud computing resources is provided, wherein a cloud computing node stores an execution program and a billing sidecar program connected to the execution program, wherein the execution program is used to execute container tasks, and the billing sidecar program is used to obtain the task execution status of the execution program, and the method includes:

[0008] Receive heartbeat information of a billing sidecar program, where the heartbeat information carries a task execution status of an execution program connected to the billing sidecar program;

[0009] If the current task execution state is being executed, then generating billing information based on the heartbeat information at every preset time period, and deducting fees based on the billing information;

[0010] If the current task execution status is execution completion, first indication information is generated and sent to the cloud computing control cluster, so that the cloud computing control cluster reclaims the cloud computing node corresponding to the billing sidecar program based on the first indication information.

[0011] In one implementation, generating billing information based on the heartbeat information at every preset time period includes:

[0012] When the heartbeat information of the billing sidecar program is received for the first time and the heartbeat information indicates that the current task execution status is start execution, start billing for the cloud computing node;

[0013] When the received heartbeat information indicates that the current task execution status is completed, stop charging the computing node;

[0014] The billing information is generated at every preset time period based on the start state and stop state of the billing.

[0015] In one embodiment, the generating of billing information based on the billing start state and the billing stop state every preset time period includes:

[0016] In a charging startup state, obtaining meta-billing information, the meta-billing information being used to indicate a billing condition for the execution program to execute a container task within a preset time period;

[0017] The billing information is generated according to the meta-billing information at intervals of the preset time period based on the start state and the stop state of the billing.

[0018] In one implementation, if the current task execution status is executing, the method further includes:

[0019] Get the account balance information of the current task in real time;

[0020] The deducting fees based on the billing information includes:

[0021] If the amount of the current billing information does not reach the amount of the account balance information, deducting the fee based on the billing information;

[0022] If the amount value of the current billing information reaches the amount value of the account balance information, deductions are made based on the account balance information, and second indication information is generated so that the cloud computing control cluster reclaims the cloud computing node corresponding to the billing sidecar program based on the second indication information.

[0023] In one embodiment, after first indicating information to the cloud computing control cluster, the method further includes:

[0024] Receiving recycling information of the cloud computing control cluster, where the recycling information is generated after the cloud computing control cluster recycles the cloud computing node corresponding to the billing sidecar program;

[0025] The connection with the billing sidecar node is disconnected, and the billing sidecar node becomes invalid.

[0026] In one implementation, the container task is an algorithm training task.

[0027] According to a second aspect of the present application, a billing service node is provided, the cloud computing node includes an execution program and a billing sidecar program connected to the execution program, the execution program is used to execute a container task, the billing sidecar program is used to obtain the task execution status of the execution program, and the billing service node includes:

[0028] A receiving module, which is configured to receive heartbeat information of a billing sidecar program, wherein the heartbeat information carries a task execution status of an execution program connected to the billing sidecar program;

[0029] A generating module, when the current task execution state is being executed, generates billing information based on the heartbeat information at every preset time period;

[0030] A charging module configured to perform charging based on the charging information;

[0031] An indication module is configured to generate first indication information when the current task execution status is execution completion, and send the first indication information to the cloud computing control cluster so that the cloud computing control cluster reclaims the cloud computing node corresponding to the billing sidecar program based on the first indication information.

[0032] According to a third aspect of the present application, a billing system for containerized cloud computing resources is provided, comprising a cloud computing control cluster, a cloud computing resource pool, and a billing service cluster.

[0033] The cloud computing control cluster is used to create one or more cloud computing nodes in the cloud computing resource pool, wherein the cloud computing node includes an execution program and a billing sidecar program connected to the execution program, the execution program is used to execute container tasks, and the billing sidecar program is used to obtain the task execution status of the execution program;

[0034] The billing service cluster includes one or more billing service nodes, and the one or more billing service nodes are used to receive heartbeat information of the billing sidecar program of the one or more cloud computing nodes, the heartbeat information carries the task execution status of the execution program connected to the billing sidecar program, and generates billing information based on the heartbeat information every preset time period, deducts fees based on the billing information, generates first indication information when the current task execution status is execution completion, and sends the first indication information to the cloud computing control cluster;

[0035] The cloud computing control cluster is further used to reclaim the cloud computing node corresponding to the billing sidecar program in the cloud computing resource pool based on the first indication information.

[0036] In one implementation, the cloud computing resource pool is implemented based on Kubernetes.

[0037] In one implementation, the number of the billing service nodes matches the number of cloud computing nodes.

[0038] According to a fourth aspect of the present application, a charging service node is provided, including: a memory and a processor;

[0039] The memory stores computer-executable instructions;

[0040] The processor executes the computer-executable instructions stored in the memory, so that the billing service node executes the billing method for containerized cloud computing resources.

[0041] According to a fifth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the billing method for containerized cloud computing resources.

[0042] It can be understood that the billing method, device, node, system and medium for containerized cloud computing resources provided by the embodiments of the present application, the cloud computing node stores an execution program and a billing sidecar program connected to the execution program, the execution program is used to execute container tasks, the billing sidecar program is used to obtain the task execution status of the execution program, and then generates billing information based on the heartbeat information every preset time period by receiving the heartbeat information of the billing sidecar program, and deducts fees based on the billing information, generates first indication information when the current task execution status is execution completion, and sends the first indication information to the cloud computing control cluster, so that the cloud computing control cluster reclaims the cloud computing node corresponding to the billing sidecar program based on the first indication information. Through the above method, the present application can realize reasonable and flexible billing of containerized cloud computing resources and effectively save cloud computing resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0044] Figure 1 One of the possible scenario schematic diagrams provided in the embodiment of the present application;

[0045] Figure 2 A flowchart of a billing method for containerized cloud computing resources provided in an embodiment of the present application;

[0046] Figure 3 A flowchart of another method for billing containerized cloud computing resources provided in an embodiment of the present application;

[0047] Figure 4 One of the structural diagrams of a billing service node provided in an embodiment of the present application;

[0048] Figure 5 A schematic diagram of the structure of a billing system for containerized cloud computing resources provided in an embodiment of the present application;

[0049] Figure 6 The second structural diagram of a billing service node provided in an embodiment of the present application.

[0050] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0051] Before introducing the embodiments of the present application in detail, the definitions of the terms in the embodiments of the present application are first explained:

[0052] Containerization: A lightweight deployment architecture that uses a container engine to build an application into an image, then publishes the image into a container in a container management platform, and orchestrates and manages the container. In this embodiment, the container engine technology uses Docker and the container management platform uses Kubernetes.

[0053] Elastic scaling: A highly available container orchestration method. The container management platform can automatically adjust the number of nodes according to the real-time business load level to ensure high business availability while improving resource utilization.

[0054] Basic image: When making an application image, if you want to add the capabilities of a certain operating system or web server, you need to package the specified operating system image and web server image into the application image. This image that supplements the basic capabilities of the application image is called a basic image. Developers can also customize an image with basic capabilities as a basic image.

[0055] Sidecar mechanism: A sidecar program is an independent program that accompanies the main program and is responsible for performing special tasks beyond the application capabilities of the main program. This accompanying orchestration mechanism is called the sidecar mechanism.

[0056] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be described in more detail below in conjunction with the drawings in the embodiments of the present application. In the drawings, the same or similar reference numerals throughout represent the same or similar parts or parts with the same or similar functions. The described embodiments are part of the embodiments of the present application, not all of the embodiments. The embodiments described below with reference to the drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limitations on the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0057] Figure 1 This is a possible scenario diagram provided for the embodiment of the present application. It should be noted that the billing method for containerized cloud computing resources disclosed in the present application can be used in the field of financial technology. It can also be used in any field other than the field of financial technology. The application field of the billing method for containerized cloud computing resources disclosed in the present application is not limited.

[0058] Take the artificial intelligence algorithm training scenario as an example. Figure 1 As shown, it includes a billing service server cluster 110, a training control cluster 120 (i.e., a cloud computing control cluster) and an algorithm training resource pool 130 (i.e., a cloud computing resource pool). Optionally, the billing server cluster includes multiple billing server nodes, including billing server nodes 111 and 112 in this embodiment. The algorithm training resource pool 130, also known as the algorithm training platform, allocates training resources based on the container management platform. Developers select cloud computing resources of a certain specification for algorithm training as needed. Specifically, it supports elastic scaling of training nodes, and deploys container tasks in one or more training nodes (i.e., cloud computing nodes, referred to as nodes 1, 2, and 3 in the figure) for algorithm training. The training control cluster 120 is responsible for the creation and recovery of training nodes and may include one or more training control nodes. This embodiment is a training control node 1, which provides API calls to the business system. Optionally, the user can select an initial cloud computing resource of a certain specification before starting training. After the user clicks to start training, the business system calls the training control cluster to create a training node. When the training is completed or the user's balance is insufficient, the business system calls the training control cluster to recover the node. It can be understood that the business system is used to receive cloud computing service requests initiated by users and provide them with cloud computing services, which includes a billing service server cluster.

[0059] Optionally, the user initiates a cloud computing business request in the business system, such as an artificial intelligence algorithm training request, which may include algorithm training of algorithm training program A and algorithm training program B. The training control cluster 120 provides an API call to the business system, and creates one or more training nodes of algorithm training program A and one or more training nodes of algorithm training program B in a containerized manner in the algorithm training resource pool 130. Each training node stores a training program (i.e., an execution program, referred to as execution in the figure) and a billing sidecar program (referred to as sidecar in the figure), and feeds back heartbeat information to the corresponding billing server node through the billing sidecar program. The billing server node sends an instruction to the training control cluster based on the heartbeat information to recycle the training node.

[0060] The above is a brief description of the scenario diagram of this application. Figure 1 Taking the billing server node 111 in the example as an example, the billing method for containerized cloud computing resources provided in the embodiment of the present application is described in detail.

[0061] Please refer to Figure 2 , Figure 2 A flow chart of a billing method for containerized cloud computing resources provided in an embodiment of the present application, wherein a cloud computing node stores an execution program and a billing sidecar program connected to the execution program, the execution program is used to execute container tasks, and the billing sidecar program is used to obtain the task execution status of the execution program, and the method includes steps S201-S204.

[0062] In one embodiment, the cloud computing node is created by the cloud computing control cluster. Specifically, after the business system receives the user's cloud computing request, it is created through the cloud computing resource pool, wherein the cloud computing resource pool provides a cloud computing node creation and recovery interface to the cloud computing control cluster. It can be understood that the container task is a containerized container task based on the cloud computing request. In this embodiment, the container task is an algorithm training task, that is, an algorithm training task that is containerized. The specific container orchestration method is a prior art and will not be described in detail here.

[0063] Step S201: Receive heartbeat information of a billing sidecar program, where the heartbeat information carries the task execution status of an execution program connected to the billing sidecar program.

[0064] In this embodiment, a billing sidecar program is set in the cloud computing node, and the task execution status of the execution program of the cloud computing node is monitored in real time by receiving the heartbeat information of the billing sidecar program.

[0065] The entire life cycle of the execution program can be fed back to the billing sidecar program in real time. Taking algorithm training as an example, the entire life cycle of the execution program can include starting training, monitoring training results, etc. By feeding this information back to the billing sidecar, the billing sidecar will feed back to the billing service node corresponding to the business system.

[0066] In one implementation, the billing sidecar program is packaged into the execution program image in the form of a basic image, which is non-invasive to the execution program. At the same time, the sidecar billing program only occupies one network connection for sending and receiving heartbeat messages, and occupies very little CPU and memory.

[0067] Step S202: If the current task execution state is executing, then billing information is generated based on the heartbeat information at every preset time period, and in step S203, the fee is deducted based on the billing information.

[0068] It should be noted that those skilled in the art can adaptively set the preset time period in combination with existing technologies and practical applications. For example, in this embodiment, the preset time period can be set to 15 minutes, that is, billing information is generated every 15 minutes, and deductions are made based on the billing information, where the deduction method can be pre-deduction.

[0069] In one implementation, this embodiment starts billing for the cloud computing node by first receiving heartbeat information, and stops billing for the computing node after the task is completed, which can effectively avoid redundant billing and improve the user's experience of using cloud computing resources. Specifically, step S202 may include the following steps:

[0070] When the heartbeat information of the billing sidecar program is received for the first time and the heartbeat information indicates that the current task execution status is start execution, start billing for the cloud computing node;

[0071] When the received heartbeat information indicates that the current task execution status is completed, stop charging the computing node;

[0072] The billing information is generated at every preset time period based on the start state and stop state of the billing.

[0073] In this embodiment, billing information is generated every preset time period through the start and stop states of billing, and deductions are made based on the billing information. The billing status of the billing service node is determined based on the task execution status, and no unnecessary billing is generated, thereby effectively improving the user's experience of using cloud computing resources.

[0074] In one embodiment, the generating of billing information based on the billing start state and the billing stop state every preset time period includes the following steps:

[0075] In a charging startup state, obtaining meta-billing information, the meta-billing information being used to indicate a billing condition for the execution program to execute a container task within a preset time period;

[0076] The billing information is generated according to the meta-billing information at intervals of the preset time period based on the start state and the stop state of the billing.

[0077] In this embodiment, flexible billing of task execution is achieved by setting meta-billing information, wherein the meta-billing information can be the minimum billing condition for executing the task within a preset time period, that is, the billing information corresponding to the minimum billing condition is deducted from the task execution within the preset time period. In some implementations, the billing information can be generated by increasing or decreasing the meta-billing information by multiples based on the task execution duration, or different meta-billing information can be set according to different tasks executed, so as to achieve flexible billing of cloud computing resources.

[0078] In one implementation, each billing service node may correspond to a billing sidecar program, that is, a billing service node is responsible for billing a cloud computing node. In some embodiments, a billing service node may also be responsible for the billing of multiple cloud computing nodes. Regardless of the above method, the billing of each cloud computing node is carried out separately, which can effectively improve the rationality of cloud computing resource billing.

[0079] Step S204: If the current task execution status is execution completion, generate first indication information, and send the first indication information to the cloud computing control cluster, so that the cloud computing control cluster reclaims the cloud computing node corresponding to the billing sidecar program based on the first indication information.

[0080] Compared with related technologies, unreasonable charges and waste of resources are easily caused by fixed duration, or settlement is based on actual usage time, which cannot constrain the user's final settlement behavior, resulting in the problem of user non-settlement or delayed settlement after execution. This embodiment monitors the heartbeat information of the billing sidecar program, performs interval billing based on the heartbeat information, and instructs the cloud computing control cluster to recycle the cloud computing node when the task is completed. This can effectively realize reasonable billing of cloud computing resources and timely recovery of resources.

[0081] In addition, the billing of cloud computing resources is carried out in combination with the sidecar mechanism. The billing program is packaged into the training program image in the form of a basic image, which is non-invasive to the execution program. At the same time, the sidecar billing program only occupies one network connection for sending and receiving heartbeat messages, and occupies very little CPU and memory. In addition, in view of the problem that the prepaid mode in the related art usually has fixed computing nodes and cannot support elastic scaling of resources, the training program will crash in the case of insufficient resources, and can only reuse larger resources for training, resulting in serious waste of resources. The above scheme of this embodiment monitors the task execution of the computing node for separate billing, which can support elastic scaling, and the computing nodes can be freely increased or decreased without affecting the billing, and the billing method is more flexible.

[0082] Please refer to Figure 3 , Figure 3 A flow chart of another billing method for containerized cloud computing resources provided in an embodiment of the present application. On the basis of the above embodiment, this embodiment takes into account the execution of tasks under insufficient balance conditions, and recycles cloud computing nodes by generating second indication information to effectively avoid arrears. Specifically, in addition to the steps of the above embodiment, it also includes step S301, and further divides step S202 into step S202a and step S202b.

[0083] Step S301, obtaining the account balance information of the current task in real time.

[0084] In one implementation, a user applying for cloud computing resources has his own application account and corresponding account balance. During task execution, the cloud computing node obtains the corresponding account balance information in real time.

[0085] Step S202a: If the amount of the current billing information does not reach the amount of the account balance information, deductions are made based on the billing information.

[0086] Step S202b: If the amount value of the current billing information reaches the amount value of the account balance information, deductions are made based on the account balance information, and second indication information is generated so that the cloud computing control cluster reclaims the cloud computing node corresponding to the billing sidecar program based on the second indication information.

[0087] In one embodiment, due to the existence of elastic scaling during the execution of cloud computing tasks, each node is billed separately. For example, each node is pre-charged every 15 minutes of use. If the user's balance is insufficient, the user will be reminded first. If the user does not complete the recharge within the specified time, that is, the current billing information still reaches the amount value of the account balance information within the specified time, the billing service node will instruct the cloud computing control cluster to recycle the corresponding cloud computing node and release the resources outside the user's deductible balance.

[0088] It should be noted that the first indication information and the second indication information in this embodiment may be the same indication information or different indication information, and this embodiment does not specifically limit this.

[0089] In one embodiment, after the first indication information is sent to the cloud computing control cluster (step S203), the following steps may also be included:

[0090] Receiving recycling information of the cloud computing control cluster, where the recycling information is generated after the cloud computing control cluster recycles the cloud computing node corresponding to the billing sidecar program;

[0091] The connection with the billing sidecar node is disconnected, and the billing sidecar node becomes invalid.

[0092] In this embodiment, the billing sidecar node is synchronously invalidated after the cloud computing node is recycled. By disconnecting the billing sidecar node after the cloud computing node is recycled, redundant billing after the task execution is completed can be effectively prevented.

[0093] Please refer to Figure 4 , Figure 4 A schematic diagram of the structure of a billing service node provided in an embodiment of the present application, wherein the cloud computing node includes an execution program and a billing sidecar program connected to the execution program, wherein the execution program is used to execute container tasks, and the billing sidecar program is used to obtain the task execution status of the execution program, and the billing service node 400 includes:

[0094] A receiving module 410, which is configured to receive heartbeat information of a billing sidecar program, wherein the heartbeat information carries a task execution status of an execution program connected to the billing sidecar program;

[0095] A generating module 420, when the current task execution state is being executed, generates billing information based on the heartbeat information at every preset time period;

[0096] A charging module 430 configured to perform charging based on the charging information;

[0097] The indication module 440 is configured to generate first indication information when the current task execution status is execution completion, and send the first indication information to the cloud computing control cluster so that the cloud computing control cluster reclaims the cloud computing node corresponding to the billing sidecar program based on the first indication information.

[0098] In one implementation, the generating module 420 includes:

[0099] A billing start unit, configured to start billing for the cloud computing node when the heartbeat information of the billing sidecar program is received for the first time and the heartbeat information indicates that the current task execution state is start execution;

[0100] A billing stopping unit, configured to stop billing the computing node when the received heartbeat information indicates that the current task execution status is execution completion;

[0101] A generating unit is configured to generate billing information at preset time intervals based on a start state and a stop state of billing.

[0102] In one embodiment, the generation unit is specifically configured to obtain meta-billing information in the start state of billing, where the meta-billing information is used to indicate the billing conditions of the execution program executing the container task within a preset time period; and generate billing information every preset time period based on the start state and stop state of billing according to the meta-billing information.

[0103] In one implementation, if the current task execution status is executing, the method further includes:

[0104] An acquisition module is configured to obtain the account balance information of the current task in real time;

[0105] The deduction module 430 is also configured to, when the amount value of the current billing information does not reach the amount value of the account balance information, deduct fees based on the billing information; and, when the amount value of the current billing information reaches the amount value of the account balance information, deduct fees based on the account balance information and generate a second indication information so that the cloud computing control cluster reclaims the cloud computing node corresponding to the billing sidecar program based on the second indication information.

[0106] In one embodiment, the device further comprises:

[0107] A receiving module, configured to receive recycling information of the cloud computing control cluster, wherein the recycling information is generated after the cloud computing control cluster recycles the cloud computing node corresponding to the billing sidecar program;

[0108] A disconnection module is configured to disconnect the connection with the billing sidecar node, and the billing sidecar node becomes invalid.

[0109] In one implementation, the container task is an algorithm training task.

[0110] Please refer to Figure 5 , Figure 5 A billing system for containerized cloud computing resources provided in an embodiment of the present application includes a cloud computing control cluster 510, a cloud computing resource pool 520, and a billing service cluster 530.

[0111] The cloud computing control cluster 510 is used to create one or more cloud computing nodes (referred to as nodes in the figure) in the cloud computing resource pool 520, wherein the cloud computing node includes an execution program and a billing sidecar program connected to the execution program, the execution program is used to execute container tasks, and the billing sidecar program is used to obtain the task execution status of the execution program;

[0112] The billing service cluster 530 includes one or more billing service nodes 400, and the one or more billing service nodes 400 are used to receive the heartbeat information of the billing sidecar program 522 of the one or more cloud computing nodes, the heartbeat information carries the task execution status of the execution program connected to the billing sidecar program, and generates billing information based on the heartbeat information at preset time intervals, deducts fees based on the billing information, generates first indication information when the current task execution status is execution completion, and sends the first indication information to the cloud computing control cluster 510;

[0113] The cloud computing control cluster 510 is further configured to reclaim the cloud computing node corresponding to the billing sidecar program in the cloud computing resource pool based on the first indication information.

[0114] In one implementation, the cloud computing resource pool is implemented based on Kubernetes.

[0115] As you can understand, Kubernetes is an open source container orchestration engine that supports automated deployment, large-scale scalability, and application container management. When deploying an application in a production environment, you usually need to deploy multiple instances of the application to load balance application requests.

[0116] In one implementation, the number of the billing service nodes matches the number of cloud computing nodes.

[0117] In one implementation, each billing service node may correspond to a billing sidecar program, that is, a billing service node is responsible for billing a cloud computing node. In some embodiments, a billing service node may also be responsible for the billing of multiple cloud computing nodes. Regardless of the above method, the billing of each cloud computing node is carried out separately, which can effectively improve the rationality of cloud computing resource billing.

[0118] It should be noted that the system provided by the present application deducts fees in real time, reduces resource waste, does not invade programs, and does not occupy resources. It supports elastic scaling and can automatically increase or decrease resources as needed according to runtime conditions. In addition, all the method steps implemented in the above method embodiment can be implemented accordingly, and the same technical effects can be achieved. The parts and beneficial effects that are the same as those in the method embodiment will not be described in detail here.

[0119] Please refer to Figure 6 , Figure 6 A billing service node provided in an embodiment of the present application, such as Figure 6 As shown, it includes: a memory 61 and a processor 62;

[0120] The memory 61 stores computer-executable instructions;

[0121] The processor 62 executes the computer-executable instructions stored in the memory 61, so that the billing service node executes the billing method for containerized cloud computing resources.

[0122] It should be noted here that the above-mentioned billing service node provided in the present application can correspondingly implement all the method steps implemented by the billing service node in the above-mentioned method embodiment, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be specifically described here.

[0123] The embodiment of the present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the billing method for containerized cloud computing resources.

[0124] The embodiment of the present application also provides a computer program product, which includes a computer program code. When the computer program code runs on a computer, the computer executes the billing method for containerized cloud computing resources.

[0125] An embodiment of the present application also provides a chip, including a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory to execute the billing method for containerized cloud computing resources.

[0126] It should be noted here that the above-mentioned computer-readable storage medium, computer program product, and chip provided in the present application can correspondingly implement all the method steps implemented by the billing service node in the above-mentioned method embodiment, and can achieve the same technical effect. The parts and beneficial effects that are the same as those in the method embodiment will not be specifically described here.

[0127] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium).

[0128] As is well known to those skilled in the art, the term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information, such as computer-readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer.

[0129] Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0130] In the description of the embodiments of the present application, the term "and / or" merely represents an association relationship that describes associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" represents any combination of at least two of any one or more of a plurality of. For example, at least one of A, B, may represent any one or more elements selected from a set that communicates A, B, and C. In addition, the term "plurality" means two or more, unless otherwise precisely and specifically specified.

[0131] In the description of the embodiment of the present application, the terms "first", "second", "third", "fourth", etc. (if present) are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0132] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A billing method for containerized cloud computing resources, characterized in that: The cloud computing node stores an execution program and a billing sidecar program connected to the execution program, the execution program is used to execute container tasks, the billing sidecar program is used to obtain the task execution status of the execution program, and the billing sidecar program is packaged into the execution program image in the form of a basic image. The method includes: Receive heartbeat information of a billing sidecar program, where the heartbeat information carries a task execution status of an execution program connected to the billing sidecar program; If the current task execution state is being executed, then generating billing information based on the heartbeat information at every preset time period, and deducting fees based on the billing information; If the current task execution status is execution completion, first indication information is generated, and the first indication information is sent to the cloud computing control cluster, so that the cloud computing control cluster reclaims the cloud computing node corresponding to the billing sidecar program based on the first indication information; After first indicating information to the cloud computing control cluster, the method further includes: Receiving recycling information of the cloud computing control cluster, where the recycling information is generated after the cloud computing control cluster recycles the cloud computing node corresponding to the billing sidecar program; The connection with the billing sidecar node is disconnected, and the billing sidecar node becomes invalid.

2. The method according to claim 1, characterized in that Generating the billing information based on the heartbeat information at every preset time period includes: When the heartbeat information of the billing sidecar program is received for the first time and the heartbeat information indicates that the current task execution status is start execution, start billing for the cloud computing node; When the received heartbeat information indicates that the current task execution status is completed, stop charging the computing node; The billing information is generated at every preset time period based on the start state and stop state of the billing.

3. The method according to claim 2, characterized in that The charging-based start state and stop state generate charging information every preset time period, including: In a charging startup state, obtaining meta-billing information, the meta-billing information being used to indicate a billing condition for the execution program to execute a container task within a preset time period; The billing information is generated according to the meta-billing information at intervals of the preset time period based on the start state and the stop state of the billing.

4. The method according to claim 1, characterized in that: If the current task execution status is executing, it also includes: Get the account balance information of the current task in real time; The deducting fees based on the billing information includes: If the amount of the current billing information does not reach the amount of the account balance information, deducting the fee based on the billing information; If the amount value of the current billing information reaches the amount value of the account balance information, deductions are made based on the account balance information, and second indication information is generated so that the cloud computing control cluster reclaims the cloud computing node corresponding to the billing sidecar program based on the second indication information.

5. The method according to claim 1, characterized in that The container task is an algorithm training task.

6. A charging service node, characterized in that: The cloud computing node includes an execution program and a billing sidecar program connected to the execution program, the execution program is used to execute container tasks, the billing sidecar program is used to obtain the task execution status of the execution program, and the billing sidecar program is packaged into the execution program image in the form of a basic image. The billing service node includes: A receiving module, which is configured to receive heartbeat information of a billing sidecar program, wherein the heartbeat information carries a task execution status of an execution program connected to the billing sidecar program; A generating module, when the current task execution state is being executed, generates billing information based on the heartbeat information at every preset time period; A charging module configured to perform charging based on the charging information; An indication module, configured to generate first indication information when the current task execution status is execution completion, and send the first indication information to the cloud computing control cluster, so that the cloud computing control cluster reclaims the cloud computing node corresponding to the billing sidecar program based on the first indication information; A receiving module, which is configured to receive recycling information of the cloud computing control cluster, where the recycling information is generated after the cloud computing control cluster recycles the cloud computing node corresponding to the billing sidecar program; A disconnection module is configured to disconnect the billing sidecar node, causing the billing sidecar node to become invalid.

7. A billing system for containerized cloud computing resources, characterized in that: Including cloud computing control cluster, cloud computing resource pool and billing service cluster, The cloud computing control cluster is used to create one or more cloud computing nodes in the cloud computing resource pool, wherein the cloud computing node includes an execution program and a billing sidecar program connected to the execution program, the execution program is used to execute container tasks, and the billing sidecar program is used to obtain the task execution status of the execution program; the billing sidecar program is packaged into the execution program image in the form of a basic image; The billing service cluster includes one or more billing service nodes, and the one or more billing service nodes are used to receive heartbeat information of the billing sidecar program of the one or more cloud computing nodes, the heartbeat information carries the task execution status of the execution program connected to the billing sidecar program, and generates billing information based on the heartbeat information every preset time period, deducts fees based on the billing information, generates first indication information when the current task execution status is execution completion, and sends the first indication information to the cloud computing control cluster; Receiving recycling information of the cloud computing control cluster, the recycling information is generated after the cloud computing control cluster recycles the cloud computing node corresponding to the billing side car program; disconnecting from the billing side car node, and making the billing side car node invalid; The cloud computing control cluster is further used to reclaim the cloud computing node corresponding to the billing sidecar program in the cloud computing resource pool based on the first indication information.

8. The system according to claim 7, characterized in that The cloud computing resource pool is implemented based on Kubernetes.

9. The system according to claim 7, characterized in that The number of the billing service nodes matches the number of cloud computing nodes.

10. A charging service node, characterized in that: include: Memory and processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the billing service node executes the billing method for containerized cloud computing resources described in any one of claims 1-5.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the billing method for containerized cloud computing resources according to any one of claims 1 to 5.

12. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the billing method for containerized cloud computing resources according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Telecommunication charging method and system based on event-driven architecture, and related equipment

    CN114615096A

  • Cloud native job scheduling method and system and storage medium

    CN114661436A

  • Voice soft switch service method, device and system, electronic equipment and storage medium

    CN114710445A