Instance intensive workflow scheduling method and system based on dynamic particle swarm optimization

By employing a two-stage encoding and adaptive strategy based on the dynamic particle swarm optimization algorithm, the problem of accurately representing the task execution order and resource mapping in instance-intensive workflow scheduling is solved, improving the feasibility of the scheduling scheme and the global search capability, and achieving efficient and energy-saving scheduling results.

CN121979635APending Publication Date: 2026-05-05武夷学院
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
武夷学院
Filing Date
2026-01-20
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing particle swarm optimization algorithms struggle to accurately characterize the task execution order and resource mapping relationship when scheduling instance-intensive workflows. They lack explicit guarantees of task dependency constraints, resulting in low feasibility of the generated scheduling schemes. Furthermore, the fixed algorithm parameters and simple population structure make them prone to getting trapped in local optima, and they cannot collaboratively optimize completion time and system energy consumption.

Method used

A two-stage coding method based on dynamic particle swarm optimization is adopted, which combines task priority coding and instance-virtual machine mapping coding. The dynamic adaptive particle swarm optimization algorithm is used for multi-objective optimization. Subgroups are divided by clustering and Lévy flight mechanism, and parameters are adaptively adjusted. A population update strategy of roulette wheel selection, multi-point crossover and constrained mutation is adopted to ensure the feasibility of scheduling scheme and global exploration capability.

Benefits of technology

It improves the feasibility and global exploration capabilities of scheduling schemes, and realizes efficient and energy-saving scheduling of instance-intensive workflows in container cloud environments, and collaboratively optimizes task execution efficiency and system energy consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121979635A_ABST
    Figure CN121979635A_ABST
Patent Text Reader

Abstract

The invention discloses an instance intensive workflow scheduling method and system based on dynamic particle swarm optimization, and the method comprises the steps: building a multi-objective optimization function with the minimization of the total workflow completion time and the minimization of the total system energy consumption as the objective through obtaining an instance intensive workflow model and a container cloud resource model; a particle swarm population is initialized by adopting two-stage coding, dependency correction is performed on task priority coding, and finally, a dynamic adaptive particle swarm optimization algorithm is executed to output an optimal scheduling scheme. A task execution sequence and an instance-virtual machine mapping relation are respectively and accurately represented through two-stage coding, and a dependency relation correction mechanism is combined to ensure that a scheduling scheme conforms to workflow topology constraints, so that the scheme feasibility is improved; through a dynamic adaptive particle swarm optimization algorithm, a particle swarm structure, a particle type and key parameters are adaptively adjusted in an iteration process, and the global exploration capability and convergence efficiency of the algorithm in a complex solution space are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to an instance-intensive workflow scheduling method and system based on dynamic particle swarm optimization. Background Technology

[0002] Container cloud platforms have become a critical infrastructure supporting big data analytics and scientific computing tasks, providing elastic resource provisioning for instance-intensive workflows through virtual machine and container technologies. Instance-intensive workflows consist of a large number of task instances with complex topological dependencies, and their scheduling problem is a typical multi-constraint, high-dimensional optimization problem. Existing scheduling methods often employ metaheuristic algorithms such as particle swarm optimization (PSO). However, when solving such problems, traditional PSO algorithms struggle to accurately represent both the task execution order and resource mapping relationships simultaneously through particle encoding, and lack explicit guarantees regarding task dependency constraints, resulting in low feasibility of the generated scheduling schemes. Furthermore, the fixed algorithm parameters and simple population structure make it prone to getting trapped in local optima in the early stages of iteration, hindering effective exploration of the solution space and preventing coordinated optimization among multiple objectives such as completion time and system energy consumption. Summary of the Invention

[0003] In view of this, the purpose of this invention is to propose an instance-intensive workflow scheduling method and system based on dynamic particle swarm optimization.

[0004] To achieve the above-mentioned technical objectives, the technical solution adopted by this invention is as follows: In a first aspect, the present invention provides an instance-intensive workflow scheduling method based on dynamic particle swarm optimization, comprising: Obtain the instance-intensive workflow model and container cloud resource model. The instance-intensive workflow model includes a set of tasks, the dependencies between tasks, and the set of instances corresponding to each task. The container cloud resource model includes virtual machine cluster resource information and container resource quota information deployed on virtual machines. Based on the instance-intensive workflow model and container cloud resource model, a multi-objective optimization function is constructed with the objectives of minimizing the total workflow completion time and minimizing the total system energy consumption. A two-stage encoding method is used to initialize the particle swarm population. The first stage encoding is task priority encoding, which is used to characterize the execution order of tasks in the workflow. The second stage encoding is instance-virtual machine mapping encoding, which is used to characterize the target virtual machine number to which each task instance is scheduled. Dependency correction is performed on the task priority encoding. The algorithm is dynamically adaptive particle swarm optimization to solve the multi-objective optimization function. When the algorithm meets the termination condition, it outputs the task scheduling scheme corresponding to the globally optimal particle position vector.

[0005] In some embodiments, the dynamic adaptive particle swarm optimization algorithm includes: Dynamic subgrouping of particle swarm population is performed based on clustering and the Lévy flight mechanism. Calculate the global optimal position vector for each subgroup, and calculate the average optimal particle position vector based on the global optimal position vectors of all subgroups. A parameter adaptive strategy is adopted to dynamically adjust the individual learning factor, social learning factor, inertia weight, and communication particle ratio in the current iteration; Based on the proportion of communicating particles, the particles in each subgroup are divided into ordinary particles and communicating particles, and the velocity and position of the two types of particles are updated according to the individual learning factor, social learning factor, inertia weight, the global optimal position vector of the subgroup, and the average optimal particle position vector, respectively. After each iteration, the particle swarm population is updated using a population update strategy based on roulette wheel selection, multi-point crossover, and constrained mutation. Based on the similarity detection results between subgroup cluster centers, subgroups are adaptively merged, and after reaching the preset iteration conditions, all subgroups are merged into a single subgroup for fine-grained search.

[0006] In some embodiments, dynamic subgrouping of the particle swarm population is performed based on clustering and the Lévy flight mechanism, including: A predetermined number of particles are randomly selected from the particle swarm population as initial cluster centers; Calculate the Euclidean distance between each particle in the particle swarm population and each initial cluster center, and assign each particle to the nearest cluster center according to the minimum distance principle to form the initial subgroup partition; Calculate the mean of the position vectors of all particles in each initial subgroup, and use it as the new cluster center of that initial subgroup; The Lévy flight mechanism is used to apply random perturbations to the positions of new cluster centers in order to update the cluster center positions; Repeat the process of calculating Euclidean distance, allocating particles, calculating the mean, and applying the Lévy flight mechanism perturbation until the change in the cluster center position is less than a preset threshold or the maximum number of iterations is reached, thus obtaining a stable subgroup division and the final cluster center.

[0007] In some embodiments, the global optimal position vector is calculated for each subgroup, and the average optimal particle position vector is calculated based on the global optimal position vectors of all subgroups, including: The fitness value of all particles in each subgroup is calculated by using a normalized fitness function based on logarithmic transformation. In each subgroup, select the particle with the maximum fitness value and determine the position vector of that particle as the global optimal position vector of that subgroup; Obtain the globally optimal position vector for all subgroups; Calculate the arithmetic mean of all globally optimal position vectors, and determine the result as the average optimal particle position vector.

[0008] In some embodiments, a parameter adaptive strategy is used to dynamically adjust the individual learning factor, social learning factor, inertia weight, and communication particle ratio in the current iteration, including: Based on the ratio of the current iteration count to the maximum iteration count, the individual learning factor and the social learning factor are dynamically adjusted using a non-linear Sigmoid function. In the early stages of the algorithm iteration, a higher individual learning factor value and a lower social learning factor value are set. As the iteration progresses, the individual learning factor value decreases non-linearly, while the social learning factor value increases non-linearly. The proportion of communication particles is dynamically adjusted using an exponential growth function based on the ratio of the current iteration count to the maximum iteration count. In the early stages of the algorithm iteration, a smaller proportion of communication particles is set, and the proportion of communication particles gradually increases as the iteration progresses. A segmented adaptive strategy is adopted to adjust the inertia weight. In the early stage of iteration, a fixed large value is used, and in the middle and later stages of iteration, the value of the inertia weight is dynamically calculated according to the evolution speed of the particles and the aggregation degree of the particle swarm.

[0009] In some embodiments, the particle swarm population includes particle position vectors, and the particle swarm population is initialized using two-stage encoding, including: A position vector is generated for each particle in the particle swarm population. The position vector is formed by sequentially concatenating the task priority encoding segment and the instance-virtual machine mapping encoding segment. The task priority encoding fragment contains a first dimension of a first quantity, which is equal to the total number of tasks in the workflow. Each first dimension of the task priority encoding fragment corresponds to one task, and the value stored in each first dimension is the priority value of the corresponding task. The instance-to-virtual machine mapping code fragment contains a second dimension of a second quantity, which is equal to the total number of instances of all tasks in the workflow. Each second dimension of the instance-to-virtual machine mapping code fragment corresponds to one task instance, and the value stored in each second dimension is the number of the target virtual machine to which the corresponding task instance is assigned. Dependency correction is performed on task priority encoding segments, including: Identify all tasks in the workflow that satisfy the execution constraints. For each task to be corrected, obtain the priority values ​​of all its direct predecessor tasks and calculate the minimum of these priorities. If the priority of the task to be corrected is not greater than the minimum value, then adjust the priority of the task to be corrected to ensure that its priority value is greater than the minimum value. The corrected task priority encoding segment is combined with the instance-virtual machine mapping encoding segment to form the initialized particle position vector.

[0010] In some embodiments, based on an instance-intensive workflow model and a container cloud resource model, a multi-objective optimization function is constructed with the objectives of minimizing the total workflow completion time and minimizing the total system energy consumption, including: Based on the task dependencies and instance resource requirements in the instance-intensive workflow model, and the virtual machine and container resource configuration in the container cloud resource model, calculate the start and finish times of each task instance on the target virtual machine. The total completion time of the workflow is determined based on the completion times of all task instances. Calculate the total dynamic energy consumption of the system based on the rated power of the processors, the dynamic power ratio coefficient, and the total execution time of each processor in the container cloud resource model. Calculate the total static energy consumption of the system based on the rated power of the processor, the status of the server to which the processor belongs, and the dynamic power ratio coefficient in the container cloud resource model. The total energy consumption of the system is obtained by adding the total dynamic energy consumption of the system to the total static energy consumption of the system. A multi-objective optimization function is constructed with minimizing the total completion time of the workflow as the first optimization objective and minimizing the total energy consumption of the system as the second optimization objective. A logarithmic transformation strategy is used to normalize the first and second optimization objectives, and a fitness function for evaluating particle mass is constructed based on the normalization result, which is the multi-objective optimization function.

