An edge computing offloading method based on task code caching
By introducing task execution code cache in the MEC server, predicting and pre-cacheing the execution code of the computing task, the problem that MEC technology cannot meet the computing requirements in application scenarios with poor communication environment or large task data is solved, and the effect of reducing delay and energy consumption is achieved.
Patent Information
- Application Number
- CN202110962428.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-20
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2041-08-20
AI Technical Summary
In application scenarios where the communication environment is poor or the amount of task data is too large, mobile edge computing (MEC) technology is difficult to meet the computing needs of users, resulting in increased latency and excessive energy consumption.
By introducing task execution code cache in the MEC server, the task computing requirements of the mobile terminal are predicted and the execution code of the computing task is pre-cachedated to reduce data transmission and improve computing efficiency.
It effectively reduces the latency and energy consumption of users' tasks, and improves the computing experience of users in application scenarios where the communication environment is poor or the task data is large.
Smart Images

Figure CN113608799B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of mobile communications and relates to an edge computing offloading method based on task code caching. Background Art
[0002] Although the central processing unit (CPU) equipped in the increasingly developed mobile terminal devices has increasingly powerful computing capabilities, its computing power is still difficult to meet the requirements of users to calculate these emerging applications in a short time. In addition, calculating such new applications with high computing loads usually consumes considerable battery energy, which is unbearable for most terminal devices. Therefore, emerging applications with high computing loads have brought huge computing challenges to mobile terminal devices, and users can hardly get a good user experience by relying solely on these terminal devices.
[0003] In this context, mobile edge computing (MEC) technology was born. MEC is defined as a new platform that provides information technology and cloud computing functions within the wireless access network close to mobile users. Since MEC was proposed, it has received strong support and attention from academia and industry.
[0004] MEC technology still has some problems in scenarios with extremely high computing requirements and unstable communications. MEC's computing mechanism relies heavily on data transmission from the user end to the edge server end. When the communication environment is poor, the wireless transmission rate is usually low, so the data transmission delay will increase, making it difficult to meet the user's computing needs. In addition, in application scenarios with large amounts of task data, the upload of task data will generate a large delay, which is also difficult to meet the user's computing needs.
[0005] In view of the above problems, the present invention aims to improve the existing mobile edge computing offloading technology by introducing task caching technology to further reduce the latency and energy consumption of users in executing tasks, so as to provide users with high-quality computing services in application scenarios with poor communication environment or large task data volume. Summary of the invention
[0006] In view of this, the purpose of the present invention is to provide an edge computing offloading method based on task code caching, so that high-quality computing services can still be provided to users even in poor communication environments or in application scenarios with large amounts of user task data.
[0007] In order to achieve the above object, the present invention provides the following technical solutions:
[0008] An edge computing offloading method based on task code caching, the method includes:
[0009] The existing mobile edge computing offloading technology is improved by introducing task execution code cache in the MEC server. The MEC server observes the historical information of task computing requirements of mobile terminals and the communication environment of mobile terminals, and pre-caches the execution code of some computing tasks in its own storage space by predicting the task computing requirements of future mobile terminals, thereby providing services for future task computing of mobile terminals.
[0010] There are three types of task calculation methods for mobile terminals: local calculation, calculation offloading, and requesting the MEC server to execute directly. If the task code required by the mobile terminal is already stored on the MEC server, the MEC server is requested to execute directly.
[0011] The mobile terminal divides its computing tasks into three parts based on its own computing power, communication environment and computing resources of the MEC server: local computing part, computing offload part and part that requests the MEC server to execute directly;
[0012] The mobile base station allocates available wireless communication resources to each mobile terminal according to the task division of the mobile terminal, and the MEC server allocates computing resources to each computing task for calculation according to the received task computing request and the task offloaded by the mobile terminal.
[0013] Optionally, the task execution code cache is specifically:
[0014] Record the task computing demand status μ of the mobile terminal, the cache status b of the MEC server, and the computing cost Cost of the mobile terminal in the system in each time block; the task computing demand status refers to what tasks the mobile terminal in the network calculates and how many mobile terminals in the network calculate each task;
[0015] The cache status of the MEC server refers to the software code of the tasks stored by the MEC server in the time block and the storage volume; the computing cost of the mobile terminal includes the weighted sum of the task computing delay T and energy consumption E of all mobile terminals in the network, that is, Cost = vT + (1-v)E, where the value range of v is [0,1];
[0016] Based on the recorded historical data, the neural network is used to predict the storage value of the computing task. The storage value of the task is defined as the amount of reduction in the computing cost that the storage of the task can bring to the task computing of the mobile terminal in the network.
[0017] According to the predicted task storage value, the task execution code with the greatest value is selected for caching.
[0018] Optionally, the mobile base station allocates available wireless communication resources to each mobile terminal according to the task division of the mobile terminal:
[0019] The MEC server collects computing task attribute information, location information, and device transmission power information of all mobile terminals in the network;
[0020] Based on the collected information and its own computing power, the MEC server divides the tasks of each mobile terminal into three parts: the local computing part, the computing offload part, and the part that requests the MEC server to execute directly;
[0021] The mobile base station allocates wireless communication bandwidth to the mobile terminal for uploading task data to the MEC server according to the task division of the mobile terminal in the network;
[0022] The MEC server allocates its computing resources to each computing task reasonably and completes the calculation according to the task offloading and request of the mobile terminal.
[0023] The beneficial effect of the present invention is that it can efficiently use wireless resources and computing resources of MEC servers. By pre-caching computing tasks, when the user's computing tasks are cached, the calculation can be completed by uploading a small amount of data to the MEC server. Therefore, the computing performance of the entire network is further improved.
[0024] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:
[0026] Figure 1 It is the overall model diagram of the present invention;
[0027] Figure 2 Compute workflows for tasks at the terminal;
[0028] Figure 3 Workflow for MEC server;
[0029] Figure 4 Calculate the total cost for the system to handle different numbers of mobile terminals in the network;
[0030] Figure 5Calculate the total cost for mobile terminals in the network under different MEC server storage capacities. DETAILED DESCRIPTION
[0031] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.
[0032] Among them, the drawings are only used for illustrative explanations, and they only represent schematic diagrams rather than actual pictures, and should not be understood as limitations on the present invention. In order to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of actual products. For those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.
[0033] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if the terms "upper", "lower", "left", "right", "front", "rear", etc. indicate the orientation or position relationship, they are based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation. Therefore, the terms describing the position relationship in the drawings are only used for illustrative purposes and cannot be understood as limiting the present invention. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.
[0034] Figure 1 The model of the present invention is shown in FIG. The computing task of the mobile terminal is described by a tuple containing four parameters, namely (S, I, D, R). S represents the total number of CPU cycles required to complete the task. I represents the size of the program input parameters of the task. D represents the size of the software code of the task. R represents the size of the task calculation result.
[0035] The task calculation workflow of the mobile terminal is as follows: Figure 2 As shown:
[0036] 1) The MEC server collects the computing task requirements, device computing capabilities, communication channel conditions, task storage status of the MEC server, and MEC computing resource status information of all users in the network, and divides the tasks of each user based on this information. Specifically, each user's task is divided into three parts, namely, the part executed locally, the part offloaded to the MEC server for execution, and the part directly requested to be executed by the MEC server. The three parts of the task are calculated in the following ways.
[0037] 2) For the locally executed part, the mobile terminal uses its own computing resources to complete the calculation.
[0038] 3) For the part that is offloaded to the MEC server for execution. The mobile terminal needs to upload the input parameters and software code corresponding to this part of the task to the MEC server. The frequency band resources occupied by the upload process will be optimally allocated by the mobile base station. After receiving the task uploaded by the mobile terminal, the MEC server allocates computing resources to calculate this part of the task.
[0039] 4) The part that directly requests the MEC server to execute. The software code of this part has been pre-cached on the MEC server. Therefore, the mobile terminal only needs to upload the input parameters of this part of the task to the MEC server, and the frequency band resources occupied by the upload process are still optimally allocated by the mobile base station. After uploading the input parameters, the mobile terminal requests the MEC server to calculate its task, and the MEC server allocates computing resources to calculate it.
[0040] The workflow of the MEC server at the base station is as follows: Figure 3 As shown:
[0041] 1) The MEC server receives tasks and computing requests offloaded from mobile terminals.
[0042] 2) The MEC server allocates computing resources for tasks offloaded by the mobile terminal and tasks requesting computing.
[0043] 3) The MEC server transmits the calculated results to the mobile terminal via wireless transmission.
[0044] 4) The MEC server stores its own storage state b t , task requirement status u of the mobile terminal t (i.e., what tasks are calculated by the mobile terminal), the task calculation delay T of the mobile terminal in the system t and energy consumption E t Store it in the experience pool, and extract a small batch of data from the experience pool for training the neural network.
[0045] 5) Based on the current task demand status of the mobile terminal, predict the user's task demand in the next time period, and cache some application software codes from the cloud through the backhaul link based on the user's communication status, so as to provide computing services for subsequent user tasks.
[0046] Specifically, in this implementation scheme, the MEC server first obtains the execution code of some tasks from the cloud and caches them in its own storage space to provide services for the user's task calculation. Thereafter, the MEC server collects the computing task requirements, device computing capabilities, communication channel conditions, task storage status of the MEC server, and MEC computing resource status information of all mobile terminals in the network. Based on this information, the MEC server optimally divides the tasks of each mobile terminal and allocates an uplink channel to each mobile terminal to support the upload of user data. The mobile terminal completes the data upload of the local computing part and the MEC server computing part (including the unloading part and the part requesting the MEC server to execute) according to its own task division. The MEC server allocates computing resources for each task uploaded by the user and the task requested for calculation, and transmits the calculation results back to the mobile terminal. Finally, the MEC server updates its own task cache status to provide services for the task calculation of the mobile terminal in the next time slot.
[0047] The main simulation parameters of this implementation scheme are:
[0048] The number of mobile terminals in the network is 10, which are randomly distributed in a single cell area of 200m×200m, and the base station is located in the center of the area. The total transmission bandwidth of the uplink transmission channel is set to B=20MHz, and the transmission power of all users is set to 0.5W. The energy coefficient ζ is set to 5×10 -27 The variance of white Gaussian noise is σ 2 =2×10 -13 In addition, the channel gain is modeled as H k =127+30logd k , where d k is the distance between user k and BS. Assume that the CPU frequencies of MEC server and each mobile terminal are 50 GHz and 1 GHz respectively. The CPU cycles required for the computation task are in [1,S max ]Gigacycles. The input parameter size of the computing task is in [1,I max ]MB. The execution code size of the computing task is in [0.1,0.1D max ] randomly selected from GB. Figure 3The system cost in refers to the weighted sum of the task computing delay and energy consumption of all mobile terminals in the network, and the weighting coefficient is 0.5. The storage capacity of the MEC server is 2GB. In order to illustrate the performance of the solution of the present invention, the performance evaluation is carried out by comparing the solution of the present invention with other three benchmark solutions. The first benchmark solution is a joint task caching and local computing solution, which differs from the solution of the present invention in that it does not include the corresponding MEC computing offloading in the solution proposed in this chapter. The second solution is a local computing solution, in which all users perform computing tasks on local devices. The last solution is a MEC computing offloading solution, which differs from the solution of the present invention in that it does not use task caching technology.
[0049] Figure 4 The system costs of the solution of the present invention and three benchmark solutions are shown for different numbers of users. Figure 4 It can be seen that as the number of users increases, the system costs of the four solutions continue to increase. In addition, when the number of devices is small (less than 18), the system cost of the solution of the present invention is almost the same as that of the local computing + task caching solution. This is because the total data volume of all tasks is small, and the MEC server can store the tasks of all users. As the number of devices increases, the MEC server cannot store all tasks, and the system cost of the local computing + task caching solution is greater than that of the solution of the present invention. Compared with the other three benchmark solutions, the system cost of the solution of the present invention is substantially reduced. This system gain mainly comes from the zero cost brought by task caching and the low-cost computing method brought by computational offloading.
[0050] The relationship between system cost and MEC server capacity is as follows: Figure 5 As shown. Figure 5 It can be seen that the system cost of the scheme of the present invention and the cache scheme decreases as the value of the storage capacity of the MEC server increases. This is because as the storage capacity of the MEC server increases, mobile terminals can obtain more low-cost resources to process their tasks. When the storage capacity of the MEC server is large enough, the MEC server can store all content and all tasks can be executed at the lowest cost. Moreover, when the value of the MEC server storage capacity is large enough, the cost curve of the scheme of the present invention is consistent with the curve of the local computing + task caching scheme. The performance of the scheme of the present invention is better than other benchmark schemes because the proposed scheme comprehensively considers storage and computing resources.
[0051] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.
Claims
1. A mobile edge computing MEC offloading method based on task execution code cache, characterized by: The method includes: The existing mobile edge computing offloading technology is improved by introducing task execution code cache in the MEC server. The MEC server observes the historical information of task computing requirements of mobile terminals and the communication environment of mobile terminals, and pre-caches the execution code of some computing tasks in its own storage space by predicting the task computing requirements of future mobile terminals, thereby providing services for future task computing of mobile terminals. There are three types of task calculation methods for mobile terminals: local calculation, calculation offloading, and requesting the MEC server to execute directly. If the task code required by the mobile terminal is already stored on the MEC server, the MEC server is requested to execute directly. The mobile terminal divides its computing tasks into three parts based on its own computing power, communication environment and computing resources of the MEC server: local computing part, computing offload part and part that requests the MEC server to execute directly; The mobile base station allocates available wireless communication resources to each mobile terminal according to the task division of the mobile terminal, and the MEC server allocates computing resources to each computing task for calculation according to the received task computing request and the task offloaded by the mobile terminal; The task execution code cache is specifically: Record the task computing demand status μ of the mobile terminal, the cache status b of the MEC server, and the computing cost Cost of the mobile terminal in the system in each time block; the task computing demand status refers to what tasks the mobile terminal in the network calculates and how many mobile terminals in the network calculate each task; The cache status of the MEC server refers to the software code of the tasks stored by the MEC server in the time block and the storage volume; the computing cost of the mobile terminal includes the weighted sum of the task computing delay T and energy consumption E of all mobile terminals in the network, that is, Cost = vT + (1-v)E, where the value range of v is [0,1]; Based on the recorded historical data, the neural network is used to predict the storage value of the computing task. The storage value of the task is defined as the amount of reduction in the computing cost that the storage of the task can bring to the task computing of the mobile terminal in the network. According to the predicted task storage value, the task execution code with the largest value is selected for caching; The mobile base station allocates available wireless communication resources to each mobile terminal according to the task division of the mobile terminal: The MEC server collects computing task attribute information, location information, and device transmission power information of all mobile terminals in the network; Based on the collected information and its own computing power, the MEC server divides the tasks of each mobile terminal into three parts: the local computing part, the computing offload part, and the part that requests the MEC server to execute directly; The mobile base station allocates wireless communication bandwidth to the mobile terminal for uploading task data to the MEC server according to the task division of the mobile terminal in the network; The MEC server allocates its computing resources to each computing task reasonably and completes the calculation according to the task offloading and request of the mobile terminal; Among them, the specific workflow of the MEC server is: 1) The MEC server receives tasks and computing requests unloaded from mobile terminals; 2) The MEC server allocates computing resources for tasks unloaded by mobile terminals and tasks requested for computing and performs computing; 3) The MEC server transmits the calculated results to the mobile terminal through wireless transmission; 4) The MEC server stores its own storage status, the task requirement status of the mobile terminal, the task computing delay and energy consumption data of the mobile terminal in the system into the experience pool, and extracts part of the data from the experience pool for neural network training; 5) According to the current task requirement status of the mobile terminal, the user's task requirements in the next time period are predicted, and combined with the user's communication status, some application software codes are cached from the cloud through the backhaul link to provide computing services for future user tasks.