Time delay and energy consumption comprehensive perception edge computing task unloading method
By constructing a comprehensive perception model of delay and energy consumption and a reinforcement learning method, the problem of delay and energy consumption of computing-intensive applications in the 5G network is solved, and the task offloading strategy optimization between the user device and the edge computing server is realized, reducing the It reduces the total cost of the system and improves user satisfaction and equipment life.
Patent Information
- Application Number
- CN202410633458.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-21
- Publication Date
- 2024-09-17
AI Technical Summary
In 5G networks, computing-intensive applications are sensitive to delays and consume high energy. Existing technologies are difficult to effectively coordinate delay and energy consumption, resulting in limited computing capabilities of user equipment and affecting equipment battery life and service quality.
Build a comprehensive perception model of delay and energy consumption, use reinforcement learning methods to make task offloading strategy decisions, combine the local computing of user devices and the resources of edge computing servers, optimize the total system cost, and achieve weighted management of delay and energy consumption.
Under the constraints of user time tolerance and edge computing server computing capabilities, dynamically adjust task offloading decisions to reduce system latency and energy consumption, and improve user satisfaction and equipment life.
Smart Images

Figure CN118660313A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of edge computing technology, and in particular to an edge computing task unloading method with comprehensive perception of latency and energy consumption. Background Art
[0002] With the development of science and technology, 5G networks are becoming more and more popular and entering everyone's life. Relying on its extremely high network speed and stability, more and more large-scale Internet of Things, high-performance computing and other applications have become possible. Because of its extremely high efficiency, researchers believe that cloud wireless access network can help realize these applications in 5G networks. At the same time, more and more computing-intensive applications in 5G are extremely sensitive to latency, requiring very low latency to run normally, and have high energy consumption, such as smart connected vehicles, augmented reality, virtual reality, etc. For user devices, their computing power is limited, and high-energy consumption applications will also greatly affect the battery life of the device. In order to solve the contradiction between user devices and applications, the recently proposed mobile edge computing (multi-access edge computing, MEC) is a feasible solution.
[0003] On the basis of cloud wireless access network, some people proposed to use edge computing server MEC to solve the above problems. It improves the computing power of the network edge and allows user devices to offload their tasks to the server to perform calculations on behalf of the user devices, and return the results to the user after the calculations are completed. In this way, the latency of the user device is significantly reduced, and the energy consumption is reduced, which improves the service quality for users. Therefore, computing offloading and computing resource allocation as a key point of the MEC system have profound research value. At the same time, MEC also has advantages over cloud computing. Traditional cloud computing solutions offload tasks to the central cloud to alleviate the shortage of computing resources.
[0004] However, considering the different channel conditions and the different latency requirements of various computing tasks, it is a challenge to coordinate the offloading of computing tasks among multiple users. Offloading tasks to edge servers is not that simple either. Current research mainly focuses on modeling systems that only consider energy consumption or latency, both of which are key factors affecting user satisfaction with computing tasks. To solve the above existing technical problems, we invented a new edge computing task offloading method with comprehensive perception of latency and energy consumption. Summary of the invention
[0005] The purpose of the present invention is to provide an edge computing task offloading method with comprehensive perception of latency and energy consumption, which constructs a comprehensive perception model of latency and energy consumption and makes task offloading strategy decisions through reinforcement learning methods, thereby achieving better effects in terms of latency and energy consumption.
[0006] The purpose of the present invention can be achieved by the following technical measures: an edge computing task unloading method with comprehensive perception of delay and energy consumption, the edge computing task unloading method with comprehensive perception of delay and energy consumption includes:
[0007] Step 1: Build an edge computing task offloading model;
[0008] Step 2: Divide the constructed edge computing task offloading model into a local computing model of each device and a task offloading computing model of this device;
[0009] Step 3: According to the local computing model of the device, the total cost of local computing is set to the weighted sum of time delay and energy consumption;
[0010] Step 4: According to the task offloading calculation model of the device, the user offloads part of the task to the MEC server for calculation;
[0011] Step 5: Combine the local computing model in step 3 and the offload computing model in step 4 to calculate the total system cost.
[0012] The purpose of the present invention can also be achieved by the following technical measures:
[0013] In step 1, an edge computing task offloading model is constructed based on the distance between the user and the MEC server and the computing power of the MEC server and the user's device.
[0014] In step 1, it is assumed that each user equipment UE n , their respective computational tasks W n It can be represented by the triple (D n , M n , t n ) represents; where D n Indicates the size of the data that the user needs to calculate, in kbits; M n Indicates the number of CPU cycles required to complete the execution of the user equipment, in Mcycles; t n It indicates the user's satisfaction delay for his task, in seconds. If the delay exceeds this delay, the user's satisfaction cannot be achieved. The user's computing task M n In this model, tasks can be completed locally or offloaded to the MEC server. After the tasks are completed using edge computing, the results are returned to the user. In this model, the method of partially offloading user tasks is not discussed. Therefore, the offloading decisions of n users can be represented in the form of a one-dimensional vector group, which can be defined as [γ1, γ2, ..., γ n ], γ∈[0, 1], where γ is 0, which means the task is completely calculated locally, and 1 means it is completely offloaded to the MEC server for calculation.
[0015] In step 3, in local computing, the total time delay is the time required for the user to perform local computing, and the total number of CPUs required by the user to perform the computing task is M n Divide by the computing power of the user's device C n , the required delay under this model can be obtained The calculation formula is:
[0016]
[0017] The other part of the total cost is the system energy consumption, which is the energy consumption of executing task R n Energy consumption required According to calculation experience, The energy consumption can be calculated using the following formula:
[0018]
[0019] Since the total cost of the system is defined as the weighted sum of the required time delay and energy consumption, the total cost of the system under this model can be obtained by combining the calculation formula of local delay and energy consumption:
[0020]
[0021] In the above formula, the proportional coefficients α and β mean the proportional coefficient of the total system cost to the delay and the proportional coefficient to the energy consumption respectively; if the value of α is large, it means that the system is more sensitive to delay changes in this scenario, otherwise it means that it is more sensitive to energy consumption, and their values depend on the task type; the proportional coefficients satisfy 0≤α≤1, 0≤β≤1 and α+β=1; these two parameters are freely set according to the user's delay and sensitivity.
[0022] In step 4, the offloading process is divided into the following steps: the user sends the data to be calculated to the base station, and the base station then forwards the user's data to the MEC server. The MEC server allocates its own resources to complete the calculation. In order to simplify the scenario, the server's resources are evenly distributed to users who need MEC calculations. After the execution is completed, the execution results are returned to the user.
[0023] Step 4 specifically includes:
[0024] Step 41, when the device transmits data to the base station, the speed at which the device transmits data in the wireless channel is set to v n , the delay calculation formula is:
[0025]
[0026] Where D n Indicates the size of the data that the user needs to calculate, in kbits;
[0027] Step 42, define the power consumption of device n as P n , then the energy consumption corresponding to step 41 is The calculation formula is:
[0028]
[0029] Step 43, for the MEC task execution process, the delay calculation formula is:
[0030]
[0031] Where D n Indicates the size of the data that the user needs to calculate, in kbits;
[0032] The speed at which a device transmits data in a wireless channel is v n
[0033] Step 44: The corresponding energy consumption during the MEC task execution process for:
[0034]
[0035] in is the power consumption of device n during MEC task execution, The delay of the MEC executing the task in step 43;
[0036] In step 43 and step 44, the constraint condition needs to be met, and the total amount of MEC computing resources must be greater than the resources allocated to the user;
[0037] Without considering the impact of delay and energy consumption on the system when the results are returned to the user after MEC execution is completed; combining steps 41, 42, 43, and 44, the total expression of system delay and energy consumption under the offloading calculation model can be obtained as follows: represents the total system delay, Represents the total system energy consumption:
[0038]
[0039]
[0040] Where D n Indicates the size of the data that the user needs to calculate, W n For computing tasks, M n The total number of CPU cycles required to complete the computing task, C n Represents the computing power of the user's device.
[0041] Combining the above two expressions, we can get the total cost expression in the offloading calculation model:
[0042]
[0043] in, represents the total system delay, Represents the total energy consumption of the system. The proportional coefficients α and β respectively represent the proportional coefficient of the total system cost to the delay and the proportional coefficient to the energy consumption.
[0044] In step 5, the total system cost S is obtained by combining the local calculation model in step 3 and the unloaded calculation model in step 4. all It can be expressed as:
[0045]
[0046] in represents the total cost of local offloading, represents the total cost of offloading computation to the edge server, γ n represents the offloading decision of the nth user, where γ is 0, which means the task is completely calculated locally, and 1 means all the tasks are offloaded to the MEC server for calculation.
[0047] While minimizing the system cost, some constraints must be met. On the basis of satisfying the constraints, the minimum system cost is obtained. This optimization problem is formulated as follows:
[0048]
[0049]
[0050]
[0051]
[0052]
[0053] Among them C n represents the computing power of the user device, F represents the upper limit of the computing power of the edge computing server, and t n Indicates the upper limit of the user's requirement for latency. represents the total cost of local offloading, represents the total cost of offloading computation to the edge server, γ n represents the offloading decision of the nth user, where γ is 0, which means the task is completely calculated locally, and 1 means all the tasks are offloaded to the MEC server for calculation.
[0054] The constraints are explained as follows: C1 means that because the model only considers complete offloading, the value of γ can only be 0 or 1; C2 means that the time for local calculation or offloading execution of the task cannot exceed the user's tolerance limit for time; C3 means that the resources allocated to a specific user cannot be greater than the total computing capacity of the edge server; C4 means that the total amount of tasks allocated by all users to the edge server for calculation cannot exceed the computing capacity of the edge server.
[0055] The edge computing task unloading method with comprehensive perception of latency and energy consumption also includes, after step 5, step 6, using a reinforcement learning method, namely, rewards, actions and states, to provide an unloading strategy with the least system overhead for user unloading.
[0056] In step 6, the state of the system is described as a binary relation set (tc, ac), where tc = S all , which is the total cost of the system, is defined as the weighted sum of delay and energy consumption;
[0057] in, represents the remaining computing power of the edge computing server, F represents the upper limit of the computing power of the edge computing server, and C n The computing power of the user's device.
[0058] In step 6, whether each device chooses to offload and the allocation of edge computing server resources to each device are combined into a vector as an action vector, that is, [γ1, γ2, ...γ n , C1, C2, ..., C n ], where γ i , i∈[1,n] indicates whether to uninstall, and the value is [0,1], C i , i∈[1,n], represents the amount of data uninstalled by the user.
[0059] In step 6, after completing a specific action a in the current state s, the reward R(s, a) will be obtained in this specific case. For the established task offloading calculation model, the optimization goal of the system is to obtain the minimum cost. Therefore, the lower the cost, the higher the reward value should be. Therefore, the reward is defined as:
[0060]
[0061] Among them, tc local is the total cost of local calculation, tc(s, a) is the real cost under the current environment state; according to the previous discussion, as the number of devices n increases, the decision space increases exponentially, so the pre-classification method is adopted to reduce the size of the action space; before the action begins, each user device is judged, if the delay of its local calculation can no longer meet the user's time requirement, that is, This user will be directly judged as performing uninstall calculation, that is, directly assigning γ n =1; The above pre-classification method can limit the action space by reducing the number of possible state spaces, thereby optimizing the system calculation.
[0062] The edge computing task offloading method with comprehensive perception of latency and energy consumption in the present invention aims at the technical problem of high energy consumption and latency when the user device needs to offload tasks to the MEC server for execution during the edge computing process. In the process of users offloading edge computing tasks, a comprehensive perception model of latency and energy consumption is constructed, and task offloading strategy decisions are made through reinforcement learning methods, thereby achieving better results in terms of latency and energy consumption. Compared with the prior art, the beneficial effects of the present invention are:
[0063] The present invention can provide a task unloading method that integrates latency and energy consumption perception for users who perform edge computing task unloading. Under the conditions of user tolerance for time, edge computing server computing power, and user device computing power, the decision result of edge computing task unloading is based on the reinforcement learning algorithm, and dynamic unloading decisions are made according to the different latency and energy consumption requirements of different users. The processing process for user unloading can be divided into three parts. First, the user sends the data to be calculated to the base station. Secondly, the base station forwards the user's data to the MEC server. The MEC server allocates its own resources to complete the calculation. Finally, the MEC server returns the execution result to the user after the execution is completed. The present invention uses a comprehensive perception of latency and energy consumption to model the problem, providing a strong guarantee for users to achieve their ideal system consumption, and has a strong practical value. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 is a schematic diagram of different unloading modes in a specific embodiment of the present invention;
[0065] Figure 2 It is a schematic diagram of an edge computing task offloading method model in a specific embodiment of the present invention;
[0066] Figure 3 The present invention is a flowchart of a specific embodiment of the edge computing task unloading method with comprehensive perception of latency and energy consumption of the present invention. DETAILED DESCRIPTION
[0067] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0068] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations and / or combinations thereof.
[0069] The present invention proposes an edge computing task unloading method with comprehensive awareness of latency and energy consumption, so as to solve the problem of high energy consumption and long latency of user equipment when users are performing high-performance computing and relying on edge computing servers to assist in completing computing tasks. The present invention includes an edge computing task unloading strategy with comprehensive awareness of latency and energy consumption, which can be mainly divided into two parts. The first part is to address the problem of high-density computing in user cells, and to conduct system modeling by comprehensively considering the latency and energy consumption required for user computing, so as to determine whether and how much of the user's computing task should be offloaded to the edge computing server for computing. Figure 1 As shown, Figure 1 This is a schematic diagram of different offloading modes in a specific embodiment of the present invention. The user's computing tasks can be selected to be all calculated on the user device, partially offloaded to the edge server for calculation, or all the tasks can be offloaded to the edge server for calculation. The second part is based on the latency and energy consumption comprehensive perception system established in the first step, which uses the reinforcement learning method to provide users with an offloading strategy with the least system overhead. Different computing offloading solutions are provided according to the different sensitivity requirements of users to energy consumption and latency, thereby improving user satisfaction when performing high-performance computing. This embodiment is applicable to mobile edge computing networks, and the system model is as follows: Figure 2 As shown in the figure, there are n user devices, a base station and an MEC server in the network. The user's computing tasks can be transmitted to the MEC server through the base station for calculation. The user's computing data can be arbitrarily divided by bit for partial local calculation and partial offloading.
[0070] In a specific embodiment of the present invention, a computing offloading method based on mobile edge computing is provided, such as Figure 3 As shown, Figure 3 This is a flowchart of the edge computing task unloading method with comprehensive perception of latency and energy consumption of the first part of the present invention, including the steps of:
[0071] Step 1: Figure 2 Based on the system model, an edge computing task offloading model is constructed according to the distance between the user and the MEC server and the computing power of the MEC and user devices.
[0072] Assume that each user equipment UE n , their respective computational tasks W n It can be represented by the triple (Dn , M n , t n ) represents. n Indicates the size of the data that the user needs to calculate, in kbits. n Indicates the number of CPU cycles required to complete the execution of the user equipment, in Mcycles. n It indicates the user's satisfaction delay for his task, in seconds. If the delay exceeds this delay, the user's satisfaction cannot be achieved. n In this model, tasks can be completed locally or offloaded to the MEC server. After the tasks are completed using edge computing, the results are returned to the user. In this model, the method of partially offloading user tasks is not discussed. Therefore, the offloading decisions of n users can be represented in the form of a one-dimensional vector group. It can be defined as [γ1, γ2, ..., γ n ], γ∈[0, 1], where γ is 0, which means the task is completely calculated locally, and 1 means it is completely offloaded to the MEC server for calculation.
[0073] Step 2: Divide the constructed edge computing task offloading model into the local computing model of each device and the task offloading computing model of this device.
[0074] Step 3: According to the local computing model of the device, the total cost of local computing is set to the weighted sum of time delay and energy consumption.
[0075] In local computing, the total time delay is the time required for the user to perform local computing, divided by the total number of CPUs required by the user to perform the computing task, M n Divide by the computing power of the user's device C n , the required delay under this model can be obtained The calculation formula is:
[0076]
[0077] The other part of the total cost is the system energy consumption, which is the energy consumption of executing task R n Energy consumption required Looking at the computational experience of this part in related papers, we can know that The energy consumption can be calculated using the following formula:
[0078]
[0079] Since the total cost of the system is defined as the weighted sum of the required time delay and energy consumption, the total cost of the system under this model can be obtained by combining the calculation formula of local delay and energy consumption:
[0080]
[0081] In the above formula, the proportional coefficients α and β mean the proportional coefficient of the total system cost to the delay and the proportional coefficient to the energy consumption respectively. If the value of α is large, it means that the system is more sensitive to delay changes in this scenario, otherwise it means that it is more sensitive to energy consumption. Their values depend on the task type. The proportional coefficients satisfy 0≤α≤1, 0≤β≤1 and α+β=1. These two parameters are freely set according to the user's delay and sensitivity.
[0082] Step 4: According to the task offloading calculation model of the device, consider the case where the user offloads part of the task to the MEC server for calculation, that is, Figure 1 Part of the calculation is offloaded.
[0083] The offloading process is divided into the following steps: the user sends the data to be calculated to the base station, the base station then forwards the user's data to the MEC server, the MEC server allocates its own resources to complete the calculation, in order to simplify the scene, the server's resources are evenly distributed to the users who need MEC calculation, and the execution results are returned to the user after the execution is completed. Next, the latency and energy consumption of the above steps will be discussed separately, see steps 41, 42, 43, and 44.
[0084] Step 41, when the device transmits data to the base station, the speed at which the device transmits data in the wireless channel is set to v n , the delay calculation formula is:
[0085]
[0086] Where D n Indicates the size of the data that the user needs to calculate, in kbits;
[0087] Step 42, define the power consumption of device n as P n , then the energy consumption corresponding to step 41 is The calculation formula is:
[0088]
[0089] Step 43, for the MEC task execution process, the delay calculation formula is:
[0090]
[0091] Where D n Indicates the size of the data that the user needs to calculate, in kbits;
[0092] The speed at which a device transmits data in a wireless channel is v n .
[0093] Step 44: The corresponding energy consumption during the MEC task execution process for:
[0094]
[0095] in is the power consumption of device n during MEC task execution, The delay of the MEC executing the task in step 43;
[0096] In step 43 and step 44, the constraint condition needs to be met, and the total amount of MEC computing resources must be greater than the resources allocated to the user;
[0097] Without considering the impact of delay and energy consumption on the system when the results are returned to the user after MEC execution is completed; combining steps 41, 42, 43, and 44, the total expression of system delay and energy consumption under the offloading calculation model can be obtained as follows: represents the total system delay, Represents the total system energy consumption:
[0098]
[0099]
[0100] Where D n Indicates the size of the data that the user needs to calculate, W n For computing tasks, M n The total number of CPUs required to complete the computing task, C n Represents the computing power of the user's device.
[0101] Combining the above two expressions, we can get the total cost expression in the offloading calculation model:
[0102]
[0103] in, represents the total system delay, Represents the total energy consumption of the system. The proportional coefficients α and β respectively represent the proportional coefficient of the total system cost to the delay and the proportional coefficient to the energy consumption.
[0104] In step 5, the total system cost S is obtained by combining the local calculation model in step 3 and the unloaded calculation model in step 4. all It can be expressed as:
[0105]
[0106] in represents the total cost of local offloading, represents the total cost of offloading computation to the edge server, γn represents the offloading decision of the nth user, where γ is 0, which means the task is completely calculated locally, and 1 means all the tasks are offloaded to the MEC server for calculation.
[0107] While minimizing the system cost, some constraints must be met. On the basis of satisfying the constraints, the minimum system cost is obtained. This optimization problem is formulated as follows:
[0108]
[0109]
[0110]
[0111]
[0112]
[0113] Among them C n represents the computing power of the user device, F represents the upper limit of the computing power of the edge computing server, and t n Indicates the upper limit of the user's requirement for latency. represents the total cost of local offloading, represents the total cost of offloading computation to the edge server, γ n represents the offloading decision of the nth user, where γ is 0, which means the task is completely calculated locally, and 1 means all the tasks are offloaded to the MEC server for calculation.
[0114] The constraints are explained as follows: C1 means that because the model only considers complete offloading, the value of γ can only be 0 or 1; C2 means that the time for local calculation or offloading execution of the task cannot exceed the user's tolerance limit for time; C3 means that the resources allocated to a specific user cannot be greater than the total computing capacity of the edge server; C4 means that the total amount of tasks allocated by all users to the edge server for calculation cannot exceed the computing capacity of the edge server.
[0115] In fact, if the traditional enumeration method is used to solve this problem, there are n user devices, and the time complexity of enumerating each device to choose local calculation or offload calculation will be exponential, which is impossible to achieve in reality when n increases. Therefore, in this embodiment, the reinforcement learning method is used to solve this optimization problem. Therefore, the second part of the present invention uses the reinforcement learning method to solve this problem.
[0116] The present invention introduces a reinforcement learning method designed for the above-mentioned edge computing task offloading model from the three elements of reinforcement learning, namely reward, action and state.
[0117] State: The state of the system is described as a binary relation set (tc, ac), where tc = S all , which is the total cost of the system, is defined as the weighted sum of delay and energy consumption.
[0118] in, Indicates the remaining computing capacity of the edge computing server.
[0119] Action: Combine whether each device chooses to offload and the allocation of edge computing server resources to each device into a vector as the action vector, i.e., [γ1, γ2, ...γ n , C1, C2, ..., C n ], where γ i , i∈[1,n] indicates whether to uninstall, and the value is [0,1], C i , i∈[1,n], represents the amount of data uninstalled by the user.
[0120] Reward: After the agent completes a specific action a in the current state s, it will receive a reward R(s, a) in this specific situation. For the model established in the first part, the optimization goal of the system is to obtain the minimum cost. Therefore, the lower the cost, the higher the reward value should be. Therefore, the reward is defined as:
[0121] As discussed above, as the number of devices n increases, the decision space increases exponentially, so a pre-classification method is adopted to reduce the size of the action space. Before the action begins, each user device is judged. If the delay of its local calculation can no longer meet the user's time requirement, that is, This user will be directly judged as performing uninstall calculation, that is, directly assigning γ n = 1. The above pre-classification method can limit the action space by reducing the number of possible state spaces, thereby optimizing the system calculation.
[0122] The edge computing task offloading method with comprehensive perception of latency and energy consumption of the present invention constructs a task offloading model according to the distance between the user and the MEC server, the computing power of MEC and the user, and further helps the user achieve lower consumption in terms of latency and energy consumption.
[0123] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions recorded in the aforementioned embodiments or replace some of the technical features therein with equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
[0124] Except for the technical features described in the specification, all other technical features are known technologies to those skilled in the art.
Claims
1. The edge computing task offloading method with comprehensive perception of latency and energy consumption is characterized by: The edge computing task offloading method with comprehensive perception of latency and energy consumption includes: Step 1: Build an edge computing task offloading model; Step 2: Divide the constructed edge computing task offloading model into a local computing model of each device and a task offloading computing model of this device; Step 3: According to the local computing model of the device, the total cost of local computing is set to the weighted sum of time delay and energy consumption; Step 4: According to the task offloading calculation model of the device, the user offloads part of the task to the MEC server for calculation; Step 5: Combine the local computing model in step 3 and the offload computing model in step 4 to calculate the total system cost.
2. The edge computing task offloading method with comprehensive perception of latency and energy consumption according to claim 1 is characterized in that: In step 1, an edge computing task offloading model is constructed based on the distance between the user and the MEC server and the computing power of the MEC server and the user's device.
3. The edge computing task offloading method with comprehensive perception of latency and energy consumption according to claim 2 is characterized in that: In step 1, it is assumed that each user equipment UE n , their respective computational tasks W n It can be represented by the triple (D n , M n , t n ) represents; where D n Indicates the size of the data that the user needs to calculate, in kbits; M n Indicates the number of CPU cycles required to complete the execution of the user equipment, in Mcycles; t n It indicates the user's satisfaction delay for his task, in seconds. If the delay exceeds this delay, the user's satisfaction cannot be achieved. The user's computing task M n In this model, the task can be executed locally or offloaded to the MEC server. After the task is executed using edge computing, the result is returned to the user. In this model, the method of partially offloading user tasks is not discussed; therefore, the offloading decision of n users can be represented in the form of a one-dimensional vector group, which can be defined as [γ1, γ2, ..., γ n ], γ∈[0, 1], where γ is 0, which means the task is completely calculated locally, and 1 means it is completely offloaded to the MEC server for calculation.
4. The edge computing task offloading method with comprehensive perception of latency and energy consumption according to claim 1 is characterized in that: In step 3, in local computing, the total time delay is the time required for the user to perform local computing, and the total number of CPUs required by the user to perform the computing task is M n Divide by the computing power of the user's device C n , the required delay under this model can be obtained The calculation formula is: The other part of the total cost is the system energy consumption, which is the energy consumption of executing task R n Energy consumption required According to calculation experience, The energy consumption can be calculated using the following formula: Since the total cost of the system is defined as the weighted sum of the required time delay and energy consumption, the total cost of the system under this model can be obtained by combining the calculation formula of local delay and energy consumption: In the above formula, the proportional coefficients α and β mean the proportional coefficients of the total system cost to the delay and to the energy consumption respectively. If the value of α is large, it means that the system is more sensitive to the delay change in this scenario, otherwise it means that it is more sensitive to energy consumption. Their values depend on the task type. The proportionality coefficient satisfies 0≤α≤1, 0≤β≤1 and α+β=1; these two parameters are freely set according to the user's requirements for delay and sensitivity.
5. The edge computing task offloading method with comprehensive perception of latency and energy consumption according to claim 1 is characterized in that: In step 4, the offloading process is divided into the following steps: the user sends the data to be calculated to the base station, and the base station then forwards the user's data to the MEC server. The MEC server allocates its own resources to complete the calculation. In order to simplify the scenario, the server's resources are evenly distributed to users who need MEC calculations. After the execution is completed, the execution results are returned to the user.
6. The edge computing task offloading method with comprehensive perception of latency and energy consumption according to claim 5 is characterized in that: Step 4 specifically includes: Step 41, when the device transmits data to the base station, the speed at which the device transmits data in the wireless channel is set to v n , the delay calculation formula is: Where D n Indicates the size of the data that the user needs to calculate, in kbits; Step 42, define the power consumption of device n as P n , then the energy consumption corresponding to step 41 is The calculation formula is: Step 43, for the MEC task execution process, the delay calculation formula is: Where D n Indicates the size of the data that the user needs to calculate, in kbits; The speed at which a device transmits data in a wireless channel is υ n Step 44: The corresponding energy consumption during the MEC task execution process for: in is the power consumption of device n during MEC task execution, The delay of the MEC executing the task in step 43; In step 43 and step 44, the constraint condition needs to be met, and the total amount of MEC computing resources must be greater than the resources allocated to the user; Without considering the impact of delay and energy consumption on the system when the results are returned to the user after MEC execution is completed; combining steps 41, 42, 43, and 44, the total expression of system delay and energy consumption under the offloading calculation model can be obtained as follows: represents the total system delay, Represents the total system energy consumption: Where D n Indicates the size of the data that the user needs to calculate, W n For computing tasks, M n The total number of CPU cycles required to complete the computing task, G n Represents the computing power of the user's device; Combining the above two expressions, we can get the total cost expression in the offloading calculation model: in, represents the total system delay, Represents the total energy consumption of the system. The proportional coefficients α and β respectively represent the proportional coefficient of the total system cost to the delay and the proportional coefficient to the energy consumption.
7. The edge computing task offloading method with comprehensive perception of latency and energy consumption according to claim 6 is characterized in that: In step 5, the total system cost S is obtained by combining the local calculation model in step 3 and the unloaded calculation model in step 4. all It can be expressed as: in represents the total cost of local offloading, represents the total cost of offloading computation to the edge server, γ n represents the offloading decision of the nth user, where γ is 0, which means the task is completely calculated locally, and 1 means it is completely offloaded to the MEC server for calculation; While minimizing the system cost, some constraints must be met. On the basis of satisfying the constraints, the minimum system cost is obtained. This optimization problem is formulated as follows: Among them C n represents the computing power of the user device, F represents the upper limit of the computing power of the edge computing server, and t n Indicates the upper limit of the user's requirement for latency; in represents the total cost of local offloading, represents the total cost of offloading computation to the edge server, γ n represents the offloading decision of the nth user, where γ is 0, which means the task is completely calculated locally, and 1 means it is completely offloaded to the MEC server for calculation; The constraints are explained as follows: C1 means that because the model only considers complete offloading, the value of γ can only be 0 or 1; C2 means that the time for local calculation or offloading execution of the task cannot exceed the user's tolerance limit for time; C3 means that the resources allocated to a specific user cannot be greater than the total computing capacity of the edge server; C4 means that the total amount of tasks allocated by all users to the edge server for calculation cannot exceed the computing capacity of the edge server.
8. The edge computing task offloading method with comprehensive perception of latency and energy consumption according to claim 7 is characterized in that: The edge computing task unloading method with comprehensive perception of latency and energy consumption also includes, after step 5, step 6, using a reinforcement learning method, namely, rewards, actions and states, to provide an unloading strategy with the least system overhead for user unloading.
9. The edge computing task offloading method with comprehensive perception of latency and energy consumption according to claim 8 is characterized in that: In step 6, the state of the system is described as a binary relation set (tc, ac), where tc = S all , which is the total cost of the system, is defined as the weighted sum of delay and energy consumption; in, represents the remaining computing power of the edge computing server, F is the upper limit of the computing power of the edge computing server, and C n The computing power of the user's device.
10. The edge computing task offloading method with comprehensive perception of latency and energy consumption according to claim 8 is characterized in that: In step 6, whether each device chooses to offload and the allocation of edge computing server resources to each device are combined into a vector as an action vector, that is, [γ1, γ2, ...γ n , C1, C2, ..., C n ], where γ i , i∈[1,n] indicates whether to uninstall, and the value is [0,1], C i , i∈[1,n], represents the amount of data uninstalled by the user.
11. The edge computing task offloading method with comprehensive perception of latency and energy consumption according to claim 8 is characterized in that: In step 6, after completing a specific action a in the current state s, the reward R(s, a) will be obtained in this specific case. For the established task offloading calculation model, the optimization goal of the system is to obtain the minimum cost. Therefore, the lower the cost, the higher the reward value should be. Therefore, the reward is defined as: Among them, tc local is the total cost of local calculation, tc(s, a) is the real cost under the current environment state; as the number of devices n increases, the decision space increases exponentially, so a pre-classification method is adopted to reduce the size of the action space; before the action begins, each user device is judged, if the delay of its local calculation can no longer meet the user's time requirement, that is, This user will be directly judged as performing uninstall calculation, that is, directly assigning γ n =1; The above pre-classification method can limit the action space by reducing the number of possible state spaces, thereby optimizing the system calculation.
