A Fog Computing Workflow Scheduling Method under Energy Constraints
By constructing a fog node energy consumption model and task priority sorting, the problem of energy consumption control in fog computing was solved, achieving the effects of energy consumption optimization and workflow time reduction.
Patent Information
- Application Number
- CN202211546569.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-05
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2042-12-05
AI Technical Summary
Existing fog computing scheduling schemes do not fully consider system energy consumption, resulting in increased energy costs and reduced equipment performance. How to control energy consumption within an acceptable range while reducing workflow completion time is an important issue.
Construct a fog node energy consumption model, calculate the energy consumption of tasks across different fog nodes based on CPU utilization, and select the fog node with the lowest score to place tasks by prioritizing tasks and constraining energy consumption, ensuring that workflow scheduling is completed within the constraints.
It effectively reduced system energy consumption, improved resource utilization, and optimized workflow completion time without violating task dependencies.
Smart Images

Figure CN115809131B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fog computing, and more specifically to a fog computing workflow scheduling method under energy consumption constraints. Background Technology
[0002] In 2011, Cisco proposed a new computing paradigm—fog computing. This paradigm migrates some core functions from the cloud to the network edge, overcoming the shortcomings of cloud computing in areas such as location awareness, mobility support, and real-time interaction. Fog computing is a highly virtualized platform that provides computing, storage, and networking services between terminal devices and traditional cloud servers. It is a computing paradigm in which a large number of heterogeneous, distributed devices cooperate with each other and perform tasks at the network edge. Fog computing places lightweight cloud-like facilities near users, enabling seamless integration of content delivery and real-time data processing between the cloud and mobile devices. Since its inception, fog computing has received considerable attention, adding a new dimension to traditional computing and data storage methods.
[0003] Fog computing's architecture consists of three layers from the network center to the network edge: the cloud layer, the fog layer, and the terminal layer. The terminal layer is responsible for transmitting perceived data to the fog layer or cloud layer for processing and storage. The fog layer periodically sends data to the cloud layer and handles latency-sensitive task requests. The cloud layer receives and aggregates data from various fog nodes and performs global analysis on the data submitted by the fog nodes and data from other sources. By introducing a fog layer located between terminal devices and the cloud, fog computing extends cloud services to the network edge. Compared to resource scheduling and computation in the cloud, fog computing, being closer to end users, can effectively reduce task response time, thereby improving user satisfaction.
[0004] However, existing fog computing scheduling schemes focus more on reducing system scheduling time and task completion time, often neglecting energy consumption and resource utilization. With the rapid increase in task demand, this will significantly increase system energy costs and lead to reduced performance and lifespan of fog node devices. Therefore, maintaining the energy consumption of fog computing systems within an acceptable range while minimizing workflow completion time is of paramount importance. Summary of the Invention
[0005] To address the problems existing in the prior art, this invention proposes a fog computing workflow scheduling method under energy consumption constraints, specifically including the following steps:
[0006] S1: Obtain the task workflow submitted by the user, represent the task workflow as a directed acyclic graph, and obtain the execution time of the task on different nodes and the transmission latency of the task between different fog nodes;
[0007] S2: Based on the information collected in step S1, construct the energy consumption model of the fog node during computation;
[0008] S3: Obtain the user-defined energy consumption constraint.
[0009] S4: Calculate the energy consumption of each task when executed between different fog nodes, and obtain the minimum and maximum energy consumption of the entire workflow;
[0010] S5: Calculate the priority score for each task and sort the tasks according to the scores;
[0011] S6: Traverse the tasks in the workflow and calculate the energy consumption constraint of the task based on the proportion of the average energy consumption of the task at different fog nodes to the average energy consumption of the entire workflow at fog nodes.
[0012] S7: Under the premise that the task does not exceed the energy consumption constraint, calculate the score of the task in different fog nodes and select the fog node with the smallest score to place the task. Repeat steps S5 to S6 until the entire workflow scheduling is completed.
[0013] Furthermore, the energy consumption model of the fog node during computation is used to calculate the fog node u. k The power consumption generated during task execution is expressed as:
[0014] E(n i ,u k, f k,h )=P(f k,h )*ω i,k *f k,h ;
[0015] Wherein, E(n) i ,u k, f k,h ) represents fog node u k CPU utilization f k,h In executing task n i The power consumption generated during the process; P(f k,h ) represents fog node u k When CPU utilization is f k,h Power magnitude at time; ω i,k Representing task n i At fog node u k Execution time, f k,h Represents fog node u k CPU utilization.
[0016] Furthermore, fog node u k When CPU utilization is f k,h Power magnitude P(f) k,h ) is represented as:
[0017] P(f k,h )=d·P max +(1-d)·P max ·f k,h
[0018] Among them, P max d represents the maximum power of the fog node when it is running at full load, and d represents the percentage of power consumed by the fog node's idle resources.
[0019] Furthermore, the process of calculating the energy consumption of each task executed across different fog nodes to obtain the minimum and maximum energy consumption of the entire workflow includes:
[0020] Get task n i The maximum and minimum energy consumption of the fog cluster are expressed as:
[0021]
[0022]
[0023] The energy consumption of workflow G is the sum of the energy consumption of all tasks. The maximum and minimum energy consumption of workflow G are expressed as follows:
[0024]
[0025]
[0026] Wherein, E(n) i ,u k ,f k,min ) represents fog node u k With minimum CPU utilization f x,min In executing task n i The power consumption generated during this time, E(n) i ,u k ,f k,max ) represents fog node u k At maximum CPU utilization f x,max In executing task n i The power consumption generated during the process; U represents the set of heterogeneous fog nodes; |N| represents the number of tasks.
[0027] Furthermore, the process of calculating the cost optimization priority score for each task includes:
[0028]
[0029] Among them, rank oct (n i ) represents task n iCost optimization priority score; U represents the heterogeneous fog node set, |U| represents the number of heterogeneous fog nodes in the heterogeneous fog node set; OCT(n i ,u k ) represents task n i At fog node u k Cost optimization score.
[0030] Furthermore, task n j At fog node u k Cost optimization score OCT(n) i ,u k ) is represented as:
[0031]
[0032]
[0033] Among them, succ(n i ) represents the process flow DAG related to task n i A set of tasks with direct dependencies; ω j,ω Representing task n j At fog node u ω Execution time on Representing task n j With fog node u ω The duration of communication between them.
[0034] Furthermore, task n i The magnitude of the energy consumption constraint is expressed as:
[0035]
[0036] Among them, E given (n i ) represents task n i The magnitude of the energy consumption constraint; E given (G) represents the user-defined workflow energy consumption constraint; E(n) x ,u k ,f k ) represents fog node u k CPU utilization f x In executing task n x Power consumption generated during the process; E pre (n y ) represents task n y Pre-allocated energy consumption; N represents the task set, and |N| represents the number of tasks.
[0037] Furthermore, task n i Pre-allocated energy consumption E pre (n i ) is represented as:
[0038] E pre (n i )=min{E ωa (n i ),E max (n i )}
[0039] E ωa (n i ) = E ie (G)*el(n i )+E min (n i )
[0040] E ie (G)=E given (G)-E min (G)
[0041]
[0042]
[0043]
[0044] Among them, E max (n i ) represents task n i The maximum energy consumption of the fog cluster; E min (n i ) represents task n i Minimum energy consumption of fog clusters; E max (G) represents the maximum energy consumption of the workflow within the fog cluster, E min (G) represents the minimum energy consumption of the workflow within the fog cluster; E ave (G) represents the average of the maximum and minimum energy consumption generated by the workflow in the fog cluster; E ave (n i ) represents task n i The average of the maximum and minimum energy consumption is generated in the fog cluster.
[0045] Furthermore, by calculating the task's score at different fog nodes and selecting the fog node with the lowest score to place the task, the task's score at different fog nodes is represented as follows:
[0046] O EFT (n i ,u k ,f k,h ) = EFT(n i ,u k ,f k,h )+OCT(n i ,u k)
[0047] Among them, O EFT (n i ,u k ,f k,h ) represents task n j At fog node u k The score on; EFT(n) i ,u k ,f k,h ) represents task n j At fog node u k The above is based on CPU utilization f k,h The task computation completion time for tasks that perform computations; OCT(n) i ,u k ) represents task n j At fog node u k The OCT score on the screen.
[0048] Furthermore, task n j At fog node u k The above is based on CPU utilization f k,h The task computation completion time EFT(n) is used for task computation. i ,u k ,f k,h ) is represented as:
[0049]
[0050]
[0051] Wherein, EST(n) i ,u k ,f k,h ) represents task n j At fog node u k The above is based on CPU utilization f k,h The task calculation start time for performing task calculations; EST(n) entry ,u k ,f k,h ) represents the entry task n in the workflow. entry At fog node u k The above is based on CPU utilization f k,h The task computation start time is used for task computation; avail[k] represents the fog node u. k The time when the task can begin execution, c x,i ω represents the communication latency between two tasks. i,k Representing task n i At fog node u k Execution time on; pred(n i) represents the process flow DAG related to task n i A set of tasks with prerequisite dependencies.
[0052] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0053] 1. This invention constructs a fog node energy consumption model based on the CPU utilization of fog nodes in fog computing. This more accurately describes the energy consumption generated during task execution;
[0054] 2. This invention considers the average communication time and execution time of subsequent tasks between different nodes during the work process, and calculates the priority of the tasks. Without violating the task dependencies, it sets the scheduling order for the tasks, so that the scheduling result is closer to the global optimal solution.
[0055] 3. Based on the energy consumption weights generated by tasks and workflows, the energy consumption of tasks is pre-calculated, and the energy consumption constraints of tasks are set by this parameter, so that tasks can complete workflow scheduling without exceeding the energy consumption constraints, effectively reducing the energy consumption of the system. Attached Figure Description
[0056] Figure 1 This is a diagram of the fog computing scenario architecture in an embodiment of the present invention;
[0057] Figure 2 This is the directed acyclic graph representing the workflow in this embodiment of the invention;
[0058] Figure 3 This refers to the task execution time and priority score results at the fog node in this embodiment of the invention;
[0059] Figure 4 This is a flowchart of the algorithm in an embodiment of the present invention. Detailed Implementation
[0060] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0061] S1: Obtain the task workflow submitted by the user, represent the task workflow as a directed acyclic graph, and obtain the execution time of the task on different nodes and the transmission latency of the task between different fog nodes;
[0062] S2: Based on the information collected in step S1, construct the energy consumption model of the fog node during computation;
[0063] S3: Obtain the user-defined energy consumption constraint.
[0064] S4: Calculate the energy consumption of each task when executed between different fog nodes, and obtain the minimum and maximum energy consumption of the entire workflow;
[0065] S5: Calculate the priority score for each task and sort the tasks according to the scores;
[0066] S6: Traverse the tasks in the workflow and calculate the energy consumption constraint of the task based on the proportion of the average energy consumption of the task at different fog nodes to the average energy consumption of the entire workflow at fog nodes.
[0067] S7: Under the premise that the task does not exceed the energy consumption constraint, calculate the score of the task in different fog nodes and select the fog node with the smallest score to place the task. Repeat steps S5 to S6 until the entire workflow scheduling is completed.
[0068] like Figure 1 As shown, in this embodiment, the fog computing system architecture is divided into three layers from the network center to the network edge: the cloud layer, the fog layer, and the terminal layer. Tasks generated by different devices in the terminal layer are passed upwards to the cluster composed of fog nodes. The system generates a scheduling scheme and completes the computation of the workflow, finally returning the execution results to the terminal layer user. In implementing this invention, the workflow containing task dependencies is first obtained. Then, based on the obtained energy consumption constraints, a fog node energy consumption model based on CPU utilization is constructed. Without violating the dependencies between tasks, the priority of tasks is calculated and sorted according to the execution time and communication time of tasks in different fog nodes. Based on the energy consumption weight of tasks and workflows, energy consumption is pre-assigned to each task in the workflow and its energy consumption constraint is calculated. Finally, tasks are scheduled to the fog node with the lowest score in sequence, without exceeding their energy consumption constraints, thus completing the scheduling of the entire workflow. This controls the energy consumption cost of the fog computing platform while minimizing the workflow completion time and improving resource utilization.
[0069] Obtaining the fog computing workflow, such as Figure 1 As shown, representing the task workflow as a directed acyclic graph (DAG) gives the workflow G = {N, M, C, W}, where N represents the task set, M represents the edge set, C represents the communication latency set, and W represents the task execution duration set. All heterogeneous fog nodes are represented as the set U = {u1, u2, ..., u...} n}, |U| represents the number of heterogeneous fog nodes, u n This represents the nth heterogeneous fog node (or simply fog node).
[0070] When task n i At fog node u kCPU utilization f k,h The calculations show that the start and end times are represented as EST(n). i ,u k ,f k,h ) and EFT(n i ,u k ,f k,h ), then we have:
[0071]
[0072]
[0073] Where, n entry This represents the entry task in the workflow, corresponding to Figure 2 In the middle, n1; avail[k] represents the fog node u k The time when the task can begin execution; c x,i Indicates the communication latency between two tasks (e.g.) Figure 2 As shown, for example, the communication delay between task n1 and task n2 is 18 time units. If the two tasks are on the same node, the communication delay is not calculated; ω i,k Representing task n i At fog node u k Execution time on (e.g.) Figure 3 As shown, for example, task n1 takes 14 time units to execute on node u1, 16 time units to execute on node u2, and 9 time units to execute on node u3. rank oct The rank indicates the priority score of the task. oct (n i ) represents task n i (priority score); f k,h Represents fog node u k The CPU utilization rate. Furthermore, the execution time of the entire workflow is expressed as:
[0074] SL(G) = EFT(n) exit )
[0075] like Figure 2 Medium task n 10 The completion time of this task indicates that workflow G is complete.
[0076] Preferably, the power model for fog nodes is expressed as follows:
[0077] P(f k,h )=d·P max +(1-d)·P max ·f k,h
[0078] Among them, f k,h P represents the CPU utilization of the fog node. max Let represent the maximum power of the fog node when it is running at full load, and d represent the percentage of power consumed by the fog node when its idle resources are available. Then, the power consumption of fog node k when executing a task is expressed as:
[0079] E(n i ,u k, f k,h )=P(f k,h )*ω i,k *f k,h
[0080] Wherein, P(f k,h ) represents fog node u k The CPU utilization is h, which corresponds to the power level. Therefore, task u can be derived. k The maximum and minimum energy consumption of the fog cluster are as follows:
[0081]
[0082]
[0083] Where f k,min f k,max This represents the minimum and maximum CPU utilization of fog node k.
[0084] Furthermore, the energy consumption of workflow G is the sum of the energy consumption of all tasks. Therefore, the maximum and minimum energy consumption of workflow G can be obtained as follows:
[0085]
[0086]
[0087] Assume a given energy consumption constraint of E. given (G), then it should be greater than or equal to E. min (G) and less than or equal to E max (G), that is:
[0088] E min (G)≤E given (G)≤E max (G)
[0089] Furthermore, the final energy consumption E(G) generated by the workflow should not exceed the energy consumption constraint, that is:
[0090]
[0091] In order to schedule tasks in the workflow sequentially, they need to be sorted according to their scores. Therefore, task n... iThe cost optimization score is represented as:
[0092]
[0093] So, task n i The priority is represented as:
[0094]
[0095] Based on the above formula, the priority score of each task is calculated, and the tasks are sorted in descending order of their scores. When scheduling tasks in subsequent tasks, they are scheduled in order according to this sorting result.
[0096] When scheduling tasks, in order to ensure that each task has a corresponding energy consumption constraint, we establish a proportional energy consumption:
[0097] E ie (G)=E given (G)-E min (G)
[0098] At the same time, the proportion of the current task's energy consumption in the global workflow is obtained, expressed as:
[0099]
[0100] Where E ave (n i The formula is as follows:
[0101]
[0102] For task n i Pre-allocated energy consumption E pre (n i ) is represented as:
[0103] E pre (n i )=min{E ωa (n i ),E max (n i )}
[0104] For task n i The energy consumption constraint is:
[0105]
[0106] Traverse each task by priority. When placing a task, traverse each fog node from low to high CPU utilization. For the fog node to be placed, u... k Within no more than task n i Energy consumption constraint E given (n iUnder the premise of ), task n i Unload onto the fog node with the lowest score. The score calculation formula is as follows:
[0107] O EFT (n i ,u k ,f k,h ) = EFT(n i ,u k ,f k,h )+OCT(n i ,u k )
[0108] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for fog computing workflow scheduling under energy consumption constraint, characterized in that, The scheduling method specifically includes the following steps: S1: Obtain the task workflow submitted by the user, represent the task workflow as a directed acyclic graph, and obtain the execution time of the task on different nodes and the transmission latency of the task between different fog nodes; S2: Based on the information collected in step S1, construct an energy consumption model for fog nodes during computation; use the energy consumption model for fog nodes during computation to calculate fog nodes. The power consumption generated during task execution is expressed as: ; in, Represents fog node u k CPU utilization f k,h In executing task n i The power consumption generated during this time; Indicates fog node CPU utilization Power level at that time; Indicates task At fog node Execution time Indicates fog node CPU utilization level; S3: Obtain the user-defined energy consumption constraints, that is, calculate the energy consumption of each task executed across different fog nodes. The process of obtaining the minimum and maximum energy consumption of the entire workflow includes: Get Task The maximum and minimum energy consumption of the fog cluster are expressed as: The energy consumption of workflow G is the sum of the energy consumption of all tasks. The maximum and minimum energy consumption of workflow G are expressed as follows: in, Represents fog node u k With minimum CPU utilization f x,min In executing task n i The power consumption generated during the process Represents fog node u k At maximum CPU utilization f x,max In executing task n i The power consumption generated during this process; U represents the heterogeneous fog node set; Indicates the number of tasks; S4: Calculate the energy consumption of each task when executed between different fog nodes, and obtain the minimum and maximum energy consumption of the entire workflow; S5: Calculate the priority score for each task and sort the tasks according to the scores; S6: Traverse the tasks in the workflow, and calculate the energy consumption constraint for each task based on the proportion of its average energy consumption at different fog nodes to the average energy consumption of the entire workflow at fog nodes. This constraint is defined as the energy consumption of the task not exceeding the energy consumption limit of the task. Energy consumption constraints Under the premise of the task Unload the task to the fog node with the lowest score. Energy consumption constraints Represented as: ; in, This indicates the energy consumption constraint given by the user for the workflow, that is, the energy consumption of the workflow is greater than or equal to the minimum energy consumption of the entire workflow and less than or equal to the maximum energy consumption of the entire workflow. Represents fog node u k CPU utilization f x In executing task n x The power consumption generated during this time; Represents task n y Pre-allocated energy consumption; N represents the task set. Indicates the number of tasks; S7: Under the premise that the task does not exceed the energy consumption constraint, calculate the score of the task in different fog nodes and select the fog node with the smallest score to place the task. Repeat steps S5 to S6 until the entire workflow scheduling is completed.
2. The fog computing workflow scheduling method under energy consumption constraints according to claim 1, characterized in that, Fog Node CPU utilization Power at time Represented as: in, This indicates the maximum power of the fog node when it is operating at full load. This indicates the percentage of power consumed by the idle resources of the fog node.
3. The fog computing workflow scheduling method under energy consumption constraints according to claim 1, characterized in that, The process of calculating the cost optimization priority score for each task includes: in, Indicates task Cost optimization priority score; U represents the heterogeneous fog node set. This indicates the number of heterogeneous fog nodes in the set of heterogeneous fog nodes; Indicates task At fog node Cost optimization score.
4. The fog computing workflow scheduling method under energy consumption constraints according to claim 3, characterized in that, Task At fog node Cost optimization score Represented as: in, In the workflow DAG, the task is represented A set of tasks with direct dependencies; Indicates task At fog node Execution time on Indicates task With fog nodes The duration of communication between them.
5. The fog computing workflow scheduling method under energy consumption constraints according to claim 1, characterized in that, Task Pre-allocated energy consumption Represented as: in, Represents task n i Maximum energy consumption of fog clusters; Represents task n i Minimum energy consumption of fog clusters; This indicates the maximum energy consumption of the workflow within the fog cluster. This indicates the minimum energy consumption of the workflow within the fog cluster; This represents the average of the maximum and minimum energy consumption generated by the workflow within the fog cluster; Represents task n i The average of the maximum and minimum energy consumption is generated in the fog cluster.
6. The fog computing workflow scheduling method under energy consumption constraints according to claim 1, characterized in that, By calculating the task's score at different fog nodes and selecting the fog node with the lowest score to place the task, the task's score at different fog nodes is represented as follows: in, Indicates task At fog node The score on; Indicates task At fog node CPU utilization The task calculation completion time; Indicates task At fog node The OCT score on the screen.
7. The fog computing workflow scheduling method under energy consumption constraints according to claim 5, characterized in that, Task At fog node CPU utilization Task calculation completion time Represented as: in, Indicates task At fog node CPU utilization The start time of task computation; Indicates the entry task in the workflow. At fog node CPU utilization The start time of task computation; Indicates fog node The time when the task can begin execution. This indicates the communication latency between two tasks. Indicates task At fog node Execution time; In the workflow DAG, the task is represented A set of tasks with prior dependencies; This represents the maximum CPU utilization of fog node k.
Citation Information
Patent Citations
Pedestrian attribute recognition training acceleration method based on node merging and path prediction
CN113822173A
Service combination optimization deployment method based on deep reinforcement learning in cloud and fog mixed construction environment
CN113822456A
