An edge computing resource optimization method based on DAG task driving

By combining a DAG task-driven hybrid offloading strategy, a social trust model, and differential privacy technology with Stackelberg game theory and SAC reinforcement learning, edge computing resources are optimized, addressing the challenges of low latency, low power consumption, and data privacy and security for mobile devices. A visual simulation system is also provided to verify the offloading strategy.

CN123035203APending Publication Date: 2026-11-03DONGHUA UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611100781.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-23
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

Existing local computing or single cloud offloading models are insufficient to meet the multiple needs of mobile devices in terms of low latency, low power consumption, and data privacy and security, especially in mobile edge computing, where communication latency is high and data privacy is vulnerable to threats.

Method used

A DAG task-driven hybrid offloading strategy is adopted, which combines a social trust model and differential privacy technology to construct a Stackelberg game model. A dynamic pricing mechanism based on SAC reinforcement learning is designed, and the branch and bound algorithm is used to optimize the offloading decision. The simulation platform is developed using the React framework and FastAPI backend.

Benefits of technology

It achieves the goal of meeting users' computing power needs while reducing latency and energy consumption, ensuring data privacy and security, and provides a visual simulation system to intuitively verify the effectiveness and security of the offloading strategy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123035203A_ABST
    Figure CN123035203A_ABST
Patent Text Reader

Abstract

The application relates to a kind of edge computing resource optimization methods based on DAG task driving, comprising: the data security mechanism based on social trust and differential privacy, by constructing social trust to the dynamic mapping relationship of laplace noise variance, and considering the noise aftereffect in data flow, a kind of differential privacy strategy is realized between privacy protection intensity and computing availability Dynamic balance. A joint optimization algorithm based on master-slave game and deep reinforcement learning is proposed, the SAC reinforcement learning algorithm is introduced to give the ability of continuous dynamic pricing to cooperative equipment, effectively avoiding vicious competition. Then, the branch and bound algorithm with optimality pruning and feasibility pruning strategy is designed, which guarantees the global optimality and real-time performance of user offloading decision. The power offloading interactive simulation platform is developed, which overcomes the defect that pure theoretical algorithm lacks intuitive verification method, and realizes full-stack penetration from bottom algorithm to upper interface by using React framework, FastAPI backend and React Flow topology engine.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of mobile computing and communication technology, and in particular to a DAG-based task-driven edge computing resource optimization method. Specifically, it involves differential privacy mechanisms, deep reinforcement learning algorithms, game theory, and a web front-end and back-end development framework for building simulation systems, aiming to solve resource scheduling and pricing decision-making methods in mobile computing networks. Background Technology

[0002] With the continuous development of artificial intelligence and mobile internet, more and more new applications, such as augmented reality and collaborative games, have emerged in daily life. These applications often have huge computing resource requirements, while the local computing power of mobile devices is limited and cannot meet the computing power demands of these applications. Therefore, Mobile Edge Computing (MEC) offloading technology has emerged. This technology draws on the concept of distributed computing, distributing the computing burden originally concentrated on central nodes to edge computing resources closer to users. Mobile devices offload computing tasks that are difficult to handle locally to edge servers through transmission units. With the help of the abundant computing resources of edge servers, these tasks are processed efficiently, and the results are returned to the user terminal. Task offloading can effectively optimize the latency and energy consumption of user devices when performing task computing, improving the user's Quality of Experience (QoE). However, relying solely on edge servers (ES) as collaborative devices for computing power offloading is limited by the long communication distance between mobile devices and ES, resulting in high communication latency, which greatly affects the user experience. Therefore, an alternative approach is to leverage the resources of surrounding mobile devices to supplement computing power, often referred to as device-to-device (D2D) compute offloading, transient cloud, or wireless distributed computing. The core advantage of compute offloading within mobile device clusters lies in reducing energy consumption and latency for individual nodes and the overall network. Power analysis shows that, under certain conditions (especially when computational overhead exceeds communication overhead), this method outperforms purely local processing. These conditions are typically met when resource-intensive tasks are distributed over short distances within a network. The main difference between the two approaches lies in the communication technologies and computing resources available. Summary of the Invention

[0003] To address the issue that traditional local computing or single cloud offloading modes are no longer sufficient to meet users' multiple needs for low latency, low energy consumption, and data privacy and security, a DAG-based task-driven edge computing resource optimization method is proposed.

[0004] This invention aims to meet user latency constraints while offloading computing power. Therefore, it adopts a hybrid offloading strategy of MEC and D2D assistance to maximize user satisfaction while meeting user computing power requirements.

[0005] As applications become increasingly complex, they are often developed and deployed as microservices. In this case, an application can be broken down into a set of sub-components with data and temporal dependencies. Therefore, a Directed Acyclic Graph (DAG) can be used to model these applications and perform workflow-based offloading according to the dependencies of the sub-components. Components that do not depend on each other can be computed in parallel, thereby significantly reducing the latency of offloading computing power.

