Self-adaptive dynamic task unloading method and system for edge computing power network
Through the combination of Transformer model and dual deep Q network, efficient, low-latency, and low-energy-consuming task offloading in edge computing environments is achieved, solving the unloading efficiency and stability of existing methods in dynamic environments, and improving resource utilization and task scheduling optimization capabilities.
Patent Information
- Application Number
- CN202510526584.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-08-01
AI Technical Summary
The existing task unloading methods lack adaptability to dynamic computing environments in the edge computing environment, resulting in low unloading efficiency and poor unloading strategy stability, making it difficult to meet high concurrency requirements and balanced allocation of computing resources.
The Transformer model is used to accurately model the task dependencies, and the dual deep Q network is used to generate the optimal offload decision sequence, combining hybrid model parallel strategies and dynamic adjustment of task allocation ratios to achieve efficient, low latency, and low energy consumption task scheduling optimization.
By accurately modeling task dependencies and dynamic resource allocation, the task offload efficiency is improved, delay and energy consumption is reduced, the utilization rate of computing resources is optimized, and the high concurrency requirements of edge computing are met.
Smart Images

Figure CN120407040A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of edge computing, and in particular, relates to an adaptive dynamic task offloading method and system for an edge computing power network. Background Art
[0002] With the rapid development of Internet of Things, 5G network, cloud computing and edge computing technologies, the number of global intelligent terminal devices has increased exponentially, resulting in a huge amount of computing tasks generated in the network. These tasks are widely used in scenarios such as intelligent transportation, drone navigation, augmented reality, industrial automation, and intelligent healthcare, which pose higher requirements for the real-time, low-latency and stability of computing resources. However, traditional cloud computing architectures rely on remote data centers for task processing. Although they have powerful computing capabilities, due to the need for multi-hop data transmission, they result in high communication latency and bandwidth consumption, and cannot meet the requirements of latency-sensitive applications. In addition, cloud computing data centers are usually centrally deployed in a few regions, resulting in possible resource shortages for computing tasks during peak hours and low resource utilization during low loads, causing unbalanced distribution of computing resources. Therefore, edge computing, as a new computing paradigm, uses edge devices (such as base stations, roadside units, intelligent cameras, etc.) close to the data source to process computing tasks, aiming to reduce data transmission latency, improve computing efficiency, and optimize computing resource allocation. However, the edge computing environment still faces the problem of optimizing task offloading strategies.
[0003] Currently, the task offloading problem mainly adopts static heuristic methods, sequence modeling methods based on Long Short-Term Memory (LSTM), and Deep Reinforcement Learning (DRL) methods, but they all have certain limitations, such as lack of adaptability to the dynamic computing environment, resulting in low offloading efficiency, difficulty in meeting the high concurrency requirements in edge computing scenarios, and poor stability of offloading strategies, making the task allocation decision deviate from the optimal solution. Therefore, the existing offloading methods are difficult to achieve real-time, efficient and low-energy-consuming task offloading optimization in complex computing environments, and there is an urgent need for a new type of intelligent task offloading method to improve task offloading efficiency. Summary of the Invention
[0004] The purpose of the present invention is to provide an adaptive dynamic task offloading method and system for an edge computing power network. The method accurately models task dependency relationships through a Transformer model and uses a double deep Q-network to generate an optimal offloading decision sequence, thereby achieving efficient, low-latency and low-energy-consuming task scheduling optimization and improving task offloading efficiency.
[0005] To achieve the above object, the present invention is implemented by the following technical solutions:
[0006] In a first aspect, the present invention provides an adaptive dynamic task offloading method for an edge computing power network, including:
[0007] Model the computing tasks of the user to obtain a directed acyclic graph of the computing tasks, and generate a task execution order sequence according to the topological sorting of the tasks in the directed acyclic graph;
[0008] Encode the features of the tasks in the task execution order sequence into high-dimensional vectors, and embed the order information using positional encoding to obtain a task matrix;
[0009] Input the task matrix into the trained Transformer model to generate a task-related information sequence;
[0010] Input the task-related information sequence into the trained double Q-network model to obtain an optimal offloading decision sequence;
[0011] Based on the optimal offloading decision sequence, perform local computing or edge server offloading on the computing tasks.
[0012] Optionally, when performing edge server offloading on the computing tasks based on the optimal offloading decision sequence, a heuristic load distribution strategy is adopted to dynamically adjust the task allocation ratio offloaded to the edge server, and offloading is performed based on the adjusted task allocation ratio. The task allocation ratio is calculated according to the following formula:
[0013] ;
[0014] Wherein, represents the allocation ratio of the task on the j-th edge server in the edge computing power network, and j represents the sequence number of the edge server; represents the available computing resources on the j-th edge server, and M represents the total number of edge servers in the edge computing power network.
[0015] Optionally, the inputting the task matrix into the trained Transformer model to obtain a task-related information sequence includes:
[0016] Input the task matrix into the encoder of the trained Transformer model to extract the high-dimensional feature representation of the task;
[0017] Input the high-dimensional feature representation of the task into the decoder of the trained Transformer model to obtain a task-related information sequence;
[0018] The task-related information sequence includes the computing requirements, dependency relationships, and global context information of multiple tasks.
[0019] Optionally, when the Transformer model is processed, a hybrid model parallel strategy is adopted, where the hybrid model parallel strategy includes a tensor parallel strategy and a pipeline parallel strategy; the tensor parallel strategy is used in the multi-head attention mechanism layer of the encoder, and the pipeline parallel strategy is used in the residual connection and normalization layers of the encoder and decoder.
[0020] Optionally, the training process of the double Q-network model includes:
[0021] Construct a double deep Q-network model; the construction process includes: based on the Markov decision process, define the expressions of the state space S, the action space A, and the reward function R; define the input layer, hidden layer, and output layer of the main network and the target network in the double deep Q-network model; the main network is used to predict the Q value of the current state, and the target network is used to calculate the target Q value;
[0022] Obtain a historical task-related information sequence, which is generated by the Transformer model;
[0023] Use the historical task-related information sequence as a training set and input it into the main network for training, and update the parameters of the main network by minimizing the Huber loss function between the Q value of the current state and the target Q value;
[0024] Copy the parameters of the updated main network to the target network to obtain a trained double deep Q-network model.
[0025] Optionally, based on the Markov decision process, the expressions of the state space S, the action space A, and the reward function R are defined as follows:
[0026] State space S:
[0027] ;
[0028] where Z0 represents the task-related information sequence input into the double deep Q-network model; represents the execution action sequence up to the i-th task ; represents the i-th task in the state;
[0029] Action space A:
[0030] ;
[0031] where represents the execution action of the i-th task when represents the i-th task is executed locally, and when represents the i-th task is offloaded to the edge server for execution; represents the total number of tasks in the task-related information sequence input to the double deep Q-network model.
[0032] Reward function R:
[0033] ;
[0034] Among them, and represent the weight coefficients of latency and energy consumption in the global state, satisfying ; represents the average execution time of all tasks executed locally; represents the i-th task 's completion time, where the i-th task is executed locally or offloaded to the edge server for execution; represents the total execution time of all tasks executed locally; represents the average execution energy consumption of all tasks executed locally, represents the execution energy consumption of the i-th task; represents the total energy consumption of all tasks executed locally.
[0035] Optionally, the calculation formula of the target Q value is expressed as follows:
[0036] ;
[0037] Among them, represents the target Q value of the state-action pair corresponding to the i-th task; represents the reward of the state-action pair corresponding to the i-th task, calculated through the reward function; represents the discount factor, represents the parameters of the main network, represents the parameters of the target network; represents the (i + 1)-th task in the state; represents the (i + 1)-th task in the optimal action of the state; represents the (i + 1)-th task in the optimal Q value of the state.
[0038] Optionally, during the process of using the historical task-related information sequence as the training set and inputting it into the main network for training, a prioritized experience replay mechanism is adopted. This mechanism calculates the priority of each experience sample in the training set by combining the TD error and the freshness factor, obtains the sampling probability of the experience sample according to the priority, and obtains the weight of each experience sample through the sampling probability.
[0039] Optionally, the weight formula of the experience sample is expressed as:
[0040] ;
[0041] ;
[0042] ;
[0043] ;
[0044] ;
[0045] Among them, represents the weight of the z-th experience sample; represents the initial weight of the u-th experience sample, and is the maximum value among all sample weights; represents the initial weight of the z-th experience sample; N represents the total number of experience samples in the training set; represents the influence degree of controlling the initial weight; represents the sampling probability of the z-th experience sample; represents the priority of the z-th experience sample; represents the sum of the priorities of all experience samples, and k is the number of sequences; represents the TD error of the z-th experience sample; * represents a constant to prevent the priority from being zero; represents the importance degree of controlling the priority; represents the freshness factor of the z-th experience sample, represents the number of times the z-th experience sample is sampled; represents the Q value of the main network under the state-action pair of the z-th experience sample; represents the Q value of the target network under the state-action pair of the (z + 1)-th experience sample; respectively represent the states where the z-th and (z + 1)-th experience samples are located; , respectively represent the actions executed by the z-th and (z + 1)-th experience samples; represents the reward corresponding to the state-action pair of the z-th experience sample, which is calculated through the reward function.
[0046] Second aspect, an adaptive dynamic task offloading system for an edge computing power network, comprising:
[0047] A DAG module, configured to model a user's computing task to obtain a directed acyclic graph of the computing task, and generate a task execution order sequence according to the topological sorting of tasks in the directed acyclic graph;
[0048] A preprocessing module, configured to encode the features of tasks in the task execution order sequence into high-dimensional vectors, and embed order information using positional encoding to obtain a task matrix;
[0049] A Transformer module, configured to input the task matrix into a trained Transformer model to generate a task-related information sequence;
[0050] A double Q-network module, configured to input the task-related information sequence into a trained double Q-network model to obtain an optimal offloading decision sequence;
[0051] An execution module, configured to perform local computing or edge server offloading on the computing task based on the optimal offloading decision sequence.
[0052] Compared with the prior art, the beneficial effects achieved by the present invention are:
[0053] The present invention provides an adaptive dynamic task offloading method and system for an edge computing power network. This method accurately models task dependencies through a Transformer model and uses a double deep Q-network to generate an optimal offloading decision sequence, thereby achieving efficient, low-latency, and low-energy-consuming task scheduling optimization and improving task offloading efficiency.
[0054] Through the multi-head attention mechanism layer of the Transformer model encoder of the present invention, long-distance dependencies between complex tasks are accurately captured, solving the problems of large computational overhead and difficulty in handling high-concurrency scenarios of traditional LSTM models, and significantly improving the global optimization ability of task scheduling.
[0055] When the Transformer model of the present invention is processed, a hybrid model parallel method is adopted, combining tensor parallelism and sequence parallelism strategies to optimize the resource allocation of computationally intensive and memory-intensive modules, reduce computational latency and memory access overhead, improve the throughput and resource utilization rate of edge devices, and have lower offloading energy consumption.
[0056] Through the main-target network separation mechanism of the double Q-network of the present invention, the problem of overestimation of Q values is effectively reduced, and the experience replay priority is dynamically adjusted in combination with the freshness factor, improving the stability of policy training and sample utilization rate, and avoiding policy deviation.
[0057] The present invention ensures the efficient utilization of edge computing resources by dynamically adjusting the task allocation ratio.
[0058] The present invention improves the parallel computing ability through Transformer task dependency modeling, optimizes the high-concurrency task scheduling by combining hybrid model parallelism (HMP), and adopts a dual deep Q-network model dynamic offloading strategy to adapt to resource fluctuations. Its heuristic load distribution mechanism can adaptively adjust the task allocation according to the computing node status, improve resource utilization rate, optimize QoS while reducing task latency and energy consumption, and meet the high-concurrency requirements of edge computing. Brief Description of the Drawings
[0059] Figure 1 The following shows a schematic flowchart of an adaptive dynamic task offloading method for an edge computing power network in an embodiment of the present invention;
[0060] Figure 2 The following shows a schematic flowchart of the training process of a dual Q-network model in an embodiment of the present invention;
[0061] Figure 3 The following shows a DAG schematic diagram of different topology types in an embodiment of the present invention;
[0062] Figure 4 The following shows a schematic diagram of the delay comparison of different algorithms under different task numbers in an embodiment of the present invention;
[0063] Figure 5 The following shows a schematic diagram of the energy consumption comparison of different algorithms under different task numbers in an embodiment of the present invention;
[0064] Figure 6 The following shows a schematic diagram of the QoS comparison of different algorithms under different task numbers in an embodiment of the present invention;
[0065] Figure 7 The following shows a schematic diagram of the delay comparison of different algorithms under different data transmission rates in an embodiment of the present invention;
[0066] Figure 8 The following shows a schematic diagram of the energy consumption comparison of different algorithms under different data transmission rates in an embodiment of the present invention;
[0067] Figure 9 The following shows a schematic diagram of the QoS comparison of different algorithms under different data transmission rates in an embodiment of the present invention. Detailed Embodiments
[0068] The present invention will be further described below with reference to the drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the protection scope of the present invention.
[0069] Example 1
[0070] As Figure 1 shown, this embodiment of the present invention introduces an adaptive dynamic task offloading method for an edge computing power network, including the following steps:
[0071] S1: Model the user's computing tasks to obtain a directed acyclic graph of the computing tasks, and generate a task execution order sequence according to the topological sorting of the tasks in the directed acyclic graph;
[0072] S2: Encode the features of the tasks in the task execution order sequence into high-dimensional vectors, and embed the order information using positional encoding to obtain a task matrix;
[0073] S3: Input the task matrix into the trained Transformer model to generate a task-related information sequence;
[0074] S4: Input the task-related information sequence into the trained double Q-network model to obtain an optimal offloading decision sequence;
[0075] S5: Based on the optimal offloading decision sequence, perform local computing or edge server offloading on the computing tasks.
[0076] The adaptive dynamic task offloading method for an edge computing power network provided in this embodiment accurately models the task dependency relationship through the Transformer model, and uses the double deep Q-network to generate an optimal offloading decision sequence, thereby realizing efficient, low-latency, and low-power consumption task scheduling optimization and improving the task offloading efficiency.
[0077] In this embodiment, step S1 models the user's computing tasks to obtain a directed acyclic graph of the computing tasks, and generates a task execution order sequence according to the topological sorting of the tasks in the directed acyclic graph, including:
[0078] Based on the computing tasks submitted by the user, generate a directed acyclic graph G=(U, L), where U represents the task sequence, , and L represents the dependency relationship between tasks in the task sequence;
[0079] Dynamically generate task priorities according to the topological sorting in the directed acyclic graph;
[0080] Based on the task priorities, the task execution order sequence;
[0081] In this embodiment, step S2 encodes the features of the tasks in the task execution order sequence into high-dimensional vectors, and embeds the order information using positional encoding to obtain a task matrix, including:
[0082] Encode task characteristics (computing requirements, data volume, predecessor / successor tasks) into high-dimensional vectors;
[0083] Use positional encoding to embed order information into the task execution order sequence. Utilize the sine-cosine function to add the high-dimensional vector and the positional encoding to generate the task matrix X, which is the input sequence of the Transformer model;
[0084] Among them, the sine-cosine function
[0085]
[0086] In the formula, represents the i-th task
[0087] For the encoding at even indices, use the sine function;
[0088] represents the i-th task For the encoding at odd indices, use the cosine function. represents the feature dimension index, represents the total dimension of the high-dimensional vector, and 10000 represents the size of the scaling factor, so that the encodings of different dimensions have different frequencies.
[0089] In this embodiment, in step 3, input the task matrix into the trained Transformer model to generate a task-related information sequence, including:
[0090] Input the task matrix into the encoder of the trained Transformer model to extract the high-dimensional feature representation of the task;
[0091] Input the high-dimensional feature representation of the task into the decoder of the trained Transformer model to obtain the task-related information sequence;
[0092] The task-related information sequence includes the computing requirements, dependency relationships, and global context information of multiple tasks.
[0093] Among them, the Transformer model includes an encoder and a decoder connected in sequence;
[0094] The encoder includes multiple encoding layers connected in sequence. The encoding layer includes a multi-head attention mechanism layer and a feed-forward fully connected layer; both the multi-head attention mechanism layer and the feed-forward fully connected layer are followed by a residual connection and a normalization layer;
[0095] The decoder includes multiple decoding layers connected in sequence. Each decoding layer includes a masked multi-head attention mechanism layer, an encoder-decoder attention layer, and a feed-forward fully-connected layer. Residual connections and normalization layers are provided after the masked multi-head attention mechanism layer, the encoder-decoder attention layer, and the feed-forward fully-connected layer. The encoder-decoder attention layer is used to capture the dependency relationship between the output sequence of the decoding layer and the output sequence of the encoding layer.
[0096] As can be seen from the above, the encoding layer includes a multi-head attention mechanism layer, a normalization layer, a feed-forward fully-connected layer, and a normalization layer connected in sequence, and residual links are provided before each normalization layer; the decoding layer includes a masked multi-head attention mechanism layer, a normalization layer, an encoder-decoder attention layer, a normalization layer, a feed-forward fully-connected layer, and a normalization layer connected in sequence, and residual links are provided before each normalization layer.
[0097] Specifically, the processing flow of the encoding layer is as follows:
[0098] The multi-head attention mechanism layer includes multiple parallel single-head attention mechanism layers;
[0099] For the processing process of the single-head attention mechanism layer, it includes:
[0100] For the input task matrix X, queries , keys , and values matrices are generated through linear transformation:
[0101]
[0102] where represent the weight matrices of queries , keys , and values respectively.
[0103] The queries and keys are subjected to scaled dot-product calculation to generate attention weights , which is the output of the single-head attention mechanism layer, to capture the correlation between tasks. The formula is as follows:
[0104]
[0105] where represents the dot product of queries and keys, which is used to calculate the similarity between tasks; is the scaling factor to prevent the dot product value from being too large; softmax is for normalization processing. After these weights are normalized by softmax, they determine the degree of attention of the model to different tasks.
[0106] Based on the output process of the above single-head attention mechanism layer, the outputs of all attention heads are concatenated and linearly transformed to generate the final output of the multi-head attention:
[0107]
[0108] Among them, is the output of the first single-head attention mechanism layer, obtained through the above calculation process; h represents the total number of single-head attention mechanism layers; is the trainable weight matrix for linear transformation; Concat represents merging the outputs;
[0109] The output of the multi-head attention mechanism layer is residual-connected to the original input and layer-normalized to obtain the output result of the normalization layer behind the multi-head attention mechanism layer :
[0110]
[0111] Among them, represents the layer normalization operation;
[0112] Feed into the feed-forward fully-connected layer to further extract features, obtaining the output result of the feed-forward fully-connected layer :
[0113]
[0114] Among them, are all trainable weight matrices; are all bias vectors, is the activation function;
[0115] For the output of the feed-forward fully-connected layer, perform residual connection and layer normalization again to obtain the output of the encoding layer : [[ID=5�]]
[0116]
[0117]
[0118] This series of operations enables the model to extract task features while maintaining gradient stability and training efficiency. Residual connections help with the direct transmission of information and prevent the vanishing gradient, while layer normalization helps alleviate internal covariate shift and accelerate model convergence.
[0119] Specifically, the processing flow of the decoding layer is as follows:
[0120] Take the output of the encoding layer as the input of the decoding layer for self-attention calculation to capture the dependencies within the output of the encoding layer. The calculation process is similar to the multi-head attention mechanism layer of the encoding layer, and then perform residual connection and layer normalization:
[0121]
[0122]
[0123] Among them, is the input of the decoding layer, that is, ; is the output of the masked multi-head attention mechanism layer; is the output of the normalization layer after the masked multi-head attention mechanism layer;
[0124] Take the output of the encoding layer as the key and value, and the output of the self-attention of the decoding layer as the query to calculate the attention to capture the dependencies between the decoder sequence and the encoder sequence:
[0125]
[0126] Among them,
[0127] is the output of the encoder-decoder attention layer; represents the output of the encoding layer, that is, ;
[0128] is the result of the output of the normalization layer after the encoder-decoder attention layer;
[0129] The decoding layer also applies a feed-forward fully connected layer and corresponding residual connection and layer normalization to obtain the output result of the decoding layer :
[0130]
[0131]
[0132] Among them, is the result of the output of the feed-forward fully connected layer in the decoding layer;
[0133] In this embodiment, the Transformer model uses a hybrid model parallel method during processing, uses a tensor parallel processing method in the multi-head attention mechanism layer, and uses a pipeline parallel processing method in the residual connection and normalization layer;
[0134] Specifically, the core idea of the hybrid model HMP (Hybrid Model Parallelism) is to flexibly apply the tensor parallelism (TP) and pipeline parallelism (SP) strategies according to the different module characteristics of the Transformer. For the part with a heavy computational load in the multi-head attention mechanism layer, the resource manager uses TP to split large-scale matrix operations into multiple computing nodes for parallel processing, thereby dispersing the computational pressure and improving the throughput. During the inference process of large-batch and multi-dimensional tasks, the acceleration effect of TP on matrix multiplication and vector calculation is particularly significant, especially in the multi-task concurrent scenario, where its performance advantage is more prominent. At the same time, for operations with relatively small computational volume but high memory access frequency, such as Layer Norm and residual addition in the Transformer, the resource manager adopts the SP strategy. In SP, tasks on multiple sequence dimensions are parallelly assigned to different devices for calculation, reducing the overhead of global data synchronization and large-scale data transfer. In this way, SP can significantly reduce the consumption of memory bandwidth while accelerating the inference process of the model. In large-scale Transformer inference, TP and SP cooperate with each other to make targeted optimizations for large-scale operations and frequent memory accesses respectively.
[0135] In this embodiment, step S4 inputs the task-related information sequence into the trained double Q-network model to obtain the optimal offloading decision sequence, where as Figure 2 shown, the training process of the double Q-network model includes:
[0136] S41: Construct a double deep Q-network model;
[0137] The construction process includes: based on the Markov decision process, defining the expressions of the state space S, action space A, and reward function R; defining the input layer, hidden layer, and output layer of the main network and target network in the double deep Q-network model; the main network is used to predict the Q value of the current state, and the target network is used to calculate the target Q value;
[0138] Specifically, the task offloading problem is modeled as a Markov decision process (MDP). In this MDP framework, the state space describes the state of the system at any moment, including the dependency information of tasks and the offloading decisions already made. The action space defines the offloading choices that can be executed in each state, and the reward function is used to evaluate the quality of each decision, guiding the policy to evolve towards the optimization goal;
[0139] Define the expressions of the state space S, action space A, and reward function R as follows:
[0140] State space S:
[0141] ;
[0142] Among them, Z0 represents the task-related information sequence input to the dual deep Q-network model; represents the execution action sequence up to the i-th task ; represents the state of the i-th task ;
[0143] Action space A:
[0144] ;
[0145] Among them, represents the execution action of the i-th task. When it means that the i-th task is executed locally. When it means that the i-th task is offloaded to the edge server for execution; represents the total number of tasks in the task-related information sequence of the input dual deep Q-network model.
[0146] Reward function R:
[0147] ;
[0148] Among them, and represent the weight coefficients of delay and energy consumption in the global state, satisfying ; represents the average execution time of all tasks executed locally; represents the completion time of the i-th task where the i-th task is executed locally or offloaded to the edge server for execution; represents the total execution time of all tasks executed locally; represents the average execution energy consumption of all tasks executed locally, represents the execution energy consumption of the i-th task; represents the total energy consumption of all tasks executed locally.
[0149] S42: Obtain the historical task-related information sequence;
[0150] The historical task-related information sequence is generated by the Transformer model;
[0151] S43: Use the historical task-related information sequence as the training set and input it into the main network for training. Update the parameters of the main network by minimizing the Huber loss function between the Q-value of the current state and the target Q-value;
[0152] Specifically, the calculation formula for the target Q-value is as follows:
[0153] ;
[0154] Where, represents the target Q-value of the state-action pair corresponding to the i-th task; represents the reward of the state-action pair corresponding to the i-th task, which is calculated through the reward function; represents the discount factor, represents the parameters of the main network, represents the parameters of the target network; represents the (i + 1)-th task in the state; represents the (i + 1)-th task in the optimal action of the state; represents the (i + 1)-th task in the optimal Q-value of the state. Specifically, the training objective of the double deep Q-network is to minimize the TD error (temporal difference error), that is, to make the Q-value predicted by the main network as close as possible to the target Q-value, so as to optimize the task offloading decision.
[0155]
[0156] Where, is the loss function of the main network, is the importance sampling weight, that is, the initial weight of the i-th task; represents the predicted Q-value of the state-action pair corresponding to the i-th task; is the Huber loss function:
[0157]
[0158] Where, represents , is a hyperparameter that controls the transition range of the loss function
[0159] S44: Copy the parameters of the updated main network to the target network to obtain the trained double deep Q-network model.
[0160] Specifically, when using the historical task-related information sequence as the training set and inputting it into the main network for training, a prioritized experience replay mechanism is adopted. This mechanism calculates the priority of each experience sample in the training set by combining the TD error and the freshness factor, obtains the sampling probability of the experience sample based on the priority, and obtains the weight of each experience sample through the sampling probability.
[0161] Where the experience sample is the task in the training set;
[0162] The weight formula of the experience sample is expressed as:
[0163] ;
[0164] ;
[0165] ;
[0166] ;
[0167] ;
[0168] Among them, represents the weight of the z-th experience sample; represents the initial weight of the u-th experience sample, and it is the maximum value among all sample weights; represents the initial weight of the z-th experience sample; N represents the total number of experience samples in the training set; represents the influence degree of controlling the initial weight; represents the sampling probability of the z-th experience sample; represents the priority of the z-th experience sample; represents the sum of the priorities of all experience samples, and k is the number of sequences; represents the TD error of the z-th experience sample; * represents a constant to prevent the priority from being zero; represents the importance degree of controlling the priority; represents the freshness factor of the z-th experience sample, represents the number of times the z-th experience sample is sampled; represents the Q value of the main network under the state-action pair of the z-th experience sample; represents the Q value of the target network under the state-action pair of the (z + 1)-th experience sample; respectively represent the states where the z-th and (z + 1)-th experience samples are located; , respectively represent the actions executed by the z-th and (z + 1)-th experience samples; It represents the reward corresponding to the state-action pair of the z-th experience sample, which is calculated through the reward function.
[0169] After each training step is completed, it is necessary to dynamically adjust the priority of the experience according to the new TD error and the freshness factor of the sample. The purpose of doing this is to ensure that newly generated important experiences can be sampled more quickly, while reducing the dependence on repeatedly used samples, thereby improving the training efficiency and the stability of the model. By updating the priority in real time, the experience replay mechanism can dynamically reflect the change in the importance of the sample, avoid the excessive interference of old samples on the training process, and ensure the model's rapid adaptation to the latest data.
[0170] In this embodiment, during the training of the double Q network, a greedy strategy is also adopted, and different exploration probabilities are assigned in different training stages to ensure that the model can fully explore in the early stage and focus on the optimization of the optimal strategy in the later stage:
[0171]
[0172] Among them, represents the execution action of the z-th task (experience sample), represents the optimal action of the state where the z-th task is located;
[0173] In the exploration stage, with probability a random action is selected to try new offloading strategies to prevent getting stuck in local optima; in the exploitation stage, with probability the action corresponding to the current optimal Q value is selected;
[0174] Specifically, a larger is used for exploration at the initial stage of training, and is gradually reduced in the later stage of training to make more use of the learned strategies, The formula expression of
[0175]
[0176] Among them, k* is the decay coefficient, which controls the rate of decline; T* is the training time; represents the lowest exploration probability. This dynamic adjustment strategy enables the improved double Q network model to dynamically adapt to task requirements at different training stages and achieve more efficient policy optimization.
[0177] In this embodiment, step S5 is based on the optimal offloading decision sequence to perform local computing or edge server offloading on the computing tasks. When performing edge server offloading on the computing tasks, a heuristic load distribution strategy is adopted to dynamically adjust the task allocation ratio to ensure the efficient utilization of edge computing resources. The task allocation ratio is calculated according to the following formula:
[0178] ;
[0179] where, represents the allocation ratio of the task on the j-th edge server in the edge computing power network, and j represents the sequence number of the edge servers; represents the available computing resources on the j-th edge server, and M represents the total number of edge servers in the edge computing power network.
[0180] In this embodiment, after the user's computing task is completed, feedback can be made according to the QoS metrics to adjust the weight coefficients of latency and energy consumption and , which are used for the execution of the next batch of tasks. By adjusting the magnitudes of these two parameters, the requirements for different application scenarios (reducing latency or lowering energy consumption) can be adapted. If latency is sensitive, increase ; if energy consumption is sensitive, increase ;
[0181] Specifically, the QoS metrics are expressed as follows:
[0182]
[0183]
[0184]
[0185]
[0186] where, , are the total latency and total energy consumption respectively; respectively represent the completion time of the i-th task executed locally and the completion time of the i-th task offloaded to the edge device; represents the completion time on the edge server when the i-th task needs to perform edge offloading; represents the data volume size of the i-th task; represents the transmission rate for receiving the return result; represents the total energy consumption of all tasks executed on the edge server.
[0187] Embodiment 2
[0188] Based on the adaptive dynamic task offloading method for edge computing power networks mentioned in Embodiment 1, in this embodiment, the proposed adaptive dynamic task offloading method of the present invention is compared with seven existing algorithms to comprehensively analyze the performance of the method of the present invention in various performance indicators, so as to verify its superiority and practical application value;
[0189] (I) Experimental settings
[0190] The operating system of the hardware device used in the experimental environment is Ubuntu 20.10, the memory of the hardware device is 32GB, and the processor of the hardware device is an Iintel Xeon Platiinum 8163 CPU@2.50GHz. In the MEC environment, user applications can be abstracted as DAGs (Directed Acyclic Graphs) of different topological types, which are used to describe the dependencies between tasks. For example, as Figure 3 shown, data compression applications often exhibit an approximately linear dependency structure, while the dependency structures of applications such as intelligent monitoring systems are more complex (fork dependencies or network dependencies). Since the currently publicly available real mobile application datasets only contain task configuration information of a small number of applications and are difficult to meet the large-scale and diverse training needs; for this reason, the simulation data we used consists of a set of DAGs representing different implementations and is generated using a simulator. The number of tasks in each DAG is set to {10, 15, 20, 25, 30, 35, 40, 45, 50}, and the data size of a single task is defined as [5, 50]KB.
[0191] In the simulation experiment, the transmission rate between the user equipment (UE) and the edge server (MEC host) varies with the distance between the UE and the MEC host. Specifically, the set of transmission rates is set to {3 Mbps, 7 Mbps, 11 Mbps, 15 Mbps, 19 Mbps}, covering most cell areas from the far end to the near end. In terms of the energy consumption model, the power coefficient is taken as and the exponential parameter is set to 3. The local CPU clock frequency of the UE is 1 GHz; the total computing power of the edge server is set to 10 GHz to support parallel processing of multiple users and multiple tasks. The power during sending and receiving is set to and respectively;
[0192] To verify the performance of the method of the present invention, we designed a decision network model for task offloading based on the Transformer architecture. The encoder adopts a two-sided encoding layer structure and is implemented through TensorFlow. Each layer contains eight multi-head attentions and a feed-forward network, and residual connections and layer normalization are used to ensure the stable training of the network. The decoder also contains two-layer structures. The experimental goal is to jointly optimize latency and energy consumption, so we set λt = λe = 0.5.
[0193] (II) Comparative algorithms and experimental metrics
[0194] To verify the efficiency of the proposed method of the present invention, six typical computational offloading algorithms and an algorithm based on DDQN (Double Deep Q-Network) were compared and analyzed. Among them, the six typical computational offloading algorithms are: full local execution, full offloading execution, random scheduling algorithm, cyclic scheduling algorithm, greedy algorithm, and earliest completion time algorithm.
[0195] The simulation experiment of this embodiment mainly considers two application scenarios. One is the workload, that is, different numbers of offloading tasks; the other is the influence of the wireless network, that is, different data transmission rates. The performance of the method of the present invention is evaluated through multiple key metrics and compared with other offloading methods. The key metrics are as follows:
[0196] Task completion latency: It is used to measure the total time required for all tasks to complete, that is, the completion time of the exit task in the DAG, in milliseconds (ms), reflecting the computational time overhead. This metric can intuitively show the efficiency of different offloading strategies in computational task scheduling, especially in high-load and multi-task environments, and compare the performance of each algorithm in reducing task waiting time and optimizing the execution order;
[0197] System energy consumption: It measures the total energy consumption when computational tasks are executed locally and offloaded to the MEC server, including local computational energy consumption, task transmission energy consumption, and result return energy consumption, in joules (J), and evaluates the optimization ability of different methods in energy conservation. Since the computational resources in the edge computing environment are limited, optimizing energy consumption is crucial for improving the sustainability of the system. Therefore, this study focuses on how the offloading strategy can intelligently allocate computational tasks among different computational nodes to minimize power consumption and improve the battery life of the device, especially in mobile devices or resource-constrained environments.
[0198] The QoS comprehensive performance metric is used to measure the overall optimization effect of the offloading strategy, comprehensively considering the balance between latency and energy consumption, and ensuring that the system can provide the optimal computational offloading solution in different application scenarios.
[0199] (III) Performance performance
[0200] 3.1 Experimental Results under Different Task Numbers:
[0201] In this embodiment, the performance of the offloading algorithm under different task numbers is studied, and the delay, energy consumption, and QoS metrics are evaluated. In the experiment, the data transmission rate is fixed at 7 Mbps, and the number of tasks is set to {10, 15, 20, 25, 30, 35, 40, 45, 50} to simulate a multi-task offloading scenario and analyze the performance of each algorithm. The experimental results are as Figure 4 , Figure 5 and Figure 6 shown, respectively showing the delay, energy consumption, and QoS performance of 8 algorithms under different task numbers. In the figure, All local execution, All Remote execution, Random scheduling algorithm, Greedy algorithm, Round-robin scheduling algorithm, Earliest completion time algorithm, DDQN-based algorithm;
[0202] From Figure 4 and Figure 5 , it can be seen that when the number of tasks increases significantly, the computing power of the terminal device gradually becomes insufficient, resulting in a significant increase in delay and energy consumption. It can be seen that the DDQN-based algorithm and the All Remote execution method have similar energy consumption performance and can both maintain a low level, but the delay cost is relatively high. Especially when the number of tasks reaches 50, the delay is significantly higher than that of other optimization algorithms. This is because the DDQN-based algorithm fails to fully model the long-distance dependencies between tasks, limiting its efficiency in balancing delay and energy consumption. The delay and energy consumption performance of the Random scheduling algorithm is similar to that of the Round-robin scheduling algorithm. Its energy consumption remains at a medium level, but the delay is still relatively high. Although the Greedy algorithm and the Earliest completion time algorithm perform better in delay optimization, their energy consumption increases significantly, second only to the All local execution method. In contrast, the method of the present invention performs particularly well in terms of delay and energy consumption optimization. The experimental results show that in a high-task load scenario, the increase in delay of the method of the present invention is significantly lower than that of other algorithms, and the energy consumption remains at a low level. This advantage further verifies its effectiveness in task dependency modeling and dynamic resource allocation optimization, making it show excellent performance advantages in the multi-task offloading scenario.
[0203] From Figure 6It can be seen that the QoS value of local execution is always zero because all local executions are used as the baseline algorithm for evaluating QoS. In contrast, the method of the present invention exhibits excellent QoS in multi-task scenarios. Especially when the number of tasks increases to 50, it can still maintain a high level, significantly outperforming other optimization methods and traditional methods. Compared with the full offloading method, the method of the present invention accurately models task dependencies through the multi-head attention mechanism of the Transformer and combines the HMP technology to optimize the allocation of computing and memory resources, achieving a better balance between latency and energy consumption, thus approaching or even exceeding the full offloading method in QoS in some scenarios. Compared with the DDQN-based algorithm, the method of the present invention shows significant advantages in capturing task dependencies and optimizing dynamic resource allocation. Although DDQN can reduce energy consumption to a certain extent, due to its failure to fully model the long-distance dependencies between tasks, its QoS performance is significantly inferior to that of the method of the present invention. Especially when the number of tasks increases, its QoS growth stagnates and it is difficult to handle complex scenarios under high task loads. At the same time, the method of the present invention shows strong stability and robustness when the task load increases. Although other optimization methods such as the greedy algorithm and the earliest completion time algorithm perform moderately, they are gradually outperformed by the method of the present invention under high loads. In contrast, traditional methods such as the random scheduling algorithm and the round-robin scheduling algorithm have poor QoS performance due to the lack of task dependency modeling and resource optimization. Generally speaking, the method of the present invention provides an efficient and stable solution for task offloading in the edge computing environment by deeply optimizing task dependency modeling and dynamic resource allocation, demonstrating excellent comprehensive performance advantages.
[0204] .3.2 Experimental Results at Different Data Transfer Rates:
[0205] In this embodiment, by setting the data transfer rates as {3 Mbps, 7 Mbps, 11 Mbps, 15 Mbps, 19 Mbps} and setting the number of tasks to 15, a comprehensive evaluation of latency, energy consumption, and QoS was carried out at different data transfer rates, as Figure 7 、 Figure 8 and Figure 9 shown;
[0206] From Figure 7It can be seen that for the local execution method, its latency value always remains constant because all tasks are completed locally, and the latency is entirely determined by the computing time of the local device. For other algorithms involving task offloading, their latency decreases significantly as the data transmission rate increases, mainly due to the fact that a higher transmission rate shortens the data transmission time. When the transmission rate is {3 Mbps, 7 Mbps}, the latency of the offloading algorithm is relatively high, showing a significant transmission bottleneck. When the rate exceeds 11 Mbps, the latency tends to stabilize and reach the lowest value. At all transmission rates, the latency of the method of the present invention is always lower than that of other offloading algorithms, especially in the low-rate (3 Mbps and 7 Mbps) scenarios, which fully demonstrates its ability to optimize task offloading in bandwidth-constrained environments. In contrast, the algorithm based on DDQN also performs worse than the method of the present invention in terms of latency. Although the greedy algorithm and the earliest completion time algorithm perform similarly to the method of the present invention at some rates, their overall performance is still inferior to that of the present invention.
[0207] From Figure 8 It can be seen that the energy consumption of the local execution method is always the highest because all tasks are completed locally, resulting in a huge consumption of device resources and being unaffected by the transmission rate. The energy consumption of all offloading algorithms is significantly lower than that of local execution and further decreases as the data transmission rate increases. This is because a higher transmission rate effectively shortens the transmission time, thereby reducing the energy consumption. In the low-rate (3 Mbps and 7 Mbps) scenarios, the energy consumption of the method of the present invention is significantly lower than that of the greedy algorithm and the earliest completion time algorithm, and is close to that of the algorithm based on DDQN. In the high transmission rate scenarios (15 Mbps and above), the energy consumption of the method of the present invention remains stable, reflecting the efficiency of its resource allocation strategy. In addition, the energy consumption performance of the random scheduling algorithm and the round-robin scheduling algorithm is similar, but both are higher than that of the method of the present invention, while the energy consumption of the greedy algorithm and the earliest completion time algorithm is relatively high.
[0208] From Figure 9It can be seen that with the increase in data transmission rate, the QoS of all algorithms except the local execution method increases significantly. This is mainly due to the fact that the higher transmission rate reduces the data transmission time, thereby optimizing latency and energy consumption and improving the quality of service. For the local execution method, the QoS is always zero because the task is completely completed locally and the quality of service cannot be improved by optimizing transmission. The QoS performance of the method of the present invention is better than that of other algorithms at all transmission rates. Especially in the low-rate (3 Mbps and 7 Mbps) scenarios, its QoS is significantly higher than that of other algorithms, demonstrating its optimization advantage under bandwidth-constrained conditions. In the medium- and high-rate (7 Mbps and above) scenarios, the QoS value of the method of the present invention continues to increase and reaches the optimal value at a rate of 15 Mbps and above, showing excellent robustness and adaptability. In contrast, although the DDQN-based algorithm is close to the method of the present invention in terms of QoS, its performance is slightly inferior in the low-rate scenarios. The QoS of other heuristic methods (such as the greedy algorithm and the earliest completion time algorithm) is significantly lower than that of the method of the present invention at low rates. Although it improves at high transmission rates, there is still a gap in the overall effect. In addition, the QoS performances of the random scheduling algorithm and the round-robin scheduling algorithm are similar, but both are lower than that of the method of the present invention at all transmission rates. This further indicates that due to the lack of optimization capabilities for task dependency modeling and dynamic resource allocation, these algorithms are difficult to achieve a high quality of service.
[0209] In summary, the method of the present invention demonstrates excellent performance in optimizing complex dependent task offloading and is superior to the comparative methods in multiple key metrics. In the experiments with different numbers of tasks, due to its efficient task scheduling ability, the method of the present invention can still maintain low latency and energy consumption even when the task load increases. Compared with DDQN, the greedy algorithm, and the earliest completion time algorithm, the method of the present invention not only optimizes the utilization rate of computing resources but also effectively avoids the task dependence bottleneck, ensuring the efficiency of task scheduling. Especially in the case of high task load (50 tasks), the increase in task completion time is significantly lower than that of other methods, showing strong scalability and adaptability. In addition, in the experiments with different data transmission rates, the method of the present invention still shows extremely strong adaptability. Even in a low-rate (3 Mbps) environment, it can still maintain stable performance. Compared with traditional rule-based offloading methods, through the global task dependence modeling of Transformer and the optimization of computing and memory resource allocation by the HMP technology, the method of the present invention can still reduce the latency of task offloading in a bandwidth-limited scenario while balancing the resource load among computing nodes to ensure the robustness of the system. From the overall QoS evaluation, the method of the present invention maintains a high QoS level under different task scales and transmission rate conditions, which is superior to DDQN and other optimization methods. Its advantages mainly stem from the global task dependence modeling ability of Transformer and the reinforcement learning strategy based on the improved DDQN, enabling it to quickly converge to the optimal decision in a dynamic environment. At the same time, the method of the present invention adopts an improved task allocation strategy, combined with heuristic proportional load distribution, to further optimize the computing resource scheduling and ensure the stability and efficiency of task offloading decisions. In summary, the method of the present invention shows obvious advantages in task scheduling optimization, resource utilization improvement, latency and energy consumption balance, etc., making it a very promising edge computing offloading solution in a complex task dependence environment. These experimental results further verify the practical application value of the method of the present invention in multi-user and multi-task offloading scenarios and provide solid theoretical and experimental support for future intelligent computing offloading optimization.
[0210] Example 3
[0211] This embodiment provides an adaptive dynamic task offloading system for an edge computing power network, including:
[0212] A DAG module, configured to model the computing tasks of a user to obtain a directed acyclic graph of the computing tasks, and generate a task execution order sequence according to the topological sorting of the tasks in the directed acyclic graph;
[0213] A preprocessing module, configured to encode the features of the tasks in the task execution order sequence into high-dimensional vectors and embed the order information using positional encoding to obtain a task matrix;
[0214] The Transformer module is used to input the task matrix into the trained Transformer model to generate a high-dimensional embedding representation of the task, that is, the task-related information sequence;
[0215] The double Q-network module is used to input the task-related information sequence into the trained double Q-network model and maximize the cumulative reward based on the Markov decision process to generate an optimal offloading decision sequence;
[0216] The execution module is used to perform local computing or edge server offloading on the computing task based on the optimal offloading decision sequence.
[0217] Embodiment 4
[0218] This embodiment provides a computer-readable storage medium storing a computer program, and when the computer program is executed, it implements the adaptive dynamic task offloading method for the edge computing power network described in Claim Embodiment 1.
[0219] Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0220] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate for implementing in the process Figure 1 a process or multiple processes and / or blocks Figure 1 a device for the functions specified in one or more blocks.
[0221] These computer program instructions can also be stored in a computer-readable memory capable of guiding a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured product including an instruction device, and the instruction device implements in the process Figure 1 a process or multiple processes and / or blocks Figure 1 a device for the functions specified in one or more blocks.
[0222] The embodiments of the present invention have been described above in conjunction with the accompanying drawings. However, the present invention is not limited to the above specific embodiments. The above specific embodiments are merely illustrative rather than restrictive. Under the inspiration of the present invention, those of ordinary skill in the art can also make many forms without departing from the spirit of the present invention and the scope protected by the claims. All of these fall within the protection scope of the present invention.
Claims
1. An adaptive dynamic task offloading method for an edge computing power network, characterized in that Including: Model the user's computing tasks to obtain a directed acyclic graph of the computing tasks, and generate a task execution order sequence according to the topological sorting of the tasks in the directed acyclic graph; Encode the features of the tasks in the task execution order sequence into high-dimensional vectors, and embed the order information using positional encoding to obtain a task matrix; Input the task matrix into the trained Transformer model to generate a task-related information sequence; Input the task-related information sequence into the trained double Q-network model to obtain an optimal offloading decision sequence; Based on the optimal offloading decision sequence, perform local computing or edge server offloading on the computing tasks.
2. The adaptive dynamic task offloading method for an edge computing power network according to claim 1, wherein When performing edge server offloading on the computing tasks based on the optimal offloading decision sequence, adopt a heuristic load distribution strategy to dynamically adjust the task allocation ratio offloaded to the edge server, and perform offloading based on the adjusted task allocation ratio. The task allocation ratio is calculated according to the following formula: ; Among them, represents the allocation ratio of the task on the j-th edge server in the edge computing power network, where j represents the serial number of the edge server; represents the available computing resources on the j-th edge server, and M represents the total number of edge servers in the edge computing power network.
3. The adaptive dynamic task offloading method for an edge computing power network according to claim 1, characterized in that The step of inputting the task matrix into the trained Transformer model to obtain a task-related information sequence includes: Input the task matrix into the encoder of the trained Transformer model to extract the high-dimensional feature representation of the tasks; Input the high-dimensional feature representation of the tasks into the decoder of the trained Transformer model to obtain a task-related information sequence; The task-related information sequence includes the computing requirements, dependency relationships, and global context information of multiple tasks.
4. The adaptive dynamic task offloading method for an edge computing power network according to claim 3, wherein When the Transformer model is processed, a hybrid model parallel strategy is adopted. The hybrid model parallel strategy includes a tensor parallel strategy and a pipeline parallel strategy; the tensor parallel strategy is used in the multi-head attention mechanism layer of the encoder, and the pipeline parallel strategy is used in the residual connection and normalization layers of the encoder and decoder.
5. The adaptive dynamic task offloading method for an edge computing power network according to claim 1, wherein The training process of the double Q-network model includes: Construct a double deep Q-network model; the construction process includes: based on the Markov decision process, define the expressions of the state space S, action space A, and reward function R; define the input layer, hidden layer, and output layer of the main network and target network in the double deep Q-network model; the main network is used to predict the Q value of the current state, and the target network is used to calculate the target Q value; Obtain the historical task-related information sequence, which is generated by the Transformer model; Use the historical task-related information sequence as a training set and input it into the main network for training. Update the parameters of the main network by minimizing the Huber loss function between the Q value of the current state and the target Q value; Copy the parameters of the updated main network to the target network to obtain the trained double deep Q-network model.
6. The adaptive dynamic task offloading method for an edge computing power network according to claim 5, wherein Based on the Markov decision process, the expressions of the state space S, action space A, and reward function R are defined as follows: State space S: ; Among them, Z0 represents the task-related information sequence input to the dual deep Q-network model; represents the sequence of execution actions up to the i-th task ; represents the i-th task in the state; Action space A: ; Among them, represents the execution action of the i-th task When it indicates that the i-th task is executed locally. When it indicates that the i-th task is offloaded to the edge server for execution; represents the total number of tasks in the task-related information sequence input to the double deep Q-network model; Reward function R: ; Among them, and represent the weight coefficients of latency and energy consumption in the global state, satisfying ; represents the average execution time of all tasks executed locally; represents the i-th task 's completion time, where the i-th task is executed locally or offloaded to the edge server for execution; represents the total execution time of all tasks executed locally; represents the average execution energy consumption of all tasks executed locally, represents the execution energy consumption of the i-th task; represents the total energy consumption of all tasks executed locally.
7. The adaptive dynamic task offloading method for an edge computing power network according to claim 6, wherein The calculation formula of the target Q value is expressed as follows: ; Among them, represents the target Q-value of the state-action pair corresponding to the i-th task; represents the reward of the state-action pair corresponding to the i-th task, which is calculated through the reward function; represents the discount factor, represents the parameters of the main network, represents the parameters of the target network; represents the (i + 1)-th task in the state; represents the (i + 1)-th task in the optimal action of the state; represents the (i + 1)-th task in the optimal Q-value of the state.
8. The adaptive dynamic task offloading method for an edge computing power network according to claim 7, wherein During the process of using the historical task-related information sequence as the training set and inputting it into the main network for training, a prioritized experience replay mechanism is adopted. This mechanism calculates the priority of each experience sample in the training set by combining the TD error with the freshness factor, obtains the sampling probability of the experience samples according to the priority, and obtains the weight of each experience sample through the sampling probability.
9. The adaptive dynamic task offloading method for the edge computing power network according to claim 8, wherein The weight formula of the experience sample is expressed as: ; ; ; ; ; Among them, represents the weight of the z-th empirical sample; represents the initial weight of the u-th empirical sample and is the maximum value among all sample weights; represents the initial weight of the z-th empirical sample; N represents the total number of empirical samples in the training set; represents the influence degree of controlling the initial weight; represents the sampling probability of the z-th empirical sample; represents the priority of the z-th empirical sample; represents the total sum of the priorities of all empirical samples, and k is the number of sequences; represents the TD error of the z-th empirical sample; * represents a constant to prevent the priority from being zero; represents the importance degree of controlling the priority; represents the freshness factor of the z-th empirical sample, represents the number of times the z-th empirical sample has been sampled; represents the Q value of the main network under the state-action pair of the z-th empirical sample; represents the Q value of the target network under the state-action pair of the (z + 1)-th empirical sample; respectively represent the states where the z-th and (z + 1)-th empirical samples are located; , respectively represent the actions executed by the z-th and (z + 1)-th empirical samples; represents the reward corresponding to the state-action pair of the z-th empirical sample, which is calculated through the reward function.
10. An adaptive dynamic task offloading system for an edge computing power network, characterized in that, It includes: The DAG module is used to model the user's computing tasks, obtain the directed acyclic graph of the computing tasks, and generate the task execution order sequence according to the topological sorting of the tasks in the directed acyclic graph; The preprocessing module is used to encode the features of the tasks in the task execution order sequence into high-dimensional vectors and embed the order information using positional encoding to obtain the task matrix; The Transformer module is used to input the task matrix into the trained Transformer model to generate the task-related information sequence; The double Q-network module is used to input the task-related information sequence into the trained double Q-network model to obtain the optimal offloading decision sequence; The execution module is used to perform local computing or edge server offloading on the computing tasks based on the optimal offloading decision sequence.
Citation Information
Cited By
Task scheduling optimization method and system of edge system based on reinforcement learning
CN121092295A
Cloud side-end cooperation-based computing power network hierarchical scheduling optimization method and system, and medium
CN121187801A
Dependent task unloading method and device for deep reinforcement learning based on Transform
CN121934916A