Random forest-driven workflow cost optimization scheduling method in multi-cloud environment

By combining random forest regression model and adaptive particle swarm optimization in a multi-cloud environment, and dynamically adjusting parameters and resource allocation, the problem of minimizing workflow scheduling costs in a multi-cloud environment is solved, and efficient scheduling is achieved while meeting deadline constraints.

CN121979677APending Publication Date: 2026-05-05HUNAN UNIV OF TECH
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUNAN UNIV OF TECH
Filing Date
2026-01-20
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing workflow scheduling technologies in multi-cloud environments struggle to minimize scheduling costs while meeting strict deadline constraints. They suffer from problems such as blind searching, low quality of initial solutions, lack of targeted resource matching, numerous invalid search behaviors, high dependence on real-time data, and high algorithm complexity.

Method used

A high-quality initial scheduling scheme is generated using a random forest regression model. Combining task and resource characteristics, the inertia weight and learning factor are dynamically adjusted. Through adaptive particle swarm optimization iteration, a reflection boundary mechanism and a dynamic weight fitness function are adopted to optimize the allocation of critical task resources, thus constructing a workflow cost optimization scheduling method in a multi-cloud environment.

Benefits of technology

It improves the quality of the initial solution, accelerates the search for the global optimal solution, ensures the stability and convergence of the algorithm in a multi-cloud environment, and achieves cost minimization while satisfying the deadline constraint.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121979677A_ABST
    Figure CN121979677A_ABST
Patent Text Reader

Abstract

The invention discloses a workflow cost optimization scheduling method driven by a random forest in a multi-cloud environment, and the method comprises the steps: fusing task features and resource features through a random forest regression model, generating a training sample through three strategies, and screening out high-quality initial particles in combination with an optimization scoring mechanism of cost and overtime penalty; quantifying population diversity by using a dynamic parameter driven by population diversity and a boundary constraint strategy and using an average Euclidean distance from all particles to a population centroid, dynamically adjusting an inertia weight and a learning factor of nonlinear attenuation, and introducing a reflection boundary mechanism to correct particles beyond a range; and finally, designing a dynamic weight fitness function, dynamically adjusting the solution of the time constraint according to the urgency degree of the deadline, and applying gradient penalty, dynamic adaptation performance weight and cost weight. The method is excellent in success rate of searching the optimal solution, and is obviously superior to similar algorithms in the aspect of reducing the scheduling execution cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of cloud computing systems and resource management technology, and in particular, relates to a workflow cost optimization scheduling method driven by random forest in a multi-cloud environment. Background Technology

[0002] In today's rapidly evolving cloud computing landscape, as workflows continue to expand, the limitations of single cloud service providers in terms of resource supply capacity and service continuity are becoming increasingly apparent. Therefore, multi-cloud environments, which integrate resources from multiple cloud service providers, have become the core computing infrastructure for enterprises and research institutions to meet the diverse workflow application and workload needs. In the multi-cloud computing field, mainstream cloud service providers such as Amazon, Google, and Microsoft, with their widely distributed computing and storage facilities, can provide users with rich and flexible solutions and services.

[0003] Workflow scheduling technologies in multi-cloud environments have made some progress. For example, the traditional particle swarm optimization (PSO) algorithm possesses global search capabilities by simulating natural mechanisms, which can avoid local optima to some extent. Machine learning-based scheduling methods can also leverage historical data to capture implicit relationships between tasks and resources, improving the intelligence level of scheduling. However, these technologies still have significant shortcomings, making it difficult to minimize scheduling costs while meeting strict deadline constraints.

[0004] Specifically, metaheuristic algorithms often employ static parameter settings, and the inertia weights and learning factors cannot be dynamically adjusted according to population distribution. This leads to blind searching during the global exploration phase and convergence stagnation during the local development phase, making it difficult to balance search breadth and accuracy. Initial solution generation relies heavily on random allocation mechanisms, lacking coordinated guidance from task and resource characteristics, resulting in low-quality initial populations and significantly extending the search cycle for the global optimum. The matching of critical tasks and resources lacks specificity, failing to differentiate task priorities based on task slackness, making it difficult for critical path tasks to obtain high-performance resources first, directly impacting deadline fulfillment rates. Furthermore, traditional search mechanisms lack refined exploration of the solution space, have unreasonable boundary handling methods, and exhibit a large amount of invalid search behavior, further increasing scheduling costs. Machine learning-based scheduling methods, on the other hand, face high training costs and high dependence on real-time data quality, making them difficult to adapt to the dynamic changes in resource performance, pricing, and task dependencies in multi-cloud environments.

[0005] Existing technologies still face challenges in balancing search efficiency and solution quality, adapting to multi-cloud dynamic environments, and controlling scheduling costs. Minimizing workflow scheduling costs while meeting deadline constraints has become a core issue that urgently needs to be addressed.

[0006] In 2023, Ye et al. proposed the F-ant colony optimization (F-ACO) algorithm, which integrates deadline allocation, adaptive ant colony optimization, and a cost-driven feedback mechanism. This algorithm dynamically adjusts task sub-deadlines through a weighted upward ranking model, constructs the task scheduling order using adaptive ant colony optimization, and reduces virtual machine idle time by incorporating a resource idle slot feedback mechanism. By decomposing deadline constraints to the task level and combining a cost-driven resource allocation strategy, it effectively reduces overall scheduling costs while ensuring timely workflow completion. While the multi-level dynamic adjustment mechanism consisting of deadline decomposition, adaptive ant colony optimization, and cost feedback improves scheduling accuracy, the sequential dependencies and real-time coordination at each level introduce high collaborative computation costs, significantly increasing the overall algorithm complexity.

