Resource allocation method, resource application method, cloud platform and computing device
By receiving resource allocation requests on the cloud platform and determining the preset time and cumulative time, combining the on-time payment and downtime saving mode, the problem of unreasonable allocation of cloud computing resources is solved, and flexible and economical resource management is achieved.
Patent Information
- Application Number
- CN202410011967.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-03
- Publication Date
- 2025-07-04
AI Technical Summary
The existing cloud platforms lack clear resource allocation standards when allocating cloud computing resources, resulting in unreasonable resource allocation and inability to effectively meet the flexibility and elastic needs of different terminals.
By receiving the resource allocation request from the terminal, the preset time and cumulative time of the target cloud computing resource are determined based on the account information and resource information, and resources are allocated to the target account only when the cumulative time does not reach the preset time, and the per-time payment mode is supported, combining the downtime mode to achieve flexible allocation of resources.
Reasonable allocation of cloud computing resources has been achieved, the flexibility and flexibility of the cloud platform has been improved, the cost of resource use has been reduced, and the cost of avoiding waste when resources are idle is not available.
Smart Images

Figure CN120263754A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of network cloud technology, and particularly to a resource allocation method, a cloud platform, a computing device, and a computer-readable storage medium. Background Art
[0002] With the development of network cloud technology, terminals utilize the high-computing-performance cloud computing resources on the network cloud, reducing the software and hardware costs of the terminals.
[0003] Currently, the cloud platform allocates cloud computing resources according to the resource usage requirements of the terminals, achieving on-demand deployment, with high flexibility while having dynamic scalability. However, the cloud computing resources on the cloud platform are limited and cannot allocate cloud computing resources to all terminals with demands without limit. A clear resource allocation standard is needed to achieve reasonable allocation of cloud computing resources. Summary of the Invention
[0004] In view of this, the embodiments of this specification provide a resource allocation method. One or more embodiments of this specification also relate to a resource application method, a cloud platform, a resource allocation device, a resource application device, a computing device, a computer-readable storage medium, and a computer program to solve the technical defects existing in the prior art.
[0005] According to the first aspect of the embodiments of this specification, a resource allocation method is provided, which is applied to a cloud platform and includes:
[0006] Receiving a resource allocation request sent by a terminal, where the resource allocation request carries the account information of the target account logging in to the terminal and the resource information of the target cloud computing resources requested to be allocated;
[0007] Determining the preset duration and the cumulative duration of the target account for the target cloud computing resources according to the account information and the resource information, where the cumulative duration is obtained by cumulatively calculating the duration when the resource usage status of the target cloud computing resources is in the enabled state;
[0008] Allocating the target cloud computing resources to the target account when the cumulative duration has not reached the preset duration.
[0009] According to the second aspect of the embodiments of this specification, a resource application method is provided, which is applied to a cloud platform and includes:
[0010] Receiving a resource application request sent by a terminal, where the resource application request carries the account information of the target account logging in to the terminal and the resource information of the target cloud computing resources requested to be allocated;
[0011] Set the preset duration of the target account for the target cloud computing resource according to the account information and the resource information, where the preset duration is used to determine whether to allocate the target cloud computing resource to the target account.
[0012] According to the third aspect of the embodiments of the present specification, a cloud platform is provided, including a resource allocation end and a cloud computing node for configuring the target cloud computing resource;
[0013] The resource allocation end is configured to receive a resource allocation request sent by a terminal, where the resource allocation request carries the account information of the target account logging in to the terminal and the resource information for requesting to allocate the target cloud computing resource; determine the preset duration and the cumulative duration of the target account for the target cloud computing resource according to the account information and the resource information, where the cumulative duration is obtained by accumulating the duration when the resource usage status of the target cloud computing resource is in the enabled state; allocate the target cloud computing resource to the target account when the cumulative duration does not reach the preset duration, and send a processing task to the cloud computing node for configuring the target cloud computing resource;
[0014] The cloud computing node is configured to receive the processing task and execute the processing task.
[0015] According to the fourth aspect of the embodiments of the present specification, a resource allocation device is provided, which is applied to a cloud platform and includes:
[0016] A first receiving module, configured to receive a resource allocation request sent by a terminal, where the resource allocation request carries the account information of the target account logging in to the terminal and the resource information for requesting to allocate the target cloud computing resource;
[0017] A determining module, configured to determine the preset duration and the cumulative duration of the target account for the target cloud computing resource according to the account information and the resource information, where the cumulative duration is obtained by accumulating the duration when the resource usage status of the target cloud computing resource is in the enabled state;
[0018] An allocating module, configured to allocate the target cloud computing resource to the target account when the cumulative duration does not reach the preset duration.
[0019] According to the fifth aspect of the embodiments of the present specification, a resource application device is provided, which is applied to a cloud platform and includes:
[0020] A second receiving module, configured to receive a resource application request sent by a terminal, where the resource application request carries the account information of the target account logging in to the terminal and the resource information for requesting to allocate the target cloud computing resource;
[0021] A setting module, configured to set a preset duration for a target account for target cloud computing resources according to account information and resource information, where the preset duration is used to determine whether to allocate the target cloud computing resources to the target account.
[0022] According to a sixth aspect of the embodiments of the present specification, a computing device is provided, including:
[0023] A memory and a processor;
[0024] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the above resource allocation method are implemented.
[0025] According to a seventh aspect of the embodiments of the present specification, a computer-readable storage medium is provided, which stores computer-executable instructions. When the instructions are executed by a processor, the steps of the above resource allocation method are implemented.
[0026] According to an eighth aspect of the embodiments of the present specification, a computer program is provided. When the computer program is executed on a computer, the computer is made to execute the steps of the above resource allocation method.
[0027] In an embodiment of the present specification, a resource allocation request sent by a receiving terminal is received, where the resource allocation request carries the account information of the target account logging in to the terminal and the resource information of the request to allocate the target cloud computing resources; according to the account information and the resource information, the preset duration and the cumulative duration of the target account for the target cloud computing resources are determined, where the cumulative duration is obtained by cumulatively calculating the duration when the resource usage status of the target cloud computing resources is in an enabled state; when the cumulative duration does not reach the preset duration, the target cloud computing resources are allocated to the target account. By determining the preset duration and the cumulative duration of the target account for the target cloud computing resources according to the account information and the resource information, and the cumulative duration is obtained by cumulatively calculating the duration when the resource usage status of the target cloud computing resources is in an enabled state, it is possible to directly determine whether to allocate the target cloud computing resources to the target account based on the cumulative duration and the preset duration, establishing a clear set of resource allocation criteria and realizing reasonable cloud computing resource allocation. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 is a flowchart of a resource allocation method provided by an embodiment of the present specification;
[0029] Figure 2 is a duration schematic diagram of a resource allocation method provided by an embodiment of the present specification;
[0030] Figure 3 is an architecture schematic diagram of a cloud platform in a resource allocation method provided by an embodiment of the present specification;
[0031] Figure 4 is a flowchart of a resource application method provided by an embodiment of this specification;
[0032] Figure 5 is a processing flowchart of a resource allocation method applied to cloud server billing provided by an embodiment of this specification;
[0033] Figure 6 is a schematic structural diagram of a cloud platform provided by an embodiment of this specification;
[0034] Figure 7 is a schematic structural diagram of a resource allocation device provided by an embodiment of this specification;
[0035] Figure 8 is a schematic structural diagram of a resource application device provided by an embodiment of this specification;
[0036] Figure 9 is a structural block diagram of a computing device provided by an embodiment of this specification. Detailed implementation manners
[0037] Many specific details are set forth in the following description in order to provide a thorough understanding of this specification. However, this specification can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the connotation of this specification. Therefore, this specification is not limited by the specific implementations disclosed below.
[0038] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a", "the", and "said" used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more of the associated listed items.
[0039] It should be understood that although the terms first, second, etc. may be used in one or more embodiments of this specification to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "when" or "upon" or "in response to determining".
[0040] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data that have been authorized by the user or fully authorized by all parties. Moreover, the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation entrances are provided for users to choose to authorize or refuse.
[0041] First, the noun terms involved in one or more embodiments of this specification are explained.
[0042] Annual or monthly package: A prepaid mode of resource allocation. Long-term lease of cloud computing resources and payment on an annual or monthly basis, which is applicable to scenarios where cloud computing resources are used for a long time. For example, for a Web site application that needs to provide services 24 hours a day, choosing the annual or monthly package mode for resource allocation results in the most cost-effective average cost.
[0043] Pay-as-you-go: A postpaid mode of resource allocation. Settlement is made at the hour mark, and payment is made according to the usage volume of cloud computing resources. It is applicable to application scenarios during short periods or project peaks. For example, in some scenarios where the project volume suddenly increases, combined with Server Load Balancer (SLB), elastic scaling automatically creates and releases Pay-as-you-go type ECS instances to handle sudden traffic.
[0044] Savings plan: A discount plan for resource allocation. By prepaying for this plan, the usage fees of cloud computing resources can be deducted on a per-usage basis. Compared with the annual or monthly package mode and the pure Pay-as-you-go mode, the combination of the savings plan and the Pay-as-you-go mode is more flexible in use.
[0045] Flexible resource usage: The savings plan cannot be used alone and must be used in combination with Pay-as-you-go instances.
[0046] Cost savings: By committing to spend a certain amount of money within 1 year, 3 years, or 5 years, a discount on the usage fees of cloud computing resources is obtained.
[0047] Flexible payment: Supports the 0 prepayment, partial prepayment, and full prepayment modes.
[0048] Pay-As-You-Go + Savings Halt Mode: After enabling Pay-As-You-Go + Savings Halt Mode, some resources will be reclaimed and the charging will be suspended. The elastic compute service resources that support the savings halt mode (i.e., some resources will be reclaimed and the charging will be suspended) include: compute resources, fixed public IP (Internet Protocol), and fixed bandwidth. The elastic compute service resources that do not support the savings halt mode (i.e., some resources will be retained and continue to be charged, and the charging items are the same as those for pay-as-you-go) include but are not limited to: system disk, data disks mounted on the instance, elastic public IP, elastic bandwidth, images, and snapshots.
[0049] Infrastructure as a Service (IaaS): A cloud computing service model. In this service model, the cloud service provider provides users with access to and use of computing infrastructure resources over the Internet. Users can rent and configure these resources as needed without having to purchase and maintain hardware devices themselves. IaaS typically includes cloud computing resources such as servers, storage space, network devices, and data center facilities, and allows users to be billed according to actual usage or occupancy.
[0050] Elastic Compute Service (ECS): A cloud computing service that is an infrastructure service model and allows users to create and manage virtual server instances in the cloud. These virtual servers can meet various different computing needs and can flexibly allocate elastic cloud computing resources according to project requirements, including scaling up or down. It is applicable to a variety of scenarios, including website hosting, application deployment, big data processing, and game development, etc.
[0051] Refund Penalty Measures: For the annual / monthly subscription mode and savings plans, which are models that obtain the use of low-cost cloud computing resources by prepaying, a certain fee will be charged for early refund applications to ensure the rights and interests of the cloud platform provider.
[0052] Resource Instance: The resource is concretized into an operable and manageable resource object.
[0053] Application Specific Integrated Circuit (ASIC): An integrated circuit designed for a specific purpose.
[0054] Field Programmable Gate Array (FPGA): A semi-custom circuit that is a programmable logic array.
[0055] Operating System: Responsible for managing hardware resources and providing an environment for running other applications.
[0056] Virtualization technology: used to create multiple independent virtual environments on a single physical node.
[0057] Container management system: used to manage and schedule containerized applications.
[0058] Distributed computing framework: supports large-scale data processing and analysis tasks.
[0059] Database Management System (DBMS for short): an application used to manage databases.
[0060] Message queue system: used for asynchronous message passing and decoupling system components.
[0061] File storage system: used to share files and data across multiple nodes.
[0062] Monitoring and logging management tools: used to collect and analyze system performance and event data.
[0063] Security software: such as firewalls, Intrusion Detection Systems (IDS for short), identity authentication and authorization mechanisms to protect the security of nodes.
[0064] Cluster management software: used to maintain high availability and failover capabilities.
[0065] Configuration management tools: used for automated deployment and management of software configurations.
[0066] Kubernetes system: abbreviated as K8s, is an open-source system used to manage containerized applications on multiple hosts in a cloud platform. The goal of Kubernetes is to make the deployment of containerized applications simple and efficient. Kubernetes provides mechanisms for container deployment, planning, updating, and maintenance.
[0067] ARM (Advanced RISC Machines) architecture: a Reduced Instruction Set Computer (RISC) processor architecture.
[0068] x86 architecture: a Complex Instruction Set Computer (CISC) processor architecture.
[0069] In this specification, a resource allocation method is provided. This specification also relates to a resource application method, a cloud platform, a resource allocation device, a resource application device, a computing device, a computer-readable storage medium, and a computer program, which will be described in detail one by one in the following embodiments.
[0070] See Figure 1 , Figure 1 FIG. shows a flowchart of a resource allocation method provided by an embodiment of this specification. This method is applied to a cloud platform and includes the following specific steps:
[0071] Step 102: Receive a resource allocation request sent by a terminal. The resource allocation request carries the account information of the target account logging in to the terminal and the resource information of the target cloud computing resources requested to be allocated.
[0072] The embodiments of this specification can be directly applied to a cloud platform or can be called through an Application Programming Interface (API), for example, by calling a cloud platform through OpenAI, which is not limited herein.
[0073] A cloud platform is an online cloud computing resource service platform that provides computing, storage, and network resources. In the embodiments of this specification, the cloud platform is a cloud platform for elastic computing services. Cloud computing resources are delivered to end-users (users of the target account) through the Internet. Users generate and send various resource requests through the client of the cloud computing platform on the terminal, including but not limited to: resource application requests, resource allocation requests, and task suspension requests. The cloud platform allows users to expand or reduce cloud computing resources according to project requirements, realizing the elastic allocation of cloud computing resources. The cloud platform includes a resource allocation end, a platform database, and multiple distributed cloud computing nodes. Cloud computing resources with specific parameter specifications are configured on the cloud computing nodes. The resource allocation end executes processing tasks by allocating cloud computing resources on the cloud computing nodes to end-users.
[0074] Cloud computing resources are distributed computing resources deployed on a cloud platform. By allocating cloud computing resources to end users, remote cloud computing is achieved to execute cloud computing tasks. Resource instantiation processing of cloud computing resources is required to execute cloud computing tasks. Generally, cloud computing resources are configured on cloud computing nodes according to specific parameter specifications and have high computing performance. Among them, a cloud computing node is a distributed node on the cloud platform and is a basic component of the cloud platform. It constitutes a physical server or virtual server of the cloud platform. A cloud computing node usually has software and hardware resources. Cloud computing resources include a variety of software and hardware resources. Specifically, hardware resources include but are not limited to: central processing unit, graphics processing unit (Graphic Processing Unit, abbreviated as GPU), integrated circuit (such as application-specific integrated circuit and field programmable gate array), memory and hard disk. Among them, software resources include but are not limited to: operating system, virtualization technology, container management system, distributed computing framework, database management system, message queue system, file storage system, monitoring and logging management tool, security software, cluster management software and configuration management tool. For example, cloud computing resources to be instantiated are deployed on a cloud computing node: 32 central processing units, 128GB of memory, Linux operating system, container (Docker) virtualization technology and Kubernetes container management system.
[0075] Target cloud computing resources are cloud computing resources allocated for user requests. Target cloud computing resources can be pre-applied by users. For example, a user pre-applies for cloud computing resources on cloud computing node M: 4 central processing units, 32GB of memory, as target cloud computing resources. Target cloud computing resources can also be automatically matched to users. For example, a user applies for cloud computing resources with 4 central processing units and 32GB of memory on the cloud platform, and the cloud computing resources on cloud computing node M are determined as target cloud computing resources. Target cloud computing resources can also be directly selected by users. For example, a user selects the cloud computing resources on cloud computing node M from idle cloud computing resources on the cloud platform: 4 central processing units, 32GB of memory, as target cloud computing resources, which is not limited here.
[0076] The resource information of the target cloud computing resource is the parameter and / or attribute information of the target cloud computing resource, which is used to distinguish and manage different cloud computing resources on the cloud platform. The resource information includes, but is not limited to: identification information, type information, specification parameters, performance index parameters, and configuration information. For the identification information, the format of the identification information generally follows a specific naming rule. For example, the resource information of the target cloud computing resource is: "projects / my-project-id / zones / cn / instances / my-instance". For the type information, for example, virtual machines (VMs), containers, database instances, storage spaces, network bandwidths, load balancers, etc. For the scale parameters, for example, the number of CPU cores, memory size (GB), disk capacity (GB / TB), etc. For the performance metrics, for example, I / O throughput, network latency requirements, specific geographical location requirements, etc. For the configuration information, for example, the type and version of the operating system, the requirements for pre-installed software or middleware, security settings (such as firewall rules), and other custom configuration options, etc.
[0077] The terminal is a hardware terminal device for resource allocation when the user logs in, including, but not limited to: PC terminals and mobile terminals. The user realizes the use of the cloud computing resources on the cloud platform by logging in to the client of the cloud platform on the terminal through the target account on the cloud platform. The target account is the account of the user on the cloud platform, which realizes identity authentication and access to the cloud platform. The account information of the target account is the authentication information used to verify the identity of the target account, including, but not limited to: account identification, account number, account password, and terminal verification code. For example, an enterprise user logs in to the mobile client of the cloud platform on the mobile terminal, and verifies the identity information of the enterprise user through the account number of the enterprise user on the mobile client, so as to realize the use of the cloud computing resources on the cloud platform.
[0078] The resource allocation request is an instruction request used to request the allocation of the target cloud computing resource for the target account to use. Through the resource allocation request, the cloud platform is required to allocate the corresponding target cloud computing resource for the target account to execute the processing task. In addition to carrying the account information of the target account of the logged-in terminal and the resource information of the requested allocation of the target cloud computing resource, the resource allocation request can also carry information such as resource parameter specifications, resource parameter types, resource usage duration, and resource allocation priority (for example, preferentially allocate high-performance resources), etc. The resource allocation request can be automatically generated and sent to the cloud platform on the terminal, or can be generated after the user selects to enable the enabled state, which is not limited here.
[0079] Exemplarily, an enterprise user of a certain Web site application logs in to the PC client of the cloud platform on the PC side. The cloud platform is a cloud platform for elastic computing services. The enterprise user has previously applied for 150 hours of target cloud computing resources "my-instance" on the cloud platform: under the ARM architecture: 64 central processing units (CPUs) and 256 GB of memory to perform the operation and maintenance tasks of the Web site application. The enterprise user enters the account number and password of the enterprise account on the client of the cloud platform through the PC side to enable the enabled state, and the PC side sends a resource allocation request to the cloud platform. The cloud platform receives the resource allocation request, where the resource allocation request carries the account number, password of the enterprise account of the Web site application, and the resource information "my-instance" of the target cloud computing resources.
[0080] Receive the resource allocation request sent by the receiving terminal, where the resource allocation request carries the account information of the target account of the login terminal and the resource information of the requested allocation of the target cloud computing resources. By receiving the resource allocation request carrying the account information and the resource information, resource allocation is triggered, and reference information is provided for subsequently determining the preset duration and the cumulative duration of the target account for the target cloud computing resources.
[0081] Step 104: Determine the preset duration and the cumulative duration of the target account for the target cloud computing resources according to the account information and the resource information, where the cumulative duration is obtained by cumulatively calculating the duration when the resource usage status of the target cloud computing resources is in the enabled state.
[0082] The preset duration for the target cloud computing resources is the total usage duration preset for the target account for the target cloud computing resources. The preset duration is determined through prior resource application or resource allocation. The preset duration is bound to the target account and the target cloud computing resources and is recorded on the cloud platform. The cumulative duration for the target cloud computing resources is the duration that the target account has used the target cloud computing resources and is the effective usage duration for the target cloud computing resources. Specifically, it is obtained by cumulatively calculating the duration when the resource usage status of the target cloud computing resources is in the enabled state. For example, the target account has preset a total usage duration of one year for the target cloud computing resources, and the target cloud computing resources can only be released after one year of usage. In fact, the target cloud computing resources have been used for two years, and only one year of the target cloud computing resources is in the enabled state, which is the duration that the target cloud computing resources have been used, while the other year of the target cloud computing resources is in the suspended state and belongs to the non-effective usage duration.
[0083] The resource usage status is the resource usage status of the target account using the target cloud computing resources, including but not limited to: enabled status and suspended status. Among them, the enabled status is the resource usage status indicating that the target account is using the target cloud computing resources, and the suspended status is the resource usage status indicating that the target account suspends using the target cloud computing resources. In the suspended status, the target cloud computing resources can be partially released. The resource usage status can be determined by the target account on the terminal. For example, the user clicks the "Start" control on the client to enable the enabled status, or clicks the "Suspend" control to enable the suspended status. The resource usage status can also be automatically converted by the cloud platform. For example, it is automatically converted after identifying that the target cloud computing resources are allocated to the target account, which is not limited here.
[0084] Figure 2 The duration schematic diagram of a resource allocation method provided by an embodiment of this specification is shown, as Figure 2 shown:
[0085] The resource usage status of the target cloud computing resources includes the enabled status and the suspended status. In the enabled status, there are three durations: start for X hours, start for Y hours, and start for Z hours. In the suspended status, there are two durations: suspend for M hours and suspend for N hours. The durations of the resource usage status of the target cloud computing resources being in the enabled status are cumulatively calculated to obtain the cumulative duration = X + Y + Z hours.
[0086] It should be noted that the target cloud computing resources have corresponding parameter specifications. When setting the preset duration, it can be for the target cloud computing resources with the first parameter specification. The cloud platform records the preset duration and the cumulative duration of the target account for the target cloud computing resources with the first parameter specification. When the terminal requests resource allocation, it can be a resource allocation request sent for the target cloud computing resources with the second parameter specification. It is necessary to perform duration conversion on the preset duration and the cumulative duration based on the first parameter specification and the second parameter specification to determine the preset duration and the cumulative duration of the target account for the target cloud computing resources with the second parameter specification. Through such an operation, the upscaling and downscaling of the target cloud computing resources are achieved, making the resource allocation more flexible and elastic.
[0087] Correspondingly, according to the account information and resource information, determine the preset duration and cumulative duration of the target account for the target cloud computing resource. The specific method is as follows: According to the account information and resource information, query the preset duration and cumulative duration of the target cloud computing resource with the first parameter specification pre-applied by the target account, and based on the first parameter specification and the second parameter specification, according to the conversion rule of duration conversion, perform duration conversion to obtain the preset duration and cumulative duration of the target cloud computing resource with the second parameter specification for the target account. The conversion rule of duration conversion can be determined by conversion according to the resource cost ratio or performance index. For example, the first parameter specification is a standard virtual machine configured with 4-core CPU and 8GB memory. Enterprise A has preset a maximum monthly usage duration of 50 hours for this specification, and has currently used 30 hours cumulatively. The second parameter specification is a performance-optimized virtual machine configured with 2-core CPU and 16GB memory. The cloud computing resource costs and values of different specifications may be different. The cloud service provider converts the duration preset and accumulated by Enterprise A for the first parameter specification into the corresponding preset and cumulative duration for the second parameter specification according to the conversion rule set internally, by conversion according to the resource cost ratio or performance index. After calculation by the conversion rule, it is obtained that for the target cloud computing resource with the second parameter specification for Enterprise A, its preset duration is adjusted to 70 hours accordingly, and the cumulative duration is 45 hours.
[0088] Exemplarily, the cumulative duration is obtained by cumulatively calculating the duration when the resource usage status of the enterprise account to which the Web website is applied is in the enabled state: 100 hours. According to the account number, password of the enterprise account and the resource information "my-instance" of the target cloud computing resource, query the preset duration: 200 hours, and the cumulative duration: 100 hours of the target cloud computing resource "my-instance" (under the ARM architecture: 32 central processing units and 256GB memory) with the first parameter specification pre-applied by the enterprise account. Based on the first parameter specification (under the ARM architecture: 32 central processing units and 256GB memory) and the second parameter specification (under the ARM architecture: 64 central processing units and 256GB memory), perform duration conversion to obtain the preset duration: 150 hours and the cumulative duration: 75 hours of the target cloud computing resource with the second parameter specification for the enterprise account.
[0089] According to the account information and resource information, determine the preset duration and cumulative duration of the target account for the target cloud computing resource, where the cumulative duration is obtained by cumulatively calculating the duration when the resource usage status of the target cloud computing resource is in the enabled state. By cumulatively calculating the duration when the resource usage status of the target cloud computing resource is in the enabled state to obtain the cumulative duration, the actual usage duration of the target cloud computing resource is obtained. At the same time, by determining the preset duration of the target account for the target cloud computing resource, the duration is locked in advance, realizing low-cost cloud computing resource allocation.
[0090] Step 106: When the cumulative duration has not reached the preset duration, allocate target cloud computing resources to the target account.
[0091] Allocating cloud computing resources is to determine a target cloud computing node configured with target cloud computing resources on the cloud platform, virtualize some cloud computing resources, and integrate the cloud computing resources through cluster technology to form a distributed system for the target account, thereby realizing the sharing and allocation of cloud computing resources.
[0092] To allocate target cloud computing resources to the target account, the specific method is: allocate target cloud computing resources with the second parameter specification to the target account.
[0093] Exemplarily, when the cumulative duration (75 hours) has not reached the preset duration (150 hours), allocate target cloud computing resources with the second parameter specification (under the ARM architecture: 64 central processing units and 256GB of memory) to the enterprise account, and based on the target cloud computing resources, perform the operation and maintenance tasks of the Web site application.
[0094] In an optional embodiment of this specification, the method further includes the following specific steps:
[0095] When the cumulative duration reaches the preset duration, prohibit allocating target cloud computing resources to the target account.
[0096] Exemplarily, when the cumulative duration (160 hours) reaches the preset duration (150 hours), prohibit allocating target cloud computing resources with the second parameter specification (under the ARM architecture: 64 central processing units and 256GB of memory) to the enterprise account.
[0097] In the embodiment of this specification, receive a resource allocation request sent by a terminal, where the resource allocation request carries the account information of the target account that logs in to the terminal and the resource information for requesting the allocation of target cloud computing resources; according to the account information and the resource information, determine the preset duration and the cumulative duration of the target account for the target cloud computing resources, where the cumulative duration is obtained by accumulating the duration when the resource usage status of the target cloud computing resources is in the enabled state; when the cumulative duration has not reached the preset duration, allocate target cloud computing resources to the target account. According to the account information, determine the preset duration and the cumulative duration of the target account for the target cloud computing resources, and the cumulative duration is obtained by accumulating the duration when the resource usage status of the target cloud computing resources is in the enabled state. It is possible to directly determine whether to allocate target cloud computing resources to the target account based on the cumulative duration and the preset duration, establish a clear set of resource allocation criteria, and achieve reasonable cloud computing resource allocation.
[0098] In an alternative embodiment of this specification, the resource allocation request further carries a second parameter specification for requesting the allocation of target cloud computing resources;
[0099] Correspondingly, step 104 includes the following specific steps:
[0100] According to the account information and resource information, query the preset duration and cumulative duration of the target cloud computing resources for the first parameter specification pre-applied by the target account;
[0101] Based on the first parameter specification and the second parameter specification, determine the duration conversion rate;
[0102] According to the duration conversion rate, perform duration conversion on the preset duration and cumulative duration to obtain the preset duration and cumulative duration of the target cloud computing resources for the second parameter specification of the target account.
[0103] The target cloud computing resources have corresponding parameter specifications. When setting the preset duration, it is for the cloud computing resources set for the first parameter specification. In the cloud platform, the preset duration and cumulative duration of the target cloud computing resources for the first parameter specification of the target account are recorded. When the terminal requests resource allocation, a resource allocation request can be sent for the target cloud computing resources for the second parameter specification. It is necessary to perform duration conversion on the preset duration and cumulative duration based on the first parameter specification and the second parameter specification to determine the preset duration and cumulative duration of the target cloud computing resources for the target account. The embodiment of this specification is actually a resource allocation scheme based on duration, which can raise or lower the parameter specifications at any time, and the resource allocation is more flexible and elastic.
[0104] The first parameter specification is the parameter specification set when the target account pre-applies for the target cloud computing resources. The second parameter specification is the parameter specification set when the target account requests resource allocation for the target cloud computing resources. For example, a certain individual user applies for target cloud computing resources, and the provider of the cloud platform provides 8 sets of cloud computing resource solutions with different parameter specifications. This individual user applies for the 3rd solution: Under the ARM architecture: 2 central processing units and 32GB of memory. The parameter specification of the 3rd solution is the first parameter specification. During subsequent use, the user needs to upgrade or downgrade the specification and send a resource allocation request, which carries the second parameter specification for requesting the allocation of target cloud computing resources: Under the ARM architecture: 4 central processing units and 64GB of memory.
[0105] The duration conversion rate is the conversion ratio between the durations of the target cloud computing resources for different parameter specifications. In the embodiment of this specification, the duration conversion rate is the conversion ratio between the preset duration and cumulative duration of the target cloud computing resources for the first parameter specification, and the preset duration and cumulative duration of the target cloud computing resources for the second parameter specification. The duration conversion rate is determined according to the allocation strategy of the cloud platform provider for cloud computing resources.
[0106] Based on the first parameter specification and the second parameter specification, determine the duration conversion rate. The specific method is as follows: According to the conversion rule of duration conversion, based on the first parameter specification and the second parameter specification, determine the duration conversion rate. The conversion rule of duration conversion can be determined by conversion according to the resource cost ratio or performance index. For example, the first parameter specification is a standard virtual machine configured with a 4-core CPU and 8GB of memory. Enterprise A has a preset duration of up to 50 hours per month for this specification, and has currently used 30 hours cumulatively. The second parameter specification is a performance-optimized virtual machine configured with a 2-core CPU and 16GB of memory. The cloud computing resource costs and values of different specifications may be different. The cloud service provider converts the preset and cumulative durations of Enterprise A for the first parameter specification into the corresponding preset and cumulative durations of the second parameter specification according to the conversion rule set internally, by conversion according to the resource cost ratio or performance index. After calculation by the conversion rule, for the target cloud computing resource of Enterprise A with the second parameter specification, its preset duration is adjusted to 70 hours accordingly, and the cumulative duration is 45 hours.
[0107] It should be noted that in the embodiments of this specification, the preset duration and cumulative duration of the target cloud computing resource for the first parameter specification applied in advance are pre-recorded on the cloud platform, and can be recorded in the database of the cloud platform. The preset duration and cumulative duration of the target cloud computing resource for the second parameter specification are obtained by calculating according to the duration conversion rate.
[0108] Exemplarily, according to the account number, password of the enterprise account and the resource information "my-instance" of the target cloud computing resource, query from the database the preset duration: 200 hours, and the cumulative duration: 100 hours of the target cloud computing resource "my-instance" (under the x86 architecture: 32 central processing units and 256GB of memory) for the first parameter specification applied in advance by the enterprise account. According to the conversion rule of duration conversion, based on the first parameter specification (under the x86 architecture: 32 central processing units and 256GB of memory) and the second parameter specification (under the ARM architecture: 64 central processing units and 256GB of memory), determine that the duration conversion rate is 1 / 2. According to the duration conversion rate, perform duration conversion on the preset duration and cumulative duration to obtain the preset duration: 150 hours and the cumulative duration: 75 hours of the target cloud computing resource for the second parameter specification of the target account.
[0109] Query the preset duration and cumulative duration of the target cloud computing resources for the first parameter specification pre-applied by the target account according to the account information and resource information; determine the duration conversion rate based on the first parameter specification and the second parameter specification; perform duration conversion on the preset duration and cumulative duration according to the duration conversion rate to obtain the preset duration and cumulative duration of the target cloud computing resources for the second parameter specification of the target account. Through simple conversion rules, the duration conversion of target cloud computing resources with different parameter specifications is realized, and the parameter specifications can be raised or lowered at any time, making resource allocation more flexible and elastic.
[0110] In an optional embodiment of this specification, after step 106, the following specific steps are further included:
[0111] Execute the processing tasks of the target account based on the target cloud computing resources.
[0112] The processing task is a cloud computing task executed using the target cloud computing resources and is sent from the terminal to the cloud platform for execution, including but not limited to: operation and maintenance tasks, containerization tasks, data storage tasks, artificial intelligence model tasks, log tasks, content distribution tasks, application development tasks, and big data analysis tasks, etc.
[0113] Execute the processing tasks of the target account based on the target cloud computing resources. The specific method is: perform resource instantiation processing on the target cloud computing resources, and execute the processing tasks of the target account through the instantiated target cloud computing resources. Among them, the instantiation processing includes but not limited to: establishing virtual machines, starting container services, and building cluster nodes.
[0114] Exemplarily, perform resource instantiation processing on the target cloud computing resources (under the ARM architecture: 64 central processing units and 256GB of memory) on the cloud computing node, and execute the operation and maintenance tasks of the Web site application through the instantiated target cloud computing resources.
[0115] Execute the processing tasks of the target account based on the target cloud computing resources. Execute the processing tasks of the target account based on the reasonably allocated target cloud computing resources, improving the stability, accuracy, and efficiency of task execution.
[0116] In an optional embodiment of this specification, after executing the processing tasks based on the target cloud computing resources, the following specific steps are further included:
[0117] In response to the task suspension request sent by the terminal, suspend the execution of the processing tasks and release the target cloud computing resources.
[0118] The allocation request of the target cloud computing resources for the target account is determined according to the actual project requirements. For project requirements with flexibility requirements, there is no need to bind the target cloud computing resources and the target account for a long time. For example, an IT enterprise needs to use a large amount of target cloud computing resources at the end of each month to complete monthly big data analysis, and does not need a large amount of target cloud computing resources otherwise. For a cloud platform with limited cloud computing resources, if the target cloud computing resources are bound to the target account, other accounts cannot use this part of the idle cloud computing resources, which impairs the flexibility and elasticity of the cloud platform. Therefore, a task suspension mechanism needs to be established. After the terminal sends a task suspension request, the processing task is suspended, and the target cloud computing resources are released.
[0119] Suspend the execution of the processing task and release the target cloud computing resources. Among them, releasing the target cloud computing resources means: applying for a server in advance, and only releasing the computing resources, fixed bandwidth, and fixed IP on the server, but not releasing the storage resources (system disk and data disk), that is, suspending part of the target cloud computing resources.
[0120] Exemplarily, send a task suspension request to the cloud platform on the PC side. In response to the task suspension request sent by the PC side, suspend the execution of the operation and maintenance task and release the instantiated target cloud computing resources (computing resources, fixed bandwidth, and fixed IP).
[0121] In response to the task suspension request sent by the terminal, suspend the execution of the processing task and release the target cloud computing resources. It realizes a more reasonable allocation of cloud computing resources and ensures the flexibility and elasticity of the cloud platform.
[0122] In an optional embodiment of this specification, after step 106, the following specific steps are further included:
[0123] Based on the cumulative duration, accumulate the duration of the resource usage status of the target cloud computing resources being in the enabled state to obtain a cumulative result;
[0124] Based on the cumulative result, obtain the updated cumulative duration.
[0125] After allocating cloud computing resources for the target account, it is determined that the resource usage status of the target cloud computing resources is in the enabled state, and the duration needs to be continuously accumulated for subsequent resource allocation.
[0126] Duration accumulation is an operation of adding up the durations of multiple time periods to calculate the cumulative duration. Duration accumulation is achieved through a dedicated software tool or hardware module. For example, a timer is set on the cloud platform to automatically start duration accumulation, and the trigger condition is: allocating cloud computing resources for the target account. After allocating cloud computing resources for the target account, it is determined that the resource usage status of the target cloud computing resources is in the enabled state.
[0127] The cumulative result is the duration during which the resource usage status of the target cloud computing resource is in the enabled state, which is the cumulative duration from the start time to the current time. The duration accumulation is a dynamically executed process, and the update process of the corresponding accumulated duration is also a dynamically executed result. It can be implemented at a preset frequency or, when the trigger condition for the end of accumulation is reached, the duration accumulation of the duration during which the resource usage status of the target cloud computing resource is in the enabled state is paused, the cumulative result is obtained, and the accumulated duration is updated. The trigger conditions for the end of accumulation include, but are not limited to: the resource usage status of the target cloud computing resource changes to the suspended state, the target cloud computing resource is released, or the processing task is completed, which is not limited here.
[0128] See Figure 2 , for the start time of the third paragraph, the current accumulated duration = X + Y. Based on the accumulated duration, the duration accumulation starts: for Z hours, based on the cumulative result, the updated accumulated duration = X + Y + Z.
[0129] Based on the accumulated duration, the duration accumulation of the duration during which the resource usage status of the target cloud computing resource is in the enabled state is performed to obtain the cumulative result. The specific method is: determine that the resource usage status of the target cloud computing resource is in the enabled state, and based on the accumulated duration, the duration accumulation of the duration during which the resource usage status of the target cloud computing resource is in the enabled state is performed to obtain the cumulative result.
[0130] Exemplarily, it is determined that the resource usage status of the target cloud computing resource is in the enabled state. Based on the accumulated duration (75 hours), the duration accumulation of the duration during which the resource usage status of the target cloud computing resource is in the enabled state is performed to obtain the cumulative result: 85 hours, and the accumulated duration is updated to obtain the updated accumulated duration: 75 hours + 85 hours = 160 hours.
[0131] Based on the accumulated duration, the duration accumulation of the duration during which the resource usage status of the target cloud computing resource is in the enabled state is performed to obtain the cumulative result; based on the cumulative result, the updated accumulated duration is obtained. The update of the accumulated duration is completed, laying a foundation for subsequent resource allocation.
[0132] In an optional embodiment of this specification, after starting the duration accumulation based on the accumulated duration, the following specific steps are further included:
[0133] When the resource usage status of the target cloud computing resource changes to the suspended state, the duration accumulation is paused.
[0134] When the resource usage status of the target cloud computing resource changes to the suspended state, the suspension duration is accumulated, achieving dynamic duration accumulation based on the resource status of the target cloud computing resource, avoiding the accumulation of time that is not actually used, resulting in the accumulation of invalid time and affecting the reasonable allocation of cloud computing resources, thereby impairing the flexibility and elasticity of the cloud platform. By establishing a reasonable duration accumulation suspension mechanism to timely suspend the duration accumulation, the accuracy of the accumulated duration is improved to achieve a more reasonable allocation of cloud computing resources.
[0135] The suspended state represents the resource usage state in which the target account suspends the use of the target cloud computing resource. In the suspended state, part of the cloud computing resource is released.
[0136] The resource usage state can be determined by the target account on the terminal. For example, the terminal user clicks the "Suspend" control on the client to convert the enabled state to the suspended state. The resource usage state can also be automatically converted by the cloud platform. For example, it is automatically converted to the suspended state after recognizing that the processing task of the target cloud computing resource is completed, which is not limited here.
[0137] Exemplarily, when the resource usage status of the enterprise account changes to the suspended state, the suspension duration is accumulated.
[0138] When the resource usage status of the target cloud computing resource changes to the suspended state, the suspension duration is accumulated. By establishing a reasonable duration accumulation suspension mechanism to timely suspend the duration accumulation, the accuracy of the accumulated duration is improved to achieve a more reasonable allocation of cloud computing resources.
[0139] In an optional embodiment of this specification, after prohibiting the allocation of the target cloud computing resource to the target account, the following specific steps are further included:
[0140] Feedback a first prompt message to the terminal, where the first prompt message is used to prompt that the preset duration of the terminal has been completely consumed.
[0141] When the accumulated duration reaches the preset duration, prohibiting the allocation of the target cloud computing resource to the target account indicates that the preset duration has been completely consumed and a new preset duration for the target cloud computing resource needs to be applied. At this time, by feedbacking a first prompt message to the terminal, the target account logged in to the terminal is prompted.
[0142] The first prompt message is a prompt message fed back to the terminal when the cumulative duration reaches the preset duration, and is used to prompt the terminal that the preset duration has been completely consumed. The terminal can select whether to re-apply for the preset duration for the target cloud computing resource or suspend the use of the target cloud computing resource according to the first prompt message. The first prompt message can be in various forms such as text messages, pop-up windows, emails, and phone calls. For example, the first prompt message is a pop-up window, and the content of the pop-up window is "The preset duration is 100 hours and has now been fully used up. Please confirm whether to re-apply for the preset duration...".
[0143] Exemplarily, when the cumulative duration (160 hours) reaches the preset duration (150 hours), a first prompt message is fed back to the PC side: a pop-up window, and the content of the pop-up window is "The preset duration is 150 hours and has now been fully used up. Please confirm whether to re-apply for the preset duration...". Render the pop-up window on the PC client of the cloud platform.
[0144] Feed back the first prompt message to the terminal, where the first prompt message is used to prompt the terminal that the preset duration has been completely consumed. When the cumulative duration reaches the preset duration, the terminal is timely reminded in the form of a prompt message, improving the user experience.
[0145] In an optional embodiment of this specification, after step 104, the following specific steps are further included:
[0146] When the duration difference between the preset duration and the cumulative duration reaches the preset difference threshold, a second prompt message is fed back to the terminal, where the second prompt message is used to prompt the terminal that the preset duration is nearly completely consumed.
[0147] In order to avoid prompting the user only when the cumulative duration reaches the preset duration, through the preset difference threshold, when the duration difference between the preset duration and the cumulative duration reaches the preset difference threshold, a second prompt message is fed back to the terminal in advance to prompt the target account logged in to the terminal.
[0148] The duration difference between the preset duration and the cumulative duration is the duration difference between the total usage duration and the effective usage duration preset by the target account for the target cloud computing resource. The preset difference threshold is the threshold of the duration difference between the preset duration and the cumulative duration set in advance. The preset difference threshold can be the default on the cloud platform or set by the target account. For example, the target account sets: when the remaining duration is less than 5 hours, remind through text messages, pop-up windows, emails, and phone calls.
[0149] The second prompt message is a prompt message fed back to the terminal when the time difference between the preset duration and the cumulative duration reaches a preset difference threshold, and is used to prompt the terminal that the preset duration is approaching complete consumption. The terminal can choose whether to re-apply for the preset duration for the target cloud computing resource or suspend the use of the target cloud computing resource according to the second prompt message. The second prompt message can be in various forms such as text messages, pop-up windows, emails, and phone calls. For example, the second prompt message is an email, and the content of the email is "The preset duration is 100 hours, and 95 hours have been used so far, almost all used up. Please confirm whether to re-apply for the preset duration...".
[0150] Exemplarily, the preset duration is 150 hours, the cumulative duration is 147 hours, the time difference between the preset duration and the cumulative duration is 3 hours, and the preset difference threshold is 5 hours. When the time difference reaches the preset difference threshold, a second prompt message is fed back to the PC: an email, and the content of the email is "The preset duration is 150 hours, and 147 hours have been used so far, almost all used up. Please confirm whether to re-apply for the preset duration...".
[0151] When the time difference between the preset duration and the cumulative duration reaches the preset difference threshold, a second prompt message is fed back to the terminal, where the second prompt message is used to prompt the terminal that the preset duration is approaching complete consumption. When the time difference between the preset duration and the cumulative duration reaches the preset difference threshold, the terminal is reminded in the form of a prompt message, improving the user experience.
[0152] In an optional embodiment of this specification, before step 104, the following specific steps are further included:
[0153] Receive a resource application request sent by the terminal, where the resource application request carries the account information of the target account logging in to the terminal and the resource information of the target cloud computing resource;
[0154] Set the preset duration of the target account for the target cloud computing resource according to the account information and the resource information.
[0155] The preset duration of the target account for the target cloud computing resource is set in advance by means of resource application.
[0156] The resource application request is an instruction request for applying to set the preset duration of the target cloud computing resource. Through the resource application request, the setting of the resource usage duration of the target cloud computing resource on the cloud platform can be realized, which can be an initial setting or an adjustment setting, and is not limited here. In addition to carrying the account information of the target account logging in to the terminal, the resource application request can also carry information such as resource parameter specifications, resource parameter types, resource usage durations, and resource allocation priorities (for example, preferentially allocate high-performance resources). The resource application request is generated after the user selects to apply to set the preset duration of the target cloud computing resource on the terminal.
[0157] Set the preset duration of the target account for the target cloud computing resources according to the account information and resource information. The specific method is as follows: Set the preset duration of the target account for the target cloud computing resources recorded according to the account information and resource information. It can directly record the preset duration of the target account for the target cloud computing resources, or adjust the recorded preset duration of the target account for the target cloud computing resources, which is not limited here. Among them, the preset duration of the target cloud computing resources for the first parameter specification is recorded on the cloud platform and can be recorded in the database of the cloud platform.
[0158] Exemplarily, an enterprise user of a Web website application logs in to the PC client on the cloud platform on the PC side. The cloud platform is a cloud platform for elastic computing services. The enterprise user selects Plan 3 from the 8 sets of cloud computing resource plans provided by the cloud platform, generates and sends a resource application request to the cloud platform. The cloud platform receives the resource application request sent by the PC side, and sets the preset duration of the enterprise user for the target cloud computing resources to 150 hours according to the account number, password, and resource information "my-instance" of the enterprise account of the Web website application, and records it in the database of the cloud platform.
[0159] Receive the resource application request sent by the terminal. Among them, the resource application request carries the account information of the target account of the logged-in terminal and the resource information of the target cloud computing resources; set the preset duration of the target account for the target cloud computing resources according to the account information and resource information. By presetting the preset duration of the target account for the target cloud computing resources in advance, it lays a foundation for accurately determining the preset duration of the target account for the target cloud computing resources according to the account information in the future.
[0160] Figure 3 Shows the schematic architecture diagram of the cloud platform in a resource allocation method provided by an embodiment of this specification, as Figure 3 shown:
[0161] A data connection is established between the cloud platform and the terminal. The cloud platform includes a resource allocation end, multiple cloud computing nodes (Cloud Computing Node 1, Cloud Computing Node 2... Cloud Computing Node n), and a database. Among them, cloud computing resources are configured on each cloud computing node.
[0162] The terminal sends a resource application request, a resource allocation request, or a task suspension request to the cloud platform. On the cloud platform, the resource allocation end queries the preset duration and the cumulative duration from the database through the account information and resource information. When the cumulative duration has not reached the preset duration, allocate the target cloud computing resources to the target account, and send the processing task of the target account to the cloud computing node configured with the target cloud computing resources.
[0163] See Figure 4, Figure 4 The figure shows a flowchart of a resource application method provided by an embodiment of this specification. This method is applied to a cloud platform and includes the following specific steps:
[0164] Step 402: Receive a resource application request sent by a terminal. The resource application request carries the account information of the target account that logs in to the terminal and the resource information for requesting the allocation of target cloud computing resources.
[0165] The embodiments of this specification can be directly applied to a cloud platform or can be called through an application programming interface. For example, the cloud platform can be called through OpenAI. This is not limited herein.
[0166] A cloud platform is an online cloud computing resource service platform that provides computing, storage, and network resources. In the embodiments of this specification, the cloud platform is a cloud platform for elastic computing services. Cloud computing resources are delivered to end-users (users of the target account) through the Internet. Users generate and send various resource requests through the client of the cloud computing platform on the terminal, including but not limited to: resource application requests, resource allocation requests, and task suspension requests. The cloud platform allows users to expand or reduce cloud computing resources according to project requirements, realizing the elastic allocation of cloud computing resources. The cloud platform includes a resource allocation end, a platform database, and multiple distributed cloud computing nodes. Cloud computing resources with specific parameter specifications are configured on the cloud computing nodes. The resource allocation end executes processing tasks by allocating cloud computing resources on the cloud computing nodes to end-users.
[0167] Cloud computing resources are distributed computing resources deployed on a cloud platform. By allocating cloud computing resources to end users, remote cloud computing is achieved to execute cloud computing tasks. Resource instantiation processing of cloud computing resources is required to execute cloud computing tasks. Generally, cloud computing resources are configured on cloud computing nodes according to specific parameter specifications and have high computing performance. Among them, a cloud computing node is a distributed node on the cloud platform and is a basic component of the cloud platform, which constitutes a physical server or virtual server of the cloud platform. A cloud computing node usually has software and hardware resources. Cloud computing resources include various software and hardware resources. Specifically, hardware resources include but are not limited to: central processing unit, graphics processing unit (Graphic Processing Unit, abbreviated as GPU), integrated circuits (such as application-specific integrated circuits and field programmable gate arrays), memory, and hard disk. Among them, software resources include but are not limited to: operating system, virtualization technology, container management system, distributed computing framework, database management system, message queue system, file storage system, monitoring and logging management tools, security software, cluster management software, and configuration management tools. For example, there are cloud computing resources to be instantiated deployed on a cloud computing node: 32 central processing units, 128GB of memory, Linux operating system, container (Docker) virtualization technology, and Kubernetes container management system.
[0168] Target cloud computing resources are cloud computing resources allocated for user requests. Target cloud computing resources can be pre-applied by users. For example, a user has pre-applied for cloud computing resources on cloud computing node M: 4 central processing units and 32GB of memory as target cloud computing resources. Target cloud computing resources can also be automatically matched to users. For example, a user applies for cloud computing resources with 4 central processing units and 32GB of memory on the cloud platform, and the cloud computing resources on cloud computing node M are determined as target cloud computing resources. Target cloud computing resources can also be directly selected by users. For example, a user selects the cloud computing resources on cloud computing node M from idle cloud computing resources on the cloud platform: 4 central processing units and 32GB of memory as target cloud computing resources, which is not limited here.
[0169] The resource information of the target cloud computing resource is the parameter and / or attribute information of the target cloud computing resource, which is used to distinguish and manage different cloud computing resources on the cloud platform. The resource information includes but is not limited to: identification information, type information, specification parameters, performance index parameters, and configuration information. For the identification information, the format of the identification information usually follows a specific naming rule. For example, the resource information of the target cloud computing resource is: "projects / my-project-id / zones / cn / instances / my-instance". For the type information, for example, virtual machines (VMs), containers, database instances, storage spaces, network bandwidths, load balancers, etc. For the scale parameters, for example, the number of CPU cores, the memory size (GB), the disk capacity (GB / TB), etc. For the performance metrics, for example, I / O throughput, network latency requirements, specific geographical location requirements, etc. For the configuration information, for example, the operating system type, version, pre-installed software or middleware requirements, security settings (such as firewall rules), and other custom configuration options, etc.
[0170] The terminal is a hardware terminal device for resource allocation when the user logs in, including but not limited to: the PC side and the mobile side. The user realizes the use of the cloud computing resources on the cloud platform by logging in to the client of the cloud platform on the terminal and through the target account of the cloud platform. The target account is the account of the user on the cloud platform, which realizes identity authentication and cloud platform access. The account information of the target account is the authentication information used to verify the identity of the target account, including but not limited to: account identification, account number, account password, and terminal verification code. For example, an enterprise user logs in to the mobile client of the cloud platform on the mobile side, and verifies the identity information of the enterprise user through the account number of the enterprise user on the mobile client, so as to realize the use of the cloud computing resources on the cloud platform.
[0171] The resource application request is an instruction request used to apply for setting the preset duration of the target cloud computing resource. Through the resource application request, the setting of the resource usage duration of the target cloud computing resource on the cloud platform can be realized, which can be an initial setting or an adjustment setting, and is not limited here. In addition to carrying the account information of the target account of the logged-in terminal, the resource application request can also carry information such as resource parameter specifications, resource parameter types, resource usage duration, and resource allocation priorities (for example, preferentially allocate high-performance resources), etc. The resource application request is generated after the user selects to apply for setting the preset duration of the target cloud computing resource on the terminal.
[0172] Exemplarily, an enterprise user of a certain Web site application logs in to the PC client of the cloud platform on the PC side. The cloud platform is a cloud platform for elastic computing services. The enterprise user selects Solution 3 from the 8 sets of cloud computing resource solutions provided by the cloud platform, generates and sends a resource application request to the cloud platform, and the cloud platform receives the resource application request sent by the PC side. The cloud platform receives the resource application request, where the resource application request carries the account number, password, and resource information "my-instance" of the enterprise account of the Web site application.
[0173] Receive the resource application request sent by the receiving terminal, where the resource application request carries the account information of the target account of the login terminal and the resource information for requesting the allocation of the target cloud computing resources. By receiving the resource application request carrying the account information and the resource information, the resource application is triggered, and reference information is provided for setting the preset duration of the target account for the target cloud computing resources subsequently.
[0174] Step 404: Set the preset duration of the target account for the target cloud computing resources according to the account information and the resource information, where the preset duration is used to determine whether to allocate the target cloud computing resources to the target account.
[0175] The preset duration for the target cloud computing resources is the total usage duration preset for the target account for the target cloud computing resources. The preset duration is determined through prior resource application or resource allocation. The preset duration is bound to the target account and the target cloud computing resources and is recorded on the cloud platform. The preset duration is used to determine whether to allocate the target cloud computing resources to the target account.
[0176] Set the preset duration of the target account for the target cloud computing resources according to the account information and the resource information. The specific method is: Set the preset duration of the target account for the target cloud computing resources recorded according to the account information and the resource information. It can directly record the preset duration of the target account for the target cloud computing resources, or adjust the preset duration of the target account for the target cloud computing resources recorded. This is not limited here. Among them, the preset duration of the target cloud computing resources for the first parameter specification is recorded on the cloud platform and can be recorded in the database of the cloud platform.
[0177] Exemplarily, according to the account number, password, and resource information "my-instance" of the enterprise account of the Web site application, set the preset duration of the enterprise user for the target cloud computing resources to 150 hours and record it in the database of the cloud platform.
[0178] In the embodiments of this specification, a resource application request sent by a receiving terminal is received. The resource application request carries the account information of the target account of the logged-in terminal and the resource information of the target cloud computing resource. According to the account information and the resource information, a preset duration for the target account for the target cloud computing resource is set. The preset duration is used to determine whether to allocate the target cloud computing resource to the target account. By presetting the preset duration for the target account for the target cloud computing resource in advance, an accurate preset duration is provided in advance for determining whether to allocate the target cloud computing resource to the target account, laying a foundation.
[0179] The following combines the attached Figure 5 , taking the application of the resource allocation method provided in this specification in cloud server billing as an example, further illustrates the resource allocation method. Among them, Figure 5 shows a processing procedure flowchart of a resource allocation method applied to cloud server billing provided by an embodiment of this specification. This method is applied to an elastic computing service platform and includes the following specific steps:
[0180] Step 502: Receive a resource subscription request sent by the terminal of an enterprise user. The resource subscription request carries the account number of the enterprise account of the logged-in terminal, the resource subscription fee, and the resource information of the target cloud computing resource.
[0181] Step 504: According to the account number, the resource subscription fee, and the resource information, set the preset duration for the enterprise account for the target cloud computing resource and record it in the database of the elastic computing service platform.
[0182] Step 506: Receive a resource usage request sent by the terminal. The resource usage request carries the account number of the enterprise account of the logged-in terminal and the resource information for requesting the allocation of the target cloud computing resource.
[0183] Step 508: According to the account number and the resource information, query from the database of the elastic computing service platform the preset duration and the cumulative duration of the target cloud computing resource for the enterprise account pre-applied for the first parameter specification; based on the first parameter specification and the second parameter specification, determine the duration conversion rate; according to the duration conversion rate, perform duration conversion on the preset duration and the cumulative duration to obtain the preset duration and the cumulative duration of the target cloud computing resource for the enterprise account for the second parameter specification.
[0184] Step 510: If the cumulative duration has not reached the preset duration, execute step 512; if the cumulative duration has reached the preset duration, execute step 514.
[0185] Step 512: Allocate target cloud computing resources to the enterprise account; execute processing tasks based on the target cloud computing resources; start duration accumulation based on the accumulated duration; in response to a resource suspension request sent by the enterprise user's terminal, suspend the processing task and duration accumulation, release some of the target cloud computing resources, and obtain an updated accumulated duration based on the accumulated result; when the updated accumulated duration reaches the preset duration, feedback a first prompt message to the terminal, prompting the terminal that the preset duration has been completely consumed.
[0186] Step 514: Prohibit allocating target cloud computing resources to the enterprise account, and feedback a first prompt message to the terminal, prompting the terminal that the preset duration has been completely consumed.
[0187] Currently, the common payment methods on the cloud platform are annual / monthly package and pay-as-you-go. The annual / monthly package has a lower cost but poor flexibility (there are certain refund penalty measures for downgrading / canceling subscriptions, etc.). The annual / monthly package binds cloud computing resources and user accounts for a long time. During this period, even if cloud computing resources are not used for a certain period, it is impossible to temporarily release cloud computing resources, resulting in insufficient flexibility of cloud computing resources on the cloud platform. The pay-as-you-go method has high flexibility (it can be scaled up or down and released at any time) but a higher cost. On this basis, the cloud platform provider provides discount plans such as savings plans. By subscribing to a duration, while having a certain degree of flexibility, users can enjoy a certain discount to reduce costs. The logic of deduction by the savings plan is relatively complex. Customers need to pay attention to the matching degree between the savings plan and resources. Once the matching rate is low, it will cause waste and requires precise calculation. Moreover, in essence, whether it is the annual / monthly package or pay-as-you-go + savings plan, there is no way to achieve no charge when cloud computing resources are idle and charge when they are used. They are all mechanisms of continuous long-term payment. Although the above methods provide clear resource allocation criteria, they do not achieve reasonable cloud computing resource allocation.
[0188] Preferably, the embodiment of this specification adopts the pay-as-you-go + savings shutdown mode, which can not only reduce relevant costs but also reasonably allocate resources, effectively controlling the resource usage cost. Pay directly according to the duration, and customers only need to focus on how long they need to set the duration. Compared with pure pay-as-you-go, it will be cheaper. Since the duration is locked, a certain discount is obtained. It can not only enjoy the low cost of the annual / monthly package (the business logic is that by locking the duration, a low discount similar to the annual / monthly package can be achieved), but also enjoy some flexibility of pay-as-you-go (such as no limit on downgrading and no need for a refund, so there is no refund penalty measure). At the same time, during idle time, the savings shutdown mode can be used to release some target cloud computing resources without charge, and start some target cloud computing resources to continue charging when in use, realizing reasonable cloud computing resource allocation and reasonable billing.
[0189] Corresponding to the above method embodiment, this specification also provides a cloud platform embodiment. Figure 6The figure shows a schematic structural diagram of a cloud platform provided by an embodiment of this specification. As Figure 6 shown, it includes a resource allocation end 602 and a cloud computing node 604 that configures target cloud computing resources;
[0190] The resource allocation end 602 is used to receive a resource allocation request sent by a terminal. Among them, the resource allocation request carries the account information of the target account logged in to the terminal and the resource information for requesting the allocation of target cloud computing resources; according to the account information and the resource information, determine the preset duration and the cumulative duration of the target account for the target cloud computing resources, where the cumulative duration is obtained by cumulatively calculating the duration when the resource usage status of the target cloud computing resources is in the enabled state; when the cumulative duration does not reach the preset duration, allocate the target cloud computing resources to the target account, and send the processing task of the target account to the cloud computing node 604 that configures the target cloud computing resources;
[0191] The cloud computing node 604 is used to receive the processing task and execute the processing task.
[0192] Optionally, the resource allocation end 602 is further used to receive a task suspension request sent by the terminal, generate and send a resource release instruction to the cloud computing node 604;
[0193] The cloud computing node 604 is further used to receive the resource release instruction, and in response to the resource release instruction, suspend the execution of the processing task and release the target cloud computing resources.
[0194] The cloud platform provided by the embodiment of this specification includes a resource allocation end and a cloud computing node that configures target cloud computing resources; the resource allocation end is used to receive a resource allocation request sent by a terminal. Among them, the resource allocation request carries the account information of the target account logged in to the terminal and the resource information for requesting the allocation of target cloud computing resources; according to the account information and the resource information, determine the preset duration and the cumulative duration of the target account for the target cloud computing resources, where the cumulative duration is obtained by cumulatively calculating the duration when the resource usage status of the target cloud computing resources is in the enabled state; when the cumulative duration does not reach the preset duration, allocate the target cloud computing resources to the target account, and send the processing task of the target account to the cloud computing node that configures the target cloud computing resources; the cloud computing node is used to receive the processing task and execute the processing task. According to the account information, determine the preset duration and the cumulative duration of the target account for the target cloud computing resources, and the cumulative duration is obtained by cumulatively calculating the duration when the resource usage status of the target cloud computing resources is in the enabled state. Whether to allocate the target cloud computing resources to the target account can be directly determined based on the cumulative duration and the preset duration, and then the processing task is executed on the cloud computing node that configures the target cloud computing resources, establishing a clear resource allocation standard and realizing reasonable cloud computing resource allocation.
[0195] The above is a schematic solution of a cloud platform according to this embodiment. It should be noted that the technical solution of this cloud platform and the technical solution of the above resource allocation method belong to the same concept. For the details not described in detail in the technical solution of the cloud platform, reference can be made to the description of the technical solution of the above resource allocation method.
[0196] Corresponding to the above method embodiment, this specification also provides an embodiment of a resource allocation device. Figure 7 The following shows a schematic structural diagram of a resource allocation device provided by an embodiment of this specification. As Figure 7 shown, this device is applied to a cloud platform and includes:
[0197] A first receiving module 702, configured to receive a resource allocation request sent by a terminal, where the resource allocation request carries account information of a target account for logging in to the terminal and resource information for requesting to allocate target cloud computing resources;
[0198] A determination module 704, configured to determine a preset duration and an accumulated duration of the target account for the target cloud computing resources according to the account information and the resource information, where the accumulated duration is obtained by accumulating the duration when the resource usage status of the target cloud computing resources is in an enabled state;
[0199] An allocation module 706, configured to allocate the target cloud computing resources to the target account when the accumulated duration does not reach the preset duration.
[0200] Optionally, the resource allocation request further carries a second parameter specification for requesting to allocate the target cloud computing resources;
[0201] Correspondingly, the allocation module 706 is further configured to:
[0202] Query the preset duration and the accumulated duration of the target cloud computing resources for the first parameter specification pre-applied by the target account according to the account information and the resource information; determine a duration conversion rate based on the first parameter specification and the second parameter specification; perform duration conversion on the preset duration and the accumulated duration according to the duration conversion rate to obtain the preset duration and the accumulated duration of the target cloud computing resources for the second parameter specification of the target account.
[0203] This device further includes:
[0204] An execution module, configured to execute a processing task of the target account based on the target cloud computing resources.
[0205] Optionally, this device further includes:
[0206] A pause module, configured to pause the processing task and release the target cloud computing resources in response to a task pause request sent by the terminal.
[0207] Optionally, the device further includes:
[0208] An accumulation module, configured to accumulate the duration during which the resource usage status of the target cloud computing resource is enabled based on the accumulated duration, to obtain an accumulation result; and obtain an updated accumulated duration based on the accumulation result.
[0209] Optionally, the device further includes:
[0210] A pause accumulation module, configured to pause the duration accumulation when the resource usage status of the target cloud computing resource changes to the pause state.
[0211] Optionally, the device further includes:
[0212] A prohibition allocation module, configured to prohibit allocating the target cloud computing resource to the target account when the accumulated duration reaches a preset duration.
[0213] Optionally, the device further includes:
[0214] A first feedback module, configured to feedback a first prompt message to the terminal, where the first prompt message is used to prompt the terminal that the preset duration has been completely consumed.
[0215] Optionally, the device further includes:
[0216] A second feedback module, configured to feedback a second prompt message to the terminal when the duration difference between the preset duration and the accumulated duration reaches a preset difference threshold, where the second prompt message is used to prompt the terminal to reset the preset duration.
[0217] Optionally, the device further includes:
[0218] An application module, configured to receive a resource application request sent by the terminal, where the resource application request carries account information and resource information; and set a preset duration for the target account for the target cloud computing resource according to the account information and the resource information.
[0219] In an embodiment of this specification, a resource allocation request sent by a receiving terminal is received. The resource allocation request carries account information of a target account of the logged-in terminal and resource information for requesting allocation of target cloud computing resources. According to the account information and the resource information, a preset duration and an accumulated duration of the target account for the target cloud computing resources are determined. The accumulated duration is obtained by accumulating the durations during which the resource usage status of the target cloud computing resources is in an enabled state. When the accumulated duration does not reach the preset duration, the target cloud computing resources are allocated to the target account. By determining the preset duration and the accumulated duration of the target account for the target cloud computing resources according to the account information and the resource information, and the accumulated duration is obtained by accumulating the durations during which the resource usage status of the target cloud computing resources is in an enabled state, it is possible to directly determine whether to allocate the target cloud computing resources to the target account based on the accumulated duration and the preset duration, establishing a clear set of resource allocation criteria and achieving reasonable allocation of cloud computing resources.
[0220] The above is a schematic solution of a resource allocation device in this embodiment. It should be noted that the technical solution of this resource allocation device and the technical solution of the above resource allocation method belong to the same concept. For the details not described in the technical solution of the resource allocation device, reference can be made to the description of the technical solution of the above resource allocation method.
[0221] Corresponding to the above method embodiment, this specification also provides an embodiment of a resource application device. Figure 8 The structure diagram of a resource application device provided by an embodiment of this specification is shown. As Figure 8 shown, this device is applied to a cloud platform and includes:
[0222] A second receiving module 802, configured to receive a resource application request sent by a terminal. The resource application request carries account information of a target account of the logged-in terminal and resource information for requesting allocation of target cloud computing resources.
[0223] A setting module 804, configured to set a preset duration of the target account for the target cloud computing resources according to the account information and the resource information. The preset duration is used to determine whether to allocate the target cloud computing resources to the target account.
[0224] In an embodiment of this specification, a resource application request sent by a receiving terminal is received. The resource application request carries account information of a target account of the logged-in terminal and resource information of the target cloud computing resources. According to the account information and the resource information, a preset duration of the target account for the target cloud computing resources is set. The preset duration is used to determine whether to allocate the target cloud computing resources to the target account. By presetting the preset duration of the target account for the target cloud computing resources in advance, an accurate preset duration is provided in advance for subsequent determination of whether to allocate the target cloud computing resources to the target account, laying a foundation.
[0225] The above is a schematic solution of a resource application device according to this embodiment. It should be noted that the technical solution of this resource application device and the technical solution of the above resource application method belong to the same concept. For the details not described in the technical solution of the resource application device, reference can be made to the description of the technical solution of the above resource application method.
[0226] Figure 9 The block diagram of a computing device provided by an embodiment of this specification is shown. The components of the computing device 900 include, but are not limited to, a memory 910 and a processor 920. The processor 920 is connected to the memory 910 through a bus 930, and a database 950 is used to store data.
[0227] The computing device 900 further includes an access device 940, which enables the computing device 900 to communicate via one or more networks 960. Examples of these networks include the Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 940 may include one or more of any type of wired or wireless network interface (e.g., a Network Interface Controller (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC).
[0228] In an embodiment of this specification, the above components of the computing device 900 and Figure 9 other components not shown in the figure may also be connected to each other, for example, through a bus. It should be understood that Figure 9 the block diagram of the computing device shown is only for illustrative purposes and is not a limitation on the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0229] The computing device 900 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 900 can also be a mobile or stationary server.
[0230] Wherein, the processor 920 is configured to execute the following computer-executable instructions, and when the computer-executable instructions are executed by the processor, the steps of the above resource allocation method or resource application method are implemented.
[0231] The above is a schematic solution of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solutions of the above resource allocation method and resource application method belong to the same concept. For the details not described in detail in the technical solution of the computing device, reference can be made to the descriptions of the technical solutions of the above resource allocation method or resource application method.
[0232] An embodiment of this specification also provides a computer-readable storage medium, which stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the above resource allocation method or resource application method are implemented.
[0233] The above is a schematic solution of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solutions of the above resource allocation method and resource application method belong to the same concept. For the details not described in detail in the technical solution of the storage medium, reference can be made to the descriptions of the technical solutions of the above resource allocation method or resource application method.
[0234] An embodiment of this specification also provides a computer program, wherein when the computer program is executed on a computer, the computer is made to execute the steps of the above resource allocation method or resource application method.
[0235] The above is a schematic solution of a computer program according to this embodiment. It should be noted that the technical solution of this computer program and the technical solutions of the above resource allocation method and resource application method belong to the same concept. For the details not described in detail in the technical solution of the computer program, reference can be made to the descriptions of the technical solutions of the above resource allocation method or resource application method.
[0236] The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0237] The computer instructions include computer program code, which may be in source code form, object code form, executable file, or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, removable hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0238] It should be noted that for the foregoing method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the embodiments of this specification are not limited by the described order of actions, because according to the embodiments of this specification, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments of this specification.
[0239] In the above embodiments, the descriptions of the various embodiments have their own focuses. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0240] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The alternative embodiments do not describe all the details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the embodiments of this specification, so that those skilled in the art can well understand and utilize this specification. This specification is only limited by the claims and their full scope and equivalents.
Claims
1. A resource allocation method, applied to a cloud platform, includes: Receiving a resource allocation request sent by a terminal, where the resource allocation request carries account information of a target account logging in to the terminal and resource information for requesting allocation of target cloud computing resources; Determining a preset duration and an accumulated duration of the target account for the target cloud computing resources according to the account information and the resource information, where the accumulated duration is obtained by accumulating the duration when the resource usage status of the target cloud computing resources is in an enabled state; Allocating the target cloud computing resources to the target account when the accumulated duration does not reach the preset duration.
2. The method according to claim 1, wherein the resource allocation request further carries a second parameter specification for requesting allocation of the target cloud computing resources; The determining the preset duration and the accumulated duration of the target account for the target cloud computing resources according to the account information and the resource information includes: Querying the preset duration and the accumulated duration of the target cloud computing resources for a first parameter specification pre-applied by the target account according to the account information and the resource information; Determining a duration conversion rate based on the first parameter specification and the second parameter specification; Performing duration conversion on the preset duration and the accumulated duration according to the duration conversion rate to obtain the preset duration and the accumulated duration of the target account for the target cloud computing resources with the second parameter specification.
3. The method according to claim 1, after allocating the target cloud computing resources to the target account, further includes: Executing a processing task of the target account based on the target cloud computing resources.
4. The method according to claim 3, after executing the processing task based on the target cloud computing resources, further includes: Responding to a task suspension request sent by the terminal, suspending the execution of the processing task, and releasing the target cloud computing resources.
5. The method according to claim 1, after allocating the target cloud computing resources to the target account, further includes: Accumulating the duration when the resource usage status of the target cloud computing resources is in an enabled state based on the accumulated duration to obtain an accumulated result; Obtaining an updated accumulated duration based on the accumulated result.
6. The method according to claim 5, after starting to accumulate the duration based on the accumulated duration, further includes: Suspending the duration accumulation when the resource usage status of the target cloud computing resources changes to a suspended state.
7. The method according to any one of claims 1-6, further includes: Prohibiting allocation of the target cloud computing resources to the target account when the accumulated duration reaches the preset duration.
8. The method according to claim 7, after prohibiting allocation of the target cloud computing resources to the target account, further includes: Feeding back a first prompt message to the terminal, where the first prompt message is used to prompt the terminal that the preset duration has been completely consumed.
9. The method according to any one of claims 1-6, after determining the preset duration and the cumulative duration of the target account for the target cloud computing resource, further includes: When the duration difference between the preset duration and the cumulative duration reaches a preset difference threshold, feedback a second prompt message to the terminal, where the second prompt message is used to prompt the terminal to reset the preset duration.
10. The method according to claim 1, before determining the preset duration and the cumulative duration of the target account for the cloud computing resource according to the account information and the resource information, further includes: Receiving a resource application request sent by the terminal, where the resource application request carries the account information and the resource information; Setting the preset duration of the target account for the target cloud computing resource according to the account information and the resource information.
11. A resource application method applied to a cloud platform, including: Receiving a resource application request sent by the terminal, where the resource application request carries the account information of the target account logged in to the terminal and the resource information for requesting allocation of the target cloud computing resource; Setting the preset duration of the target account for the target cloud computing resource according to the account information and the resource information, where the preset duration is used to determine whether to allocate the target cloud computing resource to the target account.
12. A cloud platform includes a resource allocation end and a cloud computing node for configuring the target cloud computing resource; The resource allocation end is used to receive a resource allocation request sent by a terminal, where The resource allocation request carries the account information of the target account logged in to the terminal and the resource information for requesting allocation of the target cloud computing resource; determining the preset duration and the cumulative duration of the target account for the target cloud computing resource according to the account information and the resource information, where the cumulative duration is obtained by cumulatively calculating the duration when the resource usage status of the target cloud computing resource is in an enabled state; when the cumulative duration does not reach the preset duration, allocating the target cloud computing resource to the target account, and sending the processing task of the target account to the cloud computing node for configuring the target cloud computing resource; The cloud computing node is used to receive the processing task and execute the processing task.
13. The cloud platform according to claim 12, the resource allocation end is further used to receive a task suspension request sent by the terminal, generate and send a resource release instruction to the cloud computing node; The cloud computing node is further used to receive the resource release instruction, and in response to the resource release instruction, suspend executing the processing task and release the target cloud computing resource.
14. A computing device includes: A memory and a processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, and when the computer-executable instructions are executed by the processor, the steps of the method according to any one of claims 1 to 11 are implemented.
15. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 11.