[0011] In some embodiments, performing a dynamic adaptive particle swarm optimization algorithm to solve a multi-objective optimization function includes: The iterative optimization process begins by using the initialized particle swarm population as the initial solution set. In each iteration, based on the dynamic adaptive particle swarm optimization algorithm, the algorithm particle swarm in the current iteration is dynamically divided into subgroups, the global optimal position vector and the average optimal particle position vector are calculated, the parameters are adaptively adjusted, the particle velocity and position are updated, and the population update operation is based on roulette wheel selection, multi-point crossover and constraint mutation. The algorithm particle swarm consists of individual particles representing candidate scheduling schemes in the current iteration; After each iteration, based on the similarity detection results between the cluster centers of the subgroups, the particle swarm structure of the algorithm in the current iteration is adaptively merged and manipulated. When the number of iterations reaches the preset merging condition, all current algorithm particle swarms are merged into a single algorithm population, and the standard particle swarm optimization algorithm process is used to perform a fine search of the solution space of the single algorithm population. The execution of the dynamic adaptive particle swarm optimization algorithm is terminated when the iterative optimization process reaches the preset maximum number of iterations or meets the preset convergence condition.

[0012] In some embodiments, when the dynamic adaptive particle swarm optimization algorithm meets the termination condition, it outputs the task scheduling scheme corresponding to the globally optimal particle position vector, including: When the dynamic adaptive particle swarm optimization algorithm reaches the preset maximum number of iterations, or when the improvement of the global optimal fitness value in multiple consecutive iterations is less than the preset convergence threshold, the algorithm is determined to meet the termination condition. Extract the particle with the highest fitness value from the final population, and determine the position vector of this particle as the globally optimal particle position vector; Analyze the globally optimal particle position vector, including: The execution order of all tasks in the workflow is decoded from the task priority encoding segment of the global optimal particle position vector; From the instance-virtual machine mapping encoded fragment of the global optimal particle position vector, decode the target virtual machine number to which each task instance is assigned; Based on the parsed task execution order and instance-virtual machine mapping relationship, a final task scheduling scheme is generated, which includes the start time, end time, and virtual machine and container resource information of each task instance.

[0013] In a second aspect, the present invention also provides an instance-intensive workflow scheduling system based on dynamic particle swarm optimization, applicable to the scheduling method described in the first aspect, the scheduling system comprising: The model acquisition module is used to acquire the instance-intensive workflow model and the container cloud resource model. The instance-intensive workflow model includes a set of tasks, the dependencies between tasks, and the set of instances corresponding to each task. The container cloud resource model includes virtual machine cluster resource information and container resource quota information deployed on virtual machines. The optimization function construction module is used to construct multi-objective optimization functions based on instance-intensive workflow models and container cloud resource models, with the objectives of minimizing the total workflow completion time and minimizing the total system energy consumption. The population initialization module is used to initialize the particle swarm population using a two-stage coding method. The first stage coding is task priority coding, which is used to characterize the execution order of tasks in the workflow. The second stage coding is instance-virtual machine mapping coding, which is used to characterize the target virtual machine number to which each task instance is scheduled, and performs dependency correction on the task priority coding. The dynamic adaptive optimization solution module is used to execute the dynamic adaptive particle swarm optimization algorithm to solve multi-objective optimization functions. The scheduling scheme output module is used to output the task scheduling scheme corresponding to the globally optimal particle position vector when the dynamic adaptive particle swarm optimization algorithm meets the termination condition.

[0014] By adopting the above technical solution, the present invention has the following beneficial effects compared with the prior art: Unlike existing technologies, the above technical solution acquires an instance-intensive workflow model and a container cloud resource model, constructs a multi-objective optimization function aimed at minimizing the total workflow completion time and the total system energy consumption, initializes the particle swarm population using two-stage encoding, corrects the dependency relationship of task priority encoding, and finally executes a dynamic adaptive particle swarm optimization algorithm to output the optimal scheduling scheme. The two-stage encoding accurately represents the task execution order and the instance-virtual machine mapping relationship, and the dependency correction mechanism ensures that the scheduling scheme conforms to the workflow topology constraints, thereby improving the feasibility of the scheme. Furthermore, the dynamic adaptive particle swarm optimization algorithm adaptively adjusts the particle swarm structure, particle type, and key parameters during iteration, enhancing the algorithm's global exploration capability and convergence efficiency in complex solution spaces, overcoming the shortcomings of traditional methods, and achieving efficient and energy-saving scheduling of instance-intensive workflows in a container cloud environment. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a schematic diagram of steps S101 to S104 as described in the specific implementation method; Figure 2 This is a diagram of the dynamic particle swarm optimization process described in the specific implementation method; Figure 3 This is the particle swarm dynamic adjustment diagram described in the specific implementation method. Detailed Implementation

[0017] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be particularly noted that the following embodiments are for illustrative purposes only and do not limit the scope of the invention. Similarly, the following embodiments are only some, not all, embodiments of the present invention, and all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] Please see Figure 1In a first aspect, this embodiment provides an instance-intensive workflow scheduling method based on dynamic particle swarm optimization, comprising: S101. Obtain the instance-intensive workflow model and container cloud resource model. The instance-intensive workflow model includes a set of tasks, the dependencies between tasks, and the set of instances corresponding to each task. The container cloud resource model includes virtual machine cluster resource information and container resource quota information deployed on virtual machines. S102. Based on the instance-intensive workflow model and container cloud resource model, construct a multi-objective optimization function with the objectives of minimizing the total workflow completion time and minimizing the total system energy consumption; S103. Initialize the particle swarm population using a two-stage coding method. The first stage coding is task priority coding, which is used to characterize the execution order of tasks in the workflow. The second stage coding is instance-virtual machine mapping coding, which is used to characterize the target virtual machine number to which each task instance is scheduled, and performs dependency correction on the task priority coding. S104. Execute the dynamic adaptive particle swarm optimization algorithm to solve the multi-objective optimization function. When the dynamic adaptive particle swarm optimization algorithm meets the termination condition, output the task scheduling scheme corresponding to the global optimal particle position vector.

[0019] In step S101, the instance-intensive workflow model refers to a formal description of the computational workflow that needs to be scheduled. Its core includes a task set, dependencies between tasks, and a set of instances corresponding to each task. The task set refers to the set of all logical computational units that constitute the workflow; the dependencies between tasks refer to the sequential execution constraints between these computational units due to data flow or control flow, usually represented in the form of a directed acyclic graph (DAG); the set of instances corresponding to each task refers to the fact that the task may be split into multiple parallel or serial execution units during actual execution. Each execution unit is called a task instance, which is used to describe the computational load and resource requirements in a more granular way.

[0020] A container cloud resource model refers to an abstraction of the underlying computing infrastructure, which includes virtual machine cluster resource information and container resource quota information deployed on virtual machines. Virtual machine cluster resource information includes the resource configuration of each virtual machine in the cluster, such as computing, memory, storage, and network bandwidth; container resource quota information defines the maximum number of processor cores, memory capacity, and disk space that each container instance created within a virtual machine can use. By establishing a precise mathematical model to characterize all the features of the application to be scheduled (workflow) and available resources (container cloud), accurate and quantitative input data is provided for subsequent optimized scheduling.

[0021] In some alternative embodiments, an instance-intensive workflow model can be constructed through the following steps: Establish an instance-intensive workflow model: ,in, , indicating workflow The set of tasks contained therein Represents the total number of tasks in the set, workflow The Middle Task It can be represented as a set of instances. ,in, Indicates task The first in Each task instance can be formally represented as a tuple. In this tuple, Representation of instances scale Representation of instances Required memory space Representation of instances Required disk space, in addition, edge set , indicating workflow The constraints between all tasks in the process. Indicates task and Data communication volume between tasks yes direct front-wheel drive, Need to wait Execution can only begin after all execution has finished and data transmission is complete. Furthermore, establish a virtual machine cluster resource model. ,in, Represents a cluster Total number of virtual machines included, number virtual machine Represented as a resource tuple ,in, Represents virtual machine The processor set in Represents virtual machine Available memory space Represents virtual machine Available hard drive capacity Represents virtual machine Available network bandwidth, processor set It contains multiple processor units with potentially different computing capabilities, represented as ,in, Represents virtual machine The total number of processor units in the system. For virtual machines The Middle Each processor is represented as a tuple of multidimensional attributes. ,in Indicates processor The calculation speed Indicates processor The status, including busy and idle; Based on the virtual machine cluster resource model, a container cloud resource model is further established, including virtual machines. A collection consisting of multiple containers is represented as ,in, Represents virtual machine The total number of containers included, the first A container Configure specific resource quotas during initialization, represented as tuples. ,in Represents a container The number of available processor cores, Indicates the available memory capacity. This indicates the maximum available hard disk space.

[0022] In step S102, the total workflow completion time refers to the total time elapsed from workflow submission to the completion of its last task instance, which is a core indicator for measuring scheduling efficiency. Total system energy consumption refers to the total electrical energy consumed by all physical servers (or their virtualized processor units) participating in the computation during the entire workflow execution period, including the dynamic energy consumption of the processors during computation and the static energy consumption of the servers maintaining their operational state. When constructing the multi-objective optimization function, it is necessary to derive specific calculation formulas for completion time and energy consumption under a given scheduling scheme based on the task dependencies, instance resource requirements in the workflow model, and resource configuration in the container cloud resource model. Optionally, in some preferred embodiments, the total system energy consumption can be obtained by summing the dynamic energy consumption and static energy consumption of each processor, where dynamic energy consumption is proportional to the processor's computational load and execution time, and static energy consumption is related to whether the server is running and its running duration. Transforming the complex scheduling decision problem into a clear mathematical optimization problem allows the algorithm to search the solution space for a scheduling scheme that simultaneously reduces completion time and energy consumption.

