Resource scheduling method and device, storage medium and product
By acquiring real-time resource monitoring data and combining it with various resource configuration models, and using dynamic programming algorithms to establish optimized resource configuration strategies, the problem of insufficient adaptability and intelligence in cloud resource scheduling is solved, achieving more efficient resource management and accurate early warning.
Patent Information
- Application Number
- CN202511793589.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-01
- Publication Date
- 2026-02-27
AI Technical Summary
Existing technologies lack effective resource scheduling solutions for cloud resource monitoring and early warning, resulting in low adaptability and intelligence in dynamically changing environments, leading to false alarms or missed alarms and poor resource scheduling performance.
By acquiring various resource monitoring data in real time and combining multiple preset resource configuration models (including resource scheduling, task scheduling, and load prediction modes), dynamic programming algorithms are used to establish different model elements, determine optimized resource configuration strategies, and perform resource scheduling.
It improves the accuracy and adaptability of resource scheduling, enables more precise and efficient resource management, reduces resource waste, increases resource utilization, and ensures the accuracy of early warning.
Smart Images

Figure CN121579211A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud computing technology, and in particular to a resource scheduling method, device, storage medium and product. Background Technology
[0002] Cloud resource monitoring and early warning are crucial aspects of modern cloud computing environments, ensuring system stability, performance, and security. However, with the widespread adoption of cloud services, there are still no effective solutions for accurately scheduling computing, storage, and network resources during cloud resource monitoring. Summary of the Invention
[0003] This application provides a resource scheduling method, device, storage medium, and product that can improve the accuracy of resource scheduling.
[0004] The technical solution of this application embodiment is implemented as follows: This application provides a resource scheduling method, the method comprising: During the monitoring of various resources on various cloud hosts, various resource monitoring data are obtained; Based on the various resource monitoring data and different preset resource configuration models, an optimized resource configuration strategy is determined; wherein, the multiple preset resource configuration models include multiple of a first model, a second model, and a third model, the first model is used to make resource configuration decisions in a resource scheduling mode according to a dynamic programming algorithm, the second model is used to make resource configuration decisions in a task scheduling mode according to a dynamic programming algorithm, and the third model is used to make resource configuration decisions in a load prediction mode according to a dynamic programming algorithm. Based on the optimized resource allocation strategy, resource scheduling is performed on various resources of each cloud host.
[0005] In some exemplary embodiments, before determining the optimized resource configuration strategy based on the various resource monitoring data and different preset resource configuration models, the method further includes: According to the dynamic programming algorithm, the first model is established by setting the first dynamic programming model elements corresponding to the resource scheduling mode; Based on the dynamic programming algorithm, the second model is established by setting the second dynamic programming model elements corresponding to the task scheduling mode; Based on the dynamic programming algorithm and the trained prediction model for load prediction, the third model is established by setting the elements of the third dynamic programming model corresponding to the load prediction mode. The trained prediction model is trained based on various historical resource monitoring data. The elements of the first dynamic programming model, the elements of the second dynamic programming model, and the elements of the third dynamic programming model are different.
[0006] In some exemplary embodiments, the first dynamic programming model elements include multiple elements such as a first model objective, a first state space, a first decision variable, a first objective function, and a first recursive equation; wherein, the first model objective includes minimizing resource cost or minimizing system latency; each state in the first state space is used to represent the current resource allocation; the first decision variable includes selecting a resource pool for task allocation or adjusting resource configuration; the first objective function includes a cost function representing total cost or total latency; and the first recursive equation is determined based on the first objective function and the Bellman equation.
[0007] In some exemplary embodiments, the elements of the second dynamic programming model include multiple elements such as a second model objective, a second state space, a second decision variable, a second objective function, and a second recursive equation; wherein, the second model objective includes minimizing the total task execution time or maximizing resource utilization; each state in the second state space represents the current task queue and the current resource allocation; the second decision variable includes selecting the execution order of tasks or selecting a strategy for allocating resources; the second objective function includes a function representing the total task execution time or the total resource utilization; and the second recursive equation is determined based on the second objective function and the Bellman equation.
[0008] In some exemplary embodiments, the third dynamic programming model elements include multiple elements such as a third model objective, a third state space, a third decision variable, a third objective function, and a third recursive equation; wherein, the third model objective includes minimizing prediction error or minimizing resource waste; each state in the third state space is used to represent historical resource allocation; the third decision variable includes adjusting the quantity of resources or adjusting the type of resources; the third objective function includes a function used to represent the total prediction error or the total resource idle rate; and the third recursive equation is determined based on the third objective function and the trained prediction model.
[0009] In some exemplary embodiments, determining an optimized resource configuration strategy based on the various resource monitoring data and different preset resource configuration models includes: The various resource monitoring data are input into the multiple preset resource configuration models to obtain the optimal values of the decision variables of the multiple preset resource configuration models; Based on the optimal values of the decision variables of the various preset resource allocation models, an optimized resource allocation strategy is determined.
[0010] In some exemplary embodiments, determining an optimized resource configuration strategy based on the various resource monitoring data and different preset resource configuration models includes: Divide the monitoring period into multiple time periods; Based on the multiple time periods, determine the given time period; Based on the given time period, various resource monitoring data, and different preset resource configuration models, an optimized resource configuration strategy is determined.
[0011] This application provides an electronic device, the electronic device comprising: Memory is used to store executable instructions or computer programs. The processor, when executing computer-executable instructions or computer programs stored in the memory, implements the resource scheduling method provided in the embodiments of this application.
[0012] This application provides a computer-readable storage medium storing a computer program or computer-executable instructions. When the computer program or computer-executable instructions are executed by a processor, they implement the resource scheduling method provided in this application.
[0013] This application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, they implement the resource scheduling method provided in this application.
[0014] The embodiments of this application have the following beneficial effects: The resource scheduling method, device, storage medium and product provided in the embodiments of this application, in the process of monitoring various resources of various cloud hosts, determines the optimized resource configuration strategy by acquiring various resource monitoring data in real time and different preset resource configuration models, and performs resource scheduling on various resources of various cloud hosts according to the optimized resource configuration strategy. Because there are multiple preset resource allocation models, including multiple models such as the first model, the second model, and the third model, resource allocation decisions can be made from multiple modes (resource scheduling, task scheduling, and load prediction). This allows for resource allocation decisions to be made from multiple modes, ensuring that the determined optimized resource allocation strategy is the overall optimal resource allocation model. Therefore, in a dynamically changing environment, an optimized resource allocation strategy can be automatically determined, and resource scheduling can be automatically performed based on this strategy. This improves the accuracy of resource scheduling, achieves more precise and efficient resource management, and ultimately increases resource utilization. Attached Figure Description
[0015] Figure 1 This is a first flowchart illustrating a resource scheduling method provided in an embodiment of this application; Figure 2 This is a second flowchart illustrating a resource scheduling method provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0016] It should be noted that the terms "first" and "second" mentioned above are only used to distinguish between different options and do not represent the degree of superiority or inferiority of the options or their priority in the implementation process. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0018] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0019] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0020] In this document, the term "one or more" means any combination of at least two of a plurality of elements, such as one or more of A, B, and C, which can mean any one or more elements selected from the set consisting of A, B, and C. The term "one or more" means any one of a plurality of elements or any combination of at least two of a plurality of elements, such as one or more of A, B, and C, which can mean any one or more elements selected from the set consisting of A, B, and C.
[0021] In the embodiments of this application, the terms "module," "unit," or "component" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0022] Unless otherwise defined, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in the embodiments of this application is for the purpose of describing the embodiments of this application only and is not intended to limit this application.
[0023] In the implementation of this application, the collection and processing of relevant data should strictly comply with the requirements of relevant laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.
[0024] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained below, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.
[0025] 1. Dynamic programming (DP) is a method used in mathematics and computer science to solve complex problems by breaking them down into relatively simpler subproblems. Building a model based on dynamic programming involves analyzing the problem and establishing its fundamental dynamic programming equations.
[0026] 2. Cloud hosting is a virtualized computing resource service based on cloud computing technology. It allows users to access and use computing resources located in remote data centers, such as servers, storage, and networks, via a network. These resources can be dynamically allocated and expanded according to user needs. Cloud hosting provides enterprises and individuals with a flexible, efficient, and cost-effective computing resource usage model.
[0027] 3. Resource allocation refers to the allocation of resources, while resource scheduling refers to the process of dynamically adjusting and allocating resources based on actual operating conditions after allocation. Resource scheduling focuses on real-time optimization and adjustment of resources.
[0028] Cloud resource monitoring and early warning are crucial components of modern cloud computing environments, ensuring system stability, performance, and security. However, most cloud resource monitoring solutions rely on static threshold monitoring, anomaly detection, and custom rules, which are poorly adaptable to environments with large load variations, potentially leading to false alarms or missed alarms. Their low adaptability and intelligence result in ineffective resource scheduling.
[0029] This application provides a resource scheduling method, device, storage medium, and product. During the monitoring of various resources on various cloud hosts, by acquiring real-time resource monitoring data and various preset resource configuration models, an optimized resource configuration strategy for the next stage is determined. Based on this optimized strategy, resource scheduling is performed on the various resources of each cloud host. Since the preset resource configuration models are different, including multiple models such as a first model, a second model, and a third model, and the first model is used for resource configuration decisions based on a dynamic programming algorithm using a resource scheduling mode, the second model is used for resource configuration decisions based on a dynamic programming algorithm using a task scheduling mode, and the third model is used for resource configuration decisions based on a dynamic programming algorithm using a load prediction mode, resource configuration decisions can be made from multiple modes (resource scheduling mode, task scheduling mode, and load prediction mode). This ensures that the determined optimized resource configuration strategy is the overall optimal resource configuration model. Therefore, it can automatically determine the optimized resource configuration strategy in a dynamically changing environment and automatically perform resource scheduling based on the optimized strategy, improving the accuracy of resource scheduling, achieving more precise and efficient resource management, and ultimately improving resource utilization. Furthermore, applying the resource scheduling method provided in this application to subsequent resource early warning can accurately guide the subsequent early warning process and ensure the accuracy of the early warning.
[0030] In some exemplary embodiments, the cloud host can be a cloud host in a cloud computing environment of various sizes, such as a public cloud, a private cloud, or a hybrid cloud architecture.
[0031] In some exemplary embodiments, the resource scheduling methods provided in the various embodiments of this application can achieve effective and accurate resource scheduling, and are applicable to various cloud computing scenarios that require resource monitoring and early warning, such as public cloud, private cloud and hybrid cloud.
[0032] Figure 1 This is a first flowchart illustrating a resource scheduling method provided in an embodiment of this application. The following will be combined with... Figure 1 Please provide an explanation. For example... Figure 1 As shown, the resource scheduling method may include the following steps S101 to S103: Step S101: During the monitoring of various resources of each cloud host, obtain various resource monitoring data.
[0033] In some exemplary embodiments, various resources may include resources in a cloud computing environment (also known as cloud resources), such as a central processing unit (CPU), memory, storage, and network.
[0034] In some exemplary embodiments, various resource monitoring data may include: CPU utilization (%), memory utilization (%), disk utilization (%), and network utilization (%). CPU utilization is a CPU performance metric that represents the percentage of user processes, system processes, and idle processes executed by the CPU within a specific time period. Memory utilization is a memory performance metric that represents the percentage of memory used and available. Disk utilization refers to the percentage of time the disk spends processing I / O (input / output), reflecting the disk's workload in processing I / O requests per unit of time. Network utilization is a network performance metric that represents the percentage of network bandwidth used out of total bandwidth. Used bandwidth refers to the amount of data actually transmitted by the network within a given time period, while total bandwidth refers to the amount of data the network can theoretically transmit.
[0035] Of course, in addition to the four resource metrics listed above, various resource monitoring data may also include other resource metrics, such as CPU load average, available memory size, available disk size, and other disk I / O metrics. This application embodiment does not limit this.
[0036] Step S102: Based on various resource monitoring data and different preset resource configuration models, determine the optimized resource configuration strategy; wherein, the preset resource configuration models may include multiple of the following: the first model, the second model, and the third model. The first model is used to make resource configuration decisions in the mode of resource scheduling according to the dynamic programming algorithm, the second model is used to make resource configuration decisions in the mode of task scheduling according to the dynamic programming algorithm, and the third model is used to make resource configuration decisions in the mode of load prediction according to the dynamic programming algorithm.
[0037] Step S103: Based on the optimized resource allocation strategy, perform resource scheduling on various resources of each cloud host.
[0038] The first, second, and third models are all built using dynamic programming algorithms, but the dynamic programming model elements set in their construction differ. For example, dynamic programming model elements may include multiple sub-elements such as the model objective, state space, decision variables, objective function, and recursive equation. Therefore, the difference in the dynamic programming model elements set in the first, second, and third models can refer to one or more differences among these sub-elements. These sub-elements can be set according to business scenarios in the cloud computing field, such as resource allocation, resource scheduling, and task scheduling.
[0039] Here, the model objective refers to the optimization objective of the dynamic programming model. In some exemplary embodiments, the model objective can be defined as minimizing resource costs, maximizing system performance, or satisfying a Service Level Agreement (SLA). A Service Level Agreement is an agreement between a customer and a cloud service provider that specifies the service level and quality standards that the cloud service provider should provide, such as availability (e.g., the percentage of time the system is available), performance (e.g., the number of requests processed per second), and capacity. For example, the model objective can be defined as minimizing resource costs, minimizing system latency, minimizing total task execution time, maximizing resource utilization, minimizing prediction errors, and minimizing resource waste.
[0040] In some exemplary embodiments, the states in the state space can represent resource states, the states of other factors related to resources (such as task queues), etc. For example, the states in the state space can be defined as the current resource allocation status, the current task queue, historical resource allocation status, etc. Resource allocation status can refer to monitored resource usage, such as various resource monitoring data such as CPU utilization, memory utilization, disk utilization, and network utilization.
[0041] In some exemplary embodiments, decision variables refer to variables that can influence resource scheduling decisions. For example, decision variables can be defined as selecting a resource pool for task allocation, adjusting resource configuration, selecting the execution order of tasks, selecting a resource allocation strategy, adjusting the number of resources, and adjusting the resource type. For instance, selecting a resource pool for task allocation could mean changing resource pool 1 to another resource pool 2. Adjusting resource configuration could mean changing resource configuration 1 of a task to another resource configuration 2, where resource configuration 1 has a CPU utilization of 60% and memory utilization of 80%, and resource configuration 2 has a CPU utilization of 30% and memory utilization of 50%. Selecting the execution order of tasks could mean adjusting the position of tasks in the task queue, such as changing the task queue {task 1, task 2, task 3} to {task 3, task 1, task 2}. Adjusting the number of resources could mean increasing or decreasing the number of computing nodes. Adjusting the resource type could mean adjusting the type of CPU, memory, etc.
[0042] In some exemplary embodiments, the objective function may be a function established based on the model objective. For example, if the model objective is to minimize resource costs, then the objective function may be a cost function representing the total cost. As another example, if the model objective is to minimize system latency, then the objective function may be a cost function representing the total latency.
[0043] For example, the objective function uses a cost function to represent the total cost, as shown in formula (1): (1); Where i represents resources (such as CPU, memory, etc.). This represents the total cost of resource i in state s. It is the unit cost of resource i. It represents the usage of resource i.
[0044] In some exemplary embodiments, the recursive equation can be a recursive relation equation established based on the objective function, used to calculate costs or service levels under different resource configurations. For example, the recursive equation can be determined based on the objective function and the Bellman equation. The Bellman equation is named after its proposer, Richard Bellman, and is also known as a dynamic programming equation.
[0045] For example, if the model objective is to minimize resource cost and the objective function is the cost function, then the recursive equation can be shown in formula (2): (2); in, It is the minimum resource cost of performing action a in time t and state s (i.e., the current state), where a represents the action (i.e., resource allocation). The cost of performing action a in state s. This indicates that the action 'a' transitions from state 's' to the next state. The probability of (i.e., the future state). In the next time t+1 and the next state The cost of performing action 'a'.
[0046] Thus, the resource scheduling method provided in the embodiments of this application, during the monitoring of various resources of each cloud host, can determine the optimized resource configuration strategy for the next stage based on real-time acquired resource monitoring data and various preset resource configuration models, and perform resource scheduling on various resources of each cloud host according to the optimized resource configuration strategy. Since the various preset resource configuration models are different, and include multiple models such as a first model, a second model, and a third model, where the first model is used to make resource configuration decisions based on a dynamic programming algorithm in a resource scheduling mode, the second model is used to make resource configuration decisions based on a dynamic programming algorithm in a task scheduling mode, and the third model is used to make resource configuration decisions based on a dynamic programming algorithm in a load prediction mode, resource configuration decisions can be made by combining multiple modes such as resource scheduling, task scheduling, and load prediction. This can address different business scenarios and ensure that the determined optimized resource configuration strategy is the overall optimal resource configuration model. Therefore, it can improve the accuracy, adaptability, and intelligence of resource scheduling, effectively reduce resource waste while ensuring system performance, and thus improve resource utilization. Furthermore, applying the resource scheduling method provided in this application to subsequent resource early warning can accurately guide the subsequent early warning process and ensure the accuracy of the early warning.
[0047] Figure 2 This is a second flowchart illustrating a resource scheduling method provided in an embodiment of this application. The following will be combined with... Figure 2 Explanation is provided. Before step S102 or before step S101, such as... Figure 2 As shown, taking multiple preset resource configuration models, including the first model, the second model, and the third model, as an example, the resource scheduling method may further include the following steps S201 to S203: Step S201: Based on the dynamic programming algorithm, establish the first model by setting the first dynamic programming model elements corresponding to the resource scheduling mode.
[0048] Step S202: Based on the dynamic programming algorithm, establish the second model by setting the second dynamic programming model elements corresponding to the task scheduling mode.
[0049] Step S203: Based on the dynamic programming algorithm and the trained prediction model used for load prediction, a third model is established by setting the elements of the third dynamic programming model corresponding to the load prediction mode. The trained prediction model is obtained by training based on historical resource monitoring data.
[0050] Among them, resource scheduling, task scheduling, and load forecasting are different resource allocation modes. By setting different resource allocation models, the resource allocation optimization objectives focused on by different preset resource allocation models are different. For example, the first model, which uses resource scheduling to make resource allocation decisions, focuses on resource allocation costs and latency; the second model, which uses task scheduling to make resource allocation decisions, focuses on task execution time and resource utilization; and the third model, which uses load forecasting to make resource allocation decisions, focuses on prediction errors. In this way, not only is the differentiation between preset resource allocation models enhanced, but the scientificity and rationality of the overall resource scheduling strategy are also improved, while avoiding the limitations brought about by fixed rules or single algorithm models in related technologies.
[0051] In this context, the elements of the first, second, and third dynamic programming models are different. Dynamic programming model elements refer to the elements defined in the process of applying the dynamic programming algorithm to analyze a problem and establish its basic dynamic programming equations. For example, dynamic programming model elements may include multiple sub-elements such as the model objective, state space, decision variables, objective function, and recursive equation. Therefore, the difference between the first, second, and third dynamic programming model elements could mean that one or more of the sub-elements such as the model objective, state space, decision variables, objective function, and recursive equation are different when establishing the first, second, and third models. For example, the model objectives in the first, second, and third dynamic programming model elements are different. Similarly, the recursive equations in the first, second, and third dynamic programming model elements are different.
[0052] Thus, the resource scheduling method provided in the embodiments of this application can pre-establish a first model by setting the first dynamic programming model elements corresponding to the resource scheduling mode, a second model by setting the second dynamic programming model elements corresponding to the task scheduling mode, and a third model based on the prediction model by setting the third dynamic programming model elements corresponding to the load prediction mode. In this way, by defining different dynamic programming model elements for each resource configuration mode, three different preset resource configuration models can be pre-established according to the dynamic programming algorithm, which can more accurately match the resource scheduling needs of different scenarios. Thus, during the monitoring of various resources of each cloud host, the optimized resource configuration strategy for the next stage can be determined based on the real-time acquired resource monitoring data and the three different preset resource configuration models, and resource scheduling can be performed on various resources of each cloud host according to the optimized resource configuration strategy. Because three different preset resource configuration models are established in advance based on the dynamic programming algorithm, resource configuration decisions can be made from three modes during resource scheduling: resource scheduling mode, task scheduling mode, and load prediction mode. This ensures that the determined optimized resource configuration strategy is the overall optimal resource configuration strategy. Therefore, resource scheduling based on this overall optimal resource configuration strategy improves the accuracy of resource scheduling, thereby ensuring full utilization of resources, improving resource utilization rate, avoiding over- or under-use of resources, and reducing the operating costs of cloud computing. Furthermore, resource scheduling can be based on real-time resource monitoring data, avoiding resource waste due to over-configuration and avoiding impact on business performance due to insufficient resources. In addition, applying the resource scheduling method provided in this application to subsequent resource early warning can accurately guide subsequent early warning processes, ensuring the accuracy of early warnings.
[0053] In some exemplary embodiments, the elements of the first dynamic programming model may include multiple elements such as a first model objective, a first state space, first decision variables, a first objective function, and a first recursive equation. For example, the first model objective may include minimizing resource cost or minimizing system latency; each state in the first state space may be used to represent the current resource allocation; the first decision variables may include selecting a resource pool for task allocation or adjusting resource configuration; the first objective function may include a cost function representing total cost or total latency; and the first recursive equation may be determined based on the first objective function and the Bellman equation. Here, a resource pool is a basic unit in the cloud computing technology field where platforms isolate various machines and computing resources for different regions of a user, and can be divided into several resource pools according to the actual scenario.
[0054] In some exemplary embodiments, the elements of the first dynamic programming model can be defined as follows: the first model objective includes minimizing resource costs; each state in the first state space represents the current resource allocation; the first decision variables include selecting a resource pool for task allocation or adjusting resource configuration; the first objective function includes a cost function representing the total cost; and the first recursive equation is determined based on the first objective function and the Bellman equation. Thus, a first model with minimizing resource costs as the optimization objective can be determined.
[0055] In other exemplary embodiments, the elements of the first dynamic programming model may be defined as follows: the first model objective includes minimizing system latency; each state in the first state space represents the current resource allocation; the first decision variables include selecting a resource pool for task allocation or adjusting resource configuration; the first objective function includes a cost function representing the total latency; and the first recursive equation is determined based on the first objective function and the Bellman equation. Thus, another first model with minimizing system latency as the optimization objective can be determined.
[0056] For example, taking the first model objective as minimizing resource cost, and the first objective function as the cost function representing the total cost, then the first recursive equation can be shown in formula (3): (3); in, It is the minimum resource cost (i.e. the optimal value of the first decision variable) of performing action a under time t and state s, where a represents the action (i.e. a resource allocation decision, such as selecting a resource pool). The cost of performing action a in state s. This indicates that the action 'a' transitions from state 's' to the next state. The probability, The cost of performing action a at time t and in state s.
[0057] In some exemplary embodiments, the number of first models configured in the multiple preset resource configuration models can be one or more. For example, if there are multiple first models, then the multiple first models may include: a first model with the optimization objective of minimizing resource cost and another first model with the optimization objective of minimizing system latency. This is beneficial for minimizing both resource cost and system latency, enabling more comprehensive resource configuration decisions based on resource scheduling patterns, and facilitating the determination of a better resource scheduling strategy.
[0058] In some exemplary embodiments, the elements of the second dynamic programming model may include multiple elements such as a second model objective, a second state space, second decision variables, a second objective function, and a second recursive equation. For example, the second model objective may include minimizing the total task execution time or maximizing resource utilization; each state in the second state space may be used to represent the current task queue and the current resource allocation; the second decision variables may include selecting the execution order of tasks or selecting a strategy for allocating resources; the second objective function may include a function representing the total task execution time or the total resource utilization; and the second recursive equation may be determined based on the second objective function and the Bellman equation.
[0059] In some exemplary embodiments, the elements of the second dynamic programming model can be defined as follows: the second model objective includes minimizing the total task execution time; each state in the second state space represents the current task queue and the current resource allocation; the second decision variable may include selecting the execution order of tasks or selecting a strategy for allocating resources; the second objective function may include a function representing the total task execution time; and the second recursive equation can be determined based on the second objective function and the Bellman equation. Thus, a first second model with minimizing the total task execution time as the optimization objective can be determined.
[0060] In other exemplary embodiments, the elements of the second dynamic programming model may be defined as follows: the second model objective includes maximizing resource utilization; each state in the second state space represents the current task queue and the current resource allocation; the second decision variables may include selecting the execution order of tasks or selecting a strategy for allocating resources; the second objective function includes a function representing the total resource utilization; and the second recursive equation is determined based on the second objective function and the Bellman equation. Thus, another second model with maximizing resource utilization as the optimization objective can be determined.
[0061] For example, the second objective function can be a function representing the total execution time of the task, as shown in formula (4): (4); in, This represents the total execution time of task j at time t. This indicates the priority of task j. It is the execution time of task j.
[0062] For example, taking the second model objective as minimizing resource cost, and using a function to represent the total execution time of the task as the second objective function, then the second recursive equation can be shown in formula (5): (5); in, It is the minimum total execution time of the task (i.e., the optimal value of the second decision variable) for performing action a under time t and state s, where a represents the action (i.e., a resource allocation decision, such as choosing the execution order of tasks). The cost of performing action a in state s. This indicates that the action 'a' transitions from state 's' to the next state. The probability, The task completion time for performing action a at time t and in state s.
[0063] In some exemplary embodiments, the number of second models configured in the multiple preset resource configuration models can be one or more. For example, taking the example of multiple second models, the multiple second models may include: a second model with the optimization objective of minimizing the total task execution time and another second model with the optimization objective of maximizing resource utilization. This is beneficial for minimizing the total task execution time and maximizing resource utilization, enabling more comprehensive resource configuration decisions based on task scheduling patterns, facilitating the determination of better resource scheduling strategies, helping to shorten task processing time, and achieving more efficient resource allocation.
[0064] In some exemplary embodiments, the elements of the third dynamic programming model may include multiple elements such as a third model objective, a third state space, a third decision variable, a third state transition function, a third objective function, and a third recursive equation. For example, the third model objective may include minimizing prediction error or minimizing resource waste; each state in the third state space may be used to represent historical resource allocation; the third decision variable may include adjusting the quantity or type of resources; the third objective function may include a function representing the total prediction error or the total resource idle rate; and the third recursive equation can be determined based on the third objective function and the trained prediction model. Thus, by combining machine learning prediction models with dynamic programming, intelligent prediction and dynamic adjustment of future resource demands are achieved. This approach not only identifies potential resource bottlenecks in advance but also continuously corrects and optimizes prediction results during actual operation, thereby reducing resource waste or shortages caused by misjudgments. Furthermore, since the prediction model parameters are derived from historical data, they possess high reliability and practicality.
[0065] In some exemplary embodiments, the elements of the third dynamic programming model can be defined as follows: the third model objective includes minimizing the prediction error; each state in the third state space represents a historical resource allocation; the third decision variable includes adjusting the resource quantity or adjusting the resource type; the third objective function includes a function representing the total prediction error; and the third recursive equation is determined based on the third objective function and the trained prediction model. Thus, a third model with minimizing the prediction error as its optimization objective can be determined.
[0066] In other exemplary embodiments, the elements of the third dynamic programming model can be defined as follows: the third model objective includes minimizing resource waste; each state in the third state space represents a historical resource allocation; the third decision variable includes adjusting the quantity or type of resources; the third objective function includes a function representing the total resource idle rate; and the third recursive equation is determined based on the third objective function and the trained prediction model. Thus, another third model with the optimization objective of minimizing resource waste can be determined.
[0067] For example, taking the objective of the third model as minimizing the prediction error, the third recursive equation can be expressed as shown in equation (6): (6); in, It is a forecast of the load (i.e., resource forecast data). It is the prediction error (i.e. the error between the actual resource monitoring data and the predicted resource forecast data). It represents the cost of adjusting resource allocation, where 'a' represents an action (i.e., a resource allocation decision).
[0068] In some exemplary embodiments, the number of third models configured in the multiple preset resource allocation models can be one or more. For example, if there are multiple third models, they can include: one third model with the optimization objective of minimizing prediction error and another third model with the optimization objective of minimizing resource waste. In this way, resource allocation decisions can be made more comprehensively based on load prediction patterns, making it easier to determine a better resource scheduling strategy.
[0069] In some exemplary embodiments, the multiple preset resource allocation models may include: one or more first models, one or more second models, and one or more third models. For example, the multiple preset resource allocation models may include: one or more of a first model with the optimization objective of minimizing resource cost and another first model with the optimization objective of minimizing system latency; one or more of a second model with the optimization objective of minimizing total task execution time and another second model with the optimization objective of maximizing resource utilization; and one or more of a third model with the optimization objective of minimizing prediction error and another third model with the optimization objective of minimizing resource waste. Therefore, through multi-model collaborative decision-making, resource allocation decisions can be made more comprehensively and effectively, improving the scientificity and rationality of the overall scheduling strategy, addressing different business situations, and ensuring that the determined optimized resource allocation strategy is the overall optimal resource allocation model. This improves the accuracy, adaptability, and intelligence of resource scheduling, effectively reducing resource waste while ensuring system performance, thereby increasing resource utilization. Furthermore, applying the resource scheduling method provided in this application to subsequent resource early warning can accurately guide subsequent early warning processes, ensuring the accuracy of early warnings.
[0070] In some exemplary embodiments, prior to step S203 or S201, the resource scheduling method may further include the following steps: Obtain the raw dataset, which may include: various historical resource monitoring data; Preprocess the original dataset to obtain the sample dataset; Based on the sample dataset, a well-trained prediction model is obtained by training it using machine learning algorithms.
[0071] In some exemplary embodiments, the trained prediction model can be a time series model.
[0072] In some exemplary embodiments, the machine learning algorithm may employ models used for time series modeling, such as regression models, autoregressive integrated moving average models (ARIMA) models, or long short-term memory networks (LSTM).
[0073] In some exemplary embodiments, data preprocessing may include one or more of the following: cleaning, standardization, and smoothing. Cleaning is used to remove missing values, outliers, and noise from the original dataset to ensure data quality. Standardization is used to standardize data from different sources into a uniform format to facilitate subsequent analysis. Smoothing is used to reduce the impact of short-term fluctuations.
[0074] In some exemplary embodiments, after obtaining the trained prediction model, the resource scheduling method may further include the following steps: acquiring various resource prediction data output by the trained prediction model; comparing real-time resource monitoring data with the various resource prediction data; and determining whether to issue an early warning based on the comparison results. For example, when the predicted resource data exceeds the current resource carrying capacity, indicating a potential overload risk, an early warning message is generated and triggered. In this way, potential resource bottlenecks or system performance problems can be identified in advance, and early warnings can be issued, reducing downtime caused by system failures and improving the stability and reliability of the cloud computing system.
[0075] In some exemplary embodiments, after obtaining the trained prediction model, the resource scheduling method may further include the following steps: acquiring various resource prediction data output by the trained prediction model; comparing the various resource prediction data with preset thresholds for various resources; and determining whether to issue an alert based on the comparison results. For example, when the CPU prediction data shows that the CPU utilization rate is 90%, exceeding a preset CPU threshold (such as 80%), an alert message is generated and triggered. This notifies the operations team and automatically adjusts resource configuration, such as starting additional instances or adjusting the load balancing strategy. Furthermore, in practical applications, the preset thresholds for various resources can be dynamically adjusted based on historical resource monitoring data, resource prediction data predicted by the prediction model, and dynamic programming analysis results (i.e., optimized resource configuration strategies), making the alert mechanism more flexible and intelligent, and able to adapt to dynamic changes in resource load. This makes alerts more accurate and timely, reducing false alarms and missed alarms.
[0076] In some exemplary embodiments, after generating and triggering an early warning, the resource scheduling method may further include: automatically adjusting resource allocation based on the early warning information. For example, activating backup resources or performing load balancing, automatically scaling up instances, adjusting traffic routing, etc.
[0077] In some exemplary embodiments, after generating and triggering the early warning information, the resource scheduling method may further include issuing an early warning message, which includes the early warning information. This allows administrators and operations teams to be notified to make manual interventions and decisions based on the early warning information.
[0078] In other exemplary embodiments, after generating and triggering the warning information, the resource scheduling method may further include issuing a warning message, which includes warning information and an optimized resource allocation strategy. This can provide decision support suggestions to administrators, operations teams, etc., helping them optimize resource allocation, reduce operating costs, and improve the overall efficiency of the system.
[0079] In some exemplary embodiments, step S102 may include the following steps: By inputting various resource monitoring data into multiple preset resource configuration models, the optimal values of the decision variables of the multiple preset resource configuration models are obtained; Based on the optimal values of decision variables from multiple preset resource allocation models, an optimized resource allocation strategy is determined.
[0080] In some exemplary embodiments, determining an optimized resource allocation strategy based on the optimal values of decision variables from multiple preset resource allocation models may include: determining multiple resource allocation strategies based on the optimal values of decision variables from multiple preset resource allocation models; and selecting the overall optimal resource allocation strategy from the multiple resource allocation strategies as the optimized resource allocation strategy.
[0081] In other exemplary embodiments, determining an optimized resource allocation strategy based on the optimal values of decision variables from multiple preset resource allocation models may include: determining multiple resource allocation strategies based on the optimal values of decision variables from multiple preset resource allocation models; and fusing the multiple resource allocation strategies to obtain a fused resource allocation strategy as the optimized resource allocation strategy.
[0082] Thus, in the resource scheduling method provided in this application, by inputting real-time monitored resource data into various preset resource configuration models and calculating the optimal solution of decision variables, multi-dimensional resource evaluation and scheduling decisions can be achieved. This not only improves the comprehensiveness of the decision-making but also enhances the system's adaptability, enabling it to better cope with complex and ever-changing business needs.
[0083] In some exemplary embodiments, step S102 may include the following steps: Divide the monitoring period into multiple time periods; Determine the given time period based on multiple time periods; Based on a given time period, various resource monitoring data, and different preset resource configuration models, an optimized resource configuration strategy is determined.
[0084] In some exemplary embodiments, the monitoring period can be hourly, daily, weekly, etc.
[0085] For example, taking an hourly monitoring period as an example, the multiple time periods divided according to the monitoring period can include: 1 minute - 10 minutes, 10 minutes - 20 minutes, 20 minutes - 30 minutes, 30 minutes - 40 minutes, 40 minutes - 50 minutes, 50 minutes - 60 minutes, etc. Then, the given time period can be one or more of these multiple time periods; for example, the given time period could be 10 minutes - 20 minutes, 30 minutes - 40 minutes, 40 minutes - 50 minutes, etc.
[0086] Thus, the resource scheduling method provided in this application, by subdividing the entire monitoring period into several time periods and formulating resource configuration strategies for each given time period, can achieve more refined resource management. This not only helps improve the timeliness of resource scheduling but also maintains a good balance between different business peak periods, thereby ensuring the continuous and stable operation of the system.
[0087] In some exemplary embodiments, when the resource scheduling method is applied in a multi-cloud environment, step S103 may include the following steps: based on an optimized resource configuration strategy, performing resource scheduling on various resources of each cloud host across different cloud platforms. This enables automatic load balancing across different cloud platforms based on resource monitoring data, thereby optimizing overall resource utilization.
[0088] In other exemplary embodiments, when the resource scheduling method is applied to a multi-cloud environment, step S103 may include the following step: scheduling various resources of each cloud host from different cloud providers based on an optimized resource configuration strategy. This enables resource scheduling and optimization among different cloud providers based on resource monitoring data.
[0089] The present application will be further described in detail below with reference to exemplary application embodiments. Here, the application embodiments are merely examples of application embodiments of a resource scheduling method provided by the embodiments of the present application, to help those skilled in the art understand the technical content of the present application, but do not mean that the embodiments of the present application cannot be used in other devices, systems, environments or scenarios.
[0090] This application proposes an application embodiment of a cloud resource monitoring and early warning processing method based on machine learning. This method applies dynamic programming algorithms to all stages of cloud resource monitoring, including resource management, fault prediction, and early warning response. The machine learning-based cloud resource monitoring and early warning processing method can include three stages: resource monitoring data modeling, optimizing resource allocation strategies, and establishing early warning mechanisms and response measures. Specifically, the three stages are illustrated below: (1) Resource monitoring data modeling For example, the resource monitoring data modeling phase may include the following steps: A1: Obtain resource monitoring data.
[0091] For example, resource monitoring data can include data that characterizes the status of cloud computing resources, such as CPU utilization, memory usage, disk I / O metrics, and network bandwidth.
[0092] For example, resource monitoring data includes real-time resource monitoring data and historical resource monitoring data.
[0093] A11: By monitoring various resources, collecting various resource monitoring data and various historical resource monitoring data, a resource monitoring dataset is obtained.
[0094] A12: Obtain various cloud computing resource monitoring data through cloud platform monitoring tools, application logs, performance counters, etc.
[0095] A2: Perform data preprocessing on resource monitoring data. For example, data preprocessing may include one or more of the following: cleaning, standardization, and smoothing.
[0096] For example, A2 may include one or more of the following steps: A21: Clean up missing values, outliers, and noise in resource monitoring data. This ensures data quality.
[0097] A22: Standardize data from different sources into a unified format. This facilitates subsequent analysis.
[0098] A23: Smooth the time-series data in resource monitoring data (e.g., by using a moving average). This can reduce the impact of short-term fluctuations.
[0099] A3: State-space modeling A31: Define the state space: Discretize the continuous resource monitoring data into multiple levels (e.g., define them as low, medium, and high levels) to obtain the state space S.
[0100] For example, the state space S can include the following dimensions: CPU utilization can be categorized into three states: low, medium, and high. Memory usage can be categorized into three states: low, medium, and high. Disk utilization (also known as disk I / O utilization) can be categorized as low, medium, or high. Network usage can be categorized as low, medium, or high.
[0101] For example, CPU utilization: Low (<40%), Medium (40%-70%), High (>70%); Memory utilization: Low (<40%), Medium (40%-80%), High (>80%); Disk utilization: Low (<30%), Medium (30%-80%), High (>80%); Network utilization: Low (<30%), Medium (30%-70%), High (>70%).
[0102] state Next state Let S be the set of resource state spaces. State s represents the current resource allocation status of the cloud host, and the next state s' represents the resource allocation status of the cloud host in the next stage (e.g., the resource allocation status for the next hour, day, or week). For example, s is a four-dimensional vector s = (2, 1, 0, 1) representing CPU utilization > 70%, memory utilization 40%-80%, I / O < 30%, and network utilization 30%-70%.
[0103] A32: Based on the resource allocation strategy, we obtain the action space A. Each action a in the action space A represents a resource allocation strategy, i.e., a decision variable.
[0104] For example, resource allocation strategies may include: adjusting resource pools, adjusting resource locations, increasing or decreasing the number of resources (such as increasing or decreasing the number of compute nodes), adjusting resource types (such as memory-based, balanced, compute-based, storage-based, etc.), and adjusting task locations.
[0105] Storage-oriented cloud servers achieve high throughput by optimizing storage I / O paths; balanced cloud servers are characterized by a balanced CPU / memory ratio; memory-oriented cloud servers achieve low-latency computing through large-capacity memory and optimized memory access; and compute-oriented cloud servers achieve fast computing with high CPU and high memory. If a compute node becomes overloaded, tasks can be migrated to other nodes (within the same resource pool or in other resource pools) to balance resources. For example, tasks can be moved from high-memory hosts to low-memory hosts, or from high-CPU-utilization hosts to low-CPU-utilization hosts.
[0106] A33: Define the state transition matrix, which represents the transition probabilities under different states.
[0107] A4: Based on historical resource monitoring data, use ARIMA (Autoregressive Integral Moving Average) or LSTM (Long Short-Term Memory) network to perform time series modeling and obtain a predictive model for predicting future resource demand.
[0108] A5: Divide the monitoring cycle (such as hour, day, week, etc.) into multiple stages, with each stage representing a time period.
[0109] A6: Based on the dynamic programming algorithm, establish a dynamic programming model to obtain various preset resource allocation models, such as the first model (also known as the resource scheduling optimization model) for resource allocation decisions based on resource scheduling, the second model (also known as the task scheduling model) for resource allocation decisions based on task scheduling, and the third model (also known as the load forecasting and adjustment model) for resource allocation decisions based on load forecasting. The model objective (also known as the model optimization objective) can be defined as: minimizing resource costs, maximizing system performance, or satisfying the Service Level Agreement (SLA), etc.; based on the model optimization objective, construct the objective function. Using the recursive equations in the dynamic programming algorithm, calculate the cost, system performance, or service level under different configurations to determine the optimal decision from the current state s to the next state s' (i.e., the future state).
[0110] For example, A6 may include the following steps: A61: Based on the dynamic programming algorithm, a resource scheduling optimization model is established by defining the dynamic programming model elements of the resource scheduling optimization model (i.e., defining the first dynamic programming model element corresponding to the resource scheduling mode). For example, the dynamic programming model elements of the resource scheduling optimization model may include one or more of the following sub-elements: Model objective: To optimize resource scheduling strategies to minimize latency, cost, or other resource utilization metrics.
[0111] State definition: Each state can be represented as the current allocation of resources. For example, the current usage of CPU, memory, and storage.
[0112] Decision variables: choosing which resource pool to assign the task to, or adjusting the resource configuration.
[0113] State transition: The state transition function defines the process from the current resource configuration to the next configuration. State transitions may depend on dynamic factors such as task arrival and resource release.
[0114] Objective function: This is typically a cost function, such as a function representing total delay or total cost. The goal of dynamic programming is to minimize this cost function to minimize delay or cost.
[0115] Recurrence relation: Calculate the optimal strategy using the Bellman equation.
[0116] A62: Based on the dynamic programming algorithm, a task scheduling model is established by defining the dynamic programming model elements of the task scheduling model (i.e., by defining the second dynamic programming model elements corresponding to the task scheduling mode). For example, the dynamic programming model elements of the task scheduling model may include one or more of the following sub-elements: Model objective: Minimize total task execution time or maximize resource utilization. This involves optimal scheduling among multiple tasks and resources to improve system efficiency and performance.
[0117] Status definition: The current queue and resource allocation status of the task.
[0118] Decision variables: the order in which tasks are executed or the strategy for allocating resources.
[0119] State transition: Task completion and resource release. The state transition function describes the resource state after the task is completed.
[0120] Objective function: A function used to represent the total execution time or total resource utilization of a task.
[0121] Recursive relationship: Update task scheduling strategy through dynamic programming.
[0122] A63: Based on the dynamic programming algorithm and a pre-trained prediction model for load forecasting, a load forecasting and adjustment model is established by setting the dynamic programming model elements (the third dynamic programming model elements corresponding to the load forecasting pattern) corresponding to the load forecasting and adjustment model. The pre-trained prediction model is obtained by training various historical resource monitoring data. The dynamic programming model elements corresponding to the load forecasting and adjustment model may include one or more of the following sub-elements: Model objective: Minimize prediction error or minimize resource waste. This allows for the prediction of future resource needs and the adjustment of resource allocation accordingly.
[0123] State definition: A time series of historical load data. For example, CPU utilization, memory utilization, etc., over a past period.
[0124] Decision variables: Adjusting the quantity or type of resources. For example, increasing or decreasing the number of computing nodes.
[0125] State transition: Determining trends in load changes using historical data and predictive models. Time series analysis or machine learning models can be used to estimate future loads.
[0126] Objective function: Total prediction error or total resource idle rate between actual load and predicted load.
[0127] Recursive relationship: Using dynamic programming to update the parameters of the predictive model.
[0128] (2) Optimize resource allocation strategy For example, the stage of optimizing resource allocation strategies may include the following steps: B1: After obtaining the aforementioned various preset resource configuration models, such as a first model (also known as a resource scheduling optimization model) for making resource configuration decisions based on a dynamic programming algorithm in a resource scheduling mode, a second model (also known as a task scheduling model) for making resource configuration decisions based on a dynamic programming algorithm in a task scheduling mode, and a third model (also known as a load forecasting and adjustment model) for making resource configuration decisions based on a dynamic programming algorithm in a load forecasting mode, an optimized resource configuration strategy can be determined based on various resource monitoring data and the different preset resource configuration models during the monitoring of various resources of each cloud host. Based on the optimized resource configuration strategy, resource scheduling is then performed on various resources of each cloud host. In this way, these dynamic programming models effectively help manage and optimize cloud computing resources, providing reliable decision support.
[0129] (3) Establish an early warning mechanism and response measures For example, the phase of establishing an early warning mechanism and response measures may include the following steps: C1: Obtain resource forecasting data through pre-trained forecasting models. For example, predict future resource demand and load using time series analysis, regression models, or machine learning methods.
[0130] C2: Compares real-time resource monitoring data with resource prediction data to identify potential resource bottlenecks. If the predicted load exceeds the current resource capacity, there may be an overload risk.
[0131] C3: Set thresholds for various resource usage (e.g., a threshold of 80% for CPU utilization). Once a threshold is reached (e.g., CPU utilization exceeds 80%), an alert is triggered. In practical applications, the thresholds can be dynamically adjusted based on historical resource monitoring data and predictive models.
[0132] C4: Based on the results of the dynamic programming algorithm, it automatically triggers an alert when a potential bottleneck is identified. This notifies the operations team and automatically adjusts resource configurations, such as starting additional instances or adjusting load balancing strategies.
[0133] C5: Automatically adjusts resource allocation based on early warning information, starts backup resources or performs load balancing, automatically expands instances, adjusts traffic routing, etc.
[0134] Thus, the resource scheduling method provided in this application, in cloud computing resource monitoring, uses dynamic programming algorithms to establish various preset resource configuration models, which can effectively determine optimized resource configuration strategies and automatically adjust resource allocation. This not only improves resource utilization efficiency but also enhances system stability and responsiveness. Furthermore, through pre-trained predictive models and early warning mechanisms, it can effectively anticipate and address resource bottlenecks and overload issues.
[0135] The resource scheduling method provided in this application has the following advantages compared with related technologies based on static threshold monitoring and custom rule monitoring: (1) Improve resource utilization efficiency and system stability: Through dynamic programming algorithms, starting from multiple modes (resource scheduling mode, task scheduling mode, and load prediction mode), resource allocation can be automatically optimized in a dynamically changing environment, ensuring that resources are fully utilized, reducing operating costs, and improving the overall efficiency of the system. This enhances the stability and reliability of the cloud computing system.
[0136] (2) Enhance the accuracy of early warning: Combining dynamic programming algorithm with prediction model trained based on historical resource monitoring data can more accurately predict resource demand and identify potential problems, making early warning more accurate and timely, and reducing false alarms and missed alarms.
[0137] Embodiments of this application provide an electronic device that may include: Memory is used to store executable instructions or computer programs. A processor, when executing computer-executable instructions or computer programs stored in memory, implements one or more of the resource scheduling methods provided in the embodiments of this application.
[0138] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. For example, this electronic device can be applied to... Figure 1 In a corresponding embodiment, a resource scheduling method is provided. For example... Figure 3 As shown, the electronic device 300 may include a processor 301, a memory 302, and a bus system 303. The various components in the electronic device 300 are coupled together via the bus system 303. Wherein: Bus system 303 is used to realize the communication connection between processor 301 and memory 302; Memory 302 is used to store computer-executable instructions or computer programs; When the processor 301 executes computer-executable instructions or computer programs stored in the memory 302, it implements the resource scheduling method in one or more exemplary embodiments described above.
[0139] In some exemplary embodiments, the bus system 303 may include, in addition to a data bus, a power bus, a control bus, and a status signal bus, etc. However, for the sake of clarity, in... Figure 3 The general designated all buses as Bus System 303.
[0140] In some exemplary embodiments, the electronic device may also include a server (such as a standalone physical server), or a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services, etc.
[0141] In some exemplary embodiments, the processor may be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., wherein the general-purpose processor may be a microprocessor or any conventional processor, etc.
[0142] This application provides a computer-readable storage medium storing computer-executable instructions or a computer program. When the computer-executable instructions or the computer program are executed by a processor, the resource scheduling method provided in this application can be implemented. For example, ... Figure 1 The resource scheduling method is shown.
[0143] This application provides a computer program product, which includes a computer program or computer-executable instructions. When the computer-executable instructions or the computer program are executed by a processor, the resource scheduling method provided in this application can be implemented. For example, ... Figure 1 The resource scheduling method is illustrated. For example, the computer program or computer-executable instructions are stored in a computer-readable storage medium, the processor of the electronic device reads the computer program or computer-executable instructions from the computer-readable storage medium, and the processor executes the computer program or computer-executable instructions, causing the electronic device to perform the resource scheduling method provided in the embodiments of this application.
[0144] In some exemplary embodiments, the aforementioned computer-readable storage medium / memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM), etc.; or it may be various terminals including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0145] In some embodiments, a computer program or computer-executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0146] As an example, a computer program or computer-executable instructions may, but not necessarily, correspond to a file in a file system. It may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., a file that stores one or more modules, subroutines, or code sections).
[0147] As an example, a computer program or computer-executable instructions may be deployed to execute on one electronic device, or on multiple electronic devices located at one location, or on multiple electronic devices distributed across multiple locations and interconnected by a communication network.
[0148] It should be noted that the descriptions of the above device, storage medium, or product embodiments are similar to the descriptions of the above method embodiments, and have similar beneficial effects. For technical details not disclosed in the device, storage medium, or product embodiments of this application, those skilled in the art should refer to the descriptions of the method embodiments of this disclosure for understanding. Further details will not be repeated here.
[0149] The features disclosed in the several methods, devices, storage media or product embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments, devices, storage media or product embodiments.
[0150] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. A resource scheduling method, characterized in that, The method comprises: In the process of monitoring various resources of each cloud host, obtaining various resource monitoring data; Based on the various resource monitoring data and different multiple preset resource configuration models, an optimized resource configuration strategy is determined; wherein the multiple preset resource configuration models include: a first model, a second model and a third model, the first model is used for resource configuration decision-making in the mode of resource scheduling according to the dynamic programming algorithm, the second model is used for resource configuration decision-making in the mode of task scheduling according to the dynamic programming algorithm, and the third model is used for resource configuration decision-making in the mode of load prediction according to the dynamic programming algorithm; Based on the optimized resource configuration strategy, the various resources of each cloud host are scheduled.
2. The method of claim 1, wherein, Before the step of determining the optimized resource configuration strategy based on the various resource monitoring data and different multiple preset resource configuration models, the method further comprises: According to the dynamic programming algorithm, a first dynamic programming model element corresponding to the mode of resource scheduling is set to establish the first model; According to the dynamic programming algorithm, a second dynamic programming model element corresponding to the mode of task scheduling is set to establish the second model; According to the dynamic programming algorithm and a trained prediction model for load prediction, a third dynamic programming model element corresponding to the mode of load prediction is set to establish the third model, and the trained prediction model is trained according to various historical resource monitoring data; Wherein, the first dynamic programming model element, the second dynamic programming model element and the third dynamic programming model element are not the same.
3. The method of claim 2, wherein, The first dynamic programming model element includes: first model target, first state space, first decision variable, first objective function and first recursive equation; wherein the first model target includes minimizing resource cost or minimizing system delay; each state in the first state space is used to represent the current resource allocation; the first decision variable includes selecting a resource pool for task allocation or adjusting resource configuration; the first objective function includes a cost function for representing total cost or total delay; and the first recursive equation is determined according to the first objective function and Bellman equation.
4. The method of claim 2, wherein, The second dynamic programming model element includes: second model target, second state space, second decision variable, second objective function and second recursive equation; wherein the second model target includes minimizing total task execution time or maximizing resource utilization; each state in the second state space is used to represent the current task queue and the current resource allocation; the second decision variable includes selecting the execution order of the task or selecting the allocation resource strategy; the second objective function includes a function for representing the total task execution time or the total resource utilization; and the second recursive equation is determined according to the second objective function and Bellman equation.
5. The method of claim 2, wherein, The third dynamic programming model element includes: third model target, third state space, third decision variable, third objective function and third recursive equation; wherein, the third model target includes minimizing prediction error or minimizing resource waste; each state in the third state space is used to represent historical resource allocation; the third decision variable includes adjusting resource quantity or adjusting resource type; the third objective function includes a function for representing total prediction error or total resource idle rate; the third recursive equation is determined according to the third objective function and the trained prediction model.
6. The method according to any one of claims 1 to 5, characterized in that, The method for determining the optimized resource allocation strategy based on the various resource monitoring data and different preset resource allocation models includes: inputting the various resource monitoring data into the multiple preset resource allocation models to obtain optimal values of decision variables of the multiple preset resource allocation models; determining the optimized resource allocation strategy based on the optimal values of the decision variables of the multiple preset resource allocation models.
7. The method according to any one of claims 1 to 5, characterized in that, The method for determining the optimized resource allocation strategy based on the various resource monitoring data and different preset resource allocation models includes: dividing the monitoring period into multiple time periods; determining a given time period according to the multiple time periods; determining the optimized resource allocation strategy based on the various resource monitoring data and different preset resource allocation models according to the given time period.
8. An electronic device, comprising: The electronic device includes: a memory for storing computer executable instructions or computer programs; a processor for executing the computer executable instructions or computer programs stored in the memory to implement the method in any one of claims 1 to 7.
9. A computer readable storage medium storing a computer program or computer executable instructions, characterized in that, The computer program or computer executable instructions are executed by the processor to implement the method in any one of claims 1 to 7.
10. A computer program product comprising computer programs or computer executable instructions, characterized in that, The computer program or computer executable instructions are executed by the processor to implement the method in any one of claims 1 to 7. The computer program or computer executable instructions are executed by the processor to implement the method in any one of claims 1 to 7.