Digital twinning assisted fog computing task scheduling method under cost constraint

By building a digital twin-assisted task scheduling method in the fog computing network, calculating the cost-effectiveness priority of tasks on different fog nodes and scheduling them, the problem of task scheduling cost constraints in the fog computing network is solved, and efficient and low-cost are achieved. Task scheduling effect.

CN118860601APending Publication Date: 2024-10-29CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410951964.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

Existing task scheduling methods in fog computing networks fail to effectively consider the cost constraints of a single fog node, making it difficult to achieve the most cost-effective scheduling solution when task demand increases, and cannot meet the growing service quality requirements.

Method used

A digital twin-assisted fog computing task scheduling method under cost constraints is proposed. By constructing a fog computing network based on digital twins, the cost-effectiveness priority of tasks on different fog nodes is calculated, and tasks are scheduled to the system according to cost constraints and pricing mechanisms. Fog nodes with the lowest overhead are combined with task redistribution strategies to achieve efficient scheduling.

Benefits of technology

On the premise of not exceeding cost constraints, the system overhead of fog computing is minimized, the cost of task scheduling is saved, and the resource utilization and scheduling efficiency of the fog computing network are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118860601A_ABST
    Figure CN118860601A_ABST
Patent Text Reader

Abstract

The invention relates to a fog computing task scheduling method assisted by digital twinning under cost constraint. The method comprises the following steps: constructing a fog computing network based on digital twinning; an initial fog cluster is randomly selected in the fog layer to execute the workflow, and cost-benefit priorities of tasks in the workflow are calculated and sorted; traversing the digital twin of each task in the workflow, calculating the execution cost of each task on different fog nodes, and further calculating the cost constraint of each task; traversing the digital twin of the fog nodes, calculating the system overhead of the task in all the fog nodes, and scheduling the task to the fog node with the lowest system overhead; judging whether the task meets a redistribution condition or not, and if yes, redistributing the task to the fog node with the lowest task execution cost; and performing calculation in the digital twin layer to obtain a task scheduling result of the workflow, distributing the task scheduling result to the fog layer, and executing task scheduling. According to the method, on the premise that the cost constraint is not exceeded, the system overhead of fog computing is reduced to the maximum extent, and the fog computing task scheduling cost is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of big data technology, and in particular relates to a fog computing task scheduling method assisted by a digital twin under cost constraints. Background Art

[0002] With the emergence of the sixth generation of wireless communication technology, more and more devices are connected to the Internet, connecting people, machines and things to each other, and moving towards the Internet of Everything. This has led to the rapid popularization of various real-time applications, and their related smart terminals and sensors have high requirements for data computing density. It is estimated that by 2030, the number of active Internet of Everything (IoE) devices will reach 1.2 trillion. These IoE devices generate a large amount of data of different natures for use by different applications. Cloud data centers alone will not be able to efficiently process the large amount of data generated by these devices.

[0003] To solve this problem, in 2011, Bonomi et al. of Cisco proposed a new computing model, Fog Computing. This model migrates some core functions of the cloud to the edge of the network, overcoming the shortcomings of cloud computing in terms of location awareness, mobility support, and real-time interaction. As a novel distributed computing paradigm, fog computing supplements cloud computing by using an additional fog layer between cloud data centers and end users to provide computing, storage, networking, analysis, and data management near the edge of various fog nodes and IoT devices. Fog nodes are the basic elements of the fog architecture and can be any device that provides computing, networking, storage, and acceleration elements of the fog architecture, such as switches, routers, industrial controllers, and smart IoT nodes. However, the resources and bandwidth in the fog computing network are limited and cannot meet its growing quality of service (QoS) requirements.

[0004] Digital twins establish digital models of physical objects for simulation, analysis, and optimization, providing a new approach to addressing the above challenges. Digital twins are open, transparent, and evolvable complex systems. Compared with traditional edge scenarios, digital twin-assisted fog computing networks have two important advantages: ① Analyze various data of physical objects and achieve physical object mapping; ② Digital twins can truly reflect the changing laws of physical objects throughout their life cycle, and continuously accumulate relevant knowledge, and optimize and analyze the current situation together with the physical objects to complete improvement work. Applying digital twin technology in fog computing networks can effectively integrate real-time data in fog computing scenarios, accurately perceive and quickly analyze the status of fog computing networks, and provide new ideas for solving scheduling problems in fog computing networks.

[0005] However, existing research on workflow task-cost-constrained scheduling in digital twin-based fog computing networks is still in its early stages. More importantly, existing work rarely considers the cost constraints of individual fog nodes. At the same time, with the exponential growth of task demand, how to effectively utilize the digital twin environment and select the most cost-effective scheduling solution from the user's perspective is an urgent problem to be solved. Summary of the invention

[0006] In order to solve the above technical problems, the present invention proposes a fog computing task scheduling method assisted by digital twins under cost constraints, which includes:

[0007] S1: Build a fog computing network based on digital twins. The network includes the end-user layer, fog layer, and digital twin layer. End users submit workflows and cost budgets to the fog layer based on specific business goals. The digital twin layer includes digital twins of each fog cluster, fog node, and task.