[0023] Specifically, the construction process of the multi-objective optimization function is as follows: Calculate the task start time based on the instance-intensive workflow model. If the task... For the task When the predecessor task is a task and the two tasks are assigned to different virtual machines, the formula is used to... Calculate the data transfer overhead between the two tasks. ,in, This represents the amount of data communication between two tasks. and Representing tasks and Network bandwidth and computing tasks of the virtual machine completion time Data transfer overhead between the two tasks The sum of these yields the task. The beginning moment ,like and If allocated to the same virtual machine, then the transmission overhead... =0; For the task The Middle An example According to the formula Calculate the actual start time of this instance. ,in, Representation of instances The earliest idle time of the required resources, according to the formula Calculation Example completion time ,in Representation of instances scale Indicates the processor's computing speed. Represents a container The creation time, based on this, according to the formula Computational tasks Actual completion time Finally, according to the formula Calculation workflow Completion time ,in For workflow The submission time; Get processor Rated power and the dynamic power ratio coefficient is Through formula Computing processor The total execution time, of which, Indicated in the processor The total size of the execution instances is determined by the formula. Computing processor The dynamic energy consumption of all processors is calculated, and finally, the dynamic energy consumption of all processors is summed to obtain the total dynamic energy consumption of the system. Get processor Rated power ,processor Status of the server (Including on and off) and dynamic power ratio coefficient According to the formula Computing processor The static energy consumption of the system is obtained by summing the static energy consumption of all processors. ; The calculated total dynamic energy consumption of the system Total static energy consumption Adding them together gives the total energy consumption of the container cloud system during workflow execution. ; Workflow completion time calculated above As an optimization metric, a first objective function is constructed. Then, the total system energy consumption As an optimization metric, a second objective function is constructed. A logarithmic transformation strategy is used to optimize the minimum workflow completion time. Minimum system energy consumption The two objective functions are normalized to balance their scale differences, using the formula... Calculate the fitness function value The larger the value, the better the scheduling scheme corresponding to the individual particle.

[0024] In step S103, the particle swarm population is a set of candidate solutions used in the particle swarm optimization algorithm to search the solution space, and each candidate solution is called a particle. Two-stage encoding refers to designing a position vector for each particle, consisting of two connected parts. The first stage encoding is task priority encoding, where the value of each dimension represents the relative priority of the corresponding task in the execution sequence; the larger the value, the higher the priority, determining the order in which tasks are scheduled. The second stage encoding is instance-virtual machine mapping encoding, where the value of each dimension represents the number of the target virtual machine to which the corresponding task instance is assigned, determining the specific distribution of computational load in the resource pool. Dependency correction of the task priority encoding refers to verifying or adjusting the priority values ​​to ensure that the task execution order represented by the encoding does not violate the inter-task dependencies defined in step S101. For example, if task B depends on task A, then the corrected priority value of task A must be greater than the priority value of task B to ensure that A is scheduled before B. This embodiment provides an encoding method that can fully express the scheduling scheme (including order and mapping) and automatically guarantee the feasibility of the scheme, providing a high-quality and constraint-compliant initial search starting point for subsequent intelligent optimization algorithms.

[0025] In some alternative embodiments, the position of each particle is determined by a... Represented by a dimensional vector, this The dimensional vector consists of two parts. The first part is the task scheduling order encoding, which occupies the first half of the vector. There are several dimensions, among which... The first dimension represents the total number of tasks in the workflow, with each dimension corresponding to a task. The value indicates the task's priority; a higher value indicates a higher priority in the scheduling sequence. The second part is the mapping encoding between task instances and virtual machines, which occupies the latter part of the vector. There are several dimensions, among which... The total number of corresponding instances, with one instance for each dimension, and its value represents the index number to which the instance is assigned to the target virtual machine.

[0026] From particles Extract task priority allocation fragments and store them in a vector. In the middle, initialize an empty set. It is used to store all tasks that meet the constraints, and to set up workflow tasks. The starting task in Add to collection Simultaneously from the workflow task set Remove the task from the set. When not empty, from Select collection The set is composed of the direct successor tasks of the middle task. ,for The first in Task Calculate the minimum priority of all its predecessor tasks. If the task priority Greater than Then swap the priorities of the two tasks; if the task... priority equal Then Decrease the priority by 1 to avoid conflicts, and correct the task. Add to In, and from Remove the task from the list and assign the corrected priority. Feedback to particles This completes the entire calibration process.

[0027] In step S104, the dynamic adaptive particle swarm optimization algorithm is a metaheuristic search algorithm improved on the standard particle swarm optimization algorithm. Its "dynamic adaptive" characteristic is mainly reflected in the fact that during the iteration process, the algorithm adaptively adjusts its internal structure (such as subgrouping) and key parameters (such as learning factors and inertia weights) according to the search state, and introduces strategies such as communication particle mechanisms and crossover mutation operations to balance global exploration and local development capabilities. Particles move in the solution space by continuously updating their velocity and position (i.e., encoded vectors), and their movement direction is influenced by their own historical best experience and shared information within the group. When the algorithm meets the preset termination conditions (such as reaching the maximum number of iterations or the quality of the solution no longer significantly improving), the search stops, and the position vector corresponding to the particle with the highest fitness in the current population is determined as the globally optimal particle position vector. By analyzing this globally optimal particle position vector, the specific task scheduling scheme can be decoded, including when each task instance will be executed, on which virtual machine, and in which container. Utilizing swarm intelligence simulation and evolutionary mechanisms, it efficiently searches for near-optimal solutions that perform well in both completion time and system energy consumption from a vast combination of possible scheduling schemes.

[0028] This embodiment provides a complete and practical solution for scheduling instance-intensive workflows. It accurately models the scheduling objects and environment, and formalizes the scheduling objective into a multi-objective optimization problem. A two-stage encoding scheme to ensure feasibility is designed to initialize the candidate solution group. An enhanced particle swarm optimization algorithm with dynamic adaptive capabilities is used to efficiently solve this optimization problem and output the optimal scheduling scheme. Encoding correction ensures the feasibility of the scheduling scheme, and the algorithm's dynamic adaptive mechanism enhances its search capability and convergence efficiency in complex solution spaces. Therefore, it can collaboratively optimize task execution efficiency and system energy consumption for instance-intensive workflows in container cloud environments, achieving efficient and energy-saving intelligent scheduling.

[0029] In a second aspect, this embodiment also provides an instance-intensive workflow scheduling system based on dynamic particle swarm optimization, applicable to the scheduling method described in the first aspect. The scheduling system includes: The model acquisition module is used to acquire the instance-intensive workflow model and the container cloud resource model. The instance-intensive workflow model includes a set of tasks, the dependencies between tasks, and the set of instances corresponding to each task. The container cloud resource model includes virtual machine cluster resource information and container resource quota information deployed on virtual machines. The optimization function construction module is used to construct multi-objective optimization functions based on instance-intensive workflow models and container cloud resource models, with the objectives of minimizing the total workflow completion time and minimizing the total system energy consumption. The population initialization module is used to initialize the particle swarm population using a two-stage coding method. The first stage coding is task priority coding, which is used to characterize the execution order of tasks in the workflow. The second stage coding is instance-virtual machine mapping coding, which is used to characterize the target virtual machine number to which each task instance is scheduled, and performs dependency correction on the task priority coding. The dynamic adaptive optimization solution module is used to execute the dynamic adaptive particle swarm optimization algorithm to solve multi-objective optimization functions. The scheduling scheme output module is used to output the task scheduling scheme corresponding to the globally optimal particle position vector when the dynamic adaptive particle swarm optimization algorithm meets the termination condition.

[0030] The components mentioned in the above embodiments can be understood with reference to the foregoing embodiments, and will not be described in detail here.

[0031] Please see Figure 2 and Figure 3 In some embodiments, the dynamic adaptive particle swarm optimization algorithm includes: Dynamic subgrouping of particle swarm population is performed based on clustering and the Lévy flight mechanism. Calculate the global optimal position vector for each subgroup, and calculate the average optimal particle position vector based on the global optimal position vectors of all subgroups. A parameter adaptive strategy is adopted to dynamically adjust the individual learning factor, social learning factor, inertia weight, and communication particle ratio in the current iteration; Based on the proportion of communicating particles, the particles in each subgroup are divided into ordinary particles and communicating particles, and the velocity and position of the two types of particles are updated according to the individual learning factor, social learning factor, inertia weight, the global optimal position vector of the subgroup, and the average optimal particle position vector, respectively. After each iteration, the particle swarm population is updated using a population update strategy based on roulette wheel selection, multi-point crossover, and constrained mutation. Based on the similarity detection results between subgroup cluster centers, subgroups are adaptively merged, and after reaching the preset iteration conditions, all subgroups are merged into a single subgroup for fine-grained search.

[0032] In this embodiment, clustering refers to the process of grouping particles according to their positional similarity in the solution space (such as Euclidean distance). The aim is to form multiple subgroups that perform parallel searches in different regions of the solution space, maintaining population diversity and preventing premature concentration of searches in localized areas. The Lévy flight mechanism is a heavy-tailed random walk strategy whose step size follows a Lévy distribution, characterized by frequent short-distance movements interspersed with long-distance jumps. In this step, the Lévy flight mechanism is used to inject random perturbations when updating the cluster centers of the subgroups. These perturbations help the cluster centers escape the local attraction domain of their current location, thereby enhancing the subgroup's ability to explore new regions and preventing limited search range due to initial partitioning or iteration stagnation. Through dynamic clustering with random perturbations, the entire population is structured into multiple differentiated search units.

[0033] In this embodiment, the global optimal position vector of a subgroup refers to the position vector with the highest fitness value of its corresponding scheduling scheme among all the historical optimal positions experienced by all particles within that subgroup, representing the local optimal solution currently found by the subgroup. The average optimal particle position vector is a comprehensive position vector obtained by arithmetically averaging the global optimal position vectors of all subgroups. The purpose of calculating the average optimal position vector is to integrate excellent search experiences from different regions of the solution space to form a reference point reflecting the distribution trend of globally excellent solutions. This step establishes a two-level information guidance mechanism: particles within a subgroup are guided by their own local optimal experiences for refined development; subsequently introduced communication particles will be guided by this average optimal position vector that integrates global information, thereby promoting experience exchange and global exploration between different subgroups.

[0034] In this embodiment, the individual learning factor and the social learning factor control the intensity of a particle's learning towards its own historical best position and the group's historical best position, respectively. The inertia weight influences the tendency of a particle to maintain its previous velocity. The proportion of communicating particles determines the percentage of particles in the subgroup used for global exploration. The parameter adaptive strategy means that the values ​​of these key parameters are not fixed but dynamically adjusted according to the stage or state of the algorithm's operation. For example, in the early stages of iteration, a higher individual learning factor and a lower proportion of communicating particles can be set to encourage particles to conduct independent and extensive exploration; as iterations progress, the social learning factor and the proportion of communicating particles are gradually increased to strengthen information sharing and convergence trends; the inertia weight can also be gradually decreased from a large initial value to balance global exploration and local development. Optionally, in some preferred embodiments, parameter adjustment can be achieved through nonlinear functions or a piecewise strategy based on the number of iterations. This enables the algorithm to automatically balance the capabilities of "exploration" and "development" according to the needs of different search stages, thereby improving search efficiency and solution quality.

