A power task online scheduling method for power distribution internet-of-things edge devices
By establishing a task model and microservice mapping relationship, and combining fuzzy logic computation and resource constraints, efficient online scheduling of power tasks in the edge computing system was achieved, solving the problems of task response latency and completion rate under resource-constrained conditions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANDONG UNIV OF TECH
- Filing Date
- 2022-09-16
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies have failed to effectively address the diverse needs of power tasks under conditions of limited resources for edge devices in the distribution IoT, resulting in problems such as high task response latency and low completion rates.
By establishing a task model, determining microservice mapping relationships, calculating priorities and earliest execution times, and combining the resource situation of the edge computing system, task scheduling is carried out. Fuzzy logic computing and container-microservice mapping are used to achieve online scheduling.
It enables the processing of more tasks in a shorter time, ensures the completion rate of important tasks when resources are limited, and improves the efficiency and flexibility of task scheduling.
Smart Images

Figure CN115437771B_ABST
Abstract
Description
Technical Field
[0001] A method for online scheduling of power tasks for distribution IoT edge devices, belonging to the field of edge computing for distribution IoT. Background Technology
[0002] To address the diversified, dynamic, and differentiated characteristics of distribution area tasks and the new demands for business scope to extend deeper into the user side, edge devices have adopted a new architecture based on microservices as the execution carrier. Due to the excellent isolation performance and lightweight advantages of containers, deploying microservice-type applications through containers enables edge devices to handle multiple types of tasks, ensuring task isolation and data security. The development trend of edge devices is generalization, that is, running different types of applications on the same hardware system. However, edge devices are resource-constrained devices, capable of supporting only a limited number of business containers. As applications expand with the development of new businesses, the contradiction between the diversified needs of businesses and the limited resources of the devices becomes increasingly prominent.
[0003] To address the aforementioned issues, task scheduling is necessary. Task scheduling involves allocating task requests from terminals to edge devices or the cloud, providing appropriate resources, and enabling collaborative task execution. Its core is making reasonable scheduling decisions based on system conditions and task characteristics. Microservice architecture and container technology have altered the application architecture and resource deployment patterns of the power distribution IoT cloud and edge, thereby changing task scheduling and processing.
[0004] Specifically: First, the task consists of several dependent microservices, with finer granularity, which constrains the scheduling and execution order of each microservice. Second, each microservice can be assigned to a container for processing, and the container's running state is dynamically changing. Finally, edge devices and the cloud simultaneously handle several types of business containers, and the information, functions, and requirements of various requests differ greatly. A single task scheduling order and processing method cannot meet the diverse needs of the tasks, requiring a comprehensive allocation based on task characteristics.
[0005] Current technologies do not consider the impact of power task characteristics and container states on scheduling decisions under a microservice architecture, and focus on offline task scheduling, lacking research on online scheduling of multiple tasks. Therefore, designing a technical solution for online scheduling that reduces task response latency and improves task completion rate has become an urgent problem to be solved in this field. Summary of the Invention
[0006] The technical problem to be solved by the present invention is to overcome the shortcomings of the prior art and provide an online scheduling method for power tasks of power distribution IoT edge devices that schedules different tasks according to different system resource conditions, can process more tasks in a shorter time, and ensures the completion rate of important tasks when system resources are limited.
[0007] The technical solution adopted by the present invention to solve its technical problem is characterized by the following steps:
[0008] Step 1: Determine the number of edge devices and cloud devices, create containers and devices, and configure communication between edge devices and cloud devices;
[0009] Step 2, create a task and scheduling list;
[0010] Step 3: Establish the container-microservice mapping relationship;
[0011] Step 4: Determine the earliest execution time of the microservice based on device capacity constraints and microservice priority constraints;
[0012] Step 5: Based on the earliest execution time of the microservice determined in Step 4, allocate tasks and their microservices when the edge computing system resources are unrestricted and when the edge computing system resources are restricted.
[0013] Step 6: Once the microservice is assigned to be executed, remove the microservice's information from the scheduling list.
[0014] Preferably, step 2 includes the following steps:
[0015] Step 2-1, Create a task model;
[0016] Multiple microservices with dependencies are modeled using a directed acyclic graph, denoted as G. m ={V m E m W m},
[0017] in: The nodes in the graph represent the k microservices invoked by the task, E m W represents the set of directed edges, which in turn represent the dependencies between microservices. m This represents the set consisting of the weights of each directed edge;
[0018] Step 2-2, Modify the task topology;
[0019] Steps 2-3: Determine task information;
[0020] The set of power tasks is represented as S = {s1, s2, s3, ..., s}. m Tasks s m Represented as s m ={a tm d tm , l m G m},
[0021] Where: a tm Indicates task s m The arrival time, d tm Indicates task s m At the deadline, l m Indicates task s m The type value is used to distinguish between regular tasks, alarm tasks, and fault handling tasks;
[0022] Steps 2-4: Estimate the execution time of each microservice on each device based on historical information;
[0023] Steps 2-5: Calculate task priorities using fuzzy logic;
[0024] Steps 2-6: Starting from the virtual exit microservice, traverse each node backward and obtain the microservice scheduling priority through recursion;
[0025] Steps 2-7: Create a scheduling list.
[0026] Preferably, steps 2-5 include the following steps:
[0027] Step 2-5-1: Use the triangular membership function for fuzzification;
[0028] Step 2-5-2: Use fuzzy rules for reasoning;
[0029] Step 2-5-3: Use the centroid method to perform defuzzification calculations.
[0030] Preferably, step 4 includes the following steps:
[0031] Step 4-1, Waiting time under equipment capacity constraints:
[0032]
[0033] in: microservices In device e n The earliest end time, microservice It is device e n Container c i waiting queue The tail microservice, and WQ n Indicates device e n The collection of microservices at the tail of all container waiting queues;
[0034] Step 4-2, Earliest execution time under priority constraints;
[0035] Microservices require data to be transferred from their predecessor microservices before execution; therefore:
[0036]
[0037] in, for In device e n The earliest execution time can be obtained by iterating through each edge device and the cloud to find the minimum value of this time. For microservices The assigned equipment
[0038] Step 4-3, Determine the microservices In device e n The earliest execution time in the process is:
[0039]
[0040] The end time is:
[0041] Preferably, in step 5, when allocating tasks and their microservices without resource constraints in the edge computing system, the following steps are included:
[0042] Step 5-1: Based on the earliest execution time of the microservice determined in Step 4-3, calculate the earliest execution time of the microservice that is at the top of each scheduling list in the scheduling list, select the microservice with the smallest earliest execution time, and abandon the scheduling if a new task arrives within the waiting time. At this time, only update the current time, the remaining time of each container, and the container status.
[0043] Step 5-2: If no new task arrives within the waiting time, the microservices are allocated using the microservice allocation formula.
[0044] Step 5-3: Allocate the remaining microservices according to the microservice allocation formula.
[0045] Preferably, in step 5, when allocating tasks and their microservices in a resource-constrained edge computing system, it is assumed that the highest priority scheduling sequence in scheduling list D is T. m When T m When the priority is greater than 0.8, the scheduling sequence T will be... m The first-ranked microservice is assigned to the target device according to the microservice allocation formula. If there are multiple tasks with the same priority, a scheduler is randomly selected.
[0046] Preferably, the microservice allocation formula is as follows:
[0047]
[0048] in, For microservices The assigned equipment for In device e n The earliest execution time.
[0049] 1. In this online scheduling method for power tasks of IoT-enabled distribution equipment, different tasks are scheduled according to different resource conditions of the system, which can process more tasks in a shorter time and ensure the completion rate of important tasks when system resources are limited.
[0050] 2. In this method for online scheduling of power tasks for IoT edge devices in power distribution, the situations in the microservice processing are distinguished and a corresponding mathematical model is established. The model considers relatively complete influencing factors and has strong applicability.
[0051] 3. The task scheduling algorithm of this power distribution IoT edge device online scheduling method has low complexity and can meet the real-time requirements of task scheduling.
[0052] 4. The test dataset of this power task online scheduling method for distribution IoT edge devices is highly representative, includes a variety of task types, and can be applied to various task scheduling scenarios in distribution IoT.
[0053] 5. In this online scheduling method for power tasks of distribution IoT edge devices, a task and scheduling list are first created, and a container-microservice mapping relationship is established. A fine-grained online scheduling method for power tasks is proposed, which can efficiently handle microservices with pre- and post-constraint relationships in directed acyclic graphs and can meet more task requests.
[0054] 6. In this online scheduling method for power tasks of IoT edge devices in power distribution, the scheduling method is based on a comprehensive consideration of microservice execution constraints, task queuing, equipment resources and task attributes, and different scheduling methods are applied to different tasks in different situations, which can meet more task requests. Attached Figure Description
[0055] Figure 1 A flowchart illustrating the online scheduling method for power tasks of IoT edge devices in power distribution.
[0056] Figure 2 A flowchart illustrating the deployment of an edge computing network scenario for online scheduling of power tasks for IoT edge devices in power distribution.
[0057] Figure 3 A flowchart for creating task and scheduling lists for online scheduling methods of power tasks for IoT edge devices in power distribution.
[0058] Figure 4 This is a system architecture diagram for an online power task scheduling method for IoT-enabled distribution devices.
[0059] Figure 5This is a schematic diagram of a real-world scenario for an online power task scheduling method for IoT-enabled distribution devices.
[0060] Figure 6 The graph shows the impact of the number of concurrent containers supported by the edge device on the number of tasks completed by different algorithms.
[0061] Figure 7 The graph shows the impact of the number of concurrent containers supported by the edge device on the task completion time of different algorithms.
[0062] Figure 8 A block diagram of the fault assessment task structure.
[0063] Figure 9 This is a graph showing the scheduling results of important tasks. Detailed Implementation
[0064] Figures 1-9 This is the preferred embodiment of the present invention, which is described below in conjunction with the accompanying drawings. Figures 1-9 The present invention will be further described below.
[0065] like Figure 1 As shown, an online scheduling method for power tasks of distribution IoT edge devices includes the following steps:
[0066] Step 1: Deploy the edge computing network scenario;
[0067] like Figure 2 As shown, step 1 includes the following steps:
[0068] Step 1-1: Determine the number of edge devices and cloud devices;
[0069] The system consists of several edge devices and a central cloud, and can be represented as E = {e1, e2, ..., e}. N}, where N is the total number of edge devices and central cloud, and e N The central cloud is the main cloud, and the rest are edge devices.
[0070] Steps 1-2, Communication Settings;
[0071] Device e i With e j The data transfer rate between them is u i,j And believes that u i,j =u j,i When i = j, u i,j =+∞ means ignoring the data transmission time within the same device. Because data transmission between the cloud and the edge will have a relatively long delay, the communication time between the edge device and the cloud is set to 1 / X times the communication time between the edge devices, where X is greater than 1.
[0072] Steps 1-3: Container creation;
[0073] As the execution carrier of microservices, containers require the following information: a unique ID to distinguish different containers, the running microservice ID, and remaining time. Containers on edge devices have two running states: not running and running. For ease of mathematical description, 0 represents not running and 1 represents running.
[0074] Steps 1-4: Device creation;
[0075] The devices include edge devices and the cloud, and the information includes unique IDs to distinguish different devices and a list of containers. This is based on the container's state (denoted as c). State This can be used to obtain the number A of containers running on an edge device at a certain moment. An edge device has a maximum number M of containers that it can support running concurrently. When the number of containers A (0≤A≤M) running on an edge device reaches the value of M, the edge device is considered to have limited resources. When the number of containers running on all edge devices reaches the maximum value, the edge computing system is considered to have limited resources.
[0076] Step 2, create a task and schedule list;
[0077] like Figure 3 As shown, step 2 includes the following steps:
[0078] Step 2-1, Create a task model;
[0079] The completion of a power task depends on several microservices. Multiple microservices with dependencies can be modeled using a directed acyclic graph (DAG), denoted as G. m ={V m E m W m},in These are nodes in the graph, representing the k microservices invoked by the task. E m This represents the set of directed edges, symbolizing the dependencies between microservices. W m This represents the set consisting of the weights of each directed edge, where the weights refer to the amount of data transferred between the two microservices.
[0080] Step 2-2, Modify the task topology;
[0081] A microservice that does not receive any data is called an entry microservice, and a microservice that does not transmit any data is called an exit microservice. Considering the transmission latency caused by the transmission of task input and result data during task scheduling, and the practical situation that both input and result data must reach the initial edge device, a virtual entry microservice is added that does not consume any time or resources. With virtual exit microservices Furthermore, it is stipulated that the two virtual microservices will not participate in scheduling. Therefore, the graph structure is modified as follows:
[0082] Steps 2-3: Determine task information;
[0083] The set of power tasks is represented as S = {s1, s2, s3, ..., s}. m Tasks m Upon arrival, four basic pieces of information can be obtained, denoted as s. m ={a tm d tm , l m G m}, where a tm Indicates task s m The arrival time, d tm Indicates task s m At the deadline, l m Indicates task s m The type value is used to distinguish between routine tasks, alarm tasks, and fault handling tasks.
[0084] Steps 2-4: Estimate the execution time of the microservice;
[0085] The execution time of each microservice of the task on each device is estimated based on historical information and stored.
[0086] Steps 2-5: Calculate task priorities;
[0087] Different tasks have different priorities. The task priority is calculated using fuzzy logic, specifically including the following steps:
[0088] Step 2-5-1: Use the triangular membership function for fuzzification.
[0089] The membership function of a triangle is used, and its calculation formula is as follows:
[0090]
[0091] Where x is an input or output variable, a, b, and c are given real numbers, and a <b<c。
[0092] Three variables that significantly affect task performance are selected as inputs: latency, task type value, and input data volume. Low, medium, and high are used as linguistic variables for latency and input data volume. Normal, alarm, and fault are used as linguistic variables for task type value. The output is the task priority, using very low, low, medium, high, and very high as linguistic variables. Depending on the task parameter range set in the experiment, the values of a, b, and c are shown in Table 1.
[0093] Table 1 Membership Function Parameters
[0094]
[0095] Step 2-5-2: Use fuzzy rules for reasoning;
[0096] The result of the inference is a fuzzy variable used for defuzzification. A fuzzy rule is a simple if-then rule with a condition and a conclusion. Since there are three membership functions, each with three linguistic variables, there are a total of 27 fuzzy rules. The fuzzy rules are shown in Table 2.
[0097] Table 2 Fuzzy Rules
[0098] Rule number Input data volume Delay Task type value Task Priority R1 Low high conventional Very low R2 Low high Alarm Very low R3 Low middle conventional Low R4 Low middle Alarm Low R5 Low high Fault Low R6 middle high conventional Low R7 middle high Alarm Low R8 high high conventional Low R9 high high Alarm Low R10 Low Low conventional middle R11 Low Low Alarm middle R12 Low middle Fault middle R13 middle middle conventional middle R14 middle middle Alarm middle R15 middle high Fault middle R16 high middle conventional middle R17 high middle Alarm middle R18 high high Fault middle R19 Low Low Fault high R20 middle Low conventional high R21 middle Low Alarm high R22 middle middle Fault high R23 high Low conventional high R24 high middle Fault high R25 high Low Alarm Very high R26 middle Low Fault Very high R27 high Low Fault Very high
[0099] Steps 2-5-3: Deblurring;
[0100] The centroid method is used for defuzzification calculation, and the calculation formula is as follows:
[0101]
[0102] The priority p of each task is obtained through calculation. m .
[0103] Steps 2-6: Calculate microservice scheduling priority;
[0104] Starting from the virtual exit microservice, the process iterates backward through each node, recursively obtaining the microservice scheduling priority. The priority of each microservice is shown in formula (3):
[0105]
[0106] Where: rank(i) is scheduling priority, for The average processing time is equal to the average execution time of this microservice across all devices, as shown in formula (4):
[0107]
[0108] Steps 2-7: Create a scheduling list;
[0109] Create a scheduling list D = {T1, T2, ...} for multiple tasks. When task s m Upon arrival at a certain time, the task priority is calculated based on fuzzy logic, and the priority of each microservice is calculated according to formula (3) to generate s. m scheduling sequence T m and immediately schedule sequence T m Add to schedule list D.
[0110] Step 3, establish the mapping relationship between containers and microservices;
[0111] Each microservice can correspond to a container for processing. The mapping relationship between microservices and containers can be expressed as V total →C total , where T total is the set of all microservices, and C total is the set of all containers. For any v ∈ V total and c ∈ C total , map(v) = c, which means that microservice v will be processed by container c.
[0112] Step 4, determine the earliest execution time of microservices;
[0113] To enable microservices to be executed as early as possible, it is necessary to determine their earliest execution time. The determination of the earliest execution time requires the following steps:
[0114] Step 4-1, waiting time under device capacity constraints;
[0115] Assume that the cloud and the edge have images of all containers. Due to the volatility of container status, there are three cases when a microservice is processed by the corresponding container. The first case: the container corresponding to v is running (c State = 1). Assume that each container can only process one microservice it is responsible for in a certain period. When a large number of similar microservices arrive, v needs to enter the container waiting queue to wait for execution. The second case: the container corresponding to v is not running, and the edge device is not resource-constrained (c State = 0 ∧ A < M). Without considering the initialization configuration time of the container, v can be executed immediately. The third case: the container corresponding to v is not running, and the edge device is resource-constrained (c State = 0 ∧ A = M). At this time, v needs to wait for the remaining containers to enter the idle state and release the edge device resources before being executed. Assume that the resources of the cloud are sufficient. All three cases need to be considered in the edge device, and only the first two cases need to be considered in the cloud. From this, the waiting time when microservice is assigned to device e n for execution is:
[0116]
[0117] Among them: represents the earliest end time of microservice on device e n , microservice is the microservice at the end of the waiting queue n of container c i in device e , and WQ nIndicates device e n The collection of microservices at the tail of all container waiting queues.
[0118] The earliest execution time must be greater than the waiting time, that is:
[0119]
[0120] Step 4-2, Earliest execution time under priority constraints;
[0121] Microservices require data to be transferred from their predecessor microservices before execution; therefore:
[0122]
[0123] in, for In device e n The earliest execution time can be obtained by traversing each edge device and the cloud to find the minimum value of this time. For microservices The assigned equipment.
[0124] Step 4-3, Determine the microservices In device e n The earliest execution time in the process is:
[0125]
[0126] The end time is:
[0127]
[0128] Step 5: Assign microservices;
[0129] The allocation of microservices needs to be differentiated between when edge computing system resources are unrestricted and when edge computing system resources are restricted, including the following:
[0130] When edge computing system resources are not limited:
[0131] Step 5-1: Calculate the scheduling sequence T in the scheduling list D according to formula (8). m The earliest execution time of the first microservice is selected, and the microservice with the shortest earliest execution time is chosen. If a new task arrives within the waiting time, the scheduling is abandoned. At this time, only the current time, the remaining time of each container, and the container status are updated.
[0132] Step 5-2: If no new task arrives within the waiting time, the microservice is allocated according to formula (10).
[0133]
[0134] in, For microservices The assigned equipment for In device e n The earliest execution time.
[0135] Step 5-3: Schedule the remaining microservices in turn according to the above principles.
[0136] When edge computing system resources are limited:
[0137] Assume that the highest priority scheduling sequence in scheduling list D is T. m When T m When the priority is greater than 0.8, the T in the scheduling sequence will be... m The first-ranked microservice is assigned to the target device according to formula (10). If there are multiple tasks with the same priority, a scheduler is randomly selected.
[0138] Step 6: Security Settings;
[0139] Once a microservice is assigned for execution, its information is removed from the scheduling list D, and when the scheduling sequence T... m Once all microservices have been assigned, the scheduling list T will be... m The information is removed from the scheduling list D. According to formula (8), it can be known that... The earliest execution time is earlier than the task deadline, indicating that the task is completed; otherwise, the task is not completed.
[0140] Step 7: Display and storage of scheduling information;
[0141] Once all tasks are scheduled, operators can see the number of tasks scheduled, the number of tasks completed, and the completion time of each task. This information is stored for future problem identification and optimization.
[0142] The following example verifies the above-mentioned online power task scheduling method for distribution IoT edge devices:
[0143] This online power task scheduling method for distribution IoT edge devices is applied in actual distribution substations. Each edge device can be responsible for processing tasks within one or several substation areas, while the central cloud manages all devices. In situations such as... Figure 4In the system architecture shown, the power distribution IoT terminal is responsible for generating tasks and providing data. After a power task request is generated, it is submitted to the edge devices in the relevant area for processing. Before the task arrives, the task information is unknown, such as the microservices invoked, the amount of input data, and the deadline. After the task request arrives, due to the independence between microservices, the edge devices will, based on their resource availability and the task requirements, offload some or all microservices to the cloud or other edge devices. Through the exchange of communication and computing resources, they will collaboratively execute the computational task. (Reference) Figure 2 The image shows a real-world scenario, illustrating an improved IEEE 33-node system. The distribution area comprises four edge devices and one central cloud.
[0144] To verify the performance of the proposed algorithm, it was implemented and tested using Python. The task class includes ID, graph structure, execution time list, arrival time, deadline, task type value, priority, and the submitted edge device number. The container class includes ID, running microservice, and remaining time. The server class includes ID and container list. The system settings class includes the number of edge devices, cloud-edge communication time multiplier, and the number of concurrent containers supported by the device.
[0145] For the comparison of the algorithm proposed in this paper, the following three scheduling strategies are considered as comparisons:
[0146] Method 1: Only Edge Device Algorithm (OEDA): All tasks are processed at the initial edge device they arrive at, without offloading.
[0147] Method 2: Only Cloud Algorithm (OCA): Except for the virtual entry and exit microservices, all other microservices are offloaded to the cloud for execution.
[0148] Method 3: First Come First Service (FCFS) algorithm: Based on queuing theory, it schedules according to arrival time.
[0149] Once a task is started, each microservice will process it continuously until the task is completed, without scheduling other tasks during this process. To test the algorithm's performance under different parameter settings, 200 tasks were randomly generated within a reasonable range. Each power task calls 5-9 microservices. The amount of data processed by each microservice is in the range of (0.1MB, 1.2MB), the amount of data transferred between the virtual entry microservice and other entry microservices is in the range of (0.5MB, 1MB), the amount of data transferred between the other two dependent microservices is in the range of (0.1MB, 0.5MB), and the latency of each task is in the range of (2s, 20s).
[0150] Each edge device supports a maximum of 4 concurrent containers, while the central cloud can support all business containers concurrently, so it is set to 9. Because data transmission between the cloud and the edge has a relatively long latency, the communication time between the edge device and the cloud is set to 1 / 20th of the communication time between the edge devices. The 200 generated tasks were scheduled using the proposed scheduling algorithm and three comparative scheduling algorithms. The experimental results are as follows: Figures 6-7 As shown in the figure. Experimental results show that, under the same settings, the strategy proposed in this invention can process more tasks in a shorter time and has higher task execution efficiency.
[0151] To compare the performance of critical tasks in edge computing systems with limited resources, the scheduling and processing of fault assessment tasks after a fault occurs in a distribution substation are simulated based on the actual operating scenario of the substation. The parameters of the tasks are shown in Table 3.
[0152] Table 3 Fault Analysis Task Parameters
[0153]
[0154] Task structure as follows Figure 8 As shown, the modified graph structure contains 7 microservices. Task input data is sent to three microservices: transformer topology identification, equipment operation data acquisition, and power outage event acquisition. Then, the fault loop criterion calculation and fault determination microservices analyze the faults based on the output data from the three microservices, and finally output the results. The fault determination task is scheduled using both the strategy presented in this paper (Strategy 1) and ondoc (Strategy 2). Thirty random tests were conducted to observe the task processing, and the results are as follows. Figure 9 As shown. By Figure 9It is evident that the processing time of tasks under Strategy 1 is significantly shorter than that under Strategy 2. With a task latency requirement of 3.2 seconds, the task completion rate under Strategy 1 is 83.3%, while that under Strategy 2 is only 23.3%, demonstrating that Strategy 1 performs significantly better than Strategy 2. This is because Strategy 2 only selects the earliest executable microservice based on the scheduling list order, resulting in poor flexibility and an inability to adapt to special tasks and changing environments. During power grid operation, if tasks such as fault handling are not processed in a timely manner, they will have incalculable impacts on the power grid. The strategy proposed in this invention can reduce the processing time of important tasks when edge computing system resources are limited, thereby improving the stability and security of power grid operation.
[0155] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A method for online scheduling of power tasks for distribution IoT edge devices, characterized in that: Includes the following steps: Step 1: Determine the number of edge devices and cloud devices, create containers and devices, and configure communication between edge devices and cloud devices; Step 2, create a task and scheduling list; Step 3: Establish the container-microservice mapping relationship; Step 4: Determine the earliest execution time of the microservice based on device capacity constraints and microservice priority constraints; Step 5: Based on the earliest execution time of the microservice determined in Step 4, allocate tasks and their microservices when the edge computing system resources are unrestricted and when the edge computing system resources are restricted. Step 6: Once a microservice is assigned to be executed, remove the microservice's information from the scheduling list; Step 4 includes the following steps: Step 4-1, Waiting time under equipment capacity constraints: in: microservices In the equipment e n The earliest end time, microservice It is equipment e n medium container c i waiting queue The tail microservice, and , WQ n Indicates equipment e n The collection of microservices at the tail of all container waiting queues; Step 4-2, Earliest execution time under priority constraints; Microservices require data to be transferred from their predecessor microservices before execution; therefore: in, for In the equipment e n The earliest execution time can be obtained by iterating through each edge device and the cloud to find the minimum value of this time. For microservices The assigned equipment Step 4-3, Determine the microservices In the equipment e n The earliest execution time in the process is: The end time is: ; In step 5, when allocating tasks and their microservices in an edge computing system where resources are not limited, the following steps are included: Step 5-1: Based on the earliest execution time of the microservice determined in Step 4-3, calculate the earliest execution time of the microservice that is at the top of each scheduling list in the scheduling list, select the microservice with the smallest earliest execution time, and abandon the scheduling if a new task arrives within the waiting time. At this time, only update the current time, the remaining time of each container, and the container status. Step 5-2: If no new task arrives within the waiting time, the microservices are allocated using the microservice allocation formula. Step 5-3: Allocate the remaining microservices according to the microservice allocation formula.
2. The online power task scheduling method for distribution IoT edge devices according to claim 1, characterized in that: Step 2 includes the following steps: Step 2-1, Create a task model; Multiple microservices with dependencies are modeled using a directed acyclic graph, represented as follows: G m ={ V m , E m , W m }, in: These are nodes in the graph, representing task invocations. k Microservices E m This represents a set of directed edges, symbolizing the dependencies between microservices. W m This represents the set consisting of the weights of each directed edge; Step 2-2, Modify the task topology; Steps 2-3: Determine task information; The set of power tasks is represented as S ={ s 1, s 2, s 3, ..., s m ,…},Task s m Represented as s m ={ a tm , d tm , l m , G m }, in: a tm Indicates task s m The arrival time, d tm Indicates task s m The deadline l m Indicates task s m The type value is used to distinguish between regular tasks, alarm tasks, and fault handling tasks; Steps 2-4: Estimate the execution time of each microservice on each device based on historical information; Steps 2-5: Calculate task priorities using fuzzy logic; Steps 2-6: Starting from the virtual exit microservice, traverse each node backward and obtain the microservice scheduling priority through recursion; Steps 2-7: Create a scheduling list.
3. The online power task scheduling method for distribution IoT edge devices according to claim 2, characterized in that: Steps 2-5 include the following steps: Step 2-5-1: Use the triangular membership function for fuzzification; Step 2-5-2: Use fuzzy rules for reasoning; Step 2-5-3: Use the centroid method to perform defuzzification calculations.
4. The online power task scheduling method for distribution IoT edge devices according to claim 1, characterized in that: In step 5, when allocating tasks and their microservices in a resource-constrained edge computing system, a scheduling list is assumed. D The highest priority scheduling sequence is T m ,when T m When the priority is greater than 0.8, the scheduling sequence will be... T m The microservice at the top is assigned to the target device according to the microservice allocation formula. If there are multiple tasks with the same priority, a scheduler is randomly selected.
5. The online power task scheduling method for distribution IoT edge devices according to claim 1 or 4, characterized in that: The microservice allocation formula is as follows: in, For microservices The assigned equipment for In the equipment e n The earliest execution time.