A cloud resource intelligent recovery method, system and terminal device

By monitoring and analyzing cloud resource usage data in real time, setting recycling priorities and performing recycling tasks, dynamically adjusting resource recycling strategies, solving the problems of cloud resource management automation and intelligence, achieving efficient resource recycling and utilization, and ensuring the stability and security of services.

CN118689639BActive Publication Date: 2025-04-08广州三七极耀网络科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410731342.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2025-04-08
Estimated Expiration
2044-06-06

AI Technical Summary

Technical Problem

The existing technology is difficult to realize the automation and intelligent management of cloud resources, resulting in increased resource waste and operation and maintenance management burden, which cannot meet the needs of rapid iteration and configuration adjustment of game development projects.

Method used

By obtaining real-time usage data of the cloud computing platform, monitoring the status change information of cloud resources in real time, analyzing the resource utilization rate of inactive cloud resources, setting recycling priority, performing recycling tasks after dependency analysis and security detection, and establishing a resource recycling effect prediction model through the support vector machine algorithm to dynamically adjust priority.

Benefits of technology

It realizes efficient management and optimized recycling of cloud resources, reduces resource waste, improves resource utilization efficiency and system economy, and ensures service continuity and data security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118689639B_ABST
    Figure CN118689639B_ABST
Patent Text Reader

Abstract

The present application is applicable to the field of information technology, and provides a cloud resource intelligent recycling method, including: obtaining resource change data, generating status activity information of cloud resources, obtaining a list of resources to be recycled by analyzing the resource utilization rate of inactive cloud resources; setting recycling priorities, setting different queues of resources to be recycled in the list of resources to be recycled, performing dependency analysis on the resources to be recycled in the queues of resources to be recycled, obtaining recyclable resources, detecting the security of recyclable resources, generating a security detection report, and executing recycling tasks based on the security detection report; establishing a resource recycling effect prediction model, and dynamically adjusting the recycling priority of resources; obtaining abnormal situations during the execution of recycling tasks, and executing intervention strategies. The present application can automatically and efficiently recycle or reconfigure idle resources on the basis of ensuring data and service security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of information technology, and in particular, relates to a cloud resource intelligent recovery method, system and terminal device. Background Art

[0002] In the process of developing game development projects, it is essential to adjust the cloud server configuration. At the same time, the configuration adjustment of the cloud server changes with the development stage, which makes the configuration of the cloud server frequent. In this process, a large amount of unused resources will be generated, thereby increasing the burden of operation and maintenance management. In addition, resource requirements also change with the development cycle, and thus fail to fully utilize or recycle idle resources, such as IP addresses and hard disk space. If they are not recovered in time, it will cause waste, which will lead to increased costs.

[0003] In the prior art, resource adjustment, recycling and management rely on manual monitoring, such as administrators regularly checking resource usage and recycling idle resources. This method is time-consuming and prone to ignoring resources, and also causes a waste of human resources. It is also inefficient and prone to errors. Incorrect resource recycling may lead to data loss or service interruption. Therefore, this method is not suitable for the needs of rapid iteration and configuration adjustment of resources in game development.

[0004] In summary, the problem of how to perform automated and intelligent resource management, accurately and in real time monitor and analyze cloud computing resource usage data in game development projects, identify active and idle resources, and efficiently and automatically recycle or reconfigure idle resources while ensuring data and service security needs to be solved urgently. Summary of the invention

[0005] The embodiments of the present application provide a cloud resource intelligent recovery method, system and terminal device, which can solve at least one of the above-mentioned problems in the prior art.

[0006] In a first aspect, an embodiment of the present application provides a cloud resource intelligent recovery method, including:

[0007] Acquire real-time usage data of the cloud computing platform, wherein the real-time usage data includes usage data of key resources and timestamps of allocation and release of cloud resources, wherein the key resources include CPU, memory and network bandwidth;

[0008] Monitor the state change information of cloud resources in real time, obtain resource change data based on the usage data of the key resources and the state change information, and generate state activity information of cloud resources through the resource change data, wherein the state change information includes starting, stopping and restarting the cloud resources, and the resource change data includes the real-time usage data before the cloud resources are changed and the real-time usage data after the cloud resources are changed; the state activity information includes active state and inactive state;

[0009] By analyzing the resource utilization of inactive cloud resources, a list of resources to be recycled is obtained;

[0010] Obtaining a density index of resource utilization, setting a recycling priority according to resource types and the density index, and setting different queues of resources to be recycled in a list of resources to be recycled, wherein the resource types include core types and non-core types, and the density index is a frequency of use of cloud resources;

[0011] Perform dependency analysis on the resources to be recycled in the recycling resource queue, obtain recyclable resources, detect the security of the recyclable resources, generate a security detection report, and execute recycling tasks based on the security detection report, wherein the recycling tasks include terminating virtual machine instances, deleting storage volumes, releasing IP addresses, and uninstalling hard disk space;

[0012] Obtain resource change data of the cloud computing platform after executing the recycling task, use a support vector machine algorithm to establish a resource recycling effect prediction model, and dynamically adjust the resource recycling priority based on the resource recycling effect prediction model;

[0013] Acquire abnormal conditions during the execution of the recycling task, and execute intervention strategies based on the abnormal conditions, wherein the abnormal conditions include API call failures and network delay problems, and the intervention strategies include manual intervention and automatic intervention.

[0014] In a second aspect, an embodiment of the present application provides a cloud resource intelligent recycling system, including:

[0015] The first processing module is used to obtain real-time usage data of the cloud computing platform, wherein the real-time usage data includes usage data of key resources and timestamps of allocation and release of cloud resources, and the key resources include CPU, memory and network bandwidth;

[0016] The second processing module is used to monitor the state change information of cloud resources in real time, obtain resource change data based on the usage data of the key resources and the state change information, and determine the state activity information of the cloud resources through the resource change data, wherein the state change information includes starting, stopping and restarting the cloud resources, and the resource change data includes the real-time usage data before the cloud resources are changed and the real-time usage data after the cloud resources are changed; the state activity information includes active state and inactive state;

[0017] The third processing module is used to obtain a list of resources to be recycled by classifying the cloud resources whose status activity information is inactive;

[0018] The fourth processing module is used for the density index of each cloud resource in the to-be-reclaimed resource list, and based on the resource type of the cloud resource and the density index, determines the recovery priority of each cloud resource, and based on the resource type and the recovery priority, determines different to-be-reclaimed resource queues, wherein the resource type includes a core type and a non-core type, and the density index is the frequency of use of the cloud resource;

[0019] The fifth processing module: performs dependency analysis on the resources to be recycled in the recycling resource queue, obtains recyclable resources, detects the security of the recyclable resources, generates a security detection report, and executes recycling tasks based on the security detection report, wherein the recycling tasks include terminating virtual machine instances, deleting storage volumes, releasing IP addresses, and uninstalling hard disk space;

[0020] The sixth processing module is used to obtain resource change data of the cloud computing platform after executing the recycling task, use the support vector machine algorithm to establish a resource recycling effect prediction model, and dynamically adjust the resource recycling priority based on the resource recycling effect prediction model;

[0021] The seventh processing module is used to obtain abnormal conditions during the execution of the recycling task, and execute intervention strategies based on the abnormal conditions, wherein the abnormal conditions include API call failures and network delay problems, and the intervention strategies include manual intervention and automatic intervention.

[0022] In a third aspect, an embodiment of the present application provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the cloud resource intelligent recovery method as described in any one of the above methods is implemented.

