Energy-saving task scheduling method, device and equipment for park and data center

By using a task scheduling method based on graph neural networks and combining Lyapunov drift plus penalty construction, the task unloading decision and delay processing time are optimized, which solves the problem that traditional methods are difficult to meet real-time scheduling in dynamic network environments, and realizes low-energy-consumption and low-electricity-cost task scheduling.

CN122173296APending Publication Date: 2026-06-09WUHAN UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WUHAN UNIV
Filing Date
2026-04-13
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Traditional mobile cloud computing and mobile edge computing methods are difficult to adapt to dynamic network environments, resulting in high latency of computing tasks and excessive network load. Furthermore, existing task scheduling methods are unable to meet the requirements of online real-time scheduling, especially when multi-task operations and device heterogeneity are enhanced, the solution complexity increases significantly.

Method used

An intelligent job scheduling method based on graph neural networks is adopted. By constructing a task scheduling model with energy consumption and electricity cost as optimization objectives, and combining Lyapunov drift plus penalty to construct a structure that reflects the competition for resources among multiple tasks and queue stability, the graph neural network is used to jointly output task unloading decisions and delay processing time to optimize system resource utilization.

Benefits of technology

While ensuring that operations are completed on time, the system effectively reduces energy consumption and electricity costs by sacrificing some communication costs, thereby improving resource utilization and adapting to task scheduling under dynamic electricity pricing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122173296A_ABST
    Figure CN122173296A_ABST
Patent Text Reader

Abstract

This invention discloses an energy-saving task scheduling method, apparatus, and equipment for campuses and data centers. The method includes: acquiring the directed acyclic graph structure, deadlines, and wireless link status of terminal jobs, and collecting electricity price information that changes dynamically over time; constructing a task scheduling model with energy consumption and electricity cost as optimization objectives; constructing an objective function and constraint terms reflecting multi-task resource competition and queue stability based on Lyapunov drift with penalty; constructing a heterogeneous graph containing task nodes and resource nodes, and using a graph neural network to jointly output task offloading decisions and task delay processing times. This invention achieves timed processing and collaborative offloading of campus and data center jobs under dynamic electricity price environments. While ensuring jobs do not exceed deadlines, it schedules executable tasks to periods with lower electricity prices as much as possible, improving resource utilization and reducing system energy consumption and electricity costs by sacrificing some communication costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of communication, resource optimization, and edge computing technologies, and more specifically, to an energy-saving task scheduling method, apparatus, and equipment for campuses and data centers. Background Technology

[0002] With the rapid development of the Internet of Things (IoT) and mobile technology, many computationally intensive IoT services have been widely adopted. Mobile Cloud Computing (MCC), as a promising paradigm, allows IoT devices to offload computing tasks to cloud servers that meet their computing resource requirements, effectively solving the problems of limited computing resources, storage capacity, and battery capacity for IoT devices. However, traditional MCC has two significant drawbacks: (1) due to the long distance between the remote cloud and the IoT device, it is not easy to meet latency requirements; (2) offloading a large amount of data to the cloud increases data traffic, leading to excessive network load. To overcome these limitations, Mobile Edge Computing (MEC), which offloads the computing tasks of IoT devices to edge servers closer to the terminal devices, has become a highly competitive technology that can reduce data latency and alleviate network transmission load.

[0003] In MEC architecture, terminal jobs typically consist of multiple interdependent task units, and the dependencies between tasks can generally be described using a directed acyclic graph. Within a job, there are predecessor-successor constraints, as well as limitations such as deadlines, queuing, and resource contention. Traditional task scheduling methods often employ rule-based or heuristic search strategies, which frequently require pre-setting arrival distributions or making simplified assumptions about the system state, making it difficult to adapt to the dynamic changes in real-world networks and loads. Furthermore, as job size increases and device and server heterogeneity intensifies, the solution complexity rises significantly, making it difficult to meet the demands of online real-time scheduling. Summary of the Invention

[0004] To ensure timely, low-cost, and low-energy-consumption job scheduling, this invention addresses the optimization problem of energy consumption and electricity costs by considering explicit expression of system topology and task dependencies, adapting to dynamic network environments, and balancing job scheduling timeliness and system stability. It also develops an efficient intelligent job scheduling method based on graph neural networks. Specifically, this invention provides an energy-saving task scheduling method, device, and electronic equipment for campuses and data centers. By jointly considering task offloading decisions and delayed processing time, it optimizes system resource utilization. While ensuring a reasonable job completion rate, it effectively reduces system energy consumption and electricity costs by sacrificing some communication costs. To solve the aforementioned general energy-saving scheduling problem, this invention proposes a learning-based decision framework based on graph neural networks. Graph neural networks are only one possible implementation method; reinforcement learning or combinatorial optimization approximation methods can also be used, as long as they can jointly model task dependencies and resource competition and output offloading and timing decisions.