[0035] In this embodiment, the dynamic adaptive particle swarm optimization algorithm includes dividing particles in each subgroup into ordinary particles and communication particles according to the proportion of communicating particles, and updating the velocity and position of the two types of particles respectively based on individual learning factors, social learning factors, inertia weights, the global optimal position vector of the subgroup, and the average optimal particle position vector. When ordinary particles update their velocity, their "social learning" term is attracted by the global optimal position vector of their subgroup, and they search and develop within the local area of ​​interest of that subgroup. Communication particles are different; their "social learning" term is attracted by the aforementioned calculated average optimal particle position vector. This allows communication particles to jump out of the local field of vision of their subgroup and move towards the direction of excellent solutions discovered by other subgroups, thereby undertaking the task of transmitting information between different subgroups and exploring other potentially excellent areas in the solution space. Both types of particles share the same individual learning factor and inertia weight update mechanism. By introducing a division of labor mechanism within the subgroup, ordinary particles can focus on in-depth development of local areas, while a portion of communication particles are responsible for global exploration and information fusion across regions.

[0036] In this embodiment, roulette wheel selection is a probabilistic selection method based on fitness ratios. Particles with higher fitness have a greater probability of being selected as "parents" to participate in subsequent operations, reflecting the idea of ​​"survival of the fittest." Multi-point crossover refers to randomly selecting multiple positions on the encoding vectors of two selected parent particles to exchange segments, thereby generating new "child" particles. This helps to integrate the genetic information of different excellent particles. Constrained mutation refers to randomly perturbing certain dimensions of the encoding of newly generated particles with a certain probability, but this perturbation must ensure that the mutated encoding still satisfies the problem constraints (for example, for task priority encoding, the dependencies between tasks must still be maintained after mutation). This step introduces selection, crossover, and mutation operations from genetic algorithms to enhance the global search capability and population diversity of the particle swarm optimization algorithm. Crossover operations can generate new solution structures, helping to escape local optima; constrained mutation, while introducing randomness, ensures the feasibility of new solutions.

[0037] In this embodiment, the similarity between the cluster centers of subgroups is typically measured by calculating their Euclidean distance. If the distance is less than a preset similarity threshold, the search regions of the two subgroups in the solution space are considered to be very close or overlapping. Adaptive merging refers to merging two subgroups into a new subgroup and updating the cluster centers when two subgroups are detected to be too similar.

[0038] The mechanism illustrated in this embodiment avoids redundant searches by multiple subgroups within the same small region, thus saving computational resources and enabling the population to focus more intently on searching the most promising regions in the later stages of iteration. In the later stages of the algorithm's operation (e.g., after reaching a certain proportion of the total number of iterations), all remaining subgroups are merged into a unified population. At this point, subgrouping is no longer performed, and all particles, guided by a unified global optimum, conduct a final, refined search to further improve solution accuracy. In the early and middle stages of the search, subgrouping promotes diverse exploration; in the later stages, merging subgroups promotes focused development. This allows the algorithm to adaptively adjust its search strategy according to the search progress, achieving a smooth transition from extensive exploration to refined convergence.

[0039] In some embodiments, dynamic subgrouping of the particle swarm population is performed based on clustering and the Lévy flight mechanism, including: A predetermined number of particles are randomly selected from the particle swarm population as initial cluster centers; Calculate the Euclidean distance between each particle in the particle swarm population and each initial cluster center, and assign each particle to the nearest cluster center according to the minimum distance principle to form the initial subgroup partition; Calculate the mean of the position vectors of all particles in each initial subgroup, and use it as the new cluster center of that initial subgroup; The Lévy flight mechanism is used to apply random perturbations to the positions of new cluster centers in order to update the cluster center positions; Repeat the process of calculating Euclidean distance, allocating particles, calculating the mean, and applying the Lévy flight mechanism perturbation until the change in the cluster center position is less than a preset threshold or the maximum number of iterations is reached, thus obtaining a stable subgroup division and the final cluster center.

[0040] In this embodiment, the initial cluster centers refer to the particle positions in the solution space that serve as initial reference points to initiate the clustering process. The preset number is typically set based on experience or problem size, determining the desired number of subgroups. This provides an initial partitioning framework for subsequent iterative clustering. Random sampling is used to initialize the clustering process to avoid biases that may arise from fixed selections, providing diverse starting points for the formation of dynamic subgroup structures.

[0041] In this embodiment, Euclidean distance refers to the square root of the sum of the squares of the differences in the corresponding dimensional values ​​of the position vectors of two particles in a high-dimensional solution space. It is used to quantify the "distance" or similarity between particles in the solution space. The minimum distance principle means classifying each particle into the category represented by the cluster center with the smallest Euclidean distance. The initial subgrouping is a preliminary grouping result formed based on this principle. The entire population is initially divided into several clusters using distance metrics, so that particles within the same subgroup are relatively clustered in the solution space, while particles in different subgroups are relatively separated.

[0042] In this embodiment, the mean of the position vectors refers to the new vector obtained by taking the arithmetic mean of the position vectors of all particles within the subgroup in each dimension. The new cluster centers are used to more accurately represent the average position or central tendency of the particles in the solution space, replacing the old cluster centers. By calculating the centroid to update the "representative position" of each subgroup, the cluster centers can move as the distribution of particles within the subgroup changes, more accurately reflecting the search area of ​​the current subgroup and providing a more accurate reference point for the next round of particle allocation.

[0043] In this embodiment, the step size of the Lévy flight mechanism follows a heavy-tailed Lévy distribution, characterized by occasional long-distance jumps interspersed within most short-distance movements. Applying random perturbation involves adding a random displacement vector generated according to the Lévy distribution to the newly calculated cluster center position, resulting in a perturbed, new center position. This prevents cluster centers from becoming stuck locally or prematurely fixed during iterative updates. By introducing randomness with long-tail characteristics, cluster centers have the opportunity to escape their current local region and explore more distant or underexplored regions in the solution space, enhancing the global exploration capability of the entire subgroup partitioning process and avoiding limitations on the diversity of subsequent searches due to poor initial positions or iterations converging to suboptimal partitions.

[0044] In this embodiment, the preset threshold is a small positive number used to determine whether the change in the cluster center position between two consecutive iterations is negligible, thus considering the partitioning stable. The maximum number of iterations is a safety upper limit to prevent infinite loops. Stable subgroup partitioning refers to a state where, after multiple iterations, the particle affiliation and the position of the cluster center no longer change significantly. The final cluster center is the center position determined by each subgroup at the end of the iteration.

[0045] This embodiment uses iterative optimization to gradually evolve the subgroup partitioning from an initial random state into a structure that can better reflect the natural aggregation state of particles in the solution space. The introduction of the Lévy flight perturbation makes this process not only pursue the compactness within the clusters, but also take into account the exploration potential of unknown regions in the solution space, ultimately resulting in a population partitioning structure that has both a certain degree of distinguishability (difference between subgroups) and dynamic exploration (the center can jump).

[0046] In some embodiments, the global optimal position vector is calculated for each subgroup, and the average optimal particle position vector is calculated based on the global optimal position vectors of all subgroups, including: The fitness value of all particles in each subgroup is calculated by using a normalized fitness function based on logarithmic transformation. In each subgroup, select the particle with the maximum fitness value and determine the position vector of that particle as the global optimal position vector of that subgroup; Obtain the globally optimal position vector for all subgroups; Calculate the arithmetic mean of all globally optimal position vectors, and determine the result as the average optimal particle position vector.

[0047] In this embodiment, the fitness function is a mathematical function used to quantify the quality of a scheduling scheme represented by a particle; a higher value indicates a better scheme quality. Logarithmic transformation-based normalization refers to performing a logarithmic operation on the original optimization objective to compress its numerical scale, normalizing it to map it to a specific interval (e.g., [0,1]), and combining the processed multiple objective values ​​with certain weights into a single fitness value. This constructs a unified and reasonably scaled evaluation standard, enabling the algorithm to fairly and effectively compare the overall quality of different particles (scheduling schemes).

[0048] In this embodiment, the global optimal position vector of a subgroup represents the encoded vector corresponding to the scheduling scheme with the highest overall quality found in the history explored by all particles in that subgroup. Selecting the particle with the maximum fitness value means directly comparing the fitness values ​​of all particles in the subgroup in the current iteration and selecting the best one. An "elite retention" strategy is implemented within each subgroup, identifying and recording the current best discovery within that local search region. The optimal position will serve as an attractor to guide other particles in the subgroup to local development and convergence.

[0049] In this embodiment, the best position vectors from all different subgroups are collected and summarized to form a set representing the current optimal discovery of the entire population in each local region, thus breaking down the information barriers between subgroups.

[0050] In this embodiment, the arithmetic mean refers to a new position vector obtained by summing the global optimal position vectors of all subgroups along the same dimension and dividing by the number of subgroups. The average optimal particle position vector is a virtual, comprehensive position that does not necessarily correspond to a specific actual particle. Instead, it represents the central trend or average direction of the optimal positions of all subgroups, creating a global information fusion point.

[0051] In this embodiment, by calculating an average value, the algorithm smooths and merges the best experiences found by each subgroup in different regions of the solution space, generating a reference position that reflects the "consensus" or "gravitational center" of the globally optimal solution. This average optimal position vector is then used to guide the movement of communicating particles, prompting them to explore this region that integrates global information. This enables indirect communication and sharing of best search experiences among different subgroups, enhancing the algorithm's global exploration capability and the rationality of its convergence guidance.

[0052] In some embodiments, a parameter adaptive strategy is used to dynamically adjust the individual learning factor, social learning factor, inertia weight, and communication particle ratio in the current iteration, including: Based on the ratio of the current iteration count to the maximum iteration count, the individual learning factor and the social learning factor are dynamically adjusted using a non-linear Sigmoid function. In the early stages of the algorithm iteration, a higher individual learning factor value and a lower social learning factor value are set. As the iteration progresses, the individual learning factor value decreases non-linearly, while the social learning factor value increases non-linearly. The proportion of communication particles is dynamically adjusted using an exponential growth function based on the ratio of the current iteration count to the maximum iteration count. In the early stages of the algorithm iteration, a smaller proportion of communication particles is set, and the proportion of communication particles gradually increases as the iteration progresses. A segmented adaptive strategy is adopted to adjust the inertia weight. In the early stage of iteration, a fixed large value is used, and in the middle and later stages of iteration, the value of the inertia weight is dynamically calculated according to the evolution speed of the particles and the aggregation degree of the particle swarm.

