Resource recovery method and computer equipment
Through the resource management module of the cloud management platform, resource recovery templates are used to monitor and recover cloud products in heterogeneous cloud platforms, solving the problems of idle resources and management difficulties, and achieving efficient utilization and unified management of resources.
Patent Information
- Application Number
- CN202510826382.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2025-10-10
AI Technical Summary
In cloud computing, idle resources on heterogeneous cloud platforms lead to low resource utilization, and the inconsistent resource recovery logic of different cloud platforms leads to management difficulties and resource waste.
Through the resource management module of the cloud management platform, use the resource recovery template to determine the resource recovery conditions of the target cloud product, monitor the status and usage of the cloud product, and recover resources when the conditions are met, including retaining, destroying or transferring the cloud product.
It improves resource utilization, reduces power consumption of cloud products, and realizes unified management of heterogeneous cloud platforms and efficient resource recovery.
Smart Images

Figure CN120762886A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a resource recovery method and computer equipment. Background Art
[0002] With the continuous development of cloud computing technology, more and more enterprises are migrating their businesses to the cloud, using cloud products such as cloud hosts and cloud hard drives to improve business efficiency and reduce costs. However, when using cloud resources, they may become idle, reducing resource utilization. Summary of the Invention
[0003] Based on this, it is necessary to provide a resource recovery method and computer equipment that can improve resource utilization in response to the above technical problems.
[0004] In a first aspect, the present application provides a resource recovery method, which is applied to a resource management module in a cloud management platform, wherein the cloud management platform is used to manage a heterogeneous cloud platform including multiple cloud platforms, and the method includes:
[0005] Determining resource recycling conditions for the target cloud product based on the resource recycling template of the cloud management platform and information about the target cloud product, where the target cloud product is any cloud product on the multiple cloud platforms;
[0006] Monitoring the target cloud product;
[0007] When the conditions of the target cloud product meet the resource recycling conditions, resources are recycled for the target cloud product.
[0008] In one embodiment, determining the resource recycling conditions of the target cloud product based on the resource recycling template of the cloud management platform and information of the target cloud product includes:
[0009] Sending information about the resource recycling template and resource recycling settings page of the cloud management platform, information about the multiple cloud platforms, and information about cloud products in the multiple cloud platforms to a target client, where the target client is any client corresponding to the resource management module;
[0010] receiving setting information from the target client, the setting information including information of a target cloud platform, information of a target cloud product, and information of a target resource recovery template, the target cloud platform being a cloud platform corresponding to the target cloud product among the multiple cloud platforms, the target cloud platform, the target cloud product, and the target resource recovery template being determined based on a user selection;
[0011] Determine resource recycling conditions for the target cloud product based on the target resource recycling template information.
[0012] In one embodiment, when the target resource recycling template includes setting parameters, the setting information also includes parameter setting values corresponding to the setting parameters, and determining the resource recycling conditions of the target cloud product based on the information of the target resource recycling template includes:
[0013] Determine resource recycling conditions for the target cloud product based on the target resource recycling template information and the parameter setting values.
[0014] In one embodiment, when the target resource recycling template is a resource recycling template corresponding to a monitoring indicator of a cloud product, the resource recycling condition of the target cloud product includes a resource recycling threshold of the target cloud product;
[0015] The monitoring of the target cloud product includes:
[0016] Monitoring a value of a target indicator of the target cloud product, where the target indicator is an indicator selected by a user from monitoring indicators of the target cloud product;
[0017] When the condition of the target cloud product meets the resource recycling condition, recycling the resources of the target cloud product includes:
[0018] When the value of the target indicator meets the resource recycling threshold, or the target value is greater than or equal to the resource recycling threshold, resources are recycled for the target cloud product, and the target value is determined according to the value of the target indicator.
[0019] In one embodiment, when the target resource recycling template is a resource recycling template corresponding to the status of a cloud product, the resource recycling conditions of the target cloud product include a preset status and a preset duration;
[0020] The monitoring of the target cloud product includes:
[0021] Monitoring the status of the target cloud product;
[0022] When the condition of the target cloud product meets the resource recycling condition, recycling the resources of the target cloud product includes:
[0023] When the duration of the target cloud product being in the preset state is greater than or equal to the preset duration, resources of the target cloud product are recycled.
[0024] In one embodiment, when the target resource recovery template is a resource recovery template corresponding to billing information of a cloud product, the resource recovery condition of the target cloud product is the resource recovery time of the target cloud product;
[0025] The monitoring of the target cloud product includes:
[0026] Monitoring time of the target cloud product;
[0027] When the condition of the target cloud product meets the resource recycling condition, recycling the resources of the target cloud product includes:
[0028] When the time of the target cloud product is the resource recycling time, resources are recycled for the target cloud product.
[0029] In one embodiment, the method further comprises:
[0030] Determining a resource recovery strategy for the target cloud product based on the information of the target cloud product;
[0031] The resource recovery of the target cloud product includes:
[0032] Reclaim resources of the target cloud product according to the resource recycling strategy.
[0033] In one embodiment, the resource recovery of the target cloud product according to the resource recovery policy includes:
[0034] If the resource recycling policy is to retain in the recycle bin, retain the target cloud product in the recycle bin;
[0035] When the resource recovery policy is destruction, the target cloud product is destroyed.
[0036] In one embodiment, the resource recovery of the target cloud product includes:
[0037] When the target cloud product is in a stable state, resources of the target cloud product are recycled.
[0038] In a second aspect, the present application further provides a resource recovery device, which is applied to a resource management module in a cloud management platform, wherein the cloud management platform is used to manage a heterogeneous cloud platform including multiple cloud platforms, and the device includes:
[0039] a determining unit, configured to determine resource recycling conditions for a target cloud product based on a resource recycling template of the cloud management platform and information about the target cloud product, wherein the target cloud product is any cloud product on the multiple cloud platforms;
[0040] A monitoring unit, configured to monitor the target cloud product;
[0041] The recycling unit is configured to recycle resources of the target cloud product if the conditions of the target cloud product meet the resource recycling conditions.
[0042] In a third aspect, the present application further provides a computer device, including a memory and a processor:
[0043] The memory is used to store a computer program, and the processor is used to read the computer program in the memory and perform the following operations:
[0044] determining resource recycling conditions for the target cloud product based on a resource recycling template of the cloud management platform and information about the target cloud product, wherein the target cloud product is any cloud product of a plurality of cloud platforms included in the heterogeneous cloud platform, and the cloud management platform includes the computer device;
[0045] Monitoring the target cloud product;
[0046] When the conditions of the target cloud product meet the resource recycling conditions, resources are recycled for the target cloud product.
[0047] In a fourth aspect, the present application also provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above method when executed by a processor.
[0048] In a fifth aspect, the present application also provides a computer program product, comprising a computer program, which implements the steps of the above method when executed by a processor.
[0049] In an embodiment of the present application, the resource management module in the cloud management platform determines the resource recovery conditions of the target cloud product based on the resource recovery template of the cloud management platform and the information of the target cloud product, monitors the target cloud product, and performs resource recovery on the target cloud product when the conditions of the target cloud product meet the resource recovery conditions of the target cloud product. It can be seen that when the conditions of the cloud product meet the resource recovery conditions of the cloud product, it indicates that the cloud product is in an idle state, and the cloud product can be resource recovered so that the recovered resources can be reused, thereby improving resource utilization. In addition, when the conditions of the cloud product meet the resource recovery conditions of the cloud product, resource recovery of the cloud product can avoid the continued operation of idle resources, thereby reducing the power consumption of the cloud product. Furthermore, since the resource recovery conditions of the cloud product are determined according to the resource recovery template of the cloud management platform, the resource recovery conditions of different cloud platforms can be uniformly managed, so that the resources of different cloud platforms in a heterogeneous cloud platform can be uniformly managed and recovered, which can improve the management capabilities of the cloud management platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.
[0051] Figure 1 This is a schematic diagram of a network architecture provided by an embodiment of the present application;
[0052] Figure 2 This is a flow chart of a resource recovery method provided in an embodiment of the present application;
[0053] Figure 3 This is a flow chart of another resource recovery method provided in an embodiment of the present application;
[0054] Figure 4 This is a schematic diagram of a resource recycling method provided in an embodiment of the present application;
[0055] Figure 5 This is a schematic structural diagram of a resource recovery device provided in an embodiment of the present application;
[0056] Figure 6 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0058] In order to better understand the embodiments of the present application, the relevant technologies of the present application are first introduced below.
[0059] With the development of cloud computing, more and more companies are choosing to deploy their services in the cloud rather than using traditional servers. They are using cloud products such as cloud hosts and cloud hard drives to improve business efficiency and reduce costs. After migrating services to the cloud, to avoid wasting resources, it is necessary to recycle idle resources.
[0060] Considering the advantages and functional features of different cloud vendors' products and to meet diverse business scenarios, many enterprises are integrating public and private cloud resources, breaking down the barriers between cloud vendors and forming heterogeneous cloud platforms. When recycling resources on heterogeneous cloud platforms, the architectures of different cloud platforms may differ, making it impossible to set unified automatic resource recycling rules, resulting in a lack of unified resource management and recycling.
[0061] Furthermore, heterogeneous cloud platforms may experience inconsistent processing logic after resource recycling. For example, public cloud resources are often frozen after recycling, while private cloud resources are only subject to disk read / write speed limits and network card speed limits. Some resources are even destroyed directly after recycling.
[0062] Furthermore, since cloud resources may be bound to other network resources, the cloud resource recovery process may trigger snapshot / backup tasks, cloud host migration triggered by host high availability (HA), etc., causing cloud resource recovery to fail or enter an abnormal state.
[0063] In order to better understand the embodiments of the present application, the network architecture of the present application is first introduced below.
[0064] Figure 1 This is a network architecture diagram provided by an embodiment of the present application. Figure 1 As shown, the network architecture may include a cloud management platform 1 and a heterogeneous cloud platform. The heterogeneous cloud platform may include multiple cloud platforms 2. The cloud management platform 1 and the cloud platforms 2 may be connected via a network. The network may be a wide area network, a local area network, or a combination of the two.
[0065] The cloud management platform 1 may include a resource management module 11 and multiple clients 12. The resource management module 11 and the clients 12 are connected via a network. The clients 12 may be applications (APPs) or web pages. The resource management module 11 interacts with users through the clients 12.
[0066] Multiple cloud platforms 2 may include one or more public cloud platforms and one or more private cloud platforms. Multiple cloud platforms 2 may include cloud platforms from different manufacturers. For example, some core, security-critical resources are deployed in a user's computer room, which utilizes a private cloud platform, while some cached data and archived resources are deployed and stored in a public cloud platform. Using a nearby resource pool allows services to quickly access cached data, thereby reducing latency.
[0067] The cloud platform 2 may include a variety of cloud products, including some or all of cloud hard drives, bare metal servers, elastic network protocols (Internet Protocol, IP), file storage, and the like.
[0068] The cloud products included in different cloud platforms 2 may be the same or different.
[0069] Users can set resource recycling conditions for cloud products through the client 12. The resource management module 11 can determine the resource recycling conditions for cloud products based on the user's settings. The resource management module 11 can then monitor the cloud products based on the resource recycling conditions. If the conditions of the cloud products meet the resource recycling conditions, the cloud products can be recycled to save resources and improve resource utilization.
[0070] Heterogeneous cloud platforms can include X86 and advanced reduced instruction set computing (RISC) machine (ARM) heterogeneous computing resources.
[0071] The resource management module can be deployed on an independent physical server, or on a server cluster or distributed system consisting of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, resource recycling management, security services, and big data and artificial intelligence platforms.
[0072] Cloud host, also known as elastic cloud host, is the general name for virtual machine products in cloud computing.
[0073] A bare metal server is a hardware device that combines the characteristics of a traditional physical server with the virtualized service capabilities of cloud computing technology. It is a product that combines the advantages of hardware and software.
[0074] Cloud disk is a virtual block storage service that mainly provides block storage space for cloud hosts and bare metal servers.
[0075] Elastic IP is a static public IP address provided for cloud computing services, with the characteristics of flexible binding, unbinding and dynamic allocation.
[0076] File storage is a hosted shared file system service provided by cloud platforms. It provides high-performance, elastically scalable file-level storage for cloud hosts, bare metal servers, etc. through standard protocols.
[0077] It should be understood that Figure 1 This is an exemplary description of the network architecture of the present application and does not limit the network architecture of the present application.
[0078] Based on the above network architecture, Figure 2This is a flow chart of a resource recovery method provided by an embodiment of the present application. The resource recovery method can be applied to a resource management module in a cloud management platform, and the cloud management platform is used to manage heterogeneous cloud platforms. The heterogeneous cloud platform includes multiple cloud platforms, each of which includes multiple cloud products, and the multiple cloud platforms include cloud platforms from different manufacturers. Figure 2 As shown, the resource recovery method may include the following steps.
[0079] 201. Determine the resource recycling conditions for the target cloud product based on the resource recycling template of the cloud management platform and the information of the target cloud product.
[0080] The resource recycling template of the cloud management platform can be understood as the resource recycling template stored in the resource management module. The resource management module can store multiple resource recycling templates.
[0081] The resource recycling templates available for different cloud platforms can be the same, different, or partially the same and partially different. Different cloud products within the same cloud platform can use different resource recycling templates. Therefore, the multiple resource recycling templates stored by the resource management module include all resource recycling templates available for the multiple cloud platforms managed by the resource management module.
[0082] The resource recycling template may include a template for generating resource recycling conditions. The resource recycling conditions are conditions for triggering resource recycling, that is, triggering conditions for resource recycling.
[0083] The resource management module can determine the resource reclaim conditions for the target cloud product based on the cloud management platform's resource reclaim template and the target cloud product's information. The resource management module can determine the resource reclaim conditions for the target cloud product based on the cloud management platform's resource reclaim template, the target cloud platform's information, and the target cloud product's information. The target cloud product is any cloud product from multiple cloud platforms. The target cloud platform is the cloud platform corresponding to the target cloud product from multiple cloud platforms. Cloud products can include cloud hosts, cloud hard drives, bare metal servers, elastic IP addresses, file storage, and more. The target cloud product is any cloud product from the target cloud platform.
[0084] The target cloud product information may include the target cloud product's identifier, monitoring indicator information, and status information. The target cloud product information may also include the target cloud product's billing information.
[0085] The monitoring indicator information of the cloud product is information of a monitoring indicator of the cloud product. The monitoring indicator of the cloud product can include one or more of a central processing unit (CPU) usage rate, a memory usage rate, a disk usage rate, a process running number, a CPU idle time proportion, a disk write input output (IO), a disk read IO, a storage usage rate, a bandwidth inflow amount, and a bandwidth outflow amount. For example, when the cloud product is a cloud host, the monitoring indicator of the cloud host can include one or more of a CPU usage rate, a memory usage rate, a process running number, and a CPU idle time proportion of the cloud host. For example, when the cloud product is a bare metal server, the monitoring indicator of the bare metal server can include one or more of a CPU usage rate, a memory usage rate, and a disk usage rate. For example, when the cloud product is a cloud disk, the monitoring indicator of the cloud disk can include one or more of a disk usage rate, a disk write IO, and a disk read IO. For example, when the cloud product is a file storage, the monitoring indicator of the file storage can include a storage usage rate. For example, when the cloud product is an elastic IP, the monitoring indicator of the elastic IP can include a bandwidth inflow amount and a bandwidth outflow amount. The CPU usage rate is a ratio between a used CPU resource and a total CPU resource. The memory usage rate is a ratio between a used memory resource and a total memory resource. The process running number is a number of running processes. The CPU idle time proportion is a duty cycle of an idle time of the CPU. The disk usage rate is a ratio between a used disk resource and a total disk resource. The disk write IO is a data amount of all IO requests of disk writing. The disk read IO is a data amount of all IO requests of disk reading. The bandwidth inflow amount is a bandwidth amount of an external network flowing into an elastic IP instance. The bandwidth outflow amount is a bandwidth amount of an elastic IP instance flowing out to an external network.
[0086] Cloud product status information is information about the status of a cloud product. A cloud product can be in a stable or intermediate state. Stable states can include one or more of: powered off, suspended, mounted, running, bound, abnormal, unmounted, and unbound. Intermediate states can include one or more of: creating an image, backing up, creating a snapshot, shutting down, restarting, suspended, mounting, binding, starting up, changing configurations, expanding capacity, and migrating. If the cloud product status is powered off, it indicates that the cloud product is in a shutdown state, meaning it is completely shut down. If the cloud product status is suspended, it indicates that the cloud product is in a low-power state and is saving its current state to memory or disk. If the cloud product status is running, it indicates that the cloud product is operating normally. If the cloud product status is bound, it indicates that the cloud product is associated with other components. If the cloud product status is abnormal, it indicates that a fault has occurred in the cloud product, which can be a software fault, a hardware fault, or both. If a cloud product's status is "Not Mounted," it indicates that the cloud product is connected to the system but not mounted to a file system target. If a cloud product's status is "Unbound," it indicates that the cloud product is not associated with any instance and is in a standalone state. If a cloud product's status is "Creating Image," it indicates that the cloud product is creating an image file from the current instance's system disk or data disk. If a cloud product's status is "Backing Up," it indicates that the cloud product is backing up the system or data. If a cloud product's status is "Creating Snapshot," it indicates that the cloud product is generating a point-in-time copy of the data on the disk or storage volume. If a cloud product's status is "Shutting Down," it indicates that the cloud product's system is shutting down. If a cloud product's status is "Restarting," it indicates that the cloud product's system is restarting. If a cloud product's status is "Binding," it indicates that the cloud product is associating resources with another resource. If a cloud product's status is "Starting Up," it indicates that the cloud product's system is starting up. If a cloud product's status is "Varying Configuration," it indicates that the cloud product is adjusting resource specifications. If a cloud product's status is "Expanding Capacity," it indicates that the cloud product is increasing resource capacity. When the cloud product status is Migrating, it indicates that the cloud product is migrating resources from one physical host / storage to another.
[0087] Exemplarily, when the cloud product is a cloud host or bare metal server, the stable state of the cloud product may include one or more of: powered off, running, suspended, abnormal, etc., and the intermediate state of the cloud product may include one or more of: creating an image, backing up, suspended, creating a snapshot, shutting down, restarting, starting up, changing configuration, expanding capacity, migrating, etc. Exemplarily, when the cloud product is a cloud hard drive, the stable state of the cloud hard drive may include one or more of: mounted, unmounted, abnormal, etc., and the intermediate state of the cloud hard drive may include one or more of: mounting, expanding capacity, etc. Exemplarily, when the cloud product is an elastic IP, the stable state of the elastic IP may include one or more of: bound, unbound, etc., and the intermediate state of the elastic IP may be: bound, etc.
[0088] Cloud product billing information refers to information related to cloud product billing, and may include information about the cloud product's billing method. Cloud product billing can be on-demand or on a per-month basis. If the per-month billing method is a per-year or per-month basis, the billing information may also include information about the per-month expiration date.
[0089] The Open Application Programming Interface (OpenAPI) interface file of the target cloud platform can be obtained, and the information of the target cloud product can be determined based on the OpenAPI interface file of the target cloud platform.
[0090] 202. Monitor target cloud products.
[0091] After determining the resource recycling conditions of the target cloud product, the resource recycling conditions of the target cloud product can be started, that is, the resource recycling conditions of the target cloud product can be set to an enabled state, and then the target cloud product can be monitored in real time, periodically or at a scheduled time.
[0092] The Application Programming Interface (API) can be called to monitor the target cloud product.
[0093] 203. When the conditions of the target cloud product meet the resource recycling conditions of the target cloud product, the resources of the target cloud product are recycled.
[0094] The target cloud product's conditions can be compared or matched with the target cloud product's resource recycling conditions. If the target cloud product's conditions are identical or match the target cloud product's resource recycling conditions, it can be determined that the target cloud product's conditions meet the target cloud product's resource recycling conditions, and resources can then be recycled for the target cloud product. If the target cloud product's conditions are different or do not match the target cloud product's resource recycling conditions, the target cloud product can continue to be monitored.
[0095] The target cloud product's conditions can be determined based on the target cloud product's monitoring information. In one case, the target cloud product's conditions can be directly determined based on the target cloud product's monitoring information. In another case, after the target cloud product's monitoring information is obtained, the target cloud product's conditions can be determined by processing the monitoring information.
[0096] exist Figure 2 In the resource recovery method shown, the resource recovery conditions for the target cloud product are determined based on the resource recovery template of the cloud management platform and information about the target cloud product. The target cloud product is then monitored and, if the conditions of the target cloud product meet the resource recovery conditions, resources are recovered for the target cloud product. As can be seen, if the conditions of a cloud product meet the resource recovery conditions, it indicates that the cloud product is idle and resources can be recovered for the cloud product so that the recovered resources can be reused, thereby improving resource utilization. Furthermore, if the conditions of a cloud product meet the resource recovery conditions, resource recovery for the cloud product can prevent the continued operation of idle resources, thereby reducing the power consumption of the cloud product. Furthermore, because the resource recovery conditions of a cloud product are determined based on the resource recovery template of the cloud management platform, the resource recovery conditions of different cloud platforms can be uniformly managed, allowing for unified management and recovery of resources across heterogeneous cloud platforms, thereby improving the management capabilities of the cloud management platform.
[0097] Based on the above network architecture, Figure 3 This is a flow chart of another resource recovery method provided by an embodiment of the present application. The resource recovery method can be applied to a resource management module in a cloud management platform, and the cloud management platform is used to manage heterogeneous cloud platforms. The heterogeneous cloud platform includes multiple cloud platforms, each of which includes multiple cloud products, and the multiple cloud platforms include cloud platforms from different manufacturers. Figure 3 As shown, the resource recovery method may include the following steps.
[0098] 301. Send information about a resource recycling template and a resource recycling setting page of a cloud management platform, information about multiple cloud platforms, and information about cloud products in the multiple cloud platforms to a target client.
[0099] The target client is any client among the multiple clients corresponding to the resource management module in the cloud management platform.
[0100] The resource management module can proactively send information about the cloud management platform's resource recycling template and resource recycling settings page, information about multiple cloud platforms, and information about cloud products on multiple cloud platforms to the target client. It can also send information about the cloud management platform's resource recycling template and resource recycling settings page, information about multiple cloud platforms, and information about cloud products on multiple cloud platforms to the target client based on the target client's request. Details are provided below. The cloud platform information may include the cloud platform's identifier. The resource recycling settings page is a settings page used to set resource recycling information.
[0101] After establishing a connection with the target client, the resource management module can actively send the target client information about the resource recycling template and resource recycling setting page of the cloud management platform, information about multiple cloud platforms, and information about cloud products in multiple cloud platforms.
[0102] The resource management module can receive a resource recycling setup request from a target client. The resource recycling setup request is used to request resource recycling setup. The resource recycling setup request is sent by the target client in response to the resource recycling setup request operation. The resource recycling setup request includes an identifier of the target client.
[0103] The resource management module can parse the resource recycling setting request to obtain the identification of the target client, and can send the resource recycling template information of the cloud management platform and the resource recycling setting page information, the information of multiple cloud platforms and the information of cloud products in multiple cloud platforms to the target client based on the identification of the target client.
[0104] For other detailed descriptions of step 301 , please refer to the relevant descriptions below step 201 .
[0105] 302. Receive setting information including target cloud platform information, target cloud product information, and target resource recycling template information from a target client.
[0106] The target cloud platform is the cloud platform selected by the user from multiple cloud platforms. The target cloud product is the cloud platform selected by the user from the cloud products deployed on the target cloud platform. The target resource recycling template is the resource recycling template selected by the user from the resource recycling templates on the cloud management platform. The following describes the user's selection.
[0107] The target client can display the resource recycling settings page based on the information on the resource recycling settings page. The resource recycling settings page can include a cloud platform settings box and a cloud product settings box. The cloud platform settings box is used to set up the cloud platform. The cloud product settings box is used to set up cloud products.
[0108] The target client can display multiple cloud platforms in response to a user triggering the cloud platform settings box, and can display the target cloud platform in the cloud platform settings box in response to a user selecting the target cloud platform from the multiple cloud platforms. The target client can then display the cloud products included in the target cloud platform in response to a user triggering the cloud product settings box, and can display the target cloud product in the cloud product settings box in response to a user selecting the target cloud product.
[0109] The resource recycling setting page may further include a resource recycling template setting box. The resource recycling template setting box is a setting box for setting a resource recycling template.
[0110] Since the resource recovery templates that can be used by different cloud products in different cloud platforms may be different, the target client can display the resource recovery templates that can be used by the target cloud product in the target cloud platform in response to the trigger operation of the resource recovery template setting box, and can display the first resource recovery template in the resource recovery template setting box in response to the user's selection operation of the first resource recovery template.
[0111] For example, when the cloud product information includes monitoring indicator information and status information of the cloud product, the resource recovery templates that can be used by the target cloud product may include resource recovery templates corresponding to the cloud product's monitoring indicators and resource recovery templates corresponding to the cloud product's status. The resource recovery templates that can be used by the target cloud product may also include resource recovery templates corresponding to the cloud product's monitoring indicators and status.
[0112] Exemplarily, when the cloud product information includes monitoring indicator information, status information, and billing information of the cloud product, the resource recovery templates that can be used by the target cloud product may include resource recovery templates corresponding to the cloud product's monitoring indicators, resource recovery templates corresponding to the cloud product's status, and resource recovery templates corresponding to the cloud product's billing information. The resource recovery templates that can be used by the target cloud product may also include resource recovery templates corresponding to the cloud product's monitoring indicators and status, resource recovery templates corresponding to the cloud product's monitoring indicators and billing information, resource recovery templates corresponding to the cloud product's status and billing information, and resource recovery templates corresponding to the cloud product's monitoring indicators, status, and billing information.
[0113] In the case where the first resource recycling template includes setting parameters, the target client can also display the setting parameters and corresponding parameter setting boxes included in the first resource recycling template on the resource recycling setting page in response to the selection operation of the first resource recycling template. In one case, the target client can display the input parameter setting value in the target parameter setting box in response to the user's input operation on the target parameter setting box. In another case, the target client can display the value to be selected in response to the user's triggering operation on the target parameter setting box, and can display the target parameter setting value in the target parameter setting box in response to the selection operation of the target parameter setting value. The target parameter setting box is any parameter setting box in the parameter setting boxes included in the first resource recycling template. The target parameter setting value is any value among the multiple values of the target setting parameter corresponding to the target parameter setting box.
[0114] The recycling settings page can also include custom controls.
[0115] In response to a user triggering a custom control, the target client can display a custom resource recycling template on the resource recycling settings page. The custom resource recycling template can include multiple custom setting parameters and corresponding parameter setting boxes. The method for setting the custom setting parameters is similar to the method for setting the setting parameters of the first resource recycling template and will not be repeated here.
[0116] The resource recycling setting page may further include a save control. The target client may send setting information to the resource management module in response to the user triggering the save control.
[0117] The setting information may include information about the target cloud platform, target cloud product, and target resource recycling template. The target resource recycling template may be a first resource recycling template or a custom resource recycling template.
[0118] In the case where the target resource recycling template includes setting parameters, the setting information may further include parameter setting values corresponding to the setting parameters.
[0119] For example, assume that a heterogeneous cloud platform includes two cloud platforms, A1 and A2. Cloud products a, b, and c are deployed in A1, and cloud products d and e are deployed in A2. The resource management module can determine, based on A1's OpenAPI interface file, that the status of a and b are A{a1, a2}∪B{b1, b2}, the status of c is A{a2, a3}, and the monitoring indicator of c is q2. The resource management module can determine, based on A2's OpenAPI interface file, that the monitoring indicator of d is q1 and the monitoring indicator of e is q2. If the user selects A1 as the cloud platform, the selectable cloud products displayed on the resource recycling settings page are a, b, and c. If the user selects a or b as cloud product, the target resource recycling template can be selected based on the cloud product status A{a1, a2}. If the user selects c as cloud product, the target resource recycling template can be selected based on the cloud product status A{a2, a3} or the monitoring indicator q2. When the user selects A2 as the cloud platform, the resource recycling settings page displays the selectable cloud products d and e. You can select the target resource recycling template based on the monitoring indicators of the cloud product.
[0120] 303. Determine resource recycling conditions for the target cloud product based on the information in the target resource recycling template.
[0121] After receiving the setting information, the resource management module can determine the resource recycling conditions of the target cloud product based on the information of the target resource recycling template.
[0122] The resource management module can determine the resource recycling conditions of the target cloud product based on the information of the target resource recycling template and the information of the target cloud product.
[0123] For example, when the target resource recovery template is a resource recovery template corresponding to billing information, and the billing method of the target cloud product is a package period, the resource management module can determine the resource recovery conditions of the target cloud product based on the target resource recovery template and the expiration time information of the package period of the target cloud product.
[0124] If the configuration information includes parameter setting values corresponding to the configuration parameters, the resource management module may determine the resource recycling conditions for the target cloud product based on the target resource recycling template information and the parameter setting values. The resource management module may determine the resource recycling conditions for the target cloud product based on the target resource recycling template information, the target cloud product information, and the parameter setting values.
[0125] For example, if the target resource reclaim template is a resource reclaim template corresponding to billing information, and the target cloud product's billing method is pay-as-you-go, the parameter setting value may include the resource reclaim time set by the user. The resource management module may determine the resource reclaim conditions for the target cloud product based on the target resource reclaim template, the parameter setting value, and the target cloud product's identifier.
[0126] 304. Monitor target cloud products.
[0127] 305. When the conditions of the target cloud product meet the resource recycling conditions of the target cloud product, the target cloud product is recycled.
[0128] After the resource management module determines the resource recovery conditions for the target cloud product, it can monitor the target cloud product and then compare or match the conditions of the target cloud product with the resource recovery conditions of the target cloud product. If the conditions of the target cloud product are the same as or match the resource recovery conditions of the target cloud product, it can be determined that the conditions of the target cloud product meet the resource recovery conditions of the target cloud product, and resources can be recovered from the target cloud product. If the conditions of the target cloud product are different from or do not match the resource recovery conditions of the target cloud product, the resource management module can continue to monitor the target cloud product.
[0129] In some embodiments, when the target resource reclaim template is a resource reclaim template corresponding to a monitoring indicator of a cloud product, the resource reclaim conditions for the target cloud product may include a resource reclaim threshold for the target cloud product. The resource management module may monitor the value of the target indicator for the target cloud product and, if the target indicator value meets the resource reclaim threshold, or if the target value is greater than or equal to the resource reclaim threshold, reclaim resources for the target cloud product. The target value is determined based on the value of the monitoring indicator.
[0130] When monitoring only one of the monitoring indicators, the resource recovery threshold may include a single threshold. When monitoring multiple indicators, the resource recovery threshold may include one or more thresholds. Multiple indicators correspond to multiple thresholds in a one-to-one manner. Different thresholds within the multiple thresholds may be the same or different. When the resource recovery threshold includes a single threshold, the thresholds corresponding to the multiple indicators are the same.
[0131] If the target resource reclaim template is a custom resource reclaim template, the resource reclaim conditions for the target cloud product may also include a duration threshold and / or a count threshold. The resource management module may first determine the target indicator value for the target cloud product and monitor the duration and / or the number of times the target indicator value is less than or equal to (or greater than or equal to) the resource reclaim threshold. If the duration equals the duration threshold and / or the number of times the target indicator value is greater than or equal to the resource reclaim threshold, resource reclaim may be performed on the target cloud product.
[0132] For example, assuming the target cloud product is a cloud host and the target metric is CPU usage, the cloud host's resource recycling condition is that the CPU usage is less than or equal to 10% for 30 consecutive times, each lasting 7 days. Clearly, the resource recycling threshold is 10%, the number threshold is 30 times, and the duration threshold is 7 days. The resource management module can monitor the cloud host's CPU usage and reclaim resources if the cloud host's CPU usage is less than or equal to 10% 30 times, each lasting 7 days.
[0133] When the target resource recovery template is the first resource recovery template, the resource management module can monitor the value of the target indicator of the target cloud product, and can determine the target value based on the value of the target indicator of the target cloud product. When the target value is greater than or equal to the resource recovery threshold, the target cloud product can be resource recovered.
[0134] For example, the resource management module can monitor the target indicator values of the target cloud product within t minutes, which are n1, n2, ..., n t , the maximum value among these t values is n a , the average value of these t values is n c , the minimum value among these t values is n b , the standard deviation α of these t values can be expressed as follows:
[0135]
[0136] Here, t is an integer greater than 1.
[0137] Assume M = n a -n c ,N=n c -n b , when α approaches 0, and M and N approach 0, it means that the value of the target indicator tends to be stable, with basically no large fluctuation.
[0138] When the target indicator is CPU usage, memory usage, disk usage, storage usage, disk write IO, disk read IO, bandwidth inflow or bandwidth outflow, the resource management module can c Determine (1-n c ) / n c , obtaining the target value. It can then be determined whether the target value is greater than or equal to the resource recycling threshold. If the target value is greater than or equal to the resource recycling threshold, resources can be recycled for the target cloud product. The resource recycling threshold can be greater than or equal to 2. A larger resource recycling threshold indicates a greater probability that the cloud product is idle.
[0139] When the target indicator is the number of process runs, the resource management module can c Determine (100-n c ) / n c , obtaining the target value. It can then be determined whether the target value is greater than or equal to the resource recycling threshold. If the target value is greater than or equal to the resource recycling threshold, resources can be recycled for the target cloud product. The resource recycling threshold can be greater than or equal to 8. A larger resource recycling threshold indicates a greater probability that the cloud product is idle.
[0140] When the target indicator is the percentage of CPU idle time, the resource management module can determine the target value as n c , you can determine whether the target value is greater than or equal to the resource recycling threshold. If the target value is greater than or equal to the resource recycling threshold, you can recycle the target cloud product. The resource recycling threshold is a value greater than 0 and less than 1. A larger resource recycling threshold indicates a greater probability that the cloud product is idle.
[0141] The target resource recovery template may be a resource recovery template corresponding to one indicator, or may be a resource recovery template corresponding to multiple indicators.
[0142] In the case where the target resource recycling template is a resource recycling template corresponding to multiple indicators, if any indicator among the multiple indicators meets the above conditions, it can be determined that the conditions of the target cloud product meet the resource recycling conditions of the target cloud product.
[0143] In some embodiments, when the target resource reclamation template is a cloud product status corresponding resource reclamation template, the resource reclamation conditions for the target cloud product may include a preset status and a preset duration. The resource management module may monitor the status of the target cloud product and reclaim resources for the target cloud product if the target cloud product remains in the preset state for a duration greater than or equal to the preset duration.
[0144] When the target resource recovery template is a resource recovery template corresponding to the status of the cloud product, the resource management module can monitor the status of the target cloud product. When the duration of the target cloud product's status in the preset state is greater than or equal to the preset time length, the target cloud product can be reclaimed.
[0145] For example, assuming the target cloud product is a cloud hard drive, the resource reclaim condition for the target cloud product is that the target cloud product remains unmounted or unmounted for a duration exceeding a preset time. The resource management module can monitor the status of the target cloud product and reclaim the target cloud product's resources if the target cloud product remains unmounted for a preset time.
[0146] For example, assuming the target cloud product is a cloud host or bare metal server, the resource reclaim condition for the target cloud product is that the target cloud product has been in a shutdown state for a period exceeding a preset time. The resource management module can monitor the status of the target cloud product and reclaim the target cloud product's resources if the target cloud product has been in a shutdown state for a preset period.
[0147] For example, assuming the target cloud product is an elastic IP, the resource reclaim condition for the target cloud product is that the target cloud product remains in an unbound or unbound state for longer than a preset duration. The resource management module can monitor the status of the target cloud product and reclaim the target cloud product's resources if the target cloud product remains unbound for a preset duration.
[0148] In some embodiments, when the target resource reclaim template is a resource reclaim template corresponding to billing information for a cloud product, the resource reclaim condition for the target cloud product is the resource reclaim time of the target cloud product. The resource management module may monitor the time of the target cloud product and reclaim resources for the target cloud product when the current time of the target cloud product is the resource reclaim time of the target cloud product.
[0149] When the target resource recovery template is a resource recovery template corresponding to the billing information of the cloud product, the resource management module can monitor the time of the target cloud product and, when the time of the target cloud product is the resource recovery time, can recover resources of the target cloud product.
[0150] If the cloud product is billed on a per-cycle basis, the target cloud product's resource reclaim time is the expiration date of the per-cycle basis. If the cloud product is billed on a pay-as-you-go basis, the target cloud product's resource reclaim time is set by the user.
[0151] The target resource reclaim template can be a resource reclaim template corresponding to two or three of the cloud product's monitoring indicators, status, and billing information. The resource reclaim conditions for the target cloud product can include at least two of the target cloud product's resource reclaim threshold and resource reclaim time, a preset status, and a preset duration. The resource management module's processing method can be a combination of at least two of the above-mentioned embodiments.
[0152] Exemplarily, the target resource recovery template is a resource recovery template corresponding to the monitoring indicators and status of the cloud product. The resource recovery conditions of the target cloud product may include the resource recovery threshold, preset status, and preset duration of the target cloud product. The resource management module can monitor the value of the target indicator of the target cloud product, determine the target value based on the value of the target indicator of the target cloud product, and monitor the status of the target cloud product. When the target value is greater than or equal to the resource recovery threshold, or the duration of the target cloud product's status in the preset state is greater than or equal to the preset duration, the target cloud product can be resource recovered. The duration can be 30 days, 10 days, 2 months, or other values.
[0153] If the target cloud product meets its resource recycling requirements, the resource management module can output a first prompt indicating that the target cloud product meets the resource recycling requirements, so that the user can determine based on the prompt that the target cloud product has met the resource recycling requirements. In one case, the resource management module can send the first prompt to the target client. In another case, the resource management module can send the first prompt to the terminal device.
[0154] In some embodiments, the resource management module may determine a resource recovery policy for the target cloud product based on information about the target cloud product, and may recover resources for the target cloud product based on the resource recovery policy for the target cloud product.
[0155] The target cloud product information may include information about the target cloud product's resource processing logic. The resource management module may determine the target cloud product's resource processing logic based on the target cloud platform's OpenAPI interface file. Based on the target cloud product's resource processing logic, the resource management module may determine the target cloud product's resource recovery strategy. If the target cloud product's conditions meet the target cloud product's resource recovery requirements, the resource management module may recover resources from the target cloud product based on the target cloud product's resource recovery strategy.
[0156] The configuration information may also include the target cloud product's resource reclaim policy. The target cloud product's resource reclaim policy is the one selected by the user from the target cloud product's corresponding resource reclaim policies. The target cloud product's corresponding resource reclaim policy is determined based on the target cloud product's resource processing logic.
[0157] The resource recycling policy can be retained in the recycle bin or destroyed.
[0158] If the resource reclamation policy is Retain in the Recycle Bin, the settings may also include the retention policy and retention period. The retention policy can be Continue Normal Operation, Freeze / Limit Resource, or Shut Down Resource. The retention period can be Permanent Retention or a first preset retention period. The first preset retention period can be less than or equal to the maximum retention period of the target cloud product. If the cloud product's resource recovery conditions are met, the cloud product enters the Recycle Bin and operates normally without freezing or speed restrictions. This is commonly used for core business applications. If the cloud product's resource freezing / limit is met, the cloud product enters the Recycle Bin and is frozen / limited / uninstalled / unbound. This typically occurs when the disk read / write speed of a storage product is limited or the bandwidth of an Elastic IP is limited. This is commonly used for low-frequency access services. If the cloud product's resource shutdown / uninstall / unbinding conditions are met, the cloud host or bare metal server enters the Recycle Bin and is shut down. If the cloud product is a cloud disk, the cloud disk enters the Recycle Bin and is unmounted. If the cloud product is an Elastic IP, the Elastic IP enters the Recycle Bin and is unbound.
[0159] After a target cloud product enters the Recycle Bin, the resource management module can retain it in the Recycle Bin, process it accordingly based on the retention policy, and retain it in the Recycle Bin based on the retention period. If the target cloud product has been in the Recycle Bin for a period equal to the retention period, the resource management module can delete or destroy it.
[0160] If the target cloud product has been in the recycle bin for less than the retention period, you can manually restore or destroy the target cloud product in the recycle bin.
[0161] Manual recovery removes a cloud product from the Recycle Bin and restores it to its stable state before entering the Recycle Bin. Manual destruction completely deletes the target cloud product.
[0162] If the resource reclaim policy is "destroy," the resource management module can directly destroy the target cloud product, meaning it does not enter the recycle bin. Destroy is typically used for cloud products, such as elastic IP addresses, that can be reactivated without losing business data.
[0163] As can be seen, resource recycling policies can be set for cloud products, and the resource management module can recycle resources for cloud products based on the resource recycling policies. Since different resource recycling policies can be set for different cloud products, the flexibility of resource recycling can be improved.
[0164] In some embodiments, when the target cloud product is in a stable state, the resource management module reclaims resources of the target cloud product.
[0165] Figure 4 This is a schematic diagram of a recycling resource provided by an embodiment of the present application. Figure 4 As shown, if the conditions of the target cloud product meet the resource recycling conditions of the target cloud product, the resource management module can first monitor the status of the target cloud product, and then determine whether the status of the target cloud product is stable. If the status of the target cloud product is stable, the resource recycling of the target cloud product can be directly performed. If the status of the target cloud product is in an intermediate state, the resource management module can continue to monitor the status of the target cloud product. If the status of the target cloud product switches from an intermediate state to a stable state, the resource recycling of the target cloud product can be immediately performed.
[0166] During the process of resource recovery of the target cloud product by the resource management module, if the state of the target cloud product switches from a stable state to an intermediate state, the resource management module will suspend resource recovery of the target cloud product and monitor the state of the target cloud product. After monitoring that the state of the target cloud product switches from an intermediate state to a stable state, the resource recovery of the target cloud product can be immediately performed. The resource management module can periodically monitor the state of the target cloud product and count the number of monitoring times. If the number of monitoring times is less than the number threshold, the monitoring can continue. If the number of monitoring times is equal to the monitoring number threshold and the state of the target cloud product is still in the intermediate state, it can be determined that the resource recovery of the target cloud product has failed.
[0167] The stable state after the target cloud product is switched may be the same as or different from the stable state when the resource recycling conditions of the target cloud product are met.
[0168] Exemplarily, when the conditions of the target cloud product meet the resource recovery conditions of the target cloud product, the resource management module can recover the resources of the target cloud product. At this time, the state of the target cloud product is in stable state 1. During the resource recovery process of the target cloud product, due to objective factors, such as a host failure automatically triggering a hot migration of the cloud host, causing the state of the target cloud product to switch to an intermediate state, the resource management module can suspend the resource recovery of the target cloud product and monitor the state of the target cloud product every few minutes. When the number of monitoring times is less than or equal to the monitoring number threshold and the state of the target cloud product switches from an intermediate state to a stable state, the resources of the target cloud product can be recovered immediately. When the number of monitoring times is the monitoring number threshold and the state of the target cloud product is still in an intermediate state, it can be determined that the resource recovery of the target cloud product has failed. In the case of a cloud product resource recovery failure, the resource management module can output a second prompt message to prompt the user that the cloud product resource recovery has failed.
[0169] When the target cloud product's resources are successfully recovered, the resource management module may output third prompt information for prompting the user that the target cloud product's resources are successfully recovered.
[0170] During the resource recovery process of the target cloud product by the resource management module, if the state of the target cloud product switches from a stable state to an intermediate state, the recovery task performs different actions according to the state of the target cloud product.
[0171] After the target cloud product enters an intermediate state, other tasks are automatically triggered by default. If the target cloud product remains in an intermediate state due to objective factors (such as host migration) during the destruction process, the destruction operation is attempted to be withdrawn. The target cloud product's status is monitored at regular intervals. If the monitoring frequency is less than the monitoring frequency threshold, after the resource execution completes the corresponding action, such as after the host migration is completed, the target cloud product's status is updated to a stable state and then destroyed again. If the target cloud product still has not entered a stable state when the monitoring frequency reaches the monitoring frequency threshold, monitoring is stopped and a destruction failure message is displayed.
[0172] When the status of the target cloud product is in an intermediate state, if the destruction operation cannot be withdrawn, it may cause the target cloud product to be in an abnormal state. In this case, the destruction is performed again. After multiple destruction failures, a fourth prompt message indicating the destruction failure can be output so that manual intervention is required.
[0173] It can be seen that when or during the resource recovery process of cloud products, the status of cloud products can be monitored. Only when the status of cloud products is stable can the resources of cloud products be recovered. This can ensure that the status of cloud products is stable during resource recovery, thereby ensuring the stability and reliability of resource recovery.
[0174] For example, assume a heterogeneous cloud platform includes public cloud A and private cloud B. Cloud host 1 on public cloud A supports monitoring metrics including CPU usage and memory usage. Cloud host 1 is billed on a package basis for a three-year subscription. Cloud host 2 on private cloud B supports monitoring metrics including CPU usage and memory usage. Cloud host 2 is billed on a pay-as-you-go basis. The resource recovery condition for cloud host 1 is the expiration date of the purchased cloud product. When the expiration date is reached, the resource management module can recycle the cloud product to the recycle bin and set the cloud product's status to frozen. After being retained in the recycle bin for seven days, the cloud product will be automatically destroyed. The resource recycling conditions for cloud host 2 are that the CPU usage is less than or equal to 10% and the memory usage is less than or equal to 10% for 10 consecutive times, each time for 7 days. If the resource management module detects that the CPU usage and memory usage of cloud host 2 are both less than or equal to 10% for 10 consecutive times, each time for 7 days, cloud host 2 can be recycled to the recycle bin and cloud host 2 can be controlled to be in a shutdown state. It will be automatically destroyed after being kept in the recycle bin for 30 days. Within 7 days after cloud host 1 enters the recycle bin, the user can manually restore it after renewing it. During the process of destroying cloud host 2 by the resource management module, if the host machine fails, since the host machine has HA turned on, cloud host 2 can automatically perform hot migration, the state of the cloud host can be changed to the migration state, and destruction will not be executed temporarily. In the case of migration failure due to network reasons, the cloud host enters an abnormal state, and the resource management module can start destruction and can destroy the abnormal cloud host 2.
[0175] exist Figure 3 In the resource recovery method shown, users can select a resource recovery template corresponding to a cloud product from the resource recovery templates of the cloud management platform to set resource recovery conditions. This allows automatic resource recovery of cloud products when the resource recovery conditions are met, and the recovered resources can be reused, thereby improving resource utilization. Furthermore, when the cloud product's conditions meet the resource recovery conditions, resource recovery of the cloud product can avoid the continued operation of idle resources, thereby reducing the power consumption of the cloud product. Furthermore, because the resource recovery conditions of cloud products are determined based on the resource recovery templates of the cloud management platform, the resource recovery conditions of different cloud platforms can be uniformly determined and managed, allowing for unified management and recovery of resources across heterogeneous cloud platforms, thereby improving the management capabilities of the cloud management platform.
[0176] It should be understood that the same or corresponding contents in different embodiments can be referenced to each other.
[0177] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0178] Based on the same inventive concept, the present application also provides a resource recovery device for implementing the resource recovery method described above. The solution provided by the resource recovery device is similar to the solution described in the resource recovery method described above. Therefore, the specific limitations of one or more resource recovery device embodiments provided below can be found in the above-mentioned limitations of the resource recovery method and will not be repeated here.
[0179] Figure 5 This is a schematic diagram of the structure of a resource recovery device provided in an embodiment of the present application. The resource recovery device can be applied to a resource management module in a cloud management platform, which is used to manage heterogeneous cloud platforms including multiple cloud platforms. The resource recovery device may include:
[0180] A determining unit 501 is configured to determine resource recycling conditions for a target cloud product based on a resource recycling template of the cloud management platform and information about the target cloud product, where the target cloud product is any cloud product on multiple cloud platforms.
[0181] Monitoring unit 502, used to monitor the target cloud product;
[0182] The recycling unit 503 is configured to recycle resources of the target cloud product when the conditions of the target cloud product meet the resource recycling conditions of the target cloud product.
[0183] In some embodiments, the determining unit 501 is specifically configured to:
[0184] Sending information about the resource recycling template and resource recycling settings page of the cloud management platform, information about multiple cloud platforms, and information about cloud products in the multiple cloud platforms to the target client, where the target client is any client corresponding to the resource management module;
[0185] Receive setting information from a target client, the setting information including information about a target cloud platform, information about a target cloud product, and information about a target resource recovery template. The target cloud platform is a cloud platform corresponding to the target cloud product among multiple cloud platforms. The target cloud platform, target cloud product, and target resource recovery template are determined based on user selection.
[0186] Determine the resource recycling conditions for the target cloud product based on the target resource recycling template information.
[0187] In one embodiment, when the target resource recycling template includes setting parameters, the setting information also includes parameter setting values corresponding to the setting parameters. The determining unit 501 determines the resource recycling conditions of the target cloud product based on the information of the target resource recycling template, including:
[0188] Determine the resource recycling conditions for the target cloud product based on the target resource recycling template information and parameter setting values.
[0189] In one embodiment, when the target resource recycling template is a resource recycling template corresponding to a monitoring indicator of a cloud product, the resource recycling condition of the target cloud product includes a resource recycling threshold of the target cloud product;
[0190] A monitoring unit 502 is specifically configured to monitor the value of a target indicator of a target cloud product, where the target indicator is an indicator selected by a user from monitoring indicators of the target cloud product;
[0191] The recycling unit 503 is specifically configured to recycle resources of the target cloud product when the value of the target indicator meets the resource recycling threshold, or the target value is greater than or equal to the resource recycling threshold. The target value is determined according to the value of the target indicator.
[0192] In one embodiment, when the target resource recycling template is a resource recycling template corresponding to the state of a cloud product, the resource recycling conditions of the target cloud product include a preset state and a preset duration;
[0193] A monitoring unit 502 is specifically configured to monitor the status of the target cloud product;
[0194] The recycling unit 503 is specifically configured to recycle resources of the target cloud product when the target cloud product remains in a preset state for a duration greater than or equal to a preset time period.
[0195] In one embodiment, when the target resource recovery template is a resource recovery template corresponding to billing information of a cloud product, the resource recovery condition of the target cloud product is the resource recovery time of the target cloud product;
[0196] A monitoring unit 502 is specifically used to monitor the time of the target cloud product;
[0197] The recycling unit 503 is specifically configured to recycle resources of the target cloud product in a case where a time of the target cloud product is a resource recycling time.
[0198] In one of the embodiments, the determining unit 501 is further configured to determine a resource recycling strategy of the target cloud product according to information of the target cloud product.
[0199] The recycling unit 503 is specifically configured to recycle resources of the target cloud product according to the resource recycling strategy.
[0200] In one of the embodiments, the recycling unit 503 recycles resources of the target cloud product according to the resource recycling strategy, including:
[0201] In a case where the resource recycling strategy is to keep in a recycle bin, the target cloud product is kept in the recycle bin.
[0202] In a case where the resource recycling strategy is to destroy, the target cloud product is destroyed.
[0203] In one of the embodiments, the recycling unit 503 is specifically configured to recycle resources of the target cloud product in a case where a state of the target cloud product is a stable state.
[0204] The above various units in the resource recycling apparatus can be realized by software, hardware, and combinations thereof, in whole or in part. The above various units can be embedded in or independent of a processor in a computer device in a hardware form, or can be stored in a memory in a computer device in a software form, so as to be called and executed by a processor to perform operations corresponding to the above various units.
[0205] Based on the above network architecture, Figure 6 is a structural schematic diagram of a computer device provided by an embodiment of the present application. The computer device can include a processor, a memory, an input / output interface (Input / Output, referred to as I / O), and a communication interface. The processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for running of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is configured to store version configuration files and the like. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to communicate with external clients through network connection. The processor is configured to read the computer program in the memory and perform the following operations:
[0206] Determine the resource recycling conditions for the target cloud product based on the resource recycling template of the cloud management platform and the information of the target cloud product. The target cloud product can be any cloud product on multiple cloud platforms.
[0207] Monitor target cloud products;
[0208] If the conditions of the target cloud product meet the resource recycling conditions, the target cloud product will be recycled.
[0209] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0210] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned resource recovery method are implemented.
[0211] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.
[0212] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0213] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A resource recovery method, characterized in that: The method is applied to a resource management module in a cloud management platform, wherein the cloud management platform is used to manage heterogeneous cloud platforms including multiple cloud platforms. The method includes: Determining resource recycling conditions for the target cloud product based on the resource recycling template of the cloud management platform and information about the target cloud product, where the target cloud product is any cloud product on the multiple cloud platforms; Monitoring the target cloud product; When the conditions of the target cloud product meet the resource recycling conditions, resources are recycled for the target cloud product.
2. The method according to claim 1, characterized in that Determining resource recycling conditions for the target cloud product based on the resource recycling template of the cloud management platform and information about the target cloud product includes: Sending information about the resource recycling template and resource recycling settings page of the cloud management platform, information about the multiple cloud platforms, and information about cloud products in the multiple cloud platforms to a target client, where the target client is any client corresponding to the resource management module; receiving setting information from the target client, the setting information including information of a target cloud platform, information of a target cloud product, and information of a target resource recovery template, the target cloud platform being a cloud platform corresponding to the target cloud product among the multiple cloud platforms, the target cloud platform, the target cloud product, and the target resource recovery template being determined based on a user selection; Determine resource recycling conditions for the target cloud product based on the target resource recycling template information.
3. The method according to claim 2, characterized in that In the case where the target resource recycling template includes setting parameters, the setting information also includes parameter setting values corresponding to the setting parameters. Determining the resource recycling conditions of the target cloud product based on the information of the target resource recycling template includes: Determine resource recycling conditions for the target cloud product based on the target resource recycling template information and the parameter setting values.
4. The method according to claim 2 or 3, characterized in that In a case where the target resource recycling template is a resource recycling template corresponding to a monitoring indicator of a cloud product, the resource recycling condition of the target cloud product includes a resource recycling threshold of the target cloud product; The monitoring of the target cloud product includes: Monitoring a value of a target indicator of the target cloud product, where the target indicator is an indicator selected by a user from monitoring indicators of the target cloud product; When the condition of the target cloud product meets the resource recycling condition, recycling the resources of the target cloud product includes: When the value of the target indicator meets the resource recycling threshold, or the target value is greater than or equal to the resource recycling threshold, resources are recycled for the target cloud product, and the target value is determined according to the value of the target indicator.
5. The method according to claim 2 or 3, characterized in that When the target resource recycling template is a resource recycling template corresponding to the status of a cloud product, the resource recycling conditions of the target cloud product include a preset status and a preset duration; The monitoring of the target cloud product includes: Monitoring the status of the target cloud product; When the condition of the target cloud product meets the resource recycling condition, recycling the resources of the target cloud product includes: When the duration of the target cloud product being in the preset state is greater than or equal to the preset duration, resources of the target cloud product are recycled.
6. The method according to claim 2 or 3, characterized in that When the target resource recovery template is a resource recovery template corresponding to billing information of a cloud product, the resource recovery condition of the target cloud product is the resource recovery time of the target cloud product; The monitoring of the target cloud product includes: Monitoring time of the target cloud product; When the condition of the target cloud product meets the resource recycling condition, recycling the resources of the target cloud product includes: When the time of the target cloud product is the resource recycling time, resources are recycled for the target cloud product.
7. The method according to claim 1, characterized in that The method further comprises: Determining a resource recovery strategy for the target cloud product based on the information of the target cloud product; The resource recovery of the target cloud product includes: Reclaim resources of the target cloud product according to the resource recycling strategy.
8. The method according to claim 7, characterized in that Reclaiming resources of the target cloud product according to the resource recycling strategy includes: If the resource recycling policy is to retain in the recycle bin, retain the target cloud product in the recycle bin; When the resource recovery policy is destruction, the target cloud product is destroyed.
9. The method according to claim 1, characterized in that The resource recovery of the target cloud product includes: When the target cloud product is in a stable state, resources of the target cloud product are recycled.
10. A computer device, characterized in that: including memory and processor; The memory is used to store a computer program, and the processor is used to execute the computer program to implement the steps of the method according to any one of claims 1 to 9.