[0005] According to a first aspect of the present invention, an energy-saving task scheduling method for campuses and data centers is provided, comprising: Obtain the directed acyclic graph structure, deadline, wireless link status, and electricity price information of the terminal operation; Based on the acquired information, a task scheduling model is constructed with energy consumption and electricity cost as optimization objectives. This includes: introducing the user-end offloading ratio and the server-end offloading ratio; calculating the user-end energy consumption based on the user-end offloading ratio, the effective switching capacitor coefficient of the user-end device's CPU, the local computing power of the user-end device, and the number of CPU cycles required for the task; calculating the edge server energy consumption based on the energy consumption generated by the part of the task that is offloaded to the server and the energy consumption generated by the part of the task that is offloaded to the corresponding server; and calculating the electricity cost when the task is executed on the edge server. Based on the task scheduling model, a Lyapunov drift plus penalty is used to construct an objective function and constraint terms that reflect multi-task resource competition and queue stability. A heterogeneous graph containing task nodes and resource nodes is constructed, and based on the objective function and constraints, a graph neural network is used to jointly output the task unloading decision and the task delay processing time.

[0006] Optionally, user-side energy consumption can be calculated based on the user-side offload ratio, the effective switching capacitor coefficient of the user-side device's CPU, the local computing power of the user-side device, and the number of CPU cycles required for the task, including:

[0007] in, This represents the effective switching capacitor coefficient of the CPU in the m-th user terminal device. This represents the local computing power of the m-th user terminal device. For uninstallation decisions, it represents the percentage of users uninstalling the software. This indicates the number of CPU cycles required for the task. Indicates task Energy consumption processed on the m-th user terminal device.

[0008] Optionally, the edge server energy consumption is calculated based on the energy consumption generated by the portion of the tasks offloaded to the server and the energy consumption generated by processing the portion of the tasks offloaded to the corresponding server, including: The energy consumption generated by the portion of the task offloaded to the server during task transfer is calculated as the transfer energy consumption using the following method:

[0009] in, Indicates task From user terminal device To the edge server Transmission power, Indicates the task The proportion of offloaded data at the edge server For the first The proportion of offloaded data on edge servers Indicates task The amount of data, This indicates the total number of edge servers; The energy consumption generated by processing a portion of the tasks offloaded to the corresponding edge server is calculated as follows, and this energy consumption is taken as the edge server processing energy consumption:

[0010] in, The effective switching capacitor coefficient of the edge server processor. This represents the computing power of the k-th edge server. Indicates the number of CPU cycles required for the task; The sum of transmission energy consumption and edge server processing energy consumption is taken as the edge server energy consumption.

[0011] Optionally, based on the task scheduling model, a Lyapunov drift plus penalty approach is used to construct an objective function and constraint terms reflecting multi-task resource competition and queue stability, including: Construct a queue model for multi-task competition; Construct a penalty term for the Lyapunov function, which includes a total energy consumption term, an electricity cost term, and a timeout penalty term. The total energy consumption term is used to characterize the energy consumption generated by task processing and offloading within the gap t. The electricity cost term is used to characterize the electricity cost corresponding to the energy consumption on the edge server side under the time-sharing electricity pricing mechanism. The timeout penalty term is used to constrain the risk of task delinquency under the deadline constraint. Based on a queue model of multi-task competition and a penalty term, a Lyapunov drift plus penalty function is constructed as the loss function.

[0012] Optionally, a penalty term can be constructed from the Lyapunov function, which includes the total energy consumption term, the electricity price cost term, and the timeout penalty term. This penalty term includes:

[0013] in, As a penalty item, , and These are the total energy consumption item, the electricity price cost item, and the overtime penalty item. , and These are the weighting coefficients for the total energy consumption item, the electricity price cost item, and the overtime penalty item, respectively.

[0014] Optionally, a Lyapunov drift plus penalty function is constructed based on a multi-task competition queue model and a penalty term, serving as the loss function, including: Construct the queue backlog vector based on a multi-task competition queue model; We introduce a quadratic Lyapunov function to represent the queue congestion state of the system; Construct a Lyapunov drift plus penalty function based on the queue's accumulation vector and the quadratic Lyapunov function, in the form:

[0015] in, This represents the positive trade-off parameter used to balance queue backlog and energy consumption. Represents the mathematical expectation operator. This is the accumulation vector of the queue. This is the Lyapunov drift function.

[0016] Optionally, the task nodes are used to represent tasks in the DAG, and the resource nodes are used to represent terminal devices and MEC edge servers; the heterogeneous graph includes dependency edges for representing task dependencies and unloading edges for representing unloading relationships between tasks and candidate resources.

[0017] Alternatively, the graph neural network employs a heterogeneous graph message passing network, using different message aggregation mechanisms for dependency edges and unloading edges to simultaneously encode task dependency messages and resource availability messages. The graph neural network includes an unloading decision output head and a delay time output head. The unloading decision output head is used to output the unloading result of each task on the candidate execution resources, and the delay time output head is used to output the delay processing time of each task.