[0008] S2: Randomly select the initial fog cluster in the fog layer to execute the workflow, calculate the cost-effectiveness priority of the tasks in the workflow and sort them, and obtain the priority ranking value of the tasks in the workflow;

[0009] S3: In the digital twin layer, traverse the digital twin of each task in the workflow, calculate the execution cost of each task on different fog nodes, and calculate the cost constraint of each task based on the execution cost and the cost budget submitted by the user terminal;

[0010] S4: In the digital twin layer, under the condition that the cost constraint of each task is met, the digital twins of the fog nodes are traversed in sequence according to the priority ranking value of the task, the system overhead of the task on all fog nodes is calculated according to the pricing of different platforms, and the task is scheduled to the fog node with the lowest system overhead;

[0011] S5: In the digital twin layer, traverse the fog cluster network composed of the reverse topology workflow to determine whether the task meets the reallocation condition. If the reallocation condition is met, calculate the fog node with the lowest task execution cost among the reallocation conditions and reallocate the task to the fog node.

[0012] S6: Repeat steps S3-S5, calculate the task scheduling results of the workflow in the digital twin layer, distribute them to the fog layer, and the fog nodes in the fog layer perform task scheduling.

[0013] Furthermore, in S2, the cost-effectiveness priority is recursively calculated by traversing the DAG graph of the workflow upward from the exit task in the workflow, and the calculation formula is:

[0014]

[0015] Among them, CERank(t i ,n k ) represents the i-th task t in the workflow i At the kth fog node n k Cost-effectiveness priority, PT(t i ,n k ) represents the i-th task t i At the kth fog node n k The processing time on represents the average of the pricing mechanism of the hth platform, β represents the fog node that achieves the minimum cost-effectiveness in the subsequent tasks of the current task, succ(t i ) represents the i-th task t i The set of all successor tasks, n p ∈N,n p represents the pth fog node, N represents the set of all fog nodes, CERank(t j ,n p ) represents the jth task t in the workflow j At the pth fog node n p Cost-effectiveness priority on the task t j is succ(t i ), TT(t i ,t j ) represents the i-th task t in the fog node i The jth task t in its successor task set j The communication time between j ,n p ) represents the jth task t j At the pth fog node n p Execution time on

[0016] Sort all tasks in the workflow according to the cost-effectiveness priority and calculate the cost of any i-th task t i The priority ranking value is expressed as:

[0017]

[0018] In the formula, Rank cl (t i ) represents the i-th task t in the workflow i The priority ranking value of represents the i-th task t i The total score of all fog nodes, |N| represents the total number of fog nodes.

[0019] Furthermore, in S3, the calculation formula of the execution cost is:

[0020]

[0021] In the formula, EC(t i ,n k ,f k,g ) represents the i-th task t i At the kth fog node n k The execution cost of the above process, f k,g represents the kth fog node n k CPU usage on the ,PT(t i ,n k ) represents the i-th task t i At the kth fog node n k The processing time on the ,τ represents the billing period, and f k,max represents the kth fog node n k The normalized maximum frequency of the CPU, PC h represents the price of the hth platform, PC h ∈PC, 1≤h≤H, PC represents the set of pricing on different platforms, PC={PC 1 ,PC 2 ,…,PC H ), H represents the number of platforms.

[0022] Furthermore, in S3, the calculation formula for the cost constraint of each task is as follows:

[0023]

[0024] In the formula, represents the cost constraint size of the i-th task, represents the total cost budget of the fog cluster network, Represents the i-th task The sum of the costs of all predecessor tasks of Indicates the task The sum of the estimated costs of all successor tasks of , T represents the set of tasks in the workflow, and |T| represents the total number of tasks in the task set.

[0025] Beneficial effects of the present invention: The present invention constructs a fog computing network based on digital twins, establishes a fog node cost model taking into account factors such as pricing mechanisms based on different platforms and CPU utilization, and thereby constructs a digital twin model of the fog cluster; on the premise of ensuring that the dependencies between tasks are not affected, the execution costs of tasks on different fog nodes and the average pricing mechanism are combined to calculate and sort the cost-effective task priorities; using the advantages of the digital twin environment, the elastic cost of the fog cluster network is further calculated, and the cost constraints of the current tasks are calculated in combination with the user budget; the tasks are scheduled to the fog nodes with the lowest system overhead, and the efficient scheduling of the entire fog cluster network is achieved through the task redistribution strategy. The present invention minimizes the system overhead of fog computing and saves the cost of fog computing task scheduling without exceeding the cost constraint. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 is a flowchart of steps of an embodiment of the present invention;

[0027] Figure 2 Schematic diagram of the structure of a fog computing network based on digital twins in an embodiment of the present invention;

[0028] Figure 3 It is a directed acyclic graph of tasks executed by the workflow on each fog node in an embodiment of the present invention;

[0029] Figure 4 This is an example diagram of a task occupying a fog node billing period in an embodiment of the present invention;

[0030] Figure 5 This is an example diagram of task reallocation in an embodiment of the present invention;

[0031] Figure 6 A schematic diagram of a task scheduling process according to an embodiment of the present invention

[0032] Figure 7 The performance of fog cluster in terms of completion time under different numbers of fog nodes;