[0006] Privacy and security are significant challenges facing hybrid offloading methods. When users offload sensitive data to malicious devices, data leaks are highly likely. Although in DAG task offloading scenarios, computing power applications are broken down into multiple interdependent components, and most of the data transmitted between collaborating devices is intermediate data, the risk of reverse engineering remains with the development of artificial intelligence technology. Therefore, to address the security vulnerabilities in computing power offloading scenarios, a feasible solution is to introduce social factors, constructing social models to characterize physical and social features, quantifying the social relationships between users and collaborating devices, and allowing users to consider the level of trust in collaborating devices when making offloading decisions. Furthermore, differential privacy technology, by injecting noise into the input data, can effectively prevent malicious devices from reconstructing user intermediate data, further protecting user privacy and security at the data level.

[0007] In the field of mobile edge computing research, the design of incentive mechanisms for collaborative devices is an important research direction. In practical applications, whether it's edge servers or D2D computation offloading, collaborative devices will not proactively contribute their computing power to help users offload computing power. Therefore, it is necessary to design reasonable incentive mechanisms to encourage collaborative devices to participate in computing power offloading, thereby maintaining the long-term operation of the system. To achieve this goal, game theory, as a mathematical tool for studying the decision-making processes of participants in competitive environments, is widely applied to this problem. By characterizing the strategic interactions between participants and their impact on payoffs, it provides an effective means of modeling the behavior between collaborative devices and users. Game theory-based methods help design incentive mechanisms that balance efficiency and fairness, thereby achieving the rational allocation of computing resources and improving the overall performance of the system.

[0008] The technical solution of this invention is as follows:

[0009] A DAG-based task-driven edge computing resource optimization method includes: Step 1: Construct the system, including mobile users, edge servers, and nearby mobile devices, and comprehensively consider their computing power and social relationships to form a complete system model; construct a mathematical model for computing power offloading, and use DAG to perform fine-grained modeling of computing power tasks according to their internal dependencies; define the underlying task model and communication model, derive the calculation formulas for task execution latency and energy consumption, and implement a differential privacy noise injection mechanism based on social trust to ensure data security; based on social trust and differential privacy data security mechanism, by constructing a dynamic mapping relationship from social trust to Laplace noise variance, and considering the noise aftereffect in data flow, a differential privacy strategy that dynamically balances privacy protection strength and computing availability is achieved. Step 2: Construct a Stackelberg master-slave game model to form an incentive and decision-making framework between collaborative devices and mobile users; based on this, use the SAC reinforcement learning algorithm to optimize the dynamic pricing strategy of the computing power of collaborative devices, and combine it with a branch and bound algorithm with optimal pruning and feasibility pruning strategies to solve the optimal offloading decision of mobile users under constraints.

[0010] Furthermore, step one specifically includes the following steps: Mobile devices and MEC servers typically communicate via cellular networks; users upload task input data to the MEC server, and the transmission rate is affected by the user's transmit power, channel conditions, and the bandwidth resources allocated by the system. Privacy awareness and DAG task modeling for mobile social scenarios, based on Shannon's theorem, device The formula for the transmission rate between the MEC server and the MEC server is as follows:

[0011] in Represents the system's allocated bandwidth. For equipment The transmission power, For users Channel gain to MEC Noise power; During data transmission, the device can adjust the transmission power to meet specific data transmission rate requirements; equipment To the equipment The formula for the transmit power required for data transmission is as follows:

[0012] in, Indicates system bandwidth. Indicates device With equipment Channel gain between; User For equipment The trust value is divided into three parts: direct trust, indirect trust, and recommended trust. Direct trust comes from the historical interaction performance between devices, indirect trust reflects the similarity of evaluations between devices, and recommended trust reflects the overall trust level of the system in a certain device. The user For equipment The formula for the trust value is as follows:

[0013] Among them, the weighting coefficient These represent the influence levels of three types of trust: direct trust, indirect trust, and referral trust, respectively, and satisfy the normalization constraint. ; Direct trust: ,in, Indicates device Successfully completed user Number of times the uninstallation task was performed. Indicates the total number of interactions; Indirect trust: ,in, Indicates that the system excluding users With equipment Other device nodes besides; Recommended for trust: ,in, This indicates that all devices are sending data to the node. The total number of uninstalls initiated, with the denominator representing the total number of uninstalls in the system; this metric reflects the device's popularity on a global scale. Meaning and Similarly, it represents the total number of times all users uninstalled all collaborative devices.

[0014] Furthermore, step two specifically includes the following steps: The Stackelberg game theory model is introduced to characterize the game relationship between users and collaborative devices; In the Stackelberg game theory model, the goal of collaborative devices participating in offloading is to maximize their own benefits. Their utility is determined by both service revenue and energy consumption costs. The utility function is defined as:

[0015] in, For equipment The unit data processing price equipment The actual amount of data processed equipment The total energy consumption generated during task execution Energy cost conversion factor Indicates that it has been assigned to a device The total amount of data in the task components on the platform. This is a normalization constant; Under the Stackelberg game model, the utility function of mobile users The formula modeled as negative cost is as follows:

[0016] Among them, expenditure costs This represents the total cost paid by the user to all collaborating devices, including privacy-related costs. This means that under the current offloading strategy, the noise introduced by the differential privacy mechanism causes an overall loss of data accuracy, making it impossible for attackers to deduce any specific user's information from the analysis results; Under the Stackelberg game model, the user's reward function is formulated as follows:

[0017] in, The amount of data allocated to the task. To correspond to energy consumption, Lowest price on the market. The price deviation penalty coefficient, To avoid ineffective low-price competition by imposing a small penalty constant, this design guides equipment manufacturers to gradually adjust their pricing strategies when they fail to win a bid, while ensuring maximum revenue. In the Stackelberg game model, SAC improves policy discovery capability while maximizing expected payoff by introducing a maximum entropy mechanism. The optimization objective of SAC reinforcement learning is:

[0018] in, For temperature coefficient, Let entropy be the policy entropy, and state space be the state space. Defined as a multidimensional feature vector, This represents the expected value of long-term cumulative returns; Once the collaborative intelligent device has set its price, the system enters the unloading decision phase, where the algorithm needs to formulate the optimal component unloading strategy for the user while meeting time delay constraints. To address this, a branch and bound algorithm is introduced to accurately solve for the optimal component unloading strategy. This algorithm constructs a state-space search tree and, combined with a cost evaluation function and feasibility assessment, prunes branches that are unlikely to produce the optimal solution during the search process, thereby reducing computational complexity and improving efficiency. In the search tree, each node represents a partial unloading decision state. That is, in time slots Down, front The uninstallation decision for each component is made, and the remaining components that are not uninstalled constitute the undecided set. Two pruning strategies are designed to improve the algorithm's execution efficiency. The optimal unloading decision solution based on the branch and bound method is as follows: Optimal pruning: ,in, The cost incurred for the current search state, Representation Component The size of the input data, Indicates device Calculate the price using unit data. This represents the privacy loss weighting coefficient. Indicates that the component Unload to device noise variance at time; Feasibility of pruning: , For components Minimum delay estimate, Take the minimum value among all available collaborative devices. parent component The output data size, Parent component To the equipment Data transfer rate between Components The total computational workload, equipment Assigned to component The calculation frequency, This is a set of device IDs to which all parent components were unloaded in the previous time slot.

[0019] Furthermore, step four involves developing an interactive simulation platform for offloading computing power, utilizing the React framework, FastAPI backend, and React Flow topology engine to achieve full-stack connectivity from the underlying algorithm to the upper-level interface.

[0020] Furthermore, the FastAPI backend is used for data interaction and interface management between the frontend and backend. It is responsible for receiving task data sent by the frontend, then calling the backend's reinforcement learning model and branch and bound algorithm to perform calculations, and finally returning the data results to the frontend.

[0021] The beneficial effects of this invention are as follows: To address the aforementioned technical problems, this invention provides a solution that, within the context of mobile social networks, deeply explores a hybrid offloading mechanism for edge computing and D2D collaboration based on DAG tasks, and designs and implements a complete visualization simulation system. The design of the DAG-based edge computing system includes the following steps: A DAG task offloading model oriented towards social awareness was constructed. The computing power application was componentized using DAG, and the data dependencies and parallel logic within the task were finely characterized. Simultaneously, a comprehensive latency and energy consumption assessment calculation model was established by combining communication link and physical energy consumption characteristics. A data security mechanism based on social trust and differential privacy was designed. Addressing the untrustworthiness issue of collaborative devices in open edge networks, the "trust level" assessment from social networks was innovatively introduced into the physical communication system. By constructing a dynamic mapping relationship between social trust and Laplace noise variance, and considering the noise aftereffect in data flow, a differential privacy strategy that dynamically balances privacy protection strength and computational availability was achieved. A joint optimization algorithm based on master-slave game theory and deep reinforcement learning is proposed. Facing the incentive problem of selfish nodes and the challenge of complex combinatorial optimization, a Stackelberg game model is constructed with collaborative devices as leaders and mobile users as followers. On the solution side, the SAC reinforcement learning algorithm is introduced to endow collaborative devices with continuous dynamic pricing capabilities, effectively avoiding vicious competition. Simultaneously, a branch and bound algorithm with optimality pruning and feasibility pruning strategies is designed to ensure the global optimality of user unloading decisions and the real-time nature of the solution. An interactive visualization simulation platform for computing power offloading was developed. Overcoming the lack of intuitive verification methods for purely theoretical algorithms, it utilizes the React framework, FastAPI backend, and React Flow topology engine to achieve full-stack integration from the underlying algorithm to the upper-level interface. The system can not only interactively construct network topologies and DAG tasks, but also monitor the agent's reward convergence curve, user cost fluctuations, and market pricing trajectory in real time, providing a highly valuable and intuitive simulation tool for research on multi-device collaborative offloading strategies. Attached Figure Description