[0023] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0024] The present invention discloses a cloud resource intelligent recycling method, which realizes efficient management and optimized recycling of resources, solves the problem of how to identify and recycle cloud resources that have not been used for a long time or are periodically idle, so as to reduce resource waste and improve resource utilization efficiency. In addition, through intelligent data analysis and real-time monitoring, the problem of cloud resource waste is effectively solved, the resource utilization efficiency and system economy are improved, and the continuity of services and data security are guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0026] Figure 1 It is a flowchart of a cloud resource intelligent recycling method provided by an embodiment of the present invention;

[0027] Figure 2 It is a structural diagram of a cloud resource intelligent recycling system provided by an embodiment of the present invention;

[0028] Figure 3 It is a schematic diagram of the structure of the terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0030] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0031] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0032] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0033] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0034] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0035] See also Figure 1 As shown, the present invention is a cloud resource intelligent recovery method, comprising the following steps:

[0036] S100, obtaining real-time usage data of the cloud computing platform;

[0037] In this embodiment, by calling the API interface provided by the cloud computing platform, the real-time usage data of each cloud resource in the cloud computing platform is collected within a preset time by using script automation to ensure the real-time and accuracy of the data, wherein the real-time usage data includes the usage data of key resources and the timestamps of cloud resource allocation and release, and the key resources include CPU, memory and network bandwidth. Specifically, by calling the Cloud Watch API interface provided by the cloud computing platform Amazon Web Services (AWS), the automated collection program written in Python script is used to collect the usage data of key resources such as CPU utilization, memory utilization, disk I / O of EC2 instances every 5 minutes, and store the data in the AWSS3 object storage service.

[0038] S200, monitoring the status change information of cloud resources in real time, acquiring resource change data based on the usage data of the key resources and the status change information, and determining the status activity information of the cloud resources through the resource change data;

[0039] In some embodiments, the step S200 includes:

[0040] Using event-driven methods, real-time monitoring of cloud resource status change information, where the status change information includes starting, stopping, and restarting cloud resources;

[0041] Obtain the usage rate, request frequency and historical usage record of cloud resources by analyzing resource change data, wherein the resource change data includes real-time usage data before and after the cloud resource change;

[0042] The usage rate, request frequency and historical usage records of the cloud resources are used as input features, and a decision tree algorithm is used to establish a multi-layer decision tree model of cloud resource status. The multi-layer decision tree model of cloud resource status is used to determine the status activity information of cloud resources, wherein the status activity information includes active status and inactive status.

[0043] In this embodiment, an event-driven approach is adopted to monitor the status change information of cloud resources in real time. Specifically, by subscribing to the resource change events of the cloud computing platform, the status change information of cloud resources is captured in real time. The status change of cloud resources is usually triggered by user operations or system tasks, and then the resource change data is recorded in a time series database to form a complete resource change history record.

[0044] In this embodiment, a decision tree algorithm is used to determine the active state of cloud resources. Specifically, the usage rate, request frequency, and historical usage records of cloud resources are used as input features of the decision tree, and a multi-layer decision tree model of cloud resource status is established by setting different thresholds and branch conditions. Cloud resources are classified into active or inactive states according to different combinations of feature values, and the decision tree model is trained and optimized using historical data to improve the accuracy of judging the active state information of cloud resources.

[0045] In some embodiments, the above step S200 also includes dynamically adjusting the granularity and frequency of resource monitoring according to the status activity information, thereby optimizing the configuration of monitoring resources. Specifically, for inactive resources, reduce their monitoring granularity and frequency to reduce unnecessary performance overhead; for active resources, increase their monitoring granularity and frequency to achieve more refined real-time monitoring, and write the monitoring data to the Redis cache for real-time analysis and visualization. Select Redis as the cache database, use its high-speed read and write performance and rich data structure support, write the monitoring data to the ordered set of Redis at a certain time interval, use the timestamp as the score, and the monitoring indicator as the member, and push the monitoring data to the analysis and visualization module in real time through the Pub / Sub mechanism of Redis to achieve real-time monitoring and analysis.

[0046] Specifically, the event-driven method of AWS Cloud Watch service is used to configure Cloud WatchEvents rules to monitor the status change information of EC2 instances, such as start, stop, restart and other operations triggered by user operations or system tasks, and send the resource change data before and after the cloud resource changes to the AWS Kinesis data stream in JSON format. In Kinesis, the resource change data is processed in real time through AWS Lambda functions, key fields such as instance ID, cloud resource type, timestamp, etc. are extracted, and the processed data is written to the Amazon Dynamo DB table to analyze the utilization rate, request frequency and historical usage records of cloud resources. Based on the analysis of the utilization rate, request frequency and historical usage records of cloud resources, a multi-layer decision tree model of cloud resource status is established. At the same time, the cloud resource status multi-layer decision tree model is used to analyze the instance's CPU utilization, network traffic, disk I / O and other monitoring indicators in real time, and the active status of the instance is judged according to the preset threshold conditions. For example, when the CPU utilization rate exceeds 80% for 5 consecutive minutes and the network traffic is greater than 100MB / s, the instance is marked as highly active; when the CPU utilization rate is less than 10% for 30 consecutive minutes and the disk I / O is less than 1MB / s, the instance is marked as inactive. For highly active instances, the monitoring data is written to the ordered set of Redis at intervals of 10 seconds, and through the Redis publish / subscribe mechanism, the alarm and automatic expansion mechanism are triggered to dynamically adjust the configuration and number of instances to ensure the continuous operation of the business. For inactive instances, the monitoring frequency is reduced to once a minute, and their resource utilization and business value are regularly evaluated. Instances that have been idle for a long time are automatically scaled down or released to optimize resource allocation and cost expenditure. Finally, Amazon Quick Sight is used to perform multi-dimensional visual analysis of the monitoring data, display the state distribution, activity trend, abnormal conditions, etc. of the instance in real time, and combined with machine learning algorithms, the resource demand for a period of time in the future is predicted and planned, and resource optimization and cost control are done in advance to ensure the efficient and stable operation of the cloud computing platform.

[0047] S300, obtaining a list of resources to be recycled by classifying the cloud resources whose status activity information is in an inactive state;

[0048] In some embodiments, the step S300 includes:

[0049] Using the K-means clustering algorithm, inactive cloud resources are divided into different cloud resource sets, and cloud resource sets that are idle for a long time or have low resource utilization are divided into candidate lists of resources to be recycled;

[0050] Acquire historical resource change data and real-time usage data of the cloud resources in the candidate list of resources to be recycled;

[0051] Based on the historical resource change data and real-time usage data, a time series analysis algorithm is used to establish a similarity matching model to obtain the matching degree between the real-time usage data of cloud resources and the historical resource change data;

[0052] If the matching degree reaches the preset matching degree threshold, when the status of the cloud resources has not changed significantly, a business impact analysis method is used to classify and rate the services of the cloud resources, set recycling waiting periods for cloud resources of different levels, establish a dynamic adjustment mechanism for the waiting period, and determine a list of resources to be recycled;

[0053] If the matching degree is lower than the preset matching degree threshold, analyze whether the factor causing the change in the state of the cloud resources is a business demand. If the factor causing the change in the state of the cloud resources is a business demand, remove the cloud resources with the changed state from the candidate list of resources to be recycled, and determine the list of resources to be recycled.