[0033] Figure 8 The performance of fog cluster in terms of execution cost under different numbers of fog nodes. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0035] Figure 1Schematic diagram of the structure of the fog computing network based on digital twins. Figure 1 In the paper, the fog computing network based on digital twins includes: terminal user layer, fog layer and digital twin layer. The terminal user layer includes A user terminals, which can be a large number of mobile user terminal devices, such as mobile phones, computers, cameras, radio receiving devices, etc. The fog layer includes fog clusters, which include k fog nodes. Fog nodes are the basic elements of the fog architecture. They can be any devices that provide computing, network, storage and acceleration elements of the fog architecture, such as switches, routers, industrial controllers and intelligent IoT nodes. The digital twin layer includes the digital twin (DT) of the fog cluster, the digital twin (DT) of each fog node in the fog cluster, and the digital twin (DT) of each task. A large number of computing tasks generated by the terminal user layer are sent to the fog cluster composed of fog nodes (i.e., the fog layer). The digital twin layer collects and processes various data in the fog computing environment, optimizes the decision-making and intelligent scheduling of the workflow, and finally sends the results to the fog layer for task scheduling of the workflow, which is then returned to the terminal layer users by the fog layer.

[0036] The embodiment of the present invention proposes a digital twin-assisted fog computing task scheduling method under cost constraints, referring to Figure 2 As shown, the method includes:

[0037] S1: Build a fog computing network based on digital twins. The network includes the end-user layer, fog layer, and digital twin layer. End users submit workflows and cost budgets to the fog layer based on specific business goals. The digital twin layer includes digital twins of each fog cluster, fog node, and task.

[0038] S2: Randomly select the initial fog cluster in the fog layer to execute the workflow, calculate the cost-effectiveness priority of the tasks in the workflow and sort them, and obtain the priority ranking value of the tasks in the workflow;

[0039] S3: In the digital twin layer, traverse the digital twin of each task in the workflow, calculate the execution cost of each task on different fog nodes, and calculate the cost constraint of each task based on the execution cost and the cost budget submitted by the user terminal;

[0040] S4: In the digital twin layer, under the condition that the cost constraint of each task is met, the digital twins of the fog nodes are traversed in sequence according to the priority ranking value of the task, the system overhead of the task on all fog nodes is calculated according to the pricing of different platforms, and the task is scheduled to the fog node with the lowest system overhead;

[0041] S5: In the digital twin layer, traverse the fog cluster network composed of the reverse topology workflow to determine whether the task meets the reallocation condition. If the reallocation condition is met, calculate the fog node with the lowest task execution cost among the reallocation conditions and reallocate the task to the fog node.

[0042] S6: Repeat steps S3-S5, calculate the task scheduling results of the workflow in the digital twin layer, distribute them to the fog layer, and the fog nodes in the fog layer perform task scheduling.

[0043] Figure 3 It is a directed acyclic graph of tasks executed by the workflow on each fog node in the embodiment of the present invention. Figure 3 In, t 1 -t 9 represents a set of tasks with different execution times. The number between two tasks represents the communication time between the tasks, for example, t 1 -t 2 The number 16 between them indicates that the 1 To task t 2 The communication time is 16.

[0044] Reference Figure 3 As shown, the workflow in the embodiment of the present invention refers to: to achieve a certain business goal (such as the business goal of the user terminal), the computer is used to automatically transfer tasks between multiple participants (i.e., fog nodes or terminal users) according to certain predetermined rules. Therefore, the workflow forms a dependency relationship between the tasks performed by the fog nodes, and the fog nodes constitute a fog cluster network.

[0045] In the fog computing network based on digital twins, a task in the workflow is scheduled to different fog nodes to form a task allocation matrix X m×n , where the (i,k)th element is represented as:

[0046]

[0047] In the formula, x i,k Represents the task allocation matrix X m×n The (i,k)th element in x i,k ∈{0,1}; t i represents any i-th task, represents any i, T represents the set of tasks, n k represents the kth fog node, and N represents the set of fog nodes.

[0048] The fog cluster network composed of workflows is represented by a data structure diagram called Directed Acyclic Graph (DAG), which is specifically expressed as follows:

[0049] G=(T,N,W,C)

[0050] Where G represents the fog cluster network, T = (t 1 ,t 2 ,…,tn ) represents the set of tasks, n represents the number of tasks, N = (n 1 ,n 2 ,…,n m ) represents the set of fog nodes, m represents the number of fog nodes, C represents the set of inter-task communication time, W represents the set of task execution time, and constructs a fog cluster network ReG consisting of a reverse topology workflow.

[0051] In the digital twin-based fog computing network, the digital twin of the fog cluster network is represented as:

[0052]

[0053] in, A digital twin representing the fog cluster network, A collection of digital twins representing tasks, represents the set of digital twins of fog nodes, A collection of digital twins representing the execution time of a task, A collection of digital twins representing inter-task communication times.

[0054] The Digital Twin (DT) of the fog network is a digital copy of the fog cluster, which constantly interacts with the fog cluster, but the DT cannot fully reflect the state of the fog cluster and may have estimated deviations from the true value of the fog cluster state.

[0055]

