A method, device, terminal device and storage medium for offloading edge computing tasks of the Internet of Things

By building precise computing models and constraints and dynamically adjusting offloading strategies, the flexibility problem of computing task offloading solutions for IoT mobile devices is solved, efficient allocation of computing resources and network bandwidth is achieved, delays and resource waste are reduced, and offloading efficiency is improved.

CN119621323BActive Publication Date: 2025-10-03GUANGDONG POWER GRID CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411704978.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-10-03
Estimated Expiration
2044-11-26

Smart Images

  • Figure CN119621323B_ABST
    Figure CN119621323B_ABST
Patent Text Reader

Abstract

The present invention discloses an edge computing task offloading method, apparatus, terminal device and storage medium for the Internet of Things. The method can construct a first model and a second model based on the actual conditions reflecting different scenarios and task requirements, which can respectively calculate the local offloading overhead of mobile devices and the edge offloading overhead of network edge devices, and further construct a third model based on the two models with the goal of minimizing the total offloading overhead. Even when multiple mobile devices simultaneously request task offloading, the present invention can more effectively allocate computing resources and network bandwidth by accurately calculating the offloading overhead and using the third model with the goal of minimizing the total overhead. It can not only reduce task execution delays, but also avoid unnecessary resource waste. The present invention can dynamically adjust the offloading strategy according to different scenarios and requirements to generate the optimal offloading solution, reduce task execution delays and resource waste, and improve the efficiency of task offloading and processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of task offloading technology for the Internet of Things, and in particular to a method, apparatus, terminal device, and storage medium for offloading edge computing tasks for the Internet of Things. Background Art

[0002] In IoT networks, many mobile application tasks requested by mobile devices (such as smartphones, smart bracelets, smart cameras, and virtual reality devices) are computationally intensive and require high energy consumption. However, due to physical size limitations, MDs always have limited computing resources. Therefore, it is necessary to perform edge computing on the computing tasks of these mobile devices. Edge computing refers to significantly improving computing efficiency by transferring computing tasks from mobile devices to network edge devices or servers close to the data source. Mobile edge computing (MEC) is an important implementation method of edge computing. It can sink computing, storage, and applications to the edge of the mobile network through task offloading. For example, it can provide computing services after task offloading on network edge devices such as macro base stations and micro base stations.

[0003] Traditional task offloading methods usually decide whether to offload tasks to network edge devices based on preset policies. For example, factors such as task type, computational load, real-time requirements, and network conditions determine whether to offload tasks from mobile devices to network edge devices for execution, or to local execution devices on the mobile devices for execution. However, if multiple mobile devices request to offload tasks at the same time, the offloading solutions of each mobile device may cause resource competition and conflict. At this time, decision-making on task offloading based solely on preset policies will be difficult to cope with dynamic changes in network conditions, device status, and task requirements. It lacks certain flexibility and cannot automatically adjust according to specific scenarios and requirements. As a result, the task offloading solution is not optimal in different scenarios and requirements, leading to resource competition and insufficient policy adaptability. When multiple mobile devices offload tasks at the same time, task execution may be delayed, thereby wasting computing resources and network bandwidth. Summary of the Invention

[0004] The embodiments of the present invention provide a method, apparatus, terminal device and storage medium for offloading edge computing tasks of the Internet of Things. By constructing a precise computing model, introducing constraints and solving the optimal offloading solution, it can be dynamically adjusted according to different scenarios and needs, and can effectively allocate computing resources and network bandwidth to generate the optimal offloading solution. It can effectively solve the problem in the existing technology that it is impossible to automatically adjust according to specific scenarios and needs, and when multiple mobile devices unload tasks at the same time, it may cause task execution delays, thereby wasting computing resources and network bandwidth.

[0005] An embodiment of the present invention provides a method for offloading edge computing tasks of an Internet of Things, comprising:

[0006] Constructing a first model for calculating local offloading overhead of the mobile device based on resource requirement data of different mobile devices under different tasks and performance data of the mobile device;

[0007] Constructing a second model for calculating edge offloading overhead of network edge devices based on resource requirement data of different mobile devices under different tasks, channel transmission data of network edge devices, and server transmission data of network edge devices; wherein the network edge devices are used to perform mobile edge computing;

[0008] Based on the first model and the second model, a third model is constructed with the goal of minimizing the total offloading overhead; wherein the constraints of the third model include: an offloading type constraint and an edge offloading quantity constraint;

[0009] Under the constraints of the offloading type and the number of edge offloading, the third model is solved to generate an offloading type corresponding to each task when the total offloading overhead is minimized; wherein the offloading type includes: local offloading or edge offloading;

[0010] Depending on the offload type, each task is offloaded to a mobile device or to a network edge device one by one.

[0011] Preferably, the resource requirement data includes: the number of CPU cycles corresponding to each task; the CPU cycle is used to represent the duration of task execution; the performance data of the mobile device includes: data processing speed and energy consumption corresponding to the CPU cycle;

[0012] The step of constructing a first model for calculating the local offloading overhead of the mobile device based on resource requirement data of different mobile devices under different tasks and performance data of the mobile device includes:

[0013] generating a first data processing time corresponding to each task according to the number of CPU cycles corresponding to each task and the data processing speed in the performance data;

[0014] generating a first data processing energy consumption corresponding to each task according to the number of CPU cycles corresponding to each task and the energy consumption corresponding to the CPU cycles in the performance data;