[0054] In this embodiment, the K-means clustering algorithm is used to classify inactive cloud resources. Specifically, the CPU utilization, memory utilization, and disk I / O frequency of cloud resources are normalized and converted into values ​​between 0 and 1 to eliminate the dimensional effects between different indicators. Then, the silhouette coefficient method is used to determine the optimal clustering number K. By calculating the silhouette coefficients under different K values, the K value with the largest coefficient is selected as the final clustering number. Generally, the K value is between 3 and 5. Thereafter, the Euclidean distance is used to calculate the similarity between each resource. Through iterative optimization, the cluster center and resource allocation are continuously updated until the clustering results are stable, and the cloud resources are divided into different cloud resource sets, thereby identifying cloud resource sets that are idle for a long time or have low resource utilization. Furthermore, a dynamic threshold mechanism for resource utilization is introduced. By presetting the upper and lower boundaries of resource utilization, when the resource utilization is lower than the lower boundary for a continuous period of time, it is marked as a long-term idle resource and included in the candidate list of resources to be recycled; when the resource utilization is higher than the upper boundary for a continuous period of time, it is removed from the recycling list of resources to be recycled to avoid resource recycling errors caused by unreasonable threshold settings. The calculation formula for resource utilization is: CPU utilization = (CPU usage time / CPU total time) * 100%, memory utilization = (used memory / total memory) * 100%, network bandwidth utilization = (actual bandwidth / total bandwidth) * 100%. Specifically, for each cluster after clustering, the characteristic distribution of its resource utilization is analyzed. If the average CPU utilization of a cluster is lower than 10%, the average memory utilization is lower than 20%, and the average disk I / O frequency is lower than 0.5 times / second, the cluster is marked as a low resource utilization cluster, and the cloud resources in it are included in the candidate list of resources to be recycled. In addition, the historical resource utilization data of each cloud resource is analyzed. If it is found that the average resource utilization of a cloud resource in the past 7 days is less than 5%, it will be marked as a long-term idle resource and included in the candidate list of resources to be recycled.

[0055] In this embodiment, for each cloud resource in the candidate list of reclaimed resources, its real-time usage data for the most recent period of time is obtained, including key performance indicators such as CPU utilization, memory utilization, disk I / O rate, and network bandwidth. Through time series analysis and pattern recognition algorithms, such as a combination of dynamic time warping (DTW) algorithm and support vector machine (SVM), hidden Markov model (HMM) and other classification algorithms, the real-time usage data is similarly matched and compared with the historical resource change data. The distance measurement value calculated by the DTW algorithm is used as a feature input to train a similarity matching model, so as to realize automatic judgment and quantitative evaluation of the similarity between the real-time usage data of cloud resources and the resource change data, and to judge whether the state of the cloud resource has changed. Specifically, if the matching degree is lower than the preset matching degree threshold, it indicates that the state of the cloud resource has changed significantly, and the influencing factors causing the change in the state of the cloud resource are analyzed. By calling the API interface of the configuration management database (CMDB), metadata information such as the business attribution and service level agreement (SLA) of the cloud resource is obtained. In CMDB, the relationship between cloud resources and business requirements is modeled as a many-to-many entity-relationship model. Flexible associated data retrieval and aggregation are achieved through query languages ​​such as GraphQL to determine whether the influencing factor that causes the change in the state of cloud resources is a business requirement. If the influencing factor is a business requirement, the resource is removed from the candidate list of resources to be recycled to avoid the risk of incorrect recycling. For cloud resources whose status has not changed significantly, the recycling threshold and priority are dynamically adjusted based on the historical and current resource utilization data of cloud resources. The business impact analysis (BIA) method is adopted to comprehensively consider factors such as the business importance, availability requirements, and data sensitivity of cloud resources, classify and rate business requirements, and set different levels of cloud resource recycling waiting periods accordingly. At the same time, a dynamic adjustment mechanism for the waiting period is established, and then the waiting period is automatically extended or shortened according to the real-time changes in resource utilization to avoid premature recycling or long-term idleness. Specifically, for cloud resources whose resource utilization is continuously lower than the recycling threshold, they are marked as high-priority resources to be recycled. If the cloud resource utilization rebounds significantly during the waiting period, they are automatically removed from the candidate list of resources to be recycled. In addition, high-priority resources to be recycled are reconfirmed and approved, and notifications are sent to the departments and business managers to which the cloud resources belong, explaining the average utilization rate of cloud resources and the proposed recycling plan, and soliciting feedback and opinions from relevant parties. A multi-level approval mechanism and timeout processing logic are designed, and differentiated approval rules and time limits are set for resources of different business departments and priorities.

[0056] Specifically, for each cloud resource in the candidate list of resources to be recycled, the Prometheus monitoring system collects its CPU utilization, memory utilization, disk I / O rate, network bandwidth and other indicator data in the last 30 days, and collects them every 5 minutes to form a time series data set. The DTW algorithm is used to calculate the distance matrix between the real-time usage data and the historical resource change data, and the distance value is input into the SVM classification model as a feature vector. The model is trained and evaluated by 10-fold cross validation. When the matching degree is lower than 0.75, the GraphQL interface of the CMDB system is used to query the metadata such as the business owner, application system, and service level of the resource. The graph-based Neo4j database is used to model and store the resource-business relationship. The Cypher query language is used to realize the rapid retrieval and aggregation analysis of the associated data. If it is found that the service level of the business demand of the cloud resource has changed significantly, such as the service level changes from Gold to Silver, it means that the influencing factor is the business demand, and the cloud resource is removed from the candidate list of resources to be recycled. For cloud resources of different service levels, differentiated waiting periods for cloud resource recycling are set, 30 days for Gold resources, 15 days for Silver resources, and 7 days for Bronze resources. At the same time, the ARIMA time series model is used to predict the resource utilization trend and dynamically set the recycling threshold. When the average resource utilization in the next 7 days is predicted to be higher than 30%, the waiting period is automatically extended by 7 days. For resources that exceed the waiting period and whose utilization rate is continuously lower than 20%, a notification of pending recycling is sent to the department to which the resource belongs through the Kafka message queue to trigger the automated approval process. The dynamic allocation and scheduling of approval tasks are realized based on the Activiti workflow engine, and the approval timeout is set to 1 working day. If the approval fails or times out, the recycling plan is automatically canceled. If the approval passes, the recycling task is submitted to the Ansible automated operation and maintenance platform for execution. The standard steps and interface calls for recycling operations are defined through playbooks to automatically complete the release and recycling of resources during the off-peak period of business.

[0057] In some of the embodiments, a K-means clustering algorithm is used to divide inactive cloud resources into different cloud resource sets, and to divide long-term idle cloud resource sets and cloud resource sets with low resource utilization into candidate lists of resources to be recycled, including:

[0058] Obtaining configuration parameters and historical real-time usage data of the inactive cloud resources;

[0059] Based on the configuration parameters and real-time usage data, a multi-dimensional evaluation system is established by using time series analysis and correlation analysis. The multi-dimensional evaluation system is used to determine a set of cloud resources that are idle for a long time.

[0060] In this embodiment, the configuration parameters and historical real-time usage data of inactive cloud resources are obtained, and a multi-dimensional evaluation system is established through time series analysis and correlation analysis to provide a quantitative basis for judging whether resources are idle for a long time. When constructing the evaluation system, dimensionality reduction methods such as principal component analysis (PCA) can be introduced to extract a few principal components that best characterize resource utilization from a large number of resource configuration parameters and real-time usage data, reduce data noise and redundancy, and improve the efficiency and accuracy of subsequent analysis. For the historical resource utilization data of each cloud resource, time series analysis techniques such as STL decomposition are used to extract the periodic pattern and long-term trend of resource utilization. STL decomposition decomposes the time series into seasonal terms, trend terms, and residual terms through the Loess smoothing method. The decomposition results can be used to characterize the periodic laws (such as daily, weekly, monthly, etc.) and long-term change trends (such as growth, decline, stability, etc.) of resource utilization. Based on this, we can judge whether the idleness of cloud resources is a periodic fluctuation or a long-term trend. For periodically idle cloud resources, we can dynamically adjust resource configuration based on actual operating needs to achieve elastic scaling and reuse of cloud resources. For resources that have not been used for a long time, we will include them in the candidate list of resources to be recycled.