[0022] Figure 1 A system architecture diagram provided for embodiments of the present invention; Figure 2This is a DAG task unloading diagram provided in an embodiment of the present invention; Figure 3 This invention provides a graph showing the trend of multi-step reward value changing with the number of training steps during the training process, as shown in the embodiments of the invention. Figure 4 The loss convergence curves of the Actor network and Critic network of the intelligent agent during a 50,000-step training process provided in this embodiment of the invention. Figure 5 This invention provides a price map showing the bids of an agent on a test set within the bids of all winning equipment, as provided in an embodiment of the invention. Figure 6 This is a trend chart of agent bidding and reward curve changes on the test set provided in this embodiment of the invention; Figure 7 A graph showing the total utility of a collaborative device after multi-step unloading using five pricing methods, as provided in this embodiment of the invention. Figure 8 A comparative baseline diagram for two typical schemes provided in embodiments of the present invention: fully local execution and fully MEC unloading; Figure 9 The ablation experiment provided in this embodiment of the invention removes the dynamic mechanism (without dynamic), task information (without task info), and market information (without market info), and compares and analyzes the experimental results with the complete model (Base) containing all modules. Figure 10 Training reward curves for Deep Deterministic Policy Gradient (DDPG), TwinDelayed Deep Deterministic Policy Gradient (TD3), and SAC provided for embodiments of the present invention; Figure 11 A system technology stack diagram of the visualization system provided in the embodiments of the present invention; Figure 12 Functional diagrams of the various modules provided in the embodiments of the present invention; Figure 13 A flowchart of the data processing module provided in an embodiment of the present invention; Figure 14 The algorithm execution flowchart provided in the embodiments of the present invention; Figure 15 This is a general visualization interface diagram provided for an embodiment of the present invention; Figure 16 This is a visualization of the computing power task provided in an embodiment of the present invention. Detailed Implementation

[0023] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.

[0024] An edge computing resource optimization method based on DAG task-driven approach is proposed. This method utilizes DAG to modularize computing power applications, meticulously characterizing the data dependencies and parallel logic within each task. First, a data security mechanism based on social trust and differential privacy is designed. By constructing a dynamic mapping relationship from social trust to Laplace noise variance and considering the noise aftereffects in data flow, a differential privacy strategy that dynamically balances privacy protection strength and computational availability is achieved. Second, a joint optimization algorithm based on master-slave game theory and deep reinforcement learning is proposed. The SAC reinforcement learning algorithm is introduced to endow collaborative devices with continuous dynamic pricing capabilities, effectively avoiding vicious competition. Then, a branch and bound algorithm with optimality pruning and feasibility pruning strategies is designed to ensure the global optimality and real-time solution of user offloading decisions. Finally, an interactive simulation platform for computing power offloading is developed, overcoming the lack of intuitive verification methods for purely theoretical algorithms. Utilizing the React framework, FastAPI backend, and React Flow topology engine, a full-stack connection from the underlying algorithm to the upper-level interface is achieved. Details are as follows: The edge computing resource optimization method based on DAG task-driven approach includes the following steps: The system is constructed, including mobile users, edge servers, and nearby mobile devices, taking into account their computing power and social relationships to form a complete system model; Construct a mathematical model for computing power offloading. Define the underlying task model and communication model, derive the calculation formulas for task execution latency and energy consumption, and ensure data security through a differential privacy noise injection mechanism based on social trust. A Stackelberg master-slave game model is constructed to form an incentive and decision-making framework between collaborative devices and mobile users. Based on this, the SAC reinforcement learning algorithm is used to optimize the dynamic pricing strategy for the computing power of collaborative devices, and the branch and bound algorithm is combined to solve the optimal offloading decision for mobile users under constraints. The convergence of the reinforcement learning model is analyzed through simulation experiments, the performance of different pricing and offloading strategies in terms of latency and utility is compared, and the important role of the core mechanism is demonstrated through ablation experiments. This paper describes the overall architecture of the computing power offloading simulation platform, details the design logic of the three core modules of data processing, algorithm execution and performance analysis, and demonstrates the interactive presentation of the system topology and offloading process.

[0025] Mobile devices and MEC servers typically communicate via cellular networks. This link offers high bandwidth and stable channel quality, and the MEC server possesses strong computing power, making it a crucial communication and computing foundation for ensuring the stable operation of the computing power offloading process.

[0026] Users upload task input data to the MEC server, and the transmission rate is mainly affected by the user's transmit power, channel conditions, and the bandwidth resources allocated by the system.

[0027] Privacy awareness and DAG task modeling for mobile social scenarios, based on Shannon's theorem, device The formula for the transmission rate between the MEC server and the MEC server is as follows:

[0028] in Represents the system's allocated bandwidth. For equipment The transmission power, For users Channel gain to MEC This represents noise power.

[0029] During data transmission, the device can adjust the transmission power to meet specific data transmission rate requirements.

[0030] equipment To the equipment The formula for the transmit power required for data transmission is as follows:

[0031] in, Indicates system bandwidth. Indicates device With equipment Channel gain between.

[0032] This invention will user For equipment The trust value is divided into three parts: direct trust, indirect trust, and recommended trust. Direct trust comes from the historical interaction performance between devices, indirect trust reflects the similarity of evaluations between devices, and recommended trust reflects the overall trust level of the system in a particular device.

[0033] The user For equipment The formula for the trust value is as follows:

[0034] Among them, the weighting coefficient These represent the influence levels of the three types of trust (direct trust, indirect trust, and referral trust), respectively, and satisfy the normalization constraint. .

