Cloud edge end cooperative computing offloading method and device, electronic equipment and storage medium

By using graph neural networks and reinforcement learning methods in a cloud-edge-end collaborative architecture, a directed acyclic graph model is constructed to optimize the task offloading strategy, which solves the problem of unconsidered task dependencies and achieves the minimization of energy consumption of IoT devices and improvement of system performance.

CN118972899BActive Publication Date: 2025-10-10SOUTH CHINA UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411258161.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2025-10-10
Estimated Expiration
2044-09-09

AI Technical Summary

Technical Problem

Under the cloud-edge-end collaborative architecture, existing technologies fail to effectively consider the dependencies between tasks, resulting in increased complexity in offloading decisions and an inability to optimize the average energy consumption and system benefits of IoT devices.

Method used

Graph neural networks and reinforcement learning methods are used to construct a cloud-edge-end collaborative system model. Task dependencies are represented by a directed acyclic graph. Combined with communication and computing models, the task offloading strategy is optimized to minimize system energy consumption.

Benefits of technology

Taking into account task dependencies, the average energy consumption of IoT devices is optimized, the computing and transmission performance of the system are improved, the execution time is shortened, and the system throughput is increased.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118972899B_ABST
    Figure CN118972899B_ABST
Patent Text Reader

Abstract

The application relates to a cloud-edge-end cooperative computing offloading method and device, electronic equipment and a storage medium, which comprises the following steps of system model construction: a cloud-edge-end cooperative system model comprising a plurality of IoT devices, an edge server and a remote cloud server is established, the system model comprises a task dependency model, a communication model and a computing model; problem formulation: an optimization objective of a task offloading decision and corresponding constraint conditions are constructed, the optimization objective is to minimize the average energy consumption of devices in the system; and computing offloading: a task offloading strategy is obtained by using a graph neural network and a reinforcement learning method, and offloading scheduling of cloud-edge-end cooperation is realized, and the offloading scheduling is performed in time slots. In the scene where subtask information is unknown, the graph neural network and the reinforcement learning method are used to schedule a plurality of tasks with a dependency relationship in each time slot to obtain a task offloading strategy, so that the average energy consumption of IoT devices is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer application technology, and more specifically, to a cloud-edge collaborative computing offloading method, device, electronic device and storage medium. Background Art

[0002] With the rapid development of mobile communications and IoT technologies, demand for smart mobile devices has surged, especially for computationally intensive tasks such as augmented reality, virtual reality, and real-time online gaming. Simultaneously, the variety and number of IoT devices, such as wearables and smart cars, have also increased dramatically. However, these developments not only place higher demands on the computing power of IoT (Internet of Things) devices but also pose a more severe challenge to their battery life. Limited by design size, battery life, and heat dissipation, IoT devices have limited computing resources, making it difficult to meet the demands of increasingly complex applications and services.

[0003] Currently, both cloud computing and edge computing are effective paradigms for addressing the computing and storage needs of IoT devices. Cloud computing provides massive computing and storage capabilities in cloud data centers through centralized resource deployment, enabling IoT devices to connect via carrier core networks and the internet. However, cloud data centers are often geographically distant from IoT devices, resulting in high communication latency, which is often unacceptable for resource-intensive and latency-sensitive IoT applications. Edge computing, as an effective complement to cloud computing, deploys computing resources closer to IoT devices, such as smart gateways, access points, and base stations. This allows tasks requiring less computation to be processed directly on edge nodes, significantly reducing communication latency and network bandwidth requirements. Despite this, the computing power of edge servers remains limited compared to cloud data centers. When a large number of tasks are simultaneously offloaded to edge servers, or when the computing resources required by IoT devices exceed the processing capabilities of the edge servers, these edge computing nodes struggle to meet the demands of complex applications.

[0004] Since single cloud computing or edge computing cannot solve all offloading problems, building a cloud-edge-end collaborative computing architecture, combining the abundant computing resources of cloud computing with the low communication costs, short response times, and strong network adaptability of edge computing, has become a viable solution. This architecture can provide better computing and transmission performance than cloud computing or edge computing alone. However, some current research fails to consider the complexity of tasks in real-world scenarios. When performing offloading, each computing task is treated as an indivisible whole, ignoring the dependencies between computing tasks. For example, the paper "Chouikhi S, Esseghir M, Merghem-Boulahia L. Energy-Efficient Computation Offloading Based on Multi-Agent Deep Reinforcement Learning for Industrial Internet of Things Systems[J]. IEEE Internet of Things Journal, 2023" appears to be an error. Another body of work, while considering dependencies between tasks, is typically performed only within a two-layer offloading architecture (e.g., cloud-edge or edge-device), without considering cloud-edge-device collaborative scenarios or random dependencies. For example, see "Wang J, Chen P, Yin Q, et al. A DRL-based algorithm for Dependent TaskOffloading in Multi-access Edge Computing[C] / / 2023 5th International AcademicExchange Conference on Science and Technology Innovation (IAECST). IEEE, 2023: 38-43." Due to factors such as the complexity of computing communication costs between subtasks, it is challenging to simultaneously consider task dependencies in cloud-edge-device architectures for offloading decisions. Summary of the Invention

[0005] The present invention aims to overcome at least one defect (shortcoming) of the above-mentioned prior art and provide a cloud-edge-end collaborative computing offloading method, device, electronic device and computer storage medium to solve the problem of how to make effective computing offloading strategy decisions to optimize the average energy consumption of all IoT devices when multiple IoT devices execute an application composed of multiple sub-tasks with task dependencies under a cloud-edge-end collaborative architecture, so as to maximize the system's benefits.

[0006] According to a first aspect of the present application, a cloud-edge-device collaborative computing offloading method is provided, the method comprising:

[0007] System model construction: Establish a cloud-edge-end collaborative system model consisting of multiple IoT devices, an edge server, and a remote cloud server. The system model includes a task dependency model, a communication model, and a computation model.

[0008] Problem Formulation: Construct the optimization objective and corresponding constraints for the task offloading decision, where the optimization objective is to minimize the average energy consumption of the devices in the system.

[0009] Computation offloading: Use graph neural networks and reinforcement learning methods to obtain task offloading strategies and implement cloud-edge-end collaborative offloading scheduling, which is performed by time slots.

[0010] Optionally, the IoT device is used to execute an application, the application is composed of multiple interdependent subtasks, and the subtasks are executed according to a certain order or condition; each of the IoT devices executes a portion of the subtasks in the application that have a dependent relationship;

[0011] The time series is divided into time slots, in any time slot In the example, it is assumed that the bandwidth required by each subtask remains unchanged; the application arrives at the IoT device according to the time slot;

