Plastic parallel task multi-objective reinforcement learning scheduling method and system considering preference conditions
By using a fixed-dimensional action space and preference condition model, the problem of insufficient reflection of action dimension changes and preferences in the scheduling network is solved. It realizes joint decision-making on task order and processor quantity and collaborative optimization of action scoring, thereby improving scheduling efficiency and energy consumption management and adapting to user preferences.
Patent Information
- Application Number
- CN202611372153.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-05
- Publication Date
- 2026-11-24
AI Technical Summary
The existing scheduling network action dimension changes with instance size, task order is separated from processor quantity decision, illegal actions are included in sampling, preferences only affect rewards, and value estimation does not fully reflect current preferences, resulting in scheduling schemes that are not adapted to user preferences and are inefficient.
By using a fixed-dimensional action space, filling mapping, and action masking, and jointly deciding on the number of tasks and processors, a preference conditional model is constructed using preference feature modulation and augmented Chebyshev preference cost bias. This enables the synergy between action scoring and value estimation, shields illegal actions, and optimizes the scheduling scheme.
It enables simultaneous comparison of task order and processor quantity decisions within the same scoring space, adapts to user preferences, improves scheduling efficiency and energy management, reduces the impact of illegal actions, and enhances the adaptability and efficiency of scheduling schemes.
Smart Images