[0035] Direct trust: ,in, Indicates device Successfully completed user Number of times the uninstallation task was performed. This indicates the total number of interactions.

[0036] Indirect trust: ,in, Indicates that the system excluding users With equipment Other device nodes besides these.

[0037] Recommended for trust: ,in, This indicates that all devices are sending data to the node. The total number of uninstall attempts, with the denominator representing the total number of uninstall attempts in the system. This metric reflects the device's popularity on a global scale. Meaning and Similarly, it represents the total number of times all users uninstalled all collaborative devices.

[0038] In mobile edge computing environments, nearby collaborating devices are typically rational, self-interested individuals. Performing offloading tasks requires consuming local computing resources and incurs additional energy consumption. Therefore, users must pay a price to get nearby devices to actively participate in offloading computing power.

[0039] To address this, the Stackelberg game theory model was introduced to characterize the game relationship between users and collaborative devices.

[0040] In the Stackelberg game theory model, the goal of collaborative devices participating in offloading is to maximize their own benefits. Their utility is determined by both service revenue and energy consumption costs. The utility function is defined as:

[0041] in, For equipment The unit data processing price equipment The actual amount of data processed equipment The total energy consumption generated during task execution Energy cost conversion factor . Indicates that it has been assigned to a device The total amount of data in the task components on the platform. This is the normalization constant.

[0042] Under the Stackelberg game model, the utility function of mobile users The formula modeled as negative cost is as follows:

[0043] Among them, expenditure costs This represents the total cost paid by the user to all collaborating devices, including privacy-related costs. This indicates that under the current offloading strategy, the noise introduced by the differential privacy mechanism causes an overall loss of data accuracy. Differential privacy is a privacy protection model based on rigorous mathematical proof. Its core idea is to inject random noise into the data so that attackers cannot deduce any specific user's information from the analysis results.

[0044] Under the Stackelberg game model, the user's reward function is formulated as follows:

[0045] in, The amount of data allocated to the task. To correspond to energy consumption, Lowest price on the market. The price deviation penalty coefficient, To prevent ineffective low-price competition, a small penalty constant is applied. This design guides equipment manufacturers to gradually adjust their pricing strategies when they fail to win a bid, while maximizing revenue.

[0046] In the Stackelberg game model, SAC improves policy discovery capability while maximizing expected payoff by introducing a maximum entropy mechanism. The optimization objective of SAC reinforcement learning is:

[0047] in, For temperature coefficient, Let entropy be the policy entropy, and state space be the state space. Defined as a multidimensional feature vector, Let SAC represent the expected value of long-term cumulative returns. Compared to traditional methods, SAC is applicable to continuous pricing spaces, has good exploratory capabilities, stable convergence, and high sample efficiency.

[0048] Once the collaborative intelligent device has set its price, the system enters the unloading decision phase, where the algorithm needs to formulate the optimal component unloading strategy for the user while meeting latency constraints.

[0049] To address this, a branch and bound algorithm is introduced to accurately solve for the optimal component unloading strategy. This algorithm constructs a state-space search tree and, combined with a cost evaluation function and feasibility assessment, prunes branches that are unlikely to produce the optimal solution during the search process, thereby reducing computational complexity and improving efficiency. In the search tree, each node represents a partial unloading decision state. That is, in time slots Down, front The uninstallation decision for each component is made, and the remaining components that are not uninstalled constitute the undecided set. This paper designs two pruning strategies to improve the algorithm's execution efficiency.

[0050] The optimal unloading decision solution based on the branch and bound method is as follows: Optimal pruning: ,in, The cost incurred for the current search state, Representation Component The size of the input data, Indicates device Calculate the price using unit data. This represents the privacy loss weighting coefficient. Indicates that the component Unload to device The noise variance at that time.

[0051] Feasibility of pruning: , For components Minimum delay estimate, Take the minimum value among all available collaborative devices. parent component The output data size, Parent component To the equipment Data transfer rate between Components The total computational workload, equipment Assigned to component The calculation frequency, This is a set of device IDs to which all parent components were unloaded in the previous time slot.

[0052] The branch-and-bound component unloading decision algorithm is as follows: Input: Collection of task components Equipment collection Task dependencies, equipment pricing Delay constraints

[0053] Output: Optimal unloading decision matrix

[0054] Initialize the global optimal cost Optimal decision

[0055] Define a recursive function BranchAndBoundSearch

[0056] if then if then Update the optimal decision

[0057] end if return end if Get Component set of parent nodes

[0058] if a parent node has not been allocated then Call BranchAndBoundSearch

[0059] return end if for each device do Use formula Calculate computation delay

[0060] Use formula Obtain transmission delay

[0061] Get the total delay

[0062] Calculate the current cost

[0063] / Optimal pruning / Use formula Estimate the lower bound h of the remaining tasks if then continue end if / Feasibility of pruning / Use formula The lower bound of the feasibility delay was calculated.

[0064] if then continue end if Updated decision:

[0065] Update device status (bandwidth usage, computing resources). Call BranchAndBoundSearch

[0066] Restore device status (rollback) end for Main program: Initialize empty decision

[0067] Call DFS

[0068] Return to the optimal unloading decision

