Digital twinning assisted fog computing preference driven task scheduling method under cost constraint
Through the digital twin-assisted fog calculation method, the cost-effective priority and comprehensive score of dynamic calculation tasks at the fog nodes solves the problem of changing user preferences in the fog computing system, and achieves efficient and economical task scheduling and resource utilization.
Patent Information
- Application Number
- CN202510496452.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-21
- Publication Date
- 2025-08-01
AI Technical Summary
Existing fog computing systems lack the ability to respond to dynamic changes in user preferences in resource management and task scheduling, and ignore the potential value of digital twin technology for dynamic prediction of physical environments in cost-constrained modeling.
Using digital twin-assisted fog calculation method, by building the architecture of the end user layer, fog layer and digital twin layer, dynamically calculate the cost-effective priority and comprehensive score of tasks at different fog nodes, combined with Pareto's optimal selection, to achieve optimized scheduling.
It improves the accuracy of task scheduling and resource utilization, enhances the ability to respond to dynamic changes in user preferences, and optimizes the overall efficiency of the fog computing network under cost constraints.
Smart Images

Figure CN120407113A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fog computing task scheduling, and particularly to a fog computing preference-driven task scheduling method assisted by digital twin under cost constraints. Background Art
[0002] The Internet of Everything (IoE) promotes the integration of the physical world and the digital world through intelligent, cognitive, and connectivity technologies, improving the level of intelligence. However, IoE devices are usually limited by computing resources and energy, making it difficult to efficiently process massive amounts of data within a fixed time. Cloud computing, due to its powerful storage and processing capabilities, has become the most popular computing paradigm in recent years. However, the data processing mode that solely relies on cloud computing has obvious limitations, mainly including problems such as data transmission latency, bandwidth consumption, network congestion, and security risks. Especially in time-sensitive applications such as intelligent healthcare, connected vehicles, and remote monitoring, data needs to be processed with low latency and high reliability, while traditional cloud computing architectures are difficult to meet these requirements. Therefore, the limitations of the centralized cloud computing architecture have gradually emerged, making it difficult to support the large-scale growth of future IoE devices.
[0003] To alleviate the bottleneck of cloud computing, researchers have proposed various distributed computing models such as fog computing, mobile cloud computing, and multi-access edge computing. Among them, fog computing was proposed by Bonomi et al. of Cisco in 2011. It introduces fog nodes between the cloud and end devices to achieve computing and storage closer to the data source, thereby reducing the latency and energy consumption of data processing. Fog computing has received extensive attention due to its low latency, distributed architecture, and support for heterogeneous devices, and has been applied in fields such as industrial Internet of Things, intelligent transportation, and smart cities. Although fog computing has alleviated the centralized bottleneck of cloud computing to a certain extent, due to the limited computing and storage resources of fog devices themselves, how to efficiently schedule tasks and manage resources remains an important challenge.
[0004] The introduction of digital twin technology provides a new idea for resource management and task scheduling in fog computing. Digital twin is a technology that combines the virtual and the physical. By constructing a digital mapping of a physical object, it can simulate and optimize the operating state of a physical device in a virtual space. Compared with traditional edge computing, digital twin has two important advantages: on the one hand, it can collect and analyze the operating data of a physical object in real time to construct a dynamic digital model; on the other hand, the digital twin can record the change rules in the life cycle of a physical device and continuously optimize its operating state. Digital twin can not only achieve accurate modeling of physical devices, but also optimize resource scheduling in a data-driven manner to improve computing efficiency.
[0005] Introducing digital twin technology into the fog computing network can achieve more accurate task scheduling and resource optimization. Digital twins can collect a large amount of status information of IoE devices in real time, dynamically monitor the entire fog network, and provide optimization decisions, thereby improving the efficiency of task scheduling. Combining artificial intelligence and big data analysis technologies, digital twins can predict future computing loads, allocate resources in advance, and avoid fog node overload or resource waste. In addition, digital twins can also enhance the adaptability of the fog computing network, enabling it to cope with complex and changing computing environments and improving the overall QoS (Quality of Service).
[0006] With the advent of the 6G era, the integration of digital twins and fog computing will become an important support for intelligent networks. Digital twins in fog computing can not only optimize resource allocation but also enhance artificial intelligence decision-making capabilities, making the interaction between the physical world and the virtual world more efficient and intuitive. In the future, digital twin-assisted fog computing technology will play an important role in many fields such as intelligent manufacturing, smart cities, vehicle-to-everything (V2X), and remote healthcare. Its development can not only improve the efficiency of the IoT ecosystem but also promote the innovation of new business models, having a profound impact on individuals, enterprises, and society. Therefore, studying the task scheduling method of digital twin-assisted fog computing is of great significance for improving the performance of IoT systems and optimizing resource management.
[0007] However, in the rapid evolution of scenarios such as industrial IoT and smart cities, the fog computing requirements are transitioning from single-performance optimization to multi-dimensional quality of service guarantee. Although existing research has tried to introduce multi-objective optimization algorithms, it generally adopts a fixed weight strategy, lacking the ability to respond to the dynamic changes in user preferences, and ignoring the potential value of digital twin technology for dynamically predicting the physical environment in cost constraint modeling. How to effectively utilize the digital twin environment and dynamically select scheduling strategies according to user preferences from the user's perspective is an urgent problem to be solved. Summary of the Invention
[0008] To solve the above technical problems, the present invention proposes a digital twin-assisted fog computing preference-driven task scheduling method under cost constraints, which includes:
[0009] S1: The fog computing architecture based on digital twins consists of an end-user layer, a fog layer, and a digital twin layer: End-users submit workflows and cost budgets to the fog layer, and the digital twin layer covers the digital twin models of fog clusters, fog nodes, and tasks. The fog layer randomly selects an initial fog cluster to run the workflow and sorts the tasks according to the cost-benefit priority, and finally determines the priority sorting value of the tasks;
[0010] S2: In the digital twin layer, traverse the digital twins of each task in the workflow, calculate the actual minimum-maximum cost of each task on different fog nodes to calculate the elastic cost of the fog cluster, and then for each task, first calculate its constraint cost;
[0011] S3: In the digital twin layer, all fog nodes are traversed and the execution cost of each task on each fog node is calculated. If the execution cost exceeds the task cost constraint, the fog node is skipped. For fog nodes that do not exceed the constraint, indicators such as energy efficiency, reliability, and cost-effectiveness are calculated based on the digital twin status. The weights are dynamically adjusted to obtain a comprehensive score for the task. If the current fog node's score is lower than the current minimum score, its information is recorded and added to the candidate group.
[0012] S4: In the digital twin layer, after traversing all fog nodes and all tasks, the optimal scheduling solution is selected from the candidate group through Pareto optimal selection, and the scheduling result is distributed to the fog cluster. The fog nodes in the fog layer are responsible for executing task scheduling;
[0013] Furthermore, in S1, the cost-effectiveness priority is recursively calculated by traversing the DAG graph of the workflow upward starting 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 value of the pricing mechanism of the hth platform, and β represents the fog node that achieves the minimum cost-effectiveness in the subsequent tasks of the current task. The optimal fog node selection formula is:
[0016]
[0017] 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 ,tj ) represents the i-th task t in the fog node j and the j-th task t in its successor task set j The communication time between them, ET(t j , n p ) represents the j-th task t j The execution time on the p-th fog node n p ;
[0018] Sort all tasks in the workflow according to the cost-benefit priority, and calculate the priority sorting value of any i-th task t i Expressed as:
[0019]
[0020] In the formula, Rankcl(t i ) represents the priority sorting value of the i-th task t in the workflow i , Represents the total score of the i-th task t i On all fog nodes, |N| represents the total number of fog nodes.
[0021] Furthermore, in S2, the calculation formula of the actual minimum-maximum cost is:
[0022]
[0023] In the formula, Cost min (t i ) represents the actual minimum cost of task t i ; Cost max (t i ) represents the actual maximum cost of task t i ; Represents the minimum execution cost of the digital twin of task t i In the digital twin of the fog cluster Represents the maximum execution cost of the digital twin of task t i In the digital twin DT of the fog cluster Represents the minimum estimated deviation of the execution cost of the digital twin of task t i In the digital twin of the fog cluster Represents the maximum estimated deviation of the execution cost of the digital twin of task t i On the digital twin of the fog cluster
[0024] Furthermore, in S2, the calculation formula of the cost constraint of each task is specifically:
[0025]
[0026] In the formula, represents the cost limit value of the i-th task, represents the overall cost budget in the fog computing environment, represents the i-th task is the cumulative cost of all the preceding tasks before the i-th task, then represents the i-th task is the total estimated cost of all the subsequent tasks after the i-th task. T is defined as the set of all tasks in the workflow, and |T| represents the total number of tasks in the task set.
[0027] Furthermore, in S3, the calculation formula for the execution cost of each task in the workflow on each fog node is:
[0028]
[0029] In the formula, EC(t i , n k , f k,g ) represents the execution cost of task t in the workflow i processed on fog node n k . PT(t i , n k ) represents the processing time of task t in the workflow i on fog node n k . τ represents the billing period, PC represents the set of different platform pricing, PC = {PC1, PC2,..., PC H ), H represents the number of platforms, PC h represents the pricing of the h-th platform, where PC h ∈PC, 1 ≤ h ≤ H.
[0030] Furthermore, in S3, the calculation formula for the comprehensive score of the task is as follows:
[0031] Score(t i , n k ) = α × E efficiency + β × R score + γ × C benefit
[0032] In the formula, α, β, γ are the weight vectors W = (α, β, γ), and their weight update formula is as follows:
[0033]
[0034] In the formula, L total represents the total load of the system, λ total is the total failure rate of the system, B remainingrepresents the remaining budget; l is an indicator function that is 1 when the condition in the parentheses is satisfied; L th , λ th , B th respectively represent the preset load, failure rate, and threshold of the budget.
[0035] In addition, after dynamically adjusting the weights each time, a normalization process is performed:
[0036]
[0037] Advantages of the present invention: The fog computing network based on digital twin of the present invention comprehensively considers key factors such as the pricing mechanism and CPU utilization of different platforms, constructs an energy consumption model and a reliability model for fog computing task scheduling assisted by digital twin, and establishes a digital twin model of the fog cluster accordingly; on the premise of ensuring that the interdependence between tasks is not affected, the present invention combines the minimum-maximum cost of tasks on different fog nodes to calculate the cost constraint of the current task; relying on the advantages of the digital twin environment, the present invention dynamically integrates the energy efficiency, reliability score, and cost-benefit index of fog nodes, and calculates the comprehensive score of tasks based on the cost constraint; finally, the task is scheduled to the fog node with the lowest comprehensive score, and at the same time, the overall scheduling efficiency of the fog cluster network is optimized through the task reallocation strategy. The present invention improves the accuracy of task scheduling and resource utilization while ensuring the cost constraint, and enhances the ability to respond to dynamic changes in user preferences. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 is the system architecture diagram of an embodiment of the present invention;
[0039] Figure 2 is the structural schematic diagram of the fog computing network based on digital twin in an embodiment of the present invention;
[0040] Figure 3 is the schematic diagram of the task scheduling processing flow in an embodiment of the present invention; DETAILED DESCRIPTION OF THE EMBODIMENTS
[0041] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0042] Figure 1 is the system architecture diagram of an embodiment of the present invention. The system is mainly divided into three layers: the terminal user layer, the workflow scheduling module, and the digital twin layer. The structural process of its workflow scheduling system includes:
[0043] The user submits a task request through the end-user layer. The workflow module collects the tasks and forms a workflow DAG. The cost constraint module calculates the cost-benefit priority and execution cost of the tasks and sets the cost constraints. The scheduling module generates a workflow scheduling result based on the comprehensive score of the tasks. The digital twin layer provides node resource information, performs pre-delivery processing, and distributes the scheduling result to the corresponding nodes for execution. Finally, the task execution result is returned to the user through the end-user layer, realizing the complete process of task submission, execution, and result return. At the same time, the execution efficiency of the task and resource utilization are optimized through cost constraints and dynamic scheduling;
[0044] An embodiment of the present invention proposes a digital twin-assisted fog computing preference-driven task scheduling method under cost constraints. Referring to Figure 2 as shown, the method includes:
[0045] S1: The fog computing architecture based on digital twin consists of an end-user layer, a fog layer, and a digital twin layer: The end-user submits a workflow and a cost budget to the fog layer, and the digital twin layer covers the digital twin models of fog clusters, fog nodes, and tasks. The fog layer randomly selects an initial fog cluster to run the workflow and sorts the tasks according to the cost-benefit priority, and finally determines the priority sorting value of the tasks;
[0046] S2: In the digital twin layer, traverse the digital twins of each task in the workflow, calculate the actual minimum-maximum cost of each task on different fog nodes to calculate the elastic cost of the fog cluster, and then for each task, first calculate its constraint cost;
[0047] S3: In the digital twin layer, traverse all fog nodes, calculate the execution cost of each task on each fog node. If the execution cost exceeds the task cost constraint, skip this fog node. For the fog nodes that do not exceed the standard, according to the digital twin body state, calculate indicators such as energy efficiency, reliability, and cost-benefit, and dynamically adjust the weights to obtain the comprehensive score of the task. If the score of the current fog node is lower than the current minimum score, record its information and add it to the alternative group;
[0048] S4: In the digital twin layer, after traversing all fog nodes and all tasks, select the optimal scheduling solution from the alternative group through Pareto optimality, distribute the scheduling result to the fog cluster, and the fog nodes in the fog layer are responsible for executing the task scheduling;
[0049] In the fog computing network based on digital twin, a certain task in the workflow is scheduled to different fog nodes to form a task assignment matrix X m×n , where the element of the (i, k)th item is expressed as:
[0050]
[0051] In the formula, x i,kDenote the \(i\)-th task as \(t\) i Whether it is assigned to the \(k\)-th fog node \(n\) k , where \(x\) i,k \(\in \{0, 1\}\). \(T\) represents the set of all tasks, and \(n\) k represents the \(k\)-th fog node, and \(N\) represents the set of all fog nodes.
[0052] Use a Directed Acyclic Graph (DAG) to represent the fog cluster network composed of workflows, which is specifically represented as:
[0053] \(G=(T, N, W, C)\)
[0054] where \(G\) represents the fog cluster network, \(T=(t_1, t_2, \ldots, t\) n ) represents the set of tasks, \(n\) represents the number of tasks, \(N=(n_1, n_2, \ldots, n\) m ) represents the set of fog nodes, \(m\) represents the number of fog nodes, \(C\) represents the set of communication times between tasks, and \(W\) represents the set of task execution times. Through this structure, a fog cluster network \(ReG\) composed of a reverse topology workflow is constructed.
[0055] In the fog computing network based on digital twin, the digital twin of the fog cluster network is represented as:
[0056]
[0057] where, represents the digital twin of the fog cluster network, represents the set of digital twins of tasks, represents the set of digital twins of fog nodes, represents the set of digital twins of task execution times, represents the set of digital twins of communication times between tasks.
[0058] The digital twin (DT) of the fog network is a digital mapping of the fog cluster, continuously interacting with the fog cluster for data. However, the DT cannot fully reflect the real-time state of the fog cluster, and there may be a deviation from the actual fog cluster state. This deviation needs to be minimized through continuous calibration and update to ensure that the digital twin can simulate and predict the behavior of the fog cluster as accurately as possible. The construction process of the digital twin can be represented as:
[0059]
[0060] In the formula, Denote the mapping function from the real environment to the virtual environment as \(f\), \(G\) represents the actual fog cluster network, and \(\Delta G\) represents the change or update of the network state. In this way, we can dynamically update and maintain the digital twin of the fog cluster network to adapt to the changing network environment and task requirements.
[0061] In the fog computing network based on digital twin, each task has its corresponding digital twin \(DT\), that is Each fog node in the fog cluster also has its corresponding digital twin \(DT\), that is Help record the task allocation situation and the cost usage situation of fog nodes.
[0062] Calculate the processing time of computing tasks on fog nodes. The specific process includes:
[0063] S101: According to the data volume of each task in the workflow and the computing power of the fog node, calculate the execution time of the task on the fog node. The calculation formula is:
[0064]
[0065] where \(ET(t i ,n k ) represents the execution time of the \(i\)-th task \(t i on the \(k\)-th fog node \(n k , \omega(t i ) represents the data volume of the \(i\)-th task \(t i , and \(\omega(n k ) represents the computing power of the \(k\)-th fog node \(n k .
[0066] S102: According to the network transmission bandwidth between fog nodes and the size of the transfer data volume required between any two tasks, calculate the communication time between any two tasks in the fog node. The calculation formula is:
[0067]
[0068] where \(TT(t i ,t j ) represents the communication time between the \(i\)-th task \(t i and the \(j\)-th task \(t j in the fog node, \(data i,j represents the size of the transfer data volume required between the \(i\)-th task \(t i and the \(j\)-th task \(t j , \(Bw\) represents the network transmission bandwidth between different fog nodes, \(t i \in n k , represents any two tasks \(t\) between different fog nodesi and t j , t j , t j ∈ N k represents any two tasks t k between the same fog node n i and t j .
[0069] S103: By considering the communication time between any two tasks in the fog node, determine the earliest start time of task t i on the fog node n k . The specific calculation formula is as follows:
[0070]
[0071] In the formula, EST(t i , n k ) represents the earliest start time of the i-th task t i on the k-th fog node n k . For the entry task t entry of the workflow, its earliest start time on any fog node is set to 0, that is, EST(t entry , n k ) = 0, avail[k] represents the time when the fog node is in the idle state, and pred(t i ) represents the set of all predecessor tasks of the i-th task t i . EFT(t j , n k ) represents the earliest end time of the j-th task t j on the fog node n k , TT(t i , t j ) represents the communication time between the i-th task t i and its successor j-th task t j in the fog node, and max(﹒) represents finding the maximum value to ensure that the task does not start execution before the predecessor task is completed.
[0072] S104: According to the earliest start time and execution time of the task on the fog node, calculate the earliest end time of the task on this fog node. The specific calculation formula is as follows:
[0073] EFT(t i , n k ) = ET(t i , n k ) + EST(t i , n k )
[0074] In the formula, EFT(ti ,n k ) represents the i-th task t i At the kth fog node n k The earliest end time on ET(t i ,n k ) represents the i-th task t i At the kth fog node n k The execution time on EST(t i ,n k ) represents the i-th task t i At the kth fog node n k The earliest start time on .
[0075] Calculate fog node n k The time in idle state is calculated as follows:
[0076]
[0077] 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.
[0078] 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 , which is calculated as:
[0079]
[0080] Where, PT(t i ,n k ) represents the i-th task t i At the kth fog node n k The processing time on EFT(t i ,n k ) represents the i-th task t i At the kth fog node n k The earliest end time on EFT(t j ,n k ) represents the i-th task tj The earliest finish time at the k-th fog node n k , where pred(t i ) represents the set of predecessor tasks of the i-th task t i .
[0081] The task scheduling length in the entire workflow is expressed as:
[0082] makespan = EFT(t exit , n k )
[0083] In the formula, makespan represents the total scheduling time, and EFT(t exit , n k ) represents the earliest finish time of the last task t exit , t exit represents the exit task, that is, the task without successor nodes, and n k represents the k-th fog node.
[0084] To achieve efficient scheduling of tasks in the workflow, by predicting the impact of the scheduling of the current task on its subtasks and considering the pricing mechanism of the platform, the resources of the workflow are maximally utilized.
[0085] In S1, the cost-benefit priority is recursively calculated by traversing the DAG graph of the workflow upward from the exit task in the workflow. Its calculation formula is:
[0086]
[0087] In the above formula, CERank(t i , n k ) represents the cost-benefit priority of the i-th task t i on the k-th fog node n k , PT(t i , n k ) represents the processing time of the i-th task t i on the k-th fog node n k , represents the average value of the h-th platform pricing mechanism, and β represents selecting the fog node that achieves the minimum cost-benefit among the subsequent tasks of the current task. Its optimal fog node selection formula is:
[0088]
[0089] Among them, succ(t i ) represents the set of all successor tasks of the i-th task t i , and n p ∈ N, n pDenote the p-th fog node, N represents the set of all fog nodes, CERank(t j ,n p ) represents the cost-benefit priority of the j-th task t j in the p-th fog node n p , where the task t j is the j-th task in succ(t i ), TT(t i ,t j ) represents the communication time between the i-th task t i in the fog node and the j-th task t j in its successor task set, ET(t j ,n p ) represents the execution time of the j-th task t j on the p-th fog node n p ;
[0090] Sort all tasks in the workflow according to the cost-benefit priority, and calculate the priority sorting value of any i-th task t i as:
[0091]
[0092] In the formula, Rank cl (t i ) represents the priority sorting value of the i-th task t i in the workflow, represents the total score of the i-th task t i on all fog nodes, and |N| represents the total number of fog nodes.
[0093] The tasks in the subsequent workflow are sorted in non-increasing order according to this priority Rank cl (t i ).
[0094] Since the pricing mechanisms of each cloud platform are different, different pricing mechanisms will lead to different execution cost calculation methods. Therefore, the execution cost of task t i on fog node n k is related to the billing cycle occupied by this task, the processing time of task t i on fog node n k , the CPU usage rate, and the pricing mechanism of the platform.
[0095] When calculating the execution cost of a computing task, there may be a deviation between the matching of the actual processing time of the task and the billing cycle and the theoretical value. Therefore, it can be divided into the following three cases: (a) Ideal case: The actual execution time of the task is exactly the same as the theoretical calculation time, and no additional billing cycle is generated. (b) Extra occupancy cycle: The actual execution time of the task exceeds the theoretical calculation time, resulting in one more billing cycle than expected. (c) Billing cycle optimization case: Although the execution time of the task occupies a complete billing cycle, this cycle has been calculated in the previous task, so the actual billing cycle is one less than the theoretical case.
[0096] In S3, according to the task t i on the fog node n k and the computing price (or pricing) of the platform, calculate the execution cost of the task on the fog node. The calculation formula is:
[0097]
[0098] In the formula, EC(t i ,n k ,f k,g ) represents the execution cost of task t i processed on the fog node n k , PT(t i ,n k ) represents the processing time of task t i on the fog node n k , τ represents the billing cycle, PC represents the set of different platform pricings, PC = {PC1, PC2,..., PC H ), H represents the number of platforms, PC h represents the pricing of the hth platform, where PC h ∈PC, 1 ≤ h ≤ H.
[0099] The specific calculation process of the above S3 includes:
[0100] S301: In order to save the cost of task scheduling in the workflow, in the digital twin layer, calculate the minimum and maximum execution costs of the digital twin DT of task t i in the fog cluster digital twin DT respectively. The calculation formulas are:
[0101]
[0102] Among them, represents the minimum execution cost of the digital twin of task t i in the fog cluster digital twin,, represents the digital twin of task t iThe maximum execution cost of the digital twin in the fog cluster digital twin DT; Denote task t i The digital twin in fog node n k The execution cost on the digital twin.
[0103] S302: The digital twin DT has a computational resource estimation deviation Δf k,max , Δf k,min , and this deviation can be positive or negative; Calculate the computational cost deviation between the actual value and the estimated value, and the calculation formulas are respectively:
[0104]
[0105] In the formula, Denote task t i The minimum estimated deviation of the execution cost of the digital twin in the fog cluster digital twin, Δf k,max Denote the maximum resource estimation deviation of the fog cluster digital twin; Denote task t i The maximum estimated deviation of the execution cost of the digital twin on the fog cluster digital twin, Δf k,min Denote the minimum resource estimation deviation of the fog cluster digital twin.
[0106] S303: According to the minimum and maximum execution costs of the task calculated by the digital twin layer and the cost deviation, calculate the actual minimum and maximum execution costs of task t i , and its calculation formulas are:
[0107]
[0108] In the formula, Cost min (t i ) denotes the actual minimum cost of task t i ; Cost max (t i ) denotes the actual maximum cost of task t i ; Denote task t i The minimum execution cost of the digital twin in the fog cluster digital twin; Denote task t i The maximum execution cost of the digital twin in the fog cluster digital twin DT; Denote task t i The minimum estimated deviation of the execution cost of the digital twin in the fog cluster digital twin; Denote task t i The maximum estimated deviation of the execution cost of the digital twin on the fog cluster digital twin;
[0109] S304: The execution cost of the fog cluster network G is the sum of the execution costs of all tasks. According to the actual minimum and maximum execution costs of task t i , the minimum and maximum execution costs of the fog cluster network G are calculated. The specific calculation formula is as follows:
[0110]
[0111] In the formula, represents the minimum execution cost on the digital twin of the fog cluster network G, represents the digital twin of the fog cluster network, represents the maximum execution cost on the digital twin of the fog cluster network G.
[0112] S305: According to the cost budget given by the user for 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:
[0113]
[0114] In the digital twin layer, select the pricing mechanism and fog nodes that meet the cost constraint and minimize the system overhead of each task.
[0115] Figure 3 is the schematic diagram of the task scheduling processing flow of the embodiment of the present invention. Figure 3 In, the task scheduling process in the fog computing network includes:
[0116] Obtain the workflow and cost budget submitted by the user terminal, and obtain the fog cluster;
[0117] Calculate the maximum and minimum execution costs of the fog cluster G;
[0118] Calculate and sort the cost-benefit priorities of all tasks;
[0119] Judge whether the cost-benefit priorities of all tasks have been calculated and sorted. If so, proceed to the next step; otherwise, continue to process the next task;
[0120] Calculate the elastic cost of the fog cluster G;
[0121] Calculate the execution cost of the current task;
[0122] Judge whether the execution cost of the current task exceeds the preset task cost constraint; if so, the execution strategy or resource allocation of the task needs to be readjusted; otherwise, proceed to the next step;
[0123] Calculate the energy efficiency, reliability score, and cost-benefit of the current task;
[0124] Dynamically adjust the weights and calculate the comprehensive score of the task;
[0125] Determine whether the comprehensive score Score of the current task is less than the previously recorded task score; if so, it indicates that the execution strategy of the current task may need to be optimized; otherwise, it indicates that the current strategy is relatively reasonable and can continue to be executed;
[0126] Record and place the task at the current optimal node;
[0127] Among multiple task scheduling schemes, select the Pareto optimal solution, that is, a scheduling scheme that cannot further improve the benefit of a certain task without reducing the benefits of other tasks.
[0128] In summary, the present invention provides a fog computing preference-driven task scheduling method assisted by digital twins under cost constraints, which comprehensively considers multi-dimensional indicators such as resource cost, energy efficiency, reliability, and task priority, and combines elastic resource analysis and multi-objective optimization strategies, and can achieve flexible, intelligent, and cost-effective task scheduling in resource-constrained or heterogeneous environments.
[0129] It should be understood that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than limiting the present invention. Those skilled in the art can make various modifications and substitutions without departing from the essence of the present invention, and these modifications and substitutions should also fall within the protection scope defined by the claims of the present invention.
Claims
1. A digital twin-assisted fog computing preference-driven task scheduling method under cost constraints, characterized in that, The method includes: S1: The fog computing architecture based on digital twin consists of an end - user layer, a fog layer, and a digital twin layer: End - users submit workflows and cost budgets to the fog layer, and the digital twin layer covers the digital twin models of fog clusters, fog nodes, and tasks. The fog layer randomly selects an initial fog cluster to run the workflow and sorts tasks according to cost - benefit priorities to finally determine the priority ranking values of the tasks; S2: In the digital twin layer, traverse the digital twins of each task in the workflow, calculate the actual minimum - maximum cost of each task on different fog nodes to calculate the elastic cost of the fog cluster, and then for each task, first calculate its constraint cost; S3: In the digital twin layer, traverse all fog nodes, calculate the execution cost of each task on each fog node. If the execution cost exceeds the task cost constraint, skip this fog node. For fog nodes that do not exceed the standard, calculate indicators such as energy efficiency, reliability, and cost - benefit according to the digital twin body status, and obtain the comprehensive task score after dynamically adjusting the weights. If the score of the current fog node is lower than the current minimum score, record its information and add it to the alternative group; S4: In the digital twin layer, after traversing all fog nodes and all tasks, select the optimal scheduling solution from the alternative group through Pareto - optimal selection, distribute the scheduling result to the fog cluster, and the fog nodes in the fog layer are responsible for executing the task scheduling.
2. A fog computing preference-driven task scheduling method assisted by digital twin under cost constraint according to claim 1, characterized in that In S1, the cost - benefit priority is recursively calculated by traversing the DAG graph of the workflow upward from the exit tasks in the workflow, and its calculation formula is: In the above formula, CERank(t i ,n k ) represents the cost - benefit priority of the i - th task t i on the k - th fog node n k , PT(t i ,n k ) represents the processing time of the i - th task t i on the k - th fog node n k . represents the average value of the h - th platform pricing mechanism, and β represents selecting the fog node that achieves the minimum cost - benefit among the subsequent tasks of the current task. Its optimal fog node selection formula is: Among them, succ(t i ) represents the set of all successor tasks of the i-th task t i , n p ∈ N, n p represents the p-th fog node, N represents the set of all fog nodes, CERank(t j , n p ) represents the cost-benefit priority of the j-th task t j on the p-th fog node n p , where the task t j is the j-th task in succ(t i ), TT(t i , t j ) represents the communication time between the i-th task t i in the fog node and the j-th task t j in its successor task set, ET(t j , n p ) represents the execution time of the j-th task t j on the p-th fog node n p ; Sort all tasks in the workflow according to the cost-benefit priority, and calculate the priority sorting value of any $i$-th task $t$ i is expressed as: where Rank cl (t i ) represents the priority ranking value of the i-th task t i in the workflow, represents the total score of the i-th task t i on all fog nodes, and |N| represents the total number of fog nodes.
3. A cost-constrained digital twin-assisted fog computing preference-driven task scheduling method according to claim 1, characterized in that In S2, the calculation formula for the actual minimum - maximum cost is: Where, Cost min (t i ) represents the actual minimum cost of task t i ; Cost max (t i ) represents the actual maximum cost of task t i ; represents the minimum execution cost of the digital twin of task t i in the fog cluster digital twin; represents the maximum execution cost of the digital twin of task t i in the fog cluster digital twin DT; represents the minimum estimated deviation of the execution cost of the digital twin of task t i in the fog cluster digital twin; represents the maximum estimated deviation of the execution cost of the digital twin of task t i on the fog cluster digital twin.
4. A fog computing preference-driven task scheduling method assisted by digital twin under cost constraints according to claim 1, characterized in that In S2, the specific calculation formula for the elastic cost of the fog cluster is: where represents the total cost budget of the fog cluster network, represents the minimum execution cost on the digital twin of the fog cluster network G.
5. A method for fog computing preference-driven task scheduling assisted by digital twin under cost constraints according to claim 1, characterized in that, In S2, the specific calculation formula for the cost constraint of each task is: Where, represents the cost limit value of the i-th task, represents the total cost budget in the fog computing network, Represents the i-th task The cost of all previous predecessor tasks is accumulated, It means the i-th task The sum of the estimated costs of all subsequent tasks. T is defined as the set of all tasks in the workflow, and |T| represents the total number of tasks in the task set.
6. A fog computing preference-driven task scheduling method assisted by digital twin under cost constraint according to claim 1, characterized in that, In S3, calculate the execution cost of each task in the workflow on each fog node, and its calculation formula is: where EC(t i ,n k ) represents the execution cost of task t i processed on fog node n k , PT(t i ,n k ) represents the processing time of task t i on fog node n k , τ represents the billing period, PC represents the set of prices for different platforms, PC = {PC1, PC2, …, PC H ), H represents the number of platforms, PC h represents the price of the h-th platform, where PC h ∈PC, 1 ≤ h ≤ H.
7. A method for fog computing preference-driven task scheduling assisted by digital twin under cost constraints according to claim 1, characterized in that, In S3, calculate the energy efficiency of each task in the workflow on each fog node, and its calculation formula is: where ET(t i ,n k ) represents the execution time of task t i on fog node n k , f k,g represents the CPU utilization rate of fog node n k , and f k,max represents the maximum normalized frequency of the CPU on fog node n k . P k,g represents the dynamic power coefficient of fog node n k , and its calculation formula is: P k,g = P ind + C ef × f k,g where P ind represents the frequency-independent dynamic power, C ef represents the effective capacitance, m represents the dynamic power exponent, and is not less than 2.
8. A method for cost-constrained digital twin-assisted fog computing preference-driven task scheduling according to claim 1, characterized in that, In S3, calculate the reliability of each task in the workflow on each fog node, and its calculation formula is: Where λ k,g represents the maximum failure rate of each fog node n k The maximum failure rate, f k,max , f k,min respectively represent the maximum and minimum normalized frequencies of the CPU on fog node n k . ET(t i , n k ) represents the execution time of task t i in the workflow on fog node n k . f k,g is the CPU frequency.
9. The method for fog computing preference-driven task scheduling assisted by digital twin under cost constraint according to claim 1, wherein In S3, calculate the size of the cost - benefit, and its calculation formula is: where C benefit is the cost - benefit of the task at a certain fog node, is the task at the fog node execution time of the digital twin.
10. A method for fog computing preference-driven task scheduling assisted by digital twin under cost constraints according to claim 1, characterized in that, In S3, calculate the size of the comprehensive task score, and its calculation formula is: Score(t i ,n k ) = α × E efficiency + β × R score + γ × C benefit In the formula, α, β, γ are the weight vectors W=(α, β, γ), and its weight update formula is as follows: Where L total represents the total load of the system, λ total is the total failure rate of the system, B remaining represents the remaining budget; l is an indicator function that is 1 when the condition in the parentheses is satisfied; L th , λ th , B th represent the thresholds of the preset load, failure rate, and budget, respectively. In addition, perform normalization processing each time the weights are dynamically adjusted:
11. A method for fog computing preference-driven task scheduling assisted by digital twin under cost constraints according to claim 1, characterized in that, In S4, the specific Pareto - optimal selection is: Formulate the scheduling problem studied in this paper as: min F(x) = (makespan(x), E(x), R(x)) T Among them, makespan(x) represents the scheduling length, that is, the longest time required to complete all tasks, E(x) represents the energy consumption, and R(x) represents the reliability. Since there may be conflicts among these three goals and it is impossible to achieve the optimal simultaneously. Among the given conflicting goals to be optimized, we use the Pareto - dominance relationship to compare solutions x and y. Specifically, if the following conditions are met, then solution x dominates solution y: When no other solution is dominant, solution x is Pareto - optimal.