[0018] According to a second aspect of the present invention, an energy-saving task scheduling device for campuses and data centers is provided, comprising: The task information acquisition module is used to acquire the directed acyclic graph structure, deadline, wireless link status, and electricity price information of the terminal operation. The task scheduling model construction module is used to construct a task scheduling model with energy consumption and electricity cost as optimization objectives based on the acquired information. It includes: introducing the user-end offloading ratio and the server-end offloading ratio; calculating the user-end energy consumption based on the user-end offloading ratio, the effective switching capacitor coefficient of the user-end device CPU, the local computing power of the user-end device, and the number of CPU cycles required by the task; calculating the edge server energy consumption based on the energy consumption generated by the part of the task that is offloaded to the server and the energy consumption generated by the part of the task that is offloaded to the corresponding server; and calculating the electricity cost when the task is executed on the edge server. The Lyapunov drift plus penalty module is used to construct an objective function and constraint terms that reflect multi-task resource competition and queue stability based on the task scheduling model using Lyapunov drift plus penalty. The graph neural network module is used to construct a heterogeneous graph containing task nodes and resource nodes, and based on the objective function and constraints, uses the graph neural network to jointly output task unloading decisions and task delay processing time.

[0019] According to a third aspect of the present invention, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it is used to implement the energy-saving task scheduling method for campuses and data centers described in the first aspect.

[0020] Compared with the prior art, the advantages and beneficial technical effects of the present invention are as follows: This invention provides an energy-saving task scheduling method, apparatus, and equipment for campuses and data centers. First, it acquires the directed acyclic graph structure, deadlines, wireless link status, and electricity price information of terminal jobs, using these as the basis for modeling task dependencies, time constraints, transmission overhead, and electricity costs. Based on this, a task scheduling model is constructed with energy consumption and electricity cost as optimization objectives. Then, based on the task scheduling model, a Lyapunov drift-penalty approach is used to construct an objective function and constraint terms reflecting multi-task resource competition and queue stability. Finally, a heterogeneous graph containing task nodes and resource nodes is constructed, and based on the objective function and constraint terms, a graph neural network is used to jointly output task offloading decisions and task delay processing times. This invention achieves timed processing and collaborative offloading of campus and data center jobs under dynamic electricity pricing environments. While ensuring jobs do not exceed deadlines, it schedules executable tasks to periods with lower electricity prices as much as possible, improving resource utilization and reducing system energy consumption and electricity costs by sacrificing some communication costs. Attached Figure Description

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

[0022] Figure 1 A flowchart illustrating an energy-saving task scheduling method for parks and data centers provided in an embodiment of the present invention; Figure 2 A scenario diagram for a campus and data center provided as an embodiment of the present invention; Figure 3 This diagram illustrates the task completion rate and energy consumption and electricity cost under different resource allocation strategies provided in embodiments of the present invention. Detailed Implementation

[0023] This invention provides an energy-saving task scheduling method, system, and electronic device for campuses and data centers. By considering the dynamic network environment, heterogeneous computing capabilities of devices, and job deadlines, this invention adaptively and dynamically makes task offloading decisions and calculates the task delay processing time. By jointly considering offloading decisions and delay processing time, and under the condition that the job completion rate is not too bad, the energy consumption and power cost of the system can be optimized by sacrificing some communication costs, thereby effectively improving the resource utilization rate of the data center.

[0024] Example 1 This embodiment provides an energy-saving task scheduling method for campuses and data centers, including: S1: Obtain the directed acyclic graph structure, deadline, wireless link status, and electricity price information of the terminal job.

[0025] S2: Based on the acquired information, construct a task scheduling model with energy consumption and electricity cost as optimization objectives, including: introducing the user-end offloading ratio and the server-end offloading ratio; calculating the user-end energy consumption based on the user-end offloading ratio, the effective switching capacitor coefficient of the user-end device CPU, the local computing power of the user-end device, and the number of CPU cycles required by the task; calculating the edge server energy consumption based on the energy consumption generated by the part of the task that is offloaded to the server and the energy consumption generated by the part of the task that is offloaded to the corresponding server; and calculating the electricity cost when the task is executed on the edge server. S3: Based on the task scheduling model, Lyapunov drift plus penalty is used to construct an objective function and constraint terms that reflect the multi-task resource competition and queue stability. S4: Construct a heterogeneous graph containing task nodes and resource nodes, and based on the objective function and constraints, use a graph neural network to jointly output the task unloading decision and task delay processing time.

[0026] Specifically, S1 involves acquiring terminal job information, which serves as the basis for modeling subsequent task dependencies, time constraints, transmission overhead, and electricity costs. S2 involves constructing the task scheduling model. S3 is the Lyapunov drift plus penalty target representation. Specifically, based on the terminal job DAG structure, deadline, wireless link status, and time-of-use electricity price information, a penalty term including energy consumption and electricity cost terms is constructed, forming job non-violation constraints and resource constraints for the subsequent drift plus penalty representation construction. Then, a Lyapunov function is constructed based on the system task queue status, and the drift term is calculated. The penalty term and constraints are then incorporated to form the drift plus penalty target representation. S4 utilizes a graph neural network for task scheduling. Specifically, feature learning training is performed on the heterogeneous graph, and the task unloading decision and task delay processing time are jointly output. The target and constraints output in S3 are used as the training basis to generate a task scheduling strategy that satisfies job non-violation constraints and adapts to dynamic electricity prices.