[0012] Assume that the interdependent subtasks in the application are The number of IoT devices is , definition For the The deadline for the application running on each IoT device to complete, , for the The application running on the IoT device includes k Subtasks , subtask Can be written as:

[0013] (1)

[0014] in, k Indicates the index of the subtask, k The value of ; To run subtasks The required computing resources, that is, the CPU cycles required for each bit task; For subtasks The data size; For subtasks Deadline for completion;

[0015] The task dependency model is as follows:

[0016] The first The applications running on IoT devices are divided into subtasks, whose task dependencies are represented by directed acyclic graph DAG, that is ,in is a set of nodes, where each subtask is a node; is the set of edges that are data dependent between tasks, i.e. directed edges Describes any two subtask nodes and Priority constraints between subtasks The direct predecessor task When not completed, subtasks Unable to start execution;

[0017] Record The application running on the IoT device includes k Subtasks The set of direct predecessor tasks is , the set of direct successor tasks is , the ending node is ; Define the task node without a direct predecessor task as the starting task node, and the task node without a direct successor task as the terminating task node; there can be one or more starting nodes, and the multiple starting nodes are executed serially or in parallel; there can be only one terminating node, and the terminating node represents the completion node of the application;

[0018] Defined in The start time of running the application on the IoT device is , No. The application running on the IoT device includes k Subtasks The time when execution can begin is the preparation time of the subtask , subtask The time when the operation ends is the completion time ; According to the task dependency, the preparation time of the subtask can be obtained as follows:

[0019]

[0020] The rate at which the IoT device uploads to the edge server through the wireless channel can be obtained according to the Shannon formula: The transmission rate of IoT devices offloading subtasks to edge servers , as follows:

[0021]

[0022] in, For subtasks Channel bandwidth to edge servers, For the The transmission power of each IoT device, For IoT devices The distance to the edge server, is the reference distance, is the path loss exponent, is the path loss constant, is the variance of the additive white Gaussian channel noise.

[0023] The computing models include local computing model, edge computing model and cloud computing model, which are as follows:

[0024] Local computing processes subtasks on IoT devices; in the local computing model, we define For the The computing power of IoT devices, so the subtask Execution time Expressed as:

[0025]

[0026] Corresponding local completion time Expressed as:

[0027]

[0028] The energy consumption of each computing cycle is defined as ,in is the energy factor, represents the computing power of the IoT device; therefore, the energy consumption corresponding to local computing is expressed as:

[0029] (6)

[0030] In the edge computing model, for subtasks that are offloaded to edge servers, the subtasks The processing consists of two stages:

[0031] During the transmission phase, subtasks are sent from IoT devices to edge servers via wireless uplink channels. Due to limited channel capacity, subtasks may need to wait for the channel to become idle before uploading. Furthermore, the uploaded data is of a certain size, which can lead to latency in the data transmission process.

[0032] In the calculation phase, the subtask is uploaded to the edge server and the calculation is completed on the edge server;

[0033] For the transmission phase, define the earliest arrival time of the task For subtasks The earliest arrival time to the corresponding edge server is calculated as follows:

[0034]

[0035] in, For subtasks From The channel transmission time from an IoT device to the edge server is calculated as follows:

[0036]

[0037] Subtasks Energy consumption sent from IoT devices to edge servers for:

[0038]

[0039] For the calculation phase, define is the computing power of the edge server; subtask Execution time required to execute on edge servers as follows:

[0040]

[0041] in is the queuing time of the task on the edge server;

[0042] Subtasks Completion time of offloading to edge servers for:

[0043]

[0044] In the cloud computing model, IoT devices must first transmit data to edge servers before uploading tasks to the cloud. This process goes through the following two stages:

[0045] In the upload phase, the subtask is sent from the IoT device to the edge server via the wireless uplink channel, and then forwarded by the edge server to the cloud server;

[0046] In the cloud server computing phase, after receiving the subtask, the cloud server will immediately compute the subtask. Therefore, the delay of this cloud server computing phase is the computing delay of the subtask in the cloud server.

[0047] For the upload phase, the wired transmission rate between the edge server and the cloud server is , you can get the subtask Transfer time from edge server to cloud server for:

[0048]

[0049] For the cloud server computing phase, is the computing power of the cloud server, then the subtask The execution time on the cloud server is:

[0050]

[0051] Subtasks The completion time of the data after it passes through the edge server and is uploaded to the cloud server for execution for:

[0052]

[0053] Optionally, the reinforcement learning method includes three elements: state, action, and reward function;

[0054] The state is defined as the feature vector obtained by embedding the system state through the graph neural network GCN, denoted as ;

[0055] The action set is , where for any subtask , Represents a subtask Execute locally, Represents a subtask Offload to the edge server for execution, Represents a subtask After being transferred through the edge server, it is uploaded to the cloud server for execution;

[0056] The reward function is set as:

[0057]

[0058] in, For subtasks Energy consumption when executing locally; Take action for the current the energy consumption generated; is the completion rate of the application, that is, the ratio of the number of completed subtasks to the total number of subtasks; Parameters related to the deadline; is the application completion rate weight; is the deadline weight; can be obtained by the following formula:

[0059]

[0060] wherein is a deadline penalty coefficient, is a distance coefficient from the current time to the application deadline, that is, the closer the task is to the application deadline , the smaller the value is; denotes a distance coefficient threshold value; can be obtained by the following formula:

[0061]

[0062] wherein is the deadline of the subtask , and is the current time.

[0063] By constructing a cloud-edge-end collaborative system model and using a graph neural network and a reinforcement learning method to obtain a task offloading strategy, the average energy consumption of all IoT devices is minimized.

[0064] Optionally, in the calculation offloading process, for each time slot , the agent obtains an environment state of the current time slot from the environment, and selects an action from the action space according to a policy ; wherein the policy represents the probability of taking the action under the state ; then, the environment enters the next state according to the state transition probability , and returns a reward to the agent according to a reward function ; according to the above process, a round of training process of the agent is as follows:

[0065] S3.1, reset the environment to obtain an initial system state , and set the current time slot ;

[0066] S3.2, obtain all subtasks that have not started to be executed on all IoT devices that have started to apply within the current time slot ;

[0067] S3.3. Merge DAGs by dependency, collect relevant information for each subtask, and integrate DAG and subtask information into GCN for processing to obtain the current system status. ;

[0068] S3.4. Usage Strategy For the current Task selection actions that can be started at any time , perform actions and receive rewards and the next state ;

[0069] S3.5 Storage To Cache ;

[0070] S3.6. Check the current time slot Are there any subtasks that have not been scheduled? If all subtasks have been scheduled, calculate the advantage estimate. ; Otherwise, the time slot , return to step S3.2; the advantage estimate Calculate according to the following formula:

[0071]