[0007] In 2024, Sun et al. proposed an enhanced task type-first algorithm (ET2FA) designed to address cloud environments with instance hibernation and per-second billing characteristics, and designed a three-stage scheduling framework. The algorithm sorts tasks based on topology level and task type, and uses compact scheduling conditions to guide virtual machine selection. It also employs an instance hibernation scheduling heuristic to switch idle instances, thereby reducing costs. Furthermore, when handling multi-structured workflows, the algorithm successfully achieves an effective balance between deadline constraints and cost optimization goals by dynamically adjusting task execution timing and resource allocation. However, this algorithm, which sorts and schedules tasks according to fixed rules (topology level and task type), may lack sufficient flexibility when handling workflows with variable structures or complex dependencies. In addition, its reliance on instance hibernation mechanisms may affect performance in real-world cloud environments due to state switching delays, and the cost-saving effect is uncertain.

[0008] Patent application CN115983130A discloses a global optimal solution search method based on an improved particle swarm optimization algorithm. The method initializes the position and velocity values ​​of each particle in the solution space according to determined algorithm parameters, and calculates the initial individual optimal solution and the global optimal solution based on the fitness function. The particle velocity and position are updated according to a newly established inertia weight strategy. A mutation mechanism is introduced into the solution space, and the fitness function values ​​of all particles are recalculated. The global optimal solution is compared and updated based on the fitness values ​​of all mutated particles. The individual optimal solution of each particle is compared and updated based on its current fitness value and its previous fitness value. These steps are repeated until the maximum number of iterations is reached or the optimal solution for the fitness function is found. While the dynamic adjustment of inertia weights and the mutation mechanism introduced in this patent enhance the algorithm's exploration capability, the increased iteration steps and judgment conditions also significantly increase the computational cost of the algorithm. Summary of the Invention

[0009] This invention addresses the challenges that existing technologies still face in balancing search efficiency and solution quality, adapting to multi-cloud dynamic environments, and controlling scheduling costs. Minimizing workflow scheduling costs while meeting deadline constraints has become a core issue that urgently needs to be solved. This invention proposes a random forest-driven workflow cost optimization scheduling method for multi-cloud environments.

[0010] A workflow cost optimization scheduling method driven by random forest in a multi-cloud environment includes the following steps:

[0011] S1. Construct a workflow scheduling model in a multi-cloud environment. The workflow scheduling model includes a workflow model and a resource model; the scheduling objective is to meet the deadline constraint. Minimize the total execution cost of the workflow under the premise of... ,in, To calculate the cost, For communication costs; S2. Using a random forest regression model, based on the characteristics of each task in the workflow and the resource characteristics of each virtual machine in the multi-cloud environment, a set of high-quality initial scheduling schemes is generated. The task characteristics and resource characteristics are integrated to construct the training sample feature vector. Training samples are generated through multiple strategies and a high-quality initial particles are selected by combining the cost and timeout penalty optimization scoring mechanism. S3. Calculate the average Euclidean distance from all particles to the population centroid to quantify population diversity, and dynamically adjust the inertia weight and learning factor of the particle swarm optimization algorithm based on the population diversity. S4. Perform an adaptive particle swarm optimization iterative process on the initial particle swarm until all particles have been traversed. Update the particle position and velocity through iteration. Use a reflection boundary mechanism to correct out-of-bounds particles and configure a velocity decay coefficient to suppress boundary oscillations. At the same time, distinguish between critical and non-critical tasks based on task relaxation and prioritize the allocation of high-performance virtual machine resources to critical tasks. S5. Dynamically adjust the time and cost weights based on the urgency of the deadline, construct a dynamic weight fitness function and add a timeout penalty term, and evaluate the scheduling schemes for all particles. S6. Output the final scheduling scheme that satisfies the deadline constraint and has the optimal total execution cost.

[0012] Further, in step S4, the task slack is calculated as the difference between the latest start time and the earliest start time of each task on each virtual machine, which is taken as the slack time of the task on that virtual machine; tasks with a slack time less than or equal to zero are identified as critical tasks on the critical path.

[0013] Furthermore, in step S2, the training of the random forest regression model includes the following steps: S21. Generate training samples: Employ multiple strategies, including a balance-oriented strategy, a time-performance-first strategy, and a diversity-exploration strategy, to generate multiple task-virtual machine mapping relationships as candidate samples; the time-performance-first strategy allocates all tasks to virtual machines in the high-performance resource pool; the diversity-exploration strategy randomly allocates a virtual machine for each task from the entire set of available virtual machines. S22. Calculate the sample score: For each candidate sample, based on its estimated execution cost and estimated timeout, calculate the optimization score using a scoring function that combines cost and timeout penalty. The expression is as follows:

[0014] Among them, cost weight Prioritize optimizing economic costs over time penalties. The weight for the timeout penalty is set to 800; S23. Model Training: Using the feature vector formed by concatenating task features and resource features as input, and the optimized score as the prediction target, train a random forest regression model. The model; the task characteristics include task computational load, task hierarchy in the DAG, task in-degree and out-degree, and critical path identifiers; the computing power Price per unit time, unit calculation cost; S24. Initial Scheme Generation: For each task in the workflow, the trained model is used to predict its score matching all available virtual machines, and the virtual machine with the best score is selected as the initial resource allocation for that task. The allocation results of all tasks constitute an initial particle.