[0056] In the formula, A digital twin representing the fog cluster, represents the mapping from the real environment to the virtual environment, G represents the fog cluster, and ΔG represents the estimated deviation value between the digital twin of the fog cluster and the true value of the fog cluster state.

[0057] In the fog computing network based on digital twins, each task has its corresponding digital twin DT. Each fog node in the fog cluster also has a corresponding digital twin DT, namely Helps record the distribution of tasks and the cost usage of fog nodes.

[0058] The processing time of the calculation task on the fog node includes:

[0059] S101: Calculate the execution time of the task on the fog node according to the data volume of each task in the workflow and the computing power of the fog node. The calculation formula is:

[0060]

[0061] Among them, ET(t i ,n k ) represents the i-th task t in the workflow i At the kth fog node n k The execution time on ω(t i ) represents the i-th task t i The amount of data, ω(n k ) represents the kth fog node n k computing power.

[0062] S102: Calculate the communication time between any two tasks in the fog nodes according to the network transmission bandwidth between the fog nodes and the amount of data required to be transmitted between any two tasks. The calculation formula is:

[0063]

[0064] Among them, TT(t i ,t j ) represents any i-th task t in the fog node i and the jth task t j Communication time between data i,j Denotes any i-th task t i and the jth task t j The amount of data required to be transferred between tasks, Bw represents the network transmission bandwidth between different fog nodes, t i ∈n k , Represents any two tasks t between different fog nodes i and t j , t j ,t j ∈n k Indicates that on the same fog node n k Any two tasks t between i and t j .

[0065] S103: Calculate the task t according to the communication time between any two tasks in the fog node i In the fog node n k The earliest start time on is calculated as follows:

[0066]

[0067] In the formula, t entry It represents the entry task in the workflow, that is, the task without a predecessor node. entry ,n k ) indicates that the incoming task in the workflow is at the kth fog node n kThe earliest start time on EST(t i ,n k ) represents the i-th task t in the workflow i At the kth fog node n k The earliest start time on the fog node, avail[k] represents the time when the fog node is idle, and pred(t i ) represents the i-th task t i The set of predecessor tasks, EFT(t j ,n k ) represents the jth task t j In the fog node n k The earliest end time on i ,t j ) represents the i-th task t in the fog node i and its successor task j t j The communication time between them, max(﹒) means finding the maximum value.

[0068] S104: Calculate the earliest end time of any task on the fog node according to the earliest start time of any task on the fog node and the execution time of the task on the fog node. The specific calculation formula is:

[0069] EFT(t i ,n k )=ET(t i ,n k )+EST(t i ,n k )

[0070] In the formula, EFT(t i ,n k ) represents the i-th task t in the workflow i At the kth fog node n k The earliest end time on the i ,n k ) represents the i-th task t in the workflow i At the kth fog node n k The execution time on EST(t i ,n k ) represents the i-th task t in the workflow i At the kth fog node n k The earliest start time on .

[0071] Calculate fog node n k The time in idle state is calculated as:

[0072]

[0073] Where avail[k] represents the kth fog node n k Idle time, ET(t i ,n k ) represents the i-th task t in the workflow i At the kth fog node n k The execution time on x i,k Represents the i-th task t in the workflow i In the kth task t i Assign to the kth fog node n k In the case of , |T| represents the total number of tasks in the task set.

[0074] S105: Calculate the i-th task t in the workflow based on the earliest end time of any two tasks on the fog node. i At the kth fog node n k The processing time on is calculated as:

[0075]

[0076] In the formula, PT(t i ,n k ) represents the i-th task t in the workflow i At the kth fog node n k The processing time on EFT(t i ,n k ) represents the i-th task t in the workflow i At the kth fog node n k The earliest end time on EFT(t j ,n k ) represents the i-th task t in the workflow j At the kth fog node n k The earliest end time on i ) represents the i-th task t i The set of predecessor tasks.

[0077] The task scheduling length in the entire workflow is expressed as:

[0078] makespan=EFT(t exit ,n k )

[0079] Where, makespan represents the total scheduling time of the workflow, EFT(t exit ,n k ) represents the last task t in the workflow exit The earliest completion time, t exit Indicates the exit task of the workflow, that is, the task without a successor node, nk represents the kth fog node.

[0080] In order to achieve effective scheduling of tasks in the workflow, the resources of the workflow are maximized by predicting the impact of the scheduling of the current task on its subtasks and taking into account the pricing mechanism of the platform.

[0081] In S2, the cost-effectiveness priority is recursively calculated by traversing the DAG graph of the workflow upward from the exit task in the workflow, and the calculation formula is:

[0082]

[0083] Among them, CERank(t i ,n k ) represents the i-th task t in the workflow i At the kth fog node n k Cost-effectiveness priority, PT(t i ,n k ) represents the i-th task t i At the kth fog node n k The processing time on represents the average of the pricing mechanism of the hth platform, β represents the fog node that achieves the minimum cost-effectiveness in the subsequent tasks of the current task, succ(t i ) represents the i-th task t i The set of all successor tasks, n p ∈N,n p represents the pth fog node, N represents the set of all fog nodes, CERank(t j ,n p ) represents the jth task t in the workflow j At the pth fog node n p Cost-effectiveness priority on the task t j is succ(t i ), TT(t i ,t j ) represents the i-th task t in the fog node i The jth task t in its successor task set j The communication time between j ,n p ) represents the jth task t j At the pth fog node n p Execution time on