[0072] in, represents the timing difference error, represents the discount factor, represents the attenuation factor;

[0073] S3.7, repeat the following steps K times: Randomly select the size of The samples are used for learning and the network parameters of the model are updated ;

[0074] S3.8. Clear the cache , a round of training process ends.

[0075] By representing dependent tasks as a directed acyclic graph (DAG) and using GCN to process the DAG, the system can efficiently understand and handle the complex dependencies between tasks; by continuously interacting with the environment, collecting rewards and updating network parameters, the intelligent agent can gradually learn better scheduling strategies.

[0076] Optionally, the graph neural network is used to embed the dependencies between tasks into a vector space, so that each task can be represented in the form of a vector of specific features and association relationships; the feature extraction process of the graph neural network includes the following steps:

[0077] Initialization node characteristics: each node characteristic includes the execution time, data volume, and energy consumption of the subtask;

[0078] Graph merging and adjacency matrix construction: At each time slot, the status of the device currently executing the application is obtained. When the services of the subtasks are the same, the subtasks are directly merged.

[0079] When the services of the subtasks are different, a virtual start node is added, and the virtual start node is connected to the start nodes of all DAGs;

[0080] In any time slot , set each device The corresponding DAG composed of unfinished subtasks is expressed as ,in, , then in the time slot Get all The merged task dependency graph is used Expressed as:

[0081]

[0082] Multi-layer GCN processing: Use multi-layer GCN to merge the task dependency graph Perform feature extraction. The features of each node include its own attributes and dependencies with other tasks.

[0083] Through multi-layer GCN processing, the dependencies between tasks are further embedded into the high-dimensional vector space, so that each task can be represented in the form of a vector containing specific features and association relationships, thereby enhancing the accuracy of task scheduling.

[0084] Optionally, the optimization objective of the task offloading decision and its corresponding constraints are as follows:

[0085] For each subtask , there are corresponding uninstall strategies ,in They represent local execution, offloading to an edge server for execution, and uploading to a cloud server for execution after being transferred through an edge server. The offloading strategy satisfies the following constraints:

[0086]

[0087] Wherein, formula (14) indicates that each time in the unloading strategy You can only choose one of them;

[0088] No. The latency of executing applications on IoT devices for:

[0089]

[0090] No. The total energy consumption of IoT devices executing applications is:

[0091]

[0092] in For fixed circuit power of IoT devices, the Including the power consumed by digital-to-analog converters, analog-to-digital converters, frequency synthesizers, and mixers;

[0093] The overall uninstallation strategy of the system is defined as , the optimization problem model is formulated as follows:

[0094]

[0095]

[0096]

[0097]

[0098]

[0099]

[0100] Among them, constraints C1 and C2 are constraints of the offloading strategy, that is, each subtask can only choose one of the three: local computing, offloading to the edge node, and offloading to the cloud server; constraint C3 means that the execution of any subtask on any device must be completed within its limited maximum deadline; constraints C4 and C5 represent the dependency relationship between subtasks, where constraint C4 represents the subtask The execution of a task must start after all its direct predecessor tasks are completed. Constraint C5 indicates that when a subtask is a starting node task, the subtask starts executing in parallel at the start time of offloading.

[0101] Constraints enable tasks to be offloaded under constraints such as the device's computing power, power consumption, and dependencies between tasks, thereby improving the accuracy of offloading strategies.

[0102] According to a second aspect of the present application, a cloud-edge-device collaborative computing offloading device is provided, the device comprising:

[0103] The cloud-edge-end collaborative system architecture module is used to build a cloud-edge-end collaborative system model with multiple IoT devices, an edge server, and a cloud data center, including task dependency models, communication models, and computation models;

[0104] A task offloading decision optimization module is used to construct an optimization objective for task offloading decisions and its corresponding constraints, wherein the optimization objective is to minimize the average energy consumption of devices in the system;

[0105] Offloading calculation module: Uses graph neural networks and reinforcement learning methods to obtain task offloading strategies and implements cloud-edge-end collaborative offloading scheduling, which is performed by time slots.

[0106] According to a third aspect of the present application, an electronic device is provided, including:

[0107] a memory for storing one or more computer programs;

[0108] The processor implements the cloud-edge collaborative computing offloading method described in the first aspect above when the one or more computer programs are executed by the processor.

[0109] According to the fourth aspect of the present application, a computer-readable storage medium is provided, which stores computer instructions, and the computer instructions are used to enable a processor to implement the cloud-edge collaborative computing offloading method described in the first aspect above when executed.

[0110] Based on any of the above aspects, the cloud-edge-device collaborative computing offloading method, device, electronic device, and computer storage medium provided by the embodiments of the present application have the following beneficial effects compared with the prior art:

[0111] 1. When establishing the system model, the scenario where there are task dependencies between applications running on devices in a cloud-edge-end collaborative architecture is taken into consideration, and a directed acyclic graph is used to model the task dependencies. Using a directed acyclic graph for modeling can simplify the expression of task dependencies and reduce the complexity of task scheduling decisions. The DAG model supports parallel processing of tasks. In a cloud-edge-end collaborative architecture, the system can use multiple computing nodes to parallelize multiple tasks that can be executed in parallel, thereby shortening the overall execution time and improving system throughput. Therefore, using a directed acyclic graph to model task dependencies in a cloud-edge-end collaborative architecture can effectively schedule and obtain task offloading strategies under the conditions of dependency and resource constraints.

[0112] 2. In the cloud-edge-end collaborative architecture, the resources of IoT devices, edge servers and the cloud are limited, and there are dependencies between tasks. The optimization goal is to meet the deadlines of all tasks. Graph neural networks and reinforcement learning methods are used to obtain task offloading strategies to minimize the average energy consumption of IoT devices during task execution. BRIEF DESCRIPTION OF THE DRAWINGS

[0113] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0114] Figure 1 Flowchart of the cloud-edge collaborative computing offloading method provided in this embodiment.

[0115] Figure 2 This is a schematic diagram of the cloud-edge-end collaboration system model in this embodiment.

[0116] Figure 3 Schematic diagram of the task dependency model in this embodiment.

[0117] Figure 4 Schematic diagram of the interaction between the intelligent agent and the environment provided in this embodiment.

[0118] Figure 5 This is a task scheduling flowchart for the cloud-edge collaborative computing offloading method provided in this embodiment.

[0119] Figure 6 Schematic diagram of average energy consumption of the cloud-edge collaborative computing offloading method provided in this embodiment under different numbers of subtasks.

[0120] Figure 7 This is a schematic diagram of the structure of the electronic device provided in this embodiment.

[0121] Figure 8 Schematic diagram of the cloud-edge collaborative computing offloading device provided in this embodiment. DETAILED DESCRIPTION

