Task execution method and device, electronic equipment and storage medium
By dynamically evaluating the load information of dependent tasks and service resources, the allocation of service resources to the computing nodes with the least load is optimized, solving the problem that dependent tasks cannot find service resources, achieving efficient task execution and load balancing, and reducing latency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- PENG CHENG LAB
- Filing Date
- 2026-03-19
- Publication Date
- 2026-07-21
AI Technical Summary
When computing nodes have limited memory and storage, dependent tasks cannot find the required service resources, resulting in low task execution efficiency and the need to find computing nodes again, which affects the system's real-time performance and security.
By acquiring load information of dependent tasks and service resources, the parallelism and load of service resources are dynamically determined. Service resources are prioritized for allocation to the computing nodes with the least load, and dependent tasks are allocated only after all service resources are deployed, ensuring that tasks are executed efficiently on the nodes that require the service resources.
It significantly reduces the overhead of finding new computing nodes due to a lack of service resources, improves the rationality of service resource deployment and node load balancing, reduces task scheduling latency, and improves task execution efficiency.
Smart Images

Figure CN122431859A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of task scheduling and processing technology, specifically to a task execution method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the rapid proliferation of IoT devices, the demand for low-latency applications such as augmented reality and autonomous driving has surged. As a new generation of computing infrastructure, computing power networks handle multiple dependent tasks by building a multi-layered computing power collaboration system between the cloud, edge, and device. Dependent tasks refer to tasks whose execution depends on the completion of other tasks or whose processing results can serve as a prerequisite for the execution of other tasks. Furthermore, dependent tasks require the assistance of relevant service resources to complete their execution.
[0003] In related technologies, all service resources are deployed on each computing node to ensure that tasks can be scheduled to execute on any computing node, and multiple dependent tasks are scheduled based on this. However, in practical applications, the memory and storage of computing nodes are usually limited, making it impossible to cache all service resources. When the relevant service resources are not found on the computing node assigned to a task, it is necessary to find the correct computing node for it, resulting in low task execution efficiency. Summary of the Invention
[0004] This application provides a task execution method, apparatus, electronic device, and storage medium that can improve task execution efficiency.
[0005] To achieve the above objectives, one embodiment of this application provides a task execution method, including: Get multiple dependent tasks and multiple service resources to be assigned, and get the task resource requirements and task load of each dependent task; Based on the task resource requirements and task load of each dependent task, the service load of each service resource and the parallelism of multiple services are determined. The target service resource is determined from multiple service resources to be allocated based on the service load of each service resource, and the current service allocation status of multiple computing nodes is obtained. Based on the current service allocation status, the service load of the target service resource, and the parallelism of multiple services of the target service resource, determine the estimated node load corresponding to the target service resource allocated to each computing node; Among multiple computing nodes, the target service resources are allocated to the computing node with the lowest estimated load, and the current service allocation status is updated. Return to the execution of the steps to determine the target service resource from multiple service resources to be allocated based on the service load of each service resource, until each service resource is deployed on the corresponding computing node, and assign each dependent task to the target computing node where the associated service resource is located to execute each dependent task.
[0006] In some embodiments, based on the task resource requirements and task load of each dependent task, multiple service parallelisms for each service resource are determined, including: Determine the processing level for each dependent task; For each service resource, based on the task resource requirements and processing level of each dependent task, determine the degree of hierarchical resource competition between the service resource and each other service resource, and determine the overall degree of resource competition between the service resource and all other service resources; For each service resource, the degree of service parallelism between the service resource and each other is determined based on the degree of competition for resources at different levels and the overall degree of competition for resources, so as to obtain multiple degrees of service parallelism for each service resource.
[0007] In some embodiments, allocating target service resources to the computing node with the lowest estimated node load among multiple computing nodes includes: Obtain the minimum task load and the node memory capacity of each compute node; Based on the task load of each dependent task, the service load of each service resource, the node memory capacity of each computing node, and the minimum task load, determine the service deployment ratio coefficient corresponding to each service resource. The maximum number of deployments for each service resource is determined based on its service load, service deployment ratio, and minimum task load. Among multiple computing nodes, the target service resources are allocated to the computing node with the lowest estimated load, based on the maximum number of deployments corresponding to the target service resources.
[0008] In some embodiments, each dependent task is assigned to the target compute node where the associated service resource resides to execute each dependent task, including: The initial scheduling scheme is determined based on the dependencies between all dependent tasks; For each scheduling scheme, determine the target estimated completion time for each dependent task under the scheduling scheme, and determine the total task completion time corresponding to the scheduling scheme based on the target estimated completion time for each dependent task. Based on the scheduling scheme, the updated scheduling scheme is determined, and the total task completion time corresponding to the execution of all dependent tasks under the updated scheduling scheme is determined. Return to the step of determining the updated scheduling scheme based on the scheduling scheme, until the preset iteration termination condition is reached, and select the shortest one from multiple total task completion times as the target completion time; Based on the scheduling scheme corresponding to the target completion time, each dependent task is sequentially assigned to the target computing node where the associated service resource is located to execute each dependent task.
[0009] In some embodiments, determining the target estimated completion time for each dependent task under the scheduling scheme includes: For each dependent task, based on the task resource requirements of the dependent task, multiple candidate computing nodes are identified from multiple computing nodes that have deployed service resources related to the dependent task. Determine the scheduling priority of each dependent task, and determine the target dependent task from multiple dependent tasks based on the scheduling priority; Determine the estimated completion time of the target-dependent task on each candidate computing node, and select the shortest estimated completion time from multiple estimated completion times as the target estimated completion time for the dependent task, so as to obtain the target estimated completion time for each dependent task under the scheduling scheme.
[0010] In some embodiments, determining an updated scheduling scheme based on a scheduling scheme includes: Obtain genetic operators; Based on the genetic operation operators, the dependent tasks whose task order remains unchanged are identified from the scheduling scheme as the first dependent tasks; From the scheduling scheme, all dependent tasks other than the first dependent tasks are identified as second dependent tasks, and the update order of each first dependent task and each second dependent task is determined according to the genetic operation operator; The updated scheduling scheme is obtained by arranging the corresponding dependent tasks according to the update order of each dependent task.
[0011] In some embodiments, each dependent task is sequentially assigned to the target computing node where the associated service resource resides to execute each dependent task, including: For each dependent task, from the multiple candidate computing nodes corresponding to the dependent task, the candidate computing node with the shortest estimated completion time is selected as the target computing node corresponding to the dependent task, and the target dependent task is assigned to the target computing node; Each dependent task is executed when it is assigned to the corresponding target computing node.
[0012] In some embodiments, an initial scheduling scheme is determined based on the dependencies between all dependent tasks, including: For each compute node, determine the level of service resource contention for each service resource deployed on that compute node; Obtain the constraint priority of each dependent task, and determine the scheduling priority of each dependent task based on the service resource contention level of each service resource and the constraint priority corresponding to each dependent task. The original scheduling scheme is determined based on the scheduling priority of each dependent task; At least one random scheduling scheme is randomly generated based on the dependencies between all dependent tasks, and an initial scheduling scheme is determined from the original scheduling scheme and at least one random scheduling scheme.
[0013] In some embodiments, obtaining the constraint priority of each dependent task includes: From multiple dependent tasks, determine the successor task of each dependent task and obtain the successor priority of each dependent task's successor task. For each dependent task, obtain the data transfer time between the dependent task and its successor task; The constraint priority of each dependent task is determined based on the successor priority and data transmission time.
[0014] In some embodiments, determining the estimated completion time of a goal-dependent task on each candidate computing node includes: From multiple dependent tasks, identify the predecessor task of the target dependent task and obtain the earliest idle time of the predecessor task of the target dependent task; Based on the earliest idle time of the task, determine the earliest start time of the target-dependent task to be deployed on each candidate computing node; Obtain the node computing power resources of each candidate computing node, and determine the latest start time of the target-dependent task deployed on each candidate computing node based on the node computing power resources and the earliest start time of the task. Identify the parallel tasks for the target-dependent task and obtain the execution time of each parallel task; Based on the node computing power resources, the degree of competition for service resources of each service resource, the task resource requirements and task load of each dependent task, the parallel impact time of the target dependent task deployed on each candidate computing node is determined. Based on the latest start time of the task and the parallel impact time of the task, the estimated completion time of the target-dependent task is determined for deployment on each candidate computing node.
[0015] To achieve the above objectives, one embodiment of this application provides a task execution apparatus, including: The acquisition module is used to acquire multiple dependent tasks and multiple service resources to be assigned, and to acquire the task resource requirements and task load of each dependent task. The service resource information determination module is used to determine the service load and parallelism of each service resource based on the task resource requirements and task load of each dependent task. The target service resource determination module is used to determine the target service resource from multiple service resources to be allocated based on the service load of each service resource, and to obtain the current service allocation status of multiple computing nodes. The node load estimation module is used to determine the node load estimation of the target service resource allocated to each computing node based on the current service allocation status, the service load of the target service resource, and the parallelism of multiple services of the target service resource. The service resource allocation module is used to allocate target service resources to the computing node with the lowest estimated load among multiple computing nodes and update the current service allocation status. The task execution module is used to return the steps of determining the target service resource from multiple service resources to be allocated based on the service load of each service resource, until each service resource is deployed on the corresponding computing node, and to allocate each dependent task to the target computing node where the associated service resource is located, so as to execute each dependent task.
[0016] To achieve the above objectives, one aspect of this application provides a computer-readable storage medium storing multiple instructions adapted for loading by a processor to execute steps in the task execution method or image anomaly detection method provided in this application.
[0017] To achieve the above objectives, one aspect of this application provides a computer device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the processor executes the computer program, it implements the steps in the task execution method or image anomaly detection method provided in this application.
[0018] To achieve the above objectives, one aspect of this application provides a computer program product, including a computer program or instructions, which, when executed by a processor, implement the steps in the task execution method or image anomaly detection method provided in this application.
[0019] The task execution method, apparatus, electronic device, and storage medium proposed in this application acquire multiple dependent tasks and multiple service resources to be allocated, and acquire the task resource requirements and task load of each dependent task; determine the service load and multiple service parallelisms of each service resource based on the task resource requirements and task load of each dependent task; determine the target service resource from the multiple service resources to be allocated based on the service load of each service resource, and acquire the current service allocation status of multiple computing nodes; determine the node estimated load corresponding to the target service resource allocated to each computing node based on the current service allocation status, the service load of the target service resource, and the multiple service parallelisms of the target service resource; allocate the target service resource to the computing node with the smallest node estimated load among the multiple computing nodes, and update the current service allocation status; return to the step of determining the target service resource from the multiple service resources to be allocated based on the service load of each service resource, until each service resource is deployed on the corresponding computing node, and allocate each dependent task to the target computing node where the associated service resource is located to execute each dependent task.
[0020] This application embodiment dynamically derives the service load and parallelism of each service resource by considering the task resource requirements and task load of each dependent task. This allows for the determination of the estimated node load on which each service load is deployed based on the service load and parallelism, prioritizing the allocation of service resources to the computing nodes with the lowest load. Only after all service resources have been deployed to their corresponding target computing nodes is the allocation of each dependent task considered. Thus, even when a node cannot deploy all service resources, this application embodiment significantly reduces the overhead of related tasks needing to find new computing nodes due to missing service resources. This not only improves the rationality of service resource deployment and node load balancing but also ensures that dependent tasks can be efficiently executed on the nodes containing their required service resources, thereby significantly reducing task scheduling latency and improving task execution efficiency.
[0021] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the description, claims and drawings. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a schematic diagram of the system framework corresponding to the task execution method provided in the embodiments of this application; Figure 2 This is a flowchart illustrating the task execution method provided in an embodiment of this application; Figure 3 This is a schematic diagram of the overall data processing flow of the task execution method provided in the embodiments of this application; Figure 4 This is a service deployment flowchart of the task execution method provided in the embodiments of this application; Figure 5 This is a schematic diagram of an initial scheduling scheme for the task execution method provided in this application embodiment; Figure 6 This is a schematic diagram illustrating the generation of an updated scheduling scheme for the task execution method provided in this application embodiment; Figure 7 This is a schematic diagram illustrating another updated scheduling scheme generation method for the task execution method provided in this application embodiment; Figure 8 This is a schematic diagram illustrating another updated scheduling scheme generation method for the task execution method provided in this application embodiment; Figure 9 This is a task allocation flowchart of the task execution method provided in the embodiments of this application; Figure 10 This is a schematic diagram of the module structure of the task execution device provided in the embodiments of this application; Figure 11 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0024] To enable those skilled in the art to better understand the solutions of this application, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0025] It should be noted that in various specific embodiments of this application, when it is necessary to obtain multiple dependent tasks and multiple service resources to be assigned, permission or consent from the relevant personnel managing the dependent tasks and service resources will be obtained first. Furthermore, the collection, use, and processing of this data will comply with relevant laws, regulations, and standards. In addition, when this application embodiment needs to obtain sensitive personal information of relevant personnel, separate permission or consent from the relevant personnel will be obtained through pop-ups or redirection to a confirmation page. Only after obtaining the separate permission or consent of the relevant personnel will the necessary dependent tasks and service resources for the normal operation of this application embodiment be obtained. Other data obtained in this application embodiment are all authorized and legal data, and will not be described in detail here.
[0026] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, programmable consumer computer devices, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0027] The technical problems existing in the related technologies are as follows: With the rapid proliferation of IoT devices, the demand for low-latency applications such as augmented reality and autonomous driving has surged. As a new generation of computing infrastructure, computing power networks handle multiple dependent tasks by building a multi-layered computing power collaboration system between the cloud, edge, and device. Dependent tasks refer to tasks whose execution depends on the completion of other tasks or whose processing results can serve as a prerequisite for the execution of other tasks. Furthermore, dependent tasks require the assistance of relevant service resources to complete their execution.
[0028] In related technologies, all service resources are deployed on each computing node to ensure that tasks can be scheduled to execute on any computing node, and multiple dependent tasks are scheduled based on this. However, in practical applications, the memory and storage of computing nodes are usually limited, making it impossible to cache all service resources. When the relevant service resources are not found on the computing node assigned to a task, it is necessary to find the correct computing node for it, resulting in low task execution efficiency.
[0029] For example, users can deploy autonomous driving perception and decision-making task chains in intelligent transportation systems. The output of the object detection task serves as the input to the path planning task, and the path planning result, in turn, serves as a prerequisite for generating vehicle control commands, forming a typical dependent task sequence. These tasks require specific service resources (such as high-precision map services, sensor fusion modules, and decision engines) to execute. However, if all service resources are redundantly deployed on each edge node or onboard computing unit using traditional methods, it is often difficult to achieve due to limitations in the memory and storage capacity of onboard devices or edge servers. Once the scheduler assigns a task to a node lacking corresponding service resources, the relevant system has to interrupt execution, search for available nodes again, and migrate the task, causing critical path delays and severely impacting the real-time performance and safety of the autonomous driving system.
[0030] The task execution method, apparatus, electronic device, and storage medium proposed in this application acquire multiple dependent tasks and multiple service resources to be allocated, and acquire the task resource requirements and task load of each dependent task; determine the service load and multiple service parallelisms of each service resource based on the task resource requirements and task load of each dependent task; determine the target service resource from the multiple service resources to be allocated based on the service load of each service resource, and acquire the current service allocation status of multiple computing nodes; determine the node estimated load corresponding to the target service resource allocated to each computing node based on the current service allocation status, the service load of the target service resource, and the multiple service parallelisms of the target service resource; allocate the target service resource to the computing node with the smallest node estimated load among the multiple computing nodes, and update the current service allocation status; return to the step of determining the target service resource from the multiple service resources to be allocated based on the service load of each service resource, until each service resource is deployed on the corresponding computing node, and allocate each dependent task to the target computing node where the associated service resource is located to execute each dependent task.
[0031] This application embodiment dynamically derives the service load and parallelism of each service resource by considering the task resource requirements and task load of each dependent task. This allows for the determination of the estimated node load on which each service load is deployed based on the service load and parallelism, prioritizing the allocation of service resources to the computing nodes with the lowest load. Only after all service resources have been deployed to their corresponding target computing nodes is the allocation of each dependent task considered. Thus, even when a node cannot deploy all service resources, this application embodiment significantly reduces the overhead of related tasks needing to find new computing nodes due to missing service resources. This not only improves the rationality of service resource deployment and node load balancing but also ensures that dependent tasks can be efficiently executed on the nodes containing their required service resources, thereby significantly reducing task scheduling latency and improving task execution efficiency.
[0032] The specific details regarding the task execution method, apparatus, electronic device, and storage medium provided in the embodiments of this application will be described in detail below.
[0033] Please see Figure 1 , Figure 1 This is a schematic diagram of the system framework corresponding to the task execution method provided in the embodiments of this application. The task execution method provided in the embodiments of this application can be applied to this system framework.
[0034] It includes terminal 140, Internet 130, gateway 120, server 110, etc.
[0035] Terminal 140 or server 110 can be a device that executes a task execution method.
[0036] Terminal 140 includes, but is not limited to, mobile phones, tablets, computers, and intelligent computing centers. Terminal 140 can be a single device or a collection of multiple devices. For example, multiple computers can be interconnected via a local area network, sharing a single monitor to work collaboratively, thus forming a terminal 140. Terminal 140 can communicate with the Internet 130 via wired or wireless means to exchange data.
[0037] Server 110 refers to a computer system that can provide certain services to terminal 140. Compared to ordinary terminal 140, server 110 has higher requirements in terms of stability, security, and performance. Server 110 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0038] Gateway 120, also known as an internetwork connector or protocol converter, is a computer system or device that acts as a translator, enabling network interconnection at the transport layer. It bridges the gap between two systems using different communication protocols, data formats, languages, or even completely different architectures. Gateways can also provide filtering and security functions. Messages sent from terminal 140 to server 110 are forwarded to the corresponding server 110 via gateway 120. Messages sent from server 110 to terminal 140 are also forwarded to the corresponding terminal 140 via gateway 120.
[0039] The embodiments of this application can be applied to various scenarios, such as industrial IoT, augmented reality, autonomous driving, etc. This is only an example and does not mean that the embodiments of this application limit the scenarios in which the task execution method is applied.
[0040] Next, we will describe it from the perspective of the task execution device, such as... Figure 2 As shown, Figure 2 This is a flowchart illustrating the task execution method provided in an embodiment of this application. The task execution method is applied to a task execution device. Figure 2 The method may include, but is not limited to, the following steps 210 to 260. When the task execution device executes the task execution method, the specific process is as follows. It should be noted first that this embodiment... Figure 2 The order of steps 210 to 260 is not specifically limited. The order of steps can be adjusted or some steps can be reduced or added according to actual needs.
[0041] Step 210: Obtain multiple dependent tasks and multiple service resources to be assigned, and obtain the task resource requirements and task load of each dependent task; Step 220: Based on the task resource requirements and task load of each dependent task, determine the service load of each service resource and the parallelism of multiple services. Step 230: Determine the target service resource from the multiple service resources to be allocated based on the service load of each service resource, and obtain the current service allocation status of multiple computing nodes; Step 240: Based on the current service allocation status, the service load of the target service resource, and the parallelism of multiple services of the target service resource, determine the estimated node load corresponding to the target service resource allocated to each computing node. Step 250: Among multiple computing nodes, allocate the target service resources to the computing node with the lowest estimated node load and update the current service allocation status. Step 260: Return to the step of determining the target service resource from the multiple service resources to be allocated based on the service load of each service resource, until each service resource is deployed on the corresponding computing node, and assign each dependent task to the target computing node where the associated service resource is located to execute each dependent task.
[0042] Steps 210 to 260 are described in detail below.
[0043] In step 210, multiple dependent tasks and multiple service resources to be allocated are obtained, and the task resource requirements and task load of each dependent task are obtained.
[0044] Among them, dependent tasks (which can also be simply referred to as "tasks" for ease of description) refer to a type of task whose execution depends on the completion results of other tasks, or whose output results can serve as a prerequisite for the execution of other tasks. These tasks usually form a task flow in the form of a directed acyclic graph (DAG). For example, in an autonomous driving system, the output of the object detection task is the input of the path planning task. In this case, both the object detection task and the path planning task are dependent tasks. The object detection task is a prerequisite task for the path planning task, and the path planning task is a successor task for the object detection task. If the prerequisite task is not completed or its result is unavailable, the subsequent dependent task cannot be started.
[0045] In this context, service resources (hereinafter referred to as "services" for ease of description) refer to software components, models, algorithm modules, or microservice instances necessary to perform a specific function or task. They typically exist on computing nodes in a deployable and invokeable form. For example, in video analytics scenarios, face recognition services, behavior recognition engines, or language understanding interfaces are all allocable service resources. Dependent tasks can only be executed on computing nodes (hereinafter referred to as "nodes") where the required service resources are deployed. The absence of service resources will cause tasks to be unschedulable or fail to execute.
[0046] Here, task resource requirements refer to the types of service resources that a dependent task requires from the computing environment to execute. For example, a dependent task 'a' requires service resource A to execute. The service resources required by a dependent task are set according to the actual situation; this is only an example and does not represent a limitation imposed by this application's embodiments.
[0047] Task load refers to a quantitative indicator of the degree of computational resource consumption (such as CPU, GPU, memory, bandwidth, etc.) or processing complexity of each dependent task during execution. Task load reflects the time, computing power, or energy consumption required for task execution. For example, a target detection task on a high-resolution image has a higher task load than a similar task on a low-resolution image. Task load not only affects the execution latency of individual tasks but also indirectly affects the overall service load assessment of its associated service resources through the reuse relationships of service resources.
[0048] To facilitate reader understanding, such as Figure 3 As shown, Figure 3 This is a schematic diagram of the overall data processing flow of the task execution method provided in the embodiments of this application. The embodiments of this application use... Figure 3 For illustrative purposes, further explanation is provided throughout the full specification. The relevant definition during task execution is: the workload is periodically collected by the application aggregator in the decision controller. A batch of dependent applications collected by the application aggregator is represented as... , This represents the total number of dependent applications. Each dependent application can be represented as... ,in This indicates each task in the dependency task. The workload size for this task. Indicates whether the task requires service. . Indicates dependent tasks The set of directed edges in the , for , for The predecessor task, for The next task, Indicates task Transmit to task The amount of data. and This is used to represent a task. The set of all predecessor and successor tasks. Parameters with the same meaning are interpreted the same way in this article; repeated instances will not be repeated.
[0049] Furthermore, such as Figure 3 As shown, there are currently two dependent applications and three service resources awaiting allocation. , , Each dependent application includes multiple dependent tasks; the tablet has one dependent application to be executed, which includes multiple dependent tasks. , , , ,in, , It supports parallel processing; simultaneously, there is a dependent application on the mobile device to be executed, which includes multiple dependent tasks. , , ,in, , Supports parallel processing. Figure 3 The colors in the diagram visually represent the resource requirements of each dependent task. For example, dependent tasks... and They all need to be allocated to the deployment of service resources. On the computing nodes.
[0050] In step 220, the service load and multiple service parallelisms of each service resource are determined based on the task resource requirements and task load of each dependent task.
[0051] Service load refers to the overall computational pressure or workload that each service resource needs to bear under the expected task scheduling. It is calculated based on the task load of all dependent tasks that rely on that service resource. For example, if multiple tasks need to call the face recognition service, and these tasks themselves are computationally intensive and executed frequently, then the service load of that service resource will be high. Service load will serve as an important basis for subsequently assessing whether the corresponding service resource is overloaded or suitable for deployment on a certain computing node.
[0052] Service parallelism refers to the degree of parallelism between each service resource and any other service resource besides itself. Multiple service parallelism values are obtained by evaluating the degree of parallelism between each service resource and any other service resource besides itself. Service parallelism can then be used as the basis for subsequent allocation of various service resources.
[0053] In some embodiments, the service load of each service resource is determined using the following formula. : During the deployment of service resources, the task execution device will prioritize deploying high-load service resources on computing nodes with stronger computing performance in order to improve the overall resource utilization of multiple computing nodes.
[0054] It is understandable that, compared to the rough estimation or static configuration of service resource usage in traditional methods, the embodiments of this application can dynamically and accurately assess the actual load of each service resource. Furthermore, the embodiments of this application also consider the degree of parallelism between each service resource and other service resources, so that when allocating service resources later, two service resources with high parallelism are allocated to different computing nodes, thereby avoiding strong resource contention caused by deploying two service resources with high parallelism to the same computing node.
[0055] In some embodiments, based on the task resource requirements and task load of each dependent task, multiple service parallelisms for each service resource are determined, including: (1.1) Determine the processing level for each dependent task; (1.2) For each service resource, based on the task resource requirements and processing level of each dependent task, determine the degree of hierarchical resource competition between the service resource and each other service resource, and determine the overall degree of resource competition between the service resource and all other service resources; (1.3) For each service resource, the service parallelism between the service resource and each other service resource is determined according to the degree of competition of hierarchical resources and the overall degree of competition of resources, so as to obtain multiple service parallelisms for each service resource.
[0056] In some embodiments, the processing level of each dependent task is defined by the following formula. : .like Figure 3 As shown, and These are all entry-level tasks, with a processing level of 1; for example... , , ,and The processing levels are all 2; the task set at the same level is The highest level is denoted as The core idea of service resource deployment is to distribute the services required by tasks at the same level across different computing nodes to improve the parallel execution capability of tasks.
[0057] Furthermore, the degree of hierarchical resource competition between each service resource and every other service resource is determined using the following formula. : .in, Indicates the current service resources; This represents any service resource other than the currently used service resource; and Belonging to the same processing level When the same layer depends and The greater the number of tasks and the greater the workload, the better. The larger the value, the better. At the tier level, the two services have a higher degree of parallelism.
[0058] Furthermore, the service parallelism between the service resource and each other service resource is determined by the following formula. : This indicates the overall level of resource competition between the current service resource and all other service resources. The larger the value, the better. and They should be distributed across different computing nodes to improve the parallelism of task processing.
[0059] Furthermore, the service parallelism between the current service resource and every other service resource is calculated to obtain multiple service parallelisms for each service resource.
[0060] It is understood that the embodiments of this application determine the service parallelism by evaluating the mutual influence between service resources, providing a more accurate basis for subsequent deployment of service resources. Thus, the embodiments of this application avoid resource conflicts of computing nodes caused by ignoring task execution levels during service resource allocation, significantly improving the resource coordination efficiency, system stability, and task execution efficiency of the computing network when scheduling complex dependent tasks.
[0061] In step 230, the target service resource is determined from the multiple service resources to be allocated based on the service load of each service resource, and the current service allocation status of multiple computing nodes is obtained.
[0062] In this context, the target service resource refers to the service resource that is prioritized for deployment and allocation in the current scheduling round based on its service load. In this embodiment, the service resource with the highest service load is selected as the target service resource from among multiple service resources to ensure that high-load service resources are deployed first. The target service resource is dynamically determined and updated after each allocation round until all service resources have been deployed.
[0063] The current service allocation status refers to the real-time distribution of service resources deployed on each compute node, including information such as which service resources are currently running on each compute node and the number of instances of each service resource. For example, the current service allocation status could be: compute node and Service resources have been deployed in all of them. The remaining computing nodes have not yet deployed service resources.
[0064] In step 240, based on the current service allocation status, the service load of the target service resource, and the parallelism of multiple services of the target service resource, the estimated node load corresponding to the target service resource allocated to each computing node is determined.
[0065] Among them, the node estimated load refers to the resource burden that a node is expected to bear after the target service resource is deployed to a certain computing node. The node estimated load is estimated by combining the current service allocation status, the service load of the target service resource itself, and the parallelism generated by the deployment of the service resource to the node.
[0066] Furthermore, the estimated node load corresponding to the allocation of target service resources to each computing node is determined using the following formula. : .in, This represents the nth compute node, where n = 1, 2, ..., n...N; if the current service resources are deployed to this compute node, then the corresponding variable is set. =1, The load can be determined from the current service allocation status; the node estimated load is calculated based on the current service allocation status, the service load of the target service resource, and is supplemented by the service parallelism. The modifications are made to ensure that while achieving load balancing, service resources with higher parallelism can be distributed across different computing nodes.
[0067] In step 250, among multiple computing nodes, the target service resources are allocated to the computing node with the lowest estimated node load, and the current service allocation status is updated.
[0068] In some embodiments, after determining the estimated load of the node corresponding to the target service resource allocation to each computing node, the target service resource can be allocated from multiple computing nodes to the computing node with the smallest estimated load, and the current service allocation status can be updated so that subsequent scheduling decisions can achieve a more balanced distribution of service resource load based on the latest resource usage.
[0069] In some embodiments, allocating target service resources to the computing node with the lowest estimated node load among multiple computing nodes includes: (2.1) Obtain the minimum task load and the node memory capacity of each computing node; (2.2) Determine the service deployment ratio coefficient corresponding to each service resource based on the task load of each dependent task, the service load of each service resource, the node memory capacity of each computing node, and the minimum task load; (2.3) Determine the maximum number of deployments for each service resource based on its service load, service deployment ratio coefficient, and minimum task load. (2.4) Among multiple computing nodes, the target service resources are allocated to the computing node with the lowest estimated load based on the maximum number of deployments corresponding to the target service resources.
[0070] In some embodiments, computing nodes will deploy as many service resources as possible, provided their node resources allow. However, to avoid concentrating high-load service resources on a few computing nodes, the task execution device will also consider the maximum deployment quantity for each service resource each time it is deployed. That is, each service resource is deployed at least once, and the maximum number of deployments in the computing network is limited to the corresponding maximum deployment quantity; for example, service resources... The maximum number of deployments is 2, so the service resources... It may be deployed once or twice in a computing network.
[0071] Furthermore, the service deployment ratio coefficient corresponding to each service resource is determined using the following formula. : .in, Represents the set of compute nodes; Indicates the minimum task load; This represents the node memory capacity of each compute node; Indicates service resources The size of the corresponding computing node memory occupied after deployment.
[0072] Furthermore, the maximum number of deployments (Number) corresponding to each service resource is determined using the following formula: Number≤ .
[0073] In other words, the maximum number of deployments corresponding to each service resource shall not exceed [number missing]. When deploying various service resources, first determine whether the current number of service resources has reached the maximum allowed deployment quantity. If so, do not deploy that service resource again.
[0074] In step 260, the process returns to the step of determining the target service resource from the multiple service resources to be allocated based on the service load of each service resource, until each service resource is deployed on the corresponding computing node, and each dependent task is assigned to the target computing node where the associated service resource is located to execute each dependent task.
[0075] In some embodiments, an iterative scheduling mechanism is employed. Each time, a target service resource is dynamically selected from the pool of service resources to be allocated based on its service load, and deployed to a suitable computing node. This process is repeated until all service resources have been deployed. Then, each dependent task is scheduled to execute on the target computing node where its associated service resource resides. The target computing node where the associated service resource resides refers to the computing node where the service resource required by the currently scheduled dependent task is located, such as... Figure 3 As shown, dependency tasks Service resources needed The service can only be executed with the participation of all service resources. After the deployment of all service resources is completed, it can be found that the service resources... Deployed on compute nodes and Above, then compute nodes and Both are related to dependency tasks Related service resources The target computing node it is located on.
[0076] To facilitate reader understanding, such as Figure 4 As shown, Figure 4 This is a service deployment flowchart of the task execution method provided in this application embodiment, which provides a complete example of the deployment of multiple service resources: (1) First, based on the application information provided by the application aggregator, calculate the service load of each service resource. Service deployment ratio coefficient for each service resource Degree of competition for resources at different levels Service parallelism ; (2) Create a list of all service resources. s And sort all service resources in descending order according to their TW values, that is, prioritize the service resources with larger total workloads. (3) Check if the service list is empty; if so, end the process; otherwise, initialize the loop variable and set the index i=1 to traverse the sorted service list to determine if the current index is less than or equal to the list length; if i≤|List s If the list is empty, continue processing the current service; otherwise, re-evaluate whether the list is empty. (4) Retrieve List s [i] corresponds to the service s k ; (5) Computing services k The expected weight EW[n] is deployed on each computing node; (6) From multiple computing nodes, select the computing node r with the smallest expected weight EW that has no service sk and meets the capacity requirements. n ; (7) Determine whether there exists a computation node r that satisfies the conditions. n If it does not exist, then service s will be provided. k From List s Delete (this may indicate that deployment is not possible or will not be processed temporarily); if it exists, determine the service s. k Will be deployed on compute node r n ; (8) Update compute node r n The service deployment status is updated, and the compute node r is updated. n Node memory capacity; (9) Based on the service deployment ratio coefficient Judgment Service s k Has the deployment limit been reached? If the deployment limit has been reached, then select from the List. s Delete the service; otherwise, update i=i+1 and continue processing the next service.
[0077] (10) When List s When empty, it means that all services have been assigned to corresponding compute nodes, the process ends, and the actual deployment of services is executed on each compute node.
[0078] In some embodiments, each dependent task is assigned to the target compute node where the associated service resource resides to execute each dependent task, including: (3.1) Determine the initial scheduling scheme based on the dependencies between all dependent tasks; (3.2) For each scheduling scheme, determine the target estimated completion time for each dependent task under the scheduling scheme, and determine the total task completion time corresponding to the scheduling scheme based on the target estimated completion time for each dependent task. (3.3) Determine the updated scheduling scheme based on the scheduling scheme, and determine the total task completion time corresponding to the completion of all dependent tasks under the updated scheduling scheme; (3.4) Return to the step of determining the updated scheduling scheme based on the scheduling scheme, until the preset iteration termination condition is reached, and select the shortest one from multiple total task completion times as the target completion time; (3.5) Based on the scheduling scheme corresponding to the target completion time, each dependent task is assigned to the target computing node where the associated service resource is located in turn to execute each dependent task.
[0079] In some embodiments, after the deployment of service resources is completed, the dependencies between all dependent tasks are first determined to establish an initial scheduling scheme. The scheduling scheme refers to the scheme in which all dependent tasks are scheduled in a predetermined order. However, the initial scheduling scheme is obtained through completely random initialization. Under this scheme, the scheduling order of each dependent task will affect the execution time of subsequent dependent tasks, so that the total task completion time corresponding to the scheduling scheme is not the shortest. Therefore, after determining the initial scheduling scheme, this embodiment needs to determine the total task execution time corresponding to the initial scheduling scheme. Then, other scheduling schemes and the total task execution time corresponding to the other scheduling schemes are determined according to the initial scheduling scheme. Finally, the shortest corresponding scheduling scheme among the multiple total task execution times is determined as the target scheduling scheme, and each dependent task is executed according to the target scheduling scheme.
[0080] For example, such as Figure 5 As shown, Figure 5 This is a schematic diagram of an initial scheduling scheme for the task execution method provided in an embodiment of this application. Figure 5 This reflects a feasible, initial scheduling scheme corresponding to an embodiment of this application, which satisfies the dependencies between all dependent tasks, wherein, for example... Figure 3 As shown, the embodiments of this application include two dependent applications (workflows). Figure 5 Each dependent task has its own corresponding tuple. The first tuple represents the DAG sequence number of the corresponding workflow, and the second tuple represents the sequence number of the corresponding node in the DAG. The order of the tuples in the encoding list represents the scheduling order of the corresponding dependent tasks, and this order satisfies the topological order requirements of the DAG graph. However, it should be noted that this initial scheduling scheme is only a feasible one, and does not mean that it is the optimal one. Subsequent iterations and optimizations are needed based on this initial scheduling scheme.
[0081] Furthermore, for each scheduling scheme, the estimated target completion time for each dependent task under that scheme is determined, and the total task completion time for that scheduling scheme is determined based on the estimated target completion time for each dependent task. The estimated target completion time refers to the expected absolute or relative time taken for a single dependent task to complete processing on its allocated computing node from startup to completion; while the total task completion time refers to the total time required for the entire current scheduling scheme from the start of the first dependent task to the complete execution of the last dependent task.
[0082] Furthermore, since the initial scheduling scheme is not necessarily the optimal one, it is necessary to determine other feasible scheduling schemes based on the initial scheme and determine the total task completion time for each of the other scheduling schemes, so as to select the scheduling scheme with the shortest total task completion time from all the scheduling schemes as the target scheduling scheme.
[0083] In some embodiments, after evaluating the existing initial scheduling scheme, the original task execution order or resource allocation strategy is adjusted through a built-in optimization strategy to generate a new candidate scheme. Subsequently, the device uses the same calculation logic as the previous step to obtain the total task completion time of the updated scheduling scheme, thereby promoting the evolution of the entire scheduling plan towards a shorter time and higher efficiency.
[0084] Furthermore, the device will return to the step of determining the updated scheduling scheme based on the scheduling scheme, until a preset iteration termination condition is reached. Then, the shortest total task completion time is selected as the target completion time from multiple total task completion times. The preset iteration termination condition can be reaching a preset number of iteration rounds, having no new updatable scheduling scheme, or reaching a preset iteration time. The iteration termination condition can be set according to actual conditions, and this embodiment does not impose any limitations on it. Through the feedback loop and continuous iteration mechanism, the device can fully search the vast solution space. Finally, when the termination condition is triggered, the optimal solution with the shortest time among all explored solutions is locked as the target completion time, thereby completing the global optimization of the scheduling strategy.
[0085] Furthermore, the shortest total task completion time is selected as the target completion time from multiple total task completion times, and the scheduling scheme corresponding to the target completion time is determined as the target scheduling scheme. According to the target scheduling scheme, each dependent task is sequentially assigned to the target computing node where the associated service resource is located to execute each dependent task.
[0086] It is understood that, on the one hand, the embodiments of this application, based on continuously determining new scheduling schemes and the total task completion time corresponding to the scheduling schemes, break through the limitation of conventional greedy algorithms being prone to getting trapped in local optima, and accurately discover the optimal scheduling solution with the shortest global execution time; on the other hand, by allocating resources of physical nodes according to the optimal scheme, the concurrent utilization rate of service resources in the underlying computing nodes is greatly improved, the overall business delivery cycle is significantly shortened, and the efficiency and reliability of the multi-task system are guaranteed.
[0087] In some embodiments, an initial scheduling scheme is determined based on the dependencies between all dependent tasks, including: (3.1.1) For each computing node, determine the degree of service resource contention for each service resource deployed on the computing node; (3.1.2) Obtain the constraint priority of each dependent task, and determine the scheduling priority of each dependent task based on the service resource contention level of each service resource and the constraint priority corresponding to each dependent task; (3.1.3) Determine the original scheduling scheme based on the scheduling priority of each dependent task; (3.1.4) Generate at least one random scheduling scheme based on the dependencies between all dependent tasks, and determine the initial scheduling scheme from the original scheduling scheme and at least one random scheduling scheme.
[0088] In some embodiments, after the service placer completes the placement of service resources, the dependency task scheduler in the decision controller will schedule tasks based on the determined service layout. Traditional methods typically employ a list-based heuristic strategy to prioritize tasks and then schedule them one by one to the computing nodes with the earliest completion time or those that can reduce task communication time. However, traditional methods neglect the parallel characteristics and resource contention of tasks at the same level. When multiple parallel tasks can be scheduled to the same computing node, severe resource contention occurs, thus prolonging the overall execution time. In contrast, the dependency task scheduler in this embodiment analyzes the competition among parallel tasks for the same computing node to adjust priorities and allocate tasks, thereby effectively mitigating task waiting delays caused by resource contention.
[0089] Furthermore, the degree of service resource contention for each service resource deployed on the computing node is first determined using the following formula. : .in, Used to estimate the intensity of resource contention that may occur on compute nodes for different types of tasks at each processing level.
[0090] in, . This describes the current service resources. With and Any service resource other than that deployed on the same computing node The degree of competition at the node resource level; Indicates service Whether deployed on a compute node superior; Indicates service Whether deployed on a compute node superior; The larger the value, the better the service. Services The competition for resources among them intensifies.
[0091] Furthermore, the scheduling priority of each dependent task is determined using the following formula. : .
[0092] in, This represents the constraint priority of the current dependent task. Constraint priority refers to the priority of the current task due to the restrictions imposed on it by other tasks that it depends on. Furthermore, this formula ensures that the scheduling priority of a preceding task is always higher than the scheduling priority of a subsequent task, thus guaranteeing the correct processing order of tasks in a dependent application.
[0093] Furthermore, the original scheduling scheme is determined based on the scheduling priority of each dependent task. The original scheduling scheme is a deterministic baseline scheduling result rigorously derived from the pre-calculated scheduling priorities of each task during the initialization phase of heuristic task scheduling. It eliminates the uncertainty brought about by random allocation, adheres to a greedy or priority-driven strategy, and prioritizes the allocation of resources and execution for tasks with intense competition or tight constraints. In the entire scheduling optimization process, the original scheduling scheme acts as a high-quality seed solution with theoretical guarantees. It, together with the subsequently generated random schemes, constitutes the initial population, which not only ensures that the starting point of the algorithm search has a high baseline quality, thereby accelerating convergence, but also lays a solid foundation for subsequent global optimization.
[0094] Furthermore, to enrich the diversity of the solution space and prevent subsequent scheduling algorithms (such as heuristic optimization algorithms like genetic algorithms) from prematurely getting trapped in local optima, this embodiment of the application will randomly generate at least one random scheduling scheme while strictly adhering to the sequential dependencies between various dependent tasks. Then, the original scheduling scheme derived based on priority is combined with the random scheduling scheme for evaluation or selection, ultimately determining the initial scheduling scheme formally used for subsequent iterative optimization, thereby ensuring the quality of subsequent solutions while also considering the breadth of the search.
[0095] In some embodiments, obtaining the constraint priority of each dependent task includes: (A.1) From multiple dependent tasks, determine the successor task of each dependent task and obtain the successor priority of each dependent task's successor task; (A.2) For each dependent task, obtain the data transfer time between the dependent task and its successor task; (A.3) Determine the constraint priority of each dependent task based on the successor priority and data transmission time.
[0096] In some embodiments, for the formula , This represents the successor priority of each dependent task's successor task; Indicates task With the task The average data transmission time between them. for The subsequent tasks and the dependencies between each task can be determined when acquiring the dependent application.
[0097] Furthermore, assume that the services required by the two tasks are respectively and , It can be defined as: .in, Represents a computing node and The transmission bandwidth; for outgoing tasks without follow-up tasks, its The value is represented as The task scheduler introduces [a certain feature] when calculating priorities. To reflect the impact of resource competition on tasks, tasks at the same level that are more affected by resource competition will be prioritized for scheduling.
[0098] It is understood that, in determining the scheduling priority of each dependent task, this application embodiment simultaneously considers the task's own constraint priority and the degree of competition for service resources on the node, achieving coordinated optimization of task importance and node resource status: on the one hand, tasks with high constraint priority can receive timely responses; on the other hand, by sensing the degree of competition for service resources on each node, high-priority tasks are avoided from being scheduled to nodes with highly contested resources, thereby preventing performance degradation. This dual-consideration mechanism not only improves the task execution guarantee capability and effectively alleviates the resource pressure on hot nodes, but also enhances the system's load balancing, scheduling fairness, and overall service quality.
[0099] In some embodiments, determining the target estimated completion time for each dependent task under the scheduling scheme includes: (3.2.1) For each dependent task, based on the task resource requirements of the dependent task, determine multiple candidate computing nodes from multiple computing nodes that have deployed service resources associated with the dependent task; (3.2.2) Determine the scheduling priority of each dependent task, and determine the target dependent task from multiple dependent tasks according to the scheduling priority; (3.2.3) Determine the estimated completion time of the target-dependent task on each candidate computing node, and select the shortest estimated completion time from multiple estimated completion times as the target estimated completion time corresponding to the dependent task, so as to obtain the target estimated completion time corresponding to each dependent task under the scheduling scheme.
[0100] In some embodiments, for each dependent task, the nodes that can be deployed in the computing network after service deployment are first determined, and these nodes are considered as one or more candidate computing nodes for service resources associated with the dependent task. If there is only one candidate computing node, the currently assigned dependent task is directly deployed to that candidate computing node.
[0101] Furthermore, in most cases, the current dependent task has multiple allocable computing nodes in the computing network, such as... Figure 3 As shown, the task The candidate compute nodes that can be assigned are: and The embodiments of this application need to consider the task. The goal is to determine which candidate computing node to assign the task to minimize overall latency while balancing resource utilization and system load balancing.
[0102] Furthermore, the scheduling priority of each task among all tasks is determined, and this scheduling priority will serve as the basis for the allocation order of each task. In this embodiment, the task with the highest scheduling priority is selected from multiple tasks as the target dependency task to be allocated in the current round. The target dependency task is dynamically determined and updated after each round of allocation is completed until all dependency tasks have been deployed.
[0103] Furthermore, the target estimated completion time for the target-dependent task on each candidate computing node is determined. The target estimated completion time refers to the predicted time when a task can be completed when it is scheduled to be executed on a candidate computing node. From the estimated completion times calculated for each candidate computing node corresponding to the target-dependent task, the time with the shortest estimated completion time is selected as the target estimated completion time.
[0104] In some embodiments, determining an updated scheduling scheme based on a scheduling scheme includes: (3.3.1) Obtaining genetic operation operators; (3.3.2) Based on the genetic operation operators, the dependent tasks whose task order remains unchanged are determined from the scheduling scheme as the first dependent tasks; (3.3.3) Determine all dependent tasks other than the first dependent tasks from the scheduling scheme as second dependent tasks, and determine the update order of each first dependent task and each second dependent task according to the genetic operation operator; (3.3.4) Arrange the corresponding dependent tasks according to the update order of each dependent task to obtain the updated scheduling scheme.
[0105] In some embodiments, to determine an updated scheduling scheme based on the existing scheme, it is first necessary to obtain genetic operators. Genetic operators refer to a set of computational rules pre-defined or configured within a heuristic optimization algorithm (such as a genetic algorithm) for reorganizing, exchanging, or perturbing the positions of existing schemes. Genetic operators include selection operators, crossover operators, or mutation operators. Crossover operators further include the Improved Precedence Operation Crossover (IPOX crossover operator) and the sorting crossover operator. Genetic operators can perform guided reconstruction based on the current scheduling scheme, thereby causing the scheduling scheme to evolve in a better direction and improving the efficiency of generating new scheduling schemes.
[0106] The crossover operator determines the global search capability of the genetic algorithm, and different crossover operators have different characteristics. If a combination of multiple crossover operators is used during the crossover process, the characteristics of different crossover operators can be utilized to improve the algorithm's global search capability. Therefore, in the proposed algorithm, the crossover operation includes the following crossover operators.
[0107] Furthermore, during genetic iteration operations, to avoid completely destroying the original scheme and to inherit proven "gene fragments," the device will, based on the operational rules of the current genetic operators, forcibly anchor a portion of tasks, ensuring that these tasks maintain their original relative or absolute positional characteristics during subsequent new sequence generation. This set of tasks, defined by the rules as "preserving the original order" in the current evolutionary round, constitutes the "first-dependent tasks" in this scheme.
[0108] Furthermore, second dependent tasks are determined based on the first dependent task. Second dependent tasks refer to the group of active task nodes in the current scheduling scheme that urgently need to be replaced, rearranged, or moved. Then, the device, according to the inherent execution logic of the genetic operation operator, recalculates and allocates new position indices in the system sequence for both the first dependent task and the second dependent task that needs adjustment (primarily determining the new position index of the second dependent task, redefining the order position for each task node, thus forming the update order corresponding to each dependent task).
[0109] Furthermore, after defining the new position where each task should fall, the device will strictly follow this new order index and perform physical splicing, loading, and combination arrangement operations on all first and second dependent tasks. When all tasks fall into the corresponding new order nodes, a subset with new execution timing characteristics and still strictly satisfying the original directed acyclic graph topological dependencies is obtained, which is the updated scheduling scheme.
[0110] To help readers understand better, a complete example is provided below: (1) The genetic operation operator is the crossover operator: When the genetic operation operator is the IPOX crossover operator, such as Figure 6 As shown, Figure 6 This is a schematic diagram illustrating an updated scheduling scheme generation for the task execution method provided in this application embodiment, which divides the workflow of this application embodiment into two subsets. and The parent chromosome P1 / P2 that is replicated belongs to / The tasks in P2 / P1 are assigned to sub-chromosomes C1 / C2, preserving their positions. The tasks belonging to P2 / P1 are then assigned to sub-chromosomes C1 / C2, preserving their positions. / The tasks are sequentially filled into the gaps in C1 / C2. This approach allows for cross-operations without violating the workflow task dependency order, resulting in updated scheduling schemes C1 and C2, where P1 and P2 are the initial scheduling schemes.
[0111] When the genetic operation operator is the sorting and crossover operator, such as Figure 7 As shown, Figure 7 This is a schematic diagram illustrating another updated scheduling scheme generation for the task execution method provided in this application embodiment. The sorting crossover operator is widely used in workflow scheduling crossover operations. A crossover point with a length ranging from 1 to the total number of tasks is randomly generated. Tasks located to the left of the crossover point P1 / P2 are copied to C1 / C2, retaining their positions. The dependent tasks whose positions are retained are the first dependent tasks. For tasks to the right of the crossover point C1 / C2, they are sequentially filled into the right side of C1 / C2 according to their sorting order in P2 / P1 to obtain the updated scheduling schemes C1 and C2, where P1 and P2 are the initial scheduling schemes.
[0112] The two crossover operators proposed above can not only significantly change the scheduling order of tasks in the chromosome (initial scheduling scheme) and enhance the diversity of scheduling schemes, but also ensure that the sub-chromosomes (sub-scheduling schemes) generated during the crossover process can satisfy the task dependency constraints in the workflow application. In each iteration, the proposed algorithm will randomly select one of the two crossover operators to perform the corresponding crossover operation.
[0113] (2) Genetic operators are mutation operators: like Figure 8 As shown, Figure 8 This is a schematic diagram illustrating another updated scheduling scheme generation method for the task execution method provided in this application. The main goal of the mutation operator is to generate new individuals by changing gene values in the chromosome, thereby introducing features and information not yet present in the scheduling scheme and promoting diversity in the search process. This application employs a position-based mutation operator. First, a task is randomly selected, and then its nearest predecessor / successor task is searched forward / backward. The task is then randomly inserted into a position between the predecessor and successor tasks.
[0114] It is understood that this embodiment utilizes genetic operators to separate the original scheduling scheme into "fixed-position first-dependent tasks" and "flexibly rearranged second-dependent tasks," achieving a smooth recombination mechanism that balances "preservation of superior genes" and "global broad search." By preserving the order of the first-dependent tasks, the algorithm can stably inherit the efficient arrangement fragments formed in the parent scheduling scheme, accelerating model convergence. Rearranging the second-dependent tasks injects sufficient population diversity into the scheduling model, effectively preventing the optimization process from getting trapped in local optima. Thus, this embodiment can efficiently and iteratively generate other scheduling schemes without violating any task topological dependencies, allowing for the subsequent selection of the target scheduling scheme.
[0115] In some embodiments, each dependent task is sequentially assigned to the target computing node where the associated service resource resides to execute each dependent task, including: (3.5.1) For each dependent task, from the multiple candidate computing nodes corresponding to the dependent task, select the candidate computing node with the shortest estimated completion time as the target computing node corresponding to the dependent task, and assign the target dependent task to the target computing node; (3.5.2) When each dependent task is assigned to the corresponding target computing node, execute each dependent task.
[0116] In some embodiments, the device selects the node that can deliver the computation result the fastest by traversing all candidate computing nodes available for the current task and comparing and evaluating them. Then, it generates and issues scheduling instructions to map the currently being processed task (i.e., the target-dependent task) to the optimal computing node.
[0117] Furthermore, an iterative scheduling mechanism is adopted, in which tasks are deployed sequentially from the tasks to be assigned according to their scheduling priorities, until all tasks have been assigned. Then, the corresponding tasks are executed based on the service resources deployed on each computing node in the computing network.
[0118] Furthermore, once the device confirms that all dependent tasks under the current scheduling scheme have completed spatial binding (i.e., each task has found its own dedicated target computing node), it triggers the underlying computing resources to begin actual computation based on the determined scheduling order and spatial mapping relationship. At this time, each target computing node will start its corresponding processes or service resources to formally perform computation and data processing on the dependent tasks it carries, until all assigned tasks have been executed.
[0119] It is understood that this embodiment of the application achieves fine-grained adaptive load balancing in a complex heterogeneous computing environment by dynamically selecting the target computing node with the shortest estimated completion time for each task, effectively avoiding the phenomenon of some nodes being severely overloaded while other nodes are idle. Furthermore, unified execution triggering is performed only after all tasks have completed node allocation, ensuring the rigor and orderliness of the overall solution at the physical level, thereby maximizing the overall throughput of the underlying computing system and greatly guaranteeing the efficiency and reliability of concurrent execution of multiple workflow tasks.
[0120] In some embodiments, determining the estimated completion time of a goal-dependent task on each candidate computing node includes: (B.1) From multiple dependent tasks, determine the predecessor task of the target dependent task, and obtain the earliest idle time of the predecessor task of the target dependent task; (B.2) Determine the earliest start time of the target-dependent tasks deployed on each candidate computing node based on the earliest idle time of the tasks; (B.3) Obtain the node computing power resources of each candidate computing node, and determine the latest start time of the target-dependent task deployed on each candidate computing node based on the node computing power resources and the earliest start time of the task; (B.4) Identify the parallel tasks of the goal-dependent task and obtain the task execution time of each parallel task; (B.5) Based on the node computing power resources, the degree of competition for service resources for each service resource, the task resource requirements and task load of each dependent task, determine the task parallel impact time of the target dependent task deployed on each candidate computing node; (B.6) Based on the latest start time of the task and the parallel impact time of the task, determine the estimated completion time of the target-dependent task deployed on each candidate computing node.
[0121] In some embodiments, the earliest start time of the target-dependent task deployed on each candidate compute node is determined by the following formula. : .in, Indicates the prerequisite task The actual completion time, Indicates the prerequisite task Whether it is scheduled to a compute node superior, Indicates service Deployment latency overhead, Represents a computing node The earliest available time for the task.
[0122] In some embodiments, the latest start time of the target-dependent task deployed on each candidate compute node is determined by the following formula. : .
[0123] In some embodiments, according to The definition depends on the task scheduler maintaining a priority queue. This includes all ready tasks, and is arranged according to... Arranged in descending order. In the queue When scheduling tasks sequentially, the impact of task allocation on subsequent parallel tasks must be considered. Therefore, if tasks... Scheduled to compute node Above, define a set of parallel tasks. This set of parallel tasks includes parallel tasks for goal-dependent tasks: 。 express The subsequent parallel tasks in the process. By definition, if the earliest start time of a parallel task that has not yet been executed is less than the earliest completion time of the currently scheduled task, it means that on the computing node... implement This may cause the execution of subsequent parallel tasks to be blocked.
[0124] Furthermore, to mitigate this conflict, the time impact of task parallelism was adopted (…). This guides the selection of computing nodes. It is calculated using the following formula: .
[0125] Furthermore, the target-dependent task scheduler will tend to select Value and For computation nodes with smaller sums of values, this can alleviate... This addresses the issue of subsequent parallel tasks being blocked, thereby improving the efficiency of parallel task execution.
[0126] To facilitate reader understanding, such as Figure 9 As shown, Figure 9 This is a task allocation flowchart of the task execution method provided in the embodiments of this application, which provides a complete example of the allocation of multiple tasks: (1) First, based on the application information provided by the application aggregator and the decision-making mechanism of the service placer, calculate Degree of competition for service resources Scheduling priority for each dependent task (Rank) LPCT ); (2) Create based on Sorted task priority queue (Queue) V Sort all tasks to be scheduled in descending order of priority; (3) Add the entry task (i.e., the task without a predecessor task) to the Queue. V ; (4) Determine the Queue V Is it empty? If yes, end the process; otherwise, proceed to the next step. (5) Select the first task with the highest current scheduling priority from QueueV. ; (6) Calculation task Earliest start time of tasks on each computing node Latest start time of the task The impact of parallel tasks on time ; (7) Determine to schedule the task to + The node with the lowest value; (8) To carry out the task In the subsequent tasks, the preceding tasks have all been added to QueueV by the scheduled tasks, and the execution step (4) is returned until QueueV is empty, the process ends, and each task is scheduled to the assigned computing node for specific task execution.
[0127] It is understood that this application's embodiments achieve global scheduling optimization for multi-dependency applications by introducing parallel awareness and resource contention modeling mechanisms in the service placement and dependency task scheduling stages. Compared with traditional methods, this application's embodiments further consider the impact of service placement on application latency based on dependency task scheduling, achieving collaborative optimization of task scheduling and service placement. By jointly modeling these two decision-making processes within the same framework, this application's embodiments can simultaneously balance the dual impact of task scheduling and service deployment on overall performance, thereby minimizing the application's average completion time at the global level. Specifically, in the service placement stage, a heuristic strategy based on service parallelism is proposed. By quantifying the parallel relationships between different services and guiding the distributed deployment of services, task congestion caused by the concentration of services with high parallelism is avoided. In the dependency task scheduling stage, a global optimization of the multi-workflow application scheduling process is achieved by combining a list scheduling heuristic method with a genetic algorithm. First, a hierarchical resource contention table and an estimated parallel completion time are introduced to assess the potential competition level between parallel tasks, optimize task priority settings and task allocation strategies, and construct feasible initial scheduling solutions based on this. These solutions are then used as elite individuals in the initial population of the genetic algorithm, thereby improving search efficiency while ensuring feasibility. Based on this, only the task scheduling order is coded and optimized, while the resource selection stage adopts a list scheduling strategy based on EFT+EPFT to complete the resource allocation one by one, thereby significantly reducing the search space size while ensuring scheduling quality.
[0128] This application's embodiments significantly reduce the average completion time and overcome the shortcomings of traditional scheduling algorithms that ignore parallelism and resource contention by effectively capturing and utilizing the task parallelism in dependent tasks. Furthermore, the strategy employed in this application's embodiments has low time complexity, thus possessing good scalability and enabling efficient operation in large-scale scenarios with a large number of computing nodes and tasks, making it suitable for applications with extremely high real-time requirements.
[0129] like Figure 10 As shown, Figure 10 This is a schematic diagram of the module structure of the task execution device provided in this application embodiment. The task execution device 300 may include the following modules 310 to 360: The acquisition module 310 is used to acquire multiple dependent tasks and multiple service resources to be assigned, and to acquire the task resource requirements and task load of each dependent task. The service resource information determination module 320 is used to determine the service load and parallelism of each service resource based on the task resource requirements and task load of each dependent task. The target service resource determination module 330 is used to determine the target service resource from multiple service resources to be allocated based on the service load of each service resource, and to obtain the current service allocation status of multiple computing nodes. The node load estimation module 340 is used to determine the node load estimation of the target service resource allocated to each computing node based on the current service allocation status, the service load of the target service resource, and the parallelism of multiple services of the target service resource. The service resource allocation module 350 is used to allocate target service resources to the computing node with the lowest estimated load among multiple computing nodes and update the current service allocation status. The task execution module 360 is used to return the steps of determining the target service resource from multiple service resources to be allocated based on the service load of each service resource, until each service resource is deployed on the corresponding computing node, and to allocate each dependent task to the target computing node where the associated service resource is located to execute each dependent task.
[0130] In some embodiments, the service resource information determination module 320 is used for: Determine the processing level for each dependent task; For each service resource, based on the task resource requirements and processing level of each dependent task, determine the degree of hierarchical resource competition between the service resource and each other service resource, and determine the overall degree of resource competition between the service resource and all other service resources; For each service resource, the degree of service parallelism between the service resource and each other is determined based on the degree of competition for resources at different levels and the overall degree of competition for resources, so as to obtain multiple degrees of service parallelism for each service resource.
[0131] In some embodiments, the service resource allocation module 350 is used for: Obtain the minimum task load and the node memory capacity of each compute node; Based on the task load of each dependent task, the service load of each service resource, the node memory capacity of each computing node, and the minimum task load, determine the service deployment ratio coefficient corresponding to each service resource. The maximum number of deployments for each service resource is determined based on its service load, service deployment ratio, and minimum task load. Among multiple computing nodes, the target service resources are allocated to the computing node with the lowest estimated load, based on the maximum number of deployments corresponding to the target service resources.
[0132] In some embodiments, the task execution module 360 is used for: The initial scheduling scheme is determined based on the dependencies between all dependent tasks; For each scheduling scheme, determine the target estimated completion time for each dependent task under the scheduling scheme, and determine the total task completion time corresponding to the scheduling scheme based on the target estimated completion time for each dependent task. Based on the scheduling scheme, the updated scheduling scheme is determined, and the total task completion time corresponding to the execution of all dependent tasks under the updated scheduling scheme is determined. Return to the step of determining the updated scheduling scheme based on the scheduling scheme, until the preset iteration termination condition is reached, and select the shortest one from multiple total task completion times as the target completion time; Based on the scheduling scheme corresponding to the target completion time, each dependent task is sequentially assigned to the target computing node where the associated service resource is located to execute each dependent task.
[0133] In some embodiments, the task execution module 360 is further configured to: For each dependent task, based on the task resource requirements of the dependent task, multiple candidate computing nodes are identified from multiple computing nodes that have deployed service resources related to the dependent task. Determine the scheduling priority of each dependent task, and determine the target dependent task from multiple dependent tasks based on the scheduling priority; Determine the estimated completion time of the target-dependent task on each candidate computing node, and select the shortest estimated completion time from multiple estimated completion times as the target estimated completion time for the dependent task, so as to obtain the target estimated completion time for each dependent task under the scheduling scheme.
[0134] In some embodiments, the task execution module 360 is further configured to: Obtain genetic operators; Based on the genetic operation operators, the dependent tasks whose task order remains unchanged are identified from the scheduling scheme as the first dependent tasks; From the scheduling scheme, all dependent tasks other than the first dependent tasks are identified as second dependent tasks, and the update order of each first dependent task and each second dependent task is determined according to the genetic operation operator; The updated scheduling scheme is obtained by arranging the corresponding dependent tasks according to the update order of each dependent task.
[0135] In some embodiments, the task execution module 360 is further configured to: For each dependent task, from the multiple candidate computing nodes corresponding to the dependent task, the candidate computing node with the shortest estimated completion time is selected as the target computing node corresponding to the dependent task, and the target dependent task is assigned to the target computing node; Each dependent task is executed when it is assigned to the corresponding target computing node.
[0136] In some embodiments, the task execution module 360 is further configured to: For each compute node, determine the level of service resource contention for each service resource deployed on that compute node; Obtain the constraint priority of each dependent task, and determine the scheduling priority of each dependent task based on the service resource contention level of each service resource and the constraint priority corresponding to each dependent task. The original scheduling scheme is determined based on the scheduling priority of each dependent task; At least one random scheduling scheme is randomly generated based on the dependencies between all dependent tasks, and an initial scheduling scheme is determined from the original scheduling scheme and at least one random scheduling scheme.
[0137] In some embodiments, the task execution module 360 is further configured to: From multiple dependent tasks, determine the successor task of each dependent task and obtain the successor priority of each dependent task's successor task. For each dependent task, obtain the data transfer time between the dependent task and its successor task; The constraint priority of each dependent task is determined based on the successor priority and data transmission time.
[0138] In some embodiments, the task execution module 360 is further configured to: From multiple dependent tasks, identify the predecessor task of the target dependent task and obtain the earliest idle time of the predecessor task of the target dependent task; Based on the earliest idle time of the task, determine the earliest start time of the target-dependent task to be deployed on each candidate computing node; Obtain the node computing power resources of each candidate computing node, and determine the latest start time of the target-dependent task deployed on each candidate computing node based on the node computing power resources and the earliest start time of the task. Identify the parallel tasks for the target-dependent task and obtain the execution time of each parallel task; Based on the node computing power resources, the degree of competition for service resources of each service resource, the task resource requirements and task load of each dependent task, the parallel impact time of the target dependent task deployed on each candidate computing node is determined. Based on the latest start time of the task and the parallel impact time of the task, the estimated completion time of the target-dependent task is determined for deployment on each candidate computing node.
[0139] The task execution method, apparatus, electronic device, and storage medium proposed in this application acquire multiple dependent tasks and multiple service resources to be allocated, and acquire the task resource requirements and task load of each dependent task; determine the service load and multiple service parallelisms of each service resource based on the task resource requirements and task load of each dependent task; determine the target service resource from the multiple service resources to be allocated based on the service load of each service resource, and acquire the current service allocation status of multiple computing nodes; determine the node estimated load corresponding to the target service resource allocated to each computing node based on the current service allocation status, the service load of the target service resource, and the multiple service parallelisms of the target service resource; allocate the target service resource to the computing node with the smallest node estimated load among the multiple computing nodes, and update the current service allocation status; return to the step of determining the target service resource from the multiple service resources to be allocated based on the service load of each service resource, until each service resource is deployed on the corresponding computing node, and allocate each dependent task to the target computing node where the associated service resource is located to execute each dependent task.
[0140] This application embodiment dynamically derives the service load and parallelism of each service resource by considering the task resource requirements and task load of each dependent task. This allows for the determination of the estimated node load on which each service load is deployed based on the service load and parallelism, prioritizing the allocation of service resources to the computing nodes with the lowest load. Only after all service resources have been deployed to their corresponding target computing nodes is the allocation of each dependent task considered. Thus, even when a node cannot deploy all service resources, this application embodiment significantly reduces the overhead of related tasks needing to find new computing nodes due to missing service resources. This not only improves the rationality of service resource deployment and node load balancing but also ensures that dependent tasks can be efficiently executed on the nodes containing their required service resources, thereby significantly reducing task scheduling latency and improving task execution efficiency.
[0141] like Figure 11 As shown, Figure 11 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. The electronic device includes: The processor 401 can be implemented using a general-purpose central processing unit (CPU), microprocessor, application specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 402 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 402 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 402 and called by the processor 401 to execute the image analysis method of the embodiments of this application. Input / output interface 403 is used to implement information input and output; The communication interface 404 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 405 transmits information between various components of the device (e.g., processor 401, memory 402, input / output interface 403, and communication interface 404); The processor 401, memory 402, input / output interface 403 and communication interface 404 are connected to each other within the device via bus 405.
[0142] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described image analysis method.
[0143] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0144] The task execution method, apparatus, electronic device, and storage medium proposed in this application acquire multiple dependent tasks and multiple service resources to be allocated, and acquire the task resource requirements and task load of each dependent task; determine the service load and multiple service parallelisms of each service resource based on the task resource requirements and task load of each dependent task; determine the target service resource from the multiple service resources to be allocated based on the service load of each service resource, and acquire the current service allocation status of multiple computing nodes; determine the node estimated load corresponding to the target service resource allocated to each computing node based on the current service allocation status, the service load of the target service resource, and the multiple service parallelisms of the target service resource; allocate the target service resource to the computing node with the smallest node estimated load among the multiple computing nodes, and update the current service allocation status; return to the step of determining the target service resource from the multiple service resources to be allocated based on the service load of each service resource, until each service resource is deployed on the corresponding computing node, and allocate each dependent task to the target computing node where the associated service resource is located to execute each dependent task.
[0145] This application embodiment dynamically derives the service load and parallelism of each service resource by considering the task resource requirements and task load of each dependent task. This allows for the determination of the estimated node load on which each service load is deployed based on the service load and parallelism, prioritizing the allocation of service resources to the computing nodes with the lowest load. Only after all service resources have been deployed to their corresponding target computing nodes is the allocation of each dependent task considered. Thus, even when a node cannot deploy all service resources, this application embodiment significantly reduces the overhead of related tasks needing to find new computing nodes due to missing service resources. This not only improves the rationality of service resource deployment and node load balancing but also ensures that dependent tasks can be efficiently executed on the nodes containing their required service resources, thereby significantly reducing task scheduling latency and improving task execution efficiency.
[0146] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0147] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0148] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0149] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0150] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0151] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0152] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0153] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0154] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0155] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0156] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A task execution method, characterized in that, include: Obtain multiple dependent tasks and multiple service resources to be assigned, and obtain the task resource requirements and task load of each dependent task; Based on the task resource requirements and task load of each of the dependent tasks, the service load and multiple service parallelisms of each service resource are determined; The target service resource is determined from the multiple service resources to be allocated based on the service load of each service resource, and the current service allocation status of multiple computing nodes is obtained. Based on the current service allocation status, the service load of the target service resource, and the parallelism of multiple services of the target service resource, the estimated node load of the target service resource allocated to each computing node is determined. Among the multiple computing nodes, the target service resources are allocated to the computing node with the lowest estimated load, and the current service allocation status is updated. Return to the step of determining the target service resource from the multiple service resources to be allocated based on the service load of each service resource, until each service resource is deployed on the corresponding computing node, and assign each dependent task to the target computing node where the associated service resource is located to execute each dependent task.
2. The task execution method according to claim 1, characterized in that, The step of determining multiple service parallelisms for each service resource based on the task resource requirements and task load of each dependent task includes: Determine the processing level for each of the aforementioned dependent tasks; For each of the service resources, based on the task resource requirements and processing level of each dependent task, the degree of hierarchical resource competition between the service resource and each other service resource is determined, and the overall degree of resource competition between the service resource and all other service resources is determined. For each of the service resources, the service parallelism between the service resource and each other is determined based on the level of resource competition and the overall resource competition, so as to obtain multiple service parallelisms for each of the service resources.
3. The task execution method according to claim 1, characterized in that, The step of allocating the target service resources to the computing node with the lowest estimated load among the multiple computing nodes includes: Obtain the minimum task load and the node memory capacity of each computing node; Based on the task load of each dependent task, the service load of each service resource, the node memory capacity of each computing node, and the minimum task load, determine the service deployment ratio coefficient corresponding to each service resource; The maximum number of deployments corresponding to each service resource is determined based on the service load of each service resource, the service deployment ratio coefficient, and the minimum task load. Among the multiple computing nodes, the target service resources are allocated to the computing node with the lowest estimated load, based on the maximum deployment quantity corresponding to the target service resources.
4. The task execution method according to claim 1, characterized in that, The step of assigning each of the dependent tasks to the target computing node where the associated service resource is located, in order to execute each of the dependent tasks, includes: An initial scheduling scheme is determined based on the dependencies between all the aforementioned dependent tasks; For each of the scheduling schemes, the target estimated completion time for each of the dependent tasks under the scheduling scheme is determined, and the total task completion time corresponding to the scheduling scheme is determined based on the target estimated completion time for each of the dependent tasks. Based on the aforementioned scheduling scheme, an updated scheduling scheme is determined, and the total task completion time corresponding to the execution of all dependent tasks under the updated scheduling scheme is determined. Return to the step of determining the updated scheduling scheme according to the scheduling scheme, until the preset iteration termination condition is reached, and select the shortest one from the multiple total task completion times as the target completion time; According to the scheduling scheme corresponding to the target completion time, each dependent task is sequentially assigned to the target computing node where the associated service resource is located to execute each dependent task.
5. The task execution method according to claim 4, characterized in that, Determining the target estimated completion time for each dependent task under the scheduling scheme includes: For each of the dependent tasks, based on the task resource requirements of the dependent tasks, multiple candidate computing nodes that are deployed with service resources associated with the dependent tasks are determined from the multiple computing nodes. Determine the scheduling priority of each of the dependent tasks, and determine the target dependent task from the plurality of dependent tasks according to the scheduling priority; The estimated completion time of the target-dependent task on each of the candidate computing nodes is determined, and the shortest estimated completion time is selected from the multiple estimated completion times as the target estimated completion time corresponding to the dependent task, so as to obtain the target estimated completion time corresponding to each dependent task under the scheduling scheme.
6. The task execution method according to claim 4, characterized in that, The step of determining the updated scheduling scheme based on the aforementioned scheduling scheme includes: Obtain genetic operators; Based on the genetic operation operator, the dependent tasks whose task order remains unchanged are determined from the scheduling scheme as the first dependent task; From the scheduling scheme, all dependent tasks other than the first dependent tasks are identified as second dependent tasks, and the update order of each first dependent task and each second dependent task is determined according to the genetic operation operator; The updated scheduling scheme is obtained by arranging the corresponding dependent tasks according to the update order of each dependent task.
7. The task execution method according to claim 4, characterized in that, The step of sequentially assigning each of the dependent tasks to the target computing node where the associated service resource is located, in order to execute each of the dependent tasks, includes: For each dependent task, from the multiple candidate computing nodes corresponding to the dependent task, the candidate computing node with the shortest estimated completion time is selected as the target computing node corresponding to the dependent task, and the target dependent task is assigned to the target computing node; Each of the dependent tasks is executed when it is assigned to the corresponding target computing node.
8. The task execution method according to claim 4, characterized in that, The step of determining the initial scheduling scheme based on the dependencies between all the dependent tasks includes: For each computing node, determine the degree of service resource contention for each service resource deployed on that computing node; Obtain the constraint priority of each dependent task, and determine the scheduling priority of each dependent task based on the service resource contention level of each service resource and the constraint priority corresponding to each dependent task; The original scheduling scheme is determined based on the scheduling priority of each of the dependent tasks; At least one random scheduling scheme is randomly generated based on the dependencies between all the dependent tasks, and an initial scheduling scheme is determined from the original scheduling scheme and the at least one random scheduling scheme.
9. The task execution method according to claim 8, characterized in that, The step of obtaining the constraint priority of each of the dependent tasks includes: From the multiple dependent tasks, determine the successor task of each dependent task, and obtain the successor priority of each dependent task's successor task. For each of the dependent tasks, obtain the data transmission time between the dependent task and its successor task; The constraint priority of each dependent task is determined based on the successor priority and the data transmission time.
10. The task execution method according to claim 5, characterized in that, Determining the estimated completion time of the target-dependent task on each of the candidate computing nodes includes: From the multiple dependent tasks, determine the predecessor task of the target dependent task, and obtain the earliest idle time of the predecessor task of the target dependent task; Based on the earliest idle time of the task, determine the earliest start time of the target-dependent task deployed on each of the candidate computing nodes; Obtain the node computing power resources of each candidate computing node, and determine the latest start time of the target-dependent task deployed on each candidate computing node based on the node computing power resources and the earliest start time of the task. Determine the parallel tasks of the target-dependent task and obtain the task execution time of each parallel task; Based on the node computing power resources, the service resource competition level of each service resource, the task resource requirements and task load of each dependent task, the task parallel impact time of the target dependent task deployed on each candidate computing node is determined. Based on the latest start time of the task and the parallel impact time of the task, the estimated completion time of the target-dependent task deployed on each of the candidate computing nodes is determined.
11. A task execution device, characterized in that, include: The acquisition module is used to acquire multiple dependent tasks and multiple service resources to be assigned, and to acquire the task resource requirements and task load of each dependent task; The service resource information determination module is used to determine the service load and multiple service parallelisms of each service resource based on the task resource requirements and task load of each dependent task. The target service resource determination module is used to determine the target service resource from the multiple service resources to be allocated based on the service load of each service resource, and to obtain the current service allocation status of multiple computing nodes. The node load estimation determination module is used to determine the node load estimation of the target service resource allocated to each computing node based on the current service allocation status, the service load of the target service resource, and the parallelism of multiple services of the target service resource. The service resource allocation module is used to allocate the target service resources to the computing node with the lowest estimated load among the multiple computing nodes, and update the current service allocation status. The task execution module is used to return to the step of determining the target service resource from multiple service resources to be allocated based on the service load of each service resource, until each service resource is deployed on the corresponding computing node, and to allocate each dependent task to the target computing node where the associated service resource is located, so as to execute each dependent task.
12. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the task execution method according to any one of claims 1 to 10.
13. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the task execution method according to any one of claims 1 to 10.