[0015] A first model for calculating the local offloading overhead of the mobile device is generated according to the preset time weight value, the first data processing time, the preset energy consumption weight value and the first data processing energy consumption of each task.

[0016] Preferably, each task corresponds to an occurrence probability; the resource requirement data further includes: the data volume corresponding to each task; the channel transmission data includes: the channel transmission rate corresponding to each task, which is used to characterize the transmission of the task from the mobile device to the network edge device; the server transmission data includes: the server transmission time corresponding to each task, the server waiting time corresponding to each task, and the server execution time corresponding to each task;

[0017] The second model for calculating the edge offloading overhead of the network edge device is constructed based on the resource requirement data of different mobile devices under different tasks, the channel transmission data of the network edge device, and the server transmission data of the network edge device, including:

[0018] generating a second data processing time corresponding to each task according to the data volume, channel transmission rate, server transmission time, server waiting time, and server execution time corresponding to each task;

[0019] generating a second data processing energy consumption corresponding to each task according to a second data processing time corresponding to each task and an occurrence probability corresponding to each task;

[0020] A second model for calculating the edge offloading overhead of the network edge device is generated according to the preset time weight value, the second data processing time, the preset energy consumption weight value and the second data processing energy consumption of each task.

[0021] Preferably, the network edge device includes: a first base station and several second base stations; the radio frequency output power of the first base station is greater than the radio frequency output power of the second base station;

[0022] The step of constructing a third model with the goal of minimizing the total offloading overhead based on the first model and the second model includes:

[0023] According to the following formula, a third model is constructed with the goal of minimizing the total offloading overhead:

[0024]

[0025] S∈{1,2,…,S};

[0026] Where f represents the total offloading cost, Indicates uninstall type λ i,j The overhead is, N is the total number of mobile devices, M is the total number of tasks, λ i,j represents the offloading type of the jth task of the i-th mobile device;

[0027] λ i,j =0 means that the offloading type of the jth task of the i-th mobile device is local offloading;i,j = -1 indicates that the offloading type of the jth task of the i-th mobile device is edge offloading, and it means offloading the task to the first base station; i,j =S The offloading type is edge offloading, which means offloading the task to the S-th second base station;

[0028] S∈{1,2,…,S} represents a set of second base stations;

[0029] represents the local overhead when the offloading type of the jth task on the i-th mobile device is local offloading, is the preset time weight value of the jth task of the i-th mobile device, is the preset energy consumption weight value of the jth task of the i-th mobile device, is the first data processing time of the jth task of the i-th mobile device, The energy consumption of the first data processing of the jth task of the i-th mobile device; c i,j is the number of CPU cycles of the jth task of the i-th mobile device, f i is the data processing speed of the i-th mobile device; δ i is the energy consumption of one CPU cycle of the i-th mobile device;

[0030] Indicates that the offloading type of the jth task of the i-th mobile device is edge offloading, and the edge offloading overhead of offloading the task to the first base station; Indicates that the offloading type of the jth task of the i-th mobile device is edge offloading, and the edge offloading overhead of offloading the task to the second base station; represents the second data processing energy consumption of the jth task of the i-th mobile device, is the second data processing time of the jth task of the i-th mobile device, p ij represents the occurrence probability of the jth task of the i-th mobile device; is the second data processing time of the jth task of the i-th mobile device, m i,j represents the data volume of the jth task of the i-th mobile device, represents the channel transmission rate of the jth task of the i-th mobile device, c represents the server transmission time of the jth task of the i-th mobile device, is the server waiting time of the jth task of the i-th mobile device, is the server execution time of the jth task on the i-th mobile device.

[0031] Preferably, the uninstall type constraint includes:

[0032]

[0033] Among them, the offloading type λ of the jth task of the i-th mobile device is i,j , including: i,j =0 corresponds to local unloading, λ i,j = -1, the task is offloaded to the edge of the first base station and λ i,j =S, the task is offloaded to the edge offloading of the S-th second base station.

[0034] Preferably, the edge offloading quantity constraint includes:

[0035]

[0036] in, Indicates the total number of tasks corresponding to tasks offloaded to the first base station, represents the total number of tasks corresponding to offloading to the second base station, K is the total number of wireless channels of the first base station, and L is the total number of wireless channels of the second base station.

[0037] Preferably, solving the third model to generate an offloading type corresponding to each task when the total offloading overhead is minimized includes:

[0038] Each mobile device is regarded as a participant, and each participant corresponds to a utility function; wherein the utility function is used to calculate the offloading cost corresponding to all tasks of a participant;

[0039] A random game theory strategy is used to generate an initial offloading strategy for each participant; wherein the offloading strategy includes: an offloading type corresponding to each task;

[0040] Repeat the following policy update operation until the average utility value is less than the preset utility threshold, and then output the updated uninstallation policy of each participant:

[0041] For each participant, the offloading type corresponding to each task is adjusted through a random game theory strategy based on the current offloading strategies of other participants, and an updated offloading strategy is generated when the utility function is maximized. Initially, the current offloading strategy of each participant is the initial offloading strategy.

[0042] Generate the average utility value based on the utility function value corresponding to each participant's updated uninstallation strategy;

[0043] When it is determined that the utility average value is not less than the preset utility threshold, the updated uninstallation policy of each participant is used as the current uninstallation policy corresponding to the next execution of the policy update operation.

[0044] Based on the above method embodiments, the present invention provides corresponding device embodiments.

[0045] An embodiment of the present invention provides an edge computing task offloading device for an Internet of Things, comprising: a first model building module, a first model building module, a first model building module, a model solving module, and a task offloading module;