[0027] In one implementation, the electricity price information obtained by S1 is the time-of-use real-time electricity price, and by imposing constraints or penalties related to electricity price on the task delay processing time, the task tends to be executed during low electricity price periods under the premise of not being late, thereby reducing electricity cost.

[0028] In one implementation, the task delay processing time output by S4 is a controllable delay of the task execution start time, and the delay is limited by both the task dependency relationship and the job deadline to ensure that the job does not fail to meet the deadline.

[0029] In one implementation, the heterogeneous graph consists of task nodes and resource nodes, wherein task nodes are used to represent tasks in the DAG, and resource nodes are used to represent terminal devices and MEC edge servers; the heterogeneous graph includes dependency edges for representing task dependencies and unloading edges for representing unloading relationships between tasks and candidate resources.

[0030] In one implementation, the task node characteristics of the heterogeneous graph include task computation amount, the resource node characteristics include at least available computing power, and the offloading edge characteristics include at least wireless link transmission rate and allocable bandwidth.

[0031] In one implementation, the graph neural network is a heterogeneous graph message passing network that employs different message aggregation mechanisms for dependent edges and unloading edges to simultaneously encode task dependency messages and resource availability messages. The graph neural network includes an unloading decision output header and a delay time output header. The unloading decision output header outputs the unloading result of each task on the candidate execution resources, and the delay time output header outputs the delay processing time of each task.

[0032] The implementation of each step is explained in detail below. Please refer to [link / reference]. Figure 1 This includes the following steps: Step S1: Obtain the directed acyclic graph structure, deadline, and wireless link status of the terminal job, and collect the electricity price information that changes dynamically over time. For details on the mobile edge computing framework, please refer to [link / reference]. Figure 2 As shown, the mobile edge computing framework differs from traditional dynamic task flows. This implementation assumes that all computing demands are submitted in batches at the start of the scheduling cycle in the form of predefined intelligent jobs. Each job consists of a set of dependent subtasks, forming a directed acyclic graph (DAG). The system includes: a collection of terminal devices. Each terminal With local computing power (CPU cycles / second), where Represents a user index; a collection of heterogeneous edge servers. Each server With calculation frequency .

[0033] The task scheduling cycle is discretized into multiple consecutive time slots, and the time slot index is denoted as... in, This indicates the initial time slot of the scheduling cycle. Each user equipment... Several randomized data points are generated within discrete time slots. An assignment consisting of several tasks The task set is denoted as Using two sets and Representing tasks Precursor missions and successor missions, and This represents the task index. The execution dependencies between tasks are represented by a directed acyclic graph (DAG). Description, in which the edges Indicates task Must be in the task Complete before execution. The local device can only process tasks generated by its own user, and cannot process tasks sent by other users.

[0034] For users Each task The attributes are defined by the triples: ,in, Indicates the amount of task data (bits); Indicates the number of CPU cycles required for the task; Indicate homework The overall deadline is calculated from the initial time slot of the scheduling cycle. .

[0035] Assuming no cost is incurred when running locally, but incurring costs when running on an edge server, the day is divided into 24 time slots. The rate at which the workload reaches its target can be approximated as constant within each time period. Time-of-use pricing, referencing the "State Grid Hubei Electric Power Company's Electricity Price List for Commercial and Industrial Users Purchasing Electricity," divides the time period into four segments: peak, high, normal, and low. Peak periods typically occur on certain workdays during summer (July and August) and winter (December and January), not every day of the year; therefore, this embodiment does not consider peak periods, but only the high, normal, and low periods. Time-of-use electricity pricing is dynamic and varies, represented as... .

[0036] Indicates from user equipment To the edge server The uplink transmission rate. The calculation formula is as follows: (5) In the formula For user equipment With edge servers Bandwidth allocation between For user equipment uplink transmit power, For channel gain, For equipment The additive white Gaussian noise power at the location. Since this embodiment uses orthogonal frequency division multiple access, uplink interference from other users is not considered.

[0037] Step S2: Construct a task scheduling model with energy consumption and electricity cost as optimization objectives; Partial uninstallation and Variables represent tasks Unloading decision, variables Representative task The proportion of users who uninstalled the software, and the variable. Representative task The proportion of data unloaded from the edge server is as follows: (6) The offloading tasks can continue to be assigned within the edge server cluster, assuming the following configuration: The percentage of uninstallations on each server is: , The following constraint must be satisfied: (7) S2.1. Client-side energy consumption calculation; Client-side energy consumption is generally local processing energy consumption. Local processing energy consumption is the energy consumed in processing tasks that are offloaded to the local machine. The formula for calculating local processing energy consumption is as follows: (8) In the formula The effective switching capacitor coefficient of the CPU in the user-side device. It is a terminal Local computing power It's an unloading decision. This indicates the number of CPU cycles required for the task.

