Task scheduling method and device, equipment and storage medium
By obtaining the load value and task priority of obtaining the marginal node equipment in the task scheduling, and determining the target node equipment based on the load value of other node equipment, the migration of tasks is achieved, and the migration scheme when the task scheduling delay and the resource migration of the existing technology are solved. The lack of problems improves the availability and operating stability of the task.
Patent Information
- Application Number
- CN202411320788.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2025-01-28
AI Technical Summary
In the prior art, task scheduling delay is large and there is a lack of effective task migration scheme when node equipment resources are insufficient.
By obtaining the load value of the edge node equipment, if the preset conditions are not met, the task priority will be obtained, the task to be migrated, and the target node equipment is determined based on the load value of other node equipment to achieve the migration of tasks.
It reduces the difficulty and delay of task scheduling, and improves the availability and smooth operation of the task, especially providing effective task migration schemes when node equipment resources are insufficient.
Smart Images

Figure CN119376876A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computing power network technology, and in particular relates to a task scheduling method, device, electronic device and readable storage medium. Background Art
[0002] With the continuous emergence of new information industries, such as large models, 5G-A (5th Generation Mobile Communication Technology Advance), and big data, the demand for computing power and networks is growing. The computing network is a new type of communication infrastructure that can meet users' demand for computing power and ensure that customer services are properly dispatched to node devices.
[0003] The relevant technology adopts a centralized computing power scheduling solution, and all tasks are centrally scheduled, managed and executed by the central node device to which they belong.
[0004] However, when coordinating large-scale node devices, scheduling by a central node device will result in a large delay. In addition, there is no relevant research on task migration when node device resources are insufficient. Summary of the Invention
[0005] The present invention provides a task scheduling method, device, electronic device and readable storage medium to solve the technical problems in the prior art of large delay and lack of research on insufficient node device resources.
[0006] In a first aspect, the present invention provides a method for task scheduling, the method comprising:
[0007] Upon receiving the target task, obtaining a load value of the edge node device for a preset indicator;
[0008] When the load value of the edge node device for the preset indicator does not meet the preset condition, obtaining the respective priorities of the target task and all tasks deployed by the edge node device, and selecting a task to be migrated from the target task and all tasks deployed by the edge node device based on the priorities;
[0009] Obtain load values of multiple other node devices for preset indicators, determine a target node device from the multiple other node devices based on the load values of the multiple other node devices for preset indicators, and deploy the task to be migrated on the target node device.
[0010] In a second aspect, the present invention provides a task scheduling device, the device comprising:
[0011] A first acquisition module is configured to acquire a load value of the edge node device for a preset indicator when a target task is received;
[0012] a second acquisition module, configured to, when a load value of the edge node device for a preset indicator does not satisfy a preset condition, acquire the respective priorities of the target task and all tasks deployed by the edge node device, and select a task to be migrated from the target task and all tasks deployed by the edge node device based on the priorities;
[0013] The third acquisition module is used to obtain the load values of multiple other node devices for preset indicators, determine the target node device from the multiple other node devices based on the load values of the multiple other node devices for preset indicators, and deploy the task to be migrated on the target node device.
[0014] In a third aspect, the present invention provides an electronic device comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned task scheduling method when executing the program.
[0015] In a fourth aspect, the present invention provides a readable storage medium, which, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform the above-mentioned task scheduling method.
[0016] In the embodiment of the present invention, when a target task is received, the edge node device connected to the target task will first process it. When the load value of the edge node device for the preset indicator meets the preset conditions, the target task will be processed by the edge node device, thereby reducing the operational difficulty of task scheduling and reducing the task delay. In addition, when the load value of the edge node device for the preset indicator does not meet the preset conditions, the respective priorities of the target task and all tasks deployed by the edge node device are obtained, and the task to be migrated is selected from the target task and all tasks deployed by the edge node device based on the priority. The target node device is determined from multiple other node devices based on the load values of multiple other node devices for the preset indicators, and the task to be migrated is deployed on the target node device. When the node device resources are insufficient, a task migration solution is proposed, which can improve the availability of the task and ensure the smooth operation of the task. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 This is a task scheduling model provided by an embodiment of the present application;
[0019] Figure 2 This is a flowchart of a task scheduling method provided by an embodiment of the present invention;
[0020] Figure 3 is a flowchart of another task scheduling method provided by an embodiment of the present invention;
[0021] Figure 4 is a schematic diagram of a task scheduling device provided by an embodiment of the present invention;
[0022] Figure 5 This is a flow chart of a target node device selection method provided by an embodiment of the present invention;
[0023] Figure 6 This is a flowchart of a task deployment provided by an embodiment of the present invention;
[0024] Figure 7 This is a flow chart of a task migration method provided by an embodiment of the present invention;
[0025] Figure 8 Schematic diagram of a task scheduling device provided by an embodiment of the present invention;
[0026] Figure 9 This is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0028] With the continuous emergence of new information industries, such as big models, 5G-A and big data, various industries have an increasing demand for computing power and networks, which is specifically reflected in bandwidth, latency, jitter and processing capabilities.
[0029] As a new type of communication infrastructure, computing power networks can meet users' demand for computing power and ensure that customer services are properly dispatched to data centers. Researchers have proposed a network path selection scheme to connect computing power nodes with customer services, but this does not consider factors such as deterministic bandwidth, jitter, and latency. Related technologies have proposed a centralized computing power scheduling scheme, but when coordinating large-scale node devices, centralized scheduling schemes have difficulties in terms of operational difficulty and latency requirements. In addition, when node device resources are insufficient, relevant research on task migration is still insufficient.
[0030] In the embodiment of the present invention, when a target task is received, the edge node device connected to the target task will first process it. When the load value of the edge node device for the preset indicator meets the preset conditions, the target task will be processed by the edge node device, thereby reducing the operational difficulty of task scheduling and reducing the task delay. In addition, when the load value of the edge node device for the preset indicator does not meet the preset conditions, the respective priorities of the target task and all tasks deployed by the edge node device are obtained, and the task to be migrated is selected from the target task and all tasks deployed by the edge node device based on the priority. The target node device is determined from multiple other node devices based on the load values of multiple other node devices for the preset indicators, and the task to be migrated is deployed on the target node device. When the node device resources are insufficient, a task migration solution is proposed, which can improve the availability of the task and ensure the smooth operation of the task.
[0031] Figure 1 This is a task scheduling model provided by an embodiment of the present invention, see Figure 1 The scheduling model includes 5 clients, 5 edge node devices, and 2 central node devices. The clients, edge node devices, and central node devices are all connected via dedicated lines. The clients communicate with the edge node devices in a two-way manner, the edge node devices communicate with the central node devices in a two-way manner, and the central node devices communicate with each other in a two-way manner. Figure 1The areas shown are divided into Area 1 and Area 2 based on the physical location of the central node device. Both Area 1 and Area 2 contain central node devices and edge node devices. The edge node devices in Area 1 communicate only with the central node device in Area 1. For example, edge node device 101 communicates only with central node device 10, edge node device 102 communicates only with central node device 10, and edge node device 103 communicates only with central node device 10. The edge node devices in Area 2 communicate only with the central node device in Area 2. For example, edge node device 114 communicates only with central node device 11, and edge node device 115 communicates only with central node device 11. Clients in Area 1 and Area 2 are connected only to the corresponding edge node devices for two-way communication. For example, client 1011 in region 1 is connected only to corresponding edge node device 101 for bidirectional communication. Client 1021 in region 1 is connected only to corresponding edge node device 102 for bidirectional communication. Client 1031 in region 1 is connected only to corresponding edge node device 103 for bidirectional communication, and neither is connected to any other edge node device. For another example, client 1141 in region 2 is connected only to corresponding edge node device 114 for bidirectional communication. Client 1151 in region 2 is connected only to corresponding edge node device 115 for bidirectional communication, and neither is connected to any other edge node device. Central node device 10 in region 1 is in bidirectional communication with central node device 11 in region 2.
[0032] Figure 2 This is a flowchart of a task scheduling step provided by an embodiment of the present invention, such as Figure 2 As shown, the method may include:
[0033] Step 101: Upon receiving a target task, obtain a load value of an edge node device for a preset indicator.
[0034] In an embodiment of the present invention, the target task may be a task that needs to be migrated for the first time, or it may be an incremental task to the task that needs to be migrated for the first time. The edge node device may be an edge node device corresponding to the target task. The preset indicators may include computing, memory, storage, network, and latency. The load value of the preset indicator can reflect the real-time occupancy of the task on the edge node device, and can also be understood as the current resource occupancy on the edge node. For example, it may include computing occupancy, memory occupancy, storage occupancy, network occupancy, and latency occupancy. When the target task is received, the load value of the edge node device for the preset indicator is obtained, and the current occupancy of the edge node device resources can be known, so that the optimal node device can be selected for the target device based on the resource occupancy to ensure the smooth operation of the target task.
[0035] Step 102: When the load value of the edge node device for the preset indicator does not meet the preset condition, obtain the respective priorities of the target task and all tasks deployed by the edge node device, and select the task to be migrated from the target task and all tasks deployed by the edge node device based on the priority.
[0036] In an embodiment of the present invention, the preset conditions may be the computing, memory, storage, network, latency, and other conditions required for the target task. Priority may be determined based on the latency, bandwidth, computing, storage, and memory requirements of the task. If the load value of the edge node device for the preset indicators does not meet the computing, memory, storage, network, latency, and other conditions required for the target task, the priorities of the target task and all tasks deployed by the edge node device are obtained, and the task to be migrated is selected from the target task and all tasks deployed by the edge node device based on the priority.
[0037] For example, the latency of the target task is 124 milliseconds (ms), and the remaining latency of the edge node device reaches 124ms. The bandwidth, computing, storage, and memory of the target task are considered in turn. If the latency, bandwidth, computing, storage, and memory of the edge node device all meet the requirements, the target task will be processed by the edge node device. If one of the requirements is not met on the edge node device, the priority of the target task and all tasks deployed by the edge node device is obtained. For another example, if the latency of the target task is 124ms, and the latency of the edge node device is less than 124ms, the priority of the target task and all tasks deployed by the edge node device is obtained.
[0038] The priorities of the target task and all tasks deployed on the edge node device are determined based on their latency, bandwidth, compute, storage, and memory. For example, all tasks deployed on the edge node device are Task 1 and Task 2. Task 1 has a latency of a1, a bandwidth of a2, a compute of a3, a storage of a4, and a memory of a5. Task 2 has a latency of b1, a bandwidth of b2, a compute of b3, a storage of b4, and a memory of b5. The target task has a latency of c1, a bandwidth of c2, a compute of c3, a storage of c4, and a memory of c5. If b1 > c1 > a1, the priorities of Task 1, Task 2, and the target task are Task 1, Target Task, Task 2. After determining the priorities of Task 1, Task 2, and the target task, the task to be migrated is selected from the target task, Task 1, and Task 2 based on their priorities.
[0039] In an embodiment of the present invention, when the load value of the edge node device for the preset indicator does not meet the preset conditions, the respective priorities of the target task and all tasks deployed by the edge node device are obtained, and the tasks to be migrated are selected from the target task and all tasks deployed by the edge node device based on the priority. This can improve resource utilization and ensure that the tasks deployed on the edge node device can run smoothly.
[0040] Step 103: Obtain load values of multiple other node devices for preset indicators, determine a target node device from the multiple other node devices based on the load values of the multiple other node devices for the preset indicators, and deploy the task to be migrated on the target node device.
[0041] In an embodiment of the present invention, other node devices are node devices in the system other than edge node devices. After selecting the task to be migrated from the target task and all tasks already deployed by the edge node device based on priority, a target node device is determined from the plurality of other node devices for the task to be migrated. Specifically, load values for the plurality of other node devices are obtained for preset indicators, namely, the computing occupancy, memory occupancy, storage occupancy, network occupancy, and latency occupancy of the plurality of other node devices are obtained, and the target node device is determined from the plurality of other node devices based on these values.
[0042] In the embodiment of the present invention, when a target task is received, the edge node device connected to the target task will first process it. When the load value of the edge node device for the preset indicator meets the preset conditions, the target task will be processed by the edge node device, thereby reducing the operational difficulty of task scheduling and reducing the task delay. In addition, when the load value of the edge node device for the preset indicator does not meet the preset conditions, the respective priorities of the target task and all tasks deployed by the edge node device are obtained, and the task to be migrated is selected from the target task and all tasks deployed by the edge node device based on the priority. The target node device is determined from multiple other node devices based on the load values of multiple other node devices for the preset indicators, and the task to be migrated is deployed on the target node device. When the node device resources are insufficient, a task migration solution is proposed, which can improve the availability of the task and ensure the smooth operation of the task.
[0043] Figure 3 This is a flowchart of another task scheduling method provided by an embodiment of the present invention. Figure 3 As shown, the method may include:
[0044] Step 201: When a target task is received, a load value of an edge node device for a preset indicator is obtained.
[0045] This step may be specifically referred to the above step 101 and will not be described in detail here.
[0046] Optionally, before step 201, the method further includes:
[0047] Step A: Deploy monitoring virtual machines for the edge node device and multiple other node devices respectively to monitor load values of preset indicators of the edge node device and multiple other node devices.
[0048] In an embodiment of the present invention, Figure 4 This is a schematic diagram of a task scheduling device provided by an embodiment of the present invention, see Figure 4 , Figure 4 The illustrated apparatus includes an edge node device 40 and a central node device 41. The edge node device 40 is equipped with a network module 401, a storage module 402, a computing module 403, and a monitoring virtual machine 404, while the central node device 41 is equipped with a network module 411, a storage module 412, a computing module 413, and a monitoring virtual machine 414. Both the edge node device 40 and the central node device 41 utilize their respective monitoring virtual machines to receive information, process information, issue configurations, and initiate data transmission. The central node device is equipped with a monitoring virtual machine 414, which is responsible for collecting the load values of the preset indicators of the central node device 41, thereby establishing a network link between the edge node device 40 and the central node device 41. Through logical isolation, these network links form a dedicated channel. When the edge node device 40 sends a request, the monitoring virtual machine 414 in the central node device 41 feeds back the load values of the preset indicators of the central node device 41 to the edge node device 40. This allows the edge node device 40 to obtain the resource usage status of the central node device 41 based on the load values of the preset indicators of the central node device 41.
[0049] Step 202: When the load value of the edge node device for the preset indicator does not meet the preset condition, obtain the respective priorities of the target task and all tasks deployed by the edge node device, and use the task with the lower priority among the target task and all tasks deployed by the edge node device as the task to be migrated.
[0050] In an embodiment of the present invention, referring to the above step 102, after obtaining the priorities of task 1, task 2, and target task as task 1, target task, and task 2, since task 2 has the lowest priority, task 2 is used as the task to be migrated, thereby determining the target node device for the task to be migrated, which can improve the availability of the task and ensure the smooth operation of the task on the edge node device.
[0051] Step 203: Obtain load values of a plurality of first edge node devices connected to the central node device to which the edge node device belongs for a preset indicator.
[0052] In the embodiment of the present invention, see Figure 1, taking the edge node device as edge node device 101 as an example, the central node device to which edge node device 101 belongs is central node device 10, and the multiple first edge node devices connected to central node device 10 are edge node device 102 and edge node device 103. Since edge node device 102 and edge node device 103 are respectively deployed with monitoring virtual machines, the monitoring virtual machine of edge node device 102 can send the load value of edge node device 102 for the preset indicator to edge node device 101, and the monitoring virtual machine of edge node device 103 can send the load value of edge node device 103 for the preset indicator to edge node device 101. After edge node device 101 receives the load values of edge node device 102 and edge node device 103 for the preset indicators respectively, it can determine the target node device based on the load value, which can improve the availability of the task and ensure the smooth operation of the task on edge node device 101.
[0053] Optionally, step 203 may specifically include:
[0054] Sub-step 2031: Send a detection signal to monitoring virtual machines in a plurality of first edge node devices connected to the central node device to which the edge node device belongs through a preset channel.
[0055] Sub-step 2032: Receive feedback signals sent by monitoring virtual machines in multiple first edge node devices connected to the central node device to which the edge node device belongs, to obtain load values of preset indicators of multiple first edge node devices connected to the central node device to which the edge node device belongs.
[0056] In the embodiment of the present invention, for sub-steps 2031-2032, the preset channel is a channel generated by deploying a monitoring virtual machine and through logical isolation, and a network link can be established between edge node devices and between edge node devices and central node devices. The detection signal can be a detection message, which usually includes several bits and is composed of an IPv6 address. The edge node devices maintain communication by sending detection messages through the monitoring virtual machine in the edge node device. The edge node device and the central node device can also maintain communication by sending detection messages through the monitoring virtual machine in the edge node device and the central node device. The feedback signal can be a feedback message, which is composed of an IPv6 address. See Figure 1When a service needs to be migrated, edge node device 101 sends a detection message to the monitoring virtual machines in edge node device 102 and edge node device 103, respectively. The monitoring virtual machine in edge node device 102 fills the load value of edge node device 102 for the preset indicator into the feedback message, and the monitoring virtual machine in edge node device 103 fills the load value of edge node device 103 for the preset indicator into the feedback message. Then, each of the three sends a feedback message to the monitoring virtual machine in edge node device 101. After edge node device 101 obtains the load values for the preset indicators of edge node device 102 and edge node device 103, it can select the optimal edge node device as the target node device based on the load values.
[0057] Step 204: Select a first edge node device whose load value meets a preset condition among the multiple first edge node devices as a candidate node device.
[0058] In the embodiment of the present invention, see Figure 1 The monitoring virtual machine in edge node device 101 determines whether the load values of edge node devices 102 and 103 meet preset conditions. If the preset conditions are met, edge node devices 102 and 103 are selected as candidate node devices. This can reduce the computational complexity of selecting a target node device from the candidate node devices.
[0059] Step 205: Select a target node device from the candidate node devices according to the entropy weight method, and deploy the task to be migrated on the target node device.
[0060] In this embodiment of the present invention, the entropy weight method is largely unaffected by subjective factors. Its evaluation results are primarily based on objective data, making it more objective. This comprehensive evaluation method can be applied to multiple objects and multiple indicators. This embodiment of the present invention uses the entropy weight method to select a target node device from a pool of candidate node devices, resulting in a more objective result.
[0061] Optionally, before step 205, the method further includes:
[0062] Step B1: Determine the bandwidth and latency of the path between the edge node device and the target node device through a hard slicing method, and pre-deploy the resources and network configuration of the task to be migrated on the target node device.
[0063] Step B2: When the load value of the preset indicator of the target node device meets the preset condition, the task to be migrated is migrated to the target node device.
[0064] Step B3: When the task to be migrated is running normally, release the resources and network configuration on the edge node device.
[0065] Step B4: If an error occurs during the execution of the task to be migrated, report the fault.
[0066] In an embodiment of the present invention, for steps B1 to B4, the bandwidth and latency of the transmission path between the edge node device and the target node device are determined by a hard slicing method, which can ensure the stability of the task data migration process and reduce the service transmission latency. In addition, the resources and network configuration of the task to be migrated are pre-deployed on the target node device. When the load value of the preset indicator of the target node device meets the preset conditions, the task to be migrated is migrated to the target node device. When the task to be migrated runs normally, the resources and network configuration on the edge node device are released to ensure the security of the task. In the event of an error in the operation of the task to be migrated, the fault is reported.
[0067] Optionally, step 205 may specifically include:
[0068] Sub-step 2051 : normalize the load values of the various preset indicators of the candidate node devices to obtain the normalized load values of the various preset indicators.
[0069] Sub-step 2052: summing the normalized load values of the preset indicators to obtain a summed result of the load values.
[0070] Sub-step 2053: Calculate the ratio of the normalized load value of each preset indicator to the sum of the load values.
[0071] Sub-step 2054: Calculate the information entropy of each preset indicator based on the ratio, and determine the target node device from the candidate node devices based on the information entropy of each preset indicator and the normalized load value of each preset indicator.
[0072] For the above sub-steps 2051 to 2054, taking the preset indicators of computing, memory, storage, network and latency as an example, and the candidate node devices being the node devices AF in Table 1 as an example, the target node device is selected for detailed introduction.
[0073] Table 1
[0074]
[0075] First, referring to the following formula, normalize the load values of the respective preset indicators of the node devices AF to obtain the normalized load values of the respective preset indicators.
[0076]
[0077] Among them, i represents each node device, 1≤i≤n, n∈[1,2,3,4,5,6], j represents each preset indicator, 1≤j≤m, m∈[1,2,3,4,5], x ij Indicates the load value of the jth preset indicator in the i-th node device. max{x 1,j ,..,x n,j} represents the load value x of the jth preset indicator in the first node device 1,j The load value x of the jth preset indicator in the nth node device n,j The maximum value, min{x 1,j ,..,x n,j} represents the load value x of the jth preset indicator in the first node device 1,j The load value x of the jth preset indicator in the nth node device n,j The minimum value of .
[0078] Then, referring to the following formula, the normalized load values of the preset indicators are summed to obtain the summed result of the load values, and the ratio of the normalized load value of each preset indicator to the summed result of the load values is calculated.
[0079]
[0080] Among them, p i,j Indicates the proportion of the load value of the i-th node device under the j-th preset indicator.
[0081] Finally, see the following formula, the information entropy of each preset indicator is calculated based on the ratio, and the target node device is determined from the node devices AF based on the information entropy of each preset indicator and the normalized load value of each preset indicator.
[0082]
[0083] Among them, k represents the value obtained by taking the logarithm and reciprocal of n, lnp i,j Indicates that p i,j The value obtained after taking the logarithm, e j Represents the information entropy of the j-th preset indicator.
[0084] Optionally, sub-step 2054 may specifically include:
[0085] Sub-step 20541: sum the information entropy of each preset indicator to obtain the summed information entropy result.
[0086] Sub-step 20542: Calculate the weight of the information entropy of each preset indicator in the sum of the information entropies.
[0087] Sub-step 20543: Using the weight of the information entropy of each preset indicator, perform weighted summation on the load value of each node device in the candidate node devices after normalization of the preset indicator to obtain a score result for each node device in the candidate node devices.
[0088] Sub-step 20544: Select a node device from the candidate node devices as the target node device based on the scoring result.
[0089] For the above sub-steps 20541 to 20544, first, see the following formula to sum the information entropy of each preset indicator to obtain the sum of the information entropy, and calculate the weight of the information entropy of each preset indicator in the sum of the information entropy.
[0090]
[0091] in, represents the sum of the information entropy of the preset indicators, W j It represents the weight of the information entropy of the j-th preset indicator in the summation result.
[0092] Then, see the following formula, using the weight of the information entropy of each preset indicator, the load value of the preset indicator normalized for each node device in the node devices AF is weighted and summed to obtain the score result of each node device in the node devices AF.
[0093]
[0094] Among them, φ i Indicates the score result of the i-th node device.
[0095] The embodiment of the present invention selects a target node device from candidate node devices by using an entropy weight method, and the result is more objective.
[0096] Optionally, the method further includes:
[0097] Step 206: When there is no first edge node device whose load value satisfies the preset condition, obtain the load value of the central node device to which the edge node device belongs for the preset indicator.
[0098] See also Figure 1If the load values of edge node device 102 and edge node device 103 for the preset indicator do not meet the preset conditions, since the central node device to which edge node device 101 belongs is central node device 10, the load value of central node device 10 for the preset indicator is obtained. Since central node devices can generally centrally store and process large amounts of data and have strong processing capabilities, if the resources of edge node device 102 and edge node device 103 are insufficient, central node device 10 is given priority.
[0099] Optionally, step 206 may specifically include:
[0100] Sub-step 2061, sending a detection signal to the monitoring virtual machine in the central node device through a preset channel;
[0101] Sub-step 2062: receiving a feedback signal sent by the monitoring virtual machine in the central node device to obtain a load value of a preset indicator of the central node device.
[0102] For sub-steps 2061 and 2062, the preset channel is a channel generated by deploying a monitoring virtual machine and logically isolating it. Network links can be established between edge node devices and between edge node devices and central node devices, respectively. The detection signal can be a detection message, which usually includes several bits and is composed of an IPv6 address. Edge node devices maintain communication by sending detection messages through the monitoring virtual machine in the edge node device. Edge node devices and central node devices can also maintain communication by sending detection messages through the monitoring virtual machine in the edge node device and the central node device. The feedback signal can be a feedback message, which is composed of an IPv6 address. Figure 1 When the business needs to be migrated, the edge node device 101 sends a detection message to the monitoring virtual machine in the central node device 10. The monitoring virtual machine in the central node device 1 fills the load value of the central node device 10 for the preset indicator into the feedback message, and then sends a feedback message to the monitoring virtual machine in the edge node device 101 to obtain the load value of the preset indicator of the central node device 10.
[0103] Step 207: When the load value of the central node device for the preset indicator meets the preset condition, the central node device is used as the target node device.
[0104] In the embodiment of the present invention, see Figure 1 When the load value of the preset indicator of the central node device 10 meets the preset conditions, the central node device 10 is used as the target node device.
[0105] Optionally, the method further includes:
[0106] Step 208: When the load value of the central node device for the preset indicator does not meet the preset condition, obtain the load values of the plurality of second edge node devices connected to other central node devices for the preset indicator.
[0107] In the embodiment of the present invention, see Figure 1 Taking edge node device 101 as an example, multiple second edge node devices connected to other central node devices include edge node device 114 and edge node device 115. Since edge node device 114 and edge node device 115 are respectively deployed with monitoring virtual machines, the monitoring virtual machine of edge node device 114 can send the load value of edge node device 114 for a preset indicator to edge node device 101, and the monitoring virtual machine of edge node device 115 can send the load value of edge node device 115 for a preset indicator to edge node device 101. After edge node device 101 receives the load values of edge node device 114 and edge node device 115 for the preset indicators, it can determine the target node device based on the load value, thereby improving the availability of the task and ensuring the smooth operation of the task on edge node device 101.
[0108] Optionally, step 208 may specifically include:
[0109] Sub-step 2081, sending a detection signal to the monitoring virtual machines in the plurality of second edge node devices connected to the other central node devices through a preset channel;
[0110] Sub-step 2082: receiving feedback signals sent by monitoring virtual machines in multiple second edge node devices connected to other central node devices to obtain load values of preset indicators of the multiple second edge node devices connected to other central node devices.
[0111] For sub-steps 2081-2082, see Figure 1 , see Figure 1 When a service needs to be migrated, edge node device 101 sends a detection message to the monitoring virtual machines in edge node device 114 and edge node device 115, respectively. The monitoring virtual machine in edge node device 114 fills the load value of edge node device 4 for the preset indicator into the feedback message, and the monitoring virtual machine in edge node device 115 fills the load value of edge node device 115 for the preset indicator into the feedback message. Then, each of the three sends a feedback message to the monitoring virtual machine in edge node device 101. After edge node device 101 obtains the load values for the preset indicators of edge node device 114 and edge node device 115, it can select the optimal edge node device as the target node device based on the load values.
[0112] Step 209: Select a second edge node device whose load value meets a preset condition among the multiple second edge node devices as a candidate node device.
[0113] In the embodiment of the present invention, see Figure 1 The monitoring virtual machine in edge node device 101 determines whether the load values of edge node devices 114 and 115 meet preset conditions. If so, edge node devices 114 and 115 are selected as candidate node devices. This reduces the computational complexity of selecting a target node device from the candidate node devices.
[0114] Step 210: Select the target node device from the candidate node devices according to the entropy weight method.
[0115] This step may be specifically referred to the above step 205 and will not be described in detail here.
[0116] Optionally, the steps further include:
[0117] Step 211: When there is no second edge node device whose load value meets the preset condition, and the load values of other central node devices also do not meet the preset condition, a notification is issued that no node device meets the deployment requirement.
[0118] Step 212: When there is another central node device whose load value meets the preset condition, the other central node device is used as the target node device.
[0119] In the embodiment of the present invention, see Figure 1 If both edge node device 114 and edge node device 115 do not meet the preset conditions, and central node device 11 also does not meet the preset conditions, a notification is issued that no node device meets the deployment requirements. If both edge node device 114 and edge node device 115 do not meet the preset conditions, but central node device 11 does meet the preset conditions, central node device 11 is used as the target node device.
[0120] In the embodiment of the present invention, when a target task is received, the edge node device connected to the target task will first process it. When the load value of the edge node device for the preset indicator meets the preset conditions, the target task will be processed by the edge node device, thereby reducing the operational difficulty of task scheduling and reducing the task delay. In addition, when the load value of the edge node device for the preset indicator does not meet the preset conditions, the respective priorities of the target task and all tasks deployed by the edge node device are obtained, and the task to be migrated is selected from the target task and all tasks deployed by the edge node device based on the priority. The target node device is determined from multiple other node devices based on the load values of multiple other node devices for the preset indicators, and the task to be migrated is deployed on the target node device. When the node device resources are insufficient, a task migration solution is proposed, which can improve the availability of the task and ensure the smooth operation of the task.
[0121] Figure 5 This is a flow chart of a target node device selection method provided by an embodiment of the present invention.
[0122] See also Figure 5 , the method comprising:
[0123] Step T1: The edge node device processes the task and determines the load value of the preset indicator.
[0124] Step T2: Whether the load value of the preset indicator of the edge node device meets the preset condition.
[0125] Step T3: When the load value of the preset indicator of the edge node device meets the preset condition, the edge node device processes the task.
[0126] Step T4: When the load value of the preset indicator of the edge node device does not meet the preset condition, a detection message is sent to the monitoring virtual machines of other edge node devices and the central node device.
[0127] Step T5: Receive feedback messages sent by the monitoring virtual machines of other edge node devices and the central node device.
[0128] Step T6: The monitoring virtual machine of the edge node device comprehensively calculates the load value of the preset indicators of each node device.
[0129] Step T7: The monitoring virtual machine of the edge node device calculates the score results of each node device.
[0130] Step T8: Select the node device with the highest score as the target node device.
[0131] Figure 6 This is a flowchart of a task deployment provided by an embodiment of the present invention. Figure 6 , the method comprising:
[0132] Step M1: monitor the virtual machine to analyze whether the node device meets the preset conditions.
[0133] Step M2: When the node device meets the preset conditions, the node device deploys the service.
[0134] Step M3: If the node device does not meet the preset conditions, select a target node device and migrate the service according to the service priority.
[0135] Step M4: Deploy services on the target node device.
[0136] Figure 7 This is a flow chart of a task migration method provided by an embodiment of the present invention. Figure 7 , the method comprising:
[0137] Step N1: The current node device determines the priority of the target service and the priorities of all services deployed by the current node device.
[0138] Step N2: Compare the priorities of the target service with those of all services deployed on the current node device, and select the service with the lowest priority as the task to be migrated.
[0139] Step N3: The monitoring virtual machine of the current node device selects a target node device according to the entropy weight method.
[0140] Step N4: The monitoring virtual machine of the current node device determines the transmission path bandwidth and latency, and pre-deploys resources and networks for the service to be migrated.
[0141] Step N5: Migrate the task to be migrated and determine whether the task is running normally.
[0142] Step N6: If the task runs normally, release the resources and network of the original node device, and deploy the service to be migrated on the target node device.
[0143] Step N7: If a task execution error occurs, report the fault.
[0144] In the embodiment of the present invention, when a target task is received, the edge node device connected to the target task will first process it. When the load value of the edge node device for the preset indicator meets the preset conditions, the target task will be processed by the edge node device, thereby reducing the operational difficulty of task scheduling and reducing the task delay. In addition, when the load value of the edge node device for the preset indicator does not meet the preset conditions, the respective priorities of the target task and all tasks deployed by the edge node device are obtained, and the task to be migrated is selected from the target task and all tasks deployed by the edge node device based on the priority. The target node device is determined from multiple other node devices based on the load values of multiple other node devices for the preset indicators, and the task to be migrated is deployed on the target node device. When the node device resources are insufficient, a task migration solution is proposed, which can improve the availability of the task and ensure the smooth operation of the task.
[0145] Figure 8 : is a structural diagram of a task scheduling device provided by an embodiment of the present invention, which may include:
[0146] The first acquisition module 301 is configured to acquire a load value of the edge node device for a preset indicator when a target task is received;
[0147] A second acquisition module 302 is configured to, when the load value of the edge node device for the preset indicator does not meet a preset condition, obtain the respective priorities of the target task and all tasks deployed by the edge node device, and select a task to be migrated from the target task and all tasks deployed by the edge node device based on the priorities;
[0148] The third acquisition module 303 is used to obtain the load values of multiple other node devices for preset indicators, determine the target node device from the multiple other node devices based on the load values of the multiple other node devices for preset indicators, and deploy the task to be migrated on the target node device.
[0149] Optionally, the third acquisition module includes:
[0150] A first acquisition submodule is configured to acquire load values of a plurality of first edge node devices connected to the central node device to which the edge node device belongs, for a preset indicator;
[0151] A first selection submodule, configured to select, among the plurality of first edge node devices, a first edge node device whose load value meets a preset condition as a candidate node device;
[0152] The second selection submodule is configured to select a target node device from the candidate node devices according to an entropy weight method.
[0153] Optionally, the device further includes:
[0154] a fourth acquisition module, configured to acquire a load value of the central node device to which the edge node device belongs for a preset indicator when there is no first edge node device whose load value satisfies the preset condition;
[0155] The first selection module is configured to select the central node device as the target node device if the load value of the central node device for a preset indicator meets a preset condition.
[0156] Optionally, the device further includes:
[0157] a fifth acquisition module, configured to acquire, when the load value of the central node device for the preset indicator does not meet a preset condition, load values of a plurality of second edge node devices connected to other central node devices for the preset indicator;
[0158] A second selection module is configured to select, among the plurality of second edge node devices, a second edge node device whose load value meets a preset condition as a candidate node device;
[0159] The third selection module is configured to select the target node device from the candidate node devices according to the entropy weight method.
[0160] Optionally, the device further includes:
[0161] a notification module configured to issue a notification that no node device meets the deployment requirement when there is no second edge node device whose load value meets the preset condition and the load values of the other central node devices also do not meet the preset condition;
[0162] The fourth selection module is configured to select the other central node device as the target node device when there is another central node device whose load value satisfies a preset condition.
[0163] Optionally, the third selection module includes:
[0164] A normalization submodule, configured to perform normalization processing on the load values of the respective preset indicators of the candidate node devices to obtain the normalized load values of the respective preset indicators;
[0165] a summing submodule, configured to sum the load values after normalization of the preset indicators to obtain a summing result of the load values;
[0166] A first ratio calculation submodule, configured to calculate the ratio of the load value after normalization of each preset indicator to the sum of the load values;
[0167] The third selection submodule is used to calculate the information entropy of each of the preset indicators based on the ratio, and determine the target node device from the candidate node devices based on the information entropy of each of the preset indicators and the normalized load value of each of the preset indicators.
[0168] Optionally, the third selection submodule includes:
[0169] A summing unit, configured to sum the information entropy of each of the preset indicators to obtain a summed information entropy result;
[0170] A weight calculation unit, configured to calculate the weight of the information entropy of each of the preset indicators in the sum of the information entropies;
[0171] an obtaining unit, configured to perform weighted summation on the load value of each node device in the candidate node devices after normalization of the preset indicator using the weight of the information entropy of each preset indicator, to obtain a score result for each node device in the candidate node devices;
[0172] A selection unit is configured to select a node device from the candidate node devices as a target node device based on the scoring result.
[0173] Optionally, the device further includes:
[0174] A deployment module, configured to deploy monitoring virtual machines for the edge node device and the plurality of other node devices, respectively, to monitor load values of preset indicators of the edge node device and the plurality of other node devices;
[0175] The third acquisition module includes:
[0176] A sending submodule, configured to send a detection signal to the monitoring virtual machines in the plurality of other node devices through a preset channel;
[0177] The receiving submodule is configured to receive feedback signals sent by the monitoring virtual machines in the plurality of other node devices to obtain load values of preset indicators of the plurality of other node devices.
[0178] Optionally, the second acquisition module includes:
[0179] The fourth selection submodule is configured to select a task with a lower priority among the target task and all tasks already deployed by the edge node device as a task to be migrated.
[0180] Optionally, the device further includes:
[0181] a determination module, configured to determine the bandwidth and latency of the path between the edge node device and the target node device by a hard slicing method, and pre-deploy resources and network configuration of the task to be migrated on the target node device;
[0182] A migration module, configured to migrate the task to be migrated to the target node device if the load value of the preset indicator of the target node device meets a preset condition;
[0183] A release module, configured to release resources and network configuration on the edge node device when the task to be migrated runs normally;
[0184] The fault reporting module is used to report the fault when an error occurs in the running of the task to be migrated.
[0185] In the embodiment of the present invention, when a target task is received, the edge node device connected to the target task will first process it. When the load value of the edge node device for the preset indicator meets the preset conditions, the target task will be processed by the edge node device, thereby reducing the operational difficulty of task scheduling and reducing the task delay. In addition, when the load value of the edge node device for the preset indicator does not meet the preset conditions, the respective priorities of the target task and all tasks deployed by the edge node device are obtained, and the task to be migrated is selected from the target task and all tasks deployed by the edge node device based on the priority. The target node device is determined from multiple other node devices based on the load values of multiple other node devices for the preset indicators, and the task to be migrated is deployed on the target node device. When the node device resources are insufficient, a task migration solution is proposed, which can improve the availability of the task and ensure the smooth operation of the task.
[0186] The present invention also provides an electronic device, see Figure 9 , including: a processor 901, a memory 902, and a computer program 9021 stored in the memory and executable on the processor, wherein the processor implements the task scheduling method of the aforementioned embodiment when executing the program.
[0187] The present invention also provides a readable storage medium, which, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute the task scheduling method of the aforementioned embodiment.
[0188] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0189] It should be noted that the various information and data obtained in the embodiments of the present invention are all obtained with the authorization of the information / data holder.
[0190] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems may also be used in conjunction with the teachings herein. Based on the above description, it is apparent that the structure required for constructing such systems is sufficient. Furthermore, the present invention is not directed to any particular programming language. It should be understood that various programming languages may be utilized to implement the present invention described herein, and the description of specific languages above is provided for the purpose of disclosing the preferred embodiment of the present invention.
[0191] In the description provided herein, numerous specific details are described. However, it is understood that embodiments of the present invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.
[0192] Similarly, it should be understood that in order to streamline the present invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Accordingly, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of the present invention.
[0193] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition may be divided into multiple submodules or subunits or subcomponents. All features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed herein may be combined in any combination, except that at least some of such features and / or processes or units are mutually exclusive. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0194] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of the sorting device according to the present invention. The present invention may also be implemented as an apparatus or device program for performing a portion or all of the methods described herein. Such a program for implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0195] It should be noted that the above embodiments illustrate rather than limit the invention, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between brackets should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising several different elements and by means of appropriately programmed computers. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.
[0196] The user information (including but not limited to the user's device information, user personal information, etc.) and related data involved in the present invention are all information authorized by the user or authorized by all parties.
[0197] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0198] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
[0199] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A task scheduling method, characterized in that: Applied to any edge node device in the system; the method comprises: When receiving the target task, obtaining the load value of the edge node device for the preset indicator; When the load value of the edge node device for the preset indicator does not meet the preset condition, obtaining the respective priorities of the target task and all the tasks deployed by the edge node device, and selecting the task to be migrated from the target task and all the tasks deployed by the edge node device based on the priorities; Obtain load values of multiple other node devices for preset indicators, determine a target node device from the multiple other node devices based on the load values of the multiple other node devices for preset indicators, and deploy the task to be migrated on the target node device.
2. The method according to claim 1, characterized in that The acquiring load values of the plurality of other node devices for the preset indicator, and determining the target node device from the plurality of other node devices based on the load values of the plurality of other node devices for the preset indicator, comprises: Obtaining load values of a plurality of first edge node devices connected to a central node device to which the edge node device belongs for a preset indicator; Selecting, among the plurality of first edge node devices, a first edge node device whose load value meets a preset condition as a candidate node device; According to the entropy weight method, a target node device is selected from the candidate node devices.
3. The method according to claim 2, characterized in that The method further comprises: When there is no first edge node device whose load value satisfies the preset condition, obtaining the load value of the central node device to which the edge node device belongs for a preset indicator; When the load value of the central node device for the preset indicator meets the preset condition, the central node device is used as the target node device.
4. The method according to claim 3, characterized in that: The method further comprises: When the load value of the central node device for the preset indicator does not meet the preset condition, obtaining the load values of the preset indicators of multiple second edge node devices connected to other central node devices; Among the plurality of second edge node devices, a second edge node device whose load value meets a preset condition is selected as a candidate node device; According to the entropy weight method, the target node device is selected from the candidate node devices.
5. The method according to claim 4, characterized in that The method further comprises: When there is no second edge node device whose load value meets the preset condition, and the load values of the other central node devices also do not meet the preset condition, issuing a notification that no node device meets the deployment requirement; When there is one of the other central node devices whose load value meets a preset condition, the other central node device is used as the target node device.
6. The method according to claim 2 or 4, characterized in that: The step of selecting the target node device from the candidate node devices according to the entropy weight method includes: Normalizing the load values of the preset indicators of the candidate node devices respectively to obtain the normalized load values of the preset indicators; Sum the load values after normalization of the preset indicators to obtain a sum result of the load values; Calculate the ratio of the load value after normalization of each preset indicator to the sum of the load values; The information entropy of each of the preset indicators is calculated based on the ratio, and the target node device is determined from the candidate node devices based on the information entropy of each of the preset indicators and the normalized load value of each of the preset indicators.
7. The method according to claim 6, characterized in that The determining of the target node device from the candidate node devices based on the information entropy of each of the preset indicators and the load value after normalization of each of the preset indicators includes: Summing the information entropy of each of the preset indicators to obtain a summed result of the information entropy; Calculate the weight of the information entropy of each of the preset indicators in the sum of the information entropies; Using the weight of the information entropy of each of the preset indicators, weighted sum is performed on the load value of the preset indicator normalized for each node device in the candidate node devices to obtain a score result for each node device in the candidate node devices; A node device is selected from the candidate node devices as a target node device based on the scoring result.
8. The method according to claim 1, characterized in that Before acquiring the load value of the edge node device for the preset indicator when receiving the target task, the method further includes: Deploy monitoring virtual machines for the edge node device and the plurality of other node devices respectively to monitor load values of preset indicators of the edge node device and the plurality of other node devices; The obtaining of load values of a plurality of other node devices for preset indicators includes: Sending a detection signal to the monitoring virtual machines in the plurality of other node devices through a preset channel; Receive feedback signals sent by monitoring virtual machines in the multiple other node devices to obtain load values of preset indicators of the multiple other node devices.
9. The method according to claim 1, characterized in that: The selecting the task to be migrated from the target task and all the tasks deployed by the edge node device based on the priority includes: The target task and the tasks already deployed by the edge node device are used as tasks to be migrated.
10. The method according to claim 1, characterized in that Before deploying the task to be migrated on the target node device, the method further includes: Determine the bandwidth and latency of the path between the edge node device and the target node device by hard slicing, and pre-deploy the resources and network configuration of the task to be migrated on the target node device; When the load value of the preset indicator of the target node device meets the preset condition, migrating the task to be migrated to the target node device; When the task to be migrated runs normally, releasing resources and network configuration on the edge node device; In the event of an error in the running of the task to be migrated, a fault is reported.
11. A task scheduling device, characterized in that: The device comprises: A first acquisition module is used to acquire a load value of the edge node device for a preset indicator when receiving a target task; A second acquisition module is used to obtain the respective priorities of the target task and all the tasks deployed by the edge node device when the load value of the edge node device for the preset indicator does not meet the preset condition, and select the task to be migrated from the target task and all the tasks deployed by the edge node device based on the priority; The third acquisition module is used to obtain the load values of multiple other node devices for preset indicators, determine the target node device from the multiple other node devices based on the load values of the multiple other node devices for the preset indicators, and deploy the task to be migrated on the target node device.
12. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 10 when executing the program.
13. A readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute any one of the methods described in claims 1-10.