[0053] In this embodiment, the input is the relative progress of the current iteration (number of iterations / maximum number of iterations), and the output is the value of the learning factor. Setting a higher individual learning factor value and a lower social learning factor value in the early stages of algorithm iteration encourages particles to rely more on their own experience for independent and extensive exploration, thereby enhancing population diversity. As iteration progresses, the individual learning factor value decreases non-linearly and the social learning factor value increases non-linearly through the Sigmoid function. This means the algorithm gradually reduces its reliance on individual experience while strengthening its adherence to group consensus, thus promoting population convergence to a better common area. Simulating the natural transition from "extensive exploration" to "centralized development" in intelligent optimization, the algorithm adaptively balances individual autonomy and group cooperation through smooth, non-linear parameter changes, avoiding early convergence or later oscillations caused by fixed parameters.

[0054] In this embodiment, the communication particle ratio refers to the proportion of individuals designated as "communication particles" in each subgroup to the total number of particles in that subgroup. The exponential growth function is characterized by slow initial growth followed by accelerated growth. Setting a small communication particle ratio in the early stages of algorithm iteration means that in the early search phase, most particles focus on local development within their respective subgroups, with only a small number of particles undertaking cross-subgroup exploration tasks. This facilitates in-depth exploration within each subgroup's own region. As iterations progress, the communication particle ratio is gradually increased through the exponential growth function, meaning the algorithm gradually increases the number of particles used for global exploration. More search resources are invested in tasks involving integrating global information and exploring potential new regions. Initially, local deep search is prioritized to discover high-quality solutions in each region; later, global information exchange and exploration are strengthened to integrate discoveries from various regions and find better solutions, thereby achieving dynamic optimization of exploration and development resources overall.

[0055] In this embodiment, the inertia weight influences the tendency of particles to maintain their previous velocity; a larger inertia weight is beneficial for global exploration, while a smaller one is beneficial for local exploration. The segmented adaptive strategy involves dividing the entire iteration process into different stages and using different inertia weight determination methods at each stage. In the early stages of iteration, a fixed, larger value is used to give particles strong momentum, enabling them to explore a wide area and quickly cover the solution space. In the later stages of iteration, the inertia weight is dynamically calculated based on the particle's evolution rate and the particle swarm's aggregation degree. The evolution rate reflects how quickly the quality of the optimal solution improves, while the aggregation degree reflects the dispersion of particles in the solution space.

[0056] Optionally, when the evolution rate is fast (i.e., the solution quality improves significantly), the inertia weight can be appropriately reduced to promote convergence; when the aggregation degree is high (i.e., particles are too concentrated), the inertia weight can be appropriately increased to enhance exploration and avoid premature convergence, so that this key parameter, the inertia weight, can respond to the real-time state of the search process. Initially, a fixed large value ensures sufficient initial exploration; in the mid-to-late stages, feedback adjustments are made based on the effectiveness (evolution rate) and diversity (aggregation degree) of the search, enabling the algorithm to converge promptly when accelerated convergence is needed, and to proactively enhance exploration when stuck or overly homogeneous, thereby achieving more refined and intelligent search behavior control.

[0057] Specifically, the above steps may also include the following more specific examples: Randomly generate in the solution space containing An initial population of particles, each particle employing a two-stage encoding structure to represent a complete task scheduling scheme, with the number of subpopulations set to [number missing]. Randomly selected from the particle swarm Each particle is used as the initial cluster center. The Euclidean distance between each particle and each cluster center is calculated. The particles are assigned to the nearest subgroup according to the minimum distance principle. Then, the mean of the position vectors of all particles in each subgroup is calculated as the new cluster center of that subgroup. The Lévy flight mechanism is used to inject random perturbation into the cluster center to update the center position. Finally, the above update process is repeated until the change in the cluster center position is less than the set threshold or the maximum number of iterations is reached, so as to obtain a stable subgroup division and the final cluster center. Calculate the fitness value of all particles in each subgroup. The particle with the highest fitness value is selected as the globally optimal position vector for that subgroup. Then, the average of the global optimal position vectors of all subgroups is calculated to obtain the position vector of the average optimal particle. ; A parameter adaptive strategy is used to dynamically adjust the parameter values ​​at the current iteration number, including the individual learning factor. Social learning factors Inertia weight and particle type probability (i.e., the proportion of communicating particles in a subgroup); The particles in each subgroup are divided into ordinary particles and communication particles in a 7:3 ratio. New speeds for subgroups of ordinary particles From the inertial term Cognitive items Social items Adding the three terms together, we get: Indicates inertia weight, Indicates the particle's current velocity. Represents individual learning factors. Represents social learning factors. and It is a random number. This represents the vector of the historical best position of an individual particle. This represents the particle's current position vector. Represents the global optimal position vector, which is the particle's current position vector. With the calculated new velocity The addition yields the new position vector of the particle. , Represents the algebra of particle updates; The new speed of communication particles From the inertial term Cognitive items Social items Adding the three terms together, in the social term, we get... This represents the position vector of the average optimal particle, and the current position vector of the communicating particle. With the calculated new velocity The addition yields the new position vector of the communicating particle. ; After each iteration, a roulette wheel selection mechanism is used to select particles to be updated, based on the fitness value of each particle. Calculate the probability of it being selected. ,in, This represents the sum of the fitness of all particles in the population, and a cumulative probability distribution is formed based on this probability. By generating random numbers in the interval [0,1). And accordingly, parent particles are selected from the distribution, and in the selected parent particles... In the dimensional encoding vector, two intersection points are randomly determined. and They swap the encoded fragments of the two to generate new particles, and then use a preset mutation probability. Apply random perturbations to some dimensions of the new particle. For mutations encoded by task priorities, ensure that the mutated value is strictly between the minimum priority of all its predecessor tasks and the maximum priority of all its successor tasks, thereby maintaining the dependency between tasks. Replace the individual with the lowest fitness in the population with the newly generated particle. Calculate the Euclidean distance between the cluster centers of each subgroup. If the distance between the centers of two subgroups is less than a set similarity threshold, then... If so, merge the two subgroups into one, and then update the subgroup count. After reaching the preset number of iterations, all subgroups are merged into one population, and a fine search of the solution space is performed using the standard particle swarm optimization algorithm. When the algorithm reaches the maximum number of iterations or the convergence condition, it outputs the globally optimal particle position vector. The corresponding task scheduling scheme.