[0122] The figures in this application are for illustrative purposes only and are not to be construed as limiting the present application. To better illustrate the following embodiments, some components in the figures may be omitted, enlarged, or reduced in size, and do not represent actual product dimensions. Those skilled in the art will appreciate that some well-known structures and their descriptions may be omitted from the figures.

[0123] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings 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 in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.

[0124] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0125] Cloud computing and edge computing have limitations in solving the task offloading problem. While combining cloud computing and edge computing to build a cloud-edge-end collaborative computing architecture is feasible, current research on offloading decisions within this architecture fails to fully consider the complexity of tasks in real-world scenarios, particularly the dependencies between tasks. Even when task dependencies are considered, these approaches are often limited to a two-layer offloading architecture and fail to account for cloud-edge-end collaborative scenarios, especially those involving random dependencies. Therefore, in a cloud-edge-end architecture, making offloading decisions that simultaneously consider task dependencies and communication cost complexity is a challenging technical problem.

[0126] This embodiment provides a technical solution that can solve the above-mentioned problem. The specific implementation methods of this application are described in detail below with reference to the accompanying drawings.

[0127] like Figure 1 As shown, this embodiment provides a cloud-edge collaborative computing offloading method, which may include the following steps:

[0128] S110, system model construction: establish a cloud-edge-end collaboration system model including multiple IoT devices, an edge server and a remote cloud server, and the system model includes a task dependency model, a communication model and a computing model.

[0129] like Figure 2 As shown, in this embodiment, the cloud-edge-end collaboration system model includes An IoT device, an edge server, and a remote cloud server are provided, wherein each IoT device is connected to the edge server accessible to the IoT device via a wireless link, and the edge server is connected to the remote cloud server via a wired link.

[0130] In this embodiment, the IoT device is used to execute an application. There may be an application on the IoT device that needs to be executed. The application consists of multiple interdependent subtasks, which must be executed in a certain order or under certain conditions. Each IoT device will execute a portion of the subtasks of the application that have dependencies, and there may be overlapping task subsets between IoT devices, but each IoT device autonomously executes the subtasks assigned to it without the intervention of other IoT devices. Divide the time series into time slots, assuming that in any time slot The bandwidth required by each subtask remains unchanged, and the application arrives at the IoT device time slot by time slot. In this embodiment, the scheduler has no prior knowledge about when the task will arrive in the future.

[0131] Assume that the interdependent subtasks in the application are , definition For the The deadline for the application running on each IoT device to complete, , for the The application running on the IoT device includes k Subtasks , subtask attributes Can be written as:

[0132] (1)

[0133] in, k Represents the index of each subtask, k The value of ; To run subtasks The required computing resources, that is, the CPU cycles required to calculate each bit of the task, Depends on the computational complexity of the task; is the data size of the subtask; The deadline for completing this subtask.

[0134] In this embodiment, the task dependency model is as follows:

[0135] The first The applications running on IoT devices are divided into Subtasks, such as Figure 3 As shown, the task dependency of the application can be represented by a directed acyclic graph DAG, that is, ,in Represented as a set of nodes containing each subtask; Represented as a set of edges representing data dependencies between tasks, i.e. directed edges Describes any two subtask nodes and Priority constraints between subtasks The direct predecessor task When not completed, subtasks Unable to start execution;

[0136] Record The application running on the IoT device includes k Subtasks The set of direct predecessor tasks is , the set of direct successor tasks is , the ending node is A task node without a direct predecessor task is defined as a start task node, and a task node without a direct successor task is defined as a termination task node. In this embodiment, there can be one or more start nodes, and the application can execute these tasks as start nodes serially or in parallel; there can only be one termination node, which represents the completion node of the application;

[0137] In order to express task dependencies, we define The start time of running the application on the IoT device is , No. The first application running on an IoT device k Subtasks The time when execution can begin is the preparation time of the subtask , subtask The time when the operation ends is the completion time ;According to the task dependency, get the preparation time of subtasks as follows:

[0138]

[0139] The communication model includes the rate at which IoT devices upload to the edge server through the wireless channel. According to the Shannon formula, the first The transmission rate of IoT devices offloading subtasks to edge servers , as follows:

[0140]

[0141] in, For subtasks Channel bandwidth to edge servers, For the The transmission power of each IoT device, For IoT devices The distance to the edge server, is the reference distance, is the path loss exponent, is the path loss constant, is the variance of the additive white Gaussian channel noise.

[0142] In this embodiment, the computing model includes a local computing model, an edge computing model, and a cloud computing model, which are as follows:

[0143] Local computing model: Local computing means that subtasks are processed directly on IoT devices without offloading. In the local computing model, we define For the The computing power of IoT devices, so the subtask Execution time Expressed as:

[0144] (4)

[0145] Correspondingly, the local completion time Expressed as:

[0146]

[0147] The energy consumption of each computation cycle is defined as ,in is the energy factor, Indicates the computing power of IoT devices. In the specific implementation process, The value depends on the chip architecture and is generally Therefore, the energy consumption of local computing is It can be expressed as:

[0148] (6)

[0149] Edge computing model: In the edge computing model, for subtasks that are offloaded to edge servers for computing, the subtasks The processing consists of two stages:

[0150] During the transmission phase, subtasks are sent from IoT devices to edge servers via wireless uplink channels. Due to limited channel capacity, subtasks may need to wait for the channel to become idle before uploading. Furthermore, the uploaded data is of a certain size, which can lead to transmission delays.

[0151] Computation phase: After the subtask is uploaded to the edge server, the computing resources of the edge server may be occupied. In this case, the subtask needs to wait in the queue and complete the calculation on the edge server;

[0152] For the transmission phase, define the earliest arrival time of the task For subtasks The earliest arrival time to the corresponding edge server is calculated as follows:

[0153]

[0154] in, For subtasks From The channel transmission time from an IoT device to the edge server is calculated as follows:

[0155]

[0156] Subtasks Energy consumption sent from IoT devices to edge servers for:

[0157]

[0158] For the calculation phase, define is the computing power of the edge server; subtask Execution time required to execute on edge servers as follows:

[0159]

[0160] in The queue time of the task on the edge server.

[0161] During specific implementations, the number of tasks that an edge server can execute simultaneously is generally limited. For example, in some embodiments, the number of tasks that an edge server can execute simultaneously will not exceed 10 at most.

[0162] In summary, we can get subtasks Completion time of offloading to edge servers for:

[0163]

[0164] Cloud computing model: In the cloud computing model, IoT devices need to first transmit data to edge servers before uploading tasks to the cloud. Then, the tasks are uploaded from the edge servers to the cloud servers. This process goes through the following two stages:

[0165] Upload phase: The subtask is sent from the IoT device to the edge server via the wireless uplink channel, which then forwards it to the cloud server. Due to the limited channel capacity and the size of the uploaded data, the data transmission process will incur a delay.

