Edge computing task unloading method and device of Internet of Things, terminal equipment and storage medium
By building an accurate computing model and introducing constraints, dynamically adjusting the uninstall strategy, the problem of resource competition and insufficient policy adaptability when multiple mobile devices in the prior art request task uninstallation at the same time is solved, and the optimal uninstallation solution and efficiency improvement is achieved.
Patent Information
- Application Number
- CN202411704978.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-11-26
AI Technical Summary
The prior art is difficult to deal with dynamic changes in network conditions, device status and task requirements when multiple mobile devices request tasks to be unloaded simultaneously, resulting in insufficient resource competition and policy adaptability, which may lead to delayed task execution and waste of resources.
By building an accurate computing model, introducing constraints, solving the optimal offloading scheme, dynamically adjusting the offloading strategy, to generate the optimal offloading scheme, and effectively allocating computing resources and network bandwidth.
It realizes an optimal unloading solution that is automatically adjusted according to different scenarios and needs, reducing task execution delays and resource waste, and improving the efficiency of task unloading and processing.
Smart Images

Figure CN119621323A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of task offloading of the Internet of Things, and in particular to an edge computing task offloading method, device, terminal equipment and storage medium for the Internet of Things. Background Art
[0002] In the Internet of Things network, many mobile application tasks requested by mobile devices (Mobile Devices), such as smartphones, smart bracelets, smart cameras, virtual reality devices, etc., are computationally intensive and require high energy consumption, but due to physical size, MDs always have limited computing resources. It is necessary to perform edge computing on the computing tasks of this type of mobile devices, and edge computing means that computing efficiency can be significantly improved 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, which can sink computing, storage, and applications to the edge of the mobile network through task offloading, such as providing computing services after task offloading on network edge devices such as macro base stations and micro base stations.
[0003] The traditional task offloading method usually decides whether to offload the task to the network edge device based on the preset strategy. For example, it decides whether to offload the task of the mobile device to the network edge device for execution or to the local execution device on the mobile device for execution based on factors such as the task type, computing amount, real-time requirements, and network conditions. However, if multiple mobile devices request to offload tasks at the same time, the offloading schemes of each mobile device may cause resource competition and conflict. At this time, the decision to offload tasks based only on the preset strategy will be difficult to cope with the dynamic changes in network conditions, device status, and task requirements. It lacks certain flexibility and cannot be automatically adjusted according to specific scenarios and requirements. As a result, the offloading scheme for tasks is not optimal in different scenarios and requirements, resulting in resource competition and insufficient policy adaptability. When multiple mobile devices offload tasks at the same time, it may cause task execution delays, thereby wasting computing resources and network bandwidth. Summary of the invention
[0004] The embodiments of the present invention provide an edge computing task offloading method, apparatus, terminal device and storage medium for the Internet of Things. By constructing an accurate 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 that the prior art cannot automatically adjust according to specific scenarios and needs, and when multiple mobile devices offload 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 an edge computing task offloading method for an Internet of Things, comprising:
[0006] Constructing a first model for calculating the local offloading overhead of the mobile device according to the resource requirement data of different mobile devices under different tasks and the performance data of the mobile device;
[0007] Constructing a second model for calculating edge offloading overhead of network edge devices according to resource demand 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 offloading type, each task is offloaded to a mobile device or to a network edge device one by one.
[0011] Preferably, the resource demand data includes: the number of CPU cycles corresponding to each task; the CPU cycle is used to characterize 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 first model for calculating the local offloading overhead of the mobile device is constructed according to the resource requirement data of different mobile devices under different tasks and the performance data of the mobile device, including:
[0013] Generate 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] Generate 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 demand data further includes: the data volume corresponding to each task; the channel transmission data includes: the channel transmission rate corresponding to each task for characterizing 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 according to the resource demand 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] Generate 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] Generate the second data processing energy consumption corresponding to each task according to the second data processing time corresponding to each task and the 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 comprises: 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 station;
[0022] The step of constructing a third model with the goal of minimizing the total offloading overhead according to the first model and the second model includes:
[0023] According to the following formula, the 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 indicates that the task is offloaded to the first base station; λ i,j =S The offloading type is edge offloading, and it means offloading the task to the Sth 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 ith 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 ith 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 corresponding 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 Sth second base station.
[0034] Preferably, the edge offloading quantity constraint includes:
[0035]
[0036] in, represents the total number of tasks corresponding to the tasks offloaded to the first base station, represents the total number of tasks corresponding to the task 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 minimum 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] The random game theory strategy is used to generate the initial unloading strategy of each participant; wherein the unloading strategy includes: the unloading type corresponding to each task;
[0040] Repeat the following strategy update operation until the average utility value is less than the preset utility threshold, and then output the updated uninstall strategy of each participant:
[0041] For each participant, according to the current unloading strategies of other participants, the unloading types corresponding to each task are adjusted through the random game theory strategy, and the updated unloading strategy is generated when the utility function is maximized; wherein, the current unloading strategy of each participant at the beginning is the initial unloading strategy;
[0042] Generate the utility average value according to 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 uninstallation strategy updated by each participant is used as the current uninstallation strategy corresponding to the next execution of the strategy 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 construction 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 according to the resource demand data of different mobile devices under different tasks and the performance data of the mobile device;
[0047] The first model building module is used to build a second model for calculating the edge offloading overhead of the network edge device according to 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 used to perform mobile edge computing;
[0048] The first model building module is used to build a third model with the goal of minimizing the total offloading overhead according to the first model and the second model; wherein the constraints of the third model include: offloading type constraints and edge offloading quantity constraints;
[0049] The model solving module is used to solve the third model under the constraints of the offloading type and the edge offloading quantity, 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 the mobile device or the 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, and 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 item 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] The embodiment of the present invention provides an edge computing task offloading method, device, terminal device and storage medium of the Internet of Things. The present invention considers the resource demand data of mobile devices under different tasks, the performance data of mobile devices, channel transmission data and server transmission data, so as to accurately reflect the actual situation under different scenarios and task requirements, and construct a first model and a second model, so that the local offloading overhead of the mobile device and the edge offloading overhead of the network edge device can be calculated respectively; then a third model with the goal of minimizing the total offloading overhead is further constructed according to the two models, and when the third model is solved, the offloading strategy can be automatically adjusted dynamically according to the current task requirements, device status and network conditions, and the introduced offloading type constraints and edge offloading quantity constraints also ensure the feasibility and effectiveness of the offloading scheme, so that when solving the third model, the offloading type combination that minimizes the total offloading overhead can be found, and the optimality of the offloading scheme is guaranteed. Even when multiple mobile devices request task offloading at the same time, the present invention can more effectively allocate computing resources and network bandwidth by accurately calculating the offloading overhead and minimizing the total overhead as the third model, which can not only reduce task execution delays, but also avoid unnecessary resource waste. Compared with the prior art, the present invention can generate the optimal offloading solution by dynamically adjusting according to different scenarios and requirements by constructing an accurate calculation model, introducing constraints and solving the optimal offloading solution, thereby reducing task execution delays and resource waste and improving the efficiency of task offloading and processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 It is a flowchart of an edge computing task offloading method for an Internet of Things provided by an embodiment of the present invention.
[0058] Figure 2 It is a structural diagram of an edge computing task offloading device for an Internet of Things provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0060] like Figure 1FIG. 1 is a flow chart of an edge computing task offloading method of an Internet of Things provided by an embodiment of the present invention. The edge computing task offloading method of the Internet of Things includes:
[0061] Step S1: constructing a first model for calculating the local offloading overhead of the mobile device according to 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 the edge offloading overhead of the network edge device according to 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 used to perform mobile edge computing;
[0063] Step S3: constructing a third model with the goal of minimizing the total offloading overhead according to the first model and the second model; wherein the constraints of the third model include: offloading type constraints and edge offloading quantity constraints;
[0064] Step S4: Under the constraints of the offloading type and the edge offloading quantity, 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;
[0065] Step S5: offloading each task to a mobile device or to a network edge device one by one according to each offloading type.
[0066] For 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 cost of each task when it is executed locally can be more accurately calculated, such as computing cost, storage cost, and energy cost, etc. Then, through the first model, resources can be allocated more effectively to avoid insufficient or wasted resources.
[0067] In a preferred embodiment, the resource demand data includes: the number of CPU cycles corresponding to each task; the CPU cycle is used to characterize the duration of task execution; the performance data of the mobile device includes: data processing speed and energy consumption corresponding to the CPU cycle;
[0068] Then, a first model for calculating the local offloading cost of the mobile device is constructed, which specifically includes:
[0069] Generate 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] Generate 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 in the first model; schematically, different trade-offs and settings can be made for time and energy consumption according to actual application scenarios, so as to more flexibly adapt 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 it can more comprehensively evaluate the total overhead of the task when it is executed locally to obtain the optimal offloading method.
[0078] For step S2, in a preferred embodiment, the edge computing task offloading method of the invention can be applied to a dense IoT network, and then N co-located IoT mobile devices MD (Mobile Devices) can be alternately covered by macro base stations and S micro base stations, and in ultra-dense IoT networks, 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 station.
[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 RF 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] The second base station (micro base station): has a smaller RF output power, but is deployed more densely. It can provide more refined wireless access services, especially in blind spots or weak coverage areas that are not covered by macro base stations. Micro base stations can be dynamically adjusted and optimized according to actual needs to meet the needs of IoT devices for low latency, high bandwidth and low power consumption.
[0082] In a preferred embodiment, each task corresponds to an occurrence probability; and the resource demand 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 and 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] Then, when constructing the second model for calculating the edge offloading overhead of the network edge device, it specifically includes:
[0086] Generate 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] Generate the second data processing energy consumption corresponding to each task according to the second data processing time corresponding to each task and the 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 ith 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 ith 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 understandable that the present invention can offload tasks to different base stations (including macro base stations and micro base stations), which can provide more offloading options for mobile devices. That is, the optimal offloading strategy can be selected according to the current network conditions and task requirements to improve the efficiency and reliability of task execution.
[0095] Furthermore, when network conditions, base station performance or task requirements change, the second model of the present invention can recalculate the edge offloading overhead according to 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, the 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 indicates that the task is offloaded to the first base station; λ i,j =S The offloading type is edge offloading, and it 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 ith 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 ith 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 corresponding 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 Sth second base station.
[0107] The edge offloading quantity constraint includes:
[0108]
[0109] in, represents the total number of tasks corresponding to the tasks offloaded to the first base station, represents the total number of tasks corresponding to the task 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 deriving 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, the total number of tasks offloaded to the first base station and the second base station can be limited to ensure that the total number of wireless channels of the base stations is not exceeded, thereby preventing network congestion and resource overload. The final offloading strategy can maximize the use of the wireless channel resources of the base station and improve the overall network performance through reasonable task scheduling and resource allocation.
[0112] Therefore, based on the constructed third model, the unloading strategy with the lowest overhead can be selected by comparing the overheads of different unloading methods according to the current network conditions, equipment performance, task characteristics and base station load conditions. The optimal unloading method (local unloading, unloading 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] For step S4, in a preferred embodiment, solving the third model to generate an offloading type corresponding to each task when the total offloading overhead is minimum 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] The random game theory strategy is used to generate the initial unloading strategy of each participant; wherein the unloading strategy includes: the unloading type corresponding to each task;
[0116] Repeat the following strategy update operation until the average utility value is less than the preset utility threshold, and then output the updated uninstall strategy of each participant:
[0117] For each participant, according to the current unloading strategies of other participants, the unloading types corresponding to each task are adjusted through the random game theory strategy, and the updated unloading strategy is generated when the utility function is maximized; wherein, the current unloading strategy of each participant at the beginning is the initial unloading strategy;
[0118] Generate the utility average value according to 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 uninstallation strategy updated by each participant is used as the current uninstallation strategy corresponding to the next execution of the strategy update operation.
[0120] Illustratively, assume that there is a system including three mobile devices (participants A, B, and C), each of which has a series of tasks to be offloaded, and can choose to offload locally or to two different base stations (a first base station and a second base station). Then, the embodiment of the present invention can find an offloading strategy through a random game theory strategy to minimize the total offloading overhead of the entire system.
[0121] Initially, the participants are set as: A, B, C (three mobile devices). The utility function is: each participant has a utility function (i.e., the third model of the present invention), which is used to calculate the offloading overhead corresponding to all its tasks. The initial offloading strategy is: the initial offloading strategy of each participant is generated using a random game theory strategy. 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, the offloading types corresponding to each task of A can be adjusted through random game theory strategies according to 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 locally, so it adjusts the strategy. After adjusting the strategy, A calculates the new utility function value. If the new utility value is greater than the old utility value, the new offloading strategy is accepted. Similar update operations are performed on B and C.
[0123] The utility average of all participants was further calculated and compared with the preset utility threshold.
[0124] Subsequent rounds of updates: Repeat the policy update operation, and 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 is less than the preset utility threshold, the update is stopped and the final unloading strategy of each participant is output.
[0126] Assume that, in a certain round of updates, 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 can maximize the value of its utility function. At the same time, 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 offload 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 will be continued. If the average utility is less than the preset utility threshold, the update will be stopped and the final uninstallation strategy of each participant will be output.
[0128] Through the above process, the present invention can find an unloading strategy that minimizes the total unloading overhead of the entire system. This strategy is dynamically adjusted based on the current unloading strategy of each participant and the behavior of other participants, and is obtained through continuous iteration and updating, so that a global optimal or approximately optimal unloading 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 some heuristic algorithm.
[0130] In each iteration, each mobile device observes the current uninstallation strategies of other devices and adjusts its own uninstallation strategy based on these strategies. The basis for adjustment is to maximize its own utility function (i.e., minimize its total cost). Each mobile device calculates its total cost based on its own uninstallation strategy and the strategies of other devices, and calculates the utility function value accordingly. The average value of the utility function of all mobile devices is calculated and compared with the preset utility threshold. If the average value is less than the threshold, the iteration is stopped and the final uninstallation strategy is output. Otherwise, the iteration continues.
[0131] The present invention uses random game theory strategies to allow the system to dynamically adjust the unloading strategy according to the current environmental conditions and the behaviors 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 unloading strategy and taking into account the behavior of all participants, the present invention can tend to a globally optimal or approximately optimal unloading strategy, ensuring that the overall performance of the system is optimal, rather than just the performance of a single device. Through the random game theory strategy, it is usually possible to converge to a stable solution, that is, all participants no longer change their strategies, indicating that the system can reach an equilibrium state at this time, in which each participant is satisfied with its strategy. Therefore, by optimizing the unloading strategy through the random game theory strategy, the present invention can more effectively utilize system resources, thereby reducing resource waste and improving the overall efficiency and performance of the system.
[0133] For step S5, specifically, if the offloading type of a task is local offloading, the task will be executed on the mobile device where it is located; if the offloading type is offloading to the first base station, the task will be transmitted to the first base station and executed; if the offloading type is offloading to the second base station, the task will be transmitted 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 offloading type.
[0134] Since the previous steps have determined a reasonable offloading strategy for each task through an 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 various embodiments of the edge computing task offloading method of the Internet of Things, the present invention provides a corresponding device embodiment;
[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 construction 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 according to the resource demand data of different mobile devices under different tasks and the performance data of the mobile device;
[0138] The first model building module is used to build a second model for calculating the edge offloading overhead of the network edge device according to 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 used to perform mobile edge computing;
[0139] The first model building module is used to build a third model with the goal of minimizing the total offloading overhead according to the first model and the second model; wherein the constraints of the third model include: offloading type constraints and edge offloading quantity constraints;
[0140] The model solving module is used to solve the third model under the constraints of the offloading type and the edge offloading quantity, 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 the mobile device or the network edge device one by one according to each offloading type.
[0142] It should be noted that the device embodiments described above are merely schematic, 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 on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying 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. Those of ordinary skill in the art can understand and implement it without paying creative labor.
[0143] Those skilled in the art can clearly understand that, for the sake of convenience and simplicity, 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 various embodiments of the edge computing task offloading method of the Internet of Things, the present invention provides corresponding terminal device item embodiments.
[0145] An 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, and when the processor executes the computer program, an edge computing task offloading method for the Internet of Things described in any method embodiment of the present invention is implemented.
[0146] The terminal device may be a computing terminal device such as a desktop computer, a notebook, a palm 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, and uses various interfaces and lines to connect various parts of the entire terminal device.
[0148] The memory can be used to store the computer program, and the processor realizes 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 according to 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, a 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 various embodiments of the edge computing task offloading method of the Internet of Things, 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, the steps of each method embodiment described above can be implemented. Among them, 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, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, 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, etc. 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 a person skilled in the art can make several improvements and modifications without departing from the principle 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 the local offloading overhead of the mobile device according to the resource requirement data of different mobile devices under different tasks and the performance data of the mobile device; Constructing a second model for calculating edge offloading overhead of network edge devices according to resource demand 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; 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; Depending on the offloading type, each task is offloaded to a mobile device or to a network edge device one by one.
2. The edge computing task offloading method of the Internet of Things according to claim 1, characterized in that: The resource demand data includes: the number of CPU cycles corresponding to each task; the CPU cycle is used to characterize the duration of task execution; the performance data of the mobile device includes: data processing speed and energy consumption corresponding to the CPU cycle; The first model for calculating the local offloading overhead of the mobile device is constructed according to the resource requirement data of different mobile devices under different tasks and the performance data of the mobile device, including: Generate 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; Generate 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 edge computing task offloading method of the Internet of Things as claimed in claim 2, characterized in that: 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 according to the resource demand 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: Generate 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; Generate the second data processing energy consumption corresponding to each task according to the second data processing time corresponding to each task and the 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 edge computing task offloading method of the Internet of Things as claimed in claim 3, characterized in that: 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 station; The step of constructing a third model with the goal of minimizing the total offloading overhead according to the first model and the second model includes: According to the following formula, the third model is constructed with the goal of minimizing the total offloading overhead: S∈{1,2,…,S}; 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 indicates that the task is offloaded to the first base station; λ i,j =S The offloading type is edge offloading, and it means offloading the task to the Sth second base station; S∈{1,2,…,S} represents the set of second base stations; 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; Indicates that the offloading type of the jth task of the ith 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 ith 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.
5. The edge computing task offloading method of the Internet of Things as claimed in claim 4, characterized in that: The uninstall type constraints include: Among them, the offloading type λ of the jth task of the i-th mobile device is i,j , including: i,j = 0 corresponding 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 Sth second base station.
6. The edge computing task offloading method of the Internet of Things as claimed in claim 5, characterized in that: The edge offloading quantity constraint includes: in, represents the total number of tasks corresponding to the tasks offloaded to the first base station, represents the total number of tasks corresponding to the task 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.
7. The method for offloading edge computing tasks of the Internet of Things according to claim 6, characterized in that: The solving of the third model to generate an offloading type corresponding to each task when the total offloading overhead is minimum 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; The random game theory strategy is used to generate the initial unloading strategy of each participant; wherein the unloading strategy includes: the unloading type corresponding to each task; Repeat the following strategy update operation until the average utility value is less than the preset utility threshold, and then output the updated uninstall strategy of each participant: For each participant, according to the current unloading strategies of other participants, the unloading types corresponding to each task are adjusted through the random game theory strategy, and the updated unloading strategy is generated when the utility function is maximized; wherein, the current unloading strategy of each participant at the beginning is the initial unloading strategy; Generate the utility average value according to 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 uninstallation strategy updated by each participant is used as the current uninstallation strategy corresponding to the next execution of the strategy update operation.
8. 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 according to the resource demand data of different mobile devices under different tasks and the performance data of the mobile device; The first model building module is used to build a second model for calculating the edge offloading overhead of the network edge device according to 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 used to perform mobile edge computing; The first model building module is used to build a third model with the goal of minimizing the total offloading overhead according to the first model and the second model; wherein the constraints of the third model include: offloading type constraints and edge offloading quantity constraints; The model solving module is used to solve the third model under the constraints of the offloading type and the edge offloading quantity, 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 the mobile device or the network edge device one by one according to each offloading type.
9. A terminal device, characterized in that: It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, it implements an edge computing task offloading method for the Internet of Things as described in any one of claims 1 to 7.
10. 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 an edge computing task offloading method for the Internet of Things as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Overhead optimization task scheduling method based on an edge gateway system
CN109905470A
Multi-server complete calculation unloading method and system in mobile edge environment
CN113950103A
Service security computing unloading method and device
CN114895976A
Edge computing task unloading method and device
CN118093054A
Cited By
Method and device for adjusting operation of edge internet-of-things sensor network
CN114510868A
Edge IoT sensor network operation adjustment method and device
CN114510868B