[0038] S2.2. Energy consumption calculation for edge servers; The energy consumption calculation for edge servers is divided into two parts: transmission energy consumption and edge server processing energy consumption. Transmission energy consumption is the energy consumed by transferring a portion of the tasks offloaded to the server, while edge server processing energy consumption is the energy consumed by processing the portion of the tasks offloaded to the corresponding server. The formula for calculating transmission energy consumption is as follows: (9) In the formula Indicates task From the terminal To the server Transmission power, and These are the two uninstallation ratios mentioned earlier. Indicates task The amount of data.

[0039] The formula for calculating the energy consumption of edge servers is as follows: (10) In the formula The effective switching capacitor coefficient for the edge server processor.

[0040] Known task The energy consumption generated at the client and edge server ends respectively, then the task The formula for the total energy consumption generated by the MEC system is as follows: (11) S2.3. Electricity cost calculation; Local operation incurs no cost, and operation within a time slot... Task Executing on an edge server incurs associated costs. The electricity cost is calculated using the following formula: (12) Step S3: Construct an objective function and constraint terms that reflect multi-task resource contention and queue stability based on Lyapunov drift plus penalty; In mobile edge computing environments, multiple terminal jobs and their internal tasks compete concurrently for local computing resources, wireless transmission resources, and edge server computing resources. Task arrival, link status, and server load all exhibit dynamic changes, easily leading to task queue backlog and job delays. To simultaneously characterize the resource competition among multiple tasks in a dynamic environment and constrain system queue stability, this invention introduces a Lyapunov drift plus penalty method. By constructing a Lyapunov function reflecting the queue backlog state, optimization objectives such as energy consumption, electricity costs, and job delays are incorporated into a unified framework as penalty terms. This achieves coordinated optimization of task offloading and execution decisions while ensuring system queue stability and preventing job delays.

[0041] S3.1. Construct a queue model for multi-task competition; Unready buffer: Each client has an unready buffer to store tasks whose dependencies have not yet been satisfied, represented as: (13) in Indicates in time slot The amount of tasks released from the buffer to the ready area can only be released if the dependency conditions are met. The arrival time of the task. The representative is extending the time. The workload mentioned in the text is expressed in CPU cycles. Indicates in time slot The task has reached the target quantity.

[0042] Local queue: Each user maintains a local queue to store tasks that can be executed directly on the local CPU, represented as: (14) In the formula, For local service rate, , This represents the time slot length.

[0043] Unloading queue: Each user maintains an unloading queue to store tasks waiting to be transmitted to the server, represented as: (15) In the formula, Indicates in time slot Internal from user The amount of data transferred to the edge server.

[0044] The transmission rate is constrained by the channel: (16) (17) Server queue: Each The server also maintains a queue to store tasks waiting to be processed on the server, represented as: (18) In the formula , For server service rate, .

[0045] S3.2. Construct the penalty term in the Lyapunov function; In a dynamic task arrival scenario with multiple users and multiple edge servers, to simultaneously reflect system energy consumption, electricity costs, and job / task timeliness constraints, this invention addresses these issues in each time slot. Construct a comprehensive penalty item The penalty term is used to characterize time slots. After implementing task scheduling and offloading decisions, the system's energy consumption and cost, as well as the degree of constraint on timeout risk, are considered as important components of the subsequent Lyapunov drift plus penalty objectives.

[0046] Optionally, penalty items It consists of the weighted sum of the total system energy consumption, electricity cost, and timeout penalty, i.e.: (19) in, , , These are the weighting coefficients for energy consumption, electricity cost, and overtime penalty, respectively. Total system energy consumption Used to characterize time slots Internally, this includes energy consumption due to task processing and offloading / transfer. Optionally, the total system energy consumption includes both user-side energy consumption and edge-side energy consumption, namely: (20) Electricity cost item This is used to characterize the electricity cost corresponding to the energy consumption on the edge server side under the time-of-use pricing mechanism. Optionally, local execution does not incur electricity costs, while the server-side electricity cost can be obtained by multiplying the edge-side energy consumption by the time-slot electricity price, calculated as follows: (twenty one) Overtime penalty items This invention is used to constrain the risk of task / assignment delays under deadline constraints. To avoid training instability caused by using a non-differentiable hard constraint indicator function, this invention constructs a continuously differentiable soft penalty form. Specifically, for unfinished tasks within the system, a "timeout margin" or "timeout risk" is formed based on the remaining time slots and remaining workload before the deadline, and then mapped to a penalty value through a smoothing function, thereby suppressing the tendency to time out during the optimization process.