[0061] Specifically, when constructing the resource utilization evaluation system, the 20 resource configuration parameters and consumption indicators collected were reduced in dimension through principal component analysis (PCA), and the first three principal components with cumulative variance contribution rate of 80% were selected as evaluation indicators, among which the first principal component was the weighted sum of CPU utilization and memory utilization, with weights of 0.6 and 0.4 respectively; the second principal component was the weighted sum of disk I / O rate and network bandwidth, with weights of 0.7 and 0.3 respectively; the third principal component was the average task waiting time. The STL decomposition algorithm was used to analyze the CPU utilization time series of a resource in the past month, and it was found that there was an obvious periodic law, and the period was 7 days, that is, the weekly CPU utilization change trend of the resource was basically the same, but the long-term trend was stable with a decrease, and it could be included in the candidate list of resources to be recycled.

[0062] S400, obtaining a density index of each cloud resource in the to-be-reclaimed resource list, determining a recycling priority of each cloud resource based on a resource type of each cloud resource and the density index, and determining different to-be-reclaimed resource queues based on the resource type and the recycling priority;

[0063] In some embodiments, the above step S400 includes:

[0064] Calculate the resource utilization level of each cloud resource in the to-be-reclaimed resource list in different time periods, use a time series analysis algorithm and a clustering algorithm to quantitatively score and sort the historical resource utilization levels of the cloud resources, and obtain a density index of each cloud resource, where the resource utilization level is the average and peak value of the resource utilization rate in different time periods, and the density index is the frequency of use of the cloud resources;

[0065] Based on the density index and resource type, a decision analysis method is used to weight the factors affecting cloud resource recovery to obtain weight coefficients of different factors, where the factors include resource utilization, business importance, and cost-effectiveness, and the resource types include core resources and non-core resources;

[0066] Based on the weight coefficient, obtaining the recycling priority of each cloud resource;

[0067] Different queues of resources to be recycled are set in the list of resources to be recycled according to resource types and recycling priorities.

[0068] In this embodiment, statistical charts such as box-and-whisker plots are introduced to intuitively display the distribution of resource utilization, and the differences in utilization distribution of different cloud resources are identified through statistics such as quartiles and outliers. At the same time, anomaly detection algorithms such as local outlier factor (LOF) are used to detect and quantify local outliers in resource utilization as a supplementary indicator for density assessment.

[0069] In this embodiment, according to the density index of resource utilization and resource type, a combination of multi-level queues and priority queues is used to classify and prioritize the resources to be recycled. Specifically, decision analysis methods such as the analytic hierarchy process (AHP) are used to compare and calculate the weights of various influencing factors that affect the priority of resource recycling, such as resource utilization, business importance, cost-effectiveness, etc. By constructing a judgment matrix and calculating the consistency ratio, the weight coefficients of different influencing factors are obtained, and the cloud resources are comprehensively scored based on this, and then the recycling priority is obtained. According to the recycling priority and resource type, different queues for resources to be recycled are set in the list of resources to be recycled. For example, high-density, core-type resources are placed in a high-priority queue; low-density, non-core-type resources are placed in a low-priority queue, forming a differentiated queue system for resources to be recycled.

[0070] In some embodiments, in the process of executing resource recovery, the Queue-Worker mode and the producer-consumer model are adopted, and the message queue middleware such as Kafka and RabbitMQ are used to deliver the resources to be recovered as tasks to the corresponding recovery queue. The tasks in the queue are continuously consumed by the background Worker process, and the release and recovery operations of resources are performed in order of priority, ensuring the priority recovery of high-priority resources and the orderly recovery of low-priority resources, thereby improving the efficiency and response speed of resource recovery. At the same time, container orchestration platforms such as Kubernetes are introduced to encapsulate the resources to be recovered as Pod or Deployment, and through mechanisms such as Label Selector and Horizontal Pod Autoscaler (HPA), dynamic scheduling and elastic scaling of resources are realized. In addition, service grid platforms such as Istio are also used to monitor and control the network traffic in the resource recovery process in a fine-grained manner, so as to realize the smooth transition and lossless switching of the recovery operation. In addition, a distributed lock mechanism based on Lease is introduced to ensure the consistency and mutual exclusivity of the same resource during concurrent recovery.

[0071] Specifically, the key indicators of resources such as CPU utilization and memory utilization are obtained through monitoring systems such as Zabbix. Data is collected every 5 minutes for 30 consecutive days to form a time series data set. The Prophet algorithm is used to preprocess and model the data. By setting parameters such as seasonality and holidays, a prediction model for resource utilization is trained, and the average and peak values ​​of resource utilization of each cloud resource are calculated. The resource utilization of different cloud resources is clustered using the K-means clustering algorithm. The density index of each cloud resource is defined as the average Euclidean distance between each cluster center, and the abnormal index LOF of each cloud resource is calculated. If the LOF is greater than 1.5, it is marked as an abnormal resource. When determining the recycling priority of resources, a three-layer indicator system is constructed through the AHP hierarchical analysis method, including the resource layer, business layer, and cost layer. Five experts are invited to compare the indicators in pairs to obtain a judgment matrix, calculate CR=0.05<0.1, and pass the consistency test. The weight of the indicator is calculated by weighting factors such as resource utilization and business importance to obtain a comprehensive weight coefficient. The first 20% of resources are put into the high priority queue, and the last 30% are put into the low priority queue. When performing resource recycling, the Kafka message queue is used as the Task queue, and the resources to be recycled are pushed to the queue according to priority. 10 Worker processes are started to consume the queue. Each Worker processes one task at a time. Through the Kubernetes API interface, the Pod to be recycled is added with a -recycling label, and the number of copies is reduced to 0. Istio is used to perform blue-green release of the recycling process. After all the new version Pods are started, the traffic is switched to the new version. The key information of the resource recycling process is recorded using blockchain technology. Each recycling generates a block, and the block header contains the hash value of the previous block to ensure data consistency and immutability.

[0072] S500, performing dependency analysis on the resources to be recycled in the recycling resource queue, obtaining recyclable resources, detecting the safety of the recyclable resources, generating a safety detection report, and executing a recycling task based on the safety detection report;

[0073] In some embodiments, the step S500 includes:

[0074] Obtain configuration parameters of the resources to be recycled, establish a resource dependency graph, calculate weights of different dependencies, calculate risk scores for resource recycling based on the weights, and determine recyclable resources based on the risk scores, wherein the resource dependency graph includes dependencies between the resources to be recycled and other cloud resources and dependencies between the resources to be recycled and business requirements;

[0075] For recyclable resources, chaos engineering methods are used to inject faults and simulate attacks on the recyclable resources. Fuzz testing technology is used to generate multiple abnormal test data to test the hidden security vulnerabilities of cloud resources and generate security detection reports. The abnormal test data includes random data and deformed data.

[0076] A classification algorithm is used to establish a resource recovery security discrimination model, the security detection report is input into the resource recovery security discrimination model, an execution report is output, and based on the execution report, the recovery task is executed, and the recovery task includes terminating virtual machine instances, deleting storage volumes, releasing IP addresses and unloading hard disk space.

[0077] In this embodiment, for each recyclable resource in the queue of resources to be recycled, the configuration parameters of the resource are obtained from the configuration management database (CMDB). The configuration parameters include metadata such as resource type, specification, network topology, storage mapping, access rights, etc. A resource dependency graph is established through the graph database Neo4j, and complex path matching and relationship queries are designed using the Cypher query language to discover the multi-level dependency between the resources to be recycled and other resources or business needs, and calculate the weights between the dependencies. Anomaly detection algorithms based on time series, such as STL decomposition, ARIMA, etc., are used to model and predict the key indicator data of business needs according to the weights to determine whether the impact of resource recycling on business needs exceeds the normal range. The acquisition of key indicators of business needs is achieved by calling the API interface of the cloud computing platform to obtain the instance list of the business, load balancing strategy, failover mechanism and other operating information.