[0069] FastAPI is a Python framework for building Web APIs. Based on Python type hints, FastAPI supports asynchronous programming and offers good performance when handling concurrent requests. In this article, FastAPI is primarily used for data interaction and interface management between the front-end and back-end. It is responsible for receiving task data sent from the front-end, then calling the back-end's reinforcement learning model and branch and bound algorithm for computation, and finally returning the data results to the front-end.

[0070] React Flow is a graph visualization library built on React, focusing on building flowcharts, node editors, and visual workflows. It provides a flexible and intuitive way to design complex interactive graphical interfaces and is widely used in fields such as automated workflows, data pipeline visualization, and user behavior modeling.

[0071] like Figure 1 As shown, the detailed research content of the edge computing system design for DAG tasks provided by this embodiment of the invention includes the following steps: like Figure 2 As shown, by modeling the computing task using DAG, the execution order and data flow of the internal components of the computing task can be clearly described. When unloading computing power, component-level computing power can be unloaded according to the component dependency relationship. The topology of its DAG is well adapted to the hybrid unloading architecture.

[0072] like Figure 3 As shown in the figure, it can be observed that the agent's strategy continuously optimizes and eventually stabilizes during its interaction with the environment. The entire training process can be clearly divided into three stages. The first stage is a rapid learning phase involving extensive exploration from 0 to 10,000 steps. The second stage is from 10,000 to 25,000 steps, where the agent shifts from an exploration-driven strategy to a exploit-driven strategy, with the reward value reaching its maximum around 25,000 steps. Afterward, from 25,000 to 50,000 steps, the reward curve fluctuates slightly around 70, indicating that the agent has learned a stable strategy, although slight fluctuations may occur due to the randomness of the environmental state.

[0073] like Figure 4 As shown, the loss convergence curves of the Actor network and Critic network during the agent's 50,000-step training process are presented. In the first 20,000 steps of training, the Critic Loss (right axis) decreases rapidly after a brief exploratory fluctuation, indicating that the value network quickly establishes an accurate assessment capability of the environmental state. Simultaneously, the Actor Loss (left axis) shows a significant decreasing trend, indicating that the policy network is continuously optimizing action outputs under value guidance. After approximately 25,000 steps, the losses of both networks smoothly converge to a lower range and maintain reasonable small oscillations, verifying that the algorithm architecture has reached a stable dynamic equilibrium during training. This indicates that the agent has successfully learned an efficient and robust computational offloading cooperative strategy.

[0074] like Figure 5 As shown in the figure, the agent's bid in the test set is the price among all winning bids. The bid percentile chart shows that the agent's real-time bid closely follows the median of the market winning bid and remains stable within a reasonable core range of 25%-75%. This indicates that the agent has successfully learned a rational pricing mechanism that conforms to market rules and effectively avoids blind extreme bidding.

[0075] like Figure 6 As shown, the trends in the agent's bid and reward curves on the test set provide a clear indication of the effectiveness and robustness of the agent's strategy. Furthermore, the price-reward biaxial curves further demonstrate the agent's ability to dynamically adjust prices based on environmental feedback to obtain high returns. Even in individual steps where high market competition leads to lower rewards—for example, in step 14, the agent detects the overall market price increase trend and boldly raises its price, but fails to win the bid due to the excessively high bid, resulting in a final reward of 0—the agent can quickly correct its subsequent bidding strategy and immediately recover to a high reward level. This fully validates that the proposed reinforcement learning algorithm possesses excellent adaptive adjustment capabilities and optimal pricing decision-making level in complex dynamic game environments.

[0076] like Figure 7 As shown in the results, in the absence of a trust mechanism, price dominates the user's uninstallation decision. In this scenario, the "lowest price" strategy, regardless of cost, achieves high device utility and becomes the optimal strategy. However, in scenarios with a trust mechanism, the trust level of the collaborative devices becomes a crucial factor in the user's decision-making process, influencing their choices. Experiments demonstrate that a simple "low price advantage" is insufficient; system security and node trust become the core constraints for task uninstallation. Under these constraints, a comparison of various strategies reveals that the agent pricing strategy proposed in this invention, after introducing a trust mechanism, achieves significantly higher user utility than other baseline strategies, proving its superiority when comprehensively considering price and trust.

[0077] like Figure 8 As shown in the comparison results, although full local execution does not incur communication and service overhead due to offloading, its overall latency is relatively high due to the limited computing power of the terminal device, making it difficult to meet the needs of latency-sensitive applications. On the other hand, full MEC offloading can significantly reduce task execution latency, but due to the high pricing of MEC services, the computing cost on the user side increases significantly.

[0078] like Figure 9 As shown, the results indicate that the complete model consistently achieves optimal performance in terms of user utility. The removal of any module leads to varying degrees of performance degradation, demonstrating the crucial role of each component in overall performance. The most significant performance degradation occurs after removing task information, highlighting the critical influence of task structure and resource requirements on unloading decisions. The lack of a dynamic mechanism hinders the model's ability to adapt to environmental changes, reducing decision-making efficiency. Removing market information weakens the model's ability to characterize resource prices and supply-demand relationships, impacting the rationality and economy of resource allocation. Overall, the modules complement each other functionally: task information provides fundamental support for decision-making, the dynamic mechanism enhances the model's adaptability to environmental changes, and market information improves the economy of resource allocation. This synergistic effect enables the model to achieve efficient and rational unloading decisions in complex scenarios, thereby improving user utility.

