Cloud platform resource dynamic allocation optimization method and device, equipment and medium
By extracting and decomposing the time-series statistical features of cloud platform resource consumption and business carrying units, and combining a hybrid multi-view predictor and a hierarchical decision engine, the problems of slow response and cascading load identification in the dynamic allocation of cloud platform resources are solved, achieving efficient resource scheduling and cost optimization.
Patent Information
- Application Number
- CN202511560100.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-29
- Publication Date
- 2026-02-06
AI Technical Summary
Existing cloud platform resource dynamic allocation methods are slow to respond or not accurate enough to scaling decisions in scenarios such as sudden traffic, complex service dependencies, and multi-tenant competition. They are also difficult to identify and control cascading loads caused by upstream service propagation and lack modeling of application internal topology and causal relationships.
By acquiring the observation vectors of resource consumption and business carrying units, performing time-series statistical feature extraction and causal decomposition, and combining a hybrid multi-view predictor and a hierarchical decision engine, we can achieve multi-timescale prediction and resource scheduling of resource consumption and business carrying units, identify propagation sources and paths, perform real-time scaling and long-term planning, and optimize resource allocation.
It improved resource utilization efficiency, reduced overall default risk, reduced resource waste and delay propagation, and achieved second-level response capability and overall cost optimization across services and nodes.
Smart Images