[0084] Sort all tasks in the workflow according to the cost-effectiveness priority and calculate the cost of any i-th task t i The priority ranking value is expressed as:

[0085]

[0086] In the formula, Rank cl (t i ) represents the i-th task t in the workflow i The priority ranking value of represents the i-th task t i The total score of all fog nodes, |N| represents the total number of fog nodes.

[0087] The tasks in the subsequent workflow are ranked according to this priority. cl (t i ) are sorted in non-ascending order.

[0088] Since the pricing mechanism of each cloud platform is different, such as Microsoft Azure is charged by the minute, while Amazon EC2 is charged by the hour, different pricing mechanisms will lead to different execution cost calculation methods. i In the fog node n k The execution cost on the task is related to the billing cycle of the fog node occupied by the task and the task t i In the fog node n k It is related to the processing time, CPU utilization and the pricing mechanism of the platform.

[0089] Figure 4 This is an example diagram of a task occupying a fog node billing period in an embodiment of the present invention. Figure 4 In the figure, the horizontal axis Time represents the billing period of the fog node, t 1 ,t 2 Indicates two tasks executed on the fog node. When calculating the execution cost of the task, the processing time PT (t i ,n k ) The actual billing cycle is different from the ideal situation, so it is divided into three cases (a), (b), and (c). Case (a) indicates that the actual situation is consistent with the theoretical situation, and case (b) indicates that the task t 2 The actual billing cycle is one billing cycle longer than the theoretical case. Case (c) indicates that task t 2 The task t is actually occupied 1 The billing cycle actually occupied is one billing cycle less than the theoretical case.

[0090] In S3, according to task t i In the fog node n kThe billing period of the rental and the computing price (or pricing) of the platform are used to calculate the execution cost of the task on the fog node. The calculation formula is:

[0091]

[0092] In the formula, EC(t i ,n k ,f k,g ) represents the i-th task t in the workflow i At the kth fog node n k The execution cost of the above process, f k,g represents the kth fog node n k CPU usage on the ,PT(t i ,n k ) represents the i-th task in the workflow task t i At the kth fog node n k The processing time on the ,τ represents the billing period, and f k,max Then it means the kth fog node n k The normalized maximum frequency of the CPU, PC represents the set of pricing for different platforms, PC = {PC 1 ,PC 2 ,…,PC H ), H represents the number of platforms, PC h represents the price of the hth platform, PC h ∈PC, 1≤h≤H.

[0093] The specific calculation process of S3 includes:

[0094] S301: In order to save the cost of task scheduling in the workflow, in the digital twin layer, the i-th task t in the workflow is calculated separately. i The minimum and maximum execution costs of the digital twin DT in the fog cluster digital twin DT are calculated by the following formulas:

[0095]

[0096] in, Represents task t i Minimum execution cost of digital twins in fog cluster digital twins, Represents fog node n k Maximum CPU utilization on the digital twin, Represents task t i The maximum execution cost of digital twins in fog cluster digital twin DT, Represents fog node n k Minimum CPU utilization on the digital twin; Represents task t iDigital twins in fog nodes k Execution costs on digital twins.

[0097] S302: The digital twin DT has a computing resource estimation deviation Δf k,max , Δf k,min , which may be positive or negative; calculate the computational cost deviation between the actual value and the estimated value, and the calculation formulas are:

[0098]

[0099] In the formula, Represents task t i Minimum estimated deviation of the execution cost of the digital twin in the fog cluster digital twin, Δf k,max represents the maximum resource estimation deviation of the fog cluster digital twin, Represents fog node n k Maximum CPU utilization on the digital twin, Represents task t i Digital twins in fog nodes k Execution costs on the digital twin; Represents task t i The maximum estimated deviation of the execution cost of the digital twin on the fog cluster digital twin, Δf k,min Represents the minimum resource estimation deviation of the fog cluster digital twin.

[0100] S303: Calculate the task t based on the minimum and maximum execution costs and cost deviation of the task calculated by the digital twin layer. i The actual minimum and maximum execution costs are calculated as follows:

[0101]

[0102] In the formula, Cost min (t i ) represents the actual minimum execution cost of the i-th task in the workflow, Represents task t i Minimum execution cost of digital twins on fog cluster digital twins, Represents task t i Minimum estimated deviation of the execution cost of the digital twin on the fog cluster digital twin; Cost max (t i ) represents the actual maximum execution cost of the i-th task in the workflow, Represents task t i The maximum execution cost of the digital twin on the fog cluster digital twin, Represents task t iMaximum estimated deviation of the execution cost of a digital twin on a fog cluster digital twin.

[0103] S304: The execution cost of the fog cluster network G is the sum of the execution costs of all tasks. i The actual minimum and maximum execution costs of the fog cluster network G are calculated, and the calculation formula is as follows:

[0104]

[0105]

[0106] In the formula, represents the minimum execution cost on the digital twin of the fog cluster network G, A digital twin representing the fog cluster network, represents the maximum execution cost on the digital twin of the fog cluster network G.