[0058] Furthermore, individual learning factors With social learning factors Adjust the step size of each particle's movement towards its own historical best position and the group's historical best position separately. In the early stages of the algorithm, set a relatively high step size. Value and lower The value is dynamically adjusted via a non-linear Sigmoid function as iterations proceed to enhance global exploration, as shown in the following formula: ; ; in, and The shape parameter controls the steepness of the sigmoid function, adjusting the rate of change of the learning factor. and The time threshold parameter determines the time threshold. and The iteration ratio that begins to change. Indicates the current iteration number. This indicates the maximum number of iterations. and These represent the initial and final values ​​of the learning factor, respectively. Particle type probability This represents the proportion of communicating particles in each subgroup, initially set to a smaller value. The value allows particles to perform a precise search in a local area, and it gradually increases as the iteration progresses. Values ​​are used to enhance global exploration, later on. A value close to 1 causes most particles to perform global exploration; the adjustment formula is as follows: ; in, Indicates the current iteration number The probability value below, and These represent the minimum and maximum probabilities, respectively, and their values ​​are set to 0.1 and 0.9. A constant greater than 1, used for control. The rate of value growth The larger the value, The faster the value grows, the earlier the global exploration phase begins; Adjusting inertia weights using a segmented adaptive strategy In the early stages of iteration ( ), using a fixed larger value To enhance global exploration in the later stages of iteration ( According to the rate of particle evolution and clustering Dynamic adjustment, the formula is as follows: ; in, This is the initial value for the inertia weight. For the rate of particle evolution, and The weight coefficients, representing evolution rate and aggregation degree respectively, are used to adjust the degree of influence of these two factors on the inertia weight, where the initial weights... Set to 0.9, transition region Setting it to 2 / 3, the particle evolution rate This reflects the speed at which particles update their positions in the search space. In the iterative optimization process of the particle swarm optimization algorithm, the global optimal fitness value of the current generation is always better than or equal to the global optimal fitness value of the previous generation. Therefore, the formula for calculating the particle evolution speed is as follows: ; in, Indicates the first The global optimal fitness of a particle, the particle aggregation degree Used to quantify the concentration of a particle swarm in the search space, thus indirectly reflecting the search range and diversity of the particle swarm. Since the global optimal fitness value of the current generation is always greater than the average fitness value of all particles, the particle aggregation degree can be calculated by the following formula: ; in, This represents the average fitness value of all particles.

[0059] In some embodiments, the particle swarm population includes particle position vectors, and the particle swarm population is initialized using two-stage encoding, including: A position vector is generated for each particle in the particle swarm population. The position vector is formed by sequentially concatenating the task priority encoding segment and the instance-virtual machine mapping encoding segment. The task priority encoding fragment contains a first dimension of a first quantity, which is equal to the total number of tasks in the workflow. Each first dimension of the task priority encoding fragment corresponds to one task, and the value stored in each first dimension is the priority value of the corresponding task. The instance-to-virtual machine mapping code fragment contains a second dimension of a second quantity, which is equal to the total number of instances of all tasks in the workflow. Each second dimension of the instance-to-virtual machine mapping code fragment corresponds to one task instance, and the value stored in each second dimension is the number of the target virtual machine to which the corresponding task instance is assigned. Dependency correction is performed on task priority encoding segments, including: Identify all tasks in the workflow that satisfy the execution constraints. For each task to be corrected, obtain the priority values ​​of all its direct predecessor tasks and calculate the minimum of these priorities. If the priority of the task to be corrected is not greater than the minimum value, then adjust the priority of the task to be corrected to ensure that its priority value is greater than the minimum value. The corrected task priority encoding segment is combined with the instance-virtual machine mapping encoding segment to form the initialized particle position vector.

[0060] In this embodiment, the particle position vector is a data structure representing a candidate solution (i.e., a complete scheduling scheme) in the particle swarm optimization algorithm; it is a multi-dimensional vector. Two-stage encoding refers to dividing this vector into two logically continuous parts: the first part (task priority encoding segment) encodes the task execution order, and the second part (instance-virtual machine mapping encoding segment) encodes the specific allocation of computational load on resources. Sequential concatenation means that these two segments are joined end-to-end in the vector, forming a complete encoding. This allows a single vector to simultaneously and unambiguously represent the two core aspects of the scheduling scheme—task scheduling order and resource mapping relationship.

[0061] In this embodiment, the first dimension specifically refers to the various dimensions within the task priority encoding segment. The first quantity clarifies that the size of this segment is determined by the task scale of the workflow. Each first dimension is bound to a specific task, and its stored priority value is a scalar used to represent the priority of that task relative to other tasks in the scheduling sequence. A larger value generally indicates a higher priority, and the task should be considered for scheduling earlier. A mapping relationship is established between tasks and encoding dimensions, and a total or partial order relationship for all tasks is indirectly but explicitly defined through numerical values, thereby making it possible to decode the task execution order from the encoding.

[0062] In this embodiment, the second dimension specifically refers to the various dimensions within the instance-virtual machine mapping encoding segment. The second quantity clarifies that the size of this segment is determined by the total number of task instances in the workflow, reflecting the characteristics of instance-intensive workflows. Each second dimension is bound to a specific task instance, and its stored value is an integer index pointing to the number of a virtual machine in the container cloud resource model, thus explicitly specifying which virtual machine the instance will be scheduled to execute on. Establishing a direct mapping relationship between each task instance and resource entity, this encoded part directly determines the distribution of computing load in the resource pool and is crucial to execution efficiency and energy consumption.

[0063] In this embodiment, dependency correction aims to ensure that the task execution order implied by priority values ​​conforms to the actual dependency constraints (such as predecessor-successor relationships) between tasks defined in the workflow model. This includes identifying all tasks in the workflow that satisfy execution constraints, obtaining the priority values ​​of all its direct predecessor tasks for each task to be corrected, and calculating the minimum of these priorities. Tasks satisfying execution constraints typically refer to those whose all predecessor tasks have been scheduled (or corrected). Direct predecessor tasks are those that directly point to the task in the workflow dependency graph. Calculating the minimum priority of all direct predecessor tasks is to find the highest priority among the predecessor tasks (because a larger value indicates higher priority), thereby determining the lower bound that the priority of the task to be corrected must exceed. Actively checking and correcting potential logical contradictions in the encoding (i.e., priority values ​​failing to correctly reflect dependencies) is a crucial step in ensuring the feasibility of generated candidate solutions when applying general optimization algorithms to real-world problems with complex constraints.

[0064] In this embodiment, the adjustment can be implemented in various ways. For example, the priority of the task to be corrected can be set to a fixed value greater than the minimum priority, or its priority can be swapped with that of one of its predecessor tasks. This forces the priority value of the task to be strictly greater than the minimum priority of all its direct predecessor tasks. This condition ensures that when tasks are sorted according to their priority values, the task will always be placed after all its direct predecessor tasks, thus satisfying the dependency relationship. Through this forced numerical adjustment, the workflow topology constraints of the problem are transformed into numerical constraints on the encoded segments. This ensures that any corrected priority encoded segment corresponds to a feasible task sort that satisfies the dependency relationship, thereby fundamentally eliminating the possibility of the algorithm generating infeasible scheduling schemes (at the order level) in subsequent searches.

[0065] In this embodiment, the combination operation simply concatenates the corrected priority fragment with the uncorrected mapping fragment in their original order. The initialized particle position vector's priority portion ensures the feasibility of the task execution order, while its mapping portion (which may be randomly generated) provides an initial resource allocation scheme. A complete, feasible initial candidate solution at the task order level is output. This solution serves as the starting point for the particle swarm optimization search. Although its resource mapping portion may be of low quality, its feasible order allows the focus to be placed on finding better resource allocations within a feasible order framework. Furthermore, operations such as crossover and mutation can be used to further optimize the order itself, thereby significantly improving search efficiency and solution quality.

[0066] In some embodiments, based on an instance-intensive workflow model and a container cloud resource model, a multi-objective optimization function is constructed with the objectives of minimizing the total workflow completion time and minimizing the total system energy consumption, including: Based on the task dependencies and instance resource requirements in the instance-intensive workflow model, and the virtual machine and container resource configuration in the container cloud resource model, calculate the start and finish times of each task instance on the target virtual machine. The total completion time of the workflow is determined based on the completion times of all task instances. Calculate the total dynamic energy consumption of the system based on the rated power of the processors, the dynamic power ratio coefficient, and the total execution time of each processor in the container cloud resource model. Calculate the total static energy consumption of the system based on the rated power of the processor, the status of the server to which the processor belongs, and the dynamic power ratio coefficient in the container cloud resource model. The total energy consumption of the system is obtained by adding the total dynamic energy consumption of the system to the total static energy consumption of the system. A multi-objective optimization function is constructed with minimizing the total completion time of the workflow as the first optimization objective and minimizing the total energy consumption of the system as the second optimization objective. A logarithmic transformation strategy is used to normalize the first and second optimization objectives, and a fitness function for evaluating particle mass is constructed based on the normalization result, which is the multi-objective optimization function.

[0067] In this embodiment, task dependencies determine the execution order and data transfer requirements between task instances. Instance resource requirements include the required computing power, memory, and storage. Virtual machine and container resource configurations provide available processor computing speed, memory capacity, network bandwidth, etc. The start execution time depends on the completion time of its predecessor task, data transfer time, and the earliest available time of the target resource. The completion time is obtained by adding the instance's computing time on a specific processor (considering processor speed) and possible container creation overhead to the start execution time. A precise mapping model is established from the abstract scheduling scheme (i.e., which instance runs on which resource and when) to specific timeline metrics.

[0068] In this embodiment, the total completion time of the workflow refers to the time elapsed from the submission of the workflow (or the start of execution of the first task) to the completion of the last task instance. The determination method typically involves finding the maximum value among the completion times of all task instances. This metric is the core of measuring the execution efficiency of the scheduling scheme and directly reflects the speed of workflow processing. By aggregating the execution timelines of scattered, individual instances into a global, holistic performance metric, it becomes possible to intuitively compare the advantages and disadvantages of different scheduling schemes in reducing overall execution time.

[0069] In this embodiment, the processor's rated power refers to its typical power consumption under full load. The dynamic power ratio factor is a factor between 0 and 1, used to characterize the proportion of the processor's power consumption to its rated power when actually executing a computing task, reflecting the correlation between processor power consumption and load. The total execution time of each processor refers to the sum of the time spent running on all task instances allocated to that processor. The total dynamic energy consumption of the system is the sum of the dynamic energy consumption of all processors, where the dynamic energy consumption of a single processor can be calculated as: rated power × dynamic power ratio factor × total execution time. This quantifies the energy directly consumed by the computing task itself and establishes a linear relationship model between processor computing load (execution time) and its energy consumption.

[0070] In this embodiment, the state of the server to which the processor belongs is a Boolean variable, indicating whether the physical server is on throughout the workflow execution (e.g., it is on as long as one virtual machine is running on the server). The total static energy consumption of the system is the basic energy consumed by the server to maintain operation (e.g., power supply, cooling, standby) even when there are no computing tasks. Optionally, the static energy consumption of a single processor can be modeled as: rated power × (1 - dynamic power ratio coefficient) × server state × server on-time. The total static energy consumption of the system is the sum of the static energy consumption of all processors. By incorporating static energy consumption into the optimization objective, scheduling schemes are encouraged to consolidate computing loads onto fewer servers or shorten the total server on-time as much as possible while meeting performance requirements, achieving deeper levels of energy saving.

[0071] In this embodiment, the total energy consumption of the system provides a complete perspective on energy consumption, encompassing all electrical costs from direct computation to indirect infrastructure maintenance. Combining dynamic and static energy consumption allows the optimization model to simultaneously consider the energy costs of computational efficiency and the energy costs of resource idleness, guiding the scheduling scheme to achieve true energy efficiency overall.

[0072] In this embodiment, the multi-objective optimization function is typically expressed as finding a scheduling scheme such that the vector [total completion time, total energy consumption] is optimal in some sense (e.g., Pareto optimal). The actual scheduling requirements (fast and energy-efficient) are explicitly expressed as a standard mathematical optimization problem.

[0073] In this embodiment, logarithmic transformation refers to taking the logarithm of the original target values ​​(completion time, total energy consumption), which can compress the scale range of the data, especially when the target values ​​differ greatly in magnitude. Normalization further maps the transformed values ​​to a unified interval (such as [0,1]) to eliminate differences in the dimensions and absolute values ​​of different targets. The fitness function is constructed based on the normalization result, typically by combining multiple normalized target values ​​into a single scalar value through weighted summation or other aggregation methods. This scalar fitness value is the scalarized form of the "multi-objective optimization function" that the algorithm directly uses to compare the merits of particles.

[0074] This embodiment makes two heterogeneous objectives comparable through logarithmic transformation and normalization, and then transforms them into a single-objective problem for optimization through weighted aggregation (a scalarization method). This allows the use of efficient single-objective optimizers like particle swarm optimization to find scheduling schemes that achieve a good trade-off between the two objectives. The weights allow users to adjust the emphasis on time and energy consumption according to their actual preferences.

[0075] In some embodiments, performing a dynamic adaptive particle swarm optimization algorithm to solve a multi-objective optimization function includes: The iterative optimization process begins by using the initialized particle swarm population as the initial solution set. In each iteration, based on the dynamic adaptive particle swarm optimization algorithm, the algorithm particle swarm in the current iteration is dynamically divided into subgroups, the global optimal position vector and the average optimal particle position vector are calculated, the parameters are adaptively adjusted, the particle velocity and position are updated, and the population update operation is based on roulette wheel selection, multi-point crossover and constraint mutation. The algorithm particle swarm consists of individual particles representing candidate scheduling schemes in the current iteration; After each iteration, based on the similarity detection results between the cluster centers of the subgroups, the particle swarm structure of the algorithm in the current iteration is adaptively merged and manipulated. When the number of iterations reaches the preset merging condition, all current algorithm particle swarms are merged into a single algorithm population, and the standard particle swarm optimization algorithm process is used to perform a fine search of the solution space of the single algorithm population. The execution of the dynamic adaptive particle swarm optimization algorithm is terminated when the iterative optimization process reaches the preset maximum number of iterations or meets the preset convergence condition.

[0076] In this embodiment, the iterative optimization process refers to the cyclical process in which the algorithm repeatedly performs a series of operations (evaluation, updating, selection, etc.) to gradually improve the quality of these candidate solutions. Starting the optimization engine provides a feasible and diverse initial search starting point for subsequent iterative searches; this is the foundation for all iterative optimization algorithms to begin working.

[0077] In this embodiment, the algorithm's particle swarm consists of individual particles representing candidate scheduling schemes in the current iteration. This is the core operation loop of a single iteration of the algorithm. "Based on the dynamic adaptive particle swarm optimization algorithm" means executing according to the specific structure and process of the algorithm as defined in the previous embodiment. Dynamic subgroup partitioning structures the entire population to facilitate parallel exploration. Calculating the global optimal and average optimal position vectors is to establish local and global guidance information. Parameter adaptive adjustment enables the algorithm to intelligently adjust its behavior according to the search phase. Particle velocity and position updates are the basic search mechanisms of the particle swarm algorithm, driving particles to move towards better regions. Population update operations based on roulette wheel selection, multi-point crossover, and constrained mutation introduce the idea of ​​genetic algorithms to enhance global exploration capabilities and population diversity. The object of all these operations is the "algorithm particle swarm," that is, the set of particles being processed and evolving in the current iteration. Subgroup partitioning and parameter adaptation manage the search structure and intensity; velocity updates and crossover mutations execute the actual solution space exploration and development; and the selection mechanism achieves survival of the fittest.

[0078] In this embodiment, similarity detection between subgroup cluster centers is typically achieved by calculating their Euclidean distance and comparing it with a preset threshold. The adaptive merging judgment and operation refers to the following: if the cluster centers of two or more subgroups are detected to be too close (distance less than the threshold), it is considered that there is redundancy in the search of similar regions, thus merging multiple subgroups into a new subgroup and updating its cluster centers. This operation directly changes the "particle swarm structure" of the algorithm, i.e., the subgroup partitioning. In the early stages of the search, subgroups are allowed to explore dispersedly; as the search progresses, when different subgroups converge to similar regions, actively merging them can avoid ineffective competition in small areas, concentrate computational resources, and may prompt the merged new subgroup to re-explore with new centers.

[0079] In this embodiment, the preset merging condition is typically an iteration threshold, such as reaching a certain percentage of the total iterations. Once this condition is met, regardless of the similarity between subgroups, all subgroups are forcibly disbanded and merged into a unified "algorithm population" without subgroup structure. The standard particle swarm optimization algorithm flow refers to using a unified global optimal position vector to guide all particles, performing traditional velocity and position updates, without complex operations such as subgroup partitioning and communication particle differentiation. Fine-grained search refers to this stage, where the algorithm expects to be close to the global optimal solution, thus focusing on a more detailed and direct hill-climbing search in local regions to further improve the accuracy of the solution. In the early stages of the search, complex dynamic adaptive mechanisms (subgroups, communication particles, etc.) are used to ensure sufficient global exploration and diversity. In the later stages of the search, a simpler, more convergent standard flow is switched to perform pure local exploration to quickly and stably converge to a high-quality solution, thus balancing the breadth of the search and the accuracy of the final solution overall.

[0080] In this embodiment, the maximum number of iterations is a hard stopping criterion to prevent infinite loops. The preset convergence condition is typically a soft stopping criterion, such as when the improvement in the global optimal fitness value is less than a very small threshold for several consecutive generations, or when population diversity falls below a certain level. This indicates that the algorithm may have found a satisfactory solution or is difficult to improve further. Terminating the algorithm means stopping the iterative loop, and the maximum number of iterations ensures the controllability of computational resources. The convergence condition attempts to stop the algorithm promptly when the improvement in solution quality is negligible, thereby improving computational efficiency. The combination of these two factors ensures that the algorithm can output an optimal or near-optimal scheduling scheme within limited time and resources, given the current search capabilities.

[0081] In some embodiments, when the dynamic adaptive particle swarm optimization algorithm meets the termination condition, it outputs the task scheduling scheme corresponding to the globally optimal particle position vector, including: When the dynamic adaptive particle swarm optimization algorithm reaches the preset maximum number of iterations, or when the improvement of the global optimal fitness value in multiple consecutive iterations is less than the preset convergence threshold, the algorithm is determined to meet the termination condition. Extract the particle with the highest fitness value from the final population, and determine the position vector of this particle as the globally optimal particle position vector; Analyze the globally optimal particle position vector, including: The execution order of all tasks in the workflow is decoded from the task priority encoding segment of the global optimal particle position vector; From the instance-virtual machine mapping encoded fragment of the global optimal particle position vector, decode the target virtual machine number to which each task instance is assigned; Based on the parsed task execution order and instance-virtual machine mapping relationship, a final task scheduling scheme is generated, which includes the start time, end time, and virtual machine and container resource information of each task instance.

[0082] In this embodiment, the maximum number of iterations is a pre-set integer used to limit the total running time of the algorithm and prevent infinite loops. The global optimal fitness value refers to the maximum fitness value of all particles in the entire population in each iteration, representing the quality of the best solution found by the algorithm at this stage. The improvement margin refers to the degree of improvement of the global optimal fitness value in the current iteration compared to the global optimal fitness values ​​in previous iterations. The preset convergence threshold is a very small positive number used to determine whether the improvement is negligible. A well-defined and operable algorithm stopping criterion, with the maximum number of iterations providing a hard constraint on computational resources, ensures the algorithm remains controllable. The convergence condition based on the fitness improvement margin enables intelligent judgment of the search process: when the algorithm fails to significantly improve the found best solution in several consecutive generations, it is reasonable to believe that the search has stabilized or plateaued, and the benefit of continuing iterations is very low; terminating the algorithm at this point is efficient.

[0083] In this embodiment, the final population refers to the set of particles after all iterations when the algorithm terminates. The particle with the highest fitness value is the individual in this set whose encoded scheduling scheme scores the highest after evaluation by the fitness function. The globally optimal particle position vector is the complete encoded vector of this optimal particle, encapsulating all the information of the best overall scheduling scheme found by the algorithm throughout the entire search process. "Elite selection" is performed to identify and determine the unique and best candidate solution from the final population as the algorithm's output.

[0084] In this embodiment, parsing refers to reading and interpreting the actual scheduling semantics represented by the values ​​of each dimension in the position vector. This includes decoding the execution order of all tasks in the workflow from the task priority encoding fragment of the globally optimal particle position vector. The decoding process typically sorts tasks according to their priority values; tasks with higher values ​​are considered to have higher priority and are placed earlier in the scheduling sequence. Since the priority encoding satisfies dependencies during initialization and subsequent constraint mutation, the task execution order obtained from this sorting is necessarily feasible. The numerical information at the encoding level is then converted back into logical information at the business level, i.e., the specific task scheduling queue is reconstructed from the priority value sequence.

[0085] In this embodiment, the decoding process is direct—each dimension of the mapped encoded fragment directly stores the target virtual machine number of the corresponding task instance. By reading these numbers, a mapping relationship between each task instance and a specific virtual machine resource can be established, thus reconstructing the specific distribution scheme of the computing load in the resource pool.

[0086] In this embodiment, based on the decoded task execution order (satisfying dependencies) and instance-virtual machine mapping relationship, as well as the resource configuration (processor speed, network bandwidth, etc.) in the container cloud resource model, the entire workflow execution process can be simulated. Considering factors such as data transmission between tasks, resource contention, and container creation time, the actual start time (start execution time) and end time (execution end time) of each task instance are calculated sequentially. Simultaneously, it can be determined which container on the target virtual machine each instance uses and its resource quota (e.g., how many processor cores and how much memory it occupies). The final task scheduling scheme is thus a complete plan containing detailed spatiotemporal arrangements and resource usage information for all instances. The "logically optimal solution" (sequence and mapping) found by the optimization algorithm is transformed into an "executable detailed plan." Through precise simulation calculations, the feasibility of this scheme under a given resource model is verified, and precise timelines and resource usage for each instance are provided, enabling the scheme to be directly understood and executed by the container cloud platform's workflow execution engine, thereby truly realizing the practical application of optimized scheduling.

[0087] The two-stage particle encoding scheme based on a priority correction mechanism proposed in this embodiment can effectively represent the dependencies and execution order between tasks. Furthermore, the dynamic correction mechanism ensures that the scheduling order conforms to topological constraints, while accurately describing the mapping relationship between each instance and physical resources. This makes the scheduling scheme more suitable for the heterogeneous resources and dense instances in a container cloud environment, improving the feasibility and efficiency of scheduling. Through a dynamic subgroup partitioning strategy based on clustering and Lévy flight, particles can explore in parallel in different regions of the solution space, effectively maintaining population diversity and avoiding premature convergence. Simultaneously, through subgroup similarity detection and adaptive merging mechanisms, the algorithm can gradually converge to the vicinity of the global optimum in the later stages of iteration, significantly improving the algorithm's global search capability and convergence speed.

[0088] Furthermore, this embodiment enhances the algorithm's global exploration and local exploitation capabilities by introducing a population update strategy based on roulette wheel selection, multi-point crossover, and constrained mutation. Crossover and mutation operations effectively avoid getting trapped in local optima, improving the quality of the results and the algorithm's robustness. The introduction of an adaptive parameter adjustment strategy dynamically adjusts key parameters such as the learning factor, inertia weight, and communication particle ratio based on feedback information during algorithm runtime. This nonlinear adjustment mechanism balances the needs of different search stages (exploration and exploitation), enabling the algorithm to perform sufficient global exploration in the early stages and efficient local fine-grained search in the later stages, thus enhancing the algorithm's adaptability to different scheduling scenarios.

[0089] In the above technical solution, by acquiring the instance-intensive workflow model and the container cloud resource model, a multi-objective optimization function is constructed with the goals of minimizing the total workflow completion time and minimizing the total system energy consumption. A two-stage encoding method is used to initialize the particle swarm population, and dependency correction is applied to the task priority encoding. Finally, a dynamic adaptive particle swarm optimization algorithm is executed to output the optimal scheduling scheme. The two-stage encoding accurately represents the task execution order and the instance-virtual machine mapping relationship, and the dependency correction mechanism ensures that the scheduling scheme conforms to the workflow topology constraints, thereby improving the feasibility of the scheme. Furthermore, the dynamic adaptive particle swarm optimization algorithm adaptively adjusts the particle swarm structure, particle type, and key parameters during iteration, enhancing the algorithm's global exploration capability and convergence efficiency in complex solution spaces. This overcomes the shortcomings of traditional methods and achieves efficient and energy-saving scheduling of instance-intensive workflows in a container cloud environment.

[0090] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0091] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0092] The above description is only a part of the embodiments of the present invention and does not limit the scope of protection of the present invention. Any equivalent device or equivalent process transformation made based on the content of the present invention specification and drawings, or direct or indirect application in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A method for scheduling instance-intensive workflows based on dynamic particle swarm optimization, characterized in that, include: Obtain an instance-intensive workflow model and a container cloud resource model. The instance-intensive workflow model includes a set of tasks, dependencies between tasks, and a set of instances corresponding to each task. The container cloud resource model includes virtual machine cluster resource information and container resource quota information deployed on virtual machines. Based on the instance-intensive workflow model and container cloud resource model, a multi-objective optimization function is constructed with the objectives of minimizing the total workflow completion time and minimizing the total system energy consumption. A two-stage encoding method is used to initialize the particle swarm population. The first stage encoding is task priority encoding, which is used to characterize the execution order of tasks in the workflow. The second stage encoding is instance-virtual machine mapping encoding, which is used to characterize the target virtual machine number to which each task instance is scheduled. Dependency correction is performed on the task priority encoding. The dynamic adaptive particle swarm optimization algorithm is executed to solve the multi-objective optimization function. When the dynamic adaptive particle swarm optimization algorithm meets the termination condition, the task scheduling scheme corresponding to the globally optimal particle position vector is output.