Figure CN121486450A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of resource management technology, and in particular relates to a method, apparatus, equipment and medium for dynamic allocation and optimization of cloud platform resources. Background Technology
[0002] With the development of cloud computing and container orchestration technologies, various cloud platform resource dynamic allocation technologies have emerged. By predicting or monitoring system load, these technologies dynamically adjust the configuration of computing, storage, and network resources according to business needs, thereby reducing resource costs while ensuring service quality (SLA).
[0003] In traditional cloud resource dynamic allocation methods, the common practice is to use fixed thresholds or simple statistical prediction models, such as ARIMA and LSTM, to analyze single-dimensional indicators such as CPU and memory, and to perform scaling operations through control loop mechanisms. Under normal load conditions, this can maintain service availability well, but in scenarios such as sudden traffic, complex service dependencies, and multi-tenant contention, scaling decisions are often slow to respond or not accurate enough.
[0004] However, the above methods and predictive models are not adaptable enough to sudden loads and concept drift. They are prone to over-provisioning or under-provisioning of resources when business patterns or access behaviors change abruptly. They lack modeling of the internal topology and causal relationships of the application and rely only on multi-dimensional monitoring indicators, making it difficult to identify and control cascading loads caused by upstream service propagation. Summary of the Invention
[0005] Therefore, it is necessary to provide a method, apparatus, device, and medium for dynamic allocation optimization of cloud platform resources that can combine causal analysis, hierarchical decision-making, and adaptive optimization to address the above-mentioned technical problems.
[0006] Firstly, this application provides a method for dynamically allocating and optimizing cloud platform resources, including:
[0007] The observation vectors of each resource consumption and service carrying unit are obtained, and the time-series statistical features of the observation vectors are extracted to obtain a time-series resource library. The time-series resource library includes the observation vectors and time-series features corresponding to each resource consumption and service carrying unit. The observation vectors include the request rate, latency, CPU utilization, memory utilization and network traffic corresponding to each time step. The resource consumption and service carrying unit include the service and its corresponding container.
[0008] Based on the preset service scheduling diagram, the time series resource library is input into the pre-trained causal decomposition model to obtain the causal analysis results; the causal decomposition model performs causal decomposition processing on each resource consumption and business carrying unit; the causal decomposition processing includes decomposing the observation vector into baseline, overall trend, seasonal characteristics and residuals according to the time series characteristics, and identifying the propagation source and propagation path of the residuals;
[0009] Based on the exogenous signals of the hybrid multi-view predictor and cloud platform, resource consumption and service carrying units are predicted at multiple time scales according to the causal analysis results and observation vectors, resulting in multi-scale prediction results. The multi-scale prediction results include short-term prediction, medium- and long-term prediction and their corresponding uncertainties.
[0010] Based on the cold start time distribution of each resource consumption and business carrying unit, predictive instantaneous resources are determined according to short-term forecasts and their uncertainties, resulting in the instantaneous resource pool allocation. The predictive instantaneous resources are preheating containers allocated in the instantaneous resource pool based on short-term forecasts and default risks.
[0011] Based on the causal analysis results, multi-scale prediction results, and instantaneous resource pool allocation results, a hierarchical decision engine is used to make resource allocation decisions and obtain resource scheduling instructions. The hierarchical decision engine includes local short-cycle scaling control and global medium- and long-term planning. The resource scheduling instructions include instant scaling actions, node expansion and contraction actions, long-term node allocation, and instantaneous resource pool invocation instructions.
[0012] In one embodiment, based on a preset service scheduling graph, a time-series resource library is input into a pre-trained causal decomposition model to obtain causal analysis results, including:
[0013] The observation vector is decomposed at multiple time scales based on the time step to obtain the baseline, overall trend, seasonal characteristics and residuals;
[0014] Based on the service call graph, causal relationship identification is used to determine whether the residual is caused by upstream resource consumption and the service of the business carrying unit. If it is determined that the service is the cause, the propagation source, propagation path and propagation probability are extracted to obtain the causal influence chain analysis results.
[0015] Anomaly outbreaks are identified based on the residuals, resulting in anomaly outbreak markers and their uncertainties.
[0016] The causal analysis results are obtained based on the causal influence chain analysis results, the abnormal sudden occurrence markers, and their uncertainties.
[0017] In one embodiment, the hybrid multi-view predictor includes a long-term trend branch, a seasonal branch, and a short-term burst branch;
[0018] Based on exogenous signals from a hybrid multi-view predictor and a cloud platform, resource consumption and service carrying units are predicted at multiple time scales according to causal analysis results and observation vectors, yielding multi-scale prediction results, including:
[0019] The long-term trend branch uses a long-term series forecasting model to make low-frequency trend forecasts based on the baseline and the overall trend, resulting in medium- and long-term forecasts and their uncertainties; the medium- and long-term forecasts include medium- and long-term load and resource demand.
[0020] The seasonal branch performs seasonal modeling based on seasonal characteristics and predicts periodic components, thus obtaining seasonal forecasts and their uncertainties.
[0021] The short-term burst branch uses a short-term prediction model to predict short-term bursts based on residuals, causal chain analysis results, and abnormal burst markers and their uncertainties, thereby obtaining the short-term burst load and its uncertainty.
[0022] By weighting and fusing medium- and long-term forecasts, seasonal forecasts, and short-term sudden loads according to time scale and uncertainty, multi-scale forecast results and their overall uncertainty are obtained.
[0023] In one embodiment, the hybrid multi-view predictor further includes a meta-learning layer, and the method further includes:
[0024] When new resource consumption and service carrying units appear in the service scheduling graph, the short-term burst branch is quickly fine-tuned based on the observation vector corresponding to the new resource consumption and service carrying unit, and the short-term prediction model parameters of the short-term burst branch are obtained after fine-tuning. The meta-model is a MAML initialization model trained on offline historical cluster tracking data.
[0025] Evaluate the predictive performance of the fine-tuned short-term forecasting model and adjust its confidence level based on the online error.
[0026] In one embodiment, based on the distribution of cold start times of each resource consumption and service carrying unit, predictive instantaneous resources are determined according to short-term forecasts and their uncertainties to obtain the instantaneous resource pool allocation result, including:
[0027] Based on minimizing the instantaneous resource pool maintenance cost and expected SLA default loss, the reserved resources in the instantaneous resource pool for each resource consumption and business carrying unit are obtained by using short-term forecasts and their uncertainties.
[0028] When the causal chain analysis results indicate the existence of a propagation source, the reserved resources are converted into preheating containers based on the cold start time distribution of the resource consumption and service carrying units corresponding to the propagation source, and the preheating containers are allocated to the resource consumption and service carrying units corresponding to the propagation source to obtain the instantaneous resource pool allocation results.
[0029] In one embodiment, based on causal analysis results, multi-scale prediction results, and instantaneous resource pool allocation results, a hierarchical decision engine is used to make resource allocation decisions, resulting in resource scheduling instructions, including:
[0030] Within a preset short decision-making cycle, the local controller determines the horizontal scaling action based on short-term predictions, causal analysis results, and instantaneous pool allocation results, thus obtaining instantaneous scaling instructions. The local controller adopts a lightweight reinforcement learning strategy based on policy networks. Instantaneous scaling instructions include expanding containers of resource consumption and service carrying units, shrinking containers of resource consumption and service carrying units, and routing requests to the instantaneous resource pool.
[0031] Within a pre-set long decision-making period, the global planner uses medium- and long-term forecasts, service call graphs, resource consumption and resources corresponding to business carrying units to obtain node scaling actions and long-term placement node allocation; the global planner uses an integer linear programming model to solve the constrained placement node and node scaling optimization problem to determine node switching, service placement and cross-service scheduling strategies.
[0032] Security checks are performed on instant scaling commands, node scaling actions, and long-term node allocations. If the security checks pass, resource scheduling commands are generated. The security checks are also used to determine whether the decisions violate the SLA by using a conservative SLO prediction model and control barrier functions.
[0033] In one embodiment, the global planner obtains the node placement and scaling decisions by solving the following objective function using the following formula:
[0034]
[0035] Where, x i,n Indicates whether to place the container of service i on node n; y n,t Indicates whether node n is enabled; Indicates whether service i uses container resources from the transient resource pool at time t; cost n Cost represents the unit time cost of node n for the service. pod This represents the unit time consumption of a single resource and the time cost of a container that carries the business; pods i This represents the number of containers for service i at a given time, determined by the scaling operation. This indicates the expected cost of defaulting on the Service Scope Agreement (SLA) for service i; fragmentation t This represents the penalty for node resource fragmentation caused by the node placement decision; This represents the p95-delayed observation or prediction value of service i at time t; Let λ represent the p95 delay target for service i; λ and β are weighting coefficients.
[0036] Secondly, this application also provides a cloud platform resource dynamic allocation optimization device, comprising:
[0037] The status monitoring module is used to obtain the observation vectors of each resource consumption and service carrying unit, and to extract the time-series statistical features of the observation vectors to obtain the time-series resource library.
[0038] The causal analysis module is used to input the time-series resource library into the pre-trained causal decomposition model based on the preset service scheduling graph to obtain the causal analysis results;
[0039] The state prediction module is used to predict resource consumption and service carrying units at multiple time scales based on exogenous signals from a hybrid multi-view predictor and cloud platform, according to causal analysis results and observation vectors, and to obtain multi-scale prediction results.
[0040] The instantaneous resource allocation module is used to determine predictive instantaneous resources based on the cold start time distribution of each resource consumption and business carrying unit, according to short-term forecasts and their uncertainties, and obtain the instantaneous resource pool allocation results; the predictive instantaneous resources are preheating containers allocated in the instantaneous resource pool based on short-term forecasts and default risks;
[0041] The global resource scheduling module is used to make resource allocation decisions based on causal analysis results, multi-scale prediction results, and instantaneous resource pool allocation results, and obtain resource scheduling instructions by using a hierarchical decision engine.
[0042] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the above-described cloud platform resource dynamic allocation optimization methods.
[0043] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any of the above-described cloud platform resource dynamic allocation optimization methods.
[0044] The aforementioned cloud platform resource dynamic allocation optimization method, device, equipment, and medium extract time-series statistical features from the observation vectors of each resource consumption and service carrying unit and store them uniformly in a time-series resource library. This solution can transform scattered and noisy monitoring data into searchable and subscribed structured time-series features, providing a high-quality data foundation for causal analysis, prediction, and schedulers, thereby improving overall stability and reproducibility. By decomposing time-series signals according to baseline, overall trend, seasonality, and residuals, and identifying the propagation source and path of residuals based on a preset service scheduling graph, it can distinguish between local fluctuations and cascading loads caused by upstream propagation, thereby reducing downstream blind expansion and resource waste. Using a hybrid multi-view predictor combined with exogenous signals from the cloud platform, predictions and their uncertainties are generated simultaneously at multiple time scales in the short and medium to long term, providing appropriate granular input for different decision-making levels. This enables both rapid response to short-term emergencies and robust medium- to long-term capacity planning. Based on the cold start time distribution of each service and the uncertainty of short-term forecasts, containers are reserved / preheated in the instantaneous resource pool according to the default risk. This allows for a response with extremely low latency when a sudden event occurs, thereby significantly reducing short-term SLA defaults and performance fluctuations caused by cold starts. At the same time, it avoids the continuous costs brought about by long-term static reservations, and balances second-level response capabilities with overall cost / latency optimization across services and nodes. It also avoids the problem of insufficient vision or response caused by single-level decision-making, thereby improving resource utilization efficiency and reducing overall default risk. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 This is a flowchart illustrating the cloud platform resource dynamic allocation optimization method of the present invention;
[0047] Figure 2 This is a flowchart illustrating the steps of step S102.
[0048] Figure 3 This is a flowchart illustrating the steps of step S105.
[0049] Figure 4 This is a structural diagram of the cloud platform resource dynamic allocation optimization device of the present invention. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0051] In one embodiment, such as Figure 1 As shown, a method for dynamic allocation and optimization of cloud platform resources is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, and further to a system including both a terminal and a server, and is implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0052] S101. Obtain the observation vectors of each resource consumption and service carrying unit, and extract the time-series statistical features of the observation vectors to obtain the time-series resource library; the time-series resource library includes the observation vectors and time-series features corresponding to each resource consumption and service carrying unit; the observation vectors include the request rate, latency, CPU utilization, memory utilization and network traffic corresponding to each time step; the resource consumption and service carrying unit includes the service and its corresponding container.
[0053] In a schematic representation, resource consumption and business carrying units refer to application services and their runtime units, such as containers, pods, microVMs, and function instances. Each unit is both a metric for resource usage and a carrier of service-level performance impact. The observation vector is a vector composed of monitoring sample values for each unit at each time step t, including request rate (QPS), several latency metrics, CPU utilization, memory utilization, network traffic / bandwidth, I / O metrics, container startup latency, and metadata related to the unit, such as node location, instance type, tenant / priority identifier, etc. Specifically, raw metrics for each service / container can be collected using standard monitoring / tracing components and stored in a database at a preset sampling frequency. Further, a set of time-series statistical features is calculated for each time series, including moving average and variance, short-term and long-term slopes, moving quantiles, short-term autocorrelation, peak / trough values within the window, mutation rate, cold start sample statistics, and frequency domain features such as major periodic energy. The aforementioned features, together with the original time series, form the recording unit of the time series resource library, and associate it with meta-information such as service topology, instance type, SLA weight, and exogenous event labels, outputting a structured time series database.
[0054] S102. Based on the preset service scheduling diagram, the time series resource library is input into the pre-trained causal decomposition model to obtain the causal analysis results. The causal decomposition model performs causal decomposition processing on each resource consumption and service carrying unit. The causal decomposition processing includes decomposing the observation vector into baseline, overall trend, seasonal characteristics and residuals according to the time series characteristics, and identifying the propagation source and propagation path of the residuals.
[0055] Intuitively, a service scheduling graph is a topological structure describing the call / dependency relationships between services. Nodes in the graph represent services, edges represent call relationships between services, and edge weights characterize call frequency or data traffic, providing structural priors for causal identification. This allows the analysis to link time-series residuals with call relationships between services, distinguishing between local bursts and propagated loads. Specifically, the causal decomposition model decomposes the observation vector of each resource consumption and business unit based on the time-series characteristics in the time-series resource library. The baseline represents the long-term stable level of load, the overall trend is the direction of load change over a longer period, seasonal characteristics are the repeated fluctuations of load with fixed periods, and the residual is the load fluctuation remaining after deducting the baseline, overall trend, and seasonal characteristics. The causal decomposition model performs multi-scale decomposition through the time-series resource library, breaking down the time series into components such as baseline, trend, seasonality, and residuals. Based on the time-series correlation between service call relationships and residuals, it identifies whether the residuals exhibit a propagation pattern in the service topology. If so, it determines candidate sources and possible paths for propagation. Specifically, by analyzing the temporal order of residual occurrences and the numerical correlation of residuals, the initial service generating the residuals (i.e., the propagation source) and the call chain from the propagation source to other services (i.e., the propagation path) are identified. For example, when an increase in latency is detected in a downstream service, the causal decomposition model determines that it is caused by a short-term burst propagation of upstream service A, and outputs that the propagation source is A, the propagation probability is 0.85, and the propagation path is A, B, and C in sequence, providing a basis for the scheduler to prioritize warming up resources for A.
[0056] S103. Based on the exogenous signals of the hybrid multi-view predictor and cloud platform, the resource consumption and service carrying units are predicted at multiple time scales according to the causal analysis results and observation vectors, and multi-scale prediction results are obtained. The multi-scale prediction results include short-term prediction, medium- and long-term prediction and their corresponding uncertainties.
[0057] Intuitively, a hybrid multi-view predictor refers to splitting time series data into different prediction branches based on their time domain and components. Each branch employs the model or strategy best suited to its frequency domain characteristics. The results from each branch are then fused according to confidence levels to obtain an overall multi-scale prediction. Exogenous signals from cloud platforms include calendar information, promotional activity markers, external API call volume, instance market prices, etc., used to explain or predict the exogenous driving components of load. Specifically, causal analysis results and time series characteristics, along with exogenous signals, are input into the hybrid multi-view predictor. The hybrid multi-view predictor generates short-term and medium-to-long-term predictions and corresponding confidence intervals according to time scales. It then packages the predictions into multi-scale prediction results, including both the expected load / resource demand values for each service and upper / lower bound estimates at a given confidence level. These results are used by the instantaneous pool to estimate preheating demand and by the hierarchical decision engine to balance cost and default risk.
[0058] S104. Based on the cold start time distribution of each resource consumption and business carrying unit, predictive instantaneous resources are determined according to short-term forecasts and their uncertainties, and the instantaneous resource pool allocation results are obtained; the predictive instantaneous resources are preheating containers allocated in the instantaneous resource pool based on short-term forecasts and default risks.
[0059] Indicatively, the cold start time distribution of each resource consumption and business unit refers to the latency distribution from triggering expansion to the availability of services, obtained through statistics or modeling. This includes factors such as different instance types, container image coldness / hotness, and preheating strategies. Specifically, based on short-term forecasts and their uncertainties, combined with cold start latency statistics and resource pricing information for each service, a higher-level decision rule or small-scale optimization problem is constructed to determine which services should reserve how many preheated instances in the instantaneous pool. For example, the direct cost of maintaining preheated resources is smoothed out from the expected SLA default loss due to failure to respond in a timely manner, resulting in the instantaneous resource pool allocation result, i.e., which services receive how many preheated containers, the preheating type, and the duration, and corresponding call / routing instructions are issued to the execution layer.
[0060] S105. Based on the causal analysis results, multi-scale prediction results, and instantaneous resource pool allocation results, a hierarchical decision engine is used to make resource allocation decisions and obtain resource scheduling instructions. The hierarchical decision engine includes local short-cycle scaling control and global medium- and long-term planning. The resource scheduling instructions include instant scaling actions, node expansion and contraction actions, long-term placement node allocation, and instantaneous resource pool call instructions.
[0061] Indicatively, the hierarchical decision engine employs an architecture combining short-cycle local control and medium-to-long-cycle global planning. The short-cycle local controller focuses on low-latency, near-real-time scaling and routing decisions; the global planner handles capacity planning, node switching, and service placement—issues involving longer latency and global resource balancing. The two layers coordinate through shared prediction, uncertainty, and security constraint interfaces to achieve overall performance-cost objectives. Specifically, within each short decision cycle, the short-cycle local controller reads short-term predictions, causal decomposition hints, and the current state of the instantaneous resource pool, quickly generating immediate scaling or request routing instructions, such as temporarily expanding containers, directing some requests to the instantaneous resource pool, or enabling lightweight circuit breakers. The global planner, over a longer period, uses medium-to-long-term predictions, service call graphs, node capabilities, and costs as input to solve constrained optimization problems related to placement and node scaling, thereby outputting node-level switching plans and placement suggestions.
[0062] In the aforementioned cloud platform resource dynamic allocation optimization method, extracting time-series statistical features from observation vectors and establishing a time-series resource library can eliminate short-term noise and inconsistencies in the original monitoring data, provide structured and reusable historical and real-time feature streams, improve the input quality of subsequent causal analysis and predictors, thereby enhancing the robustness and auditability of prediction and decision-making. Based on a preset service scheduling graph, the time-series data is input into a pre-trained causal decomposition model and decomposed into baseline, overall trend, seasonality, and residuals. At the same time, the propagation sources and propagation paths of residuals are identified, enabling semantic differentiation of load causes. This allows for the identification of propagating load sources and the location of propagation paths, enabling priority intervention measures to be taken against propagation sources, thereby reducing cascading expansion, minimizing resource waste, and more effectively suppressing end-to-end latency propagation. A hybrid multi-perspective predictor, combined with exogenous signals from the cloud platform, is employed to predict resource consumption and service-carrying units across multiple time scales, providing uncertainty and matching predictive information across different decision-making time domains. The fusion of exogenous signals enhances the identification and prediction capabilities of event-driven loads. Uncertainty output enables subsequent allocation to achieve probability / risk awareness, reducing resource waste caused by misjudgments and allowing for more conservative protection measures to ensure SLAs in high-risk scenarios. Based on the cold start time distribution of each unit, predictive instantaneous resources are determined according to short-term forecasts and uncertainties, forming an instantaneous resource pool allocation result. Preheating resources are statistically linked to default risk, enabling on-demand and location-based preheating allocation. This significantly reduces the impact of cold start delays on service quality, minimizes short-term SLA defaults caused by passive expansion, and overall reduces the cost of long-term resource retention to cope with emergencies. Local controllers can respond quickly to short-term load fluctuations and propagation events with low latency, while global planners are responsible for cost and placement optimization across services / nodes. The collaboration between the two can achieve cluster-level resource utilization optimization while ensuring rapid response, reducing suboptimal placement or resource fragmentation caused by single-layer strategies and improving overall cost-effectiveness and SLO achievement rate.
[0063] In one embodiment, such as Figure 2 As shown, based on a preset service scheduling graph, the time-series resource library is input into a pre-trained causal decomposition model to obtain causal analysis results, including:
[0064] S201. Decompose the observation vector at multiple time scales according to the time step to obtain the baseline, overall trend, seasonal characteristics and residuals.
[0065] Indicatively, the observation vector of each resource consumption and business carrying unit can be viewed as a signal composed of several superimposed time components, namely, a long-term baseline or steady-state load, a slowly changing overall trend, repeatable seasonal / periodic components, and short-term residuals. For example, multi-scale decomposition techniques, such as STL (Seasonal and Trend Decomposition using Loess), Hodrick-Prescott filtering, or wavelet / multi-resolution analysis-based decomposition methods, can be used to decompose each time series over a predetermined window length to obtain the baseline, overall trend, seasonality, and residuals. For example, for the QPS per minute of a payment service, STL is first used to obtain the 7×24-hour seasonal components, i.e., capturing intraday and weekday / weekend patterns. Further, HP filtering is used to obtain the trend and residuals. If the residuals increase significantly within several consecutive windows, the process proceeds to the propagation identification process.
[0066] S202. Based on the service call graph, use causal relationship identification to determine whether the residual is caused by upstream resource consumption and the service of the business carrying unit. If it is determined that the service is the cause, extract the propagation source, propagation path and propagation probability to obtain the causal influence chain analysis results.
[0067] Furthermore, time-series-based causal tests, such as Granger causality tests, PCMCI / PC algorithms based on conditional independence tests, and information theory metrics like Transfer Entropy, are employed. This is combined with methods based on causal graph learning, such as using structure learning algorithms to learn directed edge weights between residuals under the constraints of the service call graph. For example, lag-sensitive causal tests are preferentially performed within the adjacency range of the service call graph. Specifically, for possible upstream nodes j and downstream nodes i, the lag value of the upstream residual sequence is tested to see if it significantly improves the prediction of the downstream residual, and statistical significance or information gain is calculated. By mapping the test results to propagation probabilities, the propagation confidence of each candidate upstream-to-downstream edge is obtained.
[0068] Optionally, when determining the propagation path, a graph search algorithm is used to find high-confidence paths on the call topology, combined with time consistency constraints, i.e., the timestamp sequence within the propagation delay window should present a top-down chronological order to eliminate false paths. Furthermore, for multi-source concurrent propagation, a linear / nonlinear contribution allocation strategy is adopted, decomposing the downstream residual into multiple upstream contribution components, which can be estimated using sparse regression or Bayesian decomposition methods. Exogenous drivers such as promotions and external API peaks are introduced as pseudo-correspondences, i.e., known exogenous signals are included as conditional variables in the causal test, or these common factors are pre-labeled and masked in causal graph learning to avoid misjudgment. The final output is a set of propagation triples with confidence, including the propagation source service j, the propagation path (node sequence), and the propagation probability.
[0069] S203. Based on the residuals, determine the abnormal outbreak and obtain the abnormal outbreak marker and its uncertainty.
[0070] In a schematic way, a statistical method based on extreme value theory is used to model the upper tail of the residual, thereby giving an estimate of the probability of events exceeding a certain threshold. The abnormal outbreak label is determined by the intensity and persistence, that is, by the intensity of exceeding the threshold, as well as the length of the continuous window exceeding the threshold or the cumulative abnormal score, to determine whether it is an abnormal outbreak.
[0071] S204. Based on the causal influence chain analysis results, the abnormal suddenness markers and their uncertainties, the causal analysis results are obtained.
[0072] Specifically, the causal impact chain analysis results, anomalous outbreak markers, and their uncertainties are integrated into a structured causal analysis result entity. That is, each service i at time t should at least include the decomposed component vector, i.e., baseline, overall trend, seasonal characteristics, and residuals, as well as the anomalous outbreak marker and severity, and if there is propagation, the propagation source set and corresponding propagation probability, propagation path candidates and path confidence, and the uncertainty of predicting the impact of such events on resource demand in the short term.
[0073] Optionally, several semantic and consistency checks can be performed during the synthesis process. When anomaly detection and propagation identification conflict, such as when a residual is marked as an anomaly but there is no credible propagation source, it should be classified as an exogenous anomaly, and the propagation field should be set to empty or have a low confidence level. Conversely, if the propagation probability is high and the propagation path is temporally coherent, it should be marked as a propagation burst, and the propagation source should be the priority control target.
[0074] In one embodiment, the hybrid multi-view predictor includes a long-term trend branch, a seasonal branch, and a short-term burst branch;
[0075] Based on exogenous signals from a hybrid multi-view predictor and a cloud platform, resource consumption and service carrying units are predicted at multiple time scales according to causal analysis results and observation vectors, yielding multi-scale prediction results, including:
[0076] S11. The long-term trend branch uses a long-term series forecasting model to make low-frequency trend forecasts based on the baseline and the overall trend, and obtains medium- and long-term forecasts and their uncertainties; the medium- and long-term forecasts include medium- and long-term load and resource demand.
[0077] The long-term trend branch primarily addresses low-frequency load changes caused by business growth, seasonal effects, or continuous changes in user behavior, and does not handle sudden events. The long-term trend reflects the overall direction of the slow evolution of system load over time, such as gradual business growth, shifts in user activity periods, and cyclical fluctuations during holidays. Based on the baseline and overall trend term in the causal decomposition output, combined with exogenous time variables, the long-term trend branch uses lightweight Transformers such as Temporal Fusion Transformer to capture long-sequence low-frequency patterns, predicting medium- to long-term load and simultaneously outputting prediction confidence intervals or variance estimates. The model's loss function can combine MSE and quantile loss to both fit the mean trend and provide an uncertainty range. For example, taking the transcoding service of a video streaming platform, by extracting its baseline and trend components, a stable pattern of gradually increasing resource demand from early morning to morning and decreasing at night can be observed. Based on this, the long-term branch model predicts an average load increase of 15% over the next 24 hours and provides a 90% confidence interval for the global planner to pre-allocate node resources.
[0078] S12. The seasonal branch performs seasonal modeling based on seasonal characteristics and predicts periodic components to obtain seasonal predictions and their uncertainties.
[0079] The seasonal branch aims to model and predict periodic fluctuations, often caused by user behavior, business cycles, or system scheduling mechanisms. Specifically, the seasonal branch directly uses the seasonal characteristic term output from causal decomposition as the modeling basis; this signal represents a periodic variation pattern. Optionally, the seasonal branch employs frequency domain modeling, performing Discrete Fourier Transform (DFT) or Short-Time Fourier Transform (STFT) on the seasonal term to capture the dominant frequency and phase parameters. Future predictions can be achieved by extending the dominant frequency component, outputting seasonal prediction values and corresponding uncertainties for one or more future periods. Furthermore, the seasonal branch period length is determined by historical statistics, automatically detecting the dominant period and dynamically adjusting the prediction window. The prediction confidence is obtained based on historical reconstruction errors or periodic phase drift estimates.
[0080] S13. The short-term burst branch adopts a short-term prediction model to predict short-term bursts based on residuals, causal influence chain analysis results, and abnormal burst markers and their uncertainties, and obtains short-term burst loads and their uncertainties.
[0081] Schematic, the short-term burst branch is the fastest-responding layer in the hybrid predictor, specifically designed to handle sudden traffic spikes, propagation anomalies, and upstream service propagation events. Specifically, it predicts load changes in the next few seconds to minutes by real-time modeling of residual and causal chain analysis results, quantifying the degree of risk and providing a basis for decision-making in the instantaneous resource pool. For example, the short-term branch employs a lightweight LSTM or Online-AR model, fine-tuning parameters online based on the most recent window data in each decision cycle to achieve rapid adaptation. The output is a short-term load forecast and uncertainty range for several time steps ahead, along with a propagation risk score calculated jointly by the causal chain propagation probability and the severity of the anomaly.
[0082] S14. Weighted fusion of medium- and long-term forecasts, seasonal forecasts, and short-term sudden loads according to time scale and uncertainty to obtain multi-scale forecast results and their overall uncertainty.
[0083] After obtaining forecasts at three different time scales—long-term, medium-term, and short-term—these forecasts need to be fused to form a unified multi-scale estimate of future loads. For example, the weighted fusion weights are determined based on the time scales and uncertainties of medium- and long-term forecasts, seasonal forecasts, and short-term burst loads. Within the short-term forecast window, the weight of the short-term branch is increased, while within the long-term window, more emphasis is placed on the long-term and seasonal branches. The weighted fusion function calculates the overall forecast value. The fusion process can be carried out within a Bayesian framework, such as through a weighted Gaussian mixture model or a Kalman filter, thereby simultaneously outputting the overall uncertainty. Optionally, to prevent the failure of a certain branch forecast from causing overall bias, a lower and upper confidence limit can be set. When the uncertainty of a certain branch exceeds the threshold, its weight is automatically reduced, favoring the use of more stable branch results.
[0084] In one embodiment, the hybrid multi-view predictor further includes a meta-learning layer, and the method further includes:
[0085] S21. When new resource consumption and service carrying units appear in the service scheduling graph, the short-term burst branch is quickly fine-tuned based on the observation vector corresponding to the new resource consumption and service carrying unit, and the short-term prediction model parameters of the fine-tuned short-term burst branch are obtained. The meta-model is a MAML initialization model trained on offline historical cluster tracking data.
[0086] Indicatively, new services often lack sufficient historical data to train stable short-term predictors. Directly using general models results in insufficient short-term accuracy and adaptive speed, leading to transient decision-making errors. A meta-model refers to meta-training on offline historical cluster tracking data, such as using model-agnostic meta-learning methods like MAML (Model-Agnostic Meta-Learning) or Regression to obtain model initialization parameters. This initialization allows for rapid acquisition of a short-term prediction model with good generalization through a few gradient updates with a small number of samples. Specifically, a large amount of historical cluster tracking data is collected offline and divided into several tasks, each corresponding to several time windows of a service. Each task includes simulated short-term bursts and normal samples. MAML is used as the meta-training paradigm, involving two-layer optimization of multiple tasks. The outer loop optimizes meta-parameters, enabling rapid low-loss acquisition on any new service after a few inner loop updates. During training, short-term burst samples, propagation event samples, and normal samples should be added to the tasks in proportion, allowing the meta-model to learn sensitivity to propagation-driven residuals.
[0087] Furthermore, when new resource consumption and business carrying units, i.e. new service / container types, emerge and the first batch of observation vectors are collected, the meta-model is used as initialization for rapid fine-tuning. Specifically, the observation vectors of the most recent K time steps are used as the training set, and a small number of inner loop gradient updates are performed to obtain the fine-tuned short-term branch model parameters.
[0088] S22. Evaluate the predictive performance of the fine-tuned short-term prediction model and adjust its confidence level based on the online error.
[0089] Indicatively, after fine-tuning is completed and put into use, the error sequence between model predictions and actual observations is continuously collected over a rolling time window, and moving average statistics such as moving average root mean square (RMSE), moving average mass index (MAE), and quantile coverage are calculated. To reduce latency and computational costs, exponentially weighted moving average (EWMA) can be used to smooth the errors, thereby obtaining a more stable error estimate. If the evaluation metrics exceed preset thresholds, such as the moving average RMSE exceeding several times the historical median, it triggers an increase in model uncertainty estimation, more frequent fine-tuning, or, if necessary, a fallback to a more conservative baseline model.
[0090] In one embodiment, based on the distribution of cold start times of each resource consumption and service carrying unit, predictive instantaneous resources are determined according to short-term forecasts and their uncertainties to obtain the instantaneous resource pool allocation result, including:
[0091] S31. Based on minimizing the instantaneous resource pool maintenance cost and expected SLA default loss, the reserved resources in the instantaneous resource pool for each resource consumption and service carrying unit are obtained by using short-term forecasts and their uncertainties.
[0092] Specifically, the reservation decision for the transient resource pool must balance two types of costs simultaneously: one is the pool maintenance cost, i.e., the unit time cost of warming up containers or reserving instances, the overhead of image keep-alive, etc.; the other is the expected SLA default penalty, i.e., the penalty or loss of business revenue if insufficient resources are reserved, resulting in request delays or loss. For example, the transient pool decision can be abstracted as selecting the reservation quantity (u) for each service i at each decision time t. i,t The objective function is in, The unit time maintenance cost of the i-th type of template / instance unit in the instantaneous pool; The cost of defaulting on the SLA for service unit time or single request is d; d is the future short-term demand forecast from the short-term forecast branch; f i,i+h (x) represents the probability density of short-run demand, or the statistic of start time; This represents the expectation of future random demand, where λ is the tradeoff coefficient. The output is a vector of instantaneous resource pool allocation results (u...). i,t This includes the number of preheating instances allocated to each service, the instance template type, the preheating time-to-live (TTL), and the preheating priority score.
[0093] S32. When the causal chain analysis results indicate the existence of a propagation source, the reserved resources are converted into preheating containers according to the cold start time distribution of the resource consumption and service carrying units corresponding to the propagation source, and the preheating containers are allocated to the resource consumption and service carrying units corresponding to the propagation source to obtain the instantaneous resource pool allocation results.
[0094] When causal analysis indicates that one or more services are propagation sources, the available or reserved resources in the instantaneous pool are preferentially converted into preheating containers or microVMs for these propagation sources. Preheating time and release strategies are then scheduled to promptly suppress downstream cascading effects upon the arrival of the propagation event. Illustratively, for each candidate propagation source j, a priority score is calculated based on the propagation probability provided by causal analysis, the estimated downstream impact, and its cold start latency statistics. For propagation sources with higher priority scores, a preheating strategy and trigger timing are determined. The preheating strategy can be on-demand preheating, lightweight fast-warming containers, or routing only to serverless fast instances, ensuring that the preheating completion time is less than the difference between the expected propagation arrival time and the safety buffer. For example, the allocation and conversion of preheating containers are achieved by converting (u... i,tThe pool is mapped to a specific container template and allocated to the propagation source based on priority. If the resources in the pool are insufficient, a marginal benefit strategy is adopted, such as deciding whether to reclaim resources from low-priority services and migrate them to high-priority propagation sources based on the expected default loss per unit of resources. The reclamation cost should be considered and included in the trade-off when reclamation.
[0095] Optionally, a dynamic TTL and delayed release strategy can be set for each preheating container. If propagation does not occur or its intensity decreases, exponential backoff release is adopted to reduce the jitter of frequent start-stop. If propagation is confirmed and triggers expansion, the preheating container can be switched to long-term operation as needed or the global planner can take over the expansion and contraction of the triggered node.
[0096] In one embodiment, such as Figure 3 As shown, based on the causal analysis results, multi-scale prediction results, and instantaneous resource pool allocation results, a hierarchical decision engine is used to make resource allocation decisions, resulting in resource scheduling instructions, including:
[0097] S301. Within a preset short decision-making period, the local controller determines the horizontal scaling action based on short-term prediction, causal analysis results, and instantaneous pool allocation results, and obtains an instantaneous scaling instruction. The local controller adopts a lightweight reinforcement learning strategy based on policy networks. The instantaneous scaling instruction includes expanding the container of resource consumption and service carrying unit, shrinking the container of resource consumption and service carrying unit, and routing requests to the instantaneous resource pool.
[0098] Indicatively, the local controller, within a short decision cycle, utilizes short-term forecasts, causal decomposition propagation cues, and the current instantaneous resource pool state to make horizontal scaling or traffic routing decisions to avoid latency spikes or unnecessary long-term expansion. Instantaneous scaling commands include scaling up / down several container instances (pods) or concurrent slots, temporarily routing some requests to the instantaneous resource pool, or triggering load degradation / backpressure measures in extreme cases. The local controller employs a local lightweight reinforcement learning (RL) strategy combined with rule baselines and safety filters, which can reduce unnecessary operation switching and costs by learning from historical experience while maintaining low-latency response capabilities. Specifically, let the short decision cycle be Δt. local In each cycle, the local controller acquires the observation vector obs, including the short-term predicted value d of service i. i,t+h With uncertainty σ i,t+h Causal analysis output, instantaneous pool available resources and current allocation (u i,t The current number of containers (pods) i,t Delay index P95, historical scaling action a i,t-1And exogenous signals. Observations are normalized and outlier cleaned before entering the policy to ensure the stability of the RL policy. Optionally, the local policy runs in the form of baseline rules and an actor-critic policy network. The rules are responsible for handling explicit hard thresholds, such as immediately scaling up or circuit breaking when P95 exceeds the limit, and the policy network is responsible for optimizing the long-term trade-off between cost and SLA in non-extreme cases. The reward is designed to penalize frequent scaling up and down to prevent jitter, and the SLA can be quantified based on the magnitude by which P95 exceeds the target or the actual loss of requests being dropped / delayed. Local RL uses model-based rollouts and sim2real, that is, learning a short-term residual prediction / environment model online, using it to perform multi-step short-term simulations locally to generate virtual samples for RL updates, thereby reducing trial and error in the real environment. Offline, pre-training is performed in a simulation environment to obtain safe initialization. Experience replay uses prioritized replay, giving priority to retaining transfer samples that have a greater impact on SLO.
[0099] S302. Within a preset long decision-making period, the global planner uses medium- and long-term forecasts, service call graphs, resource consumption, and resources corresponding to business carrying units to obtain node scaling actions and long-term placement node allocation. The global planner uses an integer linear programming model to solve the constrained placement node and node scaling optimization problem to determine node switching, service placement, and cross-service scheduling strategies.
[0100] Indicatively, the global planner optimizes overall resource utilization and cost from a global perspective, considering node costs, spot market information, and network topology, avoiding suboptimal global results caused by local decisions. Specifically, based on soft latency constraints such as node capacity constraints, service isolation and tenant quota constraints, upper limits on spot instance usage, and the requirement that the predicted end-to-end latency of critical transactions must be less than the target, the scheduling strategy is obtained by solving integer linear programming (ILP). This involves using LP relaxation and heuristic algorithms to first relax integer variables into continuous variables, such as x. i,tA possible value of 0.5 indicates that 50% of the containers for service i are deployed on node n. A linear programming approach is used to quickly find an approximate solution, which is then transformed into integer solutions using a heuristic algorithm, resulting in an executable deployment decision. The node scaling list includes the node ID, type, quantity, and planned time for starting / shutting down the service. Service placement recommendations indicate which nodes / partitions each service should be placed on and the corresponding number of replicas, as well as cross-service merging / isolation and spot usage recommendations. For example, prior to a marketing campaign expected to last several hours, the global planner, based on medium- to long-term forecasts, decides to start several nodes in advance, placing critical services in low-latency node groups and merging low-priority backends onto nodes with higher container density to reduce fragmentation. The node startup plan is set to trigger 10 minutes before the campaign begins. If the campaign intensity is lower than expected, the global planner releases excess nodes in subsequent cycles.
[0101] S303. Perform security checks on instant scaling commands, node scaling actions, and long-term node allocation. If the security check passes, generate resource scheduling commands. The security check also uses a conservative SLO prediction model and control barrier function to determine whether the decision violates the SLA.
[0102] The safety verification layer, jointly evaluated by a conservative SLO prediction model and a control barrier function (CBF), assesses whether a decision will lead to an SLO violation in the worst-case scenario and provides safe alternative actions or fallback strategies when necessary. Specifically, the safety verification layer acquires candidate actions to be executed and estimates the performance impact in the short, medium, and long term after the action takes effect based on a conservative SLO predictor. This conservative model employs more conservative assumptions and upper bound estimates, such as amplifying the uncertainty of short-term predictions by several times or using worst-case quantiles based on historical experience to evaluate the P95 / P99 latency upper bound. Furthermore, the control barrier function treats latency or SLO indicators as system states. It checks whether the action satisfies the SLA constraint under the conservative model; if so, it is considered safe; otherwise, it is rejected or replaced with a fallback. The fallback strategy involves replacing a candidate action as unsafe with a more conservative expansion, or using an instantaneous pool to avoid node-level expansion, or, in extreme cases, rejecting the change and triggering a manual alert.
[0103] In one embodiment, the global planner obtains the node placement and scaling decisions by solving the following objective function using the following formula:
[0104]
[0105]
[0106] Where, x i,nIndicates whether to place the container of service i on node n; y n,t Indicates whether node n is enabled; Indicates whether service i uses container resources from the transient resource pool at time t; cost n Cost represents the unit time cost of node n for the service. pod This represents the unit time consumption of a single resource and the time cost of a container that carries the business; pods i This represents the number of containers for service i at a given time, determined by the scaling operation. This indicates the expected cost of defaulting on the Service Scope Agreement (SLA) for service i; fragmentation t This represents the penalty for node resource fragmentation caused by the node placement decision; This represents the p95-delayed observation or prediction value of service i at time t; Let λ represent the p95 delay target for service i; λ and β are weighting coefficients.
[0107] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0108] Based on the same inventive concept, this application also provides a cloud platform resource dynamic allocation optimization device for implementing the cloud platform resource dynamic allocation optimization method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more cloud platform resource dynamic allocation optimization device embodiments provided below can be found in the limitations of the cloud platform resource dynamic allocation optimization method described above, and will not be repeated here.
[0109] In one exemplary embodiment, such as Figure 4 As shown, a cloud platform resource dynamic allocation optimization device is provided, comprising:
[0110] The status monitoring module 401 is used to acquire the observation vectors of each resource consumption and service carrying unit, and to extract the time-series statistical features of the observation vectors to obtain the time-series resource library.
[0111] The causal analysis module 402 is used to input the time-series resource library into the pre-trained causal decomposition model based on the preset service scheduling graph to obtain the causal analysis results;
[0112] The state prediction module 403 is used to predict resource consumption and service carrying units at multiple time scales based on exogenous signals from a hybrid multi-view predictor and cloud platform, according to causal analysis results and observation vectors, and to obtain multi-scale prediction results.
[0113] The instantaneous resource allocation module 404 is used to determine predictive instantaneous resources based on the cold start time distribution of each resource consumption and service carrying unit, according to short-term forecasts and their uncertainties, and obtain the instantaneous resource pool allocation results; the predictive instantaneous resources are preheating containers allocated in the instantaneous resource pool based on short-term forecasts and default risks;
[0114] The global resource scheduling module 405 is used to make resource allocation decisions based on the causal analysis results, multi-scale prediction results, and instantaneous resource pool allocation results, and obtain resource scheduling instructions by using a hierarchical decision engine.
[0115] In one embodiment, the causal analysis module 402 is further configured to:
[0116] The observation vector is decomposed at multiple time scales based on the time step to obtain the baseline, overall trend, seasonal characteristics and residuals;
[0117] Based on the service call graph, causal relationship identification is used to determine whether the residual is caused by upstream resource consumption and the service of the business carrying unit. If it is determined that the service is the cause, the propagation source, propagation path and propagation probability are extracted to obtain the causal influence chain analysis results.
[0118] Anomaly outbreaks are identified based on the residuals, resulting in anomaly outbreak markers and their uncertainties.
[0119] The causal analysis results are obtained based on the causal influence chain analysis results, the abnormal sudden occurrence markers, and their uncertainties.
[0120] In one embodiment, the state prediction module 403 is further configured to:
[0121] The long-term trend branch uses a long-term series forecasting model to make low-frequency trend forecasts based on the baseline and the overall trend, resulting in medium- and long-term forecasts and their uncertainties; the medium- and long-term forecasts include medium- and long-term load and resource demand.
[0122] The seasonal branch performs seasonal modeling based on seasonal characteristics and predicts periodic components, thus obtaining seasonal forecasts and their uncertainties.
[0123] The short-term burst branch uses a short-term prediction model to predict short-term bursts based on residuals, causal chain analysis results, and abnormal burst markers and their uncertainties, thereby obtaining the short-term burst load and its uncertainty.
[0124] By weighting and fusing medium- and long-term forecasts, seasonal forecasts, and short-term sudden loads according to time scale and uncertainty, multi-scale forecast results and their overall uncertainty are obtained.
[0125] In one embodiment, a meta-learning module is also included, for:
[0126] When new resource consumption and service carrying units appear in the service scheduling graph, the short-term burst branch is quickly fine-tuned based on the observation vector corresponding to the new resource consumption and service carrying unit, and the short-term prediction model parameters of the short-term burst branch are obtained after fine-tuning. The meta-model is a MAML initialization model trained on offline historical cluster tracking data.
[0127] Evaluate the predictive performance of the fine-tuned short-term forecasting model and adjust its confidence level based on the online error.
[0128] In one embodiment, the instantaneous resource allocation module 404 is further configured to:
[0129] Based on minimizing the instantaneous resource pool maintenance cost and expected SLA default loss, the reserved resources in the instantaneous resource pool for each resource consumption and business carrying unit are obtained by using short-term forecasts and their uncertainties.
[0130] When the causal chain analysis results indicate the existence of a propagation source, the reserved resources are converted into preheating containers based on the cold start time distribution of the resource consumption and service carrying units corresponding to the propagation source, and the preheating containers are allocated to the resource consumption and service carrying units corresponding to the propagation source to obtain the instantaneous resource pool allocation results.
[0131] In one embodiment, the global resource scheduling module 405 is further configured to:
[0132] Within a preset short decision-making cycle, the local controller determines the horizontal scaling action based on short-term predictions, causal analysis results, and instantaneous pool allocation results, thus obtaining instantaneous scaling instructions. The local controller adopts a lightweight reinforcement learning strategy based on policy networks. Instantaneous scaling instructions include expanding containers of resource consumption and service carrying units, shrinking containers of resource consumption and service carrying units, and routing requests to the instantaneous resource pool.
[0133] Within a pre-set long decision-making period, the global planner uses medium- and long-term forecasts, service call graphs, resource consumption and resources corresponding to business carrying units to obtain node scaling actions and long-term placement node allocation; the global planner uses an integer linear programming model to solve the constrained placement node and node scaling optimization problem to determine node switching, service placement and cross-service scheduling strategies.
[0134] Security checks are performed on instant scaling commands, node scaling actions, and long-term node allocations. If the security checks pass, resource scheduling commands are generated. The security checks are also used to determine whether the decisions violate the SLA by using a conservative SLO prediction model and control barrier functions.
[0135] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps in the above method embodiments.
[0136] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0137] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The components described as separate parts may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0138] The above-described embodiments are merely illustrative of several implementation methods of the embodiments of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the embodiments of this application, and these modifications and improvements all fall within the protection scope of the embodiments of this application.
Claims
1. A method for optimizing dynamic allocation of cloud platform resources, characterized in that, The method comprises: Obtaining an observation vector of each resource consumption and service bearing unit, and performing time sequence statistical feature extraction on the observation vector to obtain a time sequence resource library; the time sequence resource library comprises an observation vector and a time sequence feature corresponding to each resource consumption and service bearing unit; the observation vector comprises a request rate, a delay, a CPU utilization rate, a memory utilization rate and a network traffic corresponding to each time step; the resource consumption and service bearing unit comprises a service and a corresponding container thereof; Based on a preset service scheduling diagram, the time sequence resource library is input into a pre-trained causal decomposition model to obtain a causal analysis result; the causal decomposition model performs causal decomposition processing on each resource consumption and service bearing unit; the causal decomposition processing comprises decomposing the observation vector into a baseline, a total trend, a seasonal feature and a residual error according to the time sequence feature, and identifying a propagation source and a propagation path of the residual error; Based on an exogenous signal of a hybrid multi-view predictor and a cloud platform, the resource consumption and service bearing unit are predicted in multiple time scales according to the causal analysis result and the observation vector to obtain a multi-scale prediction result; the multi-scale prediction result comprises a short-term prediction, a medium and long-term prediction and corresponding uncertainty thereof; Based on a cold start time distribution of each resource consumption and service bearing unit, a predictive instantaneous resource is determined according to the short-term prediction and the uncertainty thereof to obtain an instantaneous resource pool allocation result; the predictive instantaneous resource is a preheating container allocated in the instantaneous resource pool based on the short-term prediction and the default risk; According to the causal analysis result, the multi-scale prediction result and the instantaneous resource pool allocation result, a layered decision engine is used to make resource allocation decisions to obtain a resource scheduling instruction; the layered decision engine comprises local short-period expansion and contraction control and global medium and long-term planning; the resource scheduling instruction comprises an immediate expansion and contraction action, a node expansion and contraction action, a long-term node placement allocation and an instantaneous resource pool calling instruction.
2. The method of claim 1, wherein, Based on a preset service scheduling diagram, the time sequence resource library is input into a pre-trained causal decomposition model to obtain a causal analysis result, comprising: The observation vector is decomposed in multiple time scales according to the time step to obtain a baseline, a total trend, a seasonal feature and a residual error; Based on the service call diagram, a causal relationship identification is used to determine whether the residual error is caused by the service of the upstream resource consumption and service bearing unit, and if the service is determined to cause it, the propagation source, the propagation path and the propagation probability are extracted to obtain a causal influence chain analysis result; According to the residual error, an abnormal burst judgment is performed to obtain an abnormal burst marker and its uncertainty; According to the causal influence chain analysis result, the abnormal burst marker and its uncertainty, the causal analysis result is obtained.
3. The method of claim 2, wherein, The hybrid multi-view predictor comprises a long-term trend branch, a seasonal branch and a short-term burst branch; Based on an exogenous signal of a hybrid multi-view predictor and a cloud platform, the resource consumption and service bearing unit are predicted in multiple time scales according to the causal analysis result and the observation vector to obtain a multi-scale prediction result, comprising: The long-term trend branch performs low-frequency trend prediction according to the baseline and the total trend by using a long-term sequence prediction model to obtain a medium-and-long-term prediction and an uncertainty thereof; the medium-and-long-term prediction includes medium-and-long-term load and resource demand; The seasonal branch performs seasonal modeling according to the seasonal characteristics and predicts a periodic component to obtain a seasonal prediction and an uncertainty thereof; The short-term burst branch performs short-term burst prediction according to the residual, the causal influence chain analysis result and the abnormal burst label and an uncertainty thereof by using a short-term prediction model to obtain short-term burst load and an uncertainty thereof; The medium-and-long-term prediction, the seasonal prediction and the short-term burst load are weighted and fused according to time scales and uncertainties to obtain a multi-scale prediction result and an overall uncertainty thereof.
4. The method of claim 3, wherein, The hybrid multi-view predictor further includes a meta-learning layer, and the method further includes: When a new resource consumption and service bearing unit appears in the service scheduling graph, a short-term prediction model parameter of the short-term burst branch after fine-tuning is obtained by fine-tuning the short-term burst branch based on a meta-model according to an observation vector corresponding to the new resource consumption and service bearing unit; the meta-model is an MAML initialized model trained on offline historical cluster tracking data; The prediction performance of the fine-tuned short-term prediction model is evaluated, and its confidence is adjusted based on online errors.
5. The method of claim 2, wherein, Based on the cold start time distribution of each resource consumption and service bearing unit, a predictive instantaneous resource is determined according to the short-term prediction and the uncertainty thereof to obtain an instantaneous resource pool allocation result, including: Based on minimizing the maintenance cost of the instantaneous resource pool and the expected SLA violation loss, the reserved resource in the instantaneous resource pool for each resource consumption and service bearing unit is solved by using the short-term prediction and the uncertainty thereof; When the causal influence chain analysis result indicates that the propagation source exists, the reserved resource is converted into a warm-up container according to the cold start time distribution of the resource consumption and service bearing unit corresponding to the propagation source, and the warm-up container is allocated to the resource consumption and service bearing unit corresponding to the propagation source to obtain the instantaneous resource pool allocation result.
6. The method of claim 2, wherein, Based on the causal analysis result, the multi-scale prediction result and the instantaneous resource pool allocation result, a layered decision engine is used to make a resource allocation decision to obtain a resource scheduling instruction, including: Within a preset short decision period, a local controller is used to determine a horizontal scaling action according to the short-term prediction, the causal analysis result and the instantaneous pool allocation result to obtain an immediate scaling instruction; the local controller uses a lightweight reinforcement learning strategy based on a policy network; the immediate scaling instruction includes expanding containers of the resource consumption and service bearing unit, shrinking containers of the resource consumption and service bearing unit and requesting routing to the instantaneous resource pool; Within a preset long decision-making period, the global planner uses the medium-to-long-term forecast, the service call graph, the resource consumption and the resources corresponding to the business carrying unit to obtain node scaling actions and long-term placement node allocation; the global planner uses an integer linear programming model to solve the constrained placement node and node scaling optimization problem to determine node switching, service placement and cross-service scheduling strategies. The instant scaling command, the node scaling action, and the long-term node allocation are subject to security checks. If the security checks are passed, the resource scheduling command is generated. The security checks are performed by using a conservative SLO prediction model and a control barrier function to determine whether the decision violates the SLA.
7. The method of claim 6, wherein, The method further includes: The global planner obtains its node placement and scaling decisions by solving the following objective function using the following formula: where x i,n denotes whether to place a container of service i on node n; y n,t denotes whether node n is on; denotes whether service i uses container resources of the transient resource pool at time t; cost n denotes the unit time cost of node n for service; cost pod denotes the unit time cost of a single resource consumption for a business unit container; pods i denotes the number of containers of service i at the corresponding time determined by the scaling action; denotes the SLA violation penalty expected by service i; fragmentation t denotes the node resource fragmentation penalty item caused by the placement node decision; denotes the p95 delay observation or prediction value of service i at time t; denotes the p95 delay target of service i; λ and β are weight coefficients.
8. A cloud platform resource dynamic allocation optimization apparatus, characterized in that, The device includes: The status monitoring module is used to obtain the observation vectors of each resource consumption and service carrying unit, and to extract the time-series statistical features of the observation vectors to obtain a time-series resource library. The causal analysis module is used to input the time-series resource library into a pre-trained causal decomposition model based on a preset service scheduling graph to obtain causal analysis results; The state prediction module is used to predict the resource consumption and service carrying unit at multiple time scales based on the exogenous signals of the hybrid multi-view predictor and cloud platform, according to the causal analysis results and the observation vector, and to obtain multi-scale prediction results. The instantaneous resource allocation module is used to determine predictive instantaneous resources based on the cold start time distribution of each resource consumption and service carrying unit, according to short-term forecasts and their uncertainties, and to obtain the instantaneous resource pool allocation result; the predictive instantaneous resources are preheating containers allocated in the instantaneous resource pool based on short-term forecasts and default risks; The global resource scheduling module is used to make resource allocation decisions using a hierarchical decision engine based on the causal analysis results, the multi-scale prediction results, and the instantaneous resource pool allocation results, and to obtain resource scheduling instructions. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. When the processor executes the computer program, it implements the method of any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.