[0047] S3.3. Construct the Lyapunov drift plus penalty function; The backlog vector of the queue is defined as: (twenty two) in For the first Each user has an unready buffer, which is used to store tasks whose dependencies have not yet been satisfied. For the first Each user's local queue stores tasks that can be executed directly on the local CPU. Indicates local; For the first The unloading queue for each user stores tasks waiting to be transmitted to the server. Indicates uninstallation; For the first Each server queue stores tasks waiting to be processed on the server.

[0048] This invention introduces a quadratic Lyapunov function to represent the queue congestion state of the system. This function is expressed as: (twenty three) The quadratic Lyapunov function represents the total backlog of each queue in the system.

[0049] The Lyapunov drift function is defined as follows: (twenty four) in, This represents the mathematical expectation operator.

[0050] To balance queue backlog, energy consumption, electricity costs, and default penalties, a drift plus penalty function is defined as follows: (25) in The penalty items are characterized by energy consumption, electricity costs, and work delays. It is a positive trade-off parameter used to balance queue backlog and energy consumption. This represents the mathematical expectation operator, which is also the loss function for subsequent graph neural networks.

[0051] Step S4: Construct a heterogeneous graph containing task nodes and resource nodes, and use a graph neural network to jointly output task unloading decisions and task delay processing time.

[0052] To simultaneously characterize "task dependency relationships" and "resource competition relationships" in dynamic arrival scenarios involving multiple users and multiple edge servers, this invention proposes a heterogeneous graph construction method that includes task nodes and resource nodes. Based on the heterogeneous graph input graph neural network, it jointly outputs the task unloading ratio, server selection probability, and task delay processing time, thereby achieving collaborative decision-making on task unloading and processing timing.

[0053] S4.1. Construction of node sets in heterogeneous graphs; In discrete time slots Next, construct a heterogeneous graph. Among them, the node set Includes task node set and resource node set Including local computing resource nodes Uplink resource nodes and edge server computing resource nodes ,in Number the user. Assign user IDs. The graph node set can be represented as... .

[0054] S4.2. Construction of edge sets for heterogeneous graphs; edge set This invention is used to simultaneously express "task priority constraints" and "resource competition coupling." It constructs the following three types of edges: Dependency edges: pairs of tasks within the same job that satisfy the preceding constraints. Add dependency edge , used to express the topological dependencies of the task DAG; Local / link contention edge: for users Task Node Each node connects its local computing resource node to its uplink resource node, forming a bidirectional edge. , This characterizes the queuing competition relationship between the same user-side task and local computing power and the uplink. Server contention edge: for task nodes Connect the set of edge server resource nodes This is used to express the competition for shared computing power on the server side across jobs and users.

[0055] Through the edge construction described above, heterogeneous graphs can simultaneously cover task DAG dependencies, user-side local / linked queuing, and server-side cross-task competition within a single graph structure.

[0056] S4.3. Node Feature Vector Construction; To facilitate the graph neural network's learning of information such as task urgency, resource load, and price signals, a fixed-dimensional feature vector is constructed for each node.

[0057] For each task, the constructed features include: task time window, remaining time slots until the deadline, workload, and remaining workload. Resource nodes are constructed with features including the capacity of various resources. Task nodes and resource nodes use the same dimensional features to ensure a unified stacking of the graph input matrix. .

[0058] S4.4. Joint decision output based on graph neural networks; heterogeneous graphs in time slots Node feature matrix With edge set The input graph neural network, after multiple layers of message passing and aggregation, outputs the multi-head decision-making parameters for each task node, including: The unloading ratio output is for task nodes. The output unloads the logit, which is then mapped using a Sigmoid function to obtain the unloading ratio. This ratio represents the proportion of tasks executed locally versus unloaded tasks, and the calculation formula is as follows: (26) In the formula This represents the corresponding decision output variable. This represents the Sigmoid activation function.

[0059] The corresponding local processing ratio is: (27) The server selection probability output is used to distribute the offloaded workload among multiple servers. The output server selection logits are used to obtain a probability vector through Softmax mapping. as follows: (28) In the formula This represents the decision output variable selected by the server. Indicates allocation to the first The proportion of servers This represents the normalization function.

[0060] The task delay processing time output is the output delay logit, which is then processed by Sigmoid to obtain the delay ratio. for: (29) In the formula This represents the corresponding decision output variable.

[0061] Based on the task release time With the deadline Available relaxation slots Map the delay ratio to the "preferred start time for processing": (30) By dynamically making unloading and delay processing decisions, this invention can effectively reduce system energy consumption and electricity costs while maintaining a high job completion rate.

[0062] The effectiveness of this method will be explained below through experimental analysis.

[0063] Training Setup: The experiment was conducted in a mobile edge computing environment comprising 5 edge servers and 5 terminal devices. The system used discrete time-slot modeling, with each time slot lasting 60 minutes, resulting in a total simulation time domain of 24 time slots (corresponding to 24 hours). Job arrival followed a Poisson distribution, with an arrival rate of 2 jobs / hour. Each job was described by a directed acyclic graph (DAG), containing 3 to 6 tasks. To control DAG complexity, the maximum in-degree and maximum depth of each task were set to 2. Job relative deadlines (in minutes) were randomly generated between 240 and 360 minutes, and the earliest start and latest finish time slots for each task were obtained using a time window calculation module. Training employed the Adam optimizer with a learning rate of 5e-3 and 30 training epochs.