2. The instance-intensive workflow scheduling method based on dynamic particle swarm optimization according to claim 1, characterized in that, The dynamic adaptive particle swarm optimization algorithm includes: The particle swarm population is dynamically subdivided based on clustering and the Lévy flight mechanism. Calculate the global optimal position vector for each subgroup, and calculate the average optimal particle position vector based on the global optimal position vectors of all subgroups. A parameter adaptive strategy is adopted to dynamically adjust the individual learning factor, social learning factor, inertia weight, and communication particle ratio in the current iteration; Based on the communication particle ratio, the particles in each subgroup are divided into ordinary particles and communication particles, and the velocity and position of the two types of particles are updated according to the individual learning factor, social learning factor, inertia weight, the global optimal position vector of the subgroup, and the average optimal particle position vector, respectively. After each iteration, the particle swarm population is updated using a population update strategy based on roulette wheel selection, multi-point crossover, and constrained mutation. Based on the similarity detection results between subgroup cluster centers, subgroups are adaptively merged, and after reaching the preset iteration conditions, all subgroups are merged into a single subgroup for fine-grained search.

3. The instance-intensive workflow scheduling method based on dynamic particle swarm optimization according to claim 2, characterized in that, The particle swarm population is dynamically subdivided based on clustering and the Lévy flight mechanism, including: A predetermined number of particles are randomly selected from the particle swarm population as initial cluster centers; Calculate the Euclidean distance between each particle in the particle swarm and each of the initial cluster centers, and assign each particle to the nearest cluster center according to the minimum distance principle to form the initial subgroup partition; Calculate the mean of all particle position vectors in each initial subgroup, and use it as the new cluster center of that initial subgroup; The Lévy flight mechanism is used to apply random perturbations to the positions of the new cluster centers in order to update the cluster center positions; Repeat the process of calculating Euclidean distance, allocating particles, calculating the mean, and applying the Lévy flight mechanism perturbation until the change in the cluster center position is less than a preset threshold or the maximum number of iterations is reached, to obtain a stable subgroup division and the final cluster center.