[0078] In addition, collaborative filtering algorithms based on matrix decomposition, such as SVD and NMF, are used to analyze the correlation and similarity between the resources to be recycled and other resources or business needs, predict the potential impact of resource recycling on non-directly related business needs and other cloud resources, evaluate the overall impact of resource recycling on the availability and continuity of the cloud computing platform, design risk measurement indicators, such as fault recovery time, and calculate the risk score of executing the recycling task.

[0079] For resources whose risk scores exceed the preset threshold, the recycling operation is performed, and the predefined security check process is triggered. Specifically, the automated operation and maintenance platform such as Ansible or Salt is called to execute a series of check scripts and commands, and the chaos engineering method is used to inject faults and simulate attacks on the recycled resources, such as randomly terminating processes, occupying CPU and memory, tampering with network data packets, etc., so as to obtain the self-recovery ability and fault-tolerant mechanism of cloud resources and verify the high availability and data consistency of business requirements. At the same time, fuzz testing technology is used to automatically generate a large amount of random or deformed test data, design reasonable test indicators and thresholds, such as the number of concurrent users, request response time, etc., comprehensively evaluate the impact of resource recycling on the performance and stability of the cloud computing judgment platform, discover hidden security vulnerabilities and extreme situations, and generate detailed security inspection reports.

[0080] In addition, the security inspection report is input into the resource recovery security discrimination model. Specifically, the commonly used classification algorithms such as decision trees and random forests are used to train the resource recovery security discrimination model based on historical resource recovery data and security inspection reports. The resource recovery security discrimination model is continuously optimized and updated by incremental learning and online learning, and the key features and rules that affect the decision are analyzed by model interpretability methods such as LIME and SHAP to improve the transparency and credibility of the decision. According to the predefined decision rules and risk thresholds, the security and feasibility of the resource recovery operation are automatically judged. For resources that are confirmed to be safe and correct, an execution report is output, and the decision basis and process are recorded to form a traceable audit log. Based on the execution report, the recovery task is executed. Specifically, the API interface provided by the cloud computing platform is called, such as the RESTAPI of AWS EC2, S3, VPC and other services, and the recovery task is executed using SDK or command line tools. The recovery task includes terminating virtual machine instances, deleting storage volumes, releasing elastic IP addresses, uninstalling unused hard disk space, etc. The atomicity and consistency of the recovery operation are ensured through the retry mechanism and exception handling.

[0081] Specifically, when analyzing the dependency relationship of the recyclable resources, the resource dependency graph is constructed through the Neo4j graph database, the shortest path and all paths between resource nodes are matched using the Cypher query language, and the average length of the path is calculated as the complexity measure of the dependency relationship. When evaluating the risk of resource recycling, the STL decomposition algorithm is used to decompose the seasonal trend of the service response time, the seasonal cycle is set to 7 days, the abnormal time point is automatically detected by the 3σ principle, and the severity of the abnormality is calculated using the Z-score normalization method. The SVD-based collaborative filtering algorithm is used, and the service resource call matrix is ​​used to perform matrix decomposition through the alternating least squares method to obtain the implicit association between the recyclable resources and other resources or business needs. If the correlation coefficient is greater than 0.8, it is considered that the cloud resource recycling will have a collateral impact, and the cloud resource is deleted from the queue of recyclable resources. When performing security checks on recyclable resources, the Ansible script is used to randomly trigger the downtime or restart of the virtual machine to be recycled, and the availability of related services is checked through the Prometheus monitoring panel. If it is not restored after three restarts within 1 minute, the continuity of business needs is determined. Using the AFL-based Fuzz testing tool, we treat abnormal data packets requested by the load balancer for recycling. If the request delay time exceeds 1s or a 5XX error is returned, it is considered that there is a potential buffer overflow vulnerability. When making automated decisions, we use the LightGBM algorithm to train a binary classification model for recycling security, and use 5-fold cross validation. The accuracy of the final model reaches more than 95%. Using SHAP values ​​to explain the model results, we find that resource type, request QPS, utilization, etc. are key features that affect recycling decisions.

[0082] S600, obtaining resource change data of the cloud computing platform after executing the recycling task, using a support vector machine algorithm to establish a resource recycling effect prediction model, and dynamically adjusting the resource recycling priority based on the resource recycling effect prediction model;

[0083] In this embodiment, a support vector machine (SVM) algorithm is used, resource change data is used as a feature vector, and whether or not to recycle is used as a binary label to train a resource recovery effect prediction model. Specifically, a nested cross-validation method is used to divide resource change data into a training set, a validation set, and a test set. The outer loop performs model evaluation, and the inner loop performs parameter optimization to avoid information leakage in parameter selection and model evaluation, thereby obtaining a resource recovery effect prediction model with optimal generalization performance. Based on the resource recovery effect prediction model, the state change information of the resource to be recovered is predicted in real time to obtain its state change trend and effect score after recovery, and then dynamically adjust the resource recovery priority, give priority to recycling cloud resources with better prediction effects, postpone recycling cloud resources with average prediction effects, and postpone recycling cloud resources with poor prediction effects. Through continuous prediction and feedback optimization, the accuracy and efficiency of cloud resource recovery are improved.

[0084] In some embodiments, an online learning mechanism is used to perform real-time sampling and incremental training of resource change data after recycling, and the resource recycling effect prediction model is updated regularly to adapt to changing business needs and workloads. At the same time, an active learning strategy is used to actively label and learn samples with low prediction confidence. On the selected samples, their true categories are actively labeled, such as through manual review, expert consultation, etc., and they are added to the training set to improve the prediction accuracy and robustness of the model.

[0085] Specifically, the Min-Max normalization method is used to non-dimensionalize the resource change data as feature vectors to eliminate the impact of different indicator dimensions. A binary classification model is constructed based on the SVM algorithm to divide the recycling effect into positive and negative categories. The model hyperparameters are optimized using grid search and 5-fold cross validation. The search range is: linear kernel, RBF kernel, C takes 0.1, 1, 10, 100, and γ takes 5 orders of magnitude between 1e-2 and 1e2. Finally, a resource recycling effect prediction model with an F1 value of 0.92 on the test set is obtained. For recycled resources, their recycling effect is predicted in real time. If it is a positive effect and the confidence is greater than 0.8, it is included in the high-priority recycling queue. If it is a negative effect and the confidence is greater than 0.8, it is included in the low-priority delayed recycling queue. For resources with a confidence between 0.4 and 0.6, an active learning strategy is adopted, and 7 experts vote to manually label them and iteratively optimize the model.

[0086] S700: Acquire an abnormal situation during the execution of a recycling task, and execute an intervention strategy based on the abnormal situation.

[0087] In some embodiments, the step S700 includes:

[0088] Record the execution data of the recovery task in real time, including execution log and monitoring data;

[0089] Based on the execution data, anomaly detection and fault diagnosis are performed on key links in the execution process of the recycling task through a machine learning algorithm to obtain abnormal conditions in the execution process of the recycling task, wherein the key links include API calls and network transmission, and the abnormal conditions include API call failures and network delay problems;

[0090] Based on the abnormal situation, an abnormal alarm and a diagnostic report are generated, a predefined abnormal handling process and a fault recovery mechanism are triggered, and an intervention policy is executed, wherein the intervention policy includes manual intervention and automatic intervention.