[0064] Graph Neural Network Setup: In this embodiment, we assume that the feature dimension of the input node of the GNN is 16 and the hidden layer dimension is 32. It adopts a two-layer graph attention network (GAT) structure: the first layer is multi-head attention and the second layer is single-head attention; the output includes a delay prediction head, an offloading decision head and a server selection head.

[0065] Figure 3 This diagram illustrates the relationship between task completion rate and energy consumption / electricity cost under different resource allocation strategies. Figure 3 As can be seen, this invention considers offloading strategies and delayed processing decisions. Each strategy is evaluated in the same network environment. Compared with other strategies, the method proposed in this invention greatly reduces energy consumption and electricity costs while maintaining a high completion rate.

[0066] Example 2 Based on the same inventive concept, this embodiment discloses an energy-saving task scheduling device for campuses and data centers, comprising: The task information acquisition module is used to acquire the directed acyclic graph structure, deadline, wireless link status, and electricity price information of the terminal operation. The task scheduling model construction module is used to construct a task scheduling model with energy consumption and electricity cost as optimization objectives based on the acquired information. It includes: introducing the user-end offloading ratio and the server-end offloading ratio; calculating the user-end energy consumption based on the user-end offloading ratio, the effective switching capacitor coefficient of the user-end device CPU, the local computing power of the user-end device, and the number of CPU cycles required by the task; calculating the edge server energy consumption based on the energy consumption generated by the part of the task that is offloaded to the server and the energy consumption generated by the part of the task that is offloaded to the corresponding server; and calculating the electricity cost when the task is executed on the edge server. The Lyapunov drift plus penalty module is used to construct an objective function and constraint terms that reflect multi-task resource competition and queue stability based on the task scheduling model using Lyapunov drift plus penalty. The graph neural network module is used to construct a heterogeneous graph containing task nodes and resource nodes, and based on the objective function and constraints, uses the graph neural network to jointly output task unloading decisions and task delay processing time.

[0067] Since the apparatus in Embodiment 2 of this invention is the same apparatus used in the energy-saving task scheduling method for parks and data centers described in Embodiment 1, those skilled in the art can understand the specific structure and variations of this apparatus based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All apparatuses used in the method of Embodiment 1 of this invention fall within the scope of protection of this invention.

[0068] Example 3 Based on the same inventive concept, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in Embodiment 1.

[0069] Since the electronic device described in Embodiment 3 of this invention is the computer equipment used in implementing the energy-saving task scheduling method for parks and data centers in Embodiment 1 of this invention, those skilled in the art can understand the specific structure and variations of this electronic device based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All electronic devices used in the method of Embodiment 1 of this invention fall within the scope of protection of this invention.

[0070] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0071] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0072] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention. Clearly, those skilled in the art can make various modifications and variations to the embodiments of the invention without departing from the spirit and scope of the invention. Thus, if these modifications and variations of the embodiments of the invention fall within the scope of the claims of the invention and their equivalents, the invention also intends to include these modifications and variations.

Claims

1. An energy-saving task scheduling method for parks and data centers, characterized in that, include: Obtain the directed acyclic graph structure, deadline, wireless link status, and electricity price information of the terminal operation; Based on the acquired information, a task scheduling model is constructed with energy consumption and electricity cost as optimization objectives. This includes: introducing the user-end offloading ratio and the server-end offloading ratio; calculating the user-end energy consumption based on the user-end offloading ratio, the effective switching capacitor coefficient of the user-end device's CPU, the local computing power of the user-end device, and the number of CPU cycles required for the task; calculating the edge server energy consumption based on the energy consumption generated by the part of the task that is offloaded to the server and the energy consumption generated by the part of the task that is offloaded to the corresponding server; and calculating the electricity cost when the task is executed on the edge server. Based on the task scheduling model, a Lyapunov drift plus penalty is used to construct an objective function and constraint terms that reflect multi-task resource competition and queue stability. A heterogeneous graph containing task nodes and resource nodes is constructed, and based on the objective function and constraints, a graph neural network is used to jointly output the task unloading decision and the task delay processing time.

2. The energy-saving task scheduling method for parks and data centers as described in claim 1, characterized in that, User-side energy consumption is calculated based on the user-side offload ratio, the effective switching capacitor coefficient of the user-side device's CPU, the local computing power of the user-side device, and the number of CPU cycles required for the task. This includes: in, This represents the effective switching capacitor coefficient of the CPU in the m-th user terminal device. This represents the local computing power of the m-th user terminal device. For uninstallation decisions, it represents the percentage of users uninstalling the software. This indicates the number of CPU cycles required for the task. Indicates task Energy consumption processed on the m-th user terminal device.