[0166] Cloud server computing phase: After receiving the subtask, the cloud server will immediately compute the subtask. Therefore, the delay of this cloud server computing phase is the computing delay of the subtask on the cloud server.

[0167] For the upload phase, the subtask is uploaded from the edge server to the cloud server. The wired transmission rate between the edge server and the cloud server is recorded as , you can get the subtask Transfer time from edge server to cloud server for:

[0168]

[0169] For the cloud server computing phase, is the computing power of the cloud server, then the subtask The execution time on the cloud server is:

[0170]

[0171] In summary, subtasks The time it takes to upload data from the edge server to the cloud server. for:

[0172]

[0173] S120. Problem Formulation: Construct the optimization objective and corresponding constraints for task offloading decisions.

[0174] The optimization objectives of the task offloading decision and its corresponding constraints are as follows:

[0175] For each subtask , define the corresponding uninstallation strategy ,in Represents subtasks respectively Execute locally, offload to edge server for execution, and upload to cloud server for execution after being transferred by edge server. The offloading strategy meets the following constraints:

[0176]

[0177] Wherein, formula (14) indicates that each time in the unloading strategy Only one of them can be selected.

[0178] No. The latency of executing applications on IoT devices for:

[0179]

[0180] No. The total energy consumption of IoT devices executing applications is:

[0181]

[0182] in This is the fixed circuit power of IoT devices, including the power consumed by components such as digital-to-analog converters, analog-to-digital converters, frequency synthesizers, and mixers.

[0183] The overall uninstallation strategy of the system is defined as , the optimization problem model is formulated as follows:

[0184]

[0185]

[0186]

[0187]

[0188]

[0189]

[0190] Among them, constraints C1 and C2 are the constraints of the offloading strategy, that is, each subtask Only one of the three options can be selected: local computing, offloading to edge nodes, and offloading to cloud servers; Constraint C3 indicates that the execution of any subtask on any device must be completed within its limited maximum deadline; Constraints C4 and C5 indicate the dependency between subtasks, where constraint C4 indicates that subtask The task must be executed only after all its direct predecessor tasks are completed. Constraint C5 indicates that when the subtask is the starting node task, the task can be started in parallel at the start time of offloading.

[0191] S130, computing offloading: Use graph neural networks and reinforcement learning methods to obtain task offloading strategies to implement cloud-edge-end collaborative offloading scheduling, where the offloading scheduling is performed in time slots.

[0192] The calculation offloading specifically includes the following methods:

[0193] like Figure 4 As shown in Figure 2, reinforcement learning includes three key elements: state, action, and reward function. The state is defined as the feature vector obtained by embedding the system state into the graph neural network GCN, denoted as The action set is , where for any subtask , Represents a subtask Execute locally, Represents a subtask Offload to the edge server for execution, Represents a subtask After being transferred through the edge server, it is uploaded to the cloud server for execution. The reward function is set as:

[0194]

[0195] in, For subtasks Energy consumption when executing locally; Take action for the current the energy consumption generated; is the completion rate of the application, that is, the ratio of the number of completed subtasks to the total number of subtasks; Parameters related to the deadline; is the application completion rate weight; is the deadline weight. In the specific implementation process, the weight coefficient can be adjusted and To balance the relative importance of these factors. It can be obtained by the following formula:

[0196]

[0197] in is the deadline penalty coefficient, is the distance coefficient from the current moment to the application deadline, that is, the closer the task is to the application deadline, The smaller the value of ; Indicates the distance coefficient threshold, which can be adjusted according to actual needs In this embodiment, is 0.2. It can be obtained by the following formula:

[0198]

[0199] in For subtasks The deadline, is the current time.

[0200] like Figure 5 As shown, for each time slot , the agent obtains the current time slot from the environment Environmental status , and from the action space Based on strategy Select an action , among which, strategy is the agent's state in the environment Select action The environment then changes the state according to the probability Enter the next state , and according to the reward function Return a reward to the agent ; According to the above process, the training process of one round of the agent is as follows:

[0201] S3.1. Reset the environment and get the initial system state , set the current time slot ;

[0202] S3.2. Get the current time slot All subtasks that have not started to be executed on all applied IoT devices;

[0203] S3.3. Merge DAG (directed acyclic graph) according to dependency relationships, collect relevant information for each subtask, and integrate DAG and subtask information into GCN for processing to obtain the current system status

[0204] S3.4. Usage Strategy For the current Task selection actions that can be started at any time , perform actions and receive rewards and the next state ;

[0205] S3.5 Storage To Cache ;

[0206] S3.6. Check the current time slot Are there any subtasks that have not been scheduled? If all subtasks have been scheduled, calculate the advantage estimate. ; Otherwise, the time slot , return to step S3.2; the advantage estimate Calculate according to the following formula:

[0207]

[0208] in, represents the timing difference error, represents the discount factor, Represents the attenuation factor.

[0209] S3.7, repeat the following steps K times: Randomly select the size of Small batch samples are used for learning and network parameters are updated ;

[0210] S3.8. Clear the cache , a round of training process ends.

[0211] In step S3.3, the graph neural network GCN is used to embed the dependencies between tasks into the vector space, so that each task can be represented in the form of a vector of specific features and association relationships, thereby capturing the similarity, dependency and other important association features between tasks.

[0212] The feature extraction process of the graph neural network GCN includes the following steps:

[0213] S3.3.1. Initialization of node characteristics: During initialization, each node characteristic contains basic information of the subtask, such as execution time, data volume, energy consumption, etc.

[0214] S3.3.2. Graph Merging and Adjacency Matrix Construction: At each time slot, obtain information about the devices currently executing the application. If the subtasks provide the same service, merge the subtasks and construct an adjacency matrix to represent the dependencies between the tasks.

[0215] When the services of the subtasks are different, a virtual start node is added, and the virtual start node is connected to the start nodes of all DAGs.

[0216] S3.3.3. Multi-layer GCN processing: Use multi-layer GCN to merge the task dependency graph Perform feature extraction. The features of each node include its own attributes and dependencies with other tasks.

[0217] In step 3.3.1, the characteristic information of the node includes: subtask-related attributes, that is, the inherent attributes of the subtask, such as the amount of data (KB) that the subtask needs to process; the number of subtasks, that is, how many devices need to execute such subtasks in this time slot; the deadline of the subtask, that is, when the subtask can be completed at the latest; the energy consumption of uploading the subtask, that is, the energy consumption of the IoT device uploading the subtask calculation data to the edge server through the wireless channel; the energy consumption of local execution of the subtask, that is, the local energy consumption of the IoT device adopting the local execution strategy; the execution time of the subtask selected in the cloud, edge, and local execution, that is, the time required to execute the subtask when the IoT device selects the strategy of executing in the cloud, edge, and local respectively; the execution time of the subtask selected in the cloud, edge, and local execution, that is, the time required to execute the subtask when the IoT device selects the strategy of executing in the cloud, edge, and local respectively.