[0107] S305: According to the cost budget given by the user And the minimum and maximum execution costs of the fog cluster network G, the total cost constraint of the fog cluster network G is obtained as:

[0108]

[0109] S306: According to the cost budget of the user terminal: And the total cost constraint of the fog cluster network, the elastic cost of the fog cluster network is calculated According to the elastic cost of the fog cluster network, the elastic cost of each task is calculated

[0110] When scheduling tasks, in order to ensure that each task obtains the corresponding cost constraint, the elastic cost of the fog cluster network is first calculated:

[0111]

[0112] In the formula, represents the elasticity cost of the fog cluster network, represents the total cost constraint of the fog cluster G, Represents the minimum execution cost of the fog cluster network.

[0113] Calculate the elastic cost of each task:

[0114]

[0115] In the formula, Represents the i-th task t in the workflow i The elasticity cost of digital twins, Represents the i-th task t in the workflow i Minimum execution cost of digital twins on fog cluster digital twins, Represents the i-th task t in the workflow i The maximum execution cost of the digital twin on the fog cluster digital twin, represents the minimum execution cost of the digital twin of the fog cluster network G, Represents the maximum execution cost of the digital twin of the fog cluster network G.

[0116] S307: Based on the actual minimum execution cost of the task in the workflow Elasticity cost of fog cluster network and the elastic cost of each task Calculate the estimated cost of each task The calculation formula is:

[0117]

[0118] In order to control the execution cost of tasks, the cost constraint value of each task is pre-allocated. Considering that the actual computational cost of the predecessor task may be less than its budgeted cost, the remaining cost of the task can be accumulated to the ready task.

[0119] S308: The cost constraint size of the current task is specifically:

[0120]

[0121] In the formula, represents the cost constraint size of the i-th task, represents the total cost budget of the fog cluster network, Represents the i-th task The sum of the costs of all predecessor tasks of Indicates the task The sum of the estimated costs of all successor tasks of , T represents the set of tasks in the workflow, and |T| represents the total number of tasks in the task set.

[0122] In order to reduce the scheduling length and reduce the cost of the system, under the condition of satisfying the current task cost constraint, according to the task t i Priority ranking value Rank cl (t i ) are traversed in sequence, and considering the pricing mechanisms of different platforms, the system overhead of each task in the workflow on all fog nodes is calculated in S4:

[0123]

[0124] In the formula, represents the system overhead of the i-th task on the k-th fog node, EFT(t i ,n k ) represents the earliest completion time of the current task in the workflow, t i represents the i-th task in the workflow, n k represents the kth fog node, α represents the weight of the cost, represents the i-th task t i The digital twin of k The execution cost of processing on the digital twin of PC h represents the price of the hth platform, PC h ∈PC, 1≤h≤H, PC represents the set of pricing on different platforms, PC={PC 1 ,PC 2 ,…,PC H ), H represents the number of platforms.

[0125] In the digital twin layer, the pricing mechanism and fog nodes that meet the cost constraints and minimize the system overhead of the current task are selected.

[0126] In order to further reduce the cost of fog clusters and achieve efficient scheduling, the pre-scheduling scheme is redistributed in the digital twin layer, the tasks in the fog cluster network ReG composed of the reverse topology workflow are selected, the fog node with the lowest task execution cost that meets the redistribution condition is calculated, and the task is redistributed to the fog node. i Redistribute to fog node n k The reallocation conditions that need to be met are:

[0127]

[0128] In the formula, Represents the i-th task t in the workflow i The digital twin is located at the kth fog node n k The earliest start time on the digital twin, represents the i-th task t i The digital twin of all predecessor tasks, represents the i-th task t i The completion time of the digital twin of all predecessor tasks, Represents the i-th task t in the workflow i The jth task t j Digital twin of the predecessor task, represents the kth fog node n k The idle start time of the digital twin, Represents the i-th task t in the workflow iThe digital twin is located at the kth fog node n k Completion time on the digital twin, Represents the i-th task t in the workflow i The digital twin of all subsequent tasks, represents the i-th task t i The completion time of the digital twin of all predecessor tasks, ∧ means that two conditions need to be met at the same time, n initial Represents the i-th task t in the workflow i Digital twin of the fog node before redistribution, Respectively represent the kth fog node n k The end time of the digital twin, represents the i-th task t i The digital twin is located at the kth fog node n k The execution cost of processing on the digital twin, represents the i-th task t i Digital twin at the kth fog node n before redistribution initial Execution cost of processing on the digital twin.

[0129] Figure 5 This is an example diagram of task reallocation in an embodiment of the present invention.

[0130] like Figure 5 As shown, t 2 ,t 3 ,t 4 ,t 5 is a set of parallel tasks in the workflow, and their scheduling process is as follows Figure 5 As shown in the figure, the pre-scheduling strategy is as follows Figure 5 As shown in the middle left figure, due to task t 3 If the redistribution condition is met, the task will be moved from fog node n 2 Redistribute to fog node n 1 As shown in the figure on the right, due to the fog node n 1 Medium Task 2 The cycle of task t has been taken into account. 3 Redistribute to fog node n 1 , which can save fog nodes n 2 Cost of a billing cycle.