[0046] The first model building module is used to build a first model for calculating the local offloading overhead of the mobile device based on the resource requirement data of different mobile devices under different tasks and the performance data of the mobile device;

[0047] The first model building module is configured to build a second model for calculating edge offloading overhead of a network edge device based on resource requirement data of different mobile devices under different tasks, channel transmission data of the network edge device, and server transmission data of the network edge device; wherein the network edge device is configured to perform mobile edge computing;

[0048] The first model construction module is configured to construct a third model with the goal of minimizing the total offloading overhead based on the first model and the second model; wherein the constraints of the third model include: an offloading type constraint and an edge offloading quantity constraint;

[0049] The model solving module is configured to solve the third model under the offloading type constraint and the edge offloading quantity constraint, and generate an offloading type corresponding to each task when the total offloading overhead is minimized; wherein the offloading type includes: local offloading or edge offloading;

[0050] The task offloading module is used to offload each task to a mobile device or a network edge device one by one according to each offloading type.

[0051] Based on the above method embodiments, the present invention provides corresponding terminal device embodiments.

[0052] Another embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the edge computing task offloading method of the Internet of Things described in the above-mentioned embodiment of the invention.

[0053] Based on the above method embodiments, the present invention provides corresponding storage medium embodiments.

[0054] Another embodiment of the present invention provides a storage medium, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute an edge computing task offloading method for the Internet of Things described in the above-mentioned embodiment of the invention.

[0055] The following beneficial effects are achieved by implementing the present invention:

[0056] Embodiments of the present invention provide an edge computing task offloading method, apparatus, terminal device, and storage medium for the Internet of Things. By considering resource requirement data, performance data, channel transmission data, and server transmission data of mobile devices under different tasks, the present invention can construct a first model and a second model based on the actual conditions under different scenarios and task requirements. The first model and the second model can then be used to calculate the local offloading overhead of the mobile device and the edge offloading overhead of the network edge device, respectively. Furthermore, a third model is constructed based on these two models, with the goal of minimizing the total offloading overhead. When solving the third model, the offloading strategy can be automatically and dynamically adjusted based on the current task requirements, device status, and network conditions. The introduced offloading type constraints and edge offloading quantity constraints also ensure the feasibility and effectiveness of the offloading solution. When solving the third model, the offloading type combination that minimizes the total offloading overhead can be found, ensuring the optimality of the offloading solution. Even when multiple mobile devices simultaneously request task offloading, the present invention can more efficiently allocate computing resources and network bandwidth by accurately calculating the offloading overhead and minimizing the total overhead using the third model, thereby reducing task execution delays and avoiding unnecessary resource waste. Compared with the existing technology, the present invention can dynamically adjust according to different scenarios and needs by constructing an accurate calculation model, introducing constraints and solving the optimal offloading solution, thereby generating the optimal offloading solution, reducing task execution delays and resource waste, and improving the efficiency of task offloading and processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 This is a flow chart of a method for offloading edge computing tasks of an Internet of Things provided by one embodiment of the present invention.

[0058] Figure 2 This is a structural diagram of an edge computing task offloading device for the Internet of Things provided by one embodiment of the present invention. DETAILED DESCRIPTION

[0059] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0060] like Figure 1FIG. 1 is a flow chart of a method for offloading edge computing tasks of an Internet of Things provided by one embodiment of the present invention. The method for offloading edge computing tasks of an Internet of Things includes:

[0061] Step S1: constructing a first model for calculating the local offloading overhead of the mobile device based on resource requirement data of different mobile devices under different tasks and performance data of the mobile device;

[0062] Step S2: Constructing a second model for calculating edge offloading overhead of network edge devices based on resource requirement data of different mobile devices under different tasks, channel transmission data of network edge devices, and server transmission data of network edge devices; wherein the network edge devices are used to perform mobile edge computing;

[0063] Step S3: Based on the first model and the second model, construct a third model with the goal of minimizing the total offloading overhead; wherein the constraints of the third model include: offloading type constraints and edge offloading quantity constraints;

[0064] Step S4: Solving the third model under the constraints of the offloading type and the number of edge offloading, and generating an offloading type corresponding to each task when the total offloading overhead is minimized; wherein the offloading type includes: local offloading or edge offloading;

[0065] Step S5: offloading each task to a mobile device or a network edge device one by one according to each offloading type.

[0066] Regarding step S1, in a preferred embodiment, by comprehensively considering the performance data of the mobile device and the resource requirement data of the task, the overhead of each task when executed locally, such as computing overhead, storage overhead, and energy overhead, can be more accurately calculated. Using the first model, resources can be allocated more efficiently, avoiding resource shortages or waste.

[0067] In a preferred embodiment, the resource requirement data includes: the number of CPU cycles corresponding to each task; the CPU cycles are used to represent the duration of task execution; the performance data of the mobile device includes: data processing speed and energy consumption corresponding to the CPU cycles;

[0068] A first model for calculating the local offload cost of the mobile device is constructed, specifically including:

[0069] generating a first data processing time corresponding to each task according to the number of CPU cycles corresponding to each task and the data processing speed in the performance data;

[0070] generating a first data processing energy consumption corresponding to each task according to the number of CPU cycles corresponding to each task and the energy consumption corresponding to the CPU cycles in the performance data;

[0071] A first model for calculating the local offloading overhead of the mobile device is generated according to the preset time weight value, the first data processing time, the preset energy consumption weight value and the first data processing energy consumption of each task.