[0218] In step S3.3.2, in each time slot, the scheduler can obtain the status of the device that has started executing the application and merge the dependency graphs of the unfinished subtasks on different devices. For subtasks of the same service, the scheduler can directly merge them; for subtasks of different services, their original dependencies remain unchanged, and a virtual start node is added, which is connected to the start nodes of all directed acyclic graphs (DAGs). In any time slot , set each device The corresponding DAG composed of unfinished subtasks is expressed as ,in, , then in the time slot Get all The merged task dependency graph is used Expressed as:

[0219]

[0220] In step S3.3.3, this embodiment uses a three-layer GCN to merge the task dependency graph Perform feature extraction. The features of each node include its own attributes and its dependencies with other tasks. In the forward propagation process of GCN, the forward propagation formula is as follows:

[0221]

[0222] in, is the feature matrix of the node, is the enhanced adjacency matrix, is the activation function, 、 and They are the weight matrices of the three GCN layers respectively.

[0223] For example, this embodiment is implemented using Python programming simulation on a PC. In this simulation, the system includes 20 IoT devices, which are randomly and evenly distributed in the environment. The size of each subtask conforms to a uniform distribution of (200, 300) KB. The computing power of different IoT devices conforms to a uniform distribution of (0.5, 1.0) GHz, with the edge server's computing power being 3 GHz and the cloud server's computing power being 6 GHz. The device's constant circuit power in idle state is 0.2 W, the computational complexity is 30 cycles / bit, and the duration of each time slot is 0.15 seconds. In terms of network communication, the wired transmission rate between the edge server and the cloud server is fixed at 5 MB / s, while the wireless bandwidth between the IoT device and the edge server follows a uniform distribution of (5.0, 7.0) MHz. For the edge server, at any given moment, the number of tasks that can be executed simultaneously in parallel does not exceed 10.

[0224] In a specific embodiment, Figure 6 This is a diagram of average energy consumption compared with four different schemes, namely local computing scheme, edge-first offloading scheme, cloud-first offloading scheme and randomly selected offloading scheme. The local computing scheme means that all computing tasks are executed on the IoT device where they are located; the edge-first offloading scheme means that computing tasks are preferentially offloaded to the edge server for execution; the cloud-first offloading scheme means that computing tasks are preferentially offloaded to the cloud server for execution; the randomly selected offloading scheme means that an offloading strategy is randomly generated for each computing task among the local, edge server and cloud server. In this simulation, the number of IoT devices is 25, and the number of subtasks contained in the application running on each IoT device ranges from 5 to 25. Figure 5 It can be seen that the average energy consumption of the solution in this embodiment in IoT devices is lower than that of the other four solutions, which verifies the feasibility and efficiency of the present invention.

[0225] The following describes the technical solution of the cloud-edge collaborative computing offloading method provided by this application in conjunction with a specific embodiment.

[0226] like Figure 8 As shown, the embodiment of the present application further provides a cloud-edge-device collaborative computing offloading device 610. Optionally, the cloud-edge-device collaborative computing offloading device 610 may include:

[0227] a model building module 611 for building a cloud-edge-end collaborative system model with multiple IoT devices, an edge server, and a cloud data center, including a task dependency model, a communication model, and a computation model;

[0228] A task offloading decision optimization module 612 is used to construct an optimization goal for task offloading decisions and its corresponding constraints, wherein the optimization goal is to minimize the average energy consumption of devices in the system;

[0229] The offloading calculation module 613 is used to obtain the task offloading strategy using the graph neural network and reinforcement learning method to realize the offloading scheduling of cloud-edge collaboration, and the offloading scheduling is performed according to time slots.

[0230] It can be understood that the above-mentioned device embodiments and the above-mentioned method embodiments can correspond to each other, and similar descriptions of the device embodiments can refer to the method embodiments. To avoid repetition, they will not be described here. A cloud-edge collaborative computing unloading device provided in an embodiment of the present application can execute a cloud-edge collaborative computing unloading method provided in any embodiment of the present application, and has functional modules and beneficial effects corresponding to the execution method. The functional modules of the cloud-edge collaborative computing unloading device can be implemented in the form of hardware, can be implemented by instructions in the form of software, or can be implemented by a combination of hardware and software modules.

[0231] Specifically, each step of the method embodiment of the present application can be completed by the hardware integrated logic circuit and / or software instructions in the processor. The steps of the cloud-edge collaborative computing offloading method in combination with the embodiment of the present application can be directly reflected as the hardware encoding processor, or the hardware and software modules in the encoding processor. Optionally, the software module can be located in a random access memory, a read-only memory, a programmable read-only memory, a flash memory, an electrically erasable programmable memory, a register, or other storage media. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps in the above method embodiment in combination with its hardware.

[0232] The embodiment of the present application provides an electronic device 710, the structure of which is as follows: Figure 7 The electronic device 710 may be Figure 1 The server 100 or the terminal 200 is shown.

[0233] like Figure 7 As shown, the electronic device 710 includes a memory 711, a processor 712, a communication module 713 and an input / output interface 714, etc. Optionally, the memory 711, the processor 712, the communication module 713 and the input / output interface 714 can be connected and communicated through a bus 715.

[0234] The memory 711 is used to store one or more computer programs and transfer the code of the computer program to the processor 712; when the one or more computer programs are executed by the processor 711, the cloud-edge collaborative computing offloading method in the embodiment of the present application is implemented.

[0235] Optionally, the electronic device 710 can be connected to a network through the communication module 713 to communicate with other devices such as terminals or servers through the network to realize the interaction of data. The electronic device 710 can be various forms of digital computers, exemplarily such as desktop computers, servers, workstations, mainframe computers or other types of computers. The electronic device 710 can also be various forms of mobile terminals, exemplarily such as smart phones, tablet computers, wearable devices (such as helmets, glasses, watches, etc.) and other similar mobile terminals.

[0236] Optionally, the electronic device 710 can connect the required input / output devices such as keyboards, display devices, etc. through the input / output interface 714, and the electronic device 710 itself can have a display device and can also be externally connected to other display devices through the input / output interface 714. Optionally, storage devices such as hard disks, etc. can also be connected through the input / output interface 714, so that the data in the electronic device 710 can be stored in the storage devices or the data in the storage devices can be read, and the data in the storage devices can also be stored in the memory 711. It can be understood that the input / output interface 714 can be a wired interface or a wireless interface. According to different actual application scenarios, the devices connected with the input / output interface 714 can be a component of the electronic device 710 or an external device connected with the electronic device 710 when needed.