Figure CN123157378A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of parallel computing resource scheduling technology, and specifically to a method and system for scheduling multi-objective reinforcement learning of plastic parallel tasks that takes into account preference conditions. Background Technology
[0002] Flexible parallel tasks are parallel tasks whose number of processors can be selected before execution, and whose duration varies with the number of processors allocated. These tasks are widely found in high-performance computing clusters, cloud computing platforms, scientific workflows, engineering simulations, and batch processing systems. The scheduler not only needs to determine the order of task execution but also needs to select the number of processors for each task; therefore, task sequencing decisions and resource allocation decisions are coupled.
[0003] Under limited processor conditions, allocating more processors to a task can usually shorten its duration, but it increases processor time and dynamic energy consumption. Simultaneously, the system also incurs static energy consumption related to completion time throughout the scheduling cycle. Therefore, minimizing the maximum completion time and minimizing total energy consumption often conflict. Traditional heuristics such as shortest processing time, longest processing time priority, or minimum processor time are difficult to continuously adjust for both objectives based on user preferences. Evolutionary algorithms and exact optimization algorithms, on the other hand, require repeated searches for each instance, and online computation time increases significantly with problem size.
[0004] In related technologies, flexible parallel task scheduling schemes based on policy gradients or proximal policy optimization typically separate task selection and processor quantity selection into two decision-making stages, or make the action dimension change with the task size and processor size. In related technologies, multi-objective reinforcement learning scheduling schemes usually only weight or scalarize multiple objectives in the reward function, without explicit feature modulation of the preference vector inside the network, and the value estimation may not receive the preference vector.
[0005] In summary, the relevant technologies have the following shortcomings: cross-scale deployment requires changes to the output dimension or retraining; phased decision-making cannot compare task-processor number combinations within the same scoring space; actions involving padding bits, scheduled tasks, hyperparallelism, and data without duration may be included in the sampling range; relying solely on reward weights makes it difficult to ensure that intermediate features, action scores, and state values continuously change with preferences. Therefore, there is an urgent need to develop a coordinated scheduling method that integrates fixed-dimensional joint action representation, illegal action filtering, intra-network preference modulation, and preference conditional value estimation. Summary of the Invention
[0006] This invention provides a method and system for scheduling multi-objective reinforcement learning tasks in flexible parallel tasks that considers preference conditions, in order to solve the technical problems of existing scheduling networks where the action dimension varies with the instance size, task order is separated from processor quantity decision-making, illegal actions are included in sampling, preferences only apply to rewards, and value estimation does not fully reflect the current preferences.
[0007] In a first aspect, the present invention provides a flexible parallel task multi-objective reinforcement learning scheduling method that considers preference conditions, the method comprising: Obtain task information, available processor resource information, and scheduling preference information for the task to be scheduled. The scheduling preference information is used to characterize the preference relationship between the completion time target and the energy consumption target. Based on task information and resource information, candidate scheduling actions are constructed, and scheduling instances of different sizes are mapped to a candidate action space of preset dimensions. Based on the current scheduling status and task scheduling constraints, determine the legal candidate scheduling actions from the candidate scheduling actions; The action characteristics of the legitimate candidate scheduling actions, the state characteristics of the current scheduling state, and the scheduling preference information are input into the preference condition model. The preference condition model is used to encode the association between each candidate scheduling action. The encoding results and the action scores of each candidate scheduling action are adjusted according to the scheduling preference information to obtain the target action score of each legitimate candidate scheduling action. Based on the target action score, the target scheduling action is determined from the legal candidate scheduling actions. The target task corresponding to the target scheduling action is assigned to the corresponding processor for execution, and the current scheduling state is updated until the stopping condition is met. Then, the scheduling scheme is output.
[0008] In some embodiments of the present invention, mapping scheduling instances of different sizes to a candidate action space of a preset dimension includes: The candidate action space is determined based on the preset maximum task size and the preset maximum processor size; Different combinations of tasks to be scheduled and the number of candidate processors are mapped to different action positions in the candidate action space; If the actual task size or actual processor size of the scheduled instance is less than the preset size, the positions of actions in the candidate action space that exceed the actual task size or actual processor size will be filled.
[0009] In some embodiments of the present invention, determining a legal candidate scheduling action from candidate scheduling actions based on the current scheduling state and task scheduling constraints includes: The legality of each candidate scheduling action is determined based on whether the task has been scheduled, whether the number of candidate processors exceeds the number of processors allowed for the corresponding task, whether the number of candidate processors exceeds the actual number of processors, and whether the corresponding execution time is valid. An action mask is generated based on the legality of each candidate scheduling action, and the action mask is used to block illegal candidate scheduling actions.
[0010] In some embodiments of the present invention, the preference condition model includes a task feature aggregation module, a task interaction encoding module, a preference modulation module, and an action scoring module; The task feature aggregation module is used to concatenate action features, state features, and scheduling preference information and perform feature encoding to obtain candidate action representations for each legal candidate scheduling action. The candidate action representations are rearranged according to the number of tasks and candidate processors, and masked max pooling is performed along the dimension of the number of candidate processors to obtain the task fusion representation of each task. The task interaction encoding module is used to perform correlation encoding on the fused representations of different tasks to obtain the task interaction representation; The preference modulation module is used to generate feature modulation parameters based on scheduling preferences, and to modulate the task interaction representation using the feature modulation parameters; The action scoring module is used to broadcast the modulated task interaction representation along the dimension of the number of candidate processors, and to fuse the broadcast task interaction representation with the corresponding candidate action representation to obtain the basic action score of each legal candidate scheduling action.
[0011] In some embodiments of the present invention, the action scoring module is further used for: Based on the normalized completion time and normalized energy consumption before and after executing the corresponding candidate scheduling action, determine the change in preference cost of the corresponding candidate scheduling action under the scheduling preference information; The preference score bias is determined based on the change in preference cost, and then the preference score bias is added to the basic action score of the corresponding candidate scheduling action to obtain the target action score.
[0012] In some embodiments of the present invention, action features, state features, and scheduling preference information are concatenated and feature-encoded to obtain candidate action representations for each legal candidate scheduling action, including: Action features, state features, and scheduling preference information are concatenated, and the concatenated features are mapped to candidate action representations through linear layers and GELU nonlinear activation layers. The fusion representations of different tasks are correlated and encoded to obtain task interaction representations, including: Multi-head self-attention mechanism is used to encode the associations between different tasks to obtain task interaction representations.
[0013] In some embodiments of the present invention, the target task corresponding to the target scheduling action is assigned to the corresponding processor for execution, and the current scheduling state is updated, including: Based on the current availability time of each available processor, select the same number of target processors as indicated by the target scheduling action from the available processors; The start and end times of the target tasks are determined based on the current available time of each target processor and the execution time of the target tasks with the corresponding number of processors. Update the current available time of each target processor according to the completion time of the target task, and update the current maximum completion time, current total energy consumption and task scheduling status. The stopping condition is that all pending tasks have been completed.
[0014] In some embodiments of the present invention, the preference condition model is trained in the following manner: Training instances are sampled from scheduling instances with different task sizes and processor sizes, and corresponding scheduling preference information is generated for the training instances; The training instances are scheduled using a preference conditional model to obtain the scheduling trajectory; Rewards are determined based on changes in completion time and energy consumption targets during task scheduling. Based on the scheduling trajectory and rewards, a policy optimization algorithm is used to update the model parameters of the preference condition model.
[0015] In some embodiments of the present invention, the action features include at least one of task execution features, processor allocation features, scheduling target change features, and task scheduling progress features; The state characteristics include at least one of the following: scheduling instance size characteristics, current scheduling target characteristics, task scheduling progress characteristics, remaining task characteristics, and power characteristics.
[0016] Secondly, the present invention also provides a flexible parallel task multi-objective reinforcement learning scheduling system that considers preference conditions, the system comprising: The data acquisition module is used to acquire task information, available processor resource information, and scheduling preference information of the task to be scheduled. The scheduling preference information is used to characterize the preference relationship between the completion time target and the energy consumption target. The candidate action construction module is used to construct candidate scheduling actions based on task information and resource information, and map scheduling instances of different sizes to a candidate action space of preset dimensions. The legal action determination module is used to determine legal candidate scheduling actions from the candidate scheduling actions based on the current scheduling status and task scheduling constraints; The preference condition scoring module is used to input the action characteristics of legal candidate scheduling actions, the state characteristics of the current scheduling state, and the scheduling preference information into the preference condition model. The preference condition model is used to encode the relationship between each candidate scheduling action, and the encoding results and the action scores of each candidate scheduling action are adjusted according to the scheduling preference information to obtain the target action score of each legal candidate scheduling action. The task scheduling module is used to determine the target scheduling action from the legal candidate scheduling actions based on the target action score, assign the target task corresponding to the target scheduling action to the corresponding processor for execution, update the current scheduling status until the stopping condition is met, and output the scheduling scheme.
[0017] The present invention provides a flexible parallel task multi-objective reinforcement learning scheduling method and system that considers preference conditions. Through a fixed-dimensional action space, padding mapping, and action masking, the input and output dimensions of the same network remain unchanged regardless of the actual number of tasks and processors, and the action positions generated by padding are masked. By jointly selecting candidate actions based on task and processor number, the task to be executed and its processor number are simultaneously determined in a single discrete action selection, allowing two types of coupled decisions to be compared within the same scoring space. Through preference feature modulation and augmented Chebyshev preference cost bias, the preference vector simultaneously acts on the fused representation and action scoring, and the relative order of candidate actions can be changed along the completion time-energy consumption preference simplex. By applying multi-constraint masks to padding bits, scheduled tasks, super-task parallel upper limits, actions exceeding the actual number of processors, and actions without effective duration, training sampling and online inference are limited to the set of legal actions. By enabling the value estimation module to receive task aggregation representations, global features, and preference vectors, the state value changes with the current completion time-energy consumption preference. In the optional dual-objective implementation, the value representations of the two objectives are preserved through mutually independent completion time value heads and energy consumption value heads, and then fused according to preference using a smoothing maximum function and augmented terms. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.
[0019] Figure 1 This is a flowchart illustrating the flexible parallel task multi-objective reinforcement learning scheduling method that considers preference conditions, provided in an embodiment of the present invention. Figure 2 This is a schematic diagram illustrating the construction of states, candidate actions, and action masks provided in an embodiment of the present invention; Figure 3This is a schematic diagram of the processing flow of the preference condition model provided in an embodiment of the present invention; Figure 4 This is a flowchart of the training process of the preference condition model provided in an embodiment of the present invention; Figure 5 This is a flowchart of the PPO seed-driven Pareto improved local search provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of a flexible parallel task multi-objective reinforcement learning scheduling system that takes into account preference conditions, provided in an embodiment of the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0022] "A and / or B" includes the following three combinations: A only, B only, and a combination of A and B.
[0023] The use of "applies to" or "configured to" in this invention implies an open and inclusive language, which does not exclude the applicability to or configuration to devices performing additional tasks or steps. Additionally, the use of "based on" implies openness and inclusivity, because processes, steps, calculations, or other actions "based on" one or more conditions or values may in practice be based on additional conditions or values beyond those conditions.
[0024] In this invention, the term "exemplary" is used to mean "serving as an example, illustration, or description." Any embodiment described as "exemplary" in this invention is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed herein.
[0025] The following describes, with reference to the accompanying drawings, a method and system for scheduling multi-objective reinforcement learning of plastic parallel tasks that takes into account preference conditions, provided by embodiments of the present invention.
[0026] like Figure 1 As shown, this embodiment of the invention provides a method for scheduling multi-objective reinforcement learning tasks in a flexible parallel task that considers preference conditions. The method includes the following steps:
[0027] S101, obtain the task information of the task to be scheduled, the resource information of the available processor P, and the scheduling preference information.
[0028] Among them, scheduling preference information is used to characterize the preference relationship between completion time targets and energy consumption targets. Scheduling preference information is represented by a preference vector. express, ,in , Indicates the weight of completion time. It is the energy consumption weight.
[0029] Task information includes task set J and the duration of task i when using k processors. The maximum number of processors allowed for task i Resource information includes static power P stat Dynamic power P dyn .
[0030] The task set J contains N independent, malleable, parallel tasks. Task i can use 1 to... One processor.
[0031] In one alternative embodiment, duration Based on single-processor reference time Parallel acceleration index and communication overhead generation : ; in, Let be the parallel acceleration exponent for task i. Let k be the communication overhead coefficient for task i. Only retain valid k values where the duration decreases with the number of processors to avoid unnecessary scaling.
[0032] In actual deployment, the duration Alternatively, you can directly use the discrete duration table obtained from performance profiling, historical running logs, or online prediction.
[0033] S102, based on task information and resource information, construct candidate scheduling actions and map scheduling instances of different sizes to a candidate action space of preset dimensions.
[0034] S103, Based on the current scheduling status and task scheduling constraints, determine the legal candidate scheduling actions from the candidate scheduling actions.
[0035] S104. Input the action characteristics of the legal candidate scheduling actions, the state characteristics of the current scheduling state, and the scheduling preference information into the preference condition model. Use the preference condition model to encode the association between each candidate scheduling action, and adjust the encoding results and the action scores of each candidate scheduling action according to the scheduling preference information to obtain the target action score of each legal candidate scheduling action.
[0036] The action features include at least one of the following: task execution features, processor allocation features, scheduling target change features, and task scheduling progress features. In some examples, the action features are represented using 10-dimensional features, namely: validity marker, duration, etc. / Timescale C scale Processor k / Maximum available processor P max , / , / [k· ]、ΔC / C scale ΔE / E scale The proportion of tasks already scheduled / C scale as well as / P max .
[0037] State features include at least one of the following: scheduling instance size feature, current scheduling target feature, task scheduling progress feature, remaining task feature, and power feature. In some examples, state features are represented using 10-dimensional features, in the following order: P / P max N / N max Current C max / C scale Current E / E scaleScheduled task percentage, remaining task percentage, average single-processor duration of remaining tasks / C scale Average maximum parallelism of remaining tasks / P max P stat and P dyn .
[0038] To accommodate different load scales, the time scale C scale The energy consumption metric E is the larger of the sum of minimum processor hours divided by P and the maximum minimum duration of all tasks. scale Take the sum of the dynamic minimum processor time energy consumption and the static time energy consumption: ; .
[0039] S105: Based on the target action score, determine the target scheduling action from the legal candidate scheduling actions, assign the target task corresponding to the target scheduling action to the corresponding processor for execution, update the current scheduling state until the stopping condition is met, and output the scheduling scheme.
[0040] The plastic parallel task multi-objective reinforcement learning scheduling method considering preference conditions provided in this invention uses a fixed-dimensional action space, padding mapping, and action masking to ensure that the input and output dimensions of the same network do not change with the actual number of tasks and processors, and to mask the action positions caused by padding. By jointly selecting candidate actions based on task and processor number, the method simultaneously determines the task to be executed and its processor number in a single discrete action selection, allowing two types of coupled decisions to be compared within the same scoring space. Through preference feature modulation and augmented Chebyshev preference cost bias, the preference vector simultaneously acts on the fused representation and action scoring, and can change the relative order of candidate actions along the completion time-energy consumption preference simplex. By applying multi-constraint masks to padding bits, scheduled tasks, super-task parallel upper limits, actions exceeding the actual number of processors, and actions without effective duration, the method limits training sampling and online inference to the set of legal actions. By enabling the value estimation module to receive task aggregation representations, global features, and preference vectors, the state value varies with the current completion time-energy consumption preference. In the optional bi-objective implementation, the value representations of the two objectives are preserved through independent completion time value heads and energy consumption value heads, and then fused according to preference using a smoothing maximum function and augmented terms. A unified policy is trained through cross-scale PPO curriculum sampling, and when it is necessary to expand the non-dominated solution set, a rigorous Pareto improvement local search is performed using the multi-preference policy output as a seed, achieving separation between online policy reasoning and optional post-processing.
[0041] In some embodiments of the present invention, such as Figure 2 As shown, mapping scheduling instances of different sizes to a candidate action space of a preset dimension includes the following steps: S201, based on the preset maximum task size N max and preset maximum processor size P max Determine the candidate action space. Task numbering uses a single-base numbering system, i.e., i∈{1,....,N}. max The number of candidate processors satisfies k∈{1,....,P} max Candidate scheduling action index a = i × P max +(k-1), thus enabling task sorting and processor number selection to be completed in the same discrete action.
[0042] S202, map the different combinations a=(i,k) of the task to be scheduled i and the number of candidate processors k to N. max ×P max Different action positions in the candidate action space of a certain size.
[0043] S203: If the actual task size or actual processor size of the scheduling instance is less than the preset size, fill in the action positions in the candidate action space that exceed the actual task size or actual processor size. That is, for small-scale scheduling instances, action positions that exceed the actual N and P only exist as padding bits and are masked by the action mask.
[0044] In some embodiments of the present invention, determining a legal candidate scheduling action from candidate scheduling actions based on the current scheduling state and task scheduling constraints includes the following steps:
[0045] S301, based on whether task i has been scheduled and whether the number of candidate processors k exceeds the maximum number of processors allowed for the corresponding task. Does the number of candidate processors exceed the actual number of processors P, and what is the corresponding execution time? Whether it is effective determines the legality of each candidate scheduling action.
[0046] Specifically, when task i belongs to the actual task set, has not yet been scheduled, and 1 ≤ k ≤ min( ,P)and When valid, the candidate scheduling action is marked as a valid candidate scheduling action.
[0047] S302, generate an action mask based on the legality of each candidate scheduling action, and use the action mask to block illegal candidate scheduling actions.
[0048] In some embodiments of the present invention, the preference condition model includes a task feature aggregation module, a task interaction encoding module, a preference modulation module, and an action scoring module. The workflow of each module is as follows: Figure 3 As shown:
[0049] The task feature aggregation module is used to concatenate the action features, the state features, and the scheduling preference information and perform feature encoding to obtain the candidate action representation of each of the legal candidate scheduling actions. The candidate action representation is rearranged according to the number of tasks and candidate processors, and masked max pooling is performed along the dimension of the number of candidate processors to obtain the task fusion representation of each task.
[0050] The task interaction encoding module is used to perform correlation encoding on the fused representations of different tasks to obtain the task interaction representation;
[0051] The preference modulation module is used to generate feature modulation parameters based on the scheduling preference, and to modulate the task interaction representation using the feature modulation parameters;
[0052] The action scoring module is used to broadcast the modulated task interaction representation along the dimension of the number of candidate processors, and to fuse the broadcast task interaction representation with the corresponding candidate action representation to obtain the basic action score of each of the legal candidate scheduling actions.
[0053] In some embodiments of the present invention, the action scoring module is further configured to:
[0054] Based on the normalized completion time and normalized energy consumption before and after executing the corresponding candidate scheduling action, determine the change in preference cost of the corresponding candidate scheduling action under the scheduling preference information;
[0055] The preference score bias is determined based on the change in preference cost, and the preference score bias is added to the basic action score of the corresponding candidate scheduling action to obtain the target action score.
[0056] The feature modulation parameters include a channel-wise scaling parameter γ(w) and an offset parameter β(w). The modulated task interaction representation... The modulated task interaction representation is broadcast back to different numbers of processors, and concatenated with the original candidate code to obtain the basic action score.
[0057] In some examples, an explicit preference cost bias is superimposed on the base action score. This is applied to the normalized completion time increment for candidate action a. and normalized energy consumption increment The preference cost is expressed as .
[0058] Let the normalized maximum completion time and normalized total energy consumption of state s be respectively and Then state s in the preference vector The cost of preference is:
[0059] .
[0060] Candidate scheduling actions Make state Transition to state At that time, the change in preference cost caused by this candidate scheduling action is: .
[0061] Candidate scheduling actions are determined based on the changes in preference costs. Preference rating bias: = ,in, These are the learnable score scaling factors constrained by nonnegativity transformation. Candidate scheduling actions. The target action score is: ,in Scoring is based on basic movements.
[0062] For each legitimate scheduling action, the environment can directly adopt... As a reward; or let the potential function be: and adopt: Therefore, the two reward representations remain consistent under the same state transition.
[0063] As an optional implementation, a preference-conditional scalar value head is used to concatenate the task aggregation representation, global features, and preference vector to output a scalar state value.
[0064] As another optional implementation, the value estimation module includes a completion time value head and an energy consumption value head. The completion time value head outputs a normalized estimate of the completion time increment from the current state to the end of the round. The energy consumption value head outputs a normalized energy consumption increment estimate from the current state to the end of the round. .in, and The value is non-negative. The value of a preference-conditional state is expressed as:
[0065] ;
[0066] in, τ is the smoothing coefficient. In the dual-objective value estimation implementation, τ can be 5.0, and the augmentation coefficient η can be 0.2. The dual-value head allows each objective to retain a relatively independent representation. Dual-objective value estimation is an optional implementation.
[0067] For each legitimate scheduling action, the environment provides a reward based on the target increment. Alternatively, a potential function can be used. Both of the aforementioned methods ensure that the reward at each step is aligned with the final augmented Chebyshev objective.
[0068] In some embodiments of the present invention, the action features, the state features, and the scheduling preference information are concatenated and feature-encoded to obtain candidate action representations for each of the legal candidate scheduling actions, including:
[0069] Action features, state features, and scheduling preference information are concatenated, and the concatenated features are mapped to candidate action representations through a linear layer and a GELU nonlinear activation layer.
[0070] The fusion representations of different tasks are correlated and encoded to obtain task interaction representations, including:
[0071] Multi-head self-attention mechanism is used to encode the associations between different tasks to obtain task interaction representations.
[0072] Schematic, the scaled embedding layer from P / P max and N / N max Generate scale vectors and superimpose them onto the task representation. The task-interactive encoder uses multi-head self-attention to extract competition and ranking relationships between tasks; optionally, learnable biases based on the relative positions of tasks are added to the attention weights.
[0073] In some embodiments of the present invention, the process of assigning the target task corresponding to the target scheduling action to the corresponding processor for execution and updating the current scheduling state includes the following steps:
[0074] S601, based on the current availability time of each available processor, select the same number of target processors as indicated by the target scheduling action from the available processors.
[0075] S602, determine the start time of the target task based on the current available time of each target processor and the execution time of the target task with the corresponding number of processors. and end time .
[0076] S603 updates the current available time of each target processor according to the end time of the target task, and updates the current maximum completion time, current total energy consumption, and task scheduling status.
[0077] S604 sets the completion of scheduling of all pending tasks as the stopping condition.
[0078] Specifically, when selecting the target scheduling action (i,k), the processors are sorted in ascending order of their current available time, and the top k processors are selected to form a set. .
[0079] Task start time End time Represented as: ; in, This represents the current available time for processor q. After execution, it will... The available time for each processor is updated to .
[0080] Maximum completion time C max The total energy consumption E is expressed as: ; ; in, For processor unit dynamic power, Let C be the system's static power. The optimization objective is to simultaneously reduce C. max With E.
[0081] In some embodiments of the present invention, such as Figure 4 As shown, the preference conditional model training process includes the following steps:
[0082] S701 samples training instances from scheduling instances with different task sizes and processor sizes, and generates corresponding scheduling preference information for the training instances;
[0083] S702, using the preference conditional model to perform task scheduling on training instances to obtain scheduling trajectories;
[0084] S703 determines rewards based on changes in completion time and energy consumption targets during task scheduling;
[0085] S704 uses the policy optimization PPO algorithm to update the model parameters of the preference condition model based on scheduling trajectory and reward.
[0086] In some examples, a proximal policy optimization algorithm is used during the training phase. Instances are sampled from multiple groups of instances of varying sizes in each round, while simultaneously selecting instances with a probability of 0.5 from w. C +w E The preference vectors are uniformly sampled on a simplex for two objectives with a value of 1 to cover the overall preference range. Sampling is performed with a probability of 0.5 according to a symmetric Dirichlet distribution with parameters (0.3, 0.3) to increase the proportion of extreme preference samples near the two single-objective endpoints. Trajectories are collected using four parallel environments, advantage is calculated through generalized advantage estimation, and the network is updated using truncated policy objectives, value loss, and entropy regularization.
[0087] To improve cross-scale generalization ability, course weights are adjusted as training progresses: the first 20% of updates increase the sampling weights for the low-conflict and medium-load groups; 20% to 50% of updates increase the sampling weights for the medium-load and medium-high-load groups; and the last 50% of updates increase the sampling weights for the high-load, critical-load, and large-scale groups. Observation normalizers are warmed up separately on each scale group and then share statistics. Validation is performed every 25 updates, with 9 validation instances extracted from each scale group and 21 preference vectors scanned. A two-dimensional hypervolume metric is used to select the model.
[0088] In a reproducible embodiment, value estimation uses a preference-conditional scalar value head with a hidden dimension H of 256, 4 multi-head self-attention heads, and GELU activation function, with an initial learning rate of and decay to The PPO cutoff coefficient is 0.2, the discount factor is 1.0, and the generalized advantage estimation parameter is 0.95. Since the scheduling rounds are finite in time and the potential function difference reward is consistent with the final undiscounted objective, the discount factor is set to 1.0 to accumulate the reward of each scheduling step with equal weight. A total of 500 updates are performed, with 8192 environmental steps collected in each update. Four rounds of updates are performed on each batch of trajectories. The mini-batch size is 256, the gradient accumulation step count is 8, the upper limit of the gradient norm is 0.5, and the initial entropy coefficient is 0.01. The augmentation coefficient η is 0.2, and the original parameter of the preference bias scale λ is initialized to 1.0 and transformed using softplus.
[0089] The core scheduling pseudocode is as follows: Input scheduling instance and preference vector; initialize processor available time, cumulative energy consumption, and task state; when there are unscheduled tasks, construct N. max ×P max Candidate actions and masks for five types of illegal actions are generated. Candidate action features and global features are calculated. Candidate encoding, mask pooling, scale embedding, self-attention, FiLM modulation, preference bias superposition, and preference conditional value estimation are performed. (i,k) are selected from the legal actions. Task i is assigned to the k earliest available processors and its state is updated. After all tasks are completed, the scheduling record, maximum completion time, and total energy consumption are output.
[0090] The PPO training pseudocode is as follows: Initialize policy parameters, value parameters, and observation normalization statistics; for each update, sample scale instances and sample preference vectors according to course weights, collect trajectories using a parallel environment, calculate the potential function time difference reward, payoff, and generalized advantage, repeatedly calculate the truncated policy loss, value loss, and entropy regularization term in mini-batches, and update the parameters; save the model according to the two-dimensional hypervolume index of the validation instances.
[0091] In some embodiments of the present invention, when further improvements to the multi-preference scheduling scheme are needed, methods such as... Figure 5The PPO seed-driven Pareto improvement local search scheme is shown. Specifically, scheduling seeds are first generated under multiple preference vectors using a pre-trained policy. A local search is then performed independently for each seed: either two tasks are randomly selected for sequential swapping or insertion, or a task is randomly selected and its processor count is changed to the number of other legal processors allowed for that task.
[0092] Each candidate scheme obtained from the transformation is decoded according to the earliest available processor rule, and C is calculated. max And E. A candidate solution is accepted and the current solution is updated only if it improves at least one objective and does not worsen the other objective, i.e., the candidate solution dominates the current solution; otherwise, the original current solution is retained. The search for a single seed stops after reaching a preset evaluation budget, an upper limit on the number of iterations, or a threshold for the number of consecutive periods without improvement. Finally, the improvement results of each seed are summarized, duplicate solutions and dominated solutions are removed, and a set of non-dominated scheduling solutions is output. This local search is an optional post-processing step after training and is not involved in the training of the PPO policy network.
[0093] In some embodiments of the present invention, a two-level verification process is employed: identically distributed testing and scale extrapolation testing. The training set and identically distributed testing set include seven sets of instances, A to G, with 8 to 40 processors and 6 to 90 tasks, covering a task-to-processor ratio of 0.75 to 2.50. The scale extrapolation testing set includes four sets of instances, H1 to H4, used solely for testing, with 45, 50, 55, and 60 processors, and 100, 110, 130, and 150 tasks, respectively. The maximum allowed number of processors per task remains at 40, as covered during the training phase. The single-processor duration of the task is sampled from a log-normal distribution with a mean of 4.0 and a standard deviation of 0.8, rounded up, and truncated to [20, 200]. The parallel acceleration exponent is uniformly sampled in [0.70, 0.95], and the communication overhead coefficient is uniformly sampled in [0, 2.0]. The static power parameter is sampled at 0.05 × U(0.8, 1.2), and the dynamic power parameter is sampled at 1.0 × U(0.8, 1.2). The upper limit of the number of task processors is set to equal the upper limit of the allowed scale with a probability of 0.35; otherwise, random sampling is performed within the legal range, and only the k value, which shows that the duration decreases as the number of processors increases, is retained. Independent training strategies using three random seeds (7, 17, and 27) were employed. For each test scale, 20 identical instances were selected, and the strategy scanned 21 preference vectors. NSGA-II used a population size of 100, a total of 3000 target evaluations, and applied 10 search random seeds to each instance. CP-SAT weighted scanning used 21 weights, with each weight having a 5-second interval, and was only run on groups A to F with N ≤ 40 tasks; CP-SAT was not run on group G or the extrapolation group of all scales. All three training iterations used the preference conditional scalar value head. The PPO results in Table 1 do not include the aforementioned local search post-processing. All algorithms shared the hypervolume reference point determined by all valid solutions on the same instance, and paired Wilcoxon signed-rank test and Holm correction were applied to the instance-level hypervolume.
[0094] Table 1. Test results of different algorithms under three independent training seeds.
[0095] The values in Table 1 were first averaged over 20 fixed instances at each test scale, and then summarized for training random seeds 7, 17, and 27. A larger hypervolume indicates a better completion time-energy consumption non-dominated solution set. On the same distribution groups A to G, the macro-average hypervolume of the PPO of this invention is 1.1905, which is about 5.1% higher than 1.1331 of NSGA-II, and the average running time is reduced from 0.7344 seconds to 0.4961 seconds, a reduction of about 32.5%. Among them, in the large-scale group G, the hypervolume of the PPO of this invention is 1.3236, which is about 23.1% higher than 1.0748 of NSGA-II. On the extrapolation groups of sizes H1 to H4, which were not involved in training and validation, the macro-average supervolume of the PPO of this invention was 1.2732, which is about 47.4% higher than NSGA-II's 0.8639 and about 9.3% higher than the minimum processor time heuristic's 1.1648. The instance-level difference between PPO and NSGA-II was significant at all extrapolation sizes after Holm correction. In the H4 group, which contains 60 processors and 150 tasks, the PPO of this invention still achieved a supervolume of 1.2632, indicating that the unified policy can handle larger task and processor sizes with zero shots, provided that the action parallelism does not exceed the training coverage. CP-SAT weighted scans achieved a high supervolume in its applicable groups A to F, but the macro-average runtime was 68.5937 seconds, while the corresponding average runtime of the PPO of this invention in groups A to F was about 0.3891 seconds, indicating that the trained policy is more suitable for online multi-preference scheduling.
[0096] This invention also provides a flexible parallel task multi-objective reinforcement learning scheduling system that considers preference conditions, such as... Figure 6 As shown, the system includes a data acquisition module 601, a candidate action construction module 602, a legal action determination module 603, a preference condition scoring module 604, and a task scheduling module 605.
[0097] The data acquisition module 601 is used to acquire task information of the task to be scheduled, resource information of available processors, and scheduling preference information. The scheduling preference information is used to characterize the preference relationship between the completion time target and the energy consumption target.
[0098] The candidate action construction module 602 is used to construct candidate scheduling actions based on task information and resource information, and to map scheduling instances of different sizes to a candidate action space of preset dimensions.
[0099] The legal action determination module 603 is used to determine legal candidate scheduling actions from the candidate scheduling actions based on the current scheduling status and task scheduling constraints.
[0100] The preference condition scoring module 604 is used to input the action characteristics of the legal candidate scheduling actions, the state characteristics of the current scheduling state, and the scheduling preference information into the preference condition model. The preference condition model is used to encode the association between each candidate scheduling action, and the encoding results and the action scores of each candidate scheduling action are adjusted according to the scheduling preference information to obtain the target action score of each legal candidate scheduling action.
[0101] The task scheduling module 605 is used to determine the target scheduling action from the legal candidate scheduling actions based on the target action score, assign the target task corresponding to the target scheduling action to the corresponding processor for execution, update the current scheduling status until the stopping condition is met, and output the scheduling scheme.
[0102] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0103] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.
[0104] The foregoing has provided a detailed description of a flexible parallel task multi-objective reinforcement learning scheduling method and system considering preference conditions provided by embodiments of the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A scheduling method for multi-objective reinforcement learning of plastic parallel tasks that considers preference conditions, characterized in that, The method includes: Obtain task information, available processor resource information, and scheduling preference information for the task to be scheduled. The scheduling preference information is used to characterize the preference relationship between the completion time target and the energy consumption target. Based on the task information and resource information, candidate scheduling actions are constructed, and scheduling instances of different sizes are mapped to a candidate action space of preset dimensions. Based on the current scheduling status and task scheduling constraints, determine the legal candidate scheduling actions from the candidate scheduling actions; The action features of the legal candidate scheduling actions, the state features of the current scheduling state, and the scheduling preference information are input into the preference condition model. The preference condition model is used to encode the association between each candidate scheduling action. The encoding results and the action scores of each candidate scheduling action are adjusted according to the scheduling preference information to obtain the target action score of each legal candidate scheduling action. Based on the target action score, a target scheduling action is determined from the legal candidate scheduling actions. The target task corresponding to the target scheduling action is assigned to the corresponding processor for execution, and the current scheduling status is updated until the stopping condition is met. Then, the scheduling scheme is output.
2. The method for scheduling multi-objective reinforcement learning tasks in a flexible parallel process considering preference conditions according to claim 1, characterized in that, The process of mapping scheduling instances of different sizes to a candidate action space of a preset dimension includes: The candidate action space is determined based on the preset maximum task size and the preset maximum processor size; Different combinations of the task to be scheduled and the number of candidate processors are mapped to different action positions in the candidate action space; If the actual task size or actual processor size of the scheduling instance is less than the preset size, the positions of actions in the candidate action space that exceed the actual task size or the actual processor size are filled.
3. The method for scheduling multi-objective reinforcement learning tasks in a flexible parallel process considering preference conditions according to claim 1, characterized in that, Based on the current scheduling state and task scheduling constraints, legal candidate scheduling actions are determined from the candidate scheduling actions, including: The legality of each candidate scheduling action is determined based on whether the task has been scheduled, whether the number of candidate processors exceeds the number of processors allowed for the corresponding task, whether the number of candidate processors exceeds the actual number of processors, and whether the corresponding execution time is valid. An action mask is generated based on the legality of each candidate scheduling action, and the action mask is used to block illegal candidate scheduling actions.
4. The method for scheduling multi-objective reinforcement learning tasks in a flexible parallel process considering preference conditions according to claim 1, characterized in that, The preference condition model includes a task feature aggregation module, a task interaction encoding module, a preference modulation module, and an action scoring module; The task feature aggregation module is used to concatenate the action features, the state features, and the scheduling preference information and perform feature encoding to obtain the candidate action representation of each of the legal candidate scheduling actions. The candidate action representation is rearranged according to the number of tasks and candidate processors, and masked max pooling is performed along the dimension of the number of candidate processors to obtain the task fusion representation of each task. The task interaction encoding module is used to perform association encoding on the fusion representation of different tasks to obtain the task interaction representation; The preference modulation module is used to generate feature modulation parameters according to the scheduling preference, and to modulate the task interaction representation using the feature modulation parameters; The action scoring module is used to broadcast the modulated task interaction representation along the dimension of the number of candidate processors, and fuse the broadcast task interaction representation with the corresponding candidate action representation to obtain the basic action score of each of the legal candidate scheduling actions.
5. The method for scheduling multi-objective reinforcement learning tasks in a flexible parallel process considering preference conditions according to claim 4, characterized in that, The action scoring module is also used for: Based on the normalized completion time and normalized energy consumption before and after executing the corresponding candidate scheduling action, determine the change in preference cost of the corresponding candidate scheduling action under the scheduling preference information; The preference score bias is determined based on the change in preference cost, and the preference score bias is added to the basic action score of the corresponding candidate scheduling action to obtain the target action score.
6. The method for scheduling multi-objective reinforcement learning tasks in a flexible parallel process considering preference conditions according to claim 4, characterized in that, The step of concatenating and encoding the action features, state features, and scheduling preference information to obtain candidate action representations for each of the legal candidate scheduling actions includes: The action features, the state features, and the scheduling preference information are concatenated, and the concatenated features are mapped to the candidate action representation through a linear layer and a GELU nonlinear activation layer. The process of associating and encoding the fused representations of different tasks to obtain task interaction representations includes: The associations between different tasks are encoded using a multi-head self-attention mechanism to obtain the task interaction representation.
7. The method for scheduling multi-objective reinforcement learning tasks in a flexible parallel process considering preference conditions according to claim 1, characterized in that, The step of assigning the target task corresponding to the target scheduling action to the corresponding processor for execution and updating the current scheduling state includes: Based on the current availability time of each available processor, select the same number of target processors as indicated by the target scheduling action from the available processors; The start and end times of the target tasks are determined based on the current available time of each target processor and the execution time of the target tasks with the corresponding number of processors. Update the current available time of each target processor according to the end time of the target task, and update the current maximum completion time, current total energy consumption and task scheduling status. The stopping condition is that all tasks to be scheduled have been completed.
8. The method for scheduling multi-objective reinforcement learning tasks in a flexible parallel process considering preference conditions according to claim 1, characterized in that, The preference condition model is trained in the following manner: Training instances are sampled from scheduling instances with different task sizes and processor sizes, and corresponding scheduling preference information is generated for the training instances; The training instances are task-scheduled using the preference condition model to obtain scheduling trajectories; Rewards are determined based on changes in completion time and energy consumption targets during task scheduling. Based on the scheduling trajectory and the reward, the model parameters of the preference condition model are updated using a policy optimization algorithm.
9. The method for scheduling multi-objective reinforcement learning tasks in a flexible parallel task considering preference conditions according to any one of claims 1 to 8, characterized in that, The action characteristics include at least one of the following: task execution characteristics, processor allocation characteristics, scheduling target change characteristics, and task scheduling progress characteristics; The state characteristics include at least one of the following: scheduling instance size characteristics, current scheduling target characteristics, task scheduling progress characteristics, remaining task characteristics, and power characteristics.
10. A flexible parallel task multi-objective reinforcement learning scheduling system considering preference conditions, characterized in that, The system includes: The data acquisition module is used to acquire task information, available processor resource information, and scheduling preference information of the task to be scheduled. The scheduling preference information is used to characterize the preference relationship between the completion time target and the energy consumption target. The candidate action construction module is used to construct candidate scheduling actions based on the task information and resource information, and map scheduling instances of different sizes to a candidate action space of a preset dimension. The legal action determination module is used to determine legal candidate scheduling actions from the candidate scheduling actions based on the current scheduling state and task scheduling constraints; The preference condition scoring module is used to input the action features of the legal candidate scheduling actions, the state features of the current scheduling state, and the scheduling preference information into the preference condition model, use the preference condition model to encode the association between each candidate scheduling action, and adjust the encoding results and the action scores of each candidate scheduling action according to the scheduling preference information to obtain the target action score of each legal candidate scheduling action. The task scheduling module is used to determine the target scheduling action from the legal candidate scheduling actions based on the target action score, allocate the target task corresponding to the target scheduling action to the corresponding processor for execution, update the current scheduling status until the stopping condition is met, and output the scheduling scheme.