[0072] Schematically, the function of the first model is:

[0073]

[0074] in, represents the local overhead when the offloading type of the jth task on the i-th mobile device is local offloading, is the preset time weight value of the jth task of the i-th mobile device, is the preset energy consumption weight value of the jth task of the i-th mobile device, is the first data processing time of the jth task of the i-th mobile device, The energy consumption of the first data processing of the jth task of the i-th mobile device; c i,j is the number of CPU cycles of the jth task of the i-th mobile device, f i is the data processing speed of the i-th mobile device; δ i is the energy consumption of one CPU cycle of the i-th mobile device.

[0075] Illustratively, an embodiment of the present invention refines the task resource requirement data into the number of CPU cycles corresponding to each task, and refines the mobile device performance data into the data processing speed and the energy consumption corresponding to the CPU cycles, so that the first model can more accurately reflect the actual relationship between task execution and device performance.

[0076] Moreover, a preset time weight value and a preset energy consumption weight value are introduced into the first model; schematically, different trade-offs and settings can be made between time and energy consumption according to actual application scenarios, so as to adapt more flexibly to different optimization goals.

[0077] Therefore, the first model not only takes into account the computing time (reflected by the first data processing time), but also takes into account the energy consumption during the computing process (reflected by the first data processing energy consumption), so that the total overhead of the task when executed locally can be more comprehensively evaluated to obtain the optimal offloading method.

[0078] Regarding step S2, in a preferred embodiment, the edge computing task offloading method of the invention can be applied to a dense IoT network. Then, N co-located IoT mobile devices MD (Mobile Devices) can be alternately covered by a macro base station and S micro base stations. In an ultra-dense IoT network, micro base stations can be deployed more densely to provide more flexible and efficient wireless access services. Then, there is a network edge device, including: a first base station and several second base stations; the difference is that the RF output power of the first base station is greater than the RF output power of the second base stations.

[0079] In the scenario of the present invention, the network edge device includes a first base station (usually a macro base station) and several second base stations (micro base stations);

[0080] The first base station (i.e. macro base station): has a large radio frequency output power and can cover a wider area, providing stable connection and data transmission services for a large number of IoT mobile devices. Macro base stations are usually deployed in the center or key locations of the network to ensure network connectivity and stability.

[0081] Secondary base stations (micro base stations): These have lower RF output power but are deployed more densely. They can provide more refined wireless access services, particularly in blind spots or weak coverage areas beyond the reach of macro base stations. Micro base stations can be dynamically adjusted and optimized based on actual needs to meet the low latency, high bandwidth, and low power requirements of IoT devices.

[0082] In a preferred embodiment, each task corresponds to an occurrence probability; and the resource requirement data further includes: the amount of data corresponding to each task;

[0083] The channel transmission data includes: a channel transmission rate corresponding to each task, used to characterize the transmission of the task from the mobile device to the network edge device;

[0084] The server transmission data includes: the server transmission time corresponding to each task, the server waiting time corresponding to each task, and the server execution time corresponding to each task;

[0085] The second model for calculating the edge offloading overhead of network edge devices is constructed, specifically including:

[0086] generating a second data processing time corresponding to each task according to the data volume, channel transmission rate, server transmission time, server waiting time, and server execution time corresponding to each task;

[0087] generating a second data processing energy consumption corresponding to each task according to a second data processing time corresponding to each task and an occurrence probability corresponding to each task;

[0088] A second model for calculating the edge offloading overhead of the network edge device is generated according to the preset time weight value, the second data processing time, the preset energy consumption weight value and the second data processing energy consumption of each task.

[0089] Specifically, the functional formula of the second model is:

[0090]

[0091] S∈{1,2,…,S};

[0092] Wherein, S∈{1,2,…,S} represents a set of second base stations; Indicates that the offloading type of the jth task of the i-th mobile device is edge offloading, and the edge offloading overhead of offloading the task to the first base station;

[0093] Indicates that the offloading type of the jth task of the i-th mobile device is edge offloading, and the edge offloading overhead of offloading the task to the second base station; represents the second data processing energy consumption of the jth task of the i-th mobile device, is the second data processing time of the jth task of the i-th mobile device, p ij represents the occurrence probability of the jth task of the i-th mobile device; is the second data processing time of the jth task of the i-th mobile device, m i,j represents the data volume of the jth task of the i-th mobile device, represents the channel transmission rate of the jth task of the i-th mobile device, c represents the server transmission time of the jth task of the i-th mobile device, is the server waiting time of the jth task of the i-th mobile device, is the server execution time of the jth task on the i-th mobile device.

[0094] It is understood that the present invention can offload tasks to different base stations (including macro base stations and micro base stations), thereby providing mobile devices with more offloading options. In other words, the optimal offloading strategy can be selected based on current network conditions and task requirements, thereby improving the efficiency and reliability of task execution.

[0095] Moreover, when network conditions, base station performance or task requirements change, the second model of the present invention can recalculate the edge offloading overhead based on the new data, thereby being able to dynamically adjust the offloading strategy to adapt to the changing environment.

[0096] Therefore, by distinguishing between macro base stations and small micro base stations and calculating in detail the processing time and energy consumption overhead of tasks on edge devices, the subsequent third model can find the optimal offloading solution to promote the optimization of the entire mobile edge computing system and reduce resource waste.

[0097] Regarding step S3, in a preferred embodiment, when constructing the third model with the goal of minimizing the total offloading overhead, it specifically includes:

[0098] According to the following formula, a third model is constructed with the goal of minimizing the total offloading overhead:

[0099]

[0100] S∈{1,2,…,S};

[0101] Where, f represents the total offloading cost, Indicates uninstall type λ i,j The overhead is, N is the total number of mobile devices, M is the total number of tasks, λ i,j represents the offloading type of the jth task of the i-th mobile device; i,j =0 means that the offloading type of the jth task of the i-th mobile device is local offloading; i,j = -1 indicates that the offloading type of the jth task of the i-th mobile device is edge offloading, and it means offloading the task to the first base station; i,j =S The offloading type is edge offloading, which means offloading the task to the Sth second base station; S∈{1,2,…,S} represents the set of second base stations;

[0102] represents the local overhead when the offloading type of the jth task on the i-th mobile device is local offloading, is the preset time weight value of the jth task of the i-th mobile device, is the preset energy consumption weight value of the jth task of the i-th mobile device, is the first data processing time of the jth task of the i-th mobile device, The energy consumption of the first data processing of the jth task of the i-th mobile device; c i,j is the number of CPU cycles of the jth task of the i-th mobile device, f i is the data processing speed of the i-th mobile device; δ i is the energy consumption of one CPU cycle of the i-th mobile device;

[0103] Indicates that the offloading type of the jth task of the i-th mobile device is edge offloading, and the edge offloading overhead of offloading the task to the first base station; Indicates that the offloading type of the jth task of the i-th mobile device is edge offloading, and the edge offloading overhead of offloading the task to the second base station; represents the second data processing energy consumption of the jth task of the i-th mobile device, is the second data processing time of the jth task of the i-th mobile device, p ij represents the occurrence probability of the jth task of the i-th mobile device; is the second data processing time of the jth task of the i-th mobile device, m i,j represents the data volume of the jth task of the i-th mobile device, represents the channel transmission rate of the jth task of the i-th mobile device, c represents the server transmission time of the jth task of the i-th mobile device, is the server waiting time of the jth task of the i-th mobile device, is the server execution time of the jth task on the i-th mobile device.

[0104] The uninstallation type constraints corresponding to the third model include:

[0105]

[0106] Among them, the offloading type λ of the jth task of the i-th mobile device is i,j , including: i,j =0 corresponds to local unloading, λ i,j = -1, the task is offloaded to the edge of the first base station and λ i,j =S, the task is offloaded to the edge offloading of the S-th second base station.

[0107] The edge offloading quantity constraint includes:

[0108]

[0109] in, Indicates the total number of tasks corresponding to tasks offloaded to the first base station, represents the total number of tasks corresponding to offloading to the second base station, K is the total number of wireless channels of the first base station, and L is the total number of wireless channels of the second base station.

[0110] Illustratively, the present invention can ensure that each task can only be offloaded to one type (local offloading, offloading to the first base station or the second base station) through offloading type constraints. In the process of obtaining the optimal offloading strategy, resource conflicts and repeated task processing can be avoided, thereby ensuring the stability and consistency of the system.

[0111] By constraining the number of edge offloading tasks, the total number of tasks offloaded to the first and second base stations can be limited to ensure that the total number of wireless channels of the base stations is not exceeded. This can prevent network congestion and resource overload, so that the final offloading strategy can maximize the utilization of the wireless channel resources of the base stations through reasonable task scheduling and resource allocation, thereby improving the overall network performance.

[0112] Therefore, based on the constructed third model, the overhead of different offloading methods can be compared according to the current network conditions, equipment performance, task characteristics and base station load conditions, and the offloading strategy with the lowest overhead can be selected. The optimal offloading method (local offloading, offloading to the first base station or the second base station) can be automatically selected and calculated, and the overall system performance can be optimized.

[0113] Regarding step S4, in a preferred embodiment, solving the third model and generating an offload type corresponding to each task when the total offload overhead is minimized includes:

[0114] Each mobile device is regarded as a participant, and each participant corresponds to a utility function; wherein the utility function is used to calculate the offloading cost corresponding to all tasks of a participant;

[0115] A random game theory strategy is used to generate an initial offloading strategy for each participant; wherein the offloading strategy includes: an offloading type corresponding to each task;

[0116] Repeat the following policy update operation until the average utility value is less than the preset utility threshold, and then output the updated uninstallation policy of each participant:

[0117] For each participant, the offloading type corresponding to each task is adjusted through a random game theory strategy based on the current offloading strategies of other participants, and an updated offloading strategy is generated when the utility function is maximized. Initially, the current offloading strategy of each participant is the initial offloading strategy.

[0118] Generate the average utility value based on the utility function value corresponding to each participant's updated uninstallation strategy;

[0119] When it is determined that the utility average value is not less than the preset utility threshold, the updated uninstallation policy of each participant is used as the current uninstallation policy corresponding to the next execution of the policy update operation.

[0120] For example, consider a system consisting of three mobile devices (Participants A, B, and C). Each device has a set of tasks to offload, and can choose to offload locally or to two different base stations (a first base station and a second base station). This embodiment of the present invention uses a randomized game theory strategy to find an offloading strategy that minimizes the total offloading overhead for the entire system.

[0121] Initially, the participants are set as: A, B, and C (three mobile devices). The utility function is: each participant has a utility function (i.e., the third model of the present invention) used to calculate the offloading overhead corresponding to all of its tasks. The initial offloading strategy is: a random game theory strategy is used to generate the initial offloading strategy of each participant. For example, A may choose to offload Task 1 to the first base station, Task 2 locally, and Task 3 to the second base station; B may choose to offload all tasks locally; C may choose to offload Task 1 and Task 2 to the first base station, and Task 3 locally.