[0079] like Figure 10As shown, the reward curves clearly reflect the differences in learning efficiency and final performance among the three algorithms. DDPG can rapidly increase its reward in the early stages of training, but it quickly experiences oscillations and even performance degradation, indicating that its policy updates are unstable and highly sensitive to environmental changes. TD3's reward curve is smoother than DDPG's, and its convergence process is more stable, but its improvement is limited in the later stages, and its final convergence value is slightly lower than SAC's. In contrast, SAC exhibits higher stability during training, with its reward curve showing a clear overall upward trend and eventually converging to a higher level, indicating that it can learn a better pricing strategy.

[0080] like Figure 11 As shown, the system adopts a front-end and back-end separation architecture: the front-end is responsible for displaying the system status and user interaction, and transmits the current system parameters and status data to the back-end in real time; the back-end performs calculations and decisions based on a preset offloading algorithm, generates a computing power offloading scheme, and solves for the optimal latency and energy consumption performance indicators of the system. Finally, the back-end returns the calculation results to the front-end, visually displaying the algorithm execution effect and performance change trend in a graphical manner, realizing the visualization analysis and interactive simulation of the computing power offloading process.

[0081] like Figure 12 As shown, based on the modular design concept and the principle of high cohesion and low coupling, the entire system development is functionally divided into a data processing module, an algorithm execution module, and a performance analysis module. These modules are developed independently and work collaboratively, thereby improving the overall system efficiency and maintainability.

[0082] like Figure 13 As shown, ensuring data alignment between the front-end and back-end is crucial for normal communication. When the front-end sends data to the back-end, the data processing module performs a validity check on the data, verifying whether it meets the system's assumptions. If not, it returns an error message and then reorganizes the data sent by the front-end into a format that the back-end can correctly recognize. Similarly, when the back-end sends data to the front-end, it also needs to ensure that the data conforms to the system's conventions and that the data format is aligned.

[0083] like Figure 14As shown, the algorithm execution module is the core of the entire system, responsible for implementing the computing power offloading algorithm proposed in this invention. The entire offloading process is divided into T discrete time slots. Within each time slot, the system makes offloading decisions on a component-by-component basis and allocates the computing tasks to different collaborating devices for execution. When performing offloading in each time slot, the module takes the offloading information from the previous time slot and the pricing information of the collaborating devices in the current time slot as input data, then executes the algorithm to generate the offloading decision for the current time slot. Next, it simulates OFDMA communication technology to transmit data in parallel. Components that have completed the input data transmission can perform computing power offloading. When the last component completes the calculation, it indicates that the computing power offloading for the current time slot is complete. The module saves the necessary data for the next time slot's computing power offloading and then returns the offloading result to the data processing module.

[0084] like Figure 15 As shown, based on the overall system architecture and three major functional modules described above, a visualization simulation system for computing power offloading in mobile social scenarios is presented and explained. The system front-end adopts a responsive layout design and includes three major modules: experimental parameter configuration, visualization of computing power tasks and collaborative devices, and a performance monitoring panel, supporting full-process interaction from parameter setting and model display to result analysis.

[0085] like Figure 16 As shown, the system models computing tasks as a Directed Acyclic Graph (DAG), with each node corresponding to a task component. The computational complexity and basic input / output data information of each component are displayed in card format, and users can manually modify these details. Components are connected by directed edges to represent data dependencies between different components.

[0086] The above-described embodiments are merely one implementation of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.

Claims

1. A method for optimizing edge computing resources based on DAG task-driven approaches, characterized in that, include: Step 1: Construct the system, including mobile users, edge servers, and nearby mobile devices, and comprehensively consider their computing power and social relationships to form a complete system model; construct a mathematical model for computing power offloading, and use DAG to perform fine-grained modeling of computing power tasks according to their internal dependencies; Define the underlying task model and communication model, derive the calculation formulas for task execution latency and energy consumption, and ensure data security based on a differential privacy noise injection mechanism based on social trust. A data security mechanism based on social trust and differential privacy is proposed. By constructing a dynamic mapping relationship between social trust and Laplace noise variance, and considering the noise aftereffect in data flow, a differential privacy strategy that dynamically balances the strength of privacy protection and computational availability is achieved. Step 2: Construct a Stackelberg master-slave game model to form an incentive and decision-making framework between collaborative devices and mobile users; based on this, use the SAC reinforcement learning algorithm to optimize the dynamic pricing strategy of the computing power of collaborative devices, and combine it with a branch and bound algorithm with optimal pruning and feasibility pruning strategies to solve the optimal offloading decision of mobile users under constraints.