[0237] Optionally, the memory 711 can be a volatile memory and / or a non-volatile memory, the volatile memory can be a random access memory, etc., and the non-volatile memory can be a read-only memory, a programmable read-only memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory or a flash memory, etc.

[0238] Optionally, the computer program stored in the processor 711 can be divided into one or more modules, which are stored in the memory 711 and executed by the processor 712 to complete the method provided by the embodiment. The one or more modules can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program in the electronic device 710.

[0239] Optionally, the processor 712 may be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the processor 712 include, but are not limited to, a central processing unit, a graphics processing unit, a digital signal processor, various dedicated artificial intelligence computing chips, various processors that run machine learning model algorithms, and may also be any appropriate controller, microcontroller, processor, etc. The processor 712 executes the various methods and processes of this embodiment, illustratively, such as a cloud-edge collaborative computing offloading method in an embodiment of the present application.

[0240] Optionally, the bus 715 may include a path for transmitting information. The bus 715 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. Depending on their functions, the bus 715 may be classified as an address bus, a data bus, a control bus, or the like.

[0241] In an optional implementation, an embodiment of the present application further provides a computer storage medium having a computer program stored thereon, which, when executed by a computer, enables the computer to perform the method of the above-mentioned method embodiment. Part or all of the computer program can be loaded and / or installed on the memory 711 of the electronic device 710. When the computer program is executed by the processor 712, one or more steps of a cloud-edge collaborative computing offloading method of an embodiment of the present application can be performed.

[0242] Optionally, the computer-readable storage medium may be a random access memory, a read-only memory, a programmable read-only memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, or the like.

[0243] Obviously, the above embodiments of the present invention are merely examples for the purpose of clearly illustrating the technical solutions of the present invention, and are not intended to limit the specific implementation methods of the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the claims of the present invention shall be included within the scope of protection of the claims of the present invention.

Claims

1. A cloud-edge-device collaborative computing offloading method, characterized in that: The method comprises: System model construction: Establish a cloud-edge-end collaborative system model consisting of multiple IoT devices, an edge server, and a remote cloud server. The system model includes a task dependency model, a communication model, and a computation model. Problem Formulation: Construct the optimization objective and corresponding constraints for the task offloading decision, where the optimization objective is to minimize the average energy consumption of the devices in the system. Computation offloading: Graph neural networks and reinforcement learning methods are used to obtain task offloading strategies and implement cloud-edge-device collaborative offloading scheduling, which is performed by time slots. The IoT device is used to execute an application, which is composed of multiple interdependent subtasks, and the subtasks are executed according to a certain order or conditions; each of the IoT devices executes a portion of the subtasks in the application that have a dependent relationship; The reinforcement learning method includes three elements: state, action and reward function; The state is the feature vector obtained by embedding the system state into the graph neural network GCN, denoted as ; The action set is , where for any subtask , Represents a subtask Execute locally, Represents a subtask Offload to the edge server for execution, Represents a subtask After being transferred through the edge server, it is uploaded to the cloud server for execution; Reward Function Set to: in, For subtasks Energy consumption when executing locally; Take action for the current the energy consumption generated; is the completion rate of the application, that is, the ratio of the number of completed subtasks to the total number of subtasks; Parameters related to the deadline; is the application completion rate weight; is the deadline weight; From the following formula we can get in is the deadline penalty coefficient, The distance coefficient between the current moment and the application deadline, that is, the closer the task is to the application deadline, the The smaller the value of ; Indicates the distance coefficient threshold; From the following formula we can get: in For subtasks The deadline, is the current time.

2. A cloud-edge-device collaborative computing offloading method according to claim 1, characterized in that: Divide the time series into time slots, in any time slot In the example, it is assumed that the bandwidth required by each subtask remains unchanged; the application arrives at the IoT device according to the time slot; Assume that the interdependent subtasks in the application are The number of IoT devices is , definition For the The deadline for the application running on each IoT device to complete, , for the The application running on the IoT device includes k Subtasks , subtask writing: in, k Indicates the index of the subtask, k The value of ; To run subtasks The required computing resources, that is, the CPU cycles required for each bit task; For subtasks The data size; For subtasks Deadline for completion; The task dependency model is as follows: The first The applications running on IoT devices are divided into subtasks, whose task dependencies are represented by directed acyclic graph DAG, that is ,in is a set of nodes, where each subtask is a node; is the set of edges that are data dependent between tasks, i.e. directed edges Describes any two subtask nodes and Priority constraints between: subtasks The direct predecessor task When not completed, subtasks Unable to start execution; Record The application running on the IoT device includes k Subtasks The set of direct predecessor tasks is , the set of direct successor tasks is , the ending node is ; Define the task node without a direct predecessor task as the starting node, and the task node without a direct successor task as the ending node; there can be one or more starting nodes, and the multiple starting nodes are executed serially or in parallel; there can be only one ending node, and the ending node represents the completion node of the application; Defined in The start time of running the application on the IoT device is , No. The application running on the IoT device includes k Subtasks The time when execution can begin is the preparation time of the subtask , subtask The time when the operation ends is the completion time ;According to the task dependency, get the preparation time of subtasks as follows: The rate at which the IoT device uploads to the edge server through the wireless channel is obtained according to the Shannon formula. The transmission rate of IoT devices offloading subtasks to edge servers , as follows: in, For subtasks Channel bandwidth to edge servers, For the The transmission power of each IoT device, For IoT devices The distance to the edge server, is the reference distance, is the path loss exponent, is the path loss constant, is the variance of the additive white Gaussian channel noise.

