Multi-application Online Computing Offloading Resource Scheduling Method and System Based on the Overall Resource Requirements of the Task Graph in Edge Computing
By adopting a multi-application online computing offload resource scheduling method based on the overall resource requirements of the task map in the edge cloud, the resource competition problem caused by the limitation of computing resources in the edge cloud is solved, the effective allocation of computing resources and the maximum application value is achieved, and the user experience and the operation efficiency of the edge computing network are improved.
Patent Information
- Application Number
- CN202210366936.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-08
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2042-04-08
AI Technical Summary
In the edge cloud, when users run applications, due to the limited computing resources, they have serious resource competition and are unable to effectively allocate computing resources, which affects the user experience and may lead to waste of resources. The prior art fails to fully consider user preferences and complete structural information of task maps, resulting in short-sighted optimization, limiting the performance of computational offloading.
The multi-application online computing offload resource scheduling method based on the overall resource requirements of the task graph is adopted. Through the introduction of DAG models and pseudo-nodes, the priority of each task is calculated, and some critical paths (PCPs) are constructed to allocate computing resources. This method combines the overall requirements of computing resources and the current load state of the edge cloud to avoid short-sighted optimization and ensure effective allocation of resources.
Through this method, the computing resources of the edge cloud can be effectively allocated, the average value of the application can be maximized, the user experience can be improved, resource waste can be avoided, and the application optimization execution can be performed better.
Smart Images