2. The edge computing resource optimization method based on DAG task-driven approach according to claim 1, characterized in that, Step one specifically includes the following steps: Mobile devices and MEC servers typically communicate via cellular networks; users upload task input data to the MEC server, and the transmission rate is affected by the user's transmit power, channel conditions, and the bandwidth resources allocated by the system. Privacy awareness and DAG task modeling for mobile social scenarios, based on Shannon's theorem, device The formula for the transmission rate between the MEC server and the MEC server is as follows: in Represents the system's allocated bandwidth. For equipment The transmission power, For users Channel gain to MEC Noise power; During data transmission, the device can adjust the transmission power to meet specific data transmission rate requirements; equipment To the equipment The formula for the transmit power required for data transmission is as follows: in, Indicates system bandwidth. Indicates device With equipment Channel gain between; User For equipment The trust value is divided into three parts: direct trust, indirect trust, and recommended trust. Direct trust comes from the historical interaction performance between devices, indirect trust reflects the similarity of evaluations between devices, and recommended trust reflects the overall trust level of the system in a certain device. The user For equipment The formula for the trust value is as follows: Among them, the weighting coefficient These represent the influence levels of three types of trust: direct trust, indirect trust, and referral trust, respectively, and satisfy the normalization constraint. ; Direct trust: ,in, Indicates device Successfully completed user Number of times the uninstallation task was performed. Indicates the total number of interactions; Indirect trust: ,in, Indicates that the system excluding users With equipment Other device nodes besides; Recommended for trust: ,in, This indicates that all devices are sending data to the node. The total number of uninstalls initiated, with the denominator representing the total number of uninstalls in the system; this metric reflects the device's popularity on a global scale. Meaning and Similarly, it represents the total number of times all users uninstalled all collaborative devices.

3. The edge computing resource optimization method based on DAG task-driven approach according to claim 1, characterized in that, Step two specifically includes the following steps: The Stackelberg game theory model is introduced to characterize the game relationship between users and collaborative devices; In the Stackelberg game theory model, the goal of collaborative devices participating in offloading is to maximize their own benefits. Their utility is determined by both service revenue and energy consumption costs. The utility function is defined as: in, For equipment The unit data processing price equipment The actual amount of data processed equipment The total energy consumption generated during task execution Energy cost conversion factor Indicates that it has been assigned to a device The total amount of data in the task components on the platform. This is a normalization constant; Under the Stackelberg game model, the utility function of mobile users The formula modeled as negative cost is as follows: Among them, expenditure costs This represents the total cost paid by the user to all collaborating devices, including privacy-related costs. This means that under the current offloading strategy, the noise introduced by the differential privacy mechanism causes an overall loss of data accuracy, making it impossible for attackers to deduce any specific user's information from the analysis results; Under the Stackelberg game model, the user's reward function is formulated as follows: in, The amount of data allocated to the task. To correspond to energy consumption, Lowest price on the market. The price deviation penalty coefficient, To avoid ineffective low-price competition by imposing a small penalty constant, this design guides equipment manufacturers to gradually adjust their pricing strategies when they fail to win a bid, while ensuring maximum revenue. In the Stackelberg game model, SAC improves policy discovery capability while maximizing expected payoff by introducing a maximum entropy mechanism. The optimization objective of SAC reinforcement learning is: in, For temperature coefficient, Let entropy be the policy entropy, and state space be the state space. Defined as a multidimensional feature vector, This represents the expected value of long-term cumulative returns; Once the collaborative intelligent device has set its price, the system enters the unloading decision phase, where the algorithm needs to formulate the optimal component unloading strategy for the user while meeting time delay constraints. To address this, a branch and bound algorithm is introduced to accurately solve for the optimal component unloading strategy. This algorithm constructs a state-space search tree and, combined with a cost evaluation function and feasibility assessment, prunes branches that are unlikely to produce the optimal solution during the search process, thereby reducing computational complexity and improving efficiency. In the search tree, each node represents a partial unloading decision state. That is, in time slots Down, front The uninstallation decision for each component is made, and the remaining components that are not uninstalled constitute the undecided set. Two pruning strategies are designed to improve the algorithm's execution efficiency. The optimal unloading decision solution based on the branch and bound method is as follows: Optimal pruning: ,in, The cost incurred for the current search state, Representation Component The size of the input data, Indicates device Calculate the price using unit data. This represents the privacy loss weighting coefficient. Indicates that the component Unload to device noise variance at time; Feasibility of pruning: , For components Minimum delay estimate, Take the minimum value among all available collaborative devices. parent component The output data size, Parent component To the equipment Data transfer rate between Components The total computational workload, equipment Assigned to component The calculation frequency, This is a set of device IDs to which all parent components were unloaded in the previous time slot.

4. The edge computing resource optimization method based on DAG task-driven approach according to claim 1, characterized in that, It also includes step four: developing an interactive simulation platform for computing power offloading, using the React framework, FastAPI backend and ReactFlow topology engine to achieve full-stack connectivity from the underlying algorithm to the upper interface.

5. The edge computing resource optimization method based on DAG task-driven approach according to claim 1, characterized in that, The FastAPI backend is used for data interaction and interface management between the frontend and backend. It is responsible for receiving task data sent by the frontend, then calling the backend's reinforcement learning model and branch and bound algorithm to perform calculations, and finally returning the data results to the frontend.