[0015] Further, in step S21, the step of the balance-oriented strategy is: setting a threshold value as follows: Through formula Computational tasks The hierarchical weights will satisfy The tasks are identified as critical tasks; secondly, virtual machine resources are filtered from multiple dimensions to form a high-performance resource pool. With low-cost resource pool Virtual machines allocated for critical tasks, and virtual machines allocated for non-critical tasks. The virtual machine within.

[0016] Furthermore, in step S3, the ratio of the average Euclidean distance of all particles to the center of mass to the dimension of the solution space is the population diversity. ,Right now:

[0017] Among them, the number of particles ( As a dynamic parameter, it is adaptively determined based on the task size. Indicates the first The numerical value of each particle. For the number of tasks, As the population center, It is the Euclidean norm.

[0018] Furthermore, in step S3, the inertial weight adopts a nonlinear decay strategy, expressed as:

[0019] in, This represents the current iteration number. The maximum number of iterations is obtained through dynamic adjustment, and the initial value of the inertia weight is... Set to 0.9, The attenuation coefficient is set to 0.3.

[0020] This embodiment sets up two dynamic factors for dynamic adjustment, including an individual cognitive factor. Social learning factors The expressions are as follows:

[0021]

[0022] in, , Set them to 0.6 and 2.2 respectively; , Set them to 1.4 and 2.2 respectively. For the first Population diversity at each iteration.

[0023] Furthermore, in step S4, the expression for updating the particle velocity is:

[0024] in, For the first In the next iteration, the particle In the Dimensional speed, This represents the optimal position for the individual particle. For the population number The global optimal position of the particle, the dimension of the particle. Corresponding to the task, For random disturbance factors; Based on the particle's current position and updated velocity, the position at the next moment is determined, thus enabling the search for the optimal solution. The expression for updating the particle position is:

[0025] in, Indicates the first During the nth iteration, the 1st Particles in the The position of the dimension, relative to the first The particle is the first Task allocation index; Represents particles In the Speed ​​at the next iteration For particles After the first The new position reached after the next iteration.

[0026] Furthermore, in step S4, a boundary overflow is handled using a reflection boundary strategy. The expression is:

[0027] Then, based on the attenuation correction of the velocity of the overflowing particles, the correction expression is as follows: , The attenuation coefficient is set to 0.3.

[0028] Furthermore, the time and cost weights are dynamically adjusted based on the urgency of the task deadline, as expressed in the following expressions:

[0029]

[0030] in, As time weight, Cost weighting.

[0031] Furthermore, in step S5, the dynamic weight fitness function is the comprehensive fitness. Penalty for exceeding time limit The sum of, among which The normalized linear weighted sum of the time and cost objectives. The severity of the penalty is positively correlated with the amount of constraint violation, and the final fitness function is:

[0032] in, Indicates the total execution cost. Indicates the workflow completion time. Indicates cost weight, Indicates time weight, Indicates the deadline. This represents the penalty coefficient.

[0033] When the neighborhood optimal solution Its fitness is better than the current global optimum. Then update the global optimum and output the optimal solution. Its expression is: .

[0034] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention incorporates a random forest-assisted initial population optimization mechanism, which constructs a random forest regression model that integrates task features and resource features. It combines a cost-timeout penalty scoring mechanism to select high-quality initial particles, thereby improving the quality of initial solutions and accelerating the search efficiency for the global optimal solution.

[0035] 2. By employing a dynamic parameter and boundary constraint strategy driven by population diversity, the algorithm dynamically adjusts the nonlinear decaying inertia weight and learning factor by quantifying the dispersion of the population to the centroid, and introduces a reflection boundary to correct out-of-bounds particles. This solves the problems of poor static parameter adaptability and invalid search, ensuring the search stability and convergence of the algorithm in a multi-cloud environment.

[0036] 3. Construct a hierarchical optimization framework for critical path slackness. This framework identifies critical tasks based on task slackness, adopts a high-performance-low-cost two-layer resource pool allocation strategy, and combines local neighborhood search optimization techniques. It aims to prioritize meeting the deadlines of critical tasks while preventing the algorithm from getting trapped in local optima, thereby minimizing costs. Attached Figure Description

[0037] Figure 1 This is a flowchart of the RFPSO algorithm of the present invention; Figure 2 This is a flowchart of the random forest regression model training algorithm of the present invention; Figure 3 This is a typical structural diagram of a multi-cloud resource model; Figure 4 This is a flowchart of the workflow scheduling process of RFPSO in a multi-cloud environment in this invention; Figure 5 This is a cost diagram illustrating the four workflows in this invention with different numbers of nodes; Detailed Implementation To clearly illustrate the technical features of the present invention, the invention will be described in detail below through specific embodiments and in conjunction with the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the invention; however, the invention may be implemented in other ways different from those described herein. Therefore, the scope of protection of the invention is not limited to the specific embodiments disclosed below. In the description of this specification, references to terms such as "an embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0038] Example 1 like Figure 1 and Figure 2 As shown, a workflow cost optimization scheduling method driven by random forest in a multi-cloud environment includes the following steps: S1. Construct a workflow scheduling model in a multi-cloud environment. The workflow scheduling model includes a workflow model and a resource model; the scheduling objective is to meet the deadline constraint. Minimize the total execution cost of the workflow under the premise of... ,in, To calculate the cost, For communication costs; S2. Using a random forest regression model, based on the characteristics of each task in the workflow and the resource characteristics of each virtual machine in the multi-cloud environment, a set of high-quality initial scheduling schemes is generated. The task characteristics and resource characteristics are integrated to construct the training sample feature vector. Training samples are generated through multiple strategies and a high-quality initial particles are selected by combining the cost and timeout penalty optimization scoring mechanism. S3. Calculate the average Euclidean distance from all particles to the population centroid to quantify population diversity, and dynamically adjust the inertia weight and learning factor of the particle swarm optimization algorithm based on the population diversity. S4. The initial scheduling scheme set is used as the initial particle swarm. An adaptive particle swarm optimization iterative process is executed until all particles have been traversed. The particle position and velocity are updated iteratively. A reflection boundary mechanism is used to correct out-of-bounds particles and a velocity decay coefficient is configured to suppress boundary oscillations. At the same time, critical tasks and non-critical tasks are distinguished based on task relaxation. High-performance virtual machine resources are allocated to critical tasks first. S5. Dynamically adjust the time and cost weights based on the urgency of the deadline, construct a dynamic weight fitness function and add a timeout penalty term, and evaluate the scheduling schemes for all particles. S6. Output the final scheduling scheme that satisfies the deadline constraint and has the optimal total execution cost.

[0039] In this embodiment, in step S1, the workflow scheduling model Including task sets With the set of dependent edges ,side weight Represents a transition from task to task. The amount of data transmitted, and the task The computational cost is It needs to be executed on a specified VM.

[0040] Multi-cloud environment by Providers Composition, the first Each provider provides VM types, denoted as Its attributes include computing power. This indicates the amount of computation that can be processed per second. For example... Figure 3As shown, cloud service providers integrate all physical resources in a data center to form a shared resource pool. The data center then uses virtualization technology to provide cloud services to users. This is a specific cloud resource architecture. Users then select and lease specific types of VM instances based on their needs, and a resource orchestrator dynamically allocates the corresponding resources. User tasks are executed on the allocated VMs and interact with the global distributed storage system. Ultimately, users pay on demand based on their actual resource consumption. Microsoft Azure uses an hourly billing model. Amazon EC2 uses per-minute billing. Google Compute Engine, on the other hand, uses a fixed fee plus overcharge model.

[0041] In this embodiment, the preprocessing model is defined as follows: Task Average execution time across all available resources The arithmetic mean of the execution time of this task on each resource is calculated as follows:

[0042] in, This represents the total number of virtual machine types, which is the sum of the number of virtual machine types from all providers.

[0043] Definition 1: Task Priority .Task The average execution time of all its direct successor tasks The weighted sum of the highest priority values ​​in the task is priority value Starting with the exit task, the Directed Acyclic Graph (DAG) is traversed recursively upwards. Subsequently, the tasks are arranged in descending order of their calculated values, resulting in the scheduling order. The calculation expression is as follows:

[0044] in, express The set of subsequent tasks.

[0045] Time model: The time model for each task can be derived from the ratio of task computational load to resource computational capacity. Execution time on resources Its specific expression is:

[0046] in, for The computational load, For resources Its computing power.

[0047] Task start time From resources The current available time is determined by the maximum of the completion times of all its predecessor tasks, and its expression is:

[0048] in, The initial availability time of resources is set to the startup time of each virtual machine. Indicates task The collection of all precursor missions, Indicates task The completion time.

[0049] Task Completion time This is the task's start time plus the task's execution time on virtual machine resources, calculated as follows:

[0050] If task Assigned to resources Execute, when the task After completion, resources Available time It needs to be updated to the task's completion time. This is represented by the following expression:

[0051] Definition 2: Communication time ( When the task With the task Assigned to different virtual machines and At that time, the communication time between them Indicates data from task Transmit to task The required time is calculated using the following expression:

[0052] Among them, when the virtual machine and When they belong to the same cloud provider, The value is 1. When the virtual machine and When they belong to different cloud providers, =0, This indicates bandwidth within the same cloud provider. This indicates the bandwidth between different cloud providers.

[0053] Definition 3: Earliest start time ( ).Task The earliest time the task can be started is Resources allocated to virtual machines The earliest time is determined by both the resource availability time and the data dependency constraints of the predecessor task, and it is calculated as follows:

[0054] in, For the task In resources The completion time.

[0055] Definition 4: Latest start time ( For export tasks, the task The latest start time on the virtual machine is represented as the task. The earliest start time. For non-export missions, the mission... In virtual machine The earliest start time on it represents all its successor tasks. In virtual machine The latest start time minus the task and The minimum data transmission time between them. The specific calculation method is as follows:

[0056] Definition 5: Task relaxation time ( ).Task Latest start time and The difference between the earliest start times is the task In virtual machine relaxation time Its calculation expression is:

[0057] Definition 6: Task completion time ( According to the task In virtual machine The sum of the earliest start time and the execution time gives the task. virtual machine Completion time , representing the moment when the task execution ends, is calculated as follows:

[0058] Definition 7: Resource usage duration ( ).resource The total time elapsed from startup to completion of all assigned tasks is The usage duration is calculated using the following expression:

[0059] Design a tiered deadline setting scheme. Deadline factor. This reflects the leniency or laxity between the deadline and the baseline completion time. Deadline The specific calculation expression is as follows:

[0060] in, Minimum completion time generated for HEFT.

[0061] Cost Model: Considering the differentiated billing rules among service providers, the definitions of computing costs and communication costs are as follows.

[0062] Definition 8: Computational cost ( The costs incurred when using computing resources are divided into three categories based on the billing method, all of which are calculated based on the actual duration of resource usage.

[0063] Hourly billing (Microsoft Azure provider): The hourly rate for resources is directly based on the base price. Billing is done on an hourly basis. The cost is the product of the hourly rate for the resource and the actual usage time (rounded up to the nearest whole minute), expressed as follows:

[0064] in, .

[0065] Billing per minute (Amazon EC2 providers): Rates per minute for resources From base price Dividing by 60 gives:

[0066] Billing is done on a minute-by-minute basis, and the cost is the product of the resource minute rate and the actual usage time. The calculation method is as follows:

[0067] in, .

[0068] Hybrid billing (Google Compute Engine provider): Former A fixed fee is charged per minute. This means that charges are applied on a minute-by-minute basis, and the calculation formula is as follows:

[0069] in, Set to 600 minutes.

[0070] Definition 9: Communication cost ( The additional costs incurred for data transfer across clouds, which are free compared to intra-cloud transfers, can be represented as follows:

[0071] In this embodiment, the RFPSO algorithm integrates the predictive power of random forests with the search capabilities of particle swarm optimization, providing a comprehensive enhancement scheme for optimization problems from initialization to search. The framework consists of four parts: particle encoding, random forest initialization, adaptive parameter tuning, and local search enhancement. The workflow scheduling process of the RFPSO algorithm is as follows: Figure 4 As shown.

[0072] Particles are encoded using integers, each particle... A corresponding scheduling scheme is provided, in which Indicates task Allocated Index. Solution space The dimension is the number of tasks. The range of values ​​for each dimension is available. total.

[0073] In this embodiment, as Figure 2 As shown, a random forest model was used for directed optimization of particle allocation during the particle initialization phase. A hybrid approach combining three strategies was employed to generate training samples. Each strategy was designed for a different optimization objective, ensuring that the sample space comprehensively covered the three dimensions of cost optimization, time performance optimization, and exploratory search. The training of the random forest regression model included the following steps: S21. Generate training samples: Employ multiple strategies, including the balance-oriented strategy, the time performance-first strategy, and the diversity exploration strategy, to generate multiple task-virtual machine mapping relationships as candidate samples. Based on the Pareto equilibrium principle in multi-objective decision-making, the steps of the balance-oriented strategy are as follows: A threshold is set as... Through formula Computational tasks The hierarchical weights will satisfy The tasks are identified as critical tasks; secondly, virtual machine resources are filtered from multiple dimensions to form a high-performance resource pool. With low-cost resource pool Assignment of critical tasks The virtual machine within is allocated for non-critical tasks. The virtual machine within the system enables a trade-off between task criticality and resource economy. The time-performance-first strategy enhances the optimization of workflow completion time. Following the "critical path first" principle of the HEFT algorithm, it allocates all tasks to high-performance virtual machines to minimize critical path execution time. Its particle generation method involves randomly selecting virtual machine instances from a high-performance resource pool for each task. This strategy provides the model with samples exhibiting superior time characteristics, enhancing the algorithm's scheduling capability under tight deadline constraints. To maintain population diversity and avoid premature convergence, the diversity exploration strategy employs a completely random allocation mechanism as an exploration guarantee, randomly selecting virtual machine instances from the entire set of available virtual machine instances for each task. This strategy helps introduce perturbations into the search space, exploring potential non-explicitly superior solutions. At the feature construction level, the first step is to input a feature vector, which is composed of task features and resource features, expressed as follows: The task feature vector Includes: task computational cost, task hierarchy in the DAG, task in-degree and out-degree, and critical path identifiers. Resource feature vector. Includes: computing power Price per unit time, unit calculation cost; S22. Calculate the sample score: For each candidate sample, based on its estimated execution cost and estimated timeout, calculate the optimization score using a scoring function that combines cost and timeout penalty. The expression is as follows:

[0074] Among them, cost weight Prioritize optimizing economic costs over time penalties. The weight of the timeout penalty is set to 800 to ensure that the timeout penalty accounts for a significant proportion of the fitness score, thereby guiding the algorithm to prioritize avoiding timeouts; the predicted output of the random forest. The random forest prediction model can be constructed using the prediction mean of a decision tree. The specific calculation expression for the random forest prediction model is as follows:

[0075] in For the first Multiple decision trees, integrated predictions reduce the risk of overfitting and improve generalization ability; S23. Model Training: Using the feature vector formed by concatenating task features and resource features as input, and the optimized score as the prediction target, train the random forest regression model. S24. Initial Scheme Generation: For each task in the workflow, the trained model predicts its matching score with all available virtual machines, and selects the virtual machine with the best score as the initial resource allocation for that task. The allocation results of all tasks constitute an initial particle. Based on historical data from random forests, a quantitative estimate of the cost of the "task-virtual machine" matching and scheduling scheme is made. Utilizing the model's predictive ability, the lowest score is selected, making a high-quality decision at the beginning of the algorithm, thereby improving the efficiency and effectiveness of the entire optimization process. The calculation expression is as follows:

[0076] in, Then it means the first The task corresponds to the first The eigenvectors of each particle.

[0077] In this embodiment, in step S3, the ratio of the average Euclidean distance of all particles to the centroid to the dimension of the solution space is the population diversity. ,Right now:

[0078] Among them, the number of particles ( As a dynamic parameter, it is adaptively determined based on the task size. For the number of tasks, Indicates the first The numerical value of each particle. As the population center, For the Euclidean norm, A higher value indicates a higher degree of population dispersion and a stronger exploratory ability. The smaller the value, the more concentrated the population is and the more obvious the convergence trend.

[0079] Based on inertia weight This allows control over the ability of particles to inherit historical velocities, and employs a nonlinear decay strategy to transition from global exploration to local development. The expression is:

[0080] in, This represents the current iteration number. The maximum number of iterations is obtained through dynamic adjustment, and the initial value of the inertia weight is... Set to 0.9, The decay coefficient is set to 0.3 to give particles a strong global exploration capability in the early stage, so as to realize a fast, non-linear decay strategy that allows for a rapid transition from "global exploration" to "local development".

[0081] This embodiment sets up two dynamic factors to control the dynamic adjustment of learning intensity based on population diversity, including the individual cognitive factor. It is the control of the learning intensity of its own historical best position, the social learning factor. This refers to the control of the learning intensity of the particle's global optimal position, with the following expressions:

[0082]

[0083] in, , Set them to 0.6 and 2.2 respectively; , The values ​​were set to 1.4 and 2.2 respectively, and dynamically adjusted to ensure the stability of the algorithm. For the first Population diversity at each iteration.

[0084] In step S4, the classical particle swarm optimization velocity-position model is integrated with heuristic local search, achieving efficient finding of the optimal solution through a combination of global guidance and local fine-tuning. The particle velocity update expression can be defined as follows:

[0085] in, For the first In the next iteration, the particle In the Dimensional speed, This represents the optimal position for the individual particle. For the population number The global optimal position of the particle, the dimension of the particle. Corresponding to the task, It serves as a random perturbation factor to enhance the randomness of the search.

[0086] Based on the particle's current position and updated velocity, the position at the next moment is determined, thus enabling the search for the optimal solution. The expression for updating the particle position is:

[0087] in, Indicates the first During the nth iteration, the 1st Particles in the The position of the dimension, relative to the first The particle is the first VM index for each task allocation; Represents particles In the Speed ​​at the next iteration For particles After the first The new position reached after the next iteration.

[0088] In step S4, boundary overflow is handled using a reflection boundary strategy. The expression is:

[0089] By attenuating the velocity of the overflowing particles, repeated oscillations at the boundary are avoided, thus maintaining the effectiveness of the search. The corrected expression is as follows: , The attenuation coefficient is set to 0.3, which will significantly reduce the particle velocity, effectively dissipate the kinetic energy of its impact on the boundary, and suppress repeated oscillations.

[0090] In this embodiment, the time weight and cost weight are dynamically adjusted according to the urgency of the task deadline, and the expressions are as follows:

[0091]

[0092] in, As time weight, Weighted by cost. Ensure that when deadlines are tight (D is close to...) Time performance weight As the deadline increases, the scheduling algorithm will place greater emphasis on meeting time constraints. When the deadline is more lenient, cost weighting becomes more important. As the algorithm grows, it places greater emphasis on cost optimization.

[0093] In step S5, the comprehensive fitness of task scheduling can be obtained by weighting the time objective and the cost objective using the linear weighted sum method. To eliminate the impact of the difference in time and cost dimensions on the optimization results, the two objective components are normalized separately, and the calculation method is as follows:

[0094] Individual penalties for violating deadline constraints The severity of the punishment is positively correlated with the number of violations. Its specific definition is as follows: ,in This is the penalty coefficient.

[0095] Based on overall fitness Individual punishment The sum of these yields the final fitness function:

[0096] in, Indicates the total execution cost. Indicates the workflow completion time. Indicates cost weight, Indicates time weight, Indicates the deadline. This represents the penalty coefficient.

[0097] When the neighborhood optimal solution Its fitness is better than the current global optimum. Then update the global optimum and output the optimal solution. Its expression is:

[0098] Example 2 In this embodiment, a real-world scientific workflow comparison experiment is conducted. Specifically, the experiment uses Python programming and CloudSim to build a simulated experimental environment, including a heterogeneous multi-cloud resource pool composed of Microsoft Azure, Amazon EC2, and Google Compute Engine cloud service providers. The pricing and billing models of VMs from each cloud service provider are based on publicly available data from mainstream cloud service providers, covering hourly billing, minute billing, and data migration fees. Through diverse resource configuration combinations, the experimental environment fully reflects the actual characteristics of resource heterogeneity and billing diversity in a multi-cloud environment. Detailed data on the service providers is shown in Table 1. Additionally, the average bandwidth within the same provider is set to... =20, the average bandwidth between different providers is set to... =100, and the communication cost rate between different providers is set to 0.0001. The startup time for each VM is set to 97 seconds. To comprehensively evaluate the applicability and generalization performance of the proposed algorithm, this paper selects four representative real-world workflow datasets in the field of scientific computing: CyberShake, Epigenomics, LIGO, and Montage. For each workflow type, four task sizes are set: 0, 50, 100, and 1000 tasks. Furthermore, the DAG structure of all workflows is derived from Pegasus WorkflowGenerator. To explore the scheduling performance of the algorithm under different time constraints, a progressive set of deadline coefficients is designed. .

[0099] Table 1 Microsoft Azure

[0100] Table 2 Amazon EC2

[0101] Table 3 Google compute engine

[0102] like Figure 5 As shown in (a) and 5(b), RFPSO exhibits a significant cost advantage under both CyberShake and Epigenomics workflows. Under the CyberShake workflow, the average cost reduction for RFPSO compared to GWOEM, IFA, and PSO reaches 36.41%, 42.27%, and 80.76%, respectively, while under the Epigenomics workflow, the average cost reductions are 34.61%, 47.42%, and 77.28%, respectively. Figure 5 (c) and Figure 5 As shown in (d), RFPSO maintains the lowest cost under both Montage and LIGO workflows. When the number of tasks is 1000, the cost reduction of RFPSO compared to GWOEM, IFA, and PSO is 54.72%, 62.48%, and 87.37% respectively under the Montage workflow, while it is 36.74%, 53.80%, and 79.89% under the LIGO workflow. This demonstrates that in large-scale node environments, RFPSO, by employing a balanced-oriented strategy during the random forest-assisted initialization phase, allocates high-performance virtual machine resources to critical tasks, thereby continuously improving resource utilization and reducing workflow execution costs.

[0103] Example 3 In this embodiment, the specific flow of the random forest resource allocation training algorithm (Algorithm1) is as follows: Line 1 initializes an empty feature matrix and target vector, recording subsequently generated training samples. Line 2 traverses each workflow in the workflow graph and processes it one by one. Lines 3 to 9 perform the following operations: Line 4 extracts task feature information, and Line 5 extracts corresponding resource attributes. Line 6 concatenates the two features to form a task feature vector. Line 7 scores the task and resource allocation schemes using a scoring mechanism. Line 8 calculates the optimization score of the allocation scheme and stores the corresponding optimization score into the target vector to construct the training sample set. Line 11 selects the particle with the lowest cost. Line 13 trains a random forest regression model based on normalized features and target values. Line 14 forms a high-quality scheduling decision scheme. Finally, Line 16 outputs the trained model for subsequent automated resource allocation prediction.

[0104] Algorithm 1: Random Forest Training Algorithm

[0105] The pseudocode for the RFPSO algorithm is shown in Algorithm 2. Line 1 parses the input DAG workflow, obtaining the computational load and dependencies of each task to form a task set. Line 2 executes Algorithm 1, which trains a random forest model using historical virtual machine mapping records. This model predicts the optimal mapping relationship between tasks and resources. Line 3 initializes an empty particle swarm population. Each particle is processed iteratively to construct its resource allocation scheme (lines 4-10), mainly focusing on each task contained within the particle (lines 5-8), and the aforementioned model is called to recommend the optimal resources (line 6). This allocation relationship is then written to the particle's position vector, and the complete allocation scheme of the particle is added to the initial population (line 7). Finally, the initial population is constructed (line 9). In each iteration, line 11 calculates the diversity of the current particle swarm to quantify the population distribution. Inertia weights, individual cognitive factors, and social learning factors are dynamically adjusted based on the group state to balance the algorithm's global search and local exploitation capabilities (lines 12-14), traversing all dimensions of each particle (lines 15-19). Line 16 updates the particle velocity, and line 17 updates the particle position to continuously explore better solutions. Then, boundary constraints are applied to ensure that the allocation scheme represented by the particle meets the constraints (line 20). A fitness function is used to evaluate the merits of each allocation scheme, and the global optimum is updated (lines 21-22). Finally, line 23 outputs the found optimal scheduling scheme and its corresponding cost value.

[0106] Algorithm 2:

[0107] Obviously, the embodiments described above are merely examples for clearly illustrating the present invention and are not intended to limit the implementation of the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.

Claims

1. A workflow cost optimization scheduling method driven by random forest in a multi-cloud environment, characterized in that, Includes the following steps: S1. Construct a workflow scheduling model in a multi-cloud environment. The workflow scheduling model includes a workflow model and a resource model; the scheduling objective is to meet the deadline constraint. Minimize the total execution cost of the workflow under the premise of... ,in, To calculate the cost, For communication costs; S2. Using a random forest regression model, based on the characteristics of each task in the workflow and the resource characteristics of each virtual machine in the multi-cloud environment, a set of high-quality initial scheduling schemes is generated. The task characteristics and resource characteristics are integrated to construct the training sample feature vector. Training samples are generated through multiple strategies and a high-quality initial particles are selected by combining the cost and timeout penalty optimization scoring mechanism. S3. Calculate the average Euclidean distance from all particles to the population centroid to quantify population diversity, and dynamically adjust the inertia weight and learning factor of the particle swarm optimization algorithm based on the population diversity. S4. Perform an adaptive particle swarm optimization iterative process on the initial particle swarm until all particles have been traversed. Update the particle position and velocity through iteration. Use a reflection boundary mechanism to correct out-of-bounds particles and configure a velocity decay coefficient to suppress boundary oscillations. At the same time, distinguish between critical and non-critical tasks based on task relaxation and prioritize the allocation of high-performance virtual machine resources to critical tasks. S5. Dynamically adjust the time and cost weights based on the urgency of the deadline, construct a dynamic weight fitness function and add a timeout penalty term, and evaluate the scheduling schemes for all particles. S6. Output the final scheduling scheme that satisfies the deadline constraint and has the optimal total execution cost.

2. The workflow cost optimization scheduling method driven by random forest in a multi-cloud environment according to claim 1, characterized in that, In step S4, the task slack is calculated as the difference between the latest start time and the earliest start time of each task on each virtual machine, which is taken as the slack time of the task on that virtual machine; tasks with a slack time less than or equal to zero are identified as critical tasks on the critical path.

3. The workflow cost optimization scheduling method driven by random forest in a multi-cloud environment according to claim 1, characterized in that, In step S2, the training of the random forest regression model includes the following steps: S21. Generate training samples: Employ multiple strategies, including a balance-oriented strategy, a time-performance-first strategy, and a diversity-exploration strategy, to generate multiple task-virtual machine mapping relationships as candidate samples; the time-performance-first strategy allocates all tasks to virtual machines in the high-performance resource pool; the diversity-exploration strategy randomly allocates a virtual machine for each task from the entire set of available virtual machines. S22. Calculate the sample score: For each candidate sample, based on its estimated execution cost and estimated timeout, calculate the optimization score using a scoring function that combines cost and timeout penalty. The expression is as follows: Among them, cost weight Prioritize optimizing economic costs over timeout penalties. The weight for the timeout penalty is set to 800; S23. Model Training: A random forest regression model is trained using a feature vector concatenated from task features and resource features as input, and the optimized score as the prediction target. The task features include task computational cost, task level in the DAG, task in-degree and out-degree, and the number of critical path identifiers. The computational cost... Price per unit time, unit calculation cost; S24. Initial Scheme Generation: For each task in the workflow, the trained model is used to predict its score matching all available virtual machines, and the virtual machine with the best score is selected as the initial resource allocation for that task. The allocation results of all tasks constitute an initial particle.

4. The workflow cost optimization and scheduling method driven by random forest in a multi-cloud environment according to claim 3, characterized in that, In step S21, the step of the balance-oriented strategy is as follows: setting the threshold to... Through formula Computational tasks The hierarchical weights will satisfy The tasks are identified as critical tasks; secondly, virtual machine resources are screened from multiple dimensions to form a high-performance resource pool. With low-cost resource pool Assignment of critical tasks The virtual machine within is allocated for non-critical tasks. The virtual machine within.

5. The workflow cost optimization scheduling method driven by random forest in a multi-cloud environment according to claim 1, characterized in that, In step S3, the ratio of the average Euclidean distance of all particles to the centroid to the dimension of the solution space is the population diversity. ,Right now: Among them, the number of particles ( As a dynamic parameter, it is adaptively determined based on the task size. Indicates the first The numerical value of each particle. For the number of tasks, As the population center, It is the Euclidean norm.

6. The workflow cost optimization scheduling method driven by random forest in a multi-cloud environment according to claim 1, characterized in that, In step S3, the inertial weight adopts a nonlinear decay strategy, the expression of which is: in, This represents the current iteration number. The maximum number of iterations is obtained through dynamic adjustment, and the initial value of the inertia weight is... Set to 0.9, This indicates that the attenuation coefficient is set to 0.

3. This embodiment sets up two dynamic factors for dynamic adjustment, including an individual cognitive factor. With social learning factors The expressions are as follows: in, , Set them to 0.6 and 2.2 respectively; , Set them to 1.4 and 2.2 respectively. For the first Population diversity at each iteration.

7. The workflow cost optimization scheduling method driven by random forest in a multi-cloud environment according to claim 1, characterized in that, In step S4, the expression for updating the particle velocity is: in, For the first In the next iteration, the particle In the Dimensional speed, This represents the optimal position for the individual particle. For the population number The global optimal position of the dimension, the dimension of the particle. Corresponding to the task, For random disturbance factors; Based on the particle's current position and updated velocity, the position at the next moment is determined, thus enabling the search for the optimal solution. The expression for updating the particle position is: in, Indicates the first During the nth iteration, the 1st Particles in the The position of the dimension, relative to the first The particle is the first Task allocation index; Represents particles In the Speed ​​at the next iteration For particles After the first The new position reached after the next iteration.

8. The workflow cost optimization scheduling method driven by random forest in a multi-cloud environment according to claim 1, characterized in that, In step S4, boundary overflow is handled using a reflection boundary strategy. The expression is: Then, based on the attenuation correction of the velocity of the overflowing particles, the correction expression is as follows: , The attenuation coefficient is set to 0.

3.

9. The workflow cost optimization scheduling method driven by random forest in a multi-cloud environment according to claim 1, characterized in that, The time and cost weights are dynamically adjusted based on the urgency of the task deadline, as shown in the following expressions: in, As time weight, Cost weighting.

10. The workflow cost optimization scheduling method driven by random forest in a multi-cloud environment according to claim 1, characterized in that, In step S5, the dynamic weight fitness function is the comprehensive fitness. Penalties for exceeding the time limit The sum of, among which The normalized linear weighted sum of the time and cost objectives. The severity of the penalty is positively correlated with the amount of constraint violation, and the final fitness function is: in, Indicates the total execution cost. Indicates the workflow completion time. Indicates cost weight, Indicates time weighting, Indicates the deadline. Indicates the penalty coefficient; When the neighborhood optimal solution Its fitness is better than the current global optimum. Then update the global optimum and output the optimal solution. Its expression is: 。

Citation Information

Patent Citations

  • Global optimal solution searching method based on improved particle swarm optimization algorithm

    CN115983130A