Containerized resource management method based on dynamic graph network
Through the dynamic graph network and STAtt-GCN model, the problems of low resource utilization and delayed fault response in containerized resource management are solved, achieving fine management and efficient utilization of resources, and improving the stability and response speed of the system.
Patent Information
- Application Number
- CN202410718217.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2024-08-27
AI Technical Summary
When existing containerized resource management technology faces a highly dynamically changing environment, static resource allocation leads to low resource utilization and delayed fault response. It is unable to quickly and accurately assess the scope of fault impact and take recovery measures in a timely manner, leading to greater impact. scope and longer service outages.
Adopting a containerized resource management method based on dynamic graph networks, by constructing a dynamic spatio-temporal graph, training the STAtt-GCN model for resource prediction and fault detection, dynamically adjusting container deployment and resource configuration, and using spatial and temporal attention mechanisms to optimize resource utilization in a timely manner Identify and recover from failures to reduce service outage time.
It improves resource utilization efficiency, enhances system stability and flexibility, shortens fault recovery time, and improves system response speed and reliability.
Smart Images

Figure CN118550652A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of containerized resources, and in particular to a containerized resource management method based on a dynamic graph network. Background Art
[0002] Current containerization technologies, especially container orchestration systems based on platforms such as Kubernetes (k8s), have been able to achieve a certain degree of resource management and dynamic scheduling. These technologies have achieved automated deployment, expansion and management of containerized applications through container orchestration, significantly improving application portability and management efficiency. However, with the widespread application of microservice architectures and AI workloads, existing resource management and scheduling technologies still have some limitations when facing highly dynamically changing environments.
[0003] Static resource allocation: Although platforms such as Kubernetes support dynamic resource adjustment, their resource allocation strategies are often based on pre-set rules and static resource quotas. Traditional static resource allocation cannot fully utilize system resources, resulting in low resource utilization or service performance bottlenecks.
[0004] Delayed fault response: Existing fault detection and recovery mechanisms mainly rely on simple health checks and fixed strategies, such as liveness probes and readiness probes. These methods often cannot quickly and accurately assess the impact of complex system failures. Health checks can usually only detect the symptoms of the failure and cannot take effective recovery measures in time, which may cause a larger impact range and longer service interruption time.
[0005] In order to solve the above problems, the present invention proposes a containerized resource management method based on a dynamic graph network. Summary of the invention
[0006] In view of the deficiencies in the prior art, the present invention provides a containerized resource management method based on a dynamic graph network, which solves the problem that traditional static resource allocation cannot fully utilize system resources, resulting in low resource utilization or service performance bottlenecks.
[0007] To achieve the above objectives, the present invention is implemented through the following technical solutions: A containerized resource management method based on a dynamic graph network, comprising the following steps:
[0008] Build a dynamic graph network model to build a dynamically updated spatiotemporal graph by monitoring the running status, resource usage, and inter-service dependencies of containers or services in real time;
[0009] Train the STAtt-GCN model for dynamic resource prediction, collect long-term operation history data of containers or services, and train the STAtt-GCN model;
[0010] Apply the STAtt-GCN model for dynamic resource prediction. Based on the trained STAtt-GCN model, input the current network status and historical data to predict resource demand in the future.
[0011] Dynamic resource optimization and scheduling: According to STAtt-GCN's forecast of resource demand in the future, container deployment and resource coordination are adjusted in advance;
[0012] Fault detection,The STAtt-GCN model is used to identify node anomalies.
[0013] Preferably, the step of constructing a dynamic graph network model includes:
[0014] Learn the importance differences between containers through spatial attention mechanism;
[0015] Dynamically adjust the importance given to different adjacent containers.
[0016] Preferably, the spatial attention mechanism includes the dependency strength between containers and the degree of importance attached to different adjacent containers adjusted according to the current task requirements.
[0017] Preferably, the construction of the dynamic graph network model comprises the following steps:
[0018] Captured through temporal attention mechanism;
[0019] Emphasize the importance of container status changes at different time points.
[0020] Preferably, the temporal attention mechanism includes predicting future resource requirements, identifying abnormal behavior patterns, and considering fluctuations in time series in resource scheduling.
[0021] Preferably, the dynamic resource optimization and scheduling includes the following steps:
[0022] Predict resource demand for a period of time in the future based on the STAtt-GCN model;
[0023] The system adjusts container deployment and resource coordination in advance;
[0024] Realize dynamic resource optimization and scheduling.
[0025] Preferably, the fault detection step comprises:
[0026] Assess the impact scope through the spatiotemporal characteristic patterns and graph propagation mechanisms of anomalies;
[0027] When an abnormality is detected on a node, the impact scope is evaluated through a propagation mechanism, and the system automatically executes service migration or restart strategies based on the impact scope to minimize service interruption time.
[0028] Preferably, the fault detection comprises the following steps:
[0029] Use the STAtt-GCN model to detect and identify node anomalies;
[0030] Assess the impact scope through graph propagation mechanism.
[0031] Preferably, the STAtt-GCN model detects and automatically executes a service migration or restart strategy according to the impact scope to minimize service interruption time.
[0032] Preferably, a containerized resource management system based on a dynamic graph network includes:
[0033] Resource monitoring module, which is used to build dynamic graph network models and monitor the running status of containers or services, including CPU usage, memory usage, and network traffic;
[0034] STAtt-GCN model module, used for spatiotemporal prediction, uses the spatial attention mechanism to analyze and learn the dependencies and importance differences between containers, and adjusts the weights of different adjacent containers;
[0035] The resource allocation and fault recovery strategy module is used for resource allocation strategy and fault recovery strategy. According to the prediction results of the STAtt-GCN model, it dynamically adjusts the deployment and resource coordination of containers to optimize resource utilization and system performance.
[0036] The present invention provides a containerized resource management method based on a dynamic graph network. It has the following beneficial effects:
[0037] 1. The present invention uses a spatial attention mechanism to learn the differences in importance between containers, that is, dynamically adjusts the degree of importance attached to different adjacent containers according to the dependency strength between containers and current task requirements, thereby improving resource utilization efficiency.
[0038] 2. The present invention uses the temporal attention mechanism to capture and emphasize the importance of container state changes at different time points, which helps to predict future resource requirements, identify abnormal behavior patterns, and take into account fluctuations in time series in resource scheduling.
[0039] 3. The present invention realizes fine management and efficient utilization of resources through dynamic graph network model prediction and scheduling strategy, enhances the stability and elasticity of the system, and the fault detection and instant recovery mechanism based on dynamic graph network can shorten the service recovery time and improve the stability and elasticity of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is the overall architecture diagram of the present invention;
[0041] Figure 2 It is a dynamic schematic diagram of the present invention;
[0042] Figure 3 It is a schematic diagram of resource demand prediction of the present invention;
[0043] Figure 4 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0044] The following will be combined with the drawings in the specification of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0045] Please refer to the attached Figure 1 -Attached Figure 4 ;
[0046] 1. Example 1: Web application resource management based on dynamic graph network
[0047] Specific steps:
[0048] Build a dynamic graph network model: monitor the running status, resource usage and service call dependencies of each Web application container in real time, and build a dynamic space-time graph.
[0049] Training the STAtt-GCN model: Collect historical operation data of Web application containers, train the STAtt-GCN model, and capture the dependencies between services and changes in resource usage.
[0050] Dynamic resource prediction: Based on the current network status and historical data, the STAtt-GCN model is used to predict future resource requirements.
[0051] Dynamic resource optimization and scheduling: Based on the prediction results, the deployment and resource coordination of the Web application container are adjusted to ensure efficient use of resources.
[0052] Fault detection and recovery: The STAtt-GCN model is used to detect abnormal containers, the fault impact scope is evaluated through the graph propagation mechanism, and service migration or restart strategies are automatically executed.
[0053] Summarize:
[0054] This embodiment implements efficient resource management and fault recovery by real-time monitoring and prediction of resource requirements of Web application containers, thereby improving the performance and reliability of Web applications.
[0055] 2. Example 2: AI training task resource management based on dynamic graph network
[0056] Specific steps:
[0057] Build a dynamic graph network model: monitor the operating status, resource usage, and dependencies of each container node of the AI training task, and build a dynamic spatiotemporal graph.
[0058] Training the STAtt-GCN model: Collect long-term historical data of AI training tasks, train the STAtt-GCN model, and analyze resource usage patterns.
[0059] Dynamic resource prediction: Use the STAtt-GCN model to predict the resource requirements of future AI training tasks, especially during high-load periods.
[0060] Dynamic resource optimization and scheduling: Adjust resource configuration and container deployment in advance to ensure that AI training tasks can efficiently utilize resources without resource competition.
[0061] Fault detection and recovery: The STAtt-GCN model is used to detect abnormal nodes, assess the scope of fault propagation, and automatically adjust task migration or restart to minimize training interruption time.
[0062] Summarize:
[0063] This embodiment targets the high resource requirements of AI training tasks, and effectively avoids resource competition by dynamically predicting and optimizing resource allocation, thereby improving training efficiency and system stability.
[0064] 3. Example 3: E-commerce platform resource management based on dynamic graph network
[0065] Specific steps:
[0066] Build a dynamic graph network model: monitor the container status, resource usage and dependencies of each service module of the e-commerce platform, and build a dynamic space-time graph.
[0067] Training the STAtt-GCN model: Collect historical data on platform operation, train the STAtt-GCN model, and analyze the changing patterns of resource demand.
[0068] Dynamic resource forecasting: Based on the trained model, predict resource demand during future peak and trough periods.
[0069] Dynamic resource optimization and scheduling: Based on the prediction results, dynamically adjust the resource allocation of the service module to ensure sufficient supply of resources during peak periods and save resources during low periods.
[0070] Fault detection and recovery: Use the STAtt-GCN model to detect abnormal services, assess the impact of faults, and automatically perform service migration or restart to maintain high availability of the platform.
[0071] Summarize:
[0072] This embodiment achieves efficient resource utilization during the peak and trough periods of the e-commerce platform through dynamic resource prediction and optimization, ensuring the stable operation of the platform and user experience.
[0073] 4. Example 4: Online game server resource management based on dynamic graph network
[0074] Specific steps:
[0075] Build a dynamic graph network model: monitor the operating status, resource usage, and game session dependencies of each container of the online game server, and build a dynamic spatiotemporal graph.
[0076] Training the STAtt-GCN model: Collect historical operation data of the game server and train the STAtt-GCN model to capture player activity patterns and changes in resource requirements.
[0077] Dynamic Resource Forecasting: The STAtt-GCN model is used to predict future changes in resource demand, especially during peak activity periods.
[0078] Dynamic resource optimization and scheduling: Adjust server resource configuration and container deployment in advance to ensure smooth operation of the game during peak hours.
[0079] Fault detection and recovery: Detect abnormal server nodes through the STAtt-GCN model, evaluate fault propagation, and automatically perform service migration or restart to reduce game interruptions.
[0080] Summarize:
[0081] This embodiment improves the response speed and stability of the online game server during peak periods and optimizes the game experience of players through dynamic resource management and fault recovery mechanisms.
[0082] 5. Example 5: Financial transaction system resource management based on dynamic graph network
[0083] Specific steps:
[0084] Build a dynamic graph network model: monitor the status of each service container in the financial transaction system, resource usage, and service dependencies, and build a dynamic spatiotemporal graph.
[0085] Training the STAtt-GCN model: Collect long-term historical data of system operation, train the STAtt-GCN model, and analyze transaction patterns and resource requirements.
[0086] Dynamic resource forecasting: Predict resource requirements during future transaction peaks based on models to ensure efficient operation of the system.
[0087] Dynamic resource optimization and scheduling: Adjust resource allocation in advance to ensure sufficient system resources during peak trading periods and save resources during off-peak periods.
[0088] Fault detection and recovery: Use the STAtt-GCN model to detect and identify abnormal nodes, assess the scope of fault impact, automatically perform service migration or restart, and minimize the risk of transaction interruption.
[0089] Summarize:
[0090] This embodiment effectively copes with the high load demands of the financial transaction system through accurate resource prediction and optimized scheduling, thereby improving the stability of the system and the continuity of transactions.
[0091] Summary
[0092] These five examples are targeted at different types of application scenarios, demonstrating the wide applicability of containerized resource management methods based on dynamic graph networks. By building a dynamic graph network model, training and applying the STAtt-GCN model for resource prediction, and dynamically adjusting resource configuration and fault detection and recovery, the system's resource utilization and operational stability are significantly improved. These methods not only optimize resource management for different types of applications, but also improve the system's elasticity and response speed, helping to cope with various challenges in complex dynamic environments.
[0093] Overall test experimental design
[0094] In order to verify the effectiveness of the containerized resource management method based on dynamic graph networks, five different application scenarios (Web applications, AI training tasks, e-commerce platforms, online game servers, and financial trading systems) were tested. The test experiment includes the following steps:
[0095] Environment preparation: Set up the test environment for each application scenario, including container deployment and service dependency configuration.
[0096] Data collection: Collect long-term historical operation data of each scenario for model training.
[0097] Model training: Train the STAtt-GCN model to learn resource usage patterns using the collected data.
[0098] Baseline testing: Use traditional Kubernetes resource management methods to perform testing and record baseline data.
[0099] Dynamic resource management test: Apply the STAtt-GCN model for resource prediction and scheduling, and record the improved data.
[0100] Comparison of results: Analyze and compare the data from the baseline test and the dynamic resource management test to evaluate the improvement effect of the method.
[0101] Testing Process
[0102] Environmental preparation:
[0103] Deploy the required containers and services, ensuring that dependencies and configurations are correct for each scenario.
[0104] Specifically, it includes the configuration of Web servers, AI training task nodes, e-commerce platform services, game servers and financial transaction systems.
[0105] Data Collection:
[0106] Three months of operation data are collected for each scenario, including CPU usage, memory usage, network traffic, service call dependencies, and fault conditions.
[0107] The recorded data is used for model training and testing comparison.
[0108] Model training:
[0109] The collected data is used to train the STAtt-GCN model to capture the resource usage patterns and service dependencies of each scenario.
[0110] Validate the accuracy and predictive power of the model.
[0111] Baseline Test:
[0112] Use the Kubernetes default resource management policy for testing.
[0113] Record resource utilization, service response time, and fault recovery time for each scenario.
[0114] Dynamic resource management test:
[0115] The STAtt-GCN model is applied for resource prediction and scheduling.
[0116] Record resource utilization, service response time, and fault recovery time for each scenario.
[0117] Comparison of results:
[0118] Compare the data from the baseline test and the dynamic resource management test.
[0119] Analyze improvements in resource utilization and fault recovery time.
[0120] Test data and results
[0121] The following is a summary of the test data and results:
[0122] Application Scenario Improved resource utilization Reduced failure recovery time Improved service response time Web Application 15% 30% 20% AI training tasks 20% 25% 15% E-commerce Platform 18% 28% 18% Online Game Servers 22% 35% 25% Financial trading system 19% 32% 22%
[0123] Summarize
[0124] Through the overall test experiments, the effectiveness of the containerized resource management method based on dynamic graph networks in multiple application scenarios was verified, and each scenario showed obvious improvements.
[0125] 1. Experiment 1: Comparison of resource allocation efficiency
[0126] Objective: To compare the resource allocation efficiency of the existing Kubernetes resource management strategy and the resource management method based on dynamic graph network of the present invention.
[0127] Existing technical solutions:
[0128] Kubernetes' default resource management strategy uses static resource allocation and fixed resource requests / limits, and cannot adjust resource allocation in real time based on inter-service dependencies and dynamic loads.
[0129] Technical solution of the present invention:
[0130] The dynamic resource allocation strategy based on the STAtt-GCN model uses spatial and temporal attention mechanisms to dynamically adjust resource allocation and improve resource utilization.
[0131] Testing process:
[0132] Deploy Web application containers, configure dependencies, and deploy front-end, back-end, and database services.
[0133] Collect one month of historical operation data, including CPU usage, memory usage, number of requests, and response time of each container.
[0134] Use the collected data to train the STAtt-GCN model and configure the Kubernetes default resource management strategy.
[0135] Baseline test: Use Kubernetes default policies for resource management and record resource utilization, task completion time, service response time, and resource waste rate.
[0136] Dynamic resource management test: Apply the STAtt-GCN model for resource prediction and scheduling, and record resource utilization, task completion time, service response time, and resource waste rate.
[0137] Repeat the above steps three times to ensure the stability and reliability of the data.
[0138] Experimental data table:
[0139]
[0140] 2. Experiment 2: Comparison of fault recovery time
[0141] Objective: To compare the performance of existing fault detection and recovery mechanisms with the fault detection and instant recovery mechanism based on dynamic graph networks in terms of fault recovery time.
[0142] Existing technical solutions:
[0143] Kubernetes' default health check and restart mechanism relies on simple health check probes, which cannot quickly assess the scope of failure impact and implement effective recovery strategies.
[0144] Technical solution of the present invention:
[0145] The fault detection and instant recovery mechanism based on the STAtt-GCN model uses spatiotemporal feature patterns and graph propagation mechanisms to quickly assess the impact scope of faults and execute service migration or restart strategies.
[0146] Testing process:
[0147] Deploy e-commerce platform services and configure dependencies, including product services, order services, payment services, and user services.
[0148] Collect two months of historical operation data, including the number of requests, failure rate, resource usage, and dependencies of each service.
[0149] Use the collected data to train the STAtt-GCN model and configure the Kubernetes default fault detection and recovery mechanism.
[0150] Simulate service failures, such as network outages, resource exhaustion, etc.
[0151] Baseline test: Use the default Kubernetes mechanism for fault detection and recovery, and record the fault detection time, fault recovery time, service interruption time, and fault propagation range.
[0152] Dynamic resource management test: Apply the STAtt-GCN model for fault detection and recovery, and record the fault detection time, fault recovery time, service interruption time, and fault propagation range.
[0153] Repeat the above steps three times to ensure the stability and reliability of the data.
[0154] Experimental data table:
[0155]
[0156]
[0157] 3. Experiment 3: Comparison of service response time under dynamic load
[0158] Objective: To compare the service response time performance of the existing dynamic scheduling strategy and the dynamic resource scheduling strategy based on dynamic graph network of the present invention under dynamic load.
[0159] Existing technical solutions:
[0160] Kubernetes HPA (Horizontal Pod Autoscaler) adjusts the number of replicas based on CPU / memory utilization, but cannot optimize scheduling based on time series predictions and service dependencies.
[0161] Technical solution of the present invention:
[0162] The dynamic resource scheduling strategy based on the STAtt-GCN model uses the temporal attention mechanism to predict load changes and dynamically adjust resource allocation and service deployment.
[0163] Testing process:
[0164] Deploy online game servers and configure dependencies, including game logic servers, database servers, and chat servers.
[0165] Collect load fluctuation data, including CPU usage, memory usage, number of requests, and response time for each server.
[0166] Use the collected data to train the STAtt-GCN model and configure Kubernetes HPA respectively.
[0167] Simulate dynamic loads, including peak and trough fluctuations in user requests.
[0168] Baseline test: Use Kubernetes HPA for dynamic resource scheduling and record service response time, CPU utilization, memory utilization, number of requests processed, and error rate.
[0169] Dynamic resource management test: Apply the STAtt-GCN model for dynamic resource scheduling and record service response time, CPU utilization, memory utilization, number of requests processed, and error rate.
[0170] Repeat the above steps three times to ensure the stability and reliability of the data.
[0171] Experimental data table:
[0172]
[0173] Summary
[0174] Through the above three comparative experiments, it is verified that the containerized resource management method based on dynamic graph network of the present invention has significant advantages in resource allocation efficiency, fault recovery time and service response time under dynamic load.
[0175] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A containerized resource management method based on dynamic graph network, It is characterized in that The following steps are involved: Build a dynamic graph network model to build a dynamically updated spatiotemporal graph by monitoring the running status, resource usage, and inter-service dependencies of containers or services in real time; Train the STAtt-GCN model for dynamic resource prediction, collect long-term operation history data of containers or services, and train the STAtt-GCN model; Apply the STAtt-GCN model for dynamic resource prediction. Based on the trained STAtt-GCN model, input the current network status and historical data to predict resource demand in the future. Dynamic resource optimization and scheduling: According to STAtt-GCN's forecast of resource demand in the future, container deployment and resource coordination are adjusted in advance; Fault detection,The STAtt-GCN model is used to identify node anomalies.
2. According to the containerized resource management method based on dynamic graph network according to claim 1, It is characterized in that The steps of constructing the dynamic graph network model include: Learn the importance differences between containers through spatial attention mechanism; Dynamically adjust the importance given to different adjacent containers.
3. According to the containerized resource management method based on dynamic graph network according to claim 1, It is characterized in that The spatial attention mechanism includes the dependency strength between containers and the current task requirements to adjust the importance of different adjacent containers.
4. According to claim 1, a containerized resource management method based on a dynamic graph network, It is characterized in that The construction of the dynamic graph network model comprises the following steps: Captured through temporal attention mechanism; Emphasize the importance of container status changes at different time points.
5. According to claim 4, a containerized resource management method based on a dynamic graph network, It is characterized in that The temporal attention mechanism includes predicting future resource requirements, identifying abnormal behavior patterns, and considering fluctuations in time series in resource scheduling.
6. A containerized resource management method based on a dynamic graph network according to claim 1, It is characterized in that The dynamic resource optimization and scheduling includes the following steps: Predict resource demand for a period of time in the future based on the STAtt-GCN model; The system adjusts container deployment and resource coordination in advance; Realize dynamic resource optimization and scheduling.
7. According to claim 1, a containerized resource management method based on a dynamic graph network, It is characterized in that The fault detection step comprises: Assess the impact scope through the spatiotemporal characteristic patterns and graph propagation mechanisms of anomalies; When an abnormality is detected on a node, the impact scope is evaluated through a propagation mechanism, and the system automatically executes service migration or restart strategies based on the impact scope to minimize service interruption time.
8. According to claim 1, a containerized resource management method based on a dynamic graph network, It is characterized in that The fault detection comprises the following steps: Use the STAtt-GCN model to detect and identify node anomalies; Assess the impact scope through graph propagation mechanism.
9. A containerized resource management method based on a dynamic graph network according to claim 8, It is characterized in that The STAtt-GCN model detects and automatically executes service migration or restart strategies according to the impact scope to minimize service interruption time.
10. A containerized resource management system based on a dynamic graph network, used to implement a containerized resource management method based on a dynamic graph network as described in any one of claims 1 to 9, include: Resource monitoring module, which is used to build dynamic graph network models and monitor the running status of containers or services, including CPU usage, memory usage, and network traffic; STAtt-GCN model module, used for spatiotemporal prediction, uses the spatial attention mechanism to analyze and learn the dependencies and importance differences between containers, and adjusts the weights of different adjacent containers; The resource allocation and fault recovery strategy module is used for resource allocation strategy and fault recovery strategy. According to the prediction results of the STAtt-GCN model, it dynamically adjusts the deployment and resource coordination of containers to optimize resource utilization and system performance.
Citation Information
Cited By
Automatic management method and system for disaster recovery process of intelligent calculation center
CN119003249A
Distributed network resource dynamic allocation method and system based on multiple strategies
CN119766756A
Multi-strategy based dynamic allocation method and system for distributed network resources
CN119766756B
Container cloud-oriented task flow flexible arrangement system and method
CN119960937A
Model dynamic publishing method based on TensorFlow
CN120256028A
