A task offloading method and device for a mobile edge computing system
By building joint optimization problems in mobile edge computing systems and using deep reinforcement learning DQN algorithms, the comprehensive optimization problems of mobile device energy consumption, delay and user privacy are solved, and a safer and more efficient task offloading process is achieved.
Patent Information
- Application Number
- CN202210020759.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-10
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2042-01-10
AI Technical Summary
While optimizing energy consumption and delay, mobile edge computing systems have the risk of leakage of user location information and usage mode information, affecting the security of user data.
By obtaining task data of mobile devices, establishing a set of device statuses, and calculating task offload delay, energy consumption and privacy levels, building joint optimization problems with the goal of minimum delay, minimum energy consumption and highest privacy levels, and solving them using the DQN algorithm of deep reinforcement learning.
While reducing the energy consumption and delay of mobile devices, it effectively reduces the risk of leakage of user location information and usage mode information and improves the security of user data.
Smart Images

Figure CN114489977B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of wireless communication technologies, and in particular, to a task offloading method and device for a mobile edge computing system. Background Art
[0002] In recent years, with the emergence of more and more time-critical applications, the computing power and computing resources of local devices have been difficult to meet the time requirements of such applications, and thus the mobile edge computing (MEC) system has emerged. The MEC system can offload a part of the computing tasks to the edge server, thereby reducing the task load and latency of the user on the local device.
[0003] In the MEC system, the most important issues are the device latency and energy consumption during the task offloading process. Most of the existing MEC systems focus on single energy consumption optimization or latency optimization, and some work has considered the joint optimization of energy consumption and latency. However, while the MEC system provides rich computing resources, there is a risk of leakage of the user's location privacy and usage pattern privacy. Summary of the Invention
[0004] The present invention provides a task offloading method and device for a mobile edge computing system, which can effectively reduce the risk of leakage of the user's location information and usage pattern information while reducing the energy consumption and latency of the mobile device, and improve the security of the user data.
[0005] To achieve the above object, an embodiment of the present invention provides a task offloading method for a mobile edge computing system, including:
[0006] Obtaining the task data of each mobile device; wherein, the task data includes: newly generated tasks, obtained energy, channel quality, battery discharge, and tasks in the device buffer;
[0007] Establishing a state set for each mobile device according to the task data of each mobile device;
[0008] Obtaining the task offloading latency of each mobile device according to the computing latency of each mobile device, the transmission latency of each mobile device for offloading the task to the server, the computing latency of the edge server, and the computing latency of the cloud server;
[0009] Obtaining the task offloading energy consumption of each mobile device according to the energy consumption of each mobile device for sending tasks and the energy consumption of the CPU during the computing process;
[0010] Quantifying the user usage pattern and location information of each mobile device to obtain the task offloading privacy level of each mobile device;
[0011] Construct a joint optimization problem with the goal of minimizing latency, minimizing energy consumption, and maximizing privacy level based on the task offloading latency, task offloading energy consumption, task offloading privacy level, and energy change of each mobile device;
[0012] Solve the joint optimization problem based on the DQN algorithm of deep reinforcement learning and the state set of each mobile device to obtain a task offloading method for the mobile edge computing system.
[0013] As an improvement to the above solution, establishing the state set of each mobile device according to the task data of each mobile device specifically includes:
[0014] Establish the state set of each mobile device according to the following formula:
[0015] S m (t) = [A m (t), e m (t), h m (t), B m (t), Q m (t)];
[0016] Among them, S m (t) is the state set of the m-th mobile device at time t, A m (t) is the new task generated by the m-th mobile device at time t, e m (t) is the energy obtained by the m-th mobile device, h m (t) is the channel quality obtained by the m-th mobile device at time t, h m (t) ∈ {0, 1}, h m (t) = 1 indicates good channel quality, h m (t) = 0 indicates poor channel quality, B m (t) is the battery discharge of the m-th mobile device, Q m (t) is the task stored in the device buffer of the m-th mobile device.
[0017] As an improvement to the above solution, obtaining the task offloading latency of each mobile device according to the computing latency of each mobile device, the transmission latency of each mobile device to offload tasks to the server, the computing latency of the edge server, and the computing latency of the cloud server specifically includes:
[0018] Obtain the task offloading latency of each mobile device according to the following formula:
[0019]
[0020] Among them, T m(t) is the task offloading delay of the m-th mobile device, T m,L (t) is the computing delay of the m-th mobile device, T m,O (t) is the transmission delay for the m-th mobile device to offload the task to the edge server or cloud server, T m,MEC (t) is the computing delay of the edge server, T m,Cloud (t) is the computing delay of the cloud server, α m,L (t) indicates whether the task is executed locally, α m,M (t) indicates whether the task is executed on the edge server, α m,C (t) indicates whether the task is executed on the cloud server.
[0021] As an improvement to the above solution, obtaining the task offloading energy consumption of each mobile device according to the energy consumption of each mobile device for sending tasks and the energy consumption of the CPU during the computing process specifically includes:
[0022] Calculating the sum of the energy consumption of each mobile device for sending tasks and the energy consumption of the CPU during the computing process as the task offloading energy consumption of each mobile device.
[0023] As an improvement to the above solution, quantifying the user usage pattern and location information of each mobile device to obtain the task offloading privacy level of each mobile device specifically includes:
[0024] Quantifying the user usage pattern of each mobile device according to the following formula to obtain the user usage privacy level of each mobile device:
[0025]
[0026] where, P m,u (t) is the user usage privacy level of the m-th mobile device, A m (t) is the new task generated by the m-th mobile device at time t, A′ m (t) is the amount of tasks offloaded by the m-th mobile device to this server recorded by the edge server or cloud server, h m (t) is the channel quality obtained by the m-th mobile device at time t, h m (t) = 1 indicates good channel quality, is the indicator function;
[0027] Quantifying the location information of each mobile device according to the following formula to obtain the location privacy level of each mobile device:
[0028]
[0029] where, P m,l(t) is the location privacy level of the m-th mobile device, h m (t) = 0 indicates poor channel quality;
[0030] According to the following formula, the task offloading privacy level of each mobile device is obtained:
[0031] P m (t) = β1P m,u (t) + β2P m,l (t);
[0032] where P m (t) is the task offloading privacy level of the m-th mobile device, β1 is the weight of P m,u (t), and β2 is the weight of P m,l (t).
[0033] As an improvement to the above solution, based on the task offloading delay, task offloading energy consumption, task offloading privacy level, and energy change of each mobile device, a joint optimization problem with the goal of minimizing delay, minimizing energy consumption, and maximizing privacy level is constructed, specifically including:
[0034] Taking the indicator function where the energy change of each mobile device is less than 0 and the unexecuted tasks as two penalty factors, and calculating the total task offloading loss of each mobile device according to the task offloading delay and task offloading energy consumption of each mobile device;
[0035] Based on the total task offloading loss of each mobile device and the task offloading privacy level, a joint optimization problem with the goal of minimizing delay, minimizing energy consumption, and maximizing privacy level is constructed.
[0036] As an improvement to the above solution, taking the indicator function where the energy change of each mobile device is less than 0 and the unexecuted tasks as two penalty factors, and calculating the total task offloading loss of each mobile device according to the task offloading delay and task offloading energy consumption of each mobile device, specifically including:
[0037] According to the following formula, calculate the total task offloading loss of each mobile device:
[0038]
[0039] where C m (t) is the total task offloading loss of the m-th mobile device, T m (t) is the task offloading delay of the m-th mobile device, E m (t) is the task offloading energy consumption of the m-th mobile device, Q′ m (t) is the unexecuted task of the m-th mobile device, B m(t + 1) is the energy change of the m-th mobile device, μ is the weight of T m (t), and v is the weight of E m (t), λ1 is the weight of Q′ m (t), and λ2 is the weight of is the indicator function.
[0040] As an improvement to the above solution, constructing a joint optimization problem with the goal of minimizing latency, minimizing energy consumption, and maximizing the privacy level according to the total task offloading loss and the task offloading privacy level of each mobile device specifically includes:
[0041] Constructing a joint optimization problem with the goal of minimizing latency, minimizing energy consumption, and maximizing the privacy level according to the following formula
[0042]
[0043] The constraint conditions of the joint optimization problem are:
[0044] E min ≤B m (t) ≤ E max ;
[0045] 0 ≤ e m (t) ≤ e max ;
[0046]
[0047]
[0048] 0 ≤ f m (t) ≤ f max ;
[0049] Among them, ψ represents the importance of the task offloading privacy level relative to the total loss, P m (t) is the task offloading privacy level of the m-th mobile device, C m (t) is the total task offloading loss of the m-th mobile device, M is the number of mobile devices corresponding to all task amounts that the edge server or cloud server can process in parallel, B m (t) is the battery discharge of the m-th mobile device, E min is the lower limit of the battery discharge, E max is the upper limit of the battery discharge, e m (t) is the energy obtained by the m-th mobile device, e max is the upper limit of the energy obtained by the mobile device, f S is the operating frequency of the edge server, is the maximum operating frequency of the edge server, f C is the operating frequency of the cloud server, is the maximum operating frequency of the cloud server, f m (t) is the frequency corresponding to one CPU cycle of the m-th mobile device, f max is the maximum frequency corresponding to one CPU cycle of the m-th mobile device.
[0050] As an improvement to the above solution, the joint optimization problem is solved by the DQN algorithm based on deep reinforcement learning and the state set of each mobile device to obtain a task offloading method for the mobile edge computing system, specifically:
[0051] According to the state set of each mobile device, a state queue is constructed;
[0052] The state queue and the pre-obtained action queue are input into a pre-constructed neural network, and the joint optimization problem is solved by combining the DQN algorithm of deep reinforcement learning to obtain a task offloading method for the mobile edge computing system.
[0053] To achieve the above object, an embodiment of the present invention correspondingly provides a task offloading device for a mobile edge computing system, including:
[0054] A data acquisition module, configured to acquire task data of each mobile device; wherein, the task data includes: newly generated tasks, acquired energy, channel quality, battery discharge, and tasks in the device buffer;
[0055] A state set construction module, configured to establish a state set of each mobile device according to the task data of each mobile device;
[0056] A delay calculation module, configured to obtain the task offloading delay of each mobile device according to the calculation delay of each mobile device, the transmission delay of each mobile device for offloading tasks to the server, the calculation delay of the edge server, and the calculation delay of the cloud server;
[0057] An energy consumption calculation module, configured to obtain the task offloading energy consumption of each mobile device according to the energy consumption of each mobile device for sending tasks and the energy consumption of the CPU during the calculation process;
[0058] A privacy quantification module, configured to quantify the user usage pattern and location information of each mobile device to obtain the task offloading privacy level of each mobile device;
[0059] An optimization problem construction module, configured to construct a joint optimization problem aiming at minimizing latency, minimizing energy consumption, and maximizing privacy level according to the task offloading latency, task offloading energy consumption, task offloading privacy level, and energy change of each of the mobile devices;
[0060] An optimization problem solving module, configured to solve the joint optimization problem based on the DQN algorithm of deep reinforcement learning and the state set of each of the mobile devices, so as to obtain a task offloading method for a mobile edge computing system.
[0061] Compared with the prior art, any one of the above-mentioned embodiments in the present invention has the following beneficial effects:
[0062] The present invention first establishes a state set for each mobile device according to the obtained task data of each mobile device; then, according to the computing latency of each mobile device, the transmission latency of offloading the task to the server, the computing latency of the edge server, and the computing latency of the cloud server, obtains the task offloading latency of each mobile device; and according to the energy consumption of the CPU during the computing process of each mobile device and the energy consumption of sending tasks, obtains the task offloading energy consumption of each mobile device; and, by quantifying the user usage pattern and location information of each mobile device, obtains the task offloading privacy level of each mobile device; constructs a joint optimization problem aiming at minimizing latency, minimizing energy consumption, and maximizing privacy level according to the task offloading latency, task offloading energy consumption, task offloading privacy level, and energy change of each mobile device; finally, solves the joint optimization problem based on the DQN algorithm of deep reinforcement learning and the state set of each mobile device, so as to obtain a task offloading method for a mobile edge computing system. The present invention takes into account both the energy consumption and latency problems of mobile devices and the privacy problems of user usage patterns and location information, and can effectively reduce the risk of leakage of user location information and usage pattern information while reducing the energy consumption and latency of mobile devices, and improve the security of user data. Description of the Drawings
[0063] Figure 1 is a schematic flowchart of a task offloading method for a mobile edge computing system provided by an embodiment of the present invention;
[0064] Figure 2 is a schematic diagram of a multi-user edge-cloud collaboration MEC system provided by an embodiment of the present invention;
[0065] Figure 3 is a schematic structural diagram of a task offloading device for a mobile edge computing system provided by an embodiment of the present invention. Detailed Embodiments
[0066] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0067] See Figure 1 , which is a schematic flowchart of a task offloading method for a mobile edge computing system provided by an embodiment of the present invention.
[0068] The task offloading method for a mobile edge computing system provided by the embodiment of the present invention includes the steps of:
[0069] S11. Obtain the task data of each mobile device; wherein, the task data includes: newly generated tasks, obtained energy, channel quality, battery discharge, and tasks in the device buffer.
[0070] S12. Establish a state set for each mobile device according to the task data of each mobile device.
[0071] S13. Obtain the task offloading delay of each mobile device according to the computing delay of each mobile device, the transmission delay of each mobile device for offloading tasks to the server, the computing delay of the edge server, and the computing delay of the cloud server.
[0072] S14. Obtain the task offloading energy consumption of each mobile device according to the energy consumption of each mobile device for sending tasks and the energy consumption of the CPU during the computing process.
[0073] S15. Quantify the user usage pattern and location information of each mobile device to obtain the task offloading privacy level of each mobile device.
[0074] S16. Construct a joint optimization problem with the goal of minimizing delay, minimizing energy consumption, and maximizing privacy level according to the task offloading delay, task offloading energy consumption, task offloading privacy level, and energy change of each mobile device.
[0075] S17. Solve the joint optimization problem based on the DQN algorithm of deep reinforcement learning and the state set of each mobile device to obtain the task offloading method for the mobile edge computing system.
[0076] See Figure 2, consider a multi - user edge - cloud collaborative MEC system composed of multiple users, a dedicated edge server, and a cloud server within a certain range. Assume that the edge server is untrusted and there is a risk of privacy leakage, while the cloud server is trusted. When a task is offloaded to the edge server, the edge server can record the mobile device that issued the task and the size of the task, and the edge server can obtain the current channel condition. It should be noted that multiple users represent multiple mobile devices.
[0077] In some more optimal embodiments, step S12 specifically includes:
[0078] Establish the state set of each mobile device according to the following formula:
[0079] S m (t)=[A m (t),e m (t),h m (t),B m (t),Q m (t)];
[0080] Wherein, S m (t) is the state set of the m - th mobile device at time t, A m (t) is the new task generated by the m - th mobile device at time t, e m (t) is the energy obtained by the m - th mobile device, h m (t) is the channel quality obtained by the m - th mobile device at time t, h m (t)∈{0,1}, h m (t)=1 indicates good channel quality, h m (t)=0 indicates poor channel quality, B m (t) is the battery discharge of the m - th mobile device, Q m (t) is the task stored in the device buffer of the m - th mobile device.
[0081] It should be noted that the energy e m (t) obtained by the m - th mobile device, that is, the energy obtained by the m - th mobile device.
[0082] In some more optimal embodiments, step S13 specifically includes:
[0083] Obtain the task offloading delay of each mobile device according to the following formula:
[0084]
[0085] Wherein, T m (t) is the task offloading delay of the m - th mobile device, T m,L$T_{m}^{c}(t)$ is the computing delay of the $m$-th mobile device, $T$ m,O $T_{m}^{u}(t)$ is the transmission delay for the $m$-th mobile device to offload tasks to the edge server or cloud server, $T$ m,MEC $T_{e}^{c}(t)$ is the computing delay of the edge server, $T$ m,Cloud $T_{c}^{c}(t)$ is the computing delay of the cloud server, $\alpha$ m,L $\alpha_{m}^{l}(t)$ indicates whether the task is executed locally, $\alpha$ m,M $\alpha_{m}^{e}(t)$ indicates whether the task is executed on the edge server, $\alpha$ m,C $\alpha_{m}^{c}(t)$ indicates whether the task is executed on the cloud server.
[0086] It should be noted that $\alpha$ m,L $\alpha_{m}^{l}(t)=1$ means the task is executed locally, $\alpha$ m,L $\alpha_{m}^{l}(t)=0$ means the task is not executed locally; $\alpha$ m,M $\alpha_{m}^{e}(t)=1$ means the task is executed on the edge server, $\alpha$ m,M $\alpha_{m}^{e}(t)=0$ means the task is not executed on the edge server; $\alpha$ m,C $\alpha_{m}^{c}(t)=1$ means the task is executed on the cloud server, $\alpha$ m,C $\alpha_{m}^{c}(t)=0$ means the task is not executed on the cloud server.
[0087] Preferably, the computing delay $T_{m}^{c}(t)$ of the $m$-th mobile device m,L is specifically:
[0088]
[0089] where $A_{m}(t)$ m is the new task generated by the $m$-th mobile device at time $t$, $Q_{m}(t)$ m is the task stored in the device buffer of the $m$-th mobile device, $Q_{m}'(t)$ m is the unexecuted task, $(A_{m}(t)+Q_{m}(t)-Q_{m}'(t))$ m is the executed task, $L_{m}$ m is the number of CPU cycles required for the $m$-th mobile device to execute 1 bit of the task, $f_{m}(t)$ m is the frequency corresponding to one CPU cycle, $0\leq f_{m}(t)$ m $\leq f_{m}$, m where $f_{m}$ m is the maximum frequency corresponding to one CPU cycle, max and $f_{m}^{-1}$ max is the inverse function of $f_{m}(t)$. is $f_{m}$ m for $f_{m}(t)$.
[0090] It should be noted that when the user's mobile device cannot execute tasks locally, the mobile device offloads the tasks to the edge server or the cloud server. Although this reduces the workload of the mobile device, the offloading process incurs additional costs. Assuming that the wired transmission delay from the edge server to the cloud server and the delay of the edge server or the cloud server transmitting the calculation result back to the mobile device are negligible, the main delays include the transmission delay of the mobile device offloading the tasks to the edge server or the cloud server, and the calculation delay of the tasks executed on the edge server or the cloud server.
[0091] Specifically, the transmission delay T m,O (t) of the m-th mobile device offloading the tasks to the edge server or the cloud server is specifically:
[0092]
[0093] where w m is the bandwidth allocated to the m-th mobile device, N0 is the power spectral density, and h m (t) is the channel quality obtained by the m-th mobile device at time t, and p m (t) is the transmit power of the m-th mobile device, and log2 is the logarithm with base 2.
[0094] Furthermore, the calculation delay T m,MEC (t) of the edge server is specifically:
[0095]
[0096] where f S is the operating frequency of the edge server;
[0097] The calculation delay T m,Cloud (t) of the cloud server is specifically:
[0098]
[0099] where f C is the operating frequency of the cloud server, and M is the number of mobile devices corresponding to all the tasks that the edge server or the cloud server can process in parallel.
[0100] It can be understood that assuming that the edge server or the cloud server can process all the tasks arriving from M mobile devices in parallel, then the calculation delays on the two servers mainly depend on the size of the tasks, the operating frequency of the edge server, and the operating frequency of the cloud server.
[0101] In a specific embodiment, the step S14 is specifically:
[0102] Calculate the sum of the energy consumption of each of the mobile devices for sending tasks and the energy consumption of the CPU during the calculation process, and use it as the task offloading energy consumption of each of the mobile devices.
[0103] Further, the energy consumption E m,L (t) of the CPU of the m-th mobile device during the calculation process is specifically:
[0104]
[0105] where k is a first parameter.
[0106] In a specific implementation manner, the energy consumption E m,O (t) of the m-th mobile device for sending tasks is specifically:
[0107] E m,O (t) = p m (t)T m,O (t);
[0108] where p m (t) is the transmission power of the m-th mobile device.
[0109] It should be noted that since the edge server and the cloud service are powered by the power grid, the energy consumption of the calculations of these two servers and the energy consumption of transmitting the results back to the mobile devices are not considered. Then, the energy consumption of task offloading is mainly the energy consumption of the device for sending tasks. If the mobile device executes tasks on the local device, the energy consumption during local execution is mainly the energy consumption of the CPU of the mobile device during the calculation process. Integrating the two, the task offloading energy consumption E m (t) of the m-th mobile device = E m,L (t) + E m,O (t).
[0110] Further, the step S15 specifically includes:
[0111] Quantify the user usage patterns of each of the mobile devices according to the following formula to obtain the user usage privacy level of each of the mobile devices:
[0112]
[0113] where P m,u (t) is the user usage privacy level of the m-th mobile device, A m (t) is the new task generated by the m-th mobile device at time t, A' m (t) is the amount of tasks unloaded by the m-th mobile device to this server recorded by the edge server or the cloud server, h m (t) is the channel quality obtained by the m-th mobile device at time t, h m(t) = 1 indicates good channel quality, is an indicator function;
[0114] Quantify the location information of each of the mobile devices according to the following formula to obtain the location privacy level of each of the mobile devices:
[0115]
[0116] where P m,l (t) is the location privacy level of the m-th mobile device, h m (t) = 0 indicates poor channel quality;
[0117] Obtain the task offloading privacy level of each of the mobile devices according to the following formula:
[0118] P m (t) = β1P m,u (t) + β2P m,l (t);
[0119] where P m (t) is the task offloading privacy level of the m-th mobile device, β1 is the weight of P m,u (t), and β2 is the weight of P m,l (t).
[0120] It should be noted that if (·) holds, then
[0121] It is worth noting that if the channel quality h m (t) = 1, the user tends to offload tasks to the server to reduce the energy consumption of the mobile device. Moreover, if the channel quality remains 1, then there is no task Q in the cache of the mobile device m (t) = 0, and all newly generated tasks are offloaded to the server, that is, A′ m (t) = A m (t). Based on the records and analysis of the user's offloaded tasks, the user's usage pattern can be analyzed and quantified as the user's usage privacy level. If the user's usage privacy level is to be increased, then the gap between A′ m (t) and A m (t) should be expanded when the channel condition is good. For example, some task calculations can also be performed on the mobile device when the channel quality is very good. If the channel quality h mIf (t) = 0, then the user tends to execute tasks locally. The server cannot analyze the offloaded tasks. Since the channel quality is related to the distance, a poor channel quality indicates that the mobile device is far from the server. By using multiple servers for cooperation, the location of the mobile device can be accurately determined. Therefore, the location information of the mobile device can be quantified to obtain the location privacy level. To improve the location privacy level, that is, even in the case of poor channel quality, the mobile device still needs to offload tasks to the server. It should be noted that the server refers to the edge server or the cloud server.
[0122] In some more preferred embodiments, step S16 specifically includes:
[0123] Taking the indicator function where the energy change of each mobile device is less than 0 and the unexecuted tasks as two penalty factors, and calculating the total task offloading loss of each mobile device according to the task offloading delay and task offloading energy consumption of each mobile device;
[0124] Constructing a joint optimization problem with the objectives of minimizing delay, minimizing energy consumption, and maximizing privacy level based on the total task offloading loss of each mobile device and the task offloading privacy level.
[0125] Further, taking the indicator function where the energy change of each mobile device is less than 0 and the unexecuted tasks as two penalty factors, and calculating the total task offloading loss of each mobile device according to the task offloading delay and task offloading energy consumption of each mobile device specifically includes:
[0126] Calculating the total task offloading loss of each mobile device according to the following formula:
[0127]
[0128] where, C m (t) is the total task offloading loss of the m-th mobile device, T m (t) is the task offloading delay of the m-th mobile device, E m (t) is the task offloading energy consumption of the m-th mobile device, Q′ m (t) is the unexecuted task of the m-th mobile device, B m (t + 1) is the energy change of the m-th mobile device, μ is the weight of T m (t), ν is the weight of E m (t), λ1 is the weight of Q m (t), λ2 is the weight of is the indicator function.
[0129] Specifically, the energy change B of the m-th mobile devicem (t + 1), specifically:
[0130] B m (t + 1) = B m (t) + e m (t) - E m (t);
[0131] Wherein, B m (t) is the battery discharge of the m-th mobile device, E min ≤ B m (t) ≤ E max , E min is the lower limit of the battery discharge, E max is the upper limit of the battery discharge, e m (t) is the energy obtained by the m-th mobile device, 0 ≤ e m (t) ≤ e max , e max (t) is the upper limit of the energy obtained by the m-th mobile device.
[0132] It should be noted that if the penalty factor is not considered, the total task offloading loss C m (t) = μ·T m (t) + v·E m (t). Combining with the energy change of the m-th mobile device, the battery power of the mobile device must be greater than 0. If it is less than 0, the mobile device will abandon the current task, thus affecting the service quality and user experience. Similarly, when the unexecuted task Q m (t) is often cached in the local buffer, it will also affect the user experience. Therefore, two penalty factors need to be set: the unexecuted task Q m (t) and the indicator function that the energy change of the m-th mobile device is less than 0
[0133] Furthermore, the joint optimization problem with the goal of minimizing latency, minimizing energy consumption, and maximizing privacy level is constructed according to the total task offloading loss and the task offloading privacy level of each mobile device, specifically including:
[0134] Construct a joint optimization problem with the goal of minimizing latency, minimizing energy consumption, and maximizing privacy level according to the following formula
[0135]
[0136] The constraint conditions of the joint optimization problem are:
[0137] E min ≤ B m (t) ≤ Emax ;
[0138] 0 ≤ e m (t) ≤ e max ;
[0139]
[0140]
[0141] 0 ≤ f m () ≤ f max ;
[0142] where ψ represents the importance of the task offloading privacy level relative to the total loss, P m (t) is the task offloading privacy level of the m-th mobile device, C m (t) is the total task offloading loss of the m-th mobile device, M is the number of mobile devices corresponding to all task amounts that the edge server or cloud server can process in parallel, B m (t) is the battery discharge of the m-th mobile device, E min is the lower limit of the battery discharge, E max is the upper limit of the battery discharge, e m (t) is the energy obtained by the m-th mobile device, e max is the upper limit of the energy obtained by the mobile device, f S is the operating frequency of the edge server, is the maximum operating frequency of the edge server, f C is the operating frequency of the cloud server, is the maximum operating frequency of the cloud server, f m (t) is the frequency corresponding to one CPU cycle of the m-th mobile device, f max is the maximum frequency corresponding to one CPU cycle of the m-th mobile device.
[0143] It can be understood that the minimum delay, minimum energy consumption, and highest privacy level refer to the minimum task offloading delay, minimum task offloading energy consumption, and highest task offloading privacy level.
[0144] Specifically, the step S17 is specifically:
[0145] Construct a status queue according to the status set of each mobile device;
[0146] Input the status queue and the pre-obtained action queue into a pre-constructed neural network, and solve the joint optimization problem by combining the DQN algorithm of deep reinforcement learning to obtain the task offloading method of the mobile edge computing system.
[0147] Specifically, the state queue is specifically: S(t) = [S1(t), S2(t), …, S m (t), …, S M (t)].
[0148] Specifically, the action queue is specifically: A(t) = [a1(t), a2(t), …, a m (t), … a M (t)]; where a m (t) is the decision for the m-th mobile device to perform task processing, and a m (t) = [α m,L (t), α m,M (t), α m,C (t)].
[0149] It should be noted that by setting the utility function U m (t) = ψP m (t) - C m (t), and taking it as a kind of reward, the joint optimization problem can be transformed into a Markov decision (MDP) problem, and the goal is to let the mobile device learn the optimal policy to maximize the reward.
[0150] Preferably, the loss function of the neural network is specifically:
[0151] L(θ) = E[y(t) - Q(S(t), a(t)|θ)) 2 ;
[0152] where y(t) is the optimal Q value in the DQN algorithm, Q(S(t), a(t)|θ)) 2 is the output of the neural network, a(t) is the action selected and executed by the greedy policy, θ is the network parameter, and E is the mathematical expectation.
[0153] It should be noted that the main idea of using the DQN algorithm based on deep reinforcement learning to solve the joint optimization problem is: using a neural network to approximate the Q value, so as to learn the best offloading strategy and achieve the maximum long-term utility. Its main process is specifically: First, input the state queue S(t) of all mobile devices at the current moment and the action queue A(t) of a series of possible actions into the neural network, and the neural network will output the Q values of all state-action combinations; then, select the action a(t) according to the greedy policy to execute the task to maximize the Q value; further, through the utility function U m(t) Calculate the utility, transfer the state to S(t + 1), and store the old state S(t), the selected action a(t), the utility, and the new state S(t + 1) of this process as a piece of training data. After accumulating multiple pieces of training data, update the neural network parameters until the loss function of the neural network converges, and output the task offloading method of the mobile edge computing system. It should be noted that the optimal value y(t) is fixed because the parameters of the optimal network are fixed, so the optimal output is fixed. By continuously training to minimize the loss function, the optimal Q value can be obtained, maximizing the reward, utility, privacy level, and minimizing the costs of latency and energy consumption.
[0154] Correspondingly, an embodiment of the present invention further provides a task offloading device for a mobile edge computing system, which can implement all processes of the task offloading method of the mobile edge computing system.
[0155] See Figure 3 , which is a schematic structural diagram of a task offloading device for a mobile edge computing system provided by an embodiment of the present invention.
[0156] A task offloading device for a mobile edge computing system provided by an embodiment of the present invention includes:
[0157] A data acquisition module 21, configured to acquire task data of each mobile device; wherein, the task data includes: newly generated tasks, acquired energy, channel quality, battery discharge, and tasks in the device buffer.
[0158] A state set construction module 22, configured to establish a state set for each mobile device according to the task data of each mobile device.
[0159] A latency calculation module 23, configured to obtain the task offloading latency of each mobile device according to the calculation latency of each mobile device, the transmission latency of each mobile device to offload tasks to the server, the calculation latency of the edge server, and the calculation latency of the cloud server.
[0160] An energy consumption calculation module 24, configured to obtain the task offloading energy consumption of each mobile device according to the energy consumption of each mobile device for sending tasks and the energy consumption of the CPU during the calculation process.
[0161] A privacy quantification module 25, configured to quantify the user usage pattern and location information of each mobile device to obtain the task offloading privacy level of each mobile device.
[0162] An optimization problem construction module 26, configured to construct a joint optimization problem with the goal of minimizing latency, minimizing energy consumption, and maximizing privacy level according to the task offloading latency, task offloading energy consumption, task offloading privacy level, and energy change of each mobile device.
[0163] The optimization problem solving module 27 is configured to solve the joint optimization problem based on the DQN algorithm of deep reinforcement learning and the state set of each of the mobile devices, so as to obtain a task offloading method for the mobile edge computing system.
[0164] As an optional implementation manner, the state set construction module 22 is specifically configured to:
[0165] Establish the state set of each of the mobile devices according to the following formula:
[0166] S m (t)=[A m (t),e m (t),h m (t),B m (t),Q m (t);
[0167] Wherein, S m (t) is the state set of the m-th mobile device at time t, A m (t) is the new task generated by the m-th mobile device at time t, e m (t) is the energy obtained by the m-th mobile device, h m (t) is the channel quality obtained by the m-th mobile device at time t, h m (t)∈{0,1}, h m (t)=1 indicates good channel quality, h m (t)=0 indicates poor channel quality, B m (t) is the battery discharge of the m-th mobile device, Q m (t) is the task stored in the device buffer of the m-th mobile device.
[0168] Furthermore, the delay calculation module 23 is specifically configured to:
[0169] Obtain the task offloading delay of each of the mobile devices according to the following formula:
[0170]
[0171] Wherein, T m (t) is the task offloading delay of the m-th mobile device, T m,L (t) is the computing delay of the m-th mobile device, T m,O (t) is the transmission delay for the m-th mobile device to offload the task to the edge server or the cloud server, T m,MEC (t) is the computing delay of the edge server, T m,Cloud (t) is the computing delay of the cloud server, αm,L (t) indicates whether the task is executed locally, α m,M (t) indicates whether the task is executed on the edge server, α m,C (t) indicates whether the task is executed on the cloud server.
[0172] As one of the more optimal implementation manners, the energy consumption calculation module 24 is specifically configured to: calculate the sum value of the energy consumption of each mobile device for sending tasks and the energy consumption of the CPU during the calculation process, so as to use it as the task offloading energy consumption of each mobile device.
[0173] Preferably, the privacy quantification module 25 is specifically configured to:
[0174] Quantify the user usage patterns of each mobile device according to the following formula to obtain the user usage privacy level of each mobile device:
[0175]
[0176] where, P m,u (t) is the user usage privacy level of the mth mobile device, A m (t) is the new task generated by the mth mobile device at time t, A′ m (t) is the amount of tasks offloaded by the mth mobile device to this server recorded by the edge server or the cloud server, h m (t) is the channel quality obtained by the mth mobile device at time t, h m (t) = 1 indicates good channel quality, is the indicator function;
[0177] Quantify the location information of each mobile device according to the following formula to obtain the location privacy level of each mobile device:
[0178]
[0179] where, P m,l (t) is the location privacy level of the mth mobile device, h m (t) = 0 indicates poor channel quality;
[0180] Obtain the task offloading privacy level of each mobile device according to the following formula:
[0181] P m (t) = β1P m,u (t)+β2P m,l (t);
[0182] where, P m (t) is the task offloading privacy level of the mth mobile device, β1 is Pm,u (t) weight, β2 is P m,l (t) weight.
[0183] Furthermore, the optimization problem construction module 26 specifically includes:
[0184] Task offloading loss calculation unit, which uses the indicator function with the energy change of each mobile device less than 0 and the unexecuted tasks as two penalty factors, and calculates the total task offloading loss of each mobile device according to the task offloading delay and task offloading energy consumption of each mobile device;
[0185] Optimization problem construction unit, which constructs a joint optimization problem aiming at minimizing delay, minimizing energy consumption and maximizing privacy level according to the total task offloading loss of each mobile device and the task offloading privacy level.
[0186] Furthermore, the task offloading loss calculation unit specifically is used for:
[0187] Calculate the total task offloading loss of each mobile device according to the following formula:
[0188]
[0189] where C m (t) is the total task offloading loss of the m-th mobile device, T m (t) is the task offloading delay of the m-th mobile device, E m (t) is the task offloading energy consumption of the m-th mobile device, Q m (t) is the unexecuted task of the m-th mobile device, B m (t + 1) is the energy change of the m-th mobile device, μ is the weight of T m (t), v is the weight of E m (t), λ1 is the weight of Q m (t), λ2 is weight of is the indicator function.
[0190] Furthermore, the optimization problem construction unit specifically is used for:
[0191] Construct a joint optimization problem aiming at minimizing delay, minimizing energy consumption and maximizing privacy level according to the following formula
[0192]
[0193] The constraint conditions of the joint optimization problem are:
[0194] E min≤B m (t) ≤ E max ;
[0195] 0 ≤ e m (t) ≤ e max ;
[0196]
[0197]
[0198] 0 ≤ f m () ≤ f max ;
[0199] where ψ represents the importance of the task offloading privacy level relative to the total loss, P m (t) is the task offloading privacy level of the m-th mobile device, C m (t) is the total task offloading loss of the m-th mobile device, M is the number of mobile devices corresponding to all the task volumes that the edge server or cloud server can process in parallel, B m (t) is the battery discharge of the m-th mobile device, E min is the lower limit of the battery discharge, E max is the upper limit of the battery discharge, e m (t) is the energy obtained by the m-th mobile device, e max is the upper limit of the energy obtained by the mobile device, f S is the operating frequency of the edge server, is the maximum operating frequency of the edge server, f C is the operating frequency of the cloud server, is the maximum operating frequency of the cloud server, f m (t) is the frequency corresponding to one CPU cycle of the m-th mobile device, f max is the maximum frequency corresponding to one CPU cycle of the m-th mobile device.
[0200] As one of the optional implementation manners, the optimization problem solving module 27 is specifically configured to:
[0201] Construct a status queue according to the status set of each mobile device;
[0202] Input the status queue and the pre-acquired action queue into a pre-constructed neural network, and solve the joint optimization problem by combining the DQN algorithm of deep reinforcement learning to obtain the task offloading method of the mobile edge computing system.
[0203] It should be noted that for the relevant specific descriptions and beneficial effects of the embodiments of the task offloading device of a mobile edge computing system in this embodiment, reference can be made to the relevant specific descriptions and beneficial effects of the embodiments of the task offloading method of the mobile edge computing system described above, which will not be elaborated here.
[0204] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the attached drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0205] In summary, for the task offloading method and device of a mobile edge computing system provided by the embodiments of the present invention, first, according to the task data of each mobile device obtained, a state set of each mobile device is established; then, according to the computing delay of each mobile device, the transmission delay of offloading the task to the server, the computing delay of the edge server, and the computing delay of the cloud server, the task offloading delay of each mobile device is obtained; and according to the energy consumption of the CPU during the computing process of each mobile device and the energy consumption of sending tasks, the task offloading energy consumption of each mobile device is obtained; and, by quantifying the user usage pattern and location information of each mobile device, the task offloading privacy level of each mobile device is obtained; according to the task offloading delay, task offloading energy consumption, task offloading privacy level, and energy change of each mobile device, a joint optimization problem with the goal of minimizing delay, minimizing energy consumption, and maximizing privacy level is constructed; finally, based on the DQN algorithm of deep reinforcement learning and the state set of each mobile device, the joint optimization problem is solved to obtain the task offloading method of the mobile edge computing system. The present invention takes into account both the energy consumption and delay problems of mobile devices and the privacy problems of user usage patterns and location information, and can effectively reduce the risk of leakage of user location information and usage pattern information while reducing the energy consumption and delay of mobile devices, improving the security of user data.
[0206] The above is the preferred embodiment of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements are also regarded as the protection scope of the present invention.
Claims
1. A task offloading method for a mobile edge computing system, characterized in that, Including: Obtain the task data of each mobile device; wherein, the task data includes: newly generated tasks, acquired energy, channel quality, battery discharge, and tasks in the device buffer; Establish a state set for each mobile device according to the task data of each mobile device; Obtain the task offloading delay of each mobile device according to the computing delay of each mobile device, the transmission delay for each mobile device to offload tasks to the server, the computing delay of the edge server, and the computing delay of the cloud server; Obtain the task offloading energy consumption of each mobile device according to the energy consumption of each mobile device for sending tasks and the energy consumption of the CPU during the computing process; Quantify the user usage pattern and location information of each mobile device to obtain the task offloading privacy level of each mobile device; Construct a joint optimization problem with the goal of minimizing delay, minimizing energy consumption, and maximizing privacy level according to the task offloading delay, task offloading energy consumption, task offloading privacy level, and energy change of each mobile device; Solve the joint optimization problem based on the DQN algorithm of deep reinforcement learning and the state set of each mobile device to obtain a task offloading method for the mobile edge computing system; Among them, the quantifying the user usage pattern and location information of each mobile device to obtain the task offloading privacy level of each mobile device specifically includes: Quantify the user usage pattern of each mobile device according to the following formula to obtain the user usage privacy level of each mobile device: Among them, is the privacy level used by the user of the m-th mobile device, is the new task generated by the m-th mobile device at time t, is the amount of tasks offloaded from the m-th mobile device to this server recorded by the edge server or cloud server, is the channel quality obtained by the m-th mobile device at time t, indicates good channel quality, is an indicator function; Quantify the location information of each mobile device according to the following formula to obtain the location privacy level of each mobile device: Among them, is the location privacy level of the m-th mobile device, indicates poor channel quality; Obtain the task offloading privacy level of each mobile device according to the following formula: wherein, is the task offloading privacy level of the m-th mobile device, is the weight of, is the weight of.
2. The task offloading method for a mobile edge computing system according to claim 1, characterized in that, The establishing a state set for each mobile device according to the task data of each mobile device specifically includes: Establish a state set for each mobile device according to the following formula: ; Among them, is the state set of the m-th mobile device at time t, is the new task generated by the m-th mobile device at time t, is the energy obtained by the m-th mobile device, is the channel quality obtained by the m-th mobile device at time t, indicates good channel quality, indicates poor channel quality, is the battery discharge of the m-th mobile device, is the task stored in the device buffer of the m-th mobile device.
3. The task offloading method for a mobile edge computing system according to claim 1, characterized in that, The obtaining the task offloading delay of each mobile device according to the computing delay of each mobile device, the transmission delay for each mobile device to offload tasks to the server, the computing delay of the edge server, and the computing delay of the cloud server specifically includes: Obtain the task offloading delay of each mobile device according to the following formula: ; wherein, is the task offloading delay of the m-th mobile device, is the computing delay of the m-th mobile device, is the transmission delay for the m-th mobile device to offload the task to the edge server or the cloud server, is the computing delay of the edge server, is the computing delay of the cloud server, indicates whether the task is executed locally, indicates whether the task is executed on the edge server, indicates whether the task is executed on the cloud server.
4. The task offloading method for a mobile edge computing system according to claim 1, characterized in that, The obtaining the task offloading energy consumption of each mobile device according to the energy consumption of each mobile device for sending tasks and the energy consumption of the CPU during the computing process is specifically: Calculate the sum of the energy consumption of each mobile device for sending tasks and the energy consumption of the CPU during the computing process as the task offloading energy consumption of each mobile device.
5. The task offloading method for a mobile edge computing system according to claim 1, characterized in that, The constructing a joint optimization problem with the goal of minimizing delay, minimizing energy consumption, and maximizing privacy level according to the task offloading delay, task offloading energy consumption, task offloading privacy level, and energy change of each mobile device specifically includes: Take the indication function with the energy change of each mobile device less than 0 and the unexecuted tasks as two penalty factors, and calculate the total task offloading loss of each mobile device according to the task offloading delay and task offloading energy consumption of each mobile device. Construct a joint optimization problem aiming at minimizing delay, minimizing energy consumption and maximizing privacy level according to the total task offloading loss of each mobile device and the task offloading privacy level.
6. The task offloading method for a mobile edge computing system according to claim 5, characterized in that,The step of taking the indication function with the energy change of each mobile device less than 0 and the unexecuted tasks as two penalty factors, and calculating the total task offloading loss of each mobile device according to the task offloading delay and task offloading energy consumption of each mobile device specifically includes: Calculate the total task offloading loss of each mobile device according to the following formula: wherein, is the total loss of task offloading of the m-th mobile device, is the task offloading delay of the m-th mobile device, is the task offloading energy consumption of the m-th mobile device, is the task not executed by the m-th mobile device, is the energy change of the m-th mobile device, is the weight of, is the weight of, is the weight of, is the weight of, is the indicator function.
7. The task offloading method of the mobile edge computing system according to claim 5, characterized in that The step of constructing a joint optimization problem aiming at minimizing delay, minimizing energy consumption and maximizing privacy level according to the total task offloading loss of each mobile device and the task offloading privacy level specifically includes: Construct a joint optimization problem with the goal of minimizing delay, minimizing energy consumption, and maximizing the privacy level according to the following formula : The constraint conditions of the joint optimization problem are: Among them, represents the importance of the task offloading privacy level relative to the total loss, is the task offloading privacy level of the m-th mobile device, is the total task offloading loss of the m-th mobile device, is the number of mobile devices corresponding to all the task volumes that the edge server or cloud server can process in parallel, is the battery discharge of the m-th mobile device, is the lower limit of the battery discharge, is the upper limit of the battery discharge, is the energy obtained by the m-th mobile device, is the upper limit of the energy obtained by the mobile device, is the working frequency of the edge server, is the maximum working frequency of the edge server, is the working frequency of the cloud server, is the maximum working frequency of the cloud server, is the frequency corresponding to one CPU cycle of the m-th mobile device, is the maximum frequency corresponding to one CPU cycle of the m-th mobile device.
8. The task offloading method of the mobile edge computing system according to claim 1, characterized in that Solve the joint optimization problem based on the DQN algorithm of deep reinforcement learning and the state set of each mobile device to obtain the task offloading method of the mobile edge computing system. Specifically: Construct a state queue according to the state set of each mobile device. Input the state queue and the pre-obtained action queue into the pre-constructed neural network, and solve the joint optimization problem by combining the DQN algorithm of deep reinforcement learning to obtain the task offloading method of the mobile edge computing system.
9. An offloading task device of a mobile edge computing system, characterized in that It includes: A data acquisition module for acquiring task data of each mobile device; wherein, the task data includes: newly generated tasks, acquired energy, channel quality, battery discharge, and tasks in the device buffer. A state set construction module for establishing a state set of each mobile device according to the task data of each mobile device. A delay calculation module for obtaining the task offloading delay of each mobile device according to the calculation delay of each mobile device, the transmission delay of each mobile device for offloading tasks to the server, the calculation delay of the edge server, and the calculation delay of the cloud server. An energy consumption calculation module for obtaining the task offloading energy consumption of each mobile device according to the energy consumption of each mobile device for sending tasks and the energy consumption of the CPU during the calculation process. A privacy quantification module for quantifying the user usage patterns and location information of each mobile device to obtain the task offloading privacy level of each mobile device. An optimization problem construction module for constructing a joint optimization problem aiming at minimizing delay, minimizing energy consumption and maximizing privacy level according to the task offloading delay, task offloading energy consumption, task offloading privacy level and energy change of each mobile device. An optimization problem solving module for solving the joint optimization problem based on the DQN algorithm of deep reinforcement learning and the state set of each mobile device to obtain the task offloading method of the mobile edge computing system. Among them, the privacy quantification module is specifically used for: Quantify the user usage pattern of each of the mobile devices according to the following formula to obtain the user usage privacy level of each of the mobile devices: Among them, is the privacy level used by the user of the m-th mobile device, is the new task generated by the m-th mobile device at time t, is the amount of tasks unloaded by the m-th mobile device to this server recorded by the edge server or cloud server, is the channel quality obtained by the m-th mobile device at time t, indicates good channel quality, is an indicator function; Quantify the location information of each of the mobile devices according to the following formula to obtain the location privacy level of each of the mobile devices: Among them, is the location privacy level of the m-th mobile device, indicating poor channel quality; Obtain the task offloading privacy level of each of the mobile devices according to the following formula: Among them, is the task offloading privacy level of the m-th mobile device, is 's weight, is 's weight.
Citation Information
Patent Citations
A mobile edge computing task scheduling method combining energy and delay optimization
CN109710336A
KR20210147240A