4. The instance-intensive workflow scheduling method based on dynamic particle swarm optimization according to claim 2, characterized in that, Calculate the global optimal position vector for each subgroup, and calculate the average optimal particle position vector based on the global optimal position vectors of all subgroups, including: The fitness value of all particles in each subgroup is calculated by using a normalized fitness function based on logarithmic transformation. In each subgroup, select the particle with the maximum fitness value and determine the position vector of that particle as the global optimal position vector of that subgroup; Obtain the globally optimal position vector for all subgroups; Calculate the arithmetic mean of all the global optimal position vectors, and determine the result as the average optimal particle position vector.

5. The instance-intensive workflow scheduling method based on dynamic particle swarm optimization according to claim 2, characterized in that, A parameter adaptive strategy is used to dynamically adjust the individual learning factor, social learning factor, inertia weight, and communication particle ratio in the current iteration, including: Based on the ratio of the current iteration count to the maximum iteration count, the individual learning factor and the social learning factor are dynamically adjusted using a non-linear Sigmoid function. In the early stages of the algorithm iteration, a higher individual learning factor value and a lower social learning factor value are set. As the iteration progresses, the individual learning factor value decreases non-linearly, and the social learning factor value increases non-linearly. The proportion of communication particles is dynamically adjusted using an exponential growth function based on the ratio of the current iteration count to the maximum iteration count. In the early stages of the algorithm iteration, a smaller proportion of communication particles is set, and the proportion of communication particles gradually increases as the iteration progresses. The inertia weight is adjusted using a segmented adaptive strategy. In the early stage of iteration, a fixed large value is used, and in the middle and later stages of iteration, the value of the inertia weight is dynamically calculated based on the evolution speed of the particles and the aggregation degree of the particle swarm.

6. The instance-intensive workflow scheduling method based on dynamic particle swarm optimization according to claim 1, characterized in that, The particle swarm population includes particle position vectors, and is initialized using a two-stage encoding method, including: A position vector is generated for each particle in the particle swarm population. The position vector is formed by sequentially concatenating a task priority encoding segment and an instance-virtual machine mapping encoding segment. The task priority encoding segment includes a first dimension with a first quantity equal to the total number of tasks in the workflow. Each first dimension of the task priority encoding segment corresponds to one task, and the value stored in each first dimension is the priority value of the corresponding task. The instance-virtual machine mapping encoding segment contains a second dimension of a second quantity, which is equal to the total number of instances of all tasks in the workflow. Each second dimension of the instance-virtual machine mapping encoding segment corresponds to a task instance, and the value stored in each second dimension is the number of the target virtual machine to which the corresponding task instance is assigned. Dependency correction is performed on the task priority encoding segment, including: Identify all tasks in the workflow that satisfy the execution constraints. For each task to be corrected, obtain the priority values ​​of all its direct predecessor tasks and calculate the minimum of these priorities. If the priority of the task to be corrected is not greater than the minimum value, then the priority of the task to be corrected is adjusted to ensure that its priority value is greater than the minimum value. The corrected task priority encoding segment is combined with the instance-virtual machine mapping encoding segment to form the initialized particle position vector.

7. The instance-intensive workflow scheduling method based on dynamic particle swarm optimization according to claim 1, characterized in that, Based on the instance-intensive workflow model and container cloud resource model, a multi-objective optimization function is constructed with the objectives of minimizing the total workflow completion time and minimizing the total system energy consumption, including: Based on the task dependencies and instance resource requirements in the instance-intensive workflow model, and the virtual machine and container resource configuration in the container cloud resource model, calculate the start and finish times of each task instance on the target virtual machine. The total completion time of the workflow is determined based on the completion times of all task instances. The total dynamic energy consumption of the system is calculated based on the rated power of the processors, the dynamic power ratio coefficient, and the total execution time of each processor in the container cloud resource model. The total static energy consumption of the system is calculated based on the rated power of the processor, the status of the server to which the processor belongs, and the dynamic power ratio coefficient in the container cloud resource model. The total energy consumption of the system is obtained by adding the total dynamic energy consumption of the system to the total static energy consumption of the system. The multi-objective optimization function is constructed with minimizing the total completion time of the workflow as the first optimization objective and minimizing the total energy consumption of the system as the second optimization objective. The first and second optimization objectives are normalized using a logarithmic transformation strategy, and a fitness function for evaluating particle mass is constructed based on the normalization result, which is the multi-objective optimization function.

8. The instance-intensive workflow scheduling method based on dynamic particle swarm optimization according to claim 1, characterized in that, Executing a dynamic adaptive particle swarm optimization algorithm to solve the multi-objective optimization function includes: Using the initialized particle swarm population as the initial solution set, the iterative optimization process begins; In each iteration, based on the dynamic adaptive particle swarm optimization algorithm, the algorithm particle swarm in the current iteration is dynamically divided into subgroups, the global optimal position vector and the average optimal particle position vector are calculated, the parameters are adaptively adjusted, the particle velocity and position are updated, and the population update operation is based on roulette wheel selection, multi-point crossover and constraint mutation. The particle swarm in the algorithm consists of individual particles representing candidate scheduling schemes in the current iteration; After each iteration, based on the similarity detection results between the cluster centers of the subgroups, the particle swarm structure of the algorithm in the current iteration is adaptively merged and manipulated. When the number of iterations reaches the preset merging condition, all current algorithm particle swarms are merged into a single algorithm population, and the standard particle swarm optimization algorithm process is used to perform a fine search of the solution space of the single algorithm population. When the iterative optimization process reaches the preset maximum number of iterations or meets the preset convergence condition, the execution of the dynamic adaptive particle swarm optimization algorithm is terminated.

9. The instance-intensive workflow scheduling method based on dynamic particle swarm optimization according to claim 8, characterized in that, When the dynamic adaptive particle swarm optimization algorithm satisfies the termination condition, it outputs the task scheduling scheme corresponding to the globally optimal particle position vector, including: When the dynamic adaptive particle swarm optimization algorithm reaches the preset maximum number of iterations, or when the improvement of the global optimal fitness value in multiple consecutive iterations is less than the preset convergence threshold, the algorithm is determined to meet the termination condition. Extract the particle with the highest fitness value from the final population, and determine the position vector of the particle as the global optimal particle position vector; Analyzing the globally optimal particle position vector includes: The execution order of all tasks in the workflow is decoded from the task priority encoding segment of the global optimal particle position vector; From the instance-virtual machine mapping encoded fragment of the global optimal particle position vector, decode the target virtual machine number to which each task instance is assigned; Based on the parsed task execution order and instance-virtual machine mapping relationship, a final task scheduling scheme is generated, which includes the start time, end time, and virtual machine and container resource information of each task instance.

10. An instance-intensive workflow scheduling system based on dynamic particle swarm optimization, characterized in that, The scheduling system applicable to the scheduling method according to any one of claims 1 to 9 includes: The model acquisition module is used to acquire the instance-intensive workflow model and the container cloud resource model. The instance-intensive workflow model includes a set of tasks, the dependencies between tasks, and the set of instances corresponding to each task. The container cloud resource model includes virtual machine cluster resource information and container resource quota information deployed on virtual machines. The optimization function construction module is used to construct a multi-objective optimization function based on the instance-intensive workflow model and container cloud resource model, with the objectives of minimizing the total workflow completion time and minimizing the total system energy consumption. The population initialization module is used to initialize the particle swarm population using a two-stage coding method. The first stage coding is task priority coding, which is used to characterize the execution order of tasks in the workflow. The second stage coding is instance-virtual machine mapping coding, which is used to characterize the target virtual machine number to which each task instance is scheduled. The module also performs dependency correction on the task priority coding. A dynamic adaptive optimization solution module is used to execute a dynamic adaptive particle swarm optimization algorithm to solve the multi-objective optimization function; The scheduling scheme output module is used to output the task scheduling scheme corresponding to the globally optimal particle position vector when the dynamic adaptive particle swarm optimization algorithm meets the termination condition.