3. A cloud-edge-device collaborative computing offloading method according to claim 2, characterized in that: The computing models include local computing model, edge computing model and cloud computing model, which are as follows: Local computing processes subtasks on IoT devices; in the local computing model, we define For the The computing power of IoT devices, so the subtask Execution time Expressed as: Corresponding local completion time Expressed as: The energy consumption of each computing cycle is defined as ,in is the energy factor, represents the computing power of the IoT device; therefore, the energy consumption corresponding to local computing is expressed as: In the edge computing model, for subtasks that are offloaded to edge servers, the subtasks The processing consists of two stages: In the transmission phase, the subtask is sent from the IoT device to the edge server via the wireless uplink channel; In the calculation phase, the subtask is uploaded to the edge server and the calculation is completed on the edge server; For the transmission phase, define the earliest arrival time of the task For subtasks The earliest arrival time at the corresponding edge server is calculated as follows: in, For subtasks From The channel transmission time from an IoT device to the edge server is calculated as follows: Subtasks Energy consumption sent from IoT devices to edge servers for: For the calculation phase, define is the computing power of the edge server; subtask Execution time required to execute on edge servers as follows: in is the queuing time of the task on the edge server; Subtasks Completion time of offloading to edge servers for: In the cloud computing model, IoT devices need to transfer data to edge servers before uploading tasks to cloud servers. This process goes through the following two stages: In the upload phase, the subtask is sent from the IoT device to the edge server via the wireless uplink channel, and then forwarded by the edge server to the cloud server; In the cloud server computing phase, after receiving the subtask, the cloud server will immediately compute the subtask. Therefore, the delay of this cloud server computing phase is the computing delay of the subtask in the cloud server. For the upload phase, the wired transmission rate between the edge server and the cloud server is , then we get the subtask Transfer time from edge server to cloud server for: For the cloud server computing phase, is the computing power of the cloud server, then the subtask The execution time on the cloud server is: Subtasks The completion time of the data after it passes through the edge server and is uploaded to the cloud server for execution for: 。 4. A cloud-edge-device collaborative computing offloading method according to claim 1, characterized in that: During the calculation offloading process, for each time slot , the agent obtains the current time slot from the environment Environmental status and from the action set Based on strategy Select Action Among them, strategy Indicates that the status Take action The probability of state transition is Enter the next state , and according to the reward function Return a reward to the agent ; According to the above process, the training process of one round of the agent is as follows: S3.

1. Reset the environment and get the initial system state , set the current time slot ; S3.

2. Get the current time slot All subtasks that have not yet been executed on IoT devices that have started the application; S3.

3. Merge DAGs by dependency, collect relevant information for each subtask, and integrate DAG and subtask information into the Processing, get the current system status ; S3.

4. Usage Strategy For the current Task selection actions that can be started at any time , perform actions and receive rewards and the next state ; S3.5 Storage To Cache ; S3.

6. Check the current time slot Are there any subtasks that have not been scheduled? If all subtasks have been scheduled, calculate the advantage estimate. ; Otherwise, the time slot , return to step S3.2; the advantage estimate Calculate according to the following formula: in, represents the timing difference error, represents the discount factor, represents the attenuation factor; S3.

7. Repeat the following steps K times: Randomly select the size of The samples are used for learning and the network parameters of the model are updated ; S3.

8. Clear the cache , a round of training process ends.

5. A cloud-edge-device collaborative computing offloading method according to claim 1, characterized in that: The graph neural network is used to embed the dependencies between tasks into a vector space, so that each task can be represented in the form of a vector of specific features and associations. The feature extraction process of the graph neural network includes the following steps: Initialization node characteristics: each node characteristic includes the execution time, data volume, and energy consumption of the subtask; Graph merging and adjacency matrix construction: At each time slot, the status of the device currently executing the application is obtained. When the services of the subtasks are the same, the subtasks are directly merged. When the services of the subtasks are different, a virtual start node is added, and the virtual start node is connected to the start nodes of all DAGs; In any time slot , set each device The corresponding DAG composed of unfinished subtasks is expressed as ,in, , then in the time slot Get all The merged task dependency graph is used Expressed as: Multi-layer Processing: Multi-layer Dependency graph of merged tasks Perform feature extraction. The features of each node include its own attributes and dependencies with other tasks.

6. A cloud-edge-device collaborative computing offloading method according to claim 3, characterized in that: The optimization objectives of the task offloading decision and its corresponding constraints are as follows: For each subtask , there are corresponding uninstall strategies ,in They represent local execution, offloading to an edge server for execution, and uploading to a cloud server for execution after being transferred through an edge server. The offloading strategy satisfies the following constraints: Wherein, formula (14) indicates that each time in the unloading strategy You can only choose one of them; No. The latency of executing applications on IoT devices for: No. The total energy consumption of IoT devices executing applications is: in For fixed circuit power of IoT devices, the Including the power consumed by digital-to-analog converters, analog-to-digital converters, frequency synthesizers, and mixers; The overall uninstallation strategy of the system is defined as , the optimization problem model is formulated as follows: Among them, constraints C1 and C2 are constraints of the offloading strategy, that is, each subtask can only choose one of the three: local computing, offloading to the edge node, and offloading to the cloud server; constraint C3 means that the execution of any subtask on any device must be completed within its limited maximum deadline; constraints C4 and C5 represent the dependency relationship between subtasks, where constraint C4 represents the subtask The execution of a task must start after all its direct predecessor tasks are completed. Constraint C5 indicates that when a subtask is a starting node task, the subtask starts executing in parallel at the start time of offloading.

7. A cloud-edge collaborative computing offloading device, characterized in that: The device comprises: The cloud-edge-end collaborative system architecture module is used to build a cloud-edge-end collaborative system model with multiple IoT devices, an edge server, and a cloud data center, including task dependency models, communication models, and computation models; A task offloading decision optimization module is used to construct an optimization objective for task offloading decisions and its corresponding constraints, wherein the optimization objective is to minimize the average energy consumption of devices in the system; Offloading calculation module: Uses graph neural networks and reinforcement learning methods to obtain task offloading strategies and implements cloud-edge-end collaborative offloading scheduling, which is performed by time slots. The IoT device is used to execute an application, which is composed of multiple interdependent subtasks, and the subtasks are executed according to a certain order or conditions; each of the IoT devices executes a portion of the subtasks in the application that have a dependent relationship; The reinforcement learning method includes three elements: state, action and reward function; The state is the feature vector obtained by embedding the system state into the graph neural network GCN, denoted as ; The action set is , where for any subtask , Represents a subtask Execute locally, Represents a subtask Offload to edge server for execution, Represents a subtask After being transferred through the edge server, it is uploaded to the cloud server for execution; Reward Function Set to: in, For subtasks Energy consumption when executing locally; Take action for the current the energy consumption generated; is the completion rate of the application, that is, the ratio of the number of completed subtasks to the total number of subtasks; Parameters related to the deadline; is the application completion rate weight; is the deadline weight; It is obtained from the following formula: in is the deadline penalty coefficient, The distance coefficient between the current moment and the application deadline, that is, the closer the task is to the application deadline, the The smaller the value of ; Indicates the distance coefficient threshold; From the following formula we can get: in For subtasks The deadline, is the current time.

8. An electronic device, characterized in that: include: a memory for storing one or more computer programs; The processor implements the cloud-edge collaborative computing offloading method as described in any one of claims 1 to 6 when the one or more computer programs are executed by the processor.

9. A computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the cloud-edge collaborative computing offloading method as described in any one of claims 1-6 when executed.

Citation Information

Patent Citations

  • Energy consumption perception-based side cloud collaborative dynamic unloading scheduling method

    CN111756812A

  • Multi-user time sequence dependent service calculation unloading method based on graph neural network

    CN116450241A