3. The energy-saving task scheduling method for parks and data centers as described in claim 1, characterized in that, The edge server energy consumption is calculated based on the energy consumption generated by the portion of the tasks offloaded to the server and the energy consumption generated by processing the portion of the tasks offloaded to the corresponding server, including: The energy consumption generated by the portion of the task offloaded to the server during task transfer is calculated as the transfer energy consumption using the following method: in, Indicates task From user terminal device To the edge server Transmission power, Indicates the task The proportion of offloaded data at the edge server For the first The proportion of offloaded data on edge servers Indicates task The amount of data, This indicates the total number of edge servers; The energy consumption generated by processing a portion of the tasks offloaded to the corresponding edge server is calculated as follows, and this energy consumption is taken as the edge server processing energy consumption: in, The effective switching capacitor coefficient of the edge server processor. This represents the computing power of the k-th edge server. Indicates the number of CPU cycles required for the task; The sum of transmission energy consumption and edge server processing energy consumption is taken as the edge server energy consumption.

4. The energy-saving task scheduling method for parks and data centers as described in claim 1, characterized in that, Based on the task scheduling model, a Lyapunov drift plus penalty approach is used to construct an objective function and constraint terms that reflect multi-task resource competition and queue stability, including: Construct a queue model for multi-task competition; Construct a penalty term for the Lyapunov function, which includes a total energy consumption term, an electricity cost term, and a timeout penalty term. The total energy consumption term is used to characterize the energy consumption generated by task processing and offloading within the gap t. The electricity cost term is used to characterize the electricity cost corresponding to the energy consumption on the edge server side under the time-sharing electricity pricing mechanism. The timeout penalty term is used to constrain the risk of task delinquency under the deadline constraint. Based on a queue model of multi-task competition and a penalty term, a Lyapunov drift plus penalty function is constructed as the loss function.

5. The energy-saving task scheduling method for parks and data centers as described in claim 4, characterized in that, Construct the penalty term of the Lyapunov function, which includes the total energy consumption term, the electricity price cost term, and the timeout penalty term. The penalty term includes: in, As a penalty item, , and These are the total energy consumption item, the electricity price cost item, and the overtime penalty item. , and These are the weighting coefficients for the total energy consumption item, the electricity price cost item, and the overtime penalty item, respectively.

6. The energy-saving task scheduling method for parks and data centers as described in claim 5, characterized in that, Based on a multi-task competition queue model and a penalty term, a Lyapunov drift plus penalty function is constructed as the loss function, including: Construct the queue backlog vector based on a multi-task competition queue model; We introduce a quadratic Lyapunov function to represent the queue congestion state of the system; Construct a Lyapunov drift plus penalty function based on the queue's accumulation vector and the quadratic Lyapunov function, in the form: in, This represents the positive trade-off parameter used to balance queue backlog and energy consumption. Represents the mathematical expectation operator. This is the accumulation vector of the queue. This is the Lyapunov drift function.

7. The energy-saving task scheduling method for parks and data centers as described in claim 1, characterized in that, The task nodes are used to represent tasks in the DAG, and the resource nodes are used to represent terminal devices and MEC edge servers; the heterogeneous graph includes dependency edges to represent task dependencies and unloading edges to represent unloading relationships between tasks and candidate resources.

8. The energy-saving task scheduling method for parks and data centers as described in claim 7, characterized in that, The graph neural network described employs a heterogeneous graph message passing network, using different message aggregation mechanisms for dependency edges and unloading edges to simultaneously encode task dependency messages and resource availability messages. The graph neural network includes an unloading decision output head and a delay time output head. The unloading decision output head is used to output the unloading result of each task on the candidate execution resources, and the delay time output head is used to output the delay processing time of each task.

9. An energy-saving task scheduling device for industrial parks and data centers, characterized in that, include: The task information acquisition module is used to acquire the directed acyclic graph structure, deadline, wireless link status, and electricity price information of the terminal operation. The task scheduling model construction module is used to construct a task scheduling model with energy consumption and electricity cost as optimization objectives based on the acquired information. It includes: introducing the user-end offloading ratio and the server-end offloading ratio; calculating the user-end energy consumption based on the user-end offloading ratio, the effective switching capacitor coefficient of the user-end device CPU, the local computing power of the user-end device, and the number of CPU cycles required by the task; calculating the edge server energy consumption based on the energy consumption generated by the part of the task that is offloaded to the server and the energy consumption generated by the part of the task that is offloaded to the corresponding server; and calculating the electricity cost when the task is executed on the edge server. The Lyapunov drift plus penalty module is used to construct an objective function and constraint terms that reflect multi-task resource competition and queue stability based on the task scheduling model using Lyapunov drift plus penalty. The graph neural network module is used to construct a heterogeneous graph containing task nodes and resource nodes, and based on the objective function and constraints, uses the graph neural network to jointly output task unloading decisions and task delay processing time.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the energy-saving task scheduling method for campuses and data centers as described in any one of claims 1 to 8.