[0131] Figure 6 The figure is a schematic diagram of the task scheduling process according to an embodiment of the present invention. Figure 6 In the fog computing network based on digital twins, the process of task scheduling includes:

[0132] Obtain the workflow and cost budget submitted by the user terminal and obtain the fog cluster;

[0133] Calculate and sort the cost-effectiveness priorities of all tasks in the workflow;

[0134] At the digital twin layer, traverse the twin tasks (i.e., the digital twins of the tasks), perform data processing, output the task scheduling results, and send them to each fog node in the fog cluster;

[0135] When traversing the twin task (i.e. the digital twin of the task), data processing is performed. The process includes:

[0136] Calculate the minimum and maximum execution costs of the workflow (executed by mobilizing resources in the fog cluster network G);

[0137] Calculate the elasticity cost of fog cluster network;

[0138] Calculate the cost constraint size of the current task;

[0139] At the digital twin layer, the twin fog nodes (i.e., the digital twins of fog nodes) are traversed according to the cost-effectiveness priority, and the execution cost of the tasks on the fog nodes is calculated in combination with the pricing mechanism of each platform to make a judgment:

[0140] If the execution cost of the current task is less than the current task cost constraint, further judgment is performed; if it exceeds, the next twin fog node is traversed until all twin fog nodes are traversed:

[0141] If the system overhead of placing the current task on the twin fog node is less than the current system overhead, if so, the task is placed on the current twin node; if not, continue to traverse the next twin fog node until all twin fog nodes are traversed;

[0142] After placing the task on the current twin node, traverse the fog cluster composed of the reverse topology workflow to determine whether the reallocation conditions are met. If so, reallocate the task, that is, schedule the task to the fog node with the lowest task execution cost; if not, continue to traverse the next task until all tasks are traversed.

[0143] Simulation verification:

[0144] Simulation settings:

[0145] The experiment was run on a desktop computer with the following configuration: Intel(R) Core(TM) i5-12400 processor, dual-core 2.50GHz, 16GB memory space, Windows 10 operating system, Matlab language coding simulation environment, and real-world scientific workflow Inspiral for simulation experiments.

[0146] In the experimental scenario parameter setting, the CPU usage rate is 10% ≤ u k≤100%, the search step is 0.01; the execution time of each task in the workflow on the fog node is 10ms≤w i ≤100ms; the communication time between two tasks in the workflow is 10ms≤c i,j ≤100ms; the number of fog nodes is N = {5, 10, 15, 20, 25, 30, 35, 40, 45, 50}. Each group of experiments is run 100 times, and the average of the calculated sum is taken as the final result.

[0147] The Round Robin (RR), Heterogeneous-Earliest-Finish-Time (HEFT) and Cost-Efficient Task Scheduling Strategy (CETSS) were introduced for comparison.

[0148] Simulation results:

[0149] 1. Comparison of task scheduling completion time in workflow

[0150] Figure 7 The performance of the Inspiral workflow in terms of completion time under different numbers of fog nodes is shown in Figure 2. Figure 7 As shown in the figure, as the number of fog nodes continues to increase, the completion time of all algorithms shows a downward trend. The increase in the number of cluster nodes helps to reduce the cluster completion time. When there are fewer fog nodes in the cluster, the number of nodes has a significant impact on the cost of the workflow. As the number of nodes continues to increase, the impact of the number of nodes on the completion time of the task decreases, the marginal benefit is obvious, and the performance of different algorithms eventually stabilizes. In terms of completion time, the method proposed in the present invention requires the shortest completion time compared to other algorithms, and its advantages are obvious.

[0151] 2. System cost comparison of task scheduling in workflow

[0152] Figure 8 For the cost performance of the Inspiral workflow with different numbers of fog nodes, refer to Figure 8 As shown in Figure 2, with the increase in the number of fog nodes, the cost of other algorithms, except the RR algorithm, shows a downward trend. The method proposed in the present invention is obviously better than other algorithms and performs best, which shows that the method proposed in the present invention is effective.

[0153] A person skilled in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing the relevant hardware through a program, and the program may be stored in a computer-readable storage medium, which may include: ROM, RAM, disk or CD, etc.

[0154] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A digital twin-assisted fog computing task scheduling method under cost constraints, characterized in that: The method comprises: S1: Build a fog computing network based on digital twins. The network includes the end-user layer, fog layer, and digital twin layer. End users submit workflows and cost budgets to the fog layer based on specific business goals. The digital twin layer includes digital twins of each fog cluster, fog node, and task. S2: Randomly select the initial fog cluster in the fog layer to execute the workflow, calculate the cost-effectiveness priority of the tasks in the workflow and sort them, and obtain the priority ranking value of the tasks in the workflow; S3: In the digital twin layer, traverse the digital twin of each task in the workflow, calculate the execution cost of each task on different fog nodes, and calculate the cost constraint of each task based on the execution cost and the cost budget submitted by the user terminal; S4: In the digital twin layer, under the condition that the cost constraint of each task is met, the digital twins of the fog nodes are traversed in sequence according to the priority ranking value of the task, the system overhead of the task on all fog nodes is calculated according to the pricing of different platforms, and the task is scheduled to the fog node with the lowest system overhead; S5: In the digital twin layer, traverse the fog cluster network composed of the reverse topology workflow to determine whether the task meets the reallocation condition. If the reallocation condition is met, calculate the fog node with the lowest task execution cost among the reallocation conditions and reallocate the task to the fog node. S6: Repeat steps S3-S5, calculate the task scheduling results of the workflow in the digital twin layer, distribute them to the fog layer, and the fog nodes in the fog layer perform task scheduling.

