Task scheduling method and device, equipment, medium and product
By constructing a task scheduling method and optimizing scheduling decision parameters using reinforcement learning and deep learning, the problem of limited computing power of user terminals is solved, and reasonable scheduling of tasks between user terminals and edge nodes is realized, thereby improving task execution efficiency and adaptability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-12
- Publication Date
- 2026-04-07
AI Technical Summary
In a cloud-edge-device collaborative computing architecture, the limited computing and storage capabilities of user terminals prevent them from executing all tasks. How can task scheduling be implemented between user terminals and edge nodes to ensure the smooth execution of tasks?
A task scheduling method is constructed by building an objective function with scheduling decision parameters as independent variables and overall score as dependent variable. Reinforcement learning algorithm and deep learning network are used to optimize the scheduling decision parameters, balance task latency, energy consumption and task drop rate, and achieve reasonable task scheduling.
It improves the rationality and efficiency of task scheduling, ensures the smooth execution of tasks, and adapts to diverse business scenarios such as smart grids, intelligent manufacturing, and vehicle networking.
Smart Images

Figure CN121807463A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of scheduling technology, and in particular to a task scheduling method, apparatus, equipment, medium and product. Background Technology
[0002] With the rapid development of cloud computing, edge computing, and endpoint computing, cloud-edge-end collaborative computing architecture is gradually becoming an important part of new information infrastructure. The hardware architecture, operating system, network connectivity, and service capabilities of different types of nodes vary significantly.
[0003] As the node through which users directly interact, the user terminal is responsible for data collection, preliminary processing, and feedback control. Due to limitations in computing and storage capabilities, the user terminal may not be able to execute all tasks generated by it. Therefore, some tasks can be offloaded to edge nodes for execution. However, how to implement task scheduling within the user terminal itself and each edge node to ensure the smooth execution of tasks is a problem that urgently needs to be solved. Summary of the Invention
[0004] Therefore, it is necessary to provide a task scheduling method, apparatus, equipment, medium, and product to address the aforementioned technical problems.
[0005] Firstly, this application provides a task scheduling method, including:
[0006] Obtain the tasks to be scheduled from the user terminal; each task to be scheduled is configured with scheduling decision parameters; the scheduling decision parameters are used to characterize the processing node of the task to be scheduled, and the selection range of the target value of the scheduling decision parameters includes the user terminal and each edge node;
[0007] Using the scheduling decision parameters of each task to be scheduled as independent variables and the total comprehensive score corresponding to each task to be scheduled as the dependent variable, a first objective function is constructed; the comprehensive score corresponding to each task to be scheduled is the weighted value of the latency, energy consumption and task drop rate of the task to be scheduled.
[0008] With the goal of minimizing the overall comprehensive score, the first objective function is solved to obtain the target values of each scheduling decision parameter;
[0009] Task scheduling is performed based on the target values of each scheduling decision parameter.
[0010] In one embodiment, the first objective function includes a first sub-function and a second sub-function. Correspondingly, the first objective function is constructed using the scheduling decision parameters of each task to be scheduled as independent variables and the total comprehensive score corresponding to each task to be scheduled as the dependent variable. This includes: for each task to be scheduled, constructing a first sub-function under a first condition; the first condition is that the parameter values of the scheduling decision parameters of the task to be scheduled represent the situation where the task to be scheduled is processed by the corresponding user terminal; the first sub-function is an expression corresponding to the processing latency of the task to be scheduled, the total energy consumption including dynamic energy consumption and static energy consumption, and the weighted sum of the task drop rate; the first constraint condition corresponding to the first sub-function includes that the processing latency does not exceed the maximum allowable latency; for each task to be scheduled, constructing a second sub-function under a second condition; the second condition is that the parameter values of the scheduling decision parameters of the task to be scheduled represent the situation where the task to be scheduled is processed by an edge node; the second sub-function is an expression corresponding to the total latency including processing latency, waiting latency, and transmission latency, the total energy consumption including transmission energy consumption, dynamic energy consumption, and static energy consumption, and the weighted sum of the task drop rate; the second constraint condition corresponding to the second sub-function includes that the total latency does not exceed the maximum allowable latency.
[0011] In one embodiment, with the goal of minimizing the overall score, a first objective function is solved to obtain the target values of each scheduling decision parameter. This includes: using a reinforcement learning algorithm that combines policy gradient and value function estimation to solve the first objective function with the goal of minimizing the overall score, and obtaining the target values of each scheduling decision parameter.
[0012] In one embodiment, task scheduling is performed based on the target values of each scheduling decision parameter, including: acquiring the computing requirements data of each task to be scheduled, the computing capacity data of each edge node, and the computing capacity data of each cloud node; determining the target values of the migration parameters of each task to be scheduled based on the target values of the scheduling decision parameters of each task to be scheduled, wherein the selection range of the target values of the migration parameters includes each cloud node; and performing task scheduling based on the target values of the scheduling decision parameters and the target values of the migration parameters of each task to be scheduled.
[0013] In one embodiment, based on the computing demand data and computing capacity data, and on the target values of the scheduling decision parameters for each task to be scheduled, the target values of the migration parameters for each task to be scheduled are determined. This includes: based on the target values of the scheduling decision parameters, constructing a second objective function with the migration parameters of each task to be scheduled as independent variables and the total time cost as the dependent variable; the total time cost includes the time cost required for task processing and the time cost required for the task to migrate from the edge node to the cloud node; and solving the second objective function with the goal of minimizing the total time cost to obtain the target values of the migration parameters.
[0014] In one embodiment, solving a second objective function to obtain the target value of the transfer parameter with the goal of minimizing the total time cost includes: using a dual-depth action value network with a duel network to solve a second objective function with the goal of minimizing the total time cost and obtain the target value of the transfer parameter.
[0015] Secondly, this application also provides a task scheduling device, comprising:
[0016] The task acquisition module is used to acquire the tasks to be scheduled from user terminals; each task to be scheduled is configured with scheduling decision parameters; the scheduling decision parameters are used to characterize the processing node of the task to be scheduled, and the selection range of the target value of the scheduling decision parameters includes user terminals and each edge node.
[0017] The first construction module is used to construct the first objective function with the scheduling decision parameters of each task to be scheduled as independent variables and the total comprehensive score corresponding to each task to be scheduled as the dependent variable; the comprehensive score corresponding to each task to be scheduled is the weighted value of the latency, energy consumption and task drop rate of the task to be scheduled.
[0018] The first solution module is used to solve the first objective function with the goal of minimizing the overall comprehensive score, and obtain the target values of each scheduling decision parameter.
[0019] The task scheduling module is used to perform task scheduling based on the target values of each scheduling decision parameter.
[0020] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method provided in the first aspect.
[0021] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method provided in the first aspect.
[0022] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the method provided in the first aspect.
[0023] The aforementioned task scheduling method, apparatus, equipment, medium, and product construct a first objective function with the scheduling decision parameters of each task to be scheduled as independent variables and the total comprehensive score corresponding to each task to be scheduled as the dependent variable. The first objective function is solved with the goal of minimizing the total comprehensive score, so that the target values of each scheduling decision parameter can balance the latency, energy consumption, and task drop rate of the tasks to be scheduled while minimizing the total comprehensive score, thereby improving the rationality of task scheduling and ensuring that the tasks to be scheduled are executed smoothly. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 This is a flowchart illustrating a task scheduling method in one embodiment;
[0026] Figure 2 This is a flowchart illustrating the first objective function construction step in one embodiment;
[0027] Figure 3 This is a flowchart illustrating the steps for solving the first objective function in one embodiment;
[0028] Figure 4 This is a flowchart illustrating the task scheduling process in one embodiment;
[0029] Figure 5 A flowchart illustrating the steps for determining the target value of migration parameters in one embodiment;
[0030] Figure 6 This is a flowchart illustrating the steps for solving the second objective function in one embodiment;
[0031] Figure 7 This is a structural block diagram of a task scheduling device in one embodiment;
[0032] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0033] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0034] In one exemplary embodiment, a task scheduling method is provided, see [link to example]. Figure 1 The method includes:
[0035] S110: Obtain the tasks to be scheduled from the user terminal.
[0036] The task scheduling method provided in this embodiment can be executed by a scheduler located at the network layer, which is connected to cloud nodes, edge nodes, and user terminals. A task queue is also provided on the network layer to store various tasks to be scheduled.
[0037] Each task to be scheduled is configured with scheduling decision parameters; the scheduling decision parameters are used to characterize the processing node of the task to be scheduled, and the target value of the scheduling decision parameters can be selected from user terminals and edge nodes.
[0038] For example, the scheduling decision parameters corresponding to the task to be scheduled generated by user terminal i at time t. for:
[0039]
[0040] In the formula, local execution can be understood as execution on user terminal i. When the value is not 0, the task to be scheduled needs to be offloaded to the m-th edge node for execution. The value of m ranges from [0, 1, ..., M], where M is the total number of edge nodes. Therefore, the target value of the scheduling decision parameter can be selected from both the user terminal itself and each edge node.
[0041] S120, with the scheduling decision parameters of each task to be scheduled as independent variables and the total comprehensive score corresponding to each task to be scheduled as dependent variable, construct the first objective function; the comprehensive score corresponding to each task to be scheduled is the weighted value of the delay, energy consumption and task drop rate of the task to be scheduled.
[0042] The total comprehensive score for each task to be scheduled is the sum of the comprehensive scores for each task to be scheduled.
[0043] Understandably, the weights corresponding to latency, energy consumption, and task drop rate are used to balance latency, energy consumption, and task drop rate.
[0044] S130, with the goal of minimizing the overall comprehensive score, solve the first objective function to obtain the target values of each scheduling decision parameter.
[0045] Understandably, minimizing the overall score means minimizing the weighted average of latency, energy consumption, and task drop rate. By achieving a balance among these three factors, latency, energy consumption, and task drop rate can all be minimized, thereby improving the effectiveness of task scheduling.
[0046] If the target value of the scheduling decision parameter of a task to be scheduled is 0, the task to be scheduled will be executed by the corresponding user terminal; if the target value of the scheduling decision parameter of a task to be scheduled is not 0, the task to be scheduled needs to be unloaded to the edge node corresponding to the target value.
[0047] S140 performs task scheduling based on the target values of each scheduling decision parameter.
[0048] The above task scheduling method constructs a first objective function by taking the scheduling decision parameters of each task to be scheduled as independent variables and the total comprehensive score corresponding to each task to be scheduled as dependent variables. The first objective function is solved with the goal of minimizing the total comprehensive score. The target values of each scheduling decision parameter obtained can balance the latency, energy consumption and task drop rate of the tasks to be scheduled while minimizing the total comprehensive score, thereby improving the rationality of task scheduling and ensuring that the tasks to be scheduled are executed smoothly.
[0049] Based on the technical solutions provided in the above embodiments, an optional embodiment is provided. In this optional embodiment, the first objective function is refined into a first sub-function and a second sub-function, and the construction step of the first objective function in S120 is refined.
[0050] See Figure 2 The steps for constructing the first objective function include:
[0051] S210, for each task to be scheduled, construct a first sub-function under a first condition; the first condition is that the parameter values of the scheduling decision parameters of the task to be scheduled represent the situation where the task to be scheduled is processed by the corresponding user terminal; the first sub-function is an expression corresponding to the processing delay of the task to be scheduled, the total energy consumption including dynamic energy consumption and static energy consumption, and the weighted sum of the task drop rate; the first constraint condition corresponding to the first sub-function includes that the processing delay does not exceed the maximum allowable delay.
[0052] S220, for each task to be scheduled, construct a second sub-function under the second case; the second case is the parameter value of the scheduling decision parameter of the task to be scheduled, which represents the case where the task to be scheduled is processed by the edge node; the second sub-function is an expression corresponding to the total delay including processing delay, waiting delay and transmission delay, the total energy consumption including transmission energy consumption, dynamic energy consumption and static energy consumption, and the weighted sum of task drop rate; the second constraint condition corresponding to the second sub-function includes that the total delay does not exceed the maximum allowable delay.
[0053] For example, based on the first and second sub-functions above, the first objective function is:
[0054]
[0055] In the formula, The overall score for the tasks to be scheduled for user terminal i at time t; The time required for user terminal i to execute the scheduled task, i.e., the processing latency; The task drop rate of the scheduled tasks generated by user terminal i at time t; The dynamic energy consumed by user terminal i to execute the scheduled task, i.e., dynamic energy consumption; Static energy consumption is the energy consumed by user terminal i while waiting to execute a scheduled task. The time required to transmit the scheduled task generated by user terminal i at time t to the edge node is calculated, i.e., the transmission delay. The time between when the scheduled task generated by user terminal i at time t is transmitted to the edge node and when it begins execution, i.e., the waiting delay; The time required for the scheduled task generated by user terminal i at time t to be executed by the edge node, i.e., the processing latency; The time required for the scheduled task generated by user terminal i at time t to be unloaded to the edge node, i.e., the transmission energy consumption; Dynamic energy consumption refers to the dynamic energy consumed when a scheduled task generated by user terminal i at time t is executed by an edge node. Static energy consumption is the energy consumed by the edge node while the scheduled task generated by user terminal i at time t is waiting to be executed. , and For weights.
[0056] Among them, processing latency The formula for calculating can be as follows:
[0057]
[0058] In the formula, For data size, To calculate density, For user terminals Its computing power.
[0059] Among them, dynamic energy consumption and static energy consumption The calculation formula is as follows:
[0060]
[0061]
[0062]
[0063] In the formula, The waiting time is the duration for user terminal i to wait to execute the scheduled task, i.e., the waiting delay. The time when user terminal i begins executing the scheduled task. The time when a task to be scheduled is added to the task queue. The static power of user terminal i while it waits to execute the scheduled task; Dynamic power for user terminal i to execute the scheduled task.
[0064] Among them, transmission delay The calculation formula is as follows:
[0065]
[0066] In the formula, Indicates the size of the task data. It is the transmission rate from the scheduled task of user terminal i to the edge node m. This represents the bandwidth of the communication channel from the user terminal to the edge node. This represents the channel gain from user terminal i to edge node m. This represents the transmit power of user terminal i. This represents the noise power received by the edge node.
[0067] Among them, processing latency The calculation formula is as follows:
[0068]
[0069] In the formula, The computational capability of edge node m.
[0070] Among them, waiting delay The calculation formula is as follows:
[0071]
[0072] In the formula, The time for the edge node to execute the scheduled task of user terminal i. The time it takes for a task to be scheduled to be added to the task queue, i.e., the time mentioned above. .
[0073] Among them, static energy consumption The calculation formula is as follows:
[0074]
[0075] In the formula, This represents the static power of edge nodes waiting to execute scheduled tasks.
[0076] Among them, transmission energy consumption The calculation formula is as follows:
[0077]
[0078] In the formula, For transmission power.
[0079] Among them, dynamic energy consumption The calculation formula is as follows:
[0080]
[0081] In the formula, Dynamic power for executing scheduled tasks on edge nodes.
[0082] The first constraint includes: , This represents the maximum allowable delay.
[0083] The second constraint includes: .
[0084] Based on the first objective function described above, the optimization objective can be expressed as:
[0085]
[0086] In the formula, , , I represents the total number of user terminals, T represents the maximum time within the preset time period, and M represents the total number of edge nodes.
[0087] In this embodiment, a first sub-function is constructed for the case where the task to be scheduled is processed by the corresponding user terminal, and a second sub-function is constructed for the case where the task to be scheduled is processed by the edge node, thereby obtaining a first objective function that includes the first sub-function and the second sub-function, so as to ensure the comprehensiveness of the first objective function and thus improve the accuracy of subsequent objective value calculation.
[0088] Based on the technical solutions provided in the above embodiments, an optional embodiment is provided, in which the first objective function solution step in S130 is refined.
[0089] See Figure 3 The steps for solving the first objective function include:
[0090] S310 employs a reinforcement learning algorithm that combines policy gradient and value function estimation. With the goal of minimizing the overall score, it solves the first objective function to obtain the target values of each scheduling decision parameter.
[0091] Among them, reinforcement learning algorithms that combine policy gradient and value function estimation can adopt the Actor-Critic algorithm. The Actor-Critic algorithm generates actions through the Actor network and evaluates the value of actions through the Critic network, and uses the collaboration of the two to achieve policy optimization and efficient learning.
[0092] For example, the process of solving the first objective function based on the Actor-Critic algorithm may include:
[0093] S1, define a quadruple M = (N, S, A, R), where N represents the set of all tasks to be scheduled, S represents the state space of each task to be scheduled, A represents the action space of each task to be scheduled, and R represents the total reward obtained by each task to be scheduled based on its actions.
[0094] Wherein, the t-th state in the state space It can be represented as:
[0095]
[0096] In the formula, Indicates the size of the task to be scheduled. This includes the computation latency and transmission latency of the task to be scheduled. It indicates the status information of edge nodes, including computing power and the number of tasks currently waiting and running on the edge server.
[0097] The action space can be understood as the range of values for the target values of the scheduling decision parameters, i.e., the t-th action in the action space. It can be represented as:
[0098]
[0099] The reward function used to calculate the reward is:
[0100]
[0101] In the formula, This represents the success rate of task uninstallation. This represents the total number of tasks that failed to uninstall. This represents the total number of tasks that have been attempted to be uninstalled; Indicates energy consumption; It is the historical average energy consumption; It is an energy consumption set, containing all energy consumption data for user i from time 0 to time t. It is the last element in the energy consumption set, representing the current energy consumption value; represent ; This represents a delay; This represents the maximum allowed delay time, as mentioned above. ; Represents the historical average delay; This represents the reward value corresponding to time t.
[0102] S2, the Actor-Critic algorithm, based on the above four-tuple, aims to minimize the overall comprehensive score, and uses the first and second constraints as constraints to solve the first objective function, thereby obtaining the target values of each scheduling decision parameter.
[0103] The Actor-Critic algorithm optimizes policies in reinforcement learning by combining policy gradients and value function estimation. Its solution process can be divided into five core stages: initialization, interactive sampling, value assessment, policy update, and iterative optimization. Initialization involves setting the initial parameters and network structure of the algorithm. Interactive sampling involves collecting experience data through agent-environment interaction. Value assessment involves the critic network evaluating the value of the current state or action. Policy update aims to minimize the error and improve the accuracy of value estimation. Iterative optimization involves repeating the interactive, assessment, and update steps until the policy converges.
[0104] In this embodiment, a reinforcement learning algorithm combining policy gradient and value function estimation is used to solve the first objective function, which can obtain the target value of the scheduling decision parameter that satisfies the optimization objective, thereby improving the rationality of task scheduling.
[0105] Based on the technical solutions provided in the above embodiments, an optional embodiment is provided, in which the task scheduling processing steps in S140 are refined.
[0106] See Figure 4 The task scheduling process includes:
[0107] S410 acquires the computing requirements data of each task to be scheduled, the computing capacity data of each edge node, and the computing capacity data of each cloud node.
[0108] Among them, the computational requirements data of the tasks to be scheduled can reflect the computational needs of the tasks to be scheduled.
[0109] Among them, the computing power data of edge nodes or cloud nodes can reflect the computing power of the corresponding nodes.
[0110] In real-world scenarios, since edge nodes have limited computing power, for edge nodes with limited capabilities, it is advisable to migrate the scheduled tasks offloaded to the edge node to the cloud node for execution. Therefore, the computing power of the cloud node needs to be considered.
[0111] S420, based on the computing demand data and computing capacity data, determines the target value of the migration parameters for each task to be scheduled, and the selection range of the target value of the migration parameters includes each cloud node.
[0112] Among them, the migration parameter represents the target value of the corresponding scheduling decision parameter, indicating whether the scheduled task on the edge node needs to be migrated to the cloud node.
[0113] That is, based on the computing requirements of each task to be scheduled, the computing power of each edge node, and the computing power of each cloud node, it is determined which edge node the task to be scheduled will be migrated to which cloud node, thus determining the target value of the migration parameters.
[0114] S430 performs task scheduling processing based on the target values of the scheduling decision parameters and migration parameters of each task to be scheduled.
[0115] Understandably, cloud nodes have powerful computing and storage capabilities, making them suitable for handling non-real-time, large-scale data computing tasks; edge nodes have the geographical advantage of being close to the data source, enabling low-latency, fast-response computing.
[0116] In this embodiment, based on the computational requirements of each task to be scheduled, the computational capabilities of each edge node, and the computational capabilities of each cloud node, the target values of the migration parameters for each task to be scheduled are calculated. This allows tasks that would otherwise be offloaded to edge nodes with limited capabilities to be migrated to cloud nodes, achieving more rational task scheduling and ensuring the smooth execution of the tasks. Furthermore, this embodiment enables the rational scheduling and collaboration of resources across the cloud, edge, and endpoint, providing efficient support for diverse business scenarios, such as smart grids, intelligent manufacturing, vehicle-to-everything (V2X) networks, and the energy internet.
[0117] Based on the technical solutions provided in the above embodiments, an optional embodiment is provided, in which the target value determination step of the migration parameter in S420 is refined.
[0118] See Figure 5 The steps for determining the target values of migration parameters include:
[0119] S510, based on the target value of the scheduling decision parameters, constructs a second objective function with the migration parameters of each task to be scheduled as independent variables and the total time cost as the dependent variable; the total time cost includes the time cost required for task processing and the time cost required for the task to migrate from the edge node to the cloud node.
[0120] The second objective function can be expressed as:
[0121]
[0122] In the formula, Total time cost; Let i be the computational requirements of the i-th task to be scheduled. The computational power of the m-th edge node; is the computing power of the k-th cloud node; N is the number of tasks to be scheduled; M is the number of edge nodes; K is the number of cloud nodes; The migration parameter is a binary decision variable that indicates whether the i-th scheduled task should migrate from the edge node m to the cloud node k. Let $\frac{i}{i}$ be the time cost required to migrate the i-th scheduled task from edge node $m$ to cloud node $k$.
[0123] Where the target value of the scheduling decision parameter for the i-th task to be scheduled is m, where m is non-zero, and it needs to be migrated from the edge node m to the cloud node k, then For k, in other cases The value is 0. Where, if the target value of the scheduling decision parameter for the i-th task to be scheduled is m, and m is 0, then... It is 0.
[0124] As can be seen, the target value of the migration parameter indicates whether the scheduled task on the edge node needs to be migrated to the cloud node. A target value of 0 for the migration parameter of a scheduled task means that the scheduled task will not be migrated. In this case, the executor of the scheduled task is determined by the target value based on the scheduling decision parameter. A target value of k for the migration parameter of a scheduled task means that the scheduled task will be migrated from the original edge node to cloud node k, and the cloud node k will execute the scheduled task.
[0125] In the second objective function mentioned above, the independent variable is the migration parameter, and the total time cost is the dependent variable.
[0126] S520, with the goal of minimizing the total time cost, solves the second objective function to obtain the target value of the migration parameter.
[0127] Understandably, by minimizing the total time cost, solving the second objective function yields a target value for the migration parameters that can reduce the total time cost of each task to be scheduled and improve task scheduling performance.
[0128] Based on the above steps for determining the target value of migration parameters, during task scheduling, if the target value of the migration parameter of the task to be scheduled is 0, the executor of the task to be scheduled is determined according to the target value of the scheduling decision parameter, and the task to be scheduled is executed by the executor. If the target value of the migration parameter of the task to be scheduled is non-zero, the task to be scheduled is migrated from the edge node corresponding to the target value of the scheduling decision parameter to the cloud node corresponding to the target value of the migration parameter, and the cloud node corresponding to the target value of the migration parameter is used as the executor to execute the task to be scheduled.
[0129] Of course, other methods can be used to solve the first objective function, which are not limited here.
[0130] In this embodiment, given the limited computing power of edge nodes, the target value of the migration parameter obtained by solving the second objective function is used to achieve flexible adjustment of the tasks to be scheduled, while minimizing the total time cost and improving task scheduling performance.
[0131] Based on the technical solutions provided in the above embodiments, an optional embodiment is provided, in which the solution step of the second objective function in S520 is refined.
[0132] See Figure 6 The steps for solving the second objective function include:
[0133] S610 employs a dual-depth action value network with a dueling network (a dual-DuelingDouble DQN network with a dueling network, i.e., a dual-DQN network with a dueling network) to solve the second objective function with the goal of minimizing the total time cost, thereby obtaining the target value of the transfer parameter.
[0134] For example, the process of solving for the target value of the transfer parameters in a dual-depth action value network with a duel network may include:
[0135] S1, set the four-tuple: State: A comprehensive representation of the current resource status, including available computing resources, task requirements, network status, and load distribution. Action: The action space of the task to be scheduled, i.e., the range of target values for the migration parameters mentioned above. Policy: The probability distribution of the task to be scheduled performing various actions in the current state, guiding the agent's decision-making process. Reward: The reward value.
[0136] The t-th state in State can be represented as:
[0137]
[0138] In the formula, the t-th action in Action can be represented as:
[0139]
[0140] The t-th action mentioned above represents the migration parameters for each task to be scheduled at time t. The value of .
[0141] Wherein, the reward value for time t The calculation formula is:
[0142]
[0143] In the formula, T total U represents the total time cost.total D represents resource utilization rate. total This indicates the resource overhead caused by the migration.
[0144] As can be seen, based on the above calculation formula, processing latency is minimized while resource utilization is maximized. This not only overcomes the limitations of traditional scheduling algorithms but also lays the foundation for a self-optimizing edge cloud system that can adapt to constantly changing computing environments.
[0145] S2, the dual DQN network with a duel network, based on the above four-tuple, solves the second objective function with the goal of minimizing the total time cost, and obtains the target value of the migration parameter.
[0146] Among them, the core idea of the dual DQN network with a duel network is to use deep neural networks to approximate the evaluation value of the state-action pair, thereby realizing the dynamic selection of the optimal scheduling strategy.
[0147] In real-world scenarios, dual DQN networks with adversarial networks use the dual DQN mechanism to select the maximum action output by the behavior network, and the target network calculates the evaluation value of that maximum action, thereby reducing overestimation of the evaluation value.
[0148] Of course, other methods can be used to solve the second objective function, which are not limited here.
[0149] In this embodiment, a dual-depth action value network with a duel network solves a second objective function with the goal of minimizing total time cost, thereby obtaining target values for the migration parameters that satisfy the optimization objective and further improving the rationality of task scheduling.
[0150] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0151] Based on the same inventive concept, this application also provides a task scheduling apparatus for implementing the task scheduling method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more task scheduling apparatus embodiments provided below can be found in the limitations of the task scheduling method described above, and will not be repeated here.
[0152] In one exemplary embodiment, a task scheduling device is provided, see [link to relevant documentation]. Figure 7 The device includes a task acquisition module 710, a first construction module 720, a first solution module 730, and a task scheduling module 740, wherein:
[0153] The task acquisition module 710 is used to acquire the tasks to be scheduled from the user terminal; each task to be scheduled is configured with scheduling decision parameters; the scheduling decision parameters are used to characterize the processing node of the task to be scheduled, and the selection range of the target value of the scheduling decision parameters includes the user terminal and each edge node.
[0154] The first construction module 720 is used to construct a first objective function with the scheduling decision parameters of each task to be scheduled as independent variables and the total comprehensive score corresponding to each task to be scheduled as dependent variable; the comprehensive score corresponding to each task to be scheduled is the weighted value of the latency, energy consumption and task drop rate of the task to be scheduled.
[0155] The first solution module 730 is used to solve the first objective function with the goal of minimizing the overall comprehensive score, and obtain the target values of each scheduling decision parameter.
[0156] The task scheduling module 740 is used to perform task scheduling processing based on the target values of each scheduling decision parameter.
[0157] In one embodiment, the first objective function includes a first sub-function and a second sub-function; correspondingly, the first construction module is specifically used to: construct a first sub-function for each task to be scheduled, under a first condition; the first condition is that the parameter values of the scheduling decision parameters of the task to be scheduled represent the situation where the task to be scheduled is processed by the corresponding user terminal; the first sub-function is an expression corresponding to the processing latency of the task to be scheduled, the total energy consumption including dynamic energy consumption and static energy consumption, and the weighted sum of the task drop rate; the first constraint condition corresponding to the first sub-function includes that the processing latency does not exceed the maximum allowable latency; and construct a second sub-function for each task to be scheduled, under a second condition; the second condition is that the parameter values of the scheduling decision parameters of the task to be scheduled represent the situation where the task to be scheduled is processed by the edge node; the second sub-function is an expression corresponding to the total latency including processing latency, waiting latency, and transmission latency, the total energy consumption including transmission energy consumption, dynamic energy consumption, and static energy consumption, and the weighted sum of the task drop rate; the second constraint condition corresponding to the second sub-function includes that the total latency does not exceed the maximum allowable latency.
[0158] In one embodiment, the first solution module is specifically used to: employ a reinforcement learning algorithm that combines policy gradient and value function estimation to solve the first objective function with the goal of minimizing the overall score, and obtain the target values of each scheduling decision parameter.
[0159] In one embodiment, the task scheduling module includes: a first acquisition unit, configured to acquire computing requirement data of each task to be scheduled, computing capability data of each edge node, and computing capability data of each cloud node; a first adjustment unit, configured to determine the target value of the migration parameter of each task to be scheduled based on the computing requirement data and computing capability data, and on the basis of the target value of the scheduling decision parameter of each task to be scheduled, wherein the selection range of the target value of the migration parameter includes each cloud node; and a first scheduling unit, configured to perform task scheduling processing based on the target value of the scheduling decision parameter and the target value of the migration parameter of each task to be scheduled.
[0160] In one embodiment, the first adjustment unit includes: a first construction subunit, configured to construct a second objective function based on the target value of the scheduling decision parameters, using the migration parameters of each task to be scheduled as independent variables and the total time cost as the dependent variable; the total time cost includes the time cost required for task processing and the time cost required for the task to migrate from the edge node to the cloud node; and a first solution subunit, configured to solve the second objective function with the goal of minimizing the total time cost, to obtain the target value of the migration parameters.
[0161] In one embodiment, the first solving subunit is specifically used to: employ a dual-depth action value network with a duel network to solve a second objective function with the goal of minimizing the total time cost, thereby obtaining the target value of the transfer parameter.
[0162] Each module in the aforementioned task scheduling device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0163] In one exemplary embodiment, a computer device is provided, the internal structure of which can be as shown in the figure. Figure 8As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a task scheduling method.
[0164] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0165] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the task scheduling methods provided in the above embodiments.
[0166] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the task scheduling methods provided in the above embodiments.
[0167] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the task scheduling methods provided in the above embodiments.
[0168] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0169] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0170] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0171] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A task scheduling method, characterized in that, include: Obtain the tasks to be scheduled from the user terminal; Each task to be scheduled is configured with scheduling decision parameters; The scheduling decision parameters are used to characterize the processing nodes of the task to be scheduled, and the selection range of the target value of the scheduling decision parameters includes the user terminal and each edge node; Using the scheduling decision parameters of each task to be scheduled as independent variables and the total comprehensive score corresponding to each task to be scheduled as the dependent variable, a first objective function is constructed; the comprehensive score corresponding to each task to be scheduled is the weighted value of the latency, energy consumption and task drop rate of the task to be scheduled. With the goal of minimizing the overall comprehensive score, the first objective function is solved to obtain the target values of each of the scheduling decision parameters; Task scheduling is performed based on the target values of each of the aforementioned scheduling decision parameters.
2. The method according to claim 1, characterized in that, The first objective function includes a first sub-function and a second sub-function; Accordingly, the construction of a first objective function, using the scheduling decision parameters of each of the tasks to be scheduled as independent variables and the total comprehensive score corresponding to each of the tasks to be scheduled as the dependent variable, includes: For each task to be scheduled, a first sub-function is constructed under a first condition; the first condition is that the parameter value of the scheduling decision parameter of the task to be scheduled represents the situation where the task to be scheduled is processed by the corresponding user terminal; the first sub-function is an expression corresponding to the processing delay of the task to be scheduled, the total energy consumption including dynamic energy consumption and static energy consumption, and the weighted sum of the task drop rate; the first constraint condition corresponding to the first sub-function includes that the processing delay does not exceed the maximum allowable delay. For each task to be scheduled, a second sub-function is constructed under the second case; the second case is the parameter value of the scheduling decision parameter of the task to be scheduled, which represents the case where the task to be scheduled is processed by the edge node; the second sub-function is an expression corresponding to the total latency including processing latency, waiting latency and transmission latency, the total energy consumption including transmission energy consumption, dynamic energy consumption and static energy consumption, and the task drop rate; the second constraint condition corresponding to the second sub-function includes that the total latency does not exceed the maximum allowable latency.
3. The method according to claim 1, characterized in that, The step of solving the first objective function to minimize the overall comprehensive score and obtain the target values of each scheduling decision parameter includes: A reinforcement learning algorithm combining policy gradient and value function estimation is used to solve the first objective function with the goal of minimizing the total comprehensive score, thereby obtaining the target values of each scheduling decision parameter.
4. The method according to any one of claims 1 to 3, characterized in that, The step of performing task scheduling processing based on the target values of each of the scheduling decision parameters includes: Obtain the computational requirements of each task to be scheduled, the computational capabilities of each edge node, and the computational capabilities of each cloud node; Based on the computing demand data and computing capacity data, and on the target values of the scheduling decision parameters of each scheduled task, the target values of the migration parameters of each scheduled task are determined. The selection range of the target values of the migration parameters includes each cloud node. Task scheduling is performed based on the target values of the scheduling decision parameters and the migration parameters of each task to be scheduled.
5. The method according to claim 4, characterized in that, The step of determining the target value of the migration parameter for each task to be scheduled, based on the target values of the scheduling decision parameters for each task to be scheduled and the computing demand data and computing capacity data, includes: Based on the target values of the scheduling decision parameters, a second objective function is constructed with the migration parameters of each task to be scheduled as independent variables and the total time cost as the dependent variable. The total time cost includes the time cost required for task processing and the time cost required for the task to migrate from the edge node to the cloud node. With the goal of minimizing the total time cost, the second objective function is solved to obtain the target value of the migration parameter.
6. The method according to claim 5, characterized in that, The step of solving the second objective function to minimize the total time cost and obtain the target value of the migration parameter includes: A dual-depth action value network with a confrontation network is used to solve the second objective function with the goal of minimizing the total time cost, thereby obtaining the target value of the migration parameter.
7. A task scheduling device, characterized in that, include: The task acquisition module is used to acquire the tasks to be scheduled from the user terminal; Each task to be scheduled is configured with scheduling decision parameters; The scheduling decision parameters are used to characterize the processing nodes of the task to be scheduled, and the selection range of the target value of the scheduling decision parameters includes the user terminal and each edge node; The first construction module is used to construct a first objective function with the scheduling decision parameters of each of the scheduled tasks as independent variables and the total comprehensive score corresponding to each of the scheduled tasks as dependent variables; the comprehensive score corresponding to each scheduled task is the weighted value of the latency, energy consumption and task drop rate of the scheduled task. The first solution module is used to solve the first objective function with the goal of minimizing the total comprehensive score, and obtain the target values of each of the scheduling decision parameters. The task scheduling module is used to perform task scheduling processing based on the target values of each of the aforementioned scheduling decision parameters.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.