[0122] First round of updates: For participant A, a stochastic game theory strategy can be used to adjust the offloading types corresponding to each of A's tasks based on the current offloading strategies of B and C (i.e., the initial offloading strategies). For example, A may find that offloading Task 2 to the second base station is more cost-effective than offloading it locally, and therefore adjust its strategy. After adjusting its strategy, A calculates a new utility function value. If the new utility value is greater than the old one, it accepts the new offloading strategy. Similar updates are performed for B and C.

[0123] The utility average of all participants is further calculated and compared with the preset utility threshold.

[0124] Subsequent rounds of updates: Repeat the policy update operation, each update is based on the current unloading strategy of other participants. After each round of updates, the utility average is calculated and compared with the preset utility threshold.

[0125] If the average utility value is less than the preset utility threshold, the update is stopped and the final unloading strategy of each participant is output.

[0126] Suppose, in a certain update round, participant A finds that offloading Task 1 to the second base station, offloading Task 2 locally, and offloading Task 3 to the first base station maximizes the value of its utility function. Meanwhile, participant B finds that offloading all tasks to the first base station is more cost-effective, while participant C chooses to offload Task 1 locally and Tasks 2 and 3 to the second base station.

[0127] After this round of updates, the average utility of all participants can be calculated and compared with the preset utility threshold. If the average utility is still greater than or equal to the preset utility threshold, the next round of updates can be continued. If the average utility is less than the preset utility threshold, the update is stopped and the final uninstallation strategy for each participant is output.

[0128] Through the above process, the present invention can find an offloading strategy that minimizes the total offloading overhead of the entire system. This strategy is dynamically adjusted based on each participant's current offloading strategy and the behavior of other participants. Through continuous iteration and updating, a globally optimal or near-optimal offloading strategy can be found.

[0129] Schematically, the outer game process of the present invention involves strategic interactions between all mobile devices, each mobile device is a participant, and each participant attempts to minimize its total overhead by selecting the best unloading strategy, and each mobile device has an initial unloading strategy, which can be random or based on a certain heuristic algorithm.

[0130] In each iteration, each mobile device observes the current offloading policies of other devices and adjusts its own policy based on these policies. This adjustment is based on maximizing its own utility function (i.e., minimizing its total cost). Each mobile device calculates its total cost based on its own offloading policy and the policies of other devices, and then calculates the utility function value. The average value of the utility functions of all mobile devices is calculated and compared with a preset utility threshold. If the average value is less than the threshold, the iteration stops and the final offloading policy is output. Otherwise, the iteration continues.

[0131] The present invention uses random game theory strategies to allow the system to dynamically adjust the offloading strategy according to the current environmental conditions and the behavior of other participants, so that the system can flexibly respond to various uncertainties and changes, such as fluctuations in network conditions, differences in equipment performance, and changes in task requirements.

[0132] By continuously iterating and updating the offloading strategy and taking into account the behavior of all participants, the present invention can converge to a globally optimal or near-optimal offloading strategy, ensuring that the overall performance of the system is optimized, not just the performance of individual devices. Through randomized game theory strategies, it is usually possible to converge to a stable solution, where all participants no longer change their strategies, indicating that the system has reached an equilibrium state where each participant is satisfied with their strategy. Therefore, by optimizing the offloading strategy through randomized game theory strategies, the present invention can more efficiently utilize system resources, thereby reducing resource waste and improving the overall efficiency and performance of the system.

[0133] Specifically, in step S5, if the offload type of a task is local offload, the task will be executed on the mobile device where it is located; if the offload type is to the first base station, the task will be transferred to the first base station and executed; if the offload type is to the second base station, the task will be transferred to the second base station and executed. The above process is performed one by one, that is, each task is assigned and executed according to its offload type.

[0134] Since the previous steps have determined a reasonable offloading strategy for each task through the optimization method, the embodiment of the present invention can ensure that the task is allocated to the most appropriate execution device and that the task is executed with minimal overhead.

[0135] like Figure 2 As shown, based on the above-mentioned embodiments of the edge computing task offloading method of various IoTs, the present invention provides corresponding device embodiments;

[0136] An embodiment of the present invention provides an edge computing task offloading device for an Internet of Things, comprising: a first model building module, a first model building module, a first model building module, a model solving module, and a task offloading module;

[0137] The first model building module is used to build a first model for calculating the local offloading overhead of the mobile device based on the resource requirement data of different mobile devices under different tasks and the performance data of the mobile device;

[0138] The first model building module is configured to build a second model for calculating edge offloading overhead of a network edge device based on resource requirement data of different mobile devices under different tasks, channel transmission data of the network edge device, and server transmission data of the network edge device; wherein the network edge device is configured to perform mobile edge computing;

[0139] The first model construction module is configured to construct a third model with the goal of minimizing the total offloading overhead based on the first model and the second model; wherein the constraints of the third model include: an offloading type constraint and an edge offloading quantity constraint;

[0140] The model solving module is configured to solve the third model under the offloading type constraint and the edge offloading quantity constraint, and generate an offloading type corresponding to each task when the total offloading overhead is minimized; wherein the offloading type includes: local offloading or edge offloading;

[0141] The task offloading module is used to offload each task to a mobile device or a network edge device one by one according to each offloading type.