2. According to a cost-constrained digital twin-assisted fog computing task scheduling method according to claim 1, it is characterized in that: In S2, the cost-effectiveness priority is recursively calculated by traversing the DAG graph of the workflow upward from the exit task in the workflow, and the calculation formula is: Among them, CERank(t i ,n k ) represents the i-th task t in the workflow i At the kth fog node n k Cost-effectiveness priority, PT(t i ,n k ) represents the i-th task t i At the kth fog node n k The processing time on represents the average of the pricing mechanism of the hth platform, β represents the fog node that achieves the minimum cost-effectiveness in the subsequent tasks of the current task, succ(t i ) represents the i-th task t i The set of all successor tasks, n p ∈N,n p represents the pth fog node, N represents the set of all fog nodes, CERank(t j ,n p ) represents the jth task t in the workflow j At the pth fog node n p Cost-effectiveness priority on the task t j is succ(t i ), TT(t i ,t j ) represents the i-th task t in the fog node i The jth task t in its successor task set j The communication time between j ,n p ) represents the jth task t j At the pth fog node n p Execution time on Sort all tasks in the workflow according to the cost-effectiveness priority and calculate the cost of any i-th task t i The priority ranking value is expressed as: In the formula, Rank cl (t i ) represents the i-th task t in the workflow i The priority ranking value of represents the i-th task t i The total score of all fog nodes, |N| represents the total number of fog nodes.

3. According to a cost-constrained digital twin-assisted fog computing task scheduling method according to claim 1, it is characterized in that: In S3, the calculation formula of the execution cost is: In the formula, EC(t i ,n k ,f k,g ) represents the i-th task t i At the kth fog node n k The execution cost of the above process, f k,g represents the kth fog node n k CPU usage on the ,PT(t i ,n k ) represents the i-th task t i At the kth fog node n k The processing time on the ,τ represents the billing period, and f k,max represents the kth fog node n k The normalized maximum frequency of the CPU, PC h represents the price of the hth platform, PC h ∈PC, 1≤h≤H, PC represents the set of pricing on different platforms, PC={PC1,PC2,…,PC H ), H represents the number of platforms.

4. According to a cost-constrained digital twin-assisted fog computing task scheduling method according to claim 1, it is characterized in that: In S3, the calculation formula for the cost constraint of each task is as follows: In the formula, represents the cost constraint size of the i-th task, represents the total cost budget of the fog cluster network, Represents the i-th task The sum of the costs of all predecessor tasks of Indicates the task The sum of the estimated costs of all successor tasks of , T represents the set of tasks in the workflow, and |T| represents the total number of tasks in the task set.

5. According to a cost-constrained digital twin-assisted fog computing task scheduling method according to claim 1, it is characterized in that: In S4, the system overhead of each task in the workflow on all fog nodes is calculated using the following formula: In the formula, represents the system overhead of the i-th task on the k-th fog node, EFT(t i ,n k ) represents the earliest completion time of the current task in the workflow, t i represents the i-th task in the workflow, n k represents the kth fog node, α represents the weight of the cost, represents the i-th task t i The digital twin of k The execution cost of processing on the digital twin of PC h represents the price of the hth platform, PC h ∈PC, 1≤h≤H, PC represents the set of pricing on different platforms, PC={PC1,PC2,…,PC H ), H represents the number of platforms.

6. According to a cost-constrained digital twin-assisted fog computing task scheduling method according to claim 1, it is characterized in that: In S5, the reallocation condition is specifically: In the formula, Represents the i-th task t in the workflow i The digital twin is located at the kth fog node n k The earliest start time on the digital twin, represents the i-th task t i The digital twin of all predecessor tasks, represents the i-th task t i The completion time of the digital twin of all predecessor tasks, Represents the i-th task t in the workflow i The jth task t j Digital twin of the predecessor task, represents the kth fog node n k The idle start time of the digital twin, Represents the i-th task t in the workflow i The digital twin is located at the kth fog node n k Completion time on the digital twin, Represents the i-th task t in the workflow i The digital twin of all subsequent tasks, represents the i-th task t i The completion time of the digital twin of all predecessor tasks, ∧ means that two conditions need to be met at the same time, n initial Represents the i-th task t in the workflow i Digital twin of the fog node before redistribution, Respectively represent the kth fog node n k The end time of the digital twin, represents the i-th task t i The digital twin is located at the kth fog node n k The execution cost of processing on the digital twin, represents the i-th task t i Digital twin at the kth fog node n before redistribution initial Execution cost of processing on the digital twin.

Citation Information

Cited By

  • Vehicle edge calculation predictive task unloading method and system and storage medium

    CN119767358A

  • Vehicle edge computing predictive task offloading method, system, and storage medium

    CN119767358B