Task unloading method and apparatus for mobile edge computing, device, and medium
By obtaining the delay, energy consumption and cost overhead of mobile terminals and servers, and combining the weight coefficient, we optimize the task unloading strategy in mobile edge computing, we solve the problem of poor unloading decision-making effect in the existing technology, and improve the comprehensiveness of decision-making and efficiency.
Patent Information
- Application Number
- PCT/CN2024/084530
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-05-05
- Filing Date
- 2024-03-28
- Publication Date
- 2024-11-14
AI Technical Summary
In the prior art, the task unloading decision method of mobile edge computing is incomplete, resulting in poor unloading decision-making effect.
By obtaining the delay overhead, energy consumption overhead and cost overhead of the mobile terminal and server, the uninstallation strategy of the task to be calculated includes offloading the task to the mobile terminal or server, and conducting a comprehensive evaluation based on preset formulas and weight coefficients.
It improves the effectiveness and efficiency of task offload decisions, optimizes the delay, energy consumption and cost in mobile edge computing systems, and provides a more comprehensive basis for offload strategy decisions.
Smart Images

Figure CN2024084530_14112024_PF_FP_ABST
Abstract
Description
Task offloading method, device, equipment and medium for mobile edge computing
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on May 5, 2023, with application number 202310495140.X, and entitled “Task offloading method, device, equipment and medium for mobile edge computing”, the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The present application belongs to the field of edge computing technology, and in particular relates to a task offloading method, apparatus, device and medium for mobile edge computing. Background Art
[0004] Mobile edge computing provides cloud services and IT (Information Technology) environments at the edge of the network for application developers and service providers. Its goal is to deliver computing, storage, and network bandwidth close to data inputs or users. With the rapid development of internet technology, users' computing and data demands on mobile devices are increasing, and this, in turn, places higher demands on storage capacity and processor processing power.
[0005] In the related art, the early offloading decision-making method for the pending computing tasks of the mobile terminal device is not perfect, and the offloading decision effect is poor.
[0006] Summary of the Invention
[0007] The present application provides a task offloading method, apparatus, device and medium for mobile edge computing, so as to solve the problem that the early offloading decision method for the computing tasks of mobile terminal devices is imperfect and the offloading decision effect is poor.
[0008] In order to solve the above technical problems, this application is implemented as follows:
[0009] In a first aspect, the present application provides a task offloading method for mobile edge computing, the method comprising:
[0010] Obtaining a first delay overhead and a first energy consumption overhead required by a mobile terminal in a mobile edge computing system to process a task to be calculated, and determining a first target overhead based on the first delay overhead and the first energy consumption overhead; the first target overhead is used to represent an estimated overhead of offloading the task to be calculated to the mobile terminal;
[0011] For any server among the multiple servers included in the mobile edge computing system, obtain a second latency overhead required for the server to process the task to be calculated, as well as a second energy consumption overhead and a second cost overhead required for the server to process the task to be calculated, and determine a second target overhead based on the second latency overhead, the second energy consumption overhead, and the second cost overhead; the second target overhead is used to represent an estimated overhead of offloading the task to be calculated to the server;
[0012] Based on the first target overhead and multiple second target overheads corresponding to multiple servers, an offloading strategy for the task to be calculated is determined; the offloading strategy includes offloading the task to be calculated to a mobile terminal or offloading the task to be calculated to a target server; the target server belongs to multiple servers.
[0013] In some embodiments of the present application, obtaining a first delay overhead and a first energy consumption overhead required for a mobile terminal in a mobile edge computing system to process a task to be calculated includes:
[0014] Obtaining the number of operating cycles of the local processor, the processor frequency of the local processor, and the effective capacitance coefficient of the local processor required for the mobile terminal to execute the task to be calculated;
[0015] Determining a first latency overhead based on a first preset formula, a number of operating cycles, and a processor frequency;
[0016] Among them, the first preset formula is: c u d u Indicates the number of operating cycles, f u Indicates the processor frequency, Indicates the first delay overhead;
[0017] Determining a first energy consumption cost based on a second preset formula, the number of operating cycles, the processor frequency, and the effective capacitance coefficient;
[0018] Among them, the second preset formula is: ρ represents the effective capacitance coefficient, Indicates the first energy consumption cost.
[0019] In some embodiments of the present application, obtaining the second latency overhead, the second energy consumption overhead, and the second cost overhead required by the server to process the task to be calculated includes:
[0020] Estimate the processing time required for the server to process the task to be calculated as the target processing time, and estimate the upload time required to upload the task to be calculated to the server as the target upload time;
[0021] Determining a second latency overhead based on a third preset formula, the target processing time, and the target upload time;
[0022] Among them, the third preset formula is: represents the target processing time, Indicates the target upload time, Indicates the second delay overhead.
[0023] In some embodiments of the present application, obtaining the second energy consumption and the second cost required by the server to process the task to be calculated includes:
[0024] Determining a second energy consumption cost based on a fourth preset formula, the target upload energy consumption, and the target idle energy consumption;
[0025] Among them, the fourth preset formula is: Indicates the target upload energy consumption, represents the target idle energy consumption, represents the second energy consumption overhead;
[0026] The target upload energy consumption is the estimated energy consumption of uploading the task to be calculated to the server, and the target idle energy consumption is the estimated idle energy consumption of the mobile terminal when waiting for the server to process the task to be calculated;
[0027] Determining a second cost based on a fifth preset formula, the number of operating cycles, and the usage fee corresponding to the unit number of operating cycles;
[0028] Among them, the fifth preset formula is: b uv =β v c u d u , β v Indicates the usage fee corresponding to the unit number of operating cycles.
[0029] In some embodiments of the present application, after determining the first latency overhead based on the first preset formula, the number of operating cycles, and the processor frequency, the method includes:
[0030] When the first delay overhead is greater than the preset delay threshold, the offloading strategy of the task to be calculated is directly determined to be offloading the task to be calculated to the target server.
[0031] In some embodiments of the present application, determining the first energy consumption cost based on the second preset formula, the number of operating cycles, the processor frequency, and the effective capacitance coefficient includes:
[0032] When the first delay overhead is not greater than the preset delay threshold, the first energy consumption overhead is determined based on a second preset formula, the number of operating cycles, the processor frequency, and the effective capacitance coefficient.
[0033] In some embodiments of the present application, determining the second energy consumption cost based on the fourth preset formula, the target upload energy consumption, and the target idle energy consumption includes:
[0034] When the second delay overhead is not greater than the preset delay threshold, the second energy consumption overhead is determined based on a fourth preset formula, the target upload energy consumption, and the target idle energy consumption.
[0035] In some embodiments of the present application, the method further comprises:
[0036] When the second delay overhead is greater than the preset delay threshold or the second cost overhead is greater than the preset cost threshold, the offloading strategy of the task to be calculated is directly determined to be offloading the task to be calculated to the mobile terminal.
[0037] In some embodiments of the present application, the method further comprises:
[0038] The delay weight coefficient and energy consumption weight coefficient are preset.
[0039] Determining a first target cost based on the first delay cost and the first energy consumption cost includes:
[0040] Determine a first target cost based on a sixth preset formula, a product of the delay weight coefficient and the first delay cost, and a product of the energy consumption weight coefficient and the first energy consumption cost;
[0041] Among them, the sixth preset formula is: α1 represents the delay weight coefficient, represents the first delay overhead, α2 represents the energy consumption weight coefficient, represents the first energy consumption, Indicates the first target cost.
[0042] In some embodiments of the present application, the method further comprises:
[0043] Pre-set cost weight coefficient;
[0044] Determining a second target overhead based on the second delay overhead, the second energy consumption overhead, and the second cost overhead includes:
[0045] Determining a second target cost based on a seventh preset formula, a product of the delay weight coefficient and the second delay cost, a product of the energy consumption weight coefficient and the second energy consumption cost, and a product of the cost weight coefficient and the second cost cost;
[0046] Among them, the seventh preset formula is: α1 represents the delay weight coefficient, represents the second delay overhead, α2 represents the energy consumption weight coefficient, represents the second energy consumption cost, α3 represents the cost weight coefficient, buv represents the second cost overhead, Indicates the secondary target cost.
[0047] In some embodiments of the present application, determining the second target cost based on the seventh preset formula, the product of the delay weight coefficient and the second delay cost, the product of the energy consumption weight coefficient and the second energy consumption cost, and the product of the cost weight coefficient and the second cost cost includes:
[0048] When the second cost overhead is not greater than the preset cost threshold, the second target overhead is determined based on the seventh preset formula, the product of the delay weight coefficient and the second delay overhead, the product of the energy consumption weight coefficient and the second energy consumption overhead, and the product of the cost weight coefficient and the second cost overhead.
[0049] In some embodiments of the present application, determining an offloading strategy for a task to be computed based on a first target cost and multiple second target costs corresponding to multiple servers includes:
[0050] Determining, based on the multiple second target costs corresponding to the multiple servers, the second target cost with the smallest value among the multiple second target costs as the minimum target cost;
[0051] Based on the minimum target cost and the first target cost, an offloading strategy for the task to be calculated is determined.
[0052] In some embodiments of the present application, after determining the second target overhead based on the second latency overhead, the second energy consumption overhead, and the second cost overhead, the method includes:
[0053] Recording the second target cost into the target decision list corresponding to the mobile terminal;
[0054] Determining, based on multiple second target costs corresponding to the multiple servers, a second target cost having a minimum value among the multiple second target costs as the minimum target cost, includes:
[0055] When the second target costs corresponding to multiple servers are all recorded, the second target cost with the smallest value in the target decision list is obtained as the minimum target cost.
[0056] In some embodiments of the present application, determining an offloading strategy for a task to be computed based on a minimum target overhead and a first target overhead includes:
[0057] If the minimum target cost is less than the first target cost, determining the offloading strategy of the task to be calculated as offloading the task to be calculated to the target server;
[0058] If the minimum target cost is greater than the first target cost, the offloading strategy of the task to be calculated is determined to be offloading the task to be calculated to the mobile terminal.
[0059] In some embodiments of the present application, when the minimum target cost is equal to the first target cost, determining the offloading strategy of the task to be calculated based on the minimum target cost and the first target cost further includes:
[0060] If the value of the delay weight coefficient among the delay weight coefficient, the energy consumption weight coefficient, and the cost weight coefficient is the largest, then based on the relationship between the first delay cost and the second delay cost corresponding to the minimum target cost, determine the offloading strategy of the task to be calculated;
[0061] If the energy consumption weight coefficient is the largest among the delay weight coefficient, the energy consumption weight coefficient, and the cost weight coefficient, then the offloading strategy of the task to be calculated is determined based on the relationship between the first energy consumption cost and the second energy consumption cost corresponding to the minimum target cost;
[0062] If the value of the cost weight coefficient among the delay weight coefficient, the energy consumption weight coefficient and the cost weight coefficient is the largest, then the offloading strategy of the task to be calculated is directly determined to be offloading the task to be calculated to the mobile terminal.
[0063] In some embodiments of the present application, determining an offloading strategy for a task to be calculated based on a magnitude relationship between a first latency overhead and a second latency overhead corresponding to a minimum target overhead includes:
[0064] If the first delay overhead is greater than the second delay overhead corresponding to the minimum target overhead, determining the offloading strategy of the task to be calculated is to offload the task to be calculated to the target server;
[0065] If the first delay overhead is less than the second delay overhead corresponding to the minimum target overhead, determining that the offloading strategy of the task to be calculated is to offload the task to be calculated to the mobile terminal;
[0066] If the first delay overhead is equal to the second delay overhead corresponding to the minimum target overhead, the offloading strategy of the task to be calculated is determined based on the second energy consumption overhead corresponding to the minimum target overhead or the second cost overhead corresponding to the minimum target overhead.
[0067] In some embodiments of the present application, determining an offloading strategy for a task to be computed based on a relationship between a first energy consumption cost and a second energy consumption cost corresponding to a minimum target cost includes:
[0068] If the first energy consumption cost is greater than the second energy consumption cost corresponding to the minimum target cost, determining that the offloading strategy of the task to be calculated is to offload the task to be calculated to the target server;
[0069] If the first energy consumption cost is less than the second energy consumption cost corresponding to the minimum target cost, determining that the offloading strategy of the task to be calculated is to offload the task to be calculated to the mobile terminal;
[0070] If the first energy consumption overhead is equal to the second energy consumption overhead corresponding to the minimum target overhead, the offloading strategy of the task to be calculated is determined based on the second delay overhead corresponding to the minimum target overhead or the second cost overhead corresponding to the minimum target overhead.
[0071] In a second aspect, the present application provides a task offloading device for mobile edge computing, the device comprising:
[0072] A first acquisition module is configured to acquire a first latency overhead and a first energy consumption overhead required by a mobile terminal in a mobile edge computing system to process a task to be calculated, and determine a first target overhead based on the first latency overhead and the first energy consumption overhead; the first target overhead is used to represent an estimated overhead of offloading the task to be calculated to the mobile terminal;
[0073] a second acquisition module, configured to acquire, for any server among the plurality of servers included in the mobile edge computing system, a second latency overhead required for the server to process the task to be calculated, as well as a second energy consumption overhead and a second cost overhead required for the server to process the task to be calculated, and determine a second target overhead based on the second latency overhead, the second energy consumption overhead, and the second cost overhead; the second target overhead is used to represent an estimated overhead of offloading the task to be calculated to the server;
[0074] The first determination module is used to determine the unloading strategy of the task to be calculated based on the first target overhead and multiple second target overheads corresponding to multiple servers; the unloading strategy includes unloading the task to be calculated to the mobile terminal or unloading the task to be calculated to the target server; the target server belongs to multiple servers.
[0075] In some embodiments of the present application, the first acquisition module includes:
[0076] A first acquisition submodule is used to acquire the number of operating cycles of the local processor, the processor frequency of the local processor, and the effective capacitance coefficient of the local processor required for the mobile terminal to perform the task to be calculated;
[0077] A second determining module is configured to determine a first delay overhead based on a first preset formula, a number of operating cycles, and a processor frequency;
[0078] Among them, the first preset formula is: c u d u Indicates the number of operating cycles, f u Indicates the processor frequency, Indicates the first delay overhead;
[0079] A third determining module is configured to determine a first energy consumption cost based on a second preset formula, the number of operating cycles, the processor frequency, and the effective capacitance coefficient;
[0080] Among them, the second preset formula is: ρ represents the effective capacitance coefficient, Indicates the first energy consumption cost.
[0081] In some embodiments of the present application, the second acquisition module includes:
[0082] The first estimation module is used to estimate the processing time required by the server to process the task to be calculated as the target processing time, and to estimate the upload time required to upload the task to be calculated to the server as the target upload time;
[0083] a fourth determining module, configured to determine a second latency overhead based on a third preset formula, a target processing time, and a target upload time;
[0084] Among them, the third preset formula is: represents the target processing time, Indicates the target upload time, Indicates the second delay overhead.
[0085] In some embodiments of the present application, the second acquisition module includes:
[0086] a fifth determining module, configured to determine a second energy consumption cost based on a fourth preset formula, the target upload energy consumption, and the target idle energy consumption;
[0087] Among them, the fourth preset formula is: Indicates the target upload energy consumption, represents the target idle energy consumption, represents the second energy consumption overhead; the target upload energy consumption is the estimated energy consumption of uploading the task to be calculated to the server, and the target idle energy consumption is the estimated idle energy consumption when the mobile terminal is waiting for the server to process the task to be calculated;
[0088] A sixth determining module, configured to determine a second cost based on the fifth preset formula, the number of operating cycles, and the usage fee corresponding to the unit number of operating cycles;
[0089] Among them, the fifth preset formula is: b uv =β v c u d u , β v Indicates the usage fee corresponding to the unit number of operating cycles.
[0090] In some embodiments of the present application, the apparatus further comprises:
[0091] The seventh determining module is used to directly determine the offloading strategy of the task to be calculated as offloading the task to be calculated to the target server when the first delay overhead is greater than the preset delay threshold.
[0092] In some embodiments of the present application, the third determining module includes:
[0093] The third determining submodule is configured to determine the first energy consumption overhead based on a second preset formula, the number of operating cycles, the processor frequency, and the effective capacitance coefficient when the first delay overhead is not greater than a preset delay threshold.
[0094] In some embodiments of the present application, the fifth determining module includes:
[0095] The fourth determining submodule is configured to determine the second energy consumption overhead based on a fourth preset formula, the target upload energy consumption, and the target idle energy consumption when the second delay overhead is not greater than the preset delay threshold.
[0096] In some embodiments of the present application, the apparatus further comprises:
[0097] The fifth determining submodule is configured to directly determine the offloading strategy of the task to be calculated as offloading the task to be calculated to the mobile terminal when the second delay overhead is greater than a preset delay threshold or the second cost overhead is greater than a preset cost threshold.
[0098] In some embodiments of the present application, the apparatus further comprises:
[0099] The first setting module is used to pre-set the delay weight coefficient and the energy consumption weight coefficient.
[0100] The first acquisition module includes:
[0101] a sixth determining submodule, configured to determine a first target cost based on a sixth preset formula, a product of the delay weight coefficient and the first delay cost, and a product of the energy consumption weight coefficient and the first energy consumption cost;
[0102] Among them, the sixth preset formula is: α1 represents the delay weight coefficient, represents the first delay overhead, α2 represents the energy consumption weight coefficient, represents the first energy consumption, Indicates the first target cost.
[0103] In some embodiments of the present application, the apparatus further comprises:
[0104] The second setting module is used to pre-set the cost weight coefficient;
[0105] The second acquisition module includes:
[0106] a seventh determination submodule, configured to determine the second target cost based on a seventh preset formula, a product of the delay weight coefficient and the second delay cost, a product of the energy consumption weight coefficient and the second energy consumption cost, and a product of the cost weight coefficient and the second cost cost;
[0107] Among them, the seventh preset formula is: α1 represents the delay weight coefficient, represents the second delay overhead, α2 represents the energy consumption weight coefficient, represents the second energy consumption cost, α3 represents the cost weight coefficient, b uv represents the second cost overhead, Indicates the secondary target cost.
[0108] In some embodiments of the present application, the seventh determining submodule includes:
[0109] The eighth determination submodule is used to determine the second target overhead based on the seventh preset formula, the product of the delay weight coefficient and the second delay overhead, the product of the energy consumption weight coefficient and the second energy consumption overhead, and the product of the cost weight coefficient and the second cost overhead when the second cost overhead is not greater than the preset cost threshold.
[0110] In some embodiments of the present application, the first determining module includes:
[0111] a ninth determining submodule, configured to determine, based on the plurality of second target costs corresponding to the plurality of servers, a second target cost having the smallest value among the plurality of second target costs, as the minimum target cost;
[0112] The tenth determining submodule is configured to determine an offloading strategy for the task to be calculated based on the minimum target overhead and the first target overhead.
[0113] In some embodiments of the present application, the apparatus further comprises:
[0114] A first recording module is configured to record the second target cost into a target decision list corresponding to the mobile terminal;
[0115] The ninth determination submodule includes:
[0116] The second acquisition submodule is used to obtain the second target cost with the smallest value in the target decision list as the minimum target cost when the second target costs corresponding to multiple servers are all recorded.
[0117] In some embodiments of the present application, the tenth determining submodule includes:
[0118] an eleventh determining submodule, configured to determine, if the minimum target cost is less than the first target cost, that the offloading strategy of the task to be calculated is to offload the task to be calculated to the target server;
[0119] The twelfth determining submodule is configured to determine, if the minimum target overhead is greater than the first target overhead, that the offloading strategy for the task to be calculated is to offload the task to be calculated to the mobile terminal.
[0120] In some embodiments of the present application, when the minimum target cost is equal to the first target cost, the tenth determining submodule includes:
[0121] a thirteenth determination submodule, configured to determine an offloading strategy for the task to be calculated based on a relationship between the first delay overhead and a second delay overhead corresponding to the minimum target overhead if the delay weight coefficient has the largest value among the delay weight coefficient, the energy consumption weight coefficient, and the cost weight coefficient;
[0122] A fourteenth determination submodule is configured to determine an offloading strategy for the task to be calculated based on a relationship between the first energy consumption overhead and a second energy consumption overhead corresponding to the minimum target overhead if the energy consumption weight coefficient among the delay weight coefficient, the energy consumption weight coefficient, and the cost weight coefficient is the largest;
[0123] The fifteenth determination submodule is used to directly determine the offloading strategy of the task to be calculated as offloading the task to be calculated to the mobile terminal if the value of the cost weight coefficient among the delay weight coefficient, the energy consumption weight coefficient and the cost weight coefficient is the largest.
[0124] In some embodiments of the present application, the thirteenth determining submodule includes:
[0125] The sixteenth determining submodule is configured to determine that the offloading strategy for the task to be calculated is to offload the task to be calculated to the target server if the first delay overhead is greater than the second delay overhead corresponding to the minimum target overhead.
[0126] The seventeenth determining submodule is configured to determine that the offloading strategy of the task to be calculated is to offload the task to be calculated to the mobile terminal if the first delay overhead is less than the second delay overhead corresponding to the minimum target overhead.
[0127] The eighteenth determination submodule is used to determine the unloading strategy of the task to be calculated based on the second energy consumption overhead corresponding to the minimum target overhead or the second cost overhead corresponding to the minimum target overhead if the first delay overhead is equal to the second delay overhead corresponding to the minimum target overhead.
[0128] In some embodiments of the present application, the fourteenth determining submodule includes:
[0129] The nineteenth determination submodule is used to determine that the offloading strategy of the task to be calculated is to offload the task to be calculated to the target server if the first energy consumption overhead is greater than the second energy consumption overhead corresponding to the minimum target overhead.
[0130] The twentieth determination submodule is configured to determine that the offloading strategy of the task to be calculated is to offload the task to be calculated to the mobile terminal if the first energy consumption overhead is less than the second energy consumption overhead corresponding to the minimum target overhead.
[0131] The twenty-first determination submodule is used to determine the unloading strategy of the task to be calculated based on the second delay overhead corresponding to the minimum target overhead or the second cost overhead corresponding to the minimum target overhead if the first energy consumption overhead is equal to the second energy consumption overhead corresponding to the minimum target overhead.
[0132] In a third aspect, the present application provides an electronic device comprising: a processor, a memory, and a computer program stored in the memory and runnable on the processor, characterized in that the processor implements the above-mentioned task offloading method for mobile edge computing when executing the program.
[0133] In a fourth aspect, the present application provides a non-volatile readable storage medium, which, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform the above-mentioned task offloading method for mobile edge computing.
[0134] In an embodiment of the present application, a first delay cost and a first energy cost required by a mobile terminal in a mobile edge computing system to process a task to be calculated are obtained, and a first target cost is determined based on the first delay cost and the first energy cost; the first target cost is used to characterize the estimated cost of offloading the task to be calculated to the mobile terminal; for any of the multiple servers included in the mobile edge computing system, a second delay cost required by the server to process the task to be calculated, and a second energy cost and a second cost cost required by the server to process the task to be calculated are obtained, and a second target cost is determined based on the second delay cost, the second energy cost and the second cost cost; the second target cost is used to characterize the estimated cost of offloading the task to be calculated to the server; based on the first target cost and multiple second target costs corresponding to multiple servers, an offloading strategy for the task to be calculated is determined; the offloading strategy includes offloading the task to be calculated to the mobile terminal or offloading the task to be calculated to the target server; the target server belongs to multiple servers. In this way, by determining the first target cost and multiple second target costs, decision support for the offloading strategy can be provided to the user, and a more efficient offloading strategy can be obtained by combining the estimated costs corresponding to different offloading strategies. At the same time, three differentiated indicators of latency, energy consumption and cost are introduced to determine the first target overhead and the second target overhead. The latency overhead, energy consumption overhead and cost overhead of task offloading in the mobile edge computing system are comprehensively considered to optimize the decision-making basis of the offloading strategy, so that the coverage of the first target overhead and the second target overhead is wider and more comprehensive, thereby making the offloading decision method more perfect and improving the decision-making effect of the offloading decision. BRIEF DESCRIPTION OF THE DRAWINGS
[0135] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0136] FIG1 is a flowchart of a method for offloading tasks for mobile edge computing provided by an embodiment of the present application;
[0137] FIG2 is an architecture diagram of mobile edge computing provided by an embodiment of the present application;
[0138] FIG3 is a specific flow chart of a task offloading method for mobile edge computing provided in an embodiment of the present application;
[0139] FIG4 is a structural diagram of a task offloading device for mobile edge computing provided by an embodiment of the present application;
[0140] FIG5 is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0141] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. The described embodiments are part of the embodiments of this application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0142] FIG1 is a flowchart of a method for offloading tasks for mobile edge computing provided by an embodiment of the present application. As shown in FIG1 , the method may include:
[0143] Step 101: Obtain a first delay overhead and a first energy consumption overhead required for a mobile terminal in a mobile edge computing system to process a task to be calculated, and determine a first target overhead based on the first delay overhead and the first energy consumption overhead; the first target overhead is used to represent the estimated overhead of offloading the task to be calculated to the mobile terminal.
[0144] In some embodiments of the present application, a mobile edge computing system may include multiple mobile terminals, multiple base stations, and multiple mobile edge computing (MEC) servers. MEC servers can be deployed in a dispersed manner near mobile terminals. There can be multiple mobile terminals within the physical coverage of one MEC server, and one mobile terminal can be covered by multiple adjacent MEC servers. In mobile edge computing, users of mobile terminals are allowed to offload the entire task to be calculated to a MEC server adjacent to the mobile terminal, and the MEC server processes the task to be calculated; or the entire task to be calculated can be offloaded to a local processor of the mobile terminal, such as a central processing unit (CPU), and the local processor processes the task to be calculated. As shown in Figure 2, if the task to be calculated is chosen to be offloaded to the MEC server, the mobile terminal device can upload the task to be calculated to the MEC server through the base station, wherein the base station is used to provide wireless coverage and is an interface device for the mobile terminal to access the Internet. The mobile terminal device uploads the task to be calculated to the MEC server through the wireless channel provided by the base station.
[0145] For any mobile terminal in the mobile edge computing system, the first delay overhead and the first energy consumption overhead can be determined based on the basic data of the local processor of the mobile terminal and the data size of the task to be calculated, wherein the first delay overhead is the time required for the mobile terminal to process the task to be calculated if the task to be calculated is unloaded to the mobile terminal; the first energy consumption overhead is the energy consumption generated by the mobile terminal processing the task to be calculated if the task to be calculated is unloaded to the mobile terminal. Based on the first delay overhead and the first energy consumption overhead, the first target overhead can be determined, and the first target overhead can represent the overall overhead required for the mobile terminal to process the task to be calculated if the task to be calculated is unloaded to the mobile terminal. Exemplarily, the first delay overhead, the first energy consumption overhead and the first target overhead can be obtained by a first algorithm model, and the first algorithm model can be deployed inside the mobile terminal. When there is a task to be calculated on the mobile terminal, the first algorithm model can be used to perform overhead calculation on the mobile terminal.
[0146] Step 102: For any server among the multiple servers included in the mobile edge computing system, obtain the second delay overhead required for the server to process the task to be calculated, as well as the second energy consumption overhead and the second cost overhead required for the server to process the task to be calculated, and determine the second target overhead based on the second delay overhead, the second energy consumption overhead and the second cost overhead; the second target overhead is used to represent the estimated overhead of offloading the task to be calculated to the server.
[0147] In some embodiments of the present application, the server in the mobile edge computing system may be an MEC server, and the second delay overhead may include: if the task to be calculated is offloaded to the server, the time it takes for the task to be calculated to be uploaded to the server, the time it takes for the server to process the task to be calculated, and the time it takes for the processing result to be transmitted back to the mobile terminal; the second energy consumption overhead may include: the energy consumption generated by uploading the task to be calculated to the server and the idle energy consumption of the mobile terminal waiting for the server to return the processing result. Since the servers in mobile edge computing are paid for use, it is necessary to determine the fee required to process the task to be calculated based on the server's charging price, that is, the second cost overhead. For any server among multiple servers, obtain the second delay overhead, second energy consumption overhead, and second cost overhead required for the server to process the task to be calculated, and determine the second target overhead. The second target overhead can represent the overall overhead required if the task to be calculated is offloaded to the server. Exemplarily, the second delay overhead, the second energy consumption overhead, the second cost overhead and the second target overhead can be obtained through the second algorithm model. The second algorithm model can be deployed inside the mobile terminal. When there are tasks to be calculated on the mobile terminal, the first algorithm model and the second overhead model can be used to perform overhead calculations respectively on the mobile terminal to evaluate the overhead corresponding to the two unloading strategies.
[0148] Step 103: Determine an offloading strategy for the task to be calculated based on the first target overhead and multiple second target overheads corresponding to multiple servers; the offloading strategy includes offloading the task to be calculated to a mobile terminal or offloading the task to be calculated to a target server; the target server belongs to multiple servers.
[0149] In some embodiments of the present application, based on the first target overhead and multiple second target overheads corresponding to multiple servers, the unloading strategy of the task to be calculated can be determined according to the size relationship of the multiple overhead values, that is, the task to be calculated can be unloaded to the mobile terminal or the task to be calculated can be unloaded to the target server, wherein at least one server can be selected from multiple servers as the target server according to actual needs, and the specific selection method is not limited in the embodiments of the present application.
[0150] It is understandable that the task to be calculated in some embodiments of the present application is a complete computing task and cannot be divided. Therefore, the unloading strategy in some embodiments of the present application is a different unloading strategy corresponding to two different types of unloading objects, that is, unloading the task to be calculated to the mobile terminal or unloading the task to be calculated to the server. In this way, in the early judgment process, the type of unloading object is selected without considering which server to be unloaded to. The initial judgment is made quickly and easily through the method provided in the embodiment of the present application to obtain a preliminary unloading strategy with higher efficiency. The specific unloading method can be further determined based on the preliminary unloading strategy. In the case of determining that the unloading strategy of the task to be calculated is to unload the task to be calculated to the target server, which server among the multiple servers to be unloaded to can be selected according to actual needs, and the embodiment of the present application does not impose any restrictions on this.
[0151] In summary, in an embodiment of the present invention, a first delay cost and a first energy consumption cost required by a mobile terminal in a mobile edge computing system to process a task to be calculated are obtained, and a first target cost is determined based on the first delay cost and the first energy consumption cost; the first target cost is used to characterize the estimated cost of offloading the task to be calculated to the mobile terminal; for any of the multiple servers included in the mobile edge computing system, the second delay cost required by the server to process the task to be calculated, and the second energy consumption cost and the second cost cost required by the server to process the task to be calculated are obtained, and a second target cost is determined based on the second delay cost, the second energy consumption cost and the second cost cost; the second target cost is used to characterize the estimated cost of offloading the task to be calculated to the server; based on the first target cost and multiple second target costs corresponding to multiple servers, an offloading strategy for the task to be calculated is determined; the offloading strategy includes offloading the task to be calculated to the mobile terminal or offloading the task to be calculated to the target server; the target server belongs to multiple servers. In this way, by determining the first target cost and multiple second target costs, decision support for the offloading strategy can be provided to the user, and a more efficient offloading strategy can be obtained by combining the estimated costs corresponding to different offloading strategies. At the same time, three differentiated indicators of latency, energy consumption and cost are introduced to determine the first target overhead and the second target overhead. The latency overhead, energy consumption overhead and cost overhead of task offloading in the mobile edge computing system are comprehensively considered to optimize the decision-making basis of the offloading strategy, so that the coverage of the first target overhead and the second target overhead is wider and more comprehensive, thereby making the offloading decision method more perfect and improving the decision-making effect of the offloading decision.
[0152] Furthermore, the embodiment of the present application makes a preliminary judgment on the offloading decision strategy in a user-oriented mobile edge computing scenario, that is, first determines whether to offload the task to be calculated to the mobile terminal or the server, and provides a more practical decision-making basis for the user of the mobile terminal. Compared with judging whether to offload the task to be calculated to the mobile terminal or to a specific server, the offloading method determination process provided by the embodiment of the present application is relatively simple, which improves the efficiency of the offloading strategy determination process.
[0153] In some embodiments of the present application, step 101 may include the following steps:
[0154] Step 201: Obtain the number of operating cycles of the local processor, the processor frequency of the local processor, and the effective capacitance coefficient of the local processor required for the mobile terminal to execute the task to be calculated.
[0155] In some embodiments of the present application, the number of processor cycles required for the task to be calculated can be determined based on the size of the task to be calculated and the computing resources consumed by the task per bit. For example, assuming that in an application scenario with multiple mobile terminals and multiple servers, there are U mobile terminals, the set is U = {1, 2, ..., u, ..., U}, and V servers, the set is V = {1, 2, ..., v, ..., V}. Assume that each mobile terminal u has a task to be calculated, and each task to be calculated is indivisible. The size of the task to be calculated can be expressed as d u , the unit is bits. The computing resources consumed by the task per bit can be expressed as c u , can also be expressed as the number of CPU cycles required to complete a unit bit task, in cycles / bit, then c u d u It can represent the number of processor cycles required for the task to be calculated. When the task to be calculated is offloaded to the mobile terminal for processing, c u d u It can also represent the number of operating cycles of the local processor required by the mobile terminal to perform the task to be calculated. To obtain the processor frequency of the local processor, you can use f u ρ represents the processor's computing power when offloading computational tasks to a mobile terminal. The effective capacitance coefficient of the local processor can be expressed as ρ. This coefficient depends on the CPU structure in the mobile terminal and may correspond to different effective capacitance coefficients for different CPUs. The processor frequency and effective capacitance coefficient of the local processor can be obtained from the local processor's calibration parameters.
[0156] Step 202: Determine a first latency overhead based on a first preset formula, the number of operating cycles, and the processor frequency.
[0157] In some embodiments of the present application, the first delay overhead may be calculated according to a first preset formula using a first algorithm model based on the number of operating cycles and the processor frequency.
[0158] (First preset formula);
[0159] in, represents the first delay overhead, i.e. the processing time of offloading the computing task to the mobile terminal for processing, c u is the computing resources consumed by the task per bit, d u is the size of the task to be calculated, f u The processor frequency of the local processor.
[0160] Step 203: Determine a first energy consumption based on a second preset formula, the number of operating cycles, the processor frequency, and the effective capacitance coefficient.
[0161] In some embodiments of the present application, the first energy consumption overhead can be calculated according to a second preset formula based on the number of operating cycles, processor frequency, and effective capacitance coefficient using a first algorithm model.
[0162] (Second preset formula);
[0163] in, represents the first energy consumption, i.e. the energy consumption generated by offloading the computing task to the mobile terminal for processing, c u is the computing resources consumed by the task per bit, d u is the size of the task to be calculated, ρ is the effective capacitance coefficient of the local processor, ρ(f u ) 2 It indicates the energy consumption per unit running cycle when offloading the computing task to the mobile terminal for execution.
[0164] In an embodiment of the present invention, the first delay overhead and the first energy consumption overhead are calculated respectively by the number of operating cycles, processor frequency and effective capacitance coefficient, so that the delay overhead and energy consumption overhead of offloading the task to be calculated to the mobile terminal can be obtained conveniently and quickly, thereby improving decision-making efficiency.
[0165] In some embodiments of the present application, step 202 may include the following steps:
[0166] Step 301: Estimate the processing time required for the server to process the task to be calculated as the target processing time, and estimate the upload time for uploading the task to be calculated to the server as the target upload time.
[0167] In some embodiments of the present application, the delay overhead of unloading the task to be calculated to the server can be mainly divided into three parts: task upload time, task processing time, and processing result return time. Since the size of the processing result is much smaller than the size of the task to be calculated, correspondingly, under the condition of a certain data transmission rate, the processing result return time is much smaller than the task upload time. Therefore, the processing result return time can be ignored. Pre-estimate the upload time of uploading the task to be calculated to the server and the processing time of the server processing the task to be calculated. In some embodiments of the present application, the upload time of uploading the task to be calculated to the server can be determined by the second algorithm model based on the data transmission rate and the size of the task to be calculated according to the following formula:
[0168] in, Indicates the upload time of the task to be calculated to the server, d u is the size of the task to be calculated, r uv The data transmission rate for offloading the computing tasks to the server, r uv It can be obtained by the following formula:
[0169] Among them, P uv is the transmission power of task transmission between the mobile terminal and the server, h uv is the wireless channel gain, s uv is the distance from the mobile terminal to the server, and τ is the fading factor. 2 It is understood that the above data can be set according to the commonly used settings in this field, for example: P uv The power can be obtained according to the specific configuration of the mobile terminal device, such as 1W. B is the wireless channel bandwidth from the mobile terminal to the server, which is determined by the network speed and the generally set range, such as 2-10MHZ. uv A certain distance can be set in the simulation environment, according to actual needs, such as 0.8km. The τ fading factor can be set to -4. σ 2 Gaussian white noise can take the value of 1×10 -13 .
[0170] Based on the second algorithm model, the processing time required for the server to process the task to be calculated is determined according to the following formula according to the number of processor operating cycles required for the task to be calculated and the computing resources allocated by the server to the mobile terminal.
[0171] Among them, c u is the computing resources consumed by the task per bit, du is the size of the task to be calculated, f uv The computing resources allocated by the server to the mobile terminal are the computing power of the mobile terminal to offload the computing tasks to be performed by the server.
[0172] Step 302: Determine a second delay overhead based on a third preset formula, a target processing time, and a target upload time.
[0173] In some embodiments of the present application, the second delay overhead is determined according to a third preset formula based on the target processing time and the target upload time through the second algorithm model.
[0174] (Third preset formula);
[0175] In some embodiments of the present application, the second delay overhead is calculated based on the target processing time and the target upload time, which can make the delay data represented by the second delay overhead more comprehensive, which is conducive to a comprehensive evaluation of the second target overhead and a more accurate determination of the offloading strategy.
[0176] In some embodiments of the present application, step 202 may further include the following steps:
[0177] Step 303: Determine the second energy consumption based on the fourth preset formula, the target upload energy consumption, and the target idle energy consumption; the target upload energy consumption is the estimated energy consumption for uploading the task to be calculated to the server, and the target idle energy consumption is the estimated idle energy consumption when the mobile terminal waits for the server to process the task to be calculated.
[0178] In some embodiments of the present application, the target upload energy consumption can be determined by the transmission power of the mobile terminal when uploading the task to be calculated to the server, the size of the task to be calculated, and the data transmission rate of offloading the task to be calculated to the server for execution. The target idle energy consumption can be determined by the estimated idle power when the mobile terminal waits for the server to process the task to be calculated, the number of processor operating cycles required for the task to be calculated, and the data transmission rate of offloading the task to be calculated to the server for execution. In this way, through the second algorithm model, based on the target upload energy consumption and the target idle energy consumption, the second energy consumption overhead is determined according to the fourth preset formula
[0179] (Fourth preset formula);
[0180] in, Indicates the target upload energy consumption, Indicates the transmission power of the mobile terminal uploading the task to be calculated to the server, d u is the size of the task to be calculated, r uvThe data transfer rate for offloading computing tasks to the server for execution. represents the target idle energy consumption, represents the estimated idle power of the mobile terminal when waiting for the server to process the computing task, c u d u Indicates the number of processor cycles required for the task to be calculated, f uv The computing resources allocated by the server to the mobile terminal. as well as The value can be set according to the common settings in this field, such as transmission power Can be set to 1W, idle power Can be set to 1×10 -5 W.
[0181] Step 304: Determine a second cost based on the fifth preset formula, the number of operating cycles, and the usage fee corresponding to the unit number of operating cycles.
[0182] In some embodiments of the present application, since the size of the task to be calculated is constant, the number of processor operating cycles required to complete the task to be calculated is also constant. Therefore, through the second algorithm model, based on the number of processor operating cycles required for the task to be calculated and the usage fee corresponding to the unit number of server operating cycles, the second cost b is determined according to the fifth preset formula. uv .
[0183] b uv =β v c u d u (Fifth preset formula);
[0184] Among them, β v Indicates the usage fee corresponding to the number of server operation cycles, which can be determined based on the server rental price. u d u Indicates the number of processor cycles required to complete the computational task.
[0185] In some embodiments of the present application, the second energy consumption overhead is determined based on the target upload energy consumption and the target idle energy consumption. The target idle energy consumption is considered on the basis of the target upload energy consumption, so that the energy consumption data represented by the second energy consumption overhead is more comprehensive, which is conducive to a comprehensive evaluation of the second target overhead to more accurately determine the unloading strategy.
[0186] In some embodiments of the present application, after step 202, the embodiment of the present application may further include the following steps:
[0187] Step 401: When the first delay overhead is greater than a preset delay threshold, directly determine the offloading strategy of the task to be calculated as offloading the task to be calculated to a target server.
[0188] In some embodiments of the present application, the preset delay threshold can be set according to the user's delay requirements. When the first delay overhead is greater than the preset delay threshold, it indicates that the first delay overhead has exceeded the maximum tolerable delay that the user can receive. At this time, it can be determined that if the task to be calculated is offloaded to the mobile terminal, the processing time of the mobile terminal does not meet the user's requirements. Therefore, the offloading strategy of the task to be calculated can be directly determined to offload the target task to be calculated to the server.
[0189] In some embodiments of the present application, when the first delay overhead is greater than a preset delay threshold, it indicates that the first delay overhead has exceeded the maximum tolerable delay that the user can receive. Directly determining the offloading strategy can save the time spent on determining the offloading strategy to a certain extent.
[0190] In some embodiments of the present application, step 203 may include:
[0191] Step 402: When the first delay overhead is not greater than a preset delay threshold, determine a first energy consumption overhead based on a second preset formula, the number of operating cycles, the processor frequency, and the effective capacitance coefficient.
[0192] In some embodiments of the present application, when the first delay overhead is not greater than the preset delay threshold, that is, the first delay overhead is less than or equal to the preset delay threshold, it indicates that the first delay overhead has not reached the maximum tolerable delay that the user can receive. Therefore, the first energy consumption overhead can continue to be calculated to determine the subsequent unloading strategy based on the first target overhead.
[0193] That is, the calculation of the first target cost includes the constraint St. First delay overhead Not greater than the preset delay threshold In the case of , the first target cost is calculated for subsequent judgment; otherwise, the offloading strategy is directly determined to offload the task to be calculated to the target server.
[0194] In some embodiments of the present application, by comparing the first delay overhead and the preset delay threshold, a corresponding unloading strategy can be determined according to the actual needs of the user, and when the first delay overhead is greater than the preset delay threshold, the unloading strategy is directly determined, which saves the subsequent calculation process and improves the efficiency of determining the unloading strategy to a certain extent.
[0195] In some embodiments of the present application, step 303 may include the following steps:
[0196] Step 501: When the second delay overhead is not greater than a preset delay threshold, determine the second energy consumption overhead based on a fourth preset formula, a target upload energy consumption, and a target idle energy consumption.
[0197] In some embodiments of the present application, when the second delay overhead is not greater than the preset delay threshold, that is, when the second delay overhead is less than or equal to the preset delay threshold, it indicates that the second delay overhead has not reached the maximum tolerable delay that the user can receive. Therefore, the second energy consumption overhead can be continued to be calculated to determine the subsequent unloading strategy. Correspondingly, when the second cost overhead is not greater than the preset cost threshold, the second target overhead is determined based on the second delay overhead, the second energy consumption overhead, and the second cost overhead. In this way, by comparing the second delay overhead and the preset delay threshold, a corresponding unloading strategy can be determined based on the actual needs of the user.
[0198] In some embodiments of the present application, the embodiments of the present application may include the following steps:
[0199] Step 601: When the second delay overhead is greater than a preset delay threshold or the second cost overhead is greater than a preset cost threshold, directly determine the offloading strategy of the task to be calculated as offloading the task to be calculated to the mobile terminal.
[0200] In some embodiments of the present application, when the second delay overhead is greater than the preset delay threshold or the second cost overhead is greater than the preset cost threshold, it indicates that the second delay overhead of offloading the task to be calculated to the server has exceeded the maximum tolerable delay that the user can accept, or the second cost overhead of offloading the task to be calculated to the server has exceeded the maximum cost threshold that the user can accept. At this time, it can be determined that if the task to be calculated is offloaded to the server, it cannot meet the user's needs. Therefore, the offloading strategy of the task to be calculated can be directly determined as offloading the task to be calculated to the mobile terminal. In this way, by comparing the second delay overhead and the preset delay threshold, the second cost overhead and the preset cost threshold, the offloading strategy can be directly determined when the second delay overhead is greater than the preset delay threshold or the second cost overhead is greater than the preset cost threshold, which saves the subsequent calculation process and improves the efficiency of determining the offloading strategy to a certain extent.
[0201] In some embodiments of the present application, the embodiments of the present application may further include the following steps:
[0202] Step 701: pre-set a delay weight coefficient and an energy consumption weight coefficient.
[0203] In some embodiments of the present application, users can pre-set corresponding weight coefficients for latency and energy consumption based on their task requirements: the latency weight coefficient and the energy consumption weight coefficient. By setting the latency weight coefficient and the energy consumption weight coefficient, the user's different emphasis and requirements for various indicators can be represented. Accordingly, the values of the latency weight coefficient, the energy consumption weight coefficient, and the cost weight coefficient can measure the user's emphasis and requirements for different types of indicators.
[0204] Accordingly, step 101 may further include the following steps:
[0205] Step 702: Determine a first target cost based on a sixth preset formula, a product of a delay weight coefficient and a first delay cost, and a product of an energy consumption weight coefficient and a first energy consumption cost.
[0206] In some embodiments of the present application, the first target cost is calculated based on the product of the delay weight coefficient and the first delay cost and the product of the energy consumption weight coefficient and the first energy consumption cost. It can be obtained through the sixth preset formula.
[0207] (Sixth preset formula);
[0208] Here, α1 may represent a delay weight coefficient, and α2 may represent an energy consumption weight coefficient.
[0209] In some embodiments of the present application, by multiplying the delay weight coefficient by the first delay overhead and the energy consumption weight coefficient by the first energy consumption overhead, the first target overhead can reflect the user's preference to a certain extent, providing a basis for determining the unloading strategy.
[0210] In some embodiments of the present application, the embodiments of the present application may further include the following steps:
[0211] Step 703: Preset the cost weight coefficient.
[0212] In some embodiments of the present application, users can pre-set the cost weight coefficient corresponding to the cost expenditure according to their own task requirements, where the sum of the delay weight coefficient, the energy consumption weight coefficient, and the cost weight coefficient should be 1. That is, α1, α2, and α3 represent the delay weight coefficient, the energy consumption weight coefficient, and the cost weight coefficient respectively, then α1+α2+α3=1. By adjusting the values of the delay weight coefficient, the energy consumption weight coefficient, and the cost weight coefficient, it is equivalent to adjusting the priority and importance of the three indicators of delay, energy consumption, and cost, which can be determined by the user's preference for delay sensitivity, energy consumption constraints, and expected cost.
[0213] Accordingly, step 102 may further include the following steps:
[0214] Step 704: Determine the second target cost based on the seventh preset formula, the product of the delay weight coefficient and the second delay cost, the product of the energy consumption weight coefficient and the second energy consumption cost, and the product of the cost weight coefficient and the second cost cost.
[0215] In some embodiments of the present application, the second target cost is calculated based on the product of the delay weight coefficient and the second delay cost, the product of the energy consumption weight coefficient and the second energy consumption cost, and the product of the cost weight coefficient and the second cost cost. It can be obtained through the seventh preset formula.
[0216] (Seventh preset formula);
[0217] Among them, for any mobile terminal in the mobile edge computing system, the values of each weight coefficient when calculated using the sixth preset formula and the seventh preset formula are the same. For different mobile terminals in the mobile edge computing system, the values of the corresponding weight coefficients can be set according to the needs of the users of the mobile terminals, that is, the weight coefficients corresponding to different mobile terminals can be different.
[0218] In some embodiments of the present application, by setting the delay weight coefficient, energy consumption weight coefficient and cost weight coefficient according to the degree of importance users place on different indicators, the differentiated indicator preferences of different mobile terminal users can be met, and the flexibility of setting the weight coefficients is improved, so that the values of the first target overhead and the second target overhead are closer to user preferences, thereby making more favorable unloading decisions.
[0219] In some embodiments of the present application, step 704 may include the following steps:
[0220] Step 801: When the second cost overhead is not greater than the preset cost threshold, determine the second target overhead based on the seventh preset formula, the product of the delay weight coefficient and the second delay overhead, the product of the energy consumption weight coefficient and the second energy consumption overhead, and the product of the cost weight coefficient and the second cost overhead.
[0221] In some embodiments of the present application, if the second cost is not greater than a preset cost threshold, indicating that the second cost has not reached the preset cost threshold acceptable to the user, a second target cost can be determined based on the product of the latency weight coefficient and the second latency cost, the product of the energy consumption weight coefficient and the second energy consumption cost, and the product of the cost weight coefficient and the second cost. In this way, a corresponding offloading strategy can be determined based on meeting the user's cost threshold to a certain extent.
[0222] In some embodiments of the present application, step 103 may include the following steps:
[0223] Step 901: Based on multiple second target costs corresponding to multiple servers, determine the second target cost with the smallest value among the multiple second target costs as the minimum target cost.
[0224] In some embodiments of the present application, the embodiments of the present application further include the following steps:
[0225] Step 1001: Record the second target cost into the target decision list corresponding to the mobile terminal.
[0226] In some embodiments of the present application, for any of the multiple servers, the second target cost calculated in steps 301-304, 501, 601, and step 801 is determined as the second target cost corresponding to the server and recorded in a target decision list corresponding to the mobile terminal. The target decision list may represent an offload decision preference list of the mobile terminal. The number of second target costs in the target decision list is less than or equal to the number of servers in the mobile edge computing system.
[0227] Accordingly, step 901 may include the following steps:
[0228] Step 1002: When the second target costs corresponding to multiple servers are all recorded, the second target cost with the smallest value in the target decision list is obtained as the minimum target cost.
[0229] In some embodiments of the present application, after any of the multiple servers has executed steps 301-304, 501, 601, and step 801, the data in the target decision list is sorted according to the magnitude of the second target cost. The second target cost with the smallest value is obtained from the target decision list and determined as the minimum target cost.
[0230] In some embodiments of the present application, by recording the second target cost into the target decision list, it is possible to facilitate determination of the minimum target cost from multiple second target costs, thereby improving the efficiency of determining the minimum target cost to a certain extent.
[0231] In some embodiments of the present application, the server allocates computing resources to mobile terminals and needs to ensure that the sum of computing resources allocated to different mobile terminals is less than or equal to the maximum computing capacity of the server. Therefore, when the mobile terminal obtains multiple second target costs in the uninstall preference list, it sends a request message to the server corresponding to the second target cost with the smallest value. The request message should carry the size of the computing resources that need to be allocated to the mobile terminal. After receiving the request message, the server can make a judgment based on its own current computing capacity. If it can provide the corresponding computing resources to the mobile terminal, it returns an approval request message to the mobile terminal and adjusts the server's own current computing capacity based on the size of the computing resources that need to be allocated to the mobile terminal. At this time, the mobile terminal can determine the second target cost with the smallest value as the minimum target cost; if the server's current computing capacity cannot meet the need to provide the corresponding computing resources to the mobile terminal, it returns a rejection request message to the mobile terminal. After the mobile terminal receives the rejection request message, it indicates that the server corresponding to the second target cost with the smallest value is no longer able to undertake the corresponding offloading computing task. Therefore, the second target cost corresponding to the server in the uninstall preference list can be eliminated, and the above operation is repeated based on the server corresponding to the second target cost with the smallest value in the eliminated uninstall preference list until the minimum target cost that meets the preset conditions is determined (the preset condition is that the server corresponding to the minimum target cost can undertake the offloading computing task of the mobile terminal). That is, there is a constraint in the process of determining the minimum target cost: This indicates that for any server, the computing resources allocated to the mobile terminal cannot exceed the total computing capacity of the server. Indicates the maximum computing capacity of the server.
[0232] Step 902: Determine an offloading strategy for the task to be calculated based on the minimum target cost and the first target cost.
[0233] In some embodiments of the present application, step 902 may include the following steps:
[0234] Step 9021: If the minimum target cost is less than the first target cost, the offloading strategy of the task to be calculated is determined to be offloading the task to be calculated to the target server.
[0235] In some embodiments of the present application, if the minimum target overhead is less than the first target overhead, it indicates that the overhead of offloading the task to be calculated to the server is less than the overhead of offloading the task to be calculated to the mobile terminal, that is, the overhead of offloading the task to be calculated to the server is minimized and the system benefit is maximized, then the unloading strategy of the task to be calculated can be determined as offloading the task to be calculated to the target server.
[0236] Step 9022: If the minimum target cost is greater than the first target cost, the offloading strategy of the task to be calculated is determined to be offloading the task to be calculated to the mobile terminal.
[0237] In some embodiments of the present application, if the minimum target overhead is greater than the first target overhead, it indicates that the overhead of offloading the task to be calculated to the server is greater than the overhead of offloading the task to be calculated to the mobile terminal, that is, the overhead of offloading the task to be calculated to the mobile terminal is minimized and the system benefit is maximized, then the offloading strategy of the task to be calculated can be determined as offloading the task to be calculated to the mobile terminal.
[0238] In some embodiments of the present application, the minimum target overhead is determined, and the minimum overhead generated by offloading the task to be calculated to the server can be simulated. Based on the comparison of the minimum target overhead and the first target overhead, an offloading strategy with the lowest overhead and relatively stable processing performance can be further determined, thereby improving the processing efficiency of the task to be calculated to a certain extent.
[0239] In some embodiments of the present application, when the minimum target cost is equal to the first target cost, step 902 may further include the following steps:
[0240] Step 9023: If the value of the delay weight coefficient among the delay weight coefficient, the energy consumption weight coefficient and the cost weight coefficient is the largest, then determine the offloading strategy of the task to be calculated based on the relationship between the first delay overhead and the second delay overhead corresponding to the minimum target overhead.
[0241] In some embodiments of the present application, when the minimum target overhead is equal to the first target overhead, the overhead of offloading the task to be calculated to the server is the same as the overhead of offloading the task to be calculated to the mobile terminal. The unloading strategy can be further determined based on the numerical values of the delay weight coefficient, the energy consumption weight coefficient, and the cost weight coefficient. If the value of the delay weight coefficient is the largest, it indicates that the user attaches more importance to the delay index and is more sensitive to the delay. In this case, the unloading strategy of the task to be calculated can be determined based on the delay index corresponding to the delay weight coefficient, that is, the first delay overhead and the second delay overhead corresponding to the minimum target overhead. Since the second target overhead is obtained based on the second delay overhead, the second energy consumption overhead, and the second cost overhead, each second target overhead will have its corresponding second delay overhead, and since the minimum target overhead is determined from multiple second target overheads, the minimum target overhead also has its corresponding second delay overhead. That is, the second delay overhead corresponding to the minimum target overhead is the second delay overhead used when calculating the minimum target overhead.
[0242] In some embodiments of the present application, step 9023 may include the following steps:
[0243] Step 9023a: If the first delay overhead is greater than the second delay overhead corresponding to the minimum target overhead, the offloading strategy of the task to be calculated is determined to be offloading the task to be calculated to the target server.
[0244] Step 9023b: If the first delay overhead is less than the second delay overhead corresponding to the minimum target overhead, determine that the offloading strategy of the task to be calculated is to offload the task to be calculated to the mobile terminal.
[0245] Step 9023c: If the first delay overhead is equal to the second delay overhead corresponding to the minimum target overhead, determine the offloading strategy of the task to be calculated based on the second energy consumption overhead corresponding to the minimum target overhead or the second cost overhead corresponding to the minimum target overhead.
[0246] In some embodiments of the present application, when the first delay overhead is less than the second delay overhead corresponding to the minimum target overhead, the unloading strategy of the task to be calculated is determined to be unloading the task to be calculated to the mobile terminal; when the first delay overhead is greater than the second delay overhead corresponding to the minimum target overhead, the unloading strategy of the task to be calculated is determined to be unloading the task to be calculated to the target server; when the first delay overhead is equal to the second delay overhead corresponding to the minimum target overhead, the unloading strategy of the task to be calculated is determined based on the second energy consumption overhead corresponding to the minimum target overhead or the second cost overhead corresponding to the minimum target overhead, that is, when the indicator values corresponding to the weight coefficients with the largest values are the same, the unloading strategy can be determined based on the size of the indicator value corresponding to the weight coefficient with the second largest value, until the optimal unloading strategy is determined.
[0247] In some embodiments of the present application, the weight coefficient with the largest value among the energy consumption weight coefficient and the cost weight coefficient can be determined. If the energy consumption weight coefficient has the largest value, then based on the relationship between the first energy consumption cost and the second energy consumption cost corresponding to the minimum target cost, the unloading strategy of the task to be calculated is determined; if the cost weight coefficient has the largest value, then the unloading strategy of the task to be calculated is directly determined to be unloading the task to be calculated to the mobile terminal. For example, if the numerical order of the delay weight coefficient, the energy consumption weight coefficient, and the cost weight coefficient is: delay weight coefficient > energy consumption weight coefficient > cost weight coefficient, then when the first delay cost is equal to the second delay cost corresponding to the minimum target cost, based on the relationship between the first energy consumption cost and the second energy consumption cost corresponding to the minimum target cost, the unloading strategy of the task to be calculated is determined. For specific steps, please refer to 9024a-9024c; if the numerical order of the delay weight coefficient, the energy consumption weight coefficient, and the cost weight coefficient is: delay weight coefficient > cost weight coefficient > energy consumption weight coefficient, then the unloading strategy of the task to be calculated is directly determined to be unloading the task to be calculated to the mobile terminal.
[0248] Step 9024: If the energy consumption weight coefficient is the largest among the delay weight coefficient, the energy consumption weight coefficient, and the cost weight coefficient, the unloading strategy of the task to be calculated is determined based on the relationship between the first energy consumption overhead and the second energy consumption overhead corresponding to the minimum target overhead.
[0249] In some embodiments of the present application, if the value of the energy consumption weight coefficient is the largest, it indicates that the user attaches more importance to the energy consumption indicator and is more sensitive to energy consumption. In this case, the unloading strategy of the task to be calculated can be determined based on the energy consumption indicator corresponding to the energy consumption weight coefficient, that is, the first energy consumption cost and the size of the second energy consumption cost corresponding to the minimum target cost. Since the second target cost is obtained based on the second delay cost, the second energy consumption cost and the second cost cost, each second target cost will have its corresponding second energy consumption cost, and since the minimum target cost is determined from multiple second target costs, the minimum target cost also has its corresponding second energy consumption cost, that is, the second energy consumption cost corresponding to the minimum target cost is the second energy consumption cost used when calculating the minimum target cost.
[0250] In some embodiments of the present application, step 9024 may include the following steps:
[0251] Step 9024a: If the first energy consumption cost is greater than the second energy consumption cost corresponding to the minimum target cost, the offloading strategy of the task to be calculated is determined to be offloading the task to be calculated to the target server.
[0252] Step 9024b: If the first energy consumption overhead is less than the second energy consumption overhead corresponding to the minimum target overhead, the offloading strategy of the task to be calculated is determined to be offloading the task to be calculated to the mobile terminal.
[0253] Step 9024c: If the first energy consumption overhead is equal to the second energy consumption overhead corresponding to the minimum target overhead, determine the offloading strategy of the task to be calculated based on the second delay overhead corresponding to the minimum target overhead or the second cost overhead corresponding to the minimum target overhead.
[0254] In some embodiments of the present application, when the first energy consumption cost is less than the second energy consumption cost corresponding to the minimum target cost, the unloading strategy of the task to be calculated is determined to be unloading the task to be calculated to the mobile terminal; when the first energy consumption cost is greater than the second energy consumption cost corresponding to the minimum target cost, the unloading strategy of the task to be calculated is determined to be unloading the task to be calculated to the target server. When the first energy consumption cost is equal to the second energy consumption cost corresponding to the minimum target cost, the unloading strategy of the task to be calculated is determined based on the second delay cost corresponding to the minimum target cost or the second cost cost corresponding to the minimum target cost. That is, when the indicator values corresponding to the largest weight coefficients are the same, the unloading strategy can be determined based on the indicator value corresponding to the second largest weight coefficient until the optimal unloading strategy is determined.
[0255] In some embodiments of the present application, the weight coefficient with the largest value among the delay weight coefficient and the cost weight coefficient can be determined. If the delay weight coefficient has the largest value, then based on the relationship between the first delay cost and the second delay cost corresponding to the minimum target cost, the unloading strategy of the task to be calculated is determined; if the cost weight coefficient has the largest value, then the unloading strategy of the task to be calculated is directly determined to be unloading the task to be calculated to the mobile terminal. For example, if the delay weight coefficient, the energy consumption weight coefficient, and the cost weight coefficient are ranked as follows: energy consumption weight coefficient > delay weight coefficient > cost weight coefficient, then when the first energy consumption cost is equal to the second energy consumption cost corresponding to the minimum target cost, based on the relationship between the first delay cost and the second delay cost corresponding to the minimum target cost, the unloading strategy of the task to be calculated is determined. For specific steps, please refer to 9023a-9023c; if the delay weight coefficient, the energy consumption weight coefficient, and the cost weight coefficient are ranked as follows: energy consumption weight coefficient > cost weight coefficient > delay weight coefficient, then the unloading strategy of the task to be calculated is directly determined to be unloading the task to be calculated to the mobile terminal.
[0256] Step 9025: If the value of the cost weight coefficient among the delay weight coefficient, the energy consumption weight coefficient and the cost weight coefficient is the largest, then the offloading strategy of the task to be calculated is directly determined to be offloading the task to be calculated to the mobile terminal.
[0257] In some embodiments of the present application, if the value of the cost weight coefficient is the largest, it indicates that the user attaches greater importance to the cost indicator and is more sensitive to cost. In this case, the offloading strategy of the task to be calculated can be determined based on the cost indicator corresponding to the cost weight coefficient. In this case, since the cost overhead of offloading the task to be calculated to the mobile terminal is 0, the offloading strategy of the task to be calculated can be directly determined to be offloading the task to be calculated to the mobile terminal.
[0258] In some embodiments of the present application, the user preference information represented by the weight coefficient is used to further determine the uninstallation strategy based on the indicator value corresponding to the weight coefficient with the largest value when the minimum target overhead is equal to the first target overhead, so as to provide personalized and flexible judgment basis for users with different needs.
[0259] As shown in Figure 3, Figure 3 shows a specific flow chart of a task offloading method for mobile edge computing. For any mobile terminal among n mobile terminals 1, 2..., n, a first delay cost and a first energy consumption cost are determined by a first algorithm model. When the first delay cost is greater than a preset delay threshold, the offloading strategy is determined to be offloading the task to be calculated to the target server. When the first delay cost is not greater than the preset delay threshold, the first energy consumption cost is determined. A second delay cost is determined by a second algorithm model. When the second delay cost is greater than the preset delay threshold, the offloading strategy is determined to be offloading the task to be calculated to the mobile terminal. When the second delay cost is not greater than the preset delay threshold, the second energy consumption cost and the second cost cost are determined. When the second cost cost is greater than the preset cost threshold, the offloading strategy is determined to be offloading the task to be calculated to the mobile terminal. When the second cost cost is not greater than the preset cost threshold, the second target cost is determined. Based on the first delay cost and the first energy consumption cost, the first target cost is determined. For the second target overheads corresponding to multiple servers, the minimum target overhead is determined. When the first target overhead is less than the minimum target overhead, the unloading strategy is determined to offload the task to be calculated to the mobile terminal; when the first target overhead is greater than the minimum target overhead, the unloading strategy is determined to offload the task to be calculated to the target server.
[0260] FIG4 is a structural diagram of a task offloading device for mobile edge computing provided by an embodiment of the present application. The device 110 may include:
[0261] The first acquisition module 1101 is used to obtain the first delay overhead and the first energy consumption overhead required for the mobile terminal in the mobile edge computing system to process the task to be calculated, and determine the first target overhead based on the first delay overhead and the first energy consumption overhead; the first target overhead is used to characterize the estimated overhead of offloading the task to be calculated to the mobile terminal.
[0262] The second acquisition module 1102 is used to obtain, for any server among the multiple servers included in the mobile edge computing system, the second delay overhead required for the server to process the task to be calculated, as well as the second energy consumption overhead and the second cost overhead required for the server to process the task to be calculated, and determine the second target overhead based on the second delay overhead, the second energy consumption overhead and the second cost overhead; the second target overhead is used to represent the estimated overhead of offloading the task to be calculated to the server.
[0263] The first determination module 1103 is used to determine the unloading strategy of the task to be calculated based on the first target overhead and multiple second target overheads corresponding to multiple servers; the unloading strategy includes unloading the task to be calculated to the mobile terminal or unloading the task to be calculated to the target server; the target server belongs to multiple servers.
[0264] In some embodiments of the present application, the first acquisition module 1101 includes:
[0265] The first acquisition submodule is used to acquire the number of operating cycles of the local processor, the processor frequency of the local processor, and the effective capacitance coefficient of the local processor required for the mobile terminal to execute the task to be calculated.
[0266] A second determining module is configured to determine a first delay overhead based on a first preset formula, a number of operating cycles, and a processor frequency;
[0267] Among them, the first preset formula is: c u d u Indicates the number of operating cycles, f u Indicates the processor frequency, Indicates the first delay overhead.
[0268] A third determining module is configured to determine a first energy consumption cost based on a second preset formula, the number of operating cycles, the processor frequency, and the effective capacitance coefficient;
[0269] Among them, the second preset formula is: ρ represents the effective capacitance coefficient, Indicates the first energy consumption cost.
[0270] In some embodiments of the present application, the second obtaining module 1102 includes:
[0271] The first estimation module is used to estimate the processing time required for the server to process the task to be calculated as the target processing time, and to estimate the upload time required for uploading the task to be calculated to the server as the target upload time.
[0272] a fourth determining module, configured to determine a second latency overhead based on a third preset formula, a target processing time, and a target upload time;
[0273] Among them, the third preset formula is: represents the target processing time, Indicates the target upload time, Indicates the second delay overhead.
[0274] In some embodiments of the present application, the second obtaining module 1102 includes:
[0275] a fifth determining module, configured to determine a second energy consumption cost based on a fourth preset formula, the target upload energy consumption, and the target idle energy consumption;
[0276] Among them, the fourth preset formula is: Indicates the target upload energy consumption, represents the target idle energy consumption, Represents the second energy consumption overhead; the target upload energy consumption is the estimated energy consumption of uploading the task to be calculated to the server, and the target idle energy consumption is the estimated idle energy consumption when the mobile terminal waits for the server to process the task to be calculated.
[0277] A sixth determining module, configured to determine a second cost based on the fifth preset formula, the number of operating cycles, and the usage fee corresponding to the unit number of operating cycles;
[0278] Among them, the fifth preset formula is: b uv =β v c u d u , β v Indicates the usage fee corresponding to the unit number of operating cycles.
[0279] In some embodiments of the present application, the apparatus 110 further includes:
[0280] The seventh determining module is used to directly determine the offloading strategy of the task to be calculated as offloading the task to be calculated to the target server when the first delay overhead is greater than the preset delay threshold.
[0281] In some embodiments of the present application, the third determining module includes:
[0282] The third determining submodule is configured to determine the first energy consumption overhead based on a second preset formula, the number of operating cycles, the processor frequency, and the effective capacitance coefficient when the first delay overhead is not greater than a preset delay threshold.
[0283] In some embodiments of the present application, the fifth determining module includes:
[0284] The fourth determining submodule is configured to determine the second energy consumption overhead based on a fourth preset formula, the target upload energy consumption, and the target idle energy consumption when the second delay overhead is not greater than the preset delay threshold.
[0285] In some embodiments of the present application, the apparatus 110 further includes:
[0286] The fifth determining submodule is configured to directly determine the offloading strategy of the task to be calculated as offloading the task to be calculated to the mobile terminal when the second delay overhead is greater than a preset delay threshold or the second cost overhead is greater than a preset cost threshold.
[0287] In some embodiments of the present application, the apparatus 110 further includes:
[0288] The first setting module is used to pre-set the delay weight coefficient and the energy consumption weight coefficient.
[0289] The first acquisition module 1101 includes:
[0290] a sixth determining submodule, configured to determine a first target cost based on a sixth preset formula, a product of the delay weight coefficient and the first delay cost, and a product of the energy consumption weight coefficient and the first energy consumption cost;
[0291] Among them, the sixth preset formula is: α1 represents the delay weight coefficient, represents the first delay overhead, α2 represents the energy consumption weight coefficient, represents the first energy consumption, Indicates the first target cost.
[0292] In some embodiments of the present application, the apparatus 110 further includes:
[0293] The second setting module is used to pre-set the cost weight coefficient.
[0294] The second acquisition module 1102 includes:
[0295] a seventh determination submodule, configured to determine the second target cost based on a seventh preset formula, a product of the delay weight coefficient and the second delay cost, a product of the energy consumption weight coefficient and the second energy consumption cost, and a product of the cost weight coefficient and the second cost cost;
[0296] Among them, the seventh preset formula is: α1 represents the delay weight coefficient, represents the second delay overhead, α2 represents the energy consumption weight coefficient, represents the second energy consumption cost, α3 represents the cost weight coefficient, b uv represents the second cost overhead, Indicates the secondary target cost.
[0297] In some embodiments of the present application, the seventh determining submodule includes:
[0298] The eighth determination submodule is used to determine the second target overhead based on the seventh preset formula, the product of the delay weight coefficient and the second delay overhead, the product of the energy consumption weight coefficient and the second energy consumption overhead, and the product of the cost weight coefficient and the second cost overhead when the second cost overhead is not greater than the preset cost threshold.
[0299] In some embodiments of the present application, the first determining module 1103 includes:
[0300] The ninth determining submodule is configured to determine, based on the plurality of second target costs corresponding to the plurality of servers, the second target cost with the smallest value among the plurality of second target costs as the minimum target cost.
[0301] The tenth determining submodule is configured to determine an offloading strategy for the task to be calculated based on the minimum target overhead and the first target overhead.
[0302] In some embodiments of the present application, the apparatus 110 includes:
[0303] A first recording module is configured to record the second target cost into a target decision list corresponding to the mobile terminal;
[0304] The ninth determination submodule includes:
[0305] The second acquisition submodule is used to obtain the second target cost with the smallest value in the target decision list as the minimum target cost when the second target costs corresponding to multiple servers are all recorded.
[0306] In some embodiments of the present application, the tenth determining submodule includes:
[0307] an eleventh determining submodule, configured to determine, if the minimum target cost is less than the first target cost, that the offloading strategy of the task to be calculated is to offload the task to be calculated to the target server;
[0308] The twelfth determining submodule is configured to determine, if the minimum target overhead is greater than the first target overhead, that the offloading strategy for the task to be calculated is to offload the task to be calculated to the mobile terminal.
[0309] In some embodiments of the present application, when the minimum target cost is equal to the first target cost, the tenth determining submodule further includes:
[0310] The thirteenth determination submodule is used to determine the unloading strategy of the task to be calculated based on the size relationship between the first delay overhead and the second delay overhead corresponding to the minimum target overhead if the value of the delay weight coefficient among the delay weight coefficient, energy consumption weight coefficient and cost weight coefficient is the largest.
[0311] The fourteenth determination submodule is used to determine the unloading strategy of the task to be calculated based on the size relationship between the first energy consumption overhead and the second energy consumption overhead corresponding to the minimum target overhead if the value of the energy consumption weight coefficient among the delay weight coefficient, the energy consumption weight coefficient and the cost weight coefficient is the largest.
[0312] The fifteenth determination submodule is used to directly determine the offloading strategy of the task to be calculated as offloading the task to be calculated to the mobile terminal if the value of the cost weight coefficient among the delay weight coefficient, the energy consumption weight coefficient and the cost weight coefficient is the largest.
[0313] In some embodiments of the present application, the thirteenth determining submodule includes:
[0314] The sixteenth determining submodule is configured to determine that the offloading strategy for the task to be calculated is to offload the task to be calculated to the target server if the first delay overhead is greater than the second delay overhead corresponding to the minimum target overhead.
[0315] The seventeenth determining submodule is configured to determine that the offloading strategy of the task to be calculated is to offload the task to be calculated to the mobile terminal if the first delay overhead is less than the second delay overhead corresponding to the minimum target overhead.
[0316] The eighteenth determination submodule is used to determine the unloading strategy of the task to be calculated based on the second energy consumption overhead corresponding to the minimum target overhead or the second cost overhead corresponding to the minimum target overhead if the first delay overhead is equal to the second delay overhead corresponding to the minimum target overhead.
[0317] In some embodiments of the present application, the fourteenth determining submodule includes:
[0318] The nineteenth determination submodule is used to determine that the offloading strategy of the task to be calculated is to offload the task to be calculated to the target server if the first energy consumption overhead is greater than the second energy consumption overhead corresponding to the minimum target overhead.
[0319] The twentieth determination submodule is configured to determine that the offloading strategy of the task to be calculated is to offload the task to be calculated to the mobile terminal if the first energy consumption overhead is less than the second energy consumption overhead corresponding to the minimum target overhead.
[0320] The twenty-first determination submodule is used to determine the unloading strategy of the task to be calculated based on the second delay overhead corresponding to the minimum target overhead or the second cost overhead corresponding to the minimum target overhead if the first energy consumption overhead is equal to the second energy consumption overhead corresponding to the minimum target overhead.
[0321] In summary, the task offloading device for mobile edge computing provided by the embodiment of the present application obtains the first delay cost and the first energy consumption cost required by the mobile terminal in the mobile edge computing system to process the task to be calculated, and determines the first target cost based on the first delay cost and the first energy consumption cost; the first target cost is used to characterize the estimated cost of offloading the task to be calculated to the mobile terminal; for any server among the multiple servers included in the mobile edge computing system, the second delay cost, the second energy consumption cost and the second cost cost required by the server to process the task to be calculated are obtained, and the second target cost is determined based on the second delay cost and the second energy consumption cost and the second cost cost required by the server to process the task to be calculated; the second target cost is used to characterize the estimated cost of offloading the task to be calculated to the server; based on the first target cost and the multiple second target costs corresponding to the multiple servers, the offloading strategy of the task to be calculated is determined; the offloading strategy includes offloading the task to be calculated to the mobile terminal or offloading the task to be calculated to the target server; the target server belongs to the server. In this way, by determining the first target cost and the multiple second target costs, decision support for the offloading strategy can be provided to the user, and combined with the estimated cost of the edge computing service corresponding to different offloading strategies, a more efficient offloading strategy can be obtained. At the same time, three differentiated indicators of latency, energy consumption and cost are introduced to determine the first target overhead and the second target overhead. The latency overhead, energy consumption overhead and cost overhead of task offloading in the mobile edge computing system are comprehensively considered to optimize the decision-making basis of the offloading strategy, so that the coverage of the first target overhead and the second target overhead is wider and more comprehensive, thereby making the offloading decision method more perfect and improving the decision-making effect of the offloading decision of the task to be calculated.
[0322] The present application also provides an electronic device, see Figure 5, including: a processor 1201, a memory 1202, and a computer program 12021 stored in the memory and runnable on the processor. When the processor executes the program, the task offloading method for mobile edge computing of the aforementioned embodiment is implemented.
[0323] The present application also provides a non-volatile readable storage medium. When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device can execute the task offloading method for mobile edge computing of the aforementioned embodiment.
[0324] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0325] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems may also be used together with the teachings herein. Based on the above description, it is apparent that the structure required for constructing such systems is suitable. In addition, the present application is not directed to any specific programming language. It should be understood that various programming languages may be utilized to implement the present application described herein, and the description of the specific languages above is provided for the purpose of disclosing the preferred embodiment of the present application.
[0326] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.
[0327] Similarly, it should be understood that in order to streamline the present application and aid in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting an intention that the claimed application requires more features than are expressly recited in each claim. Rather, as reflected in the claims below, inventive aspects lie in fewer than all the features of the individual embodiments disclosed above. Accordingly, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim itself serving as a separate embodiment of the present application.
[0328] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition may be divided into multiple submodules or subunits or subcomponents. All features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed herein may be combined in any combination, except that at least some of such features and / or processes or units are mutually exclusive. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0329] The various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all of the functions of some or all of the components in the sorting device according to the present application. The present application can also be implemented as a device or apparatus program for executing part or all of the methods described herein. Such a program implementing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0330] It should be noted that the above embodiments illustrate rather than limit the present application, and that a person skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbols placed between brackets should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present application may be implemented by means of hardware comprising several different elements and by means of appropriately programmed computers. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.
[0331] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0332] The above are only some embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the scope of protection of the present application.
[0333] The above are only specific embodiments of the present application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A task offloading method for mobile edge computing, characterized in that: The method comprises: Obtaining a first delay overhead and a first energy consumption overhead required by a mobile terminal in a mobile edge computing system to process a task to be calculated, and determining a first target overhead based on the first delay overhead and the first energy consumption overhead; the first target overhead is used to characterize an estimated overhead of offloading the task to be calculated to the mobile terminal; For any server among the multiple servers included in the mobile edge computing system, obtain a second delay overhead required by the server to process the task to be calculated, and obtain a second energy consumption overhead and a second cost overhead required by the server to process the task to be calculated, and determine a second target overhead based on the second delay overhead, the second energy consumption overhead and the second cost overhead; the second target overhead is used to characterize the estimated overhead of offloading the task to be calculated to the server; Based on the first target overhead and the multiple second target overheads corresponding to the multiple servers, determine the unloading strategy of the task to be calculated; the unloading strategy includes unloading the task to be calculated to the mobile terminal or unloading the task to be calculated to a target server; the target server belongs to the multiple servers.
2. The method according to claim 1, characterized in that The obtaining of a first delay overhead and a first energy consumption overhead required for a mobile terminal in a mobile edge computing system to process a task to be calculated includes: Acquire the number of operation cycles of the local processor required by the mobile terminal to execute the task to be calculated, the processor frequency of the local processor, and the effective capacitance coefficient of the local processor; Determining the first latency overhead based on a first preset formula, the number of operating cycles, and the processor frequency; Wherein, the first preset formula is: c u d u represents the number of operating cycles, f u represents the processor frequency, represents the first delay overhead; Determining the first energy consumption cost based on a second preset formula, the number of operating cycles, the processor frequency, and the effective capacitance coefficient; Wherein, the second preset formula is: ρ represents the effective capacitance coefficient, Represents the first energy consumption overhead.
3. The method according to claim 2, characterized in that The obtaining of a second delay overhead required by the server to process the task to be calculated includes: estimating the processing time required by the server to process the task to be calculated as the target processing time, and estimating the upload time required for uploading the task to be calculated to the server as the target upload time; Determine the second delay overhead based on a third preset formula, the target processing time, and the target upload time; Wherein, the third preset formula is: represents the target processing time, Indicates the target upload time, Indicates the second delay overhead.
4. The method according to claim 2, characterized in that: The obtaining of the second energy consumption and the second cost required by the server to process the task to be calculated includes: Determine the second energy consumption cost based on a fourth preset formula, the target upload energy consumption, and the target idle energy consumption; Wherein, the fourth preset formula is: represents the target upload energy consumption, represents the target idle energy consumption, represents the second energy consumption cost; The target upload energy consumption is the estimated energy consumption of uploading the task to be calculated to the server, and the target idle energy consumption is the estimated idle energy consumption when the mobile terminal waits for the server to process the task to be calculated; Determine the second cost based on a fifth preset formula, the number of operation cycles, and the usage fee corresponding to the unit number of operation cycles; Wherein, the fifth preset formula is: b uv =β v c u d u , β v Indicates the usage fee corresponding to the unit number of operating cycles.
5. The method according to claim 2, characterized in that: After determining the first latency overhead based on the first preset formula, the number of operating cycles, and the processor frequency, the method includes: When the first delay overhead is greater than a preset delay threshold, the offloading strategy of the task to be calculated is directly determined to be offloading the task to be calculated to a target server.
6. The method according to claim 2, characterized in that The determining the first energy consumption cost based on a second preset formula, the number of operation cycles, the processor frequency, and the effective capacitance coefficient includes: When the first delay overhead is not greater than a preset delay threshold, the first energy consumption overhead is determined based on a second preset formula, the number of operating cycles, the processor frequency, and the effective capacitance coefficient.
7. The method according to claim 4, characterized in that The determining the second energy consumption cost based on the fourth preset formula, the target upload energy consumption, and the target idle energy consumption includes: When the second delay overhead is not greater than a preset delay threshold, the second energy consumption overhead is determined based on a fourth preset formula, a target upload energy consumption, and a target idle energy consumption.
8. The method according to claim 7, characterized in that The method further comprises: When the second delay overhead is greater than the preset delay threshold or the second cost overhead is greater than the preset cost threshold, the offloading strategy of the task to be calculated is directly determined to offload the task to be calculated to the mobile terminal.
9. The method according to claim 1, characterized in that: The method further comprises: Pre-set the delay weight coefficient and energy consumption weight coefficient; The determining a first target overhead based on the first delay overhead and the first energy consumption overhead includes: Determine the first target overhead based on a sixth preset formula, a product of the delay weight coefficient and the first delay overhead, and a product of the energy consumption weight coefficient and the first energy consumption overhead; Wherein, the sixth preset formula is: α1 represents the delay weight coefficient, represents the first delay overhead, α2 represents the energy consumption weight coefficient, represents the first energy consumption cost, Indicates the first target cost.
10. The method according to claim 9, characterized in that The method further comprises: Pre-set cost weight coefficients; The determining the second target overhead based on the second delay overhead, the second energy consumption overhead, and the second cost overhead includes: Determine the second target cost based on a seventh preset formula, a product of the delay weight coefficient and the second delay cost, a product of the energy consumption weight coefficient and the second energy consumption cost, and a product of the cost weight coefficient and the second cost cost; Wherein, the seventh preset formula is: α1 represents the delay weight coefficient, represents the second delay overhead, α2 represents the energy consumption weight coefficient, represents the second energy consumption cost, α3 represents the cost weight coefficient, b uv represents the second cost overhead, Indicates the second target cost.
11. The method according to claim 10, characterized in that The determining the second target cost based on the seventh preset formula, the product of the delay weight coefficient and the second delay cost, the product of the energy consumption weight coefficient and the second energy consumption cost, and the product of the cost weight coefficient and the second cost cost, includes: When the second cost overhead is not greater than the preset cost threshold, the second target overhead is determined based on the seventh preset formula, the product of the delay weight coefficient and the second delay overhead, the product of the energy consumption weight coefficient and the second energy consumption overhead, and the product of the cost weight coefficient and the second cost overhead.
12. The method according to claim 10 or 11, characterized in that: The determining, based on the first target cost and the plurality of second target costs corresponding to the plurality of servers, the offloading strategy of the task to be calculated includes: Based on the multiple second target costs corresponding to the multiple servers, determine the second target cost with the smallest value among the multiple second target costs as the minimum target cost; Based on the minimum target overhead and the first target overhead, an offloading strategy for the task to be calculated is determined.
13. The method according to claim 12, characterized in that After determining the second target overhead based on the second delay overhead, the second energy consumption overhead, and the second cost overhead, the method includes: Recording the second target cost into a target decision list corresponding to the mobile terminal; The determining, based on the plurality of second target costs corresponding to the plurality of servers, a second target cost with the smallest value among the plurality of second target costs as the minimum target cost, includes: When the second target costs corresponding to the plurality of servers are all recorded, the second target cost with the smallest value in the target decision list is obtained as the minimum target cost.
14. The method according to claim 12, characterized in that The determining, based on the minimum target overhead and the first target overhead, an offloading strategy for the task to be calculated includes: If the minimum target cost is less than the first target cost, determining that the offloading strategy of the task to be calculated is to offload the task to be calculated to the target server; If the minimum target overhead is greater than the first target overhead, the offloading strategy of the task to be calculated is determined to be offloading the task to be calculated to the mobile terminal.
15. The method according to claim 14, characterized in that In a case where the minimum target overhead is equal to the first target overhead, determining the offloading strategy of the task to be calculated based on the minimum target overhead and the first target overhead further includes: If the value of the delay weight coefficient among the delay weight coefficient, the energy consumption weight coefficient and the cost weight coefficient is the largest, then based on the relationship between the first delay overhead and the second delay overhead corresponding to the minimum target overhead, determine the unloading strategy of the task to be calculated; If the value of the energy consumption weight coefficient among the delay weight coefficient, the energy consumption weight coefficient and the cost weight coefficient is the largest, then based on the relationship between the first energy consumption overhead and the second energy consumption overhead corresponding to the minimum target overhead, determine the unloading strategy of the task to be calculated; If the value of the cost weight coefficient among the delay weight coefficient, the energy consumption weight coefficient and the cost weight coefficient is the largest, then the offloading strategy of the task to be calculated is directly determined to be offloading the task to be calculated to the mobile terminal.
16. The method according to claim 15, characterized in that The determining, based on the magnitude relationship between the first delay overhead and the second delay overhead corresponding to the minimum target overhead, the offloading strategy of the task to be calculated includes: If the first delay overhead is greater than the second delay overhead corresponding to the minimum target overhead, determining the offloading strategy of the task to be calculated is to offload the task to be calculated to the target server; If the first delay overhead is less than the second delay overhead corresponding to the minimum target overhead, determining that the offloading strategy of the task to be calculated is to offload the task to be calculated to the mobile terminal; If the first delay overhead is equal to the second delay overhead corresponding to the minimum target overhead, the offloading strategy of the task to be calculated is determined based on the second energy consumption overhead corresponding to the minimum target overhead or the second cost overhead corresponding to the minimum target overhead.
17. The method according to claim 15, characterized in that The determining, based on the relationship between the first energy consumption overhead and the second energy consumption overhead corresponding to the minimum target overhead, the offloading strategy of the task to be calculated includes: If the first energy consumption cost is greater than the second energy consumption cost corresponding to the minimum target cost, determining that the unloading strategy of the task to be calculated is to unload the task to be calculated to the target server; If the first energy consumption cost is less than the second energy consumption cost corresponding to the minimum target cost, determining that the unloading strategy of the task to be calculated is to unload the task to be calculated to the mobile terminal; If the first energy consumption overhead is equal to the second energy consumption overhead corresponding to the minimum target overhead, the unloading strategy of the task to be calculated is determined based on the second delay overhead corresponding to the minimum target overhead or the second cost overhead corresponding to the minimum target overhead.
18. A task offloading device for mobile edge computing, characterized in that: The device comprises: A first acquisition module is used to acquire a first delay overhead and a first energy consumption overhead required for a mobile terminal in a mobile edge computing system to process a task to be calculated, and determine a first target overhead based on the first delay overhead and the first energy consumption overhead; the first target overhead is used to characterize an estimated overhead of offloading the task to be calculated to the mobile terminal; A second acquisition module is used to obtain, for any server among the multiple servers included in the mobile edge computing system, a second delay overhead required for the server to process the task to be calculated, as well as a second energy consumption overhead and a second cost overhead required for the server to process the task to be calculated, and determine a second target overhead based on the second delay overhead, the second energy consumption overhead and the second cost overhead; the second target overhead is used to characterize the estimated overhead of offloading the task to be calculated to the server; The first determination module is used to determine the unloading strategy of the task to be calculated based on the first target overhead and the multiple second target overheads corresponding to the multiple servers; the unloading strategy includes unloading the task to be calculated to the mobile terminal or unloading the task to be calculated to the target server; the target server belongs to the multiple servers.
19. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the task offloading method for mobile edge computing as described in any one of claims 1 to 17 is implemented.
20. A non-volatile readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the task offloading method for mobile edge computing described in one or more of claims 1-17.
Citation Information
Patent Citations
Q-learning-based industrial Internet machine equipment user data calculation unloading decision method
CN110351754A
Edge computing unloading method and system for reducing energy consumption and cost sum of system
CN112988347A
Computing task unloading method and device in satellite-ground convergence network and electronic equipment
CN114884958A
Service security computing unloading method and device
CN114895976A
Task unloading method and device for mobile edge computing, equipment and medium
CN116225575A
Cited By
Task unloading method based on unmanned aerial vehicle cooperation
US12493499B2
Task unloading method based on unmanned aerial vehicle cooperation
US20250238281A1