[0142] It should be noted that the device embodiments described above are merely illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, and may be located in one place or distributed across multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art can understand and implement the present invention without paying any creative effort.

[0143] Those skilled in the art can clearly understand that, for the sake of convenience and brevity, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0144] Based on the above-mentioned embodiments of the edge computing task offloading method of various Internet of Things, the present invention provides corresponding terminal device embodiments.

[0145] An embodiment of the present invention provides a terminal device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements an edge computing task offloading method for the Internet of Things described in any method embodiment of the present invention.

[0146] The terminal device may be a computing terminal device such as a desktop computer, a notebook computer, a palmtop computer, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.

[0147] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, connecting various parts of the entire terminal device using various interfaces and lines.

[0148] The memory can be used to store the computer program, and the processor implements various functions of the terminal device by running or executing the computer program stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created based on the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory and can also include a non-volatile memory, such as a hard disk, internal memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device or other volatile solid-state storage device.

[0149] Based on the above-mentioned embodiments of the edge computing task offloading method of various IoTs, the present invention provides corresponding storage medium item embodiments.

[0150] An embodiment of the present invention provides a storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute an edge computing task offloading method for the Internet of Things described in any method embodiment of the present invention.

[0151] The storage medium is a computer-readable storage medium, and the computer program is stored in the computer-readable storage medium. When the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments. The computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0152] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for offloading edge computing tasks of the Internet of Things, characterized in that: include: Constructing a first model for calculating local offloading overhead of the mobile device based on resource requirement data of different mobile devices under different tasks and performance data of the mobile device; A second model for calculating edge offloading overhead of a network edge device is constructed based on resource requirement data of different mobile devices under different tasks, channel transmission data of a network edge device, and server transmission data of the network edge device. The network edge device is configured to perform mobile edge computing. The network edge device includes: a first base station and a plurality of second base stations; the radio frequency output power of the first base station is greater than the radio frequency output power of the second base stations. Based on the first model and the second model, a third model is constructed with the goal of minimizing the total offloading overhead; wherein the constraints of the third model include: an offloading type constraint and an edge offloading quantity constraint; Under the constraints of the offloading type and the number of edge offloading, the third model is solved to generate an offloading type corresponding to each task when the total offloading overhead is minimized; wherein the offloading type includes: local offloading or edge offloading; Offload each task to a mobile device or a network edge device one by one according to each offload type; Among them, the third model with the goal of minimizing the total offloading overhead is constructed according to the following formula: ; ; ; ; ; ; ; ; ; in, represents the total offloading overhead, Indicates the uninstall type expenses, is the total number of mobile devices, is the total number of tasks, Indicates the Mobile device The offloading type of each task; Indicates the Mobile device The uninstall type of each task is local uninstall; Indicates the Mobile device The offloading type of the task is edge offloading, which means offloading the task to the first base station; The offloading type is edge offloading, which means offloading the task to the a second base station; represents a set of second base stations; Indicates the Mobile device The local overhead when the offloading type of a task is local offloading, For the Mobile device The preset time weight value of each task, For the Mobile device The preset energy consumption weight value of each task, For the Mobile device The first data processing time of each task, For the Mobile device The first data processing energy consumption of each task; For the Mobile device The number of CPU cycles for each task, For the the data processing speed of each mobile device; For the The energy consumption of one CPU cycle of a mobile device; Indicates the Mobile device The offloading type of the task is edge offloading, and the edge offloading overhead of offloading the task to the first base station; Indicates the Mobile device The offloading type of the task is edge offloading, and the edge offloading overhead of offloading the task to the second base station; Indicates the Mobile device The second data processing energy consumption of each task is For the Mobile device The second data processing time of each task, Indicates the Mobile device The probability of a task occurring; For the Mobile device The second data processing time of each task, Indicates the Mobile device The amount of data for each task, Indicates the Mobile device The channel transmission rate of each task, Indicates the Mobile device Server transmission time for each task, For the Mobile device The server waiting time for each task, For the Mobile device The server execution time of each task.

2. The method for offloading edge computing tasks of the Internet of Things according to claim 1, wherein: The resource requirement data includes: the number of CPU cycles corresponding to each task; the CPU cycles are used to represent the duration of task execution; the performance data of the mobile device includes: data processing speed and energy consumption corresponding to the CPU cycles; The step of constructing a first model for calculating the local offloading overhead of the mobile device based on resource requirement data of different mobile devices under different tasks and performance data of the mobile device includes: generating a first data processing time corresponding to each task according to the number of CPU cycles corresponding to each task and the data processing speed in the performance data; generating a first data processing energy consumption corresponding to each task according to the number of CPU cycles corresponding to each task and the energy consumption corresponding to the CPU cycles in the performance data; A first model for calculating the local offloading overhead of the mobile device is generated according to the preset time weight value, the first data processing time, the preset energy consumption weight value and the first data processing energy consumption of each task.

3. The method for offloading edge computing tasks of the Internet of Things according to claim 2, wherein: Each task corresponds to a probability of occurrence; The resource demand data also includes: the data volume corresponding to each task; the channel transmission data includes: the channel transmission rate corresponding to each task, which is used to characterize the transmission of the task from the mobile device to the network edge device; the server transmission data includes: the server transmission time corresponding to each task, the server waiting time corresponding to each task, and the server execution time corresponding to each task; The second model for calculating the edge offloading overhead of the network edge device is constructed based on the resource requirement data of different mobile devices under different tasks, the channel transmission data of the network edge device, and the server transmission data of the network edge device, including: generating a second data processing time corresponding to each task according to the data volume, channel transmission rate, server transmission time, server waiting time, and server execution time corresponding to each task; generating a second data processing energy consumption corresponding to each task according to a second data processing time corresponding to each task and an occurrence probability corresponding to each task; A second model for calculating the edge offloading overhead of the network edge device is generated according to the preset time weight value, the second data processing time, the preset energy consumption weight value and the second data processing energy consumption of each task.