[0091] In this embodiment, the execution log and monitoring data of the recovery task are recorded in real time, and the key links of the recovery task execution process are detected and diagnosed through machine learning algorithms, including API calls and network delays. Specifically, for the API call link, classification models such as logistic regression and decision trees are used, and key information of requests and responses is extracted through feature engineering, and abnormal classifiers are trained to identify abnormal situations of API call failures; for the network transmission link, time series models such as sliding windows and EWMA are used, and the thresholds and laws of abnormalities are learned through the statistical characteristics of historical data, so as to identify abnormal situations of network delays. As a result, this embodiment can timely discover and locate abnormal behaviors and potential risks in the recovery process, automatically generate abnormal alarms and diagnostic reports, trigger predefined abnormal handling processes and fault recovery mechanisms, and ensure the stability and continuity of resource recovery. Specifically, a monitoring dashboard for the recovery task process is established, and distributed message queues such as Kafka are used to achieve high throughput and low latency transmission of monitoring data; stream processing engines such as Flink are used to perform real-time aggregation, statistics and other calculations on monitoring data; memory databases such as Redis are used to achieve fast query and display of the monitoring dashboard; and time series databases such as Prometheus are used to achieve persistent storage and aggregation analysis of monitoring data. Through real-time computing and stream processing technology, the execution progress of the recovery task, the change trend of the corresponding data of the key links, etc. are summarized and displayed in real time; at the same time, a multi-level monitoring and alarm system is established, and differentiated alarm strategies and notification methods are set according to the severity and impact range of the abnormality. The entire monitoring platform needs to follow the design principles of high availability, scalability, and maintainability, and ensure stability through multiple copies, load balancing, failover and other mechanisms. Based on the alarm strategy and notification method, the corresponding intervention policy is executed. This embodiment provides the administrator's manual intervention function in the user interface, allowing the administrator to customize and adjust the recovery strategy of special resources according to actual business needs and cloud resource usage, such as extending the recovery waiting time, setting resource reservation quotas, excluding specific resources, etc.

[0092] In addition, special optimizations are carried out for common abnormal situations such as API call failures and network delays on cloud computing platforms. For example, idempotence design is performed on API requests to avoid inconsistent resource status caused by API call failures through unique request IDs and retry mechanisms; network transmission is optimized, such as using connection pools, asynchronous I / O and other technologies to reduce the impact of network delays on resource recovery efficiency.

[0093] Specifically, by collecting real-time monitoring data of virtual machines, networks and other resources, such as CPU utilization, memory utilization, disk I / O, network throughput and other indicators, every 5 seconds, a time series data set is constructed. Using unsupervised learning algorithms such as One-classSVM, through mathematical methods such as radial basis kernel function mapping and support vector solution, a multi-dimensional baseline model of resource abnormal behavior is established, and abnormal detection and alarm are performed on data points that are more than 3 standard deviations away from the abnormal baseline within 3 consecutive observation cycles. If it is not recovered within 10 minutes, the automated fault diagnosis and recovery process is triggered. Based on the attributes such as abnormal resource type and alarm level, classification algorithms such as decision trees are used to learn the best path for fault diagnosis and recovery, and achieve an accuracy rate of more than 95% in comprehensive indicators such as fault self-healing time, accuracy rate, and business impact. Kafka is used to build an asynchronous peak-shaving and valley-filling monitoring data bus, combined with incremental computing models such as Flink sliding windows and Bloom filters to achieve quasi-real-time analysis of massive monitoring data. Through visualization tools such as Prometheus and Grafana, a unified monitoring screen across regions and resource types is implemented. More than 90% of abnormal situations can be discovered within 1 minute.

[0094] In one embodiment, the cloud resource intelligent recovery method further includes:

[0095] Categorize and aggregate real-time usage data to build cloud resource data sets;

[0096] Based on the cloud resource data set, calculating resource utilization of each cloud resource, the resource utilization including CPU utilization, memory utilization and network bandwidth utilization;

[0097] Establishing a multi-dimensional monitoring view based on resource utilization, wherein the multi-dimensional monitoring view is used to monitor the usage data of the key resources;

[0098] Based on the timestamp information of resource allocation and release and the multi-dimensional monitoring view, a resource demand change prediction model is established. The resource demand change prediction model is used to predict the demand for cloud resources within a preset time and generate a cloud resource scheduling strategy.

[0099] In this embodiment, the real-time usage data of each cloud resource collected in step S100 is classified, sorted and preprocessed, and the preprocessed data is classified and aggregated according to the resource type and time dimension to establish a structured cloud resource data set to provide a data foundation for subsequent analysis and visualization. Among them, the calculation formula for resource utilization is: CPU utilization = (CPU usage time / CPU total time) * 100%, memory utilization = (used memory / total memory) * 100%, network bandwidth utilization = (actual bandwidth / total bandwidth) * 100%. In addition, combined with the relationship between the business type and each cloud resource, a multi-dimensional monitoring view based on resource utilization is established to achieve real-time monitoring and early warning of key resources such as CPU, memory and network bandwidth, and timely discover and solve abnormal resource utilization problems. Specifically, the multi-dimensional monitoring view can be displayed according to dimensions such as business type, resource type, time period, etc., and presented in intuitive visualization methods such as heat maps, line charts, and pie charts.

[0100] Specifically, based on the timestamp information of resource allocation and release, the life cycle and state changes of cloud resources are analyzed, and the time distribution characteristics of each stage of cloud resource application, configuration, use and release are identified to optimize resource scheduling and recovery strategies and improve resource utilization efficiency.

[0101] In addition, the resource utilization of cloud resources is analyzed in association with business demand to determine the correlation coefficient between business demand and resource utilization, and then identify the relationship between business demand and cloud resource demand, where business demand includes the number of concurrent users, the number of requests, etc. The specific method of association analysis is through correlation analysis. Then, a regression analysis method is used to establish a resource demand change prediction model based on the timestamp information of resource allocation and release and the multi-dimensional monitoring view to predict the changes in cloud resource demand brought about by the growth of business demand, and then predict the demand for cloud resources in the future, generate a cloud resource scheduling strategy, schedule and allocate cloud resources in advance, and then realize elastic scaling and on-demand allocation of cloud resources.

[0102] In some embodiments, a cloud resource management data feedback system is established to feed back resource utilization and cloud resource scheduling strategies to the resource management module of the cloud computing platform, automate resource scheduling and configuration adjustment, continuously optimize the resource allocation strategy of the cloud platform, and achieve efficient utilization and cost optimization of cloud resources. Specifically, the implementation scheme of automated resource scheduling and configuration adjustment is to automatically generate resource scheduling and configuration change scripts based on predefined resource configuration templates. By interacting with the API interface of the cloud computing platform, dynamic application, configuration, and release of resources are achieved.

[0103] In some embodiments, a monitoring and auditing strategy for resource scheduling is also established to ensure the compliance and traceability of the scheduling process.

[0104] Specifically, for the collected real-time usage data, the Apache Spark big data processing framework is used for distributed computing and analysis, and Spark SQL is used to clean, transform and aggregate the data, and then the resource utilization of each cloud resource is calculated. For example, for the CPU utilization data within a certain time period, the map Partitions function of Spark RDD can be used to partition the data, and the reduce function is used to calculate the average value in each partition. Finally, the collect function is used to collect the results on the Driver node to obtain the average CPU utilization of the entire time period. The calculation results of resource utilization are stored in the AWSRDS relational database, and the Grafana visualization tool is used to connect to the database to create a multi-dimensional monitoring dashboard, which displays the utilization trend charts and heat maps of different business types and different resource types in real time, so that maintenance personnel can find and locate problems in a timely manner. At the same time, the Prophet time series forecasting library is used to model and forecast historical resource utilization data, and the resource demand trend for the next week is predicted by combining the ARIMA model and seasonal factors, and a resource scheduling strategy is generated. For example, when the predicted resource utilization exceeds 80%, the automatic resource expansion mechanism is triggered. By calling the AWSEC2 API interface, a new virtual machine instance is dynamically created and added to the Auto Scaling group to achieve elastic scaling of cloud resources. Finally, the LSTM neural network model is built through the Keras deep learning framework, and the business indicator data and resource utilization data are used as feature inputs to train the multivariate time series forecasting model to achieve correlation analysis and prediction of resource utilization and business indicators. When the business growth reaches a certain threshold, the resource expansion is triggered in advance to ensure the smooth operation of the business.