Figure CN114610503B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of mobile computing and Internet of Things application processing, and particularly relates to a multi-application online computing offloading resource scheduling method and system based on the overall resource requirements of a task graph in edge computing. Background Art
[0002] In order to enable intelligent mobile devices to efficiently execute complex application programs with rich functions, with the support of computing offloading technology, mobile devices can utilize the edge computing devices of neighboring users to expand the computing power of mobile devices and improve the user experience. Therefore, various small and micro computing devices deployed at the edge of the mobile network can be combined to form an edge cloud to provide users with fast and efficient computing services. Since the computing resources of the edge cloud are still limited compared to those of the remote cloud, when the edge cloud needs to serve many users simultaneously, users will inevitably compete for the limited resources of the edge cloud under the deadline constraints of running applications. If the edge cloud cannot effectively allocate computing resources for users, the competition for resources will inevitably seriously reduce the user experience and even result in a waste of resources.
[0003] Although some recent work has studied the problem of how multiple users offload DAG tasks on the edge cloud, the solutions proposed in these works mainly allocate computing resources for users according to the priority of the offloading requests released by users, without considering the preferences of users, which may prevent users from obtaining satisfactory utility. In addition, in order to be able to perceive the current load status of all computing services in the edge cloud, these works make task scheduling decisions based on the status of ready tasks, while ignoring the complete structural information of the task graph. Due to the lack of complete information about the application, these works provide a short-sighted optimization strategy, which may limit the performance of computing offloading. Summary of the Invention
[0004] One object of the present invention is to provide a resource scheduling method for multi-application DAG task online computing offloading in an edge computing network. By this method, the overall demand situation of the DAG tasks of each application for computing resources and the current load status of the edge cloud are jointly considered to avoid short-sighted optimization and effectively allocate the computing resources of the edge cloud to maximize the average value of the application.
[0005] To achieve the above object, the present invention adopts the following technical solutions: A multi-application online computing offloading resource scheduling method based on the overall resource requirements of a task graph in edge computing, including the following steps:
[0006] S1. Use to represent the DAG model corresponding to application n to be executed for computing offloading, where and ε nThey are the task set and the directed edge set of application n respectively. The total number of tasks in A task in application n is where i represents the set The i-th task in, task t ni The computational load of is expressed as δ ni ;
[0007] S2. Add two pseudo-nodes with a computational load of 0 to application n as the entrance and exit respectively, that is and In the set Their numbers are represented by 0 and I n +1 respectively, and the directed edges emitted from and the directed edges entering are each assigned a data transfer volume. Among them, The transfer volume of the outgoing edge represents the amount of application data to be offloaded from the user device, and its numerical value is expressed as represents The successor of; The data transfer volume of the incoming edge represents the amount of result data to be sent back to the user device, and its numerical value is expressed as represents The predecessor of;
[0008] S3. Calculate the priority of each task according to the DAG structure of application n;
[0009] S4. Construct an empty set for recording the calculated partial critical path - PCP Calculate the PCP path according to the calculated priority for the DAG structure of application n, and store the obtained PCP path in the set and use to represent the set The number of PCP paths contained;
[0010] S5. According to the processing capabilities and per-unit-time execution overheads of all edge computing devices, allocate each PCP path in the set to the offline allocation mapping table generated for application offloading ; The offline allocation mapping table Its data structure is a linked list Each linked list corresponds to an edge computing device m, and map each PCP path of application n to the linked list The mapping from all linked lists constitutes the offline allocation mapping table
[0011] S6. Use Indicates that the application performing computational offloading sends a computational offloading request to a certain edge computing device m n where r n is the release time of the offloading request of the application, and l n is the deadline, and b n is the expected overhead for the application to be successfully processed on the edge computing network, is the DAG structure of the application, and σ n is the estimated processing time for the application to be successfully executed on the applied computing resources;
[0012] S7. Calculate the expected overhead weight μ n of each computational offloading request, where μ n = b n / σ n , and arrange each computational offloading request in ascending order of μ value into a queue
[0013] S8. Find the request with the largest μ n value from and read out its corresponding offline allocation mapping table for application n
[0014] S9. Traverse the linked list corresponding to each edge computing device m in the offline allocation mapping table and assign the tasks corresponding to the elements on the linked list to the computing queue of edge computing device m.
[0015] In step S3, calculate the priority of the task in application n according to the following formula:
[0016]
[0017] where, represents the average data transfer rate of all computing devices in the edge computing network; is the average processing capacity of all computing units in the edge computing network.
[0018] In step S4, use the SearchPCP algorithm to recursively calculate the PCP path.
[0019] Furthermore, during the process of calculating the PCP path, use the marked tasks to assist in calibrating the tasks. The marked tasks are the tasks that have been marked during the calculation of the PCP. For a given application n, initially the pseudo-nodes and are always regarded as marked tasks, and other tasks are regarded as unmarked tasks; and use H(t ni ) to represent task tni A specific subset in which each task is not a marked task, but the parent task of each task is a marked task; for a marked task t ni , if its subtask t nj has the highest priority in the set H(t ni ), then the subtask t nj is regarded as a critical subtask, and the critical subtask of the marked task t ni is denoted as H cri (t ni );
[0020] After that, start from the entry node and recursively calculate the PCP using the SearchPCP algorithm, and store the calculated PCP for application n into the set Node and are not in the set .
[0021] In step S5, the linked list has p elements. Initially,[[]] is an empty linked list with a head node and the available time R of the edge computing device m m is recorded in ;
[0022]
[0023] where Q(m) represents the computing queue of the edge computing device m, and t n′,i′ is a waiting task in Q(m), represents the completion time of the task t n′i′ , and its general form is That is is the completion time of the task t ni ;
[0024] If the task t ni is a pseudo-task as an entry or an exit, then it is calculated as follows:
[0025]
[0026] In equation (3), under the first condition, r n is the release time of the offloading request of application n, so it is directly the completion time of the pseudo-task ; the second condition means that the pseudo-task needs to receive the result data sent back to application n;
[0027] If the task t niIf it is not a pseudo-task, then It is calculated by the following formula:
[0028]
[0029] where R(a ni ) represents the time when the edge device m to execute task t ni is ready to execute t under the allocation plan a ni , ni and represents the data transmission time between any two dependent tasks t ni and t nj in the network environment of the edge computing device m. Its value is calculated according to the following formula:
[0030]
[0031] where is the transmission rate between the user device corresponding to the application n and the edge computing device m in its affiliated wireless signal coverage area; n
[0032] An element in the linked list is represented by a binary tuple , where and are respectively the estimated start time and the estimated completion time of the corresponding task t in the ψ-th element ni , and is calculated according to the following formula:
[0033]
[0034] where ψ′ is the table position number of the task t in the linked list nj . If and are the same linked list, that is, m = m′, then is the ready time when the edge computing device m can execute the task t ni according to the sorting of the task t in the linked list ni . Its value is calculated according to the following formula:
[0035]
[0036] where p ≠ 0 indicates that the linked list is not an empty list. If p = 0, it means that the linked list has only one head node and represents the task t niThe previous sub - linked list, ψ - 1 is the sub - linked list The length of, i′ is the task t recorded in the linked - list element ζ ni′ The task number of; when the linked list Is not an empty list, The calculated value of is determined by the last task on the sub - linked list The linked list The task t on ni The estimated completion time of is calculated by the following formula:
[0037]
[0038] In the calculation of the linked list For each task t, a latest completion time is calculated according to the following formula ni
[0039]
[0040] Where ρ max Represents the maximum processing capacity that the edge - device network can provide, Represents the average transmission rate between all edge - service devices, l n Is the deadline that must be met for the normal execution of application n to complete.
[0041] Furthermore, in the calculation of the linked list The tasks of application n are mapped to the target positions on the corresponding linked lists of each edge - computing device m, and the target position is the first position that can place the task t Found by traversing from the head node of the linked list corresponding to the edge device m, and the target position satisfies the following conditions: One, the estimated start time of t ni On the ψ - th element of satisfies the following formula:
[0042] One, t ni At The estimated start time on the ψ - th element of satisfies the following formula:
[0043]
[0044] Where j and j′ are the numbers of t nj And t nj′ In the set The number, τ is the current time of the whole system, and t nj And t nj′ Are recorded on the ψ - 1 - th and ψ + 1 - th elements of the linked list respectively; the first condition of formula (10) means that t ni Is placed on the first element of, and the first condition of formula (11) means that t The first element of, the first condition of formula (11) means that t ni is added to the last element of;
[0045] Second, if does not satisfy Equation (11), then it should satisfy the following equation:
[0046]
[0047] where is the maximum value of the latest completion times of all tasks in application n; in the above equation, ψ = 1 indicates that the position of the node immediately following the linked list head node is the target position, and ψ = p + 1 indicates that the last node of the linked list is the target position.
[0048] Specifically, the tasks of application n in the linked list are mapped to the offline allocation mapping table as follows:
[0049] S501. Set a counter k with an initial value of 1;
[0050] S502. Take out the k-th PCP path from the set formed by the PCPs of application n, and set three storage variables m * , f, where f has an initial value of infinity; use m to represent the counter of the devices in the device set with an initial value of 1; if there are still PCP paths in the set , execute step S503, otherwise execute step S508;
[0051] S503. Take out the m-th device from the device set and generate a new empty linked list Execute step S504 when the device set is not empty, otherwise execute step S507;
[0052] S504. Take out each task t ni on the k-th PCP path in sequence. For each task t ni , traverse the linked list corresponding to the m-th device and calculate and Then add the element to the end of the linked list ;
[0053] S505. If the value of is less than the current variable f, then replace the value of the original variable f with its current value, and replace the record in the original storage variable with the corresponding linked list at this time, and then replace the current value of m with m * the record in is the linked list with the largest value; otherwise, f, m * the original value in
[0054] S506. After increasing the value of m by 1, continue to execute step S503;
[0055] S507. According to the calculated target position, insert the task in the linked list stored by the current variable into the linked list at the corresponding position; after increasing the counter k by 1, continue to execute step S502;
[0056] S508. End the task allocation.
[0057] In step S6, the estimated processing time σ n is calculated according to the following formula:
[0058]
[0059] where and are the estimated completion time and start time calculated by offline mapping, and is the transmission time between the user device corresponding to application n and the edge computing device m′, and the edge computing device m′ needs to satisfy that the task t ni′ on it is the smallest among all values.
[0060] In addition, the present invention also relates to a multi-application online computing offloading system based on the overall resource requirements of a task graph in edge computing, which includes multiple edge computing devices m distributed at the edge of a mobile network. The edge computing devices m are connected through a network to form an edge cloud. At least one edge computing device m in the edge cloud serves as a coordinator. The coordinator periodically obtains system status information and sends it to all edge computing devices m. Each edge computing device m corresponds to an independent wireless coverage area and provides online computing offloading services for the user devices within its covered area through a wireless network. The system allocates computing resources according to the above multi-application online computing offloading resource scheduling method.
[0061] The process of performing computing offloading by the above multi-application online computing offloading system based on the overall resource requirements of a task graph in edge computing includes:
[0062] When application n wants to offload a computing task, it sends a request for computing offloading to the edge device m in the wireless coverage area where it is located through the user device corresponding to it n to register;
[0063] S1. When application n needs to unload a computing task, it sends a request for computing offloading to edge device m in the wireless coverage area through its corresponding user device. n Register the request for computing offloading;
[0064] S2. Edge computing device m n Allocates a wireless channel for the successfully registered user device based on orthogonal frequency division multiple access technology and sends system status information, where the system status information includes the processing capabilities of all edge computing devices, the execution cost per unit time, and the average data transfer rate between edge computing devices;
[0065] S3. The user device creates an offline allocation mapping table for application n based on the received current system status information and the task graph structure of the application to be offloaded and executed. And according to the generated offline mapping table Determine the relevant parameters of computing offloading;
[0066] S4. The user device sends an offloading request to edge computing device m. n Send the offloading request;
[0067] S5. The coordinator collects all current user requests for computing offloading from each edge computing device m, selects appropriate users from the set of user offloading requests according to the load of computing devices in the current entire network and the status of user application resource requests, and based on the offline mapping table of the users Makes an actual task scheduling decision for the DAG task of the user and allocates computing resources;
[0068] S6. After application n is processed, edge computing device m n Deletes its registration information and simultaneously releases the wireless channel allocated to it;
[0069] S7. When a new user offloading request arrives, or when any application is completely processed in the system, repeat step S5 until all user offloading requests are completely processed.
[0070] The present invention proposes a method for computing resource allocation based on the overall resource requirements of the task graph for the offloading of DAG tasks in mobile edge computing. Each mobile user generates an offline allocation mapping table on its own device based on the computing loads of various edge computing devices and the data transmission capabilities of the network in the current edge computing system, using a heuristic strategy based on partial critical paths. When multiple users offload applications simultaneously, the present invention can heuristically select appropriate user offloading requests according to the value of the users, and allocate the tasks of the applications to the corresponding edge computing devices according to the offline allocation mapping table of the selected users. The present invention schedules and allocates computing resources according to the overall requirements of the applications for the required computing resources, solving the problem of short-sighted optimization in the optimal execution of applications; at the same time, it preferentially schedules and executes the applications of users through the value of the applications, and has advantages in maximizing the value of the applications, the success rate of application execution, and minimizing the average execution span of applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 is the framework of a multi-application online computing offloading system based on the overall resource requirements of the task graph;
[0072] Figure 2 is a schematic diagram of an edge computing network serving mobile users constructed in the embodiment;
[0073] Figure 3 is a comparison of the total value obtained by the AU-PCP method involved in the present invention and the existing method when performing computing resource allocation under different application arrival rates;
[0074] Figure 4 and Figure 5 is a comparison of the average completion time of applications processed by the AU-PCP method involved in the present invention and the existing method under different application arrival rates;
[0075] Figure 6 is a comparison of the success rate of applications processed by the AU-PCP method involved in the present invention and the existing method under different application arrival rates. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0076] To facilitate those skilled in the art to better understand the improvements of the present invention over the prior art, the present invention will be further described below in conjunction with the drawings and embodiments.
[0077] Figure 1The framework structure of a multi-application online computing offloading system in an edge computing network is shown. It includes many different edge computing devices distributed and deployed at the edge of the mobile network. These edge devices form an edge cloud closer to users through network connections. Each edge computing device has its own independent wireless coverage area and can provide service support for user devices (which can also be understood as mobile users) within its covered area. Each edge computing device is responsible for receiving computing offloading requests and uploaded application data sent by mobile devices within its own service area, and serves as a transfer station when data is transmitted between mobile devices in its own service area and edge computing devices in other service areas. The edge cloud can provide idle computing resources to mobile users, and mobile users can use computing offloading technology at any time to offload tasks to the edge cloud to improve the processing speed of mobile applications. At least one computing device in the edge cloud undertakes the coordinator function (such as the macro base station of the mobile network). It can periodically collect the latest status information from the distributed edge computing devices (the status information includes the availability of computing units on each edge computing device and the average data transmission rate between edge computing devices). Then the coordinator will re-publish this collected information to all edge computing devices. After receiving the information published by the coordinator, the edge devices will forward the data related to computing offloading of mobile applications to mobile users.
[0078] Based on Figure 1 , in this embodiment, an open-source cloud computing simulator CloudSim and an edge computing simulator EdgeCloudSim are used to build an edge computing system simulation platform. In the experimental environment, the edge cloud contains four edge computing devices, and the implemented scenario is as Figure 2 shown. Figure 2 The processing capabilities and unit-time execution costs of each edge computing device in 3 are listed in Table 1. The maximum registration threshold allowed on each edge computing device is set to 30. The data transmission rate between each edge computing device is set to 440 Mbps, and the data transmission rate between each edge computing device and the users within its covered area is set to 10 3 Mbps. The average transmission rate in the computing offloading framework is calculated using the expression (440×6 + 10 3 ) / 7, which is 520 Mbps.
[0079] Table 1 Parameters of Edge Computing Devices
[0080] Equipment number MIPS Execution cost per unit time Computing device 1 <![CDATA[9.9×10 3 > 2.2 Computing device 2 <![CDATA[8×10 3 > 1.8 Computing device 3 <![CDATA[7×10 3 > 1.3 Computing device 4 <![CDATA[5×10 3 > 1.0
[0081] In this embodiment, four open-source scientific workflow structures are used to simulate the DAG structure of mobile applications. Table 2 shows the number of nodes set for mobile applications in the embodiment. The computational load of tasks in an application is represented by the value of the runtime element item recorded in the DAX file. Specifically, if the original runtime value exceeds the range of [100, 500], the runtime value is set to 100 and 500 respectively; otherwise, the original runtime value recorded in the DAX file is directly used without change. Additionally, a baseline communication time ct is defined, and this value can be represented by the value of the size element item recorded in the DAX file. Specifically, if exceeds [10 -3 , 10 -2 , the ct value is set to 10 -3 and 10 -2 ; otherwise, let be used to set the size of the data transfer volume between dependent tasks, and the data transfer volume associated with the two pseudo-nodes of the entrance and exit is also set to
[0082] Additionally, in this embodiment, 500 applications are randomly selected from four types of workflows at intervals following a Poisson distribution with parameter λ to simulate the offloading requests released by mobile users, and the locations where each offloading request is sent are randomly and uniformly set within the service areas covered by the four edge devices. To generate the value of user applications, an execution cost weight ec n = MaxCost·tw n / MinCap is assigned to each application n. Among them, MaxCost is the execution cost per unit time of computing device 1, tw n is the total computational load of all tasks in application n, and MinCap is the processing capacity of computing device 4. Then, a random number is generated uniformly between ec n and 5·ec n to represent the expected overhead of user n. In addition, a baseline execution span M n is defined for each application n. To calculate M n , it can be assumed that each task of application n is scheduled to different computing devices, and the processing capacities of these devices are set with the average processing capacity value of the edge cloud. At the same time, all the data transfer volumes within application n are considered as 0. Based on this, the deadline of application n can be expressed as l n = r n + df·M nCalculation. Among them, df is the deadline factor set for each type of workflow, and this value is given in the table. To mitigate the impact caused by randomness in the experiment, all operations are executed 30 times, and then the average value is used to draw the experimental evaluation graph.
[0083] Table 2 Mobile Application Parameters
[0084] Workflow type Number of nodes Deadline factor df Montage 25 6 Inspiral 30 7 Epigenomics 24 5 CyberShake 30 16
[0085] In this embodiment, from the perspective of the mobile device, each mobile device has the same network topology when performing task offloading. Figure 2 The network topology that each mobile device faces when performing task offloading in a distributed network composed of heterogeneous edge computing devices is given. If a mobile device needs an edge computing device to process its application, some application data must be offloaded from the mobile device itself to the edge computing device. After all tasks of the application are executed in the network, the calculation results also need to be transmitted back to the mobile device. The process of performing multi-application online computing offloading is as follows:
[0086] S1. When a mobile user wants to offload a computing task, it must first register a computing offloading request with the edge device m covering it. n Register a request for computing offloading.
[0087] S2. For a successfully registered user, the edge computing device m n can allocate a wireless channel for the user based on orthogonal frequency division multiple access technology. Once the user registers successfully, it will receive the status data of the entire system from the edge computing device m. n These data include: the processing capabilities of all edge computing devices, the execution cost per unit time, and the average data transmission rate between different edge computing devices.
[0088] S3. The user's device creates an offline scheduling mapping table for its application n.
[0089] S4. According to the generated offline mapping table This user will prepare the relevant parameters for computing offloading. These parameters include: the estimated processing time of application n and the latest time to obtain computing resources.
[0090] S5. The user device sends the expected overhead when using edge computing resources together with the offloading request to the edge computing device m. n The specific form of the offloading request is where r n is the release time of the offloading request for application n, l n is the deadline, and b n is the expected overhead when application n can be successfully processed in the edge computing network, that is, the value that the user can reflect on the successful completion of application n. is the DAG structure of applying n, σ n is the estimated processing time that applying n can successfully execute on the computing resources applied for.
[0091] S6. The coordinator collects all user requests for computing offloading at the current moment from each edge computing device, and makes actual task scheduling decisions for appropriate user DAG tasks according to the load of computing devices and the status of user application resource requests in the entire network at present, and allocates computing resources.
[0092] After applying n is processed, its registration information will be deleted from the edge computing device m n and at the same time, the wireless channel resources allocated to it will also be released.
[0093] S8. When a new user offloading request arrives, or when any application is completely processed in the system, step S6 is repeatedly executed until all user offloading requests are completely processed.
[0094] In the above process, the computing offloading resource scheduling method is as follows: s1. The mobile user (user device) that needs to execute computing offloading uses to represent the DAG model corresponding to the application n to be executed by it, where and ε n are the task set and the set of directed edges of applying n respectively. The total number of tasks in the set is represented by . A task in applying n is represented as where i represents the i-th task in the set . The computing load of task t ni is represented as δ ni .
[0095] s2. The user device adds two pseudo-nodes with a computing load of 0 to each application respectively and as its entrance and exit, that is, At this time, and in the set are numbered 0 and I n +1 respectively, and the directed edges emitted from and the directed edges entering are each assigned a data transfer amount. Specifically, the transmission amount of the out-edge represents the amount of application data to be offloaded from the mobile device, and its numerical value can be represented as Here represents 's successor; The data transfer volume of the incoming edge represents the amount of result data to be sent back to the mobile device, and its numerical value is represented by , where represents the predecessor.
[0096] S3. The user device calculates the priority of each task according to the DAG structure of the application. Specifically, for task its priority level is calculated using the following formula:
[0097]
[0098] where represents the average data transfer rate of all computing devices in the entire auction framework; is the average processing capacity of all computing units in the edge cloud.
[0099] S4. Calculate the partial critical path (PCP) for the DAG structure of the application according to the priority calculated in S3. The concept of "labeled tasks" is used to assist in calibrating tasks during the calculation process, that is, a labeled task is a task that has been labeled during the calculation of the PCP. For a given application n, initially the pseudo-nodes and are always regarded as labeled tasks, and other tasks are regarded as unlabeled tasks. Use H(t ni ) to represent a specific subset of tasks of task t ni . In this specific subset of tasks, each task is not a labeled task, but the parent task of each task is a labeled task. To assist in the calculation, the concept of "critical subtasks" is used: for a labeled task t ni , if its subtask t nj has the highest priority in the set H(t ni ), then task t nj is a critical subtask. Represent the critical subtask of task t ni as H cri (t ni ). Before calculating the PCP, first define an empty set to record the calculated PCP. Then, start from the entry node and recursively calculate the PCP using the SearchPCP algorithm, and store the PCP calculated for application n in the set Note: Nodes and are not in the set , represents the number of PCP paths contained in the set .
[0100] S5. According to the processing capabilities and per-unit-time costs of all edge computing devices, each PCP path in the set is assigned to an offline mapping table. The data structure of the offline mapping table is a linked list, where each linked list corresponds to an edge computing device.
[0101] S5.1 Use to represent the linked list corresponding to the edge computing device m, which has p elements. Initially, is an empty linked list with a head node , that is, p = 0. Also, the available time R m of the edge computing device m is recorded in , and it can be calculated using the following formula:
[0102]
[0103] where Q(m) represents the computing queue of the edge computing device m, and t n′,i′ is a waiting task in Q(m). t n′,i′ can belong to different applications. represents the completion time of the task t n′i′ , and its general form is that is, the completion time of the task t ni . If the task t ni is a pseudo-task added previously, it can be directly calculated using the following formula:
[0104]
[0105] In the first condition of Equation (3), r n is the release time of the offloading request of application n, so it is directly the completion time of the pseudo-task ; the second condition of Equation (3) means that the pseudo-task needs to receive the result data sent back to user n. Furthermore, if the task t ni is not a pseudo-task (i.e., 0 < i < I n +1), then calculating its completion time must consider the queue length of the waiting tasks on the target edge computing device to which the task t ni is to be assigned and the arrival time of the input data of t ni . In this case, is calculated using the following formula:
[0106]
[0107] where R(a ni ) represents the edge device to execute the task t ni in the allocation plan a niUnder this condition, prepare to execute t ni The time, that is, the ready time of the device. Here is the allocation plan of task t ni and is a 0, 1 variable. If t is assigned to the edge computing device m, the value is 1; otherwise, the value is 0. The specific value of R(a ni ) needs to be calculated according to the allocation plan a ni , that is ni In equations (3) and (4),
[0108] represents the data transmission time between any two dependent tasks t and t ni and t nj in the network environment of the edge computing device. Its value needs to be specifically calculated in different cases according to the following formula:
[0109]
[0110] where is the transmission rate between user n and the edge computing device m in the wireless signal coverage area. In equation (5), a n = a ni means that both t nj and t ni and t nj are assigned to the same edge computing device. In this way can be regarded as 0 for processing; if and t nj is assigned to the edge computing device m (m≠m n ), then the device of user n needs to pass through the edge computing device m in the wireless signal coverage area of user n n to connect to the edge computing device m. Therefore Otherwise, when t nj is assigned to the edge computing device m n , since the device of user n can be directly connected to the edge computing device m in the wireless signal coverage area of user n n , we can get Similar situations also include: if and t ni is assigned to the edge computing device m (m≠m n ), then the edge device m must pass through the edge computing device m that covers the wireless signal of user n n to connect to user n. Therefore, we can get Otherwise that is, t ni is assigned to the edge computing device m n . Finally, if t niand t nj are respectively assigned to the directly connected edge computing devices m and m′, then
[0111] In step s5.1, the linked list An element of can be represented as a tuple Specifically, and Linked List The task t corresponding to the ψth element above ni The estimated start time and estimated completion time. Use the following formula to calculate:
[0112]
[0113] Among them, ψ′ is another linked list Medium Task nj If and is the same linked list, that is, m = m', then In formula (6) The edge computing device m is based on the task t ni In linked list The sorting can perform task t ni The ready time is calculated using the following formula:
[0114]
[0115] Where p≠0 means It is not an empty linked list, p = 0 means Only one head node Indicates in linked list Top ranked in task t ni The previous sub-list, ψ-1 is the sub-list The length of i′ is the task t recorded in the linked list element ζ. ni′ That is, when the linked list When it is not an empty table, The calculated value is the sublist Finally, the linked list Previous task ni The estimated completion time is calculated by the following formula:
[0116]
[0117] s5.2 For each task t ni Calculate a latest finish time It is calculated by the following formula:
[0118]
[0119] where ρ max represents the maximum processing capacity that can be provided in the edge device network, represents the average transmission rate between all edge service devices, and l n is the deadline that must be met for the normal execution completion of application n. In addition, the pseudo-tasks and Since they must be located on the user's device, their latest completion times are not considered.
[0120] S5.3 uses the concept of "target location" to map the calculated PCP in application n to the corresponding linked lists of each edge computing device.
[0121] The "target location" refers to the first position that can place task t found by traversing from the head node of the linked list ni corresponding to edge device m. This position must satisfy the following two conditions:
[0122] One, the expected start time of t ni on the ψ-th element of must satisfy the following formula:
[0123]
[0124] where j and j′ are the numbers of t nj and t nj′ in the set , and τ is the current time of the entire system. And t nj and t nj′ are respectively recorded on the (ψ - 1)-th and (ψ + 1)-th elements of the linked list. The first condition of Equation (10) means that t ni is placed on the first element of . The first condition of Equation (11) means that t ni is added to the last element of .
[0125] Two, if does not satisfy Equation (11), then it must satisfy the following formula:
[0126]
[0127] where That is to say, is the maximum value of the latest completion times of all tasks in application n.
[0128] It should be noted that: in formulas (10), (11), and (12), ψ = 1 indicates that the position immediately following the linked list head node is the target position, and ψ = p + 1 indicates that the last node of the linked list is the target position.
[0129] S5.3 maps the tasks of application n to the offline allocation mapping table through the following steps.
[0130] Step1. Set a counter k with an initial value of 1.
[0131] Step2. Take out the k-th PCP path from the set formed by the PCPs of application n, and set three storage variables m * , f, where the initial value of f is infinity. Use m to represent the counter of the devices in the device set and set its initial value to 1. If there are still PCP paths in the set , execute Step3; otherwise, execute Step8.
[0132] Step3. Take out the m-th device from the device set and generate a new empty linked list When the device set is not empty, execute Step4; otherwise, execute Step7.
[0133] Step4. Sequentially take out each task t ni on the k-th PCP path. For each task t ni , traverse the linked list corresponding to the m-th device and calculate according to formulas (23) and (24) and Then add the element to the end of the linked list .
[0134] Step5. If (this expression represents the largest value in the linked list ) is less than the current variable f, then replace the original value of the variable f with its current value, and replace the record in the original storage variable with the corresponding linked list at this time, and then replace the record in m with the current value of m; otherwise, the original values in f, * m * remain unchanged.
[0135] Step6. After increasing the value of m by 1, continue to execute Step3.
[0136] Step7. According to the calculated target position, insert the tasks in the linked list stored by the current variable into the linked list at the corresponding position. After increasing the counter k by 1, continue to execute Step2.
[0137] Step8. End the task allocation.
[0138] s5.4 Calculate the estimated processing time σ of application n on the user device according to the following formula n :
[0139]
[0140] where and are the estimated completion time and start time calculated by offline mapping, and in formula (13) is the transmission time between the device of user n and the edge computing device m'. The edge computing device m' needs to satisfy that the task t ni′ on it is the smallest among all , and the transmission time is also described similarly.
[0141] s5.5 User n sends a request for computing offloading to the edge service device m n within the wireless area where r n is the release time of the offloading request of the application, l n is the deadline of the user application, b n is the expected cost for the user application to be successfully processed on the edge computing network, that is, the value that the user can reflect on the successful completion of the application, is the DAG structure of the application, and σ n is the estimated processing time for the application to be successfully executed on the applied computing resources.
[0142] s6. The coordinator collects the offloading requests sent by all users at the current moment and calculates an expected cost weight μ for each user request n = b n / σ n , and then sorts the received user requests in ascending order of the μ n value into a queue in.
[0143] s7. Find the request with the largest μ n value from and read out its offline allocation mapping table for the corresponding user application n
[0144] S8. Traverse the offline allocation mapping table The linked list corresponding to each edge computing device in And for the elements on the linked list Allocate the corresponding tasks to the computing queue of edge computing device m.
[0145] Figure 3 , 4 , 5 shows the test results of the above method (corresponding to AU-PCP in the figure) and other currently relatively advanced methods (CEFO, Selfish, Zhang’s PCP, ITAGS) in the same edge computing network. The results show that the computing resource allocation method involved in this embodiment shows better effects in terms of the total value of the application, the average execution span, and the average success rate. Generally speaking, the overall test results of the method involved in this embodiment are significantly better than other methods. This shows that the method involved in this embodiment can achieve more reasonable computing resources in the edge computing network, fully guarantee the value of user applications, shorten the average processing time of applications, and improve the operation efficiency of the edge computing network.
[0146] The above embodiments are preferred implementation schemes of the present invention. In addition, the present invention can also be implemented in other ways. Any obvious replacement without departing from the concept of the technical solution of the present invention is within the protection scope of the present invention.
[0147] In order to make it more convenient for those of ordinary skill in the art to understand the improvements of the present invention over the prior art, some drawings and descriptions of the present invention have been simplified, and for the sake of clarity, some other elements have also been omitted in this application document. Those of ordinary skill in the art should be aware that these omitted elements may also constitute the content of the present invention.
Claims
1. Multi-application online computing offloading resource scheduling method based on the overall resource requirements of the task graph in edge computing, Characterized in that, It includes the following steps: S1. Use to represent the DAG model corresponding to application n for which computation offloading is to be performed, where and ε n are the task set and the set of directed edges of application n respectively, the total number of tasks in A task in application n is where i represents the i-th task in the set , and the computational load of task t ni is expressed as δ ni ; S2. Add two pseudo-nodes with a computational load of 0 to application n as the entry and exit, respectively, i.e., and In the set The numbers are represented by 0 and I n +1 respectively, and the directed edges emitted from and the directed edges entering are each assigned a data transfer volume. Among them, The transfer volume of the outgoing edge represents the amount of application data to be offloaded from the user device, and its numerical value is represented as indicating the successor of; The data transfer volume of the incoming edge represents the amount of result data to be sent back to the user device, and its numerical value is represented as representing the predecessor of; S3. Calculate the priority of each task according to the DAG structure of application n; S4. Construct an empty set for recording the calculated partial critical paths - PCP Calculate the PCP paths for the DAG structure of application n according to the calculated task priorities, and store the obtained PCP paths in the set , and use to represent the set containing the number of PCP paths; When calculating the PCP path, the marked tasks are used to assist in calibrating tasks. The marked tasks are tasks that have been marked during the calculation of the PCP. For a given application n, initially, the pseudo-nodes and are always regarded as marked tasks, and all other tasks are regarded as unmarked tasks; and H(t ni ) represents a specific subset of task t ni . In this specific subset, each task is not a marked task, but the parent task of each task is a marked task; for a marked task t ni , if its subtask t nj has the highest priority in the set H(t ni ), then this subtask t nj is regarded as the critical subtask, and the critical subtask of the marked task t ni is denoted as H cri (t ni ); Then, starting from the entry node recursively calculate the PCP using the SearchPCP algorithm and store the PCP calculated for application n in the set nodes and are not in the set ; S5. According to the processing capabilities and per-unit-time execution overheads of all edge computing devices, each PCP path in the set is assigned to the offline allocation mapping table generated for application offloading; the offline allocation mapping table has a linked list data structure Each linked list corresponds to an edge computing device m, and each PCP path of application n is mapped to each linked list The offline allocation mapping table is formed by all linked lists S6. Use to represent a computation offloading request sent by an application that performs computation offloading to a certain edge computing device m n , where r n is the release time of the offloading request of the application, l n is the deadline, b n is the expected cost for the application to be successfully processed and completed on the edge computing network, is the DAG structure of the application, and σ n is the estimated processing time for the application to be successfully executed on the applied computing resources; S7. Calculate the expected cost weight μ of each computing offloading request n = b n / σ n , and sort each computing offloading request in ascending order of μ n value into a queue ; S8. Find from the request with the largest μ n value and read out its corresponding offline allocation mapping table for application n S9. Traverse the offline allocation mapping table The linked list corresponding to each edge computing device m in And assign the elements on the linked list The corresponding tasks to the computing queue of the edge computing device m.
2. The multi-application online computing offloading resource scheduling method according to claim 1, Characterized in that, In step S3, calculate the priority of the task in application n according to the following formula : Among them, represents the average data transfer rate of all computing devices in the edge computing network; is the average processing capacity of all computing units in the edge computing network.
3. The multi-application online computing offloading resource scheduling method according to claim 1, Characterized in that: In step S5, the linked list has p elements. Initially, is an empty linked list with a head node and the available time R of the edge computing device m m is recorded in ; Among them, Q(m) represents the computing queue of edge computing device m, and t n′,i′ is a waiting task in Q(m), represents the completion time of task t n′i′ , and its general form is that is is the completion time of task t ni ; If task t ni is a pseudo task as an entrance or an exit, it is calculated according to the following formula: In Equation (3), under the first condition, r n is the release time of the offloading request for applying n, so it is directly the completion time of the pseudo-task ; the second condition indicates that the pseudo-task needs to receive the result data sent back to application n; If task t ni is not a pseudo-task, then it is calculated by the following formula: Among them, R(a ni ) represents the time when the edge device m that needs to execute task t ni is ready to execute t under the allocation plan a ni , ni and represents the data transmission time between any two dependent tasks t ni and t nj in the network environment of the edge computing device m, and its value is calculated according to the following formula: Among them, is the transmission rate between the user device corresponding to n and the edge computing device m in its affiliated wireless signal coverage area n ; A linked list An element in the is represented by a binary tuple and respectively represent The estimated start time and estimated completion time of the corresponding task t ni in the ψ-th element, Calculated according to the following formula: where ψ' is the linked list in which the task t nj has a table position number. If and are the same linked list, i.e., m = m', then is the ready time when the edge computing device m can execute the task t ni in the linked list sorted according to the order. Its value is calculated by the following formula: ni where p≠0 indicates that the linked list is not an empty list. If p = 0, it indicates that the linked list has only a head node represents the sub-linked list preceding task t ni on the linked list. ψ - 1 is the length of the sub-linked list and i' is the task number of task t ni′ recorded in the linked list element ζ; when the linked list is not an empty list, its calculated value is determined by the last task on the sub-linked list; the estimated completion time of task t on the linked list ni is calculated by the following formula: In the calculation of the linked list for each task t, calculate a latest completion time according to the following formula ni Among them, ρ max represents the maximum processing capacity that the edge device network can provide, represents the average transmission rate between all edge service devices, and l n is the deadline that application n must meet for normal execution to complete.
4. The multi-application online computing offloading resource scheduling method according to claim 3, Characterized in that: In the calculation of the linked list for an application n, the tasks are mapped to the target positions on the corresponding linked lists of each edge computing device m where the target positions are the first positions that can hold task t found by traversing from the head node of the linked list corresponding to edge device m ni and the target positions satisfy the following conditions:
1. t ni The predicted start time on the ψ-th element of satisfies the following formula: where j and j' are the numbers in t nj and t nj′ in the set respectively, τ is the current time of the entire system, and t nj and t nj′ are recorded on the (ψ - 1)-th and (ψ + 1)-th elements of the linked list respectively; the first condition of Equation (10) indicates that t ni is placed on the first element of, and the first condition of Equation (11) indicates that t ni is added to the last element of; II. If it does not satisfy formula (11), then it shall satisfy the following formula: where is the maximum value of the latest completion times of all tasks in n; in the above formula, ψ = 1 indicates that the position immediately following the linked list head node is the target position, and ψ = p + 1 indicates the linked list the last node of is the target position.
5. The multi-application online computing offloading resource scheduling method according to claim 4, Characterized in that, Specifically, map the tasks of application n in the linked list to the offline allocation mapping table as follows: S501. Set a counter k, and set its initial value to 1; S502. The k-th PCP path is taken out from the set of PCPs formed by application n, and three storage variables m , f, * are set, where the initial value of f is infinity; m represents the counter of devices in the device set , and the initial value is set to 1; if there are still PCP paths in the set , step S503 is executed, otherwise step S508 is executed; S503. Take out the m-th device from the device set and generate a new empty linked list Execute step S504 when the device set is not empty, otherwise execute step S507; S504. Take out each task t on the k-th PCP path in sequence ni For each task t ni Traverse the linked list corresponding to the m-th device And calculate And Then add the element To the end of the linked list ; If the value is less than the current variable f, then replace the value of the original variable f with its current value, and replace the record in the corresponding linked list with the original storage variable and then replace the record in the current m with the value of m * ; Set as the largest value in the linked list m; * Otherwise, the original values in f and * m remain unchanged. S506. After increasing the value of m by 1, continue to execute step S503; S507. Insert the task in the linked list stored by the current variable into the position corresponding to the linked list ; after incrementing the counter k by 1, continue to execute step S502; S508. End the task allocation.
6. The multi-application online computing offloading resource scheduling method according to any one of claims 1-5, Characterized in that: In step S6, the estimated processing time σ n is calculated according to the following formula: Among them, and are the estimated completion time and start time calculated by offline mapping, and is the transmission time between the user device corresponding to application n and the edge computing device m', and the edge computing device m' needs to satisfy the task t ni′ of is all with the smallest value among them.
7. A multi-application online computing offloading system based on the overall resource requirements of the task graph in edge computing, including multiple edge computing devices m distributed at the edge of the mobile network. The edge computing devices m are connected through a network to form an edge cloud. At least one edge computing device m in the edge cloud serves as a coordinator. The coordinator periodically obtains system status information and sends it to all edge computing devices m. Each edge computing device m corresponds to an independent wireless coverage area and provides online computing offloading services for user devices within its covered area through a wireless network, Characterized in that: The system allocates computing resources according to the multi-application online computing offloading resource scheduling method described in any one of claims 1-6.
8. The multi-application online computing offloading system according to claim 7, Characterized in that, The process of performing computing offloading includes: S1. When application n needs to unload a computing task, it sends a request for computing offloading to edge device m in the wireless coverage area where it is located through the corresponding user device n to register the request for computing offloading; S2. Edge computing device M n Allocate wireless channels to successfully registered user devices based on orthogonal frequency division multiple access technology and send system status information, where the system status information includes the processing capabilities of all edge computing devices, the execution cost per unit time, and the average data transfer rate between edge computing devices; S3. The user equipment creates an offline allocation mapping table for Application n based on the received current system status information and the task graph structure of the application to be unloaded and executed. And based on the generated offline mapping table Determine the relevant parameters for computing offloading; S4. The user equipment sends an offloading request to the edge computing device m n ; S5. The coordinator collects all current user requests for computing offloading from each edge computing device m, selects appropriate users from the set of user offloading requests according to the load of computing devices in the current entire network and the status of user application resource requests, and based on the offline mapping table of the user makes actual task scheduling decisions for the DAG tasks of this user and allocates computing resources; After the application n is processed, the edge computing device m n deletes its registration information and releases the wireless channel allocated to it; s7. When a new user offloading request arrives, or when any application is completely processed in the system, repeat step s5 until all user offloading requests are completely processed.
Citation Information
Patent Citations
Multi-application fine-grained unloading method and system architecture for a cloud-side collaborative network
CN113190342A
Computing resource allocation method for unloading DAG task in heterogeneous edge computing
CN113535393A