4. The method for offloading edge computing tasks of the Internet of Things according to claim 3, wherein: The uninstall type constraints include: ; Among them, Mobile device Offload type of task ,include: The corresponding local uninstallation, Offloading the task to the edge of the first base station and Offload the task to Edge offloading of a second base station.

5. The method for offloading edge computing tasks of the Internet of Things according to claim 4, wherein: The edge offloading quantity constraint includes: ; ; in, Indicates the total number of tasks corresponding to tasks offloaded to the first base station, Indicates the total number of tasks corresponding to tasks offloaded to the second base station, is the total number of wireless channels of the first base station, is the total number of wireless channels of the second base station.

6. The method for offloading edge computing tasks of the Internet of Things according to claim 5, wherein: Solving the third model to generate an offloading type corresponding to each task when the total offloading overhead is minimized includes: Each mobile device is regarded as a participant, and each participant corresponds to a utility function; wherein the utility function is used to calculate the offloading cost corresponding to all tasks of a participant; A random game theory strategy is used to generate an initial offloading strategy for each participant; wherein the offloading strategy includes: an offloading type corresponding to each task; Repeat the following policy update operation until the average utility value is less than the preset utility threshold, and then output the updated uninstallation policy of each participant: For each participant, the offloading type corresponding to each task is adjusted through a random game theory strategy based on the current offloading strategies of other participants, and an updated offloading strategy is generated when the utility function is maximized. Initially, the current offloading strategy of each participant is the initial offloading strategy. Generate the average utility value based on the utility function value corresponding to each participant's updated uninstallation strategy; When it is determined that the utility average value is not less than the preset utility threshold, the updated uninstallation policy of each participant is used as the current uninstallation policy corresponding to the next execution of the policy update operation.

7. An edge computing task offloading device for the Internet of Things, characterized in that: include: a first model building module, a first model construction module, a first model building module, a model solving module, and a task offloading module; The first model building module is used to build a first model for calculating the local offloading overhead of the mobile device based on the resource requirement data of different mobile devices under different tasks and the performance data of the mobile device; The first model building module is configured to build a second model for calculating edge offloading overhead of a network edge device based on resource demand data of different mobile devices under different tasks, channel transmission data of the network edge device, and server transmission data of the network edge device; wherein the network edge device is configured to perform mobile edge computing; the network edge device includes: a first base station and a plurality of second base stations; the radio frequency output power of the first base station is greater than the radio frequency output power of the second base stations; The first model construction module is configured to construct a third model with the goal of minimizing the total offloading overhead based on the first model and the second model; wherein the constraints of the third model include: an offloading type constraint and an edge offloading quantity constraint; According to the following formula, a third model is constructed with the goal of minimizing the total offloading overhead: ; ; ; ; ; ; ; ; ; in, represents the total offloading overhead, Indicates the uninstall type expenses, is the total number of mobile devices, is the total number of tasks, Indicates the Mobile device The offloading type of each task; Indicates the Mobile device The uninstall type of each task is local uninstall; Indicates the Mobile device The offloading type of the task is edge offloading, which means offloading the task to the first base station; The offloading type is edge offloading, which means offloading the task to the a second base station; represents a set of second base stations; Indicates the Mobile device The local overhead when the offloading type of a task is local offloading, For the Mobile device The preset time weight value of each task, For the Mobile device The preset energy consumption weight value of each task, For the Mobile device The first data processing time of each task, For the Mobile device The first data processing energy consumption of each task; For the Mobile device The number of CPU cycles for each task, For the the data processing speed of each mobile device; For the The energy consumption of one CPU cycle of a mobile device; Indicates the Mobile device The offloading type of the task is edge offloading, and the edge offloading overhead of offloading the task to the first base station; Indicates the Mobile device The offloading type of the task is edge offloading, and the edge offloading overhead of offloading the task to the second base station; Indicates the Mobile device The second data processing energy consumption of each task is For the Mobile device The second data processing time of each task, Indicates the Mobile device The probability of a task occurring; For the Mobile device The second data processing time of each task, Indicates the Mobile device The amount of data for each task, Indicates the Mobile device The channel transmission rate of each task, Indicates the Mobile device Server transmission time for each task, For the Mobile device The server waiting time for each task, For the Mobile device The server execution time of each task; The model solving module is configured to solve the third model under the offloading type constraint and the edge offloading quantity constraint, and generate an offloading type corresponding to each task when the total offloading overhead is minimized; wherein the offloading type includes: local offloading or edge offloading; The task offloading module is used to offload each task to a mobile device or a network edge device one by one according to each offloading type.

8. A terminal device, characterized in that: The invention comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the method for offloading edge computing tasks of an Internet of Things as described in any one of claims 1 to 6 is implemented.

9. A storage medium, characterized in that: The storage medium includes a stored computer program, wherein, when the computer program is running, the device where the storage medium is located is controlled to execute the edge computing task offloading method of the Internet of Things as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Overhead optimization task scheduling method based on an edge gateway system

    CN109905470A

  • Service security computing unloading method and device

    CN114895976A