[0105] See also Figure 2 The present invention also provides a cloud resource intelligent recovery system, the system comprising:

[0106] The first processing module is used to obtain real-time usage data of the cloud computing platform, wherein the real-time usage data includes usage data of key resources and timestamps of allocation and release of cloud resources, and the key resources include CPU, memory and network bandwidth;

[0107] The second processing module is used to monitor the state change information of cloud resources in real time, obtain resource change data based on the usage data of the key resources and the state change information, determine the state activity information of the cloud resources through the resource change data, and dynamically adjust the granularity and frequency of cloud resource monitoring based on the state activity information, wherein the state change information includes starting, stopping and restarting the cloud resources, and the resource change data includes the real-time usage data before the cloud resources are changed and the real-time usage data after the cloud resources are changed; the state activity information includes active state and inactive state;

[0108] The third processing module is used to obtain a list of resources to be recycled by classifying the cloud resources whose status activity information is inactive;

[0109] The fourth processing module is used to obtain the density index of each cloud resource in the to-be-reclaimed resource list, determine the recovery priority of each cloud resource based on the resource type of the cloud resource and the density index, and determine different to-be-reclaimed resource queues based on the resource type and the recovery priority, wherein the resource type includes a core type and a non-core type, and the density index is the frequency of use of the cloud resource;

[0110] The fifth processing module: performs dependency analysis on the resources to be recycled in the recycling resource queue, obtains recyclable resources, detects the security of the recyclable resources, generates a security detection report, and executes recycling tasks based on the security detection report, wherein the recycling tasks include terminating virtual machine instances, deleting storage volumes, releasing IP addresses, and uninstalling hard disk space;

[0111] The sixth processing module is used to obtain resource change data of the cloud computing platform after executing the recycling task, use the support vector machine algorithm to establish a resource recycling effect prediction model, and dynamically adjust the resource recycling priority based on the resource recycling effect prediction model;

[0112] The seventh processing module is used to obtain abnormal conditions during the execution of the recycling task, and execute intervention strategies based on the abnormal conditions, wherein the abnormal conditions include API call failures and network delay problems, and the intervention strategies include manual intervention and automatic intervention.

[0113] It is understandable that if Figure 1 The contents of the cloud resource intelligent recycling method embodiment shown in the figure are applicable to the cloud resource intelligent recycling system embodiment. The functions specifically implemented by the cloud resource intelligent recycling system embodiment are similar to those in the example Figure 1 The cloud resource intelligent recycling method embodiment shown is the same as that shown in FIG. Figure 1 The beneficial effects achieved by the cloud resource intelligent recovery method embodiment shown are also the same.

[0114] See also Figure 3 The embodiment of the present invention further provides a terminal device 3, comprising: a memory 302 and a processor 301 and a computer program 303 stored in the memory 302. When the computer program 303 is executed on the processor 301, a cloud resource intelligent recycling method as described in any one of the above methods is implemented.

[0115] The terminal device 3 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device 3 may include, but is not limited to, a processor 301 and a memory 302. Those skilled in the art will appreciate that Figure 3 It is only an example of the terminal device 3 and does not constitute a limitation on the terminal device 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.

[0116] The processor 301 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0117] In some embodiments, the memory 302 may be an internal storage unit of the terminal device 3, such as a hard disk or memory of the terminal device 3. In other embodiments, the memory 302 may also be an external storage device of the terminal device 3, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the terminal device 3. Further, the memory 302 may also include both an internal storage unit of the terminal device 3 and an external storage device. The memory 302 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program, etc. The memory 302 may also be used to temporarily store data that has been output or is to be output.

[0118] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A cloud resource intelligent recovery method, characterized in that: The method comprises: Acquire real-time usage data of the cloud computing platform, wherein the real-time usage data includes usage data of key resources and timestamps of allocation and release of cloud resources, wherein the key resources include CPU, memory and network bandwidth; Monitor the state change information of cloud resources in real time, obtain resource change data based on the usage data of the key resources and the state change information, and determine the state activity information of the cloud resources through the resource change data, wherein the state change information includes starting, stopping and restarting the cloud resources, the resource change data includes the real-time usage data before the cloud resources are changed and the real-time usage data after the cloud resources are changed, and the state activity information includes active state and inactive state; Obtain a list of resources to be recycled by classifying the cloud resources whose status activity information is in an inactive state; Obtaining a density index of each cloud resource in the to-be-reclaimed resource list, determining a recycling priority of each cloud resource based on a resource type of the cloud resource and the density index, and determining different to-be-reclaimed resource queues based on the resource type and the recycling priority, wherein the resource type includes a core type and a non-core type, and the density index is a frequency of use of the cloud resource; Perform dependency analysis on the resources to be recycled in the recycling resource queue, obtain recyclable resources, detect the security of the recyclable resources, generate a security detection report, and execute recycling tasks based on the security detection report, wherein the recycling tasks include terminating virtual machine instances, deleting storage volumes, releasing IP addresses, and uninstalling hard disk space; Obtain resource change data of the cloud computing platform after executing the recycling task, use a support vector machine algorithm to establish a resource recycling effect prediction model, and dynamically adjust the resource recycling priority based on the resource recycling effect prediction model; Acquire abnormal conditions during the execution of the recycling task, and execute intervention strategies based on the abnormal conditions, wherein the abnormal conditions include API call failures and network delay problems, and the intervention strategies include manual intervention and automatic intervention; The step of classifying the cloud resources whose status activity information is in an inactive state to obtain a list of resources to be recycled includes: Using the K-means clustering algorithm, inactive cloud resources are divided into different cloud resource sets, and long-term idle cloud resource sets and cloud resource sets with low resource utilization are divided into candidate lists of resources to be recycled; Acquire historical resource change data and real-time usage data of the cloud resources in the candidate list of resources to be recycled; Based on the historical resource change data and the real-time usage data, a time series analysis algorithm is used to establish a similarity matching model, wherein the similarity matching model is used to obtain the matching degree between the real-time usage data of the cloud resources and the historical resource change data; If the matching degree reaches a preset matching degree threshold, a business impact analysis method is used to classify and rate the business of the cloud resources, set recycling waiting periods for cloud resources of different levels, establish a dynamic adjustment mechanism for the waiting period, and determine a list of resources to be recycled; If the matching degree is lower than the preset matching degree threshold, analyze whether the factor causing the change in the state of the cloud resources is a business demand. If the factor causing the change in the state of the cloud resources is a business demand, remove the cloud resources with the changed state from the candidate list of resources to be recycled, and determine the list of resources to be recycled.

2. The method according to claim 1, characterized in that The real-time monitoring of the state change information of the cloud resources, acquiring the resource change data based on the usage data of the key resources and the state change information, and generating the state activity information of the cloud resources through the resource change data, includes: Using event-driven methods, real-time monitoring of cloud resource status change information, where the status change information includes starting, stopping, and restarting cloud resources; Input the resource change data into the database, and analyze and obtain the usage rate, request frequency and historical usage records of the cloud resources, wherein the resource change data includes the real-time usage data before the cloud resource is changed and the real-time usage data after the cloud resource is changed; The usage rate, request frequency and historical usage records of the cloud resources are used as input features, and a decision tree algorithm is used to establish a multi-layer decision tree model of cloud resource status. The multi-layer decision tree model of cloud resource status is used to determine the status activity information of cloud resources, wherein the status activity information includes active status and inactive status.

3. The method according to claim 2, characterized in that The K-means clustering algorithm is used to divide the inactive cloud resources into different cloud resource sets according to resource utilization, and divide the cloud resource sets that are idle for a long time or have low resource utilization into a candidate list of resources to be recycled, including: Obtaining configuration parameters and historical real-time usage data of the inactive cloud resources; Based on the configuration parameters and real-time usage data, a multi-dimensional evaluation system is established by using time series analysis and correlation analysis. The multi-dimensional evaluation system is used to determine a set of cloud resources that are idle for a long time.

4. The method according to claim 1, characterized in that The obtaining of the density index of each cloud resource in the to-be-reclaimed resource list, determining the recycling priority of each cloud resource based on the resource type of the cloud resource and the density index, and determining different to-be-reclaimed resource queues based on the resource type and the recycling priority, includes: Calculate the resource utilization level of each cloud resource in the to-be-reclaimed resource list in different time periods, use a time series analysis algorithm and a clustering algorithm to quantitatively score and sort the historical resource utilization levels of the cloud resources, and obtain a density index of each cloud resource, where the resource utilization level is the average and peak value of the resource utilization rate in different time periods, and the density index is the frequency of use of the cloud resources; Based on the density index and resource type, a decision analysis method is used to weight the factors affecting cloud resource recovery to obtain weight coefficients of different factors, where the factors include resource utilization, business importance, and cost-effectiveness, and the resource types include core resources and non-core resources; Based on the weight coefficient, obtaining the recycling priority of each cloud resource; Different queues of resources to be recycled are set in the list of resources to be recycled according to the resource type and the recycling priority.

5. The method according to claim 1, characterized in that Perform dependency analysis on the resources to be recycled in the recycling resource queue, obtain recyclable resources, detect the safety of the recyclable resources, generate a safety detection report, and execute a recycling task based on the safety detection report, including: Obtain configuration parameters of the resources to be recycled, establish a resource dependency graph, calculate weights of different dependencies, calculate risk scores for resource recycling based on the weights, and determine recyclable resources based on the risk scores, wherein the resource dependency graph includes dependencies between the resources to be recycled and other cloud resources and dependencies between the resources to be recycled and business requirements; For recyclable resources, chaos engineering methods are used to inject faults and simulate attacks on the recyclable resources. Fuzz testing technology is used to generate multiple abnormal test data to test the hidden security vulnerabilities of cloud resources and generate security detection reports. The abnormal test data includes random data and deformed data. A classification algorithm is used to establish a resource recovery security discrimination model, the security detection report is input into the resource recovery security discrimination model, an execution report is output, and based on the execution report, the recovery task is executed, and the recovery task includes terminating virtual machine instances, deleting storage volumes, releasing IP addresses and unloading hard disk space.

6. The method according to claim 1, characterized in that Obtain abnormal conditions during the execution of the recycling task, and execute intervention strategies based on the abnormal conditions, including: Record the execution data of the recovery task in real time, including execution log and monitoring data; Based on the execution data, anomaly detection and fault diagnosis are performed on key links in the execution process of the recycling task through a machine learning algorithm to obtain abnormal conditions in the execution process of the recycling task, wherein the key links include API calls and network transmission, and the abnormal conditions include API call failures and network delay problems; Based on the abnormal situation, an abnormal alarm and a diagnostic report are generated, a predefined abnormal handling process and a fault recovery mechanism are triggered, and an intervention policy is executed, wherein the intervention policy includes manual intervention and automatic intervention.

7. The method according to claim 1, characterized in that The method further comprises: Categorize and aggregate real-time usage data to build cloud resource data sets; Based on the cloud resource data set, calculating resource utilization of each cloud resource, the resource utilization including CPU utilization, memory utilization and network bandwidth utilization; Establishing a multi-dimensional monitoring view based on resource utilization, wherein the multi-dimensional monitoring view is used to monitor the usage data of the key resources; Based on the timestamp information of resource allocation and release and the multi-dimensional monitoring view, a resource demand change prediction model is established. The resource demand change prediction model is used to predict resource demand within a preset time and generate a cloud resource scheduling strategy.

8. A cloud resource intelligent recycling system, characterized in that: The system comprises: The first processing module is used to obtain real-time usage data of the cloud computing platform, wherein the real-time usage data includes usage data of key resources and timestamps of allocation and release of cloud resources, and the key resources include CPU, memory and network bandwidth; The second processing module is used to monitor the state change information of cloud resources in real time, obtain resource change data based on the usage data of the key resources and the state change information, and generate state activity information of cloud resources through the resource change data, wherein the state change information includes starting, stopping and restarting the cloud resources, and the resource change data includes the real-time usage data before the cloud resources are changed and the real-time usage data after the cloud resources are changed; the state activity information includes active state and inactive state; The third processing module is used to obtain a list of resources to be recycled by analyzing the resource utilization of inactive cloud resources; The fourth processing module is used to obtain a density index of resource utilization, set a recycling priority according to resource types and the density index, and set different queues of resources to be recycled in a list of resources to be recycled, wherein the resource types include core types and non-core types, and the density index is the frequency of use of cloud resources; The fifth processing module: performs dependency analysis on the resources to be recycled in the recycling resource queue, obtains recyclable resources, detects the security of the recyclable resources, generates a security detection report, and executes recycling tasks based on the security detection report, wherein the recycling tasks include terminating virtual machine instances, deleting storage volumes, releasing IP addresses, and uninstalling hard disk space; The sixth processing module is used to obtain resource change data of the cloud computing platform after executing the recycling task, use the support vector machine algorithm to establish a resource recycling effect prediction model, and dynamically adjust the resource recycling priority based on the resource recycling effect prediction model; The seventh processing module is used to obtain abnormal conditions during the execution of the recycling task, and execute intervention strategies based on the abnormal conditions, wherein the abnormal conditions include API call failures and network delay problems, and the intervention strategies include manual intervention and automatic intervention; The step of classifying the cloud resources whose status activity information is in an inactive state to obtain a list of resources to be recycled includes: Using the K-means clustering algorithm, inactive cloud resources are divided into different cloud resource sets, and long-term idle cloud resource sets and cloud resource sets with low resource utilization are divided into candidate lists of resources to be recycled; Acquire historical resource change data and real-time usage data of the cloud resources in the candidate list of resources to be recycled; Based on the historical resource change data and the real-time usage data, a time series analysis algorithm is used to establish a similarity matching model, wherein the similarity matching model is used to obtain the matching degree between the real-time usage data of the cloud resources and the historical resource change data; If the matching degree reaches a preset matching degree threshold, a business impact analysis method is used to classify and rate the business of the cloud resources, set recycling waiting periods for cloud resources of different levels, establish a dynamic adjustment mechanism for the waiting period, and determine a list of resources to be recycled; If the matching degree is lower than the preset matching degree threshold, analyze whether the factor causing the change in the state of the cloud resources is a business demand. If the factor causing the change in the state of the cloud resources is a business demand, remove the cloud resources with the changed state from the candidate list of resources to be recycled, and determine the list of resources to be recycled.

9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Storage device and data recovery method thereof, control device and readable storage medium

    CN115905032A

  • Informatization resource processing method and device and computer equipment

    CN116909730A