A task processing method, apparatus, device, medium and product
Patent Information
- Application Number
- CN202510221163.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2026-08-28
AI Technical Summary
[0004]然而,上述方式极易导致多个队列间集群资源利用不均衡的问题,部分队列满载而部分队列空闲,进而产生任务阻塞,影响任务处理的整体效率
[0021]本申请提供了一种任务处理方法,该方法首先获取第一任务实例,接着,确定第一任务实例的任务执行信息,以及,确定多个队列的队列运行信息,其中,任务执行信息为与执行第一任务实例相关的信息,多个队列用于执行任务实例,队列运行信息为与队列的任务执行情况相关的信息。根据队列运行信息,从多个队列中确定第一队列集合,以及,根据任务执行信息,从多个队列中确定第二队列集合,其中,第一队列集合包括允许接收任务实例的队列,第二队列集合包括满足第一任务实例的任务执行需求的队列,根据第一队列集合和第二队列集合,确定目标队列,将第一任务实例发送至目标队列。
Smart Images

Figure CN122653759A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a task processing method, apparatus, electronic device, computer-readable storage medium, and computer program product. Background Technology
[0002] A cluster consists of multiple independent nodes (such as compute nodes, storage nodes, etc.) that work together to provide highly available services. Clusters are typically equipped with a resource manager, which allocates and manages cluster resources to ensure efficient resource utilization. The resource manager can create multiple queues within the cluster and allocate a certain amount of cluster resources to each queue. The cluster resources of different queues are independent and do not affect each other.
[0003] During task processing, a task instance is sent to a queue in the cluster for execution. That is, the cluster resources allocated to that queue are used to execute the task instance. Typically, the association between task instances and queues is established in advance. After a task instance is created, it is sent to the queue with which it is associated for execution.
[0004] However, the above methods are prone to causing uneven utilization of cluster resources among multiple queues, with some queues being fully loaded while others are idle, leading to task blocking and affecting the overall efficiency of task processing. How to solve the problem of uneven cluster resource utilization and achieve flexible and reasonable task processing has become an urgent issue to be addressed. Summary of the Invention
[0005] This application provides a task processing method. This method enables flexible task instance scheduling, improving the overall efficiency of task processing. This application also provides apparatus, electronic devices, computer-readable storage media, and computer program products corresponding to the above method.
[0006] Firstly, this application provides a task processing method, which includes:
[0007] Obtain the first task instance;
[0008] The task execution information of the first task instance is determined, and the queue operation information of multiple queues is determined; wherein, the task execution information is information related to the execution of the first task instance, the multiple queues are used to execute the task instance, and the queue operation information is information related to the task execution status of the queue;
[0009] Based on the queue operation information, a first queue set is determined from the plurality of queues, and based on the task execution information, a second queue set is determined from the plurality of queues; wherein, the first queue set includes queues that are allowed to receive task instances, and the second queue set includes queues that meet the task execution requirements of the first task instance;
[0010] Based on the first queue set and the second queue set, a target queue is determined, and the first task instance is sent to the target queue.
[0011] Secondly, this application provides a task processing apparatus, the apparatus comprising:
[0012] The acquisition module is used to acquire the first task instance;
[0013] The first determining module is used to determine the task execution information of the first task instance and the queue operation information of multiple queues; wherein the task execution information is information related to the execution of the first task instance, the multiple queues are used to execute the task instance, and the queue operation information is information related to the task execution status of the queues;
[0014] The second determining module is configured to determine a first queue set from the plurality of queues based on the queue operation information, and to determine a second queue set from the plurality of queues based on the task execution information; wherein the first queue set includes queues that are allowed to receive task instances, and the second queue set includes queues that meet the task execution requirements of the first task instance;
[0015] The scheduling module is used to determine a target queue based on the first queue set and the second queue set, and send the first task instance to the target queue.
[0016] Thirdly, this application provides an electronic device including a processor and a memory. The processor and the memory communicate with each other. The processor is used to execute instructions stored in the memory to cause the electronic device to perform a task processing method as described in the first aspect or any implementation thereof.
[0017] Fourthly, this application provides a computer-readable storage medium storing instructions that instruct an electronic device to perform the task processing method described in the first aspect or any implementation thereof.
[0018] Fifthly, this application provides a computer program product containing instructions that, when run on an electronic device, causes the electronic device to perform the task processing method described in the first aspect or any implementation thereof.
[0019] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods.
[0020] As can be seen from the above technical solutions, this application has the following advantages:
[0021] This application provides a task processing method. The method first obtains a first task instance, then determines the task execution information of the first task instance, and determines the queue operation information of multiple queues. The task execution information is related to executing the first task instance, the multiple queues are used to execute the task instance, and the queue operation information is related to the task execution status of the queues. Based on the queue operation information, a first queue set is determined from the multiple queues, and based on the task execution information, a second queue set is determined from the multiple queues. The first queue set includes queues that are allowed to receive task instances, and the second queue set includes queues that meet the task execution requirements of the first task instance. Based on the first queue set and the second queue set, a target queue is determined, and the first task instance is sent to the target queue.
[0022] This method provides a scheduling strategy for queues in a cluster. By considering both the task execution information of the task instance to be scheduled and the queue operation information of multiple queues in the cluster, it determines the set of queues that can receive the task instance and the set of queues that can execute the task instance to be scheduled, thus identifying the target queue for executing the task instance. In this way, by combining the current task execution status and the task execution capacity of each queue, it rationally allocates tasks among multiple queues in the cluster, achieving flexible task instance scheduling and improving the overall efficiency of task processing. Attached Figure Description
[0023] To more clearly illustrate the technical methods of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly described below.
[0024] Figure 1 A flowchart illustrating a task processing method provided in an embodiment of this application;
[0025] Figure 2 A flowchart illustrating a task processing method provided in an embodiment of this application;
[0026] Figure 3 A flowchart illustrating a process for obtaining an instance of a task to be executed that has a reallocation requirement, as provided in an embodiment of this application;
[0027] Figure 4 This is a schematic diagram of the architecture of a task processing system provided in an embodiment of this application;
[0028] Figure 5 This is a schematic diagram of the structure of a task processing device provided in an embodiment of this application;
[0029] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0030] The terms "first" and "second" used in the embodiments of this application are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined with "first" and "second" may explicitly or implicitly include one or more of that feature.
[0031] First, some technical terms and application scenarios involved in the embodiments of this application will be introduced.
[0032] A cluster is a computer system architecture consisting of multiple independent nodes (such as compute nodes, storage nodes, etc.) that are connected together via a network to work together to provide highly available services.
[0033] Resource management in a cluster typically relies on a resource manager, which is used to allocate and manage cluster resources (such as compute resources, storage resources, etc.). Specifically, the resource manager can create multiple queues in the cluster and allocate a certain amount of cluster resources to each queue. The cluster resources of different queues are independent of each other and do not affect each other.
[0034] Clusters can be used for task processing. For example, distributed computing systems can run in a cluster, and the distributed computing system can use cluster resources to process tasks in parallel.
[0035] In practical implementation, distributed computing systems are typically used to execute individual tasks within a task chain. A task chain, also known as a task module, consists of a series of ordered task nodes with dependencies between them. A task chain can be used to implement a service or a functionality. In other words, the tasks required to complete a service or functionality are divided into multiple subtasks, each subtask corresponding to a task node. The task chain describes the logical relationships and execution paths between these task nodes.
[0036] A task node can be understood as a basic unit in a task chain, used to describe the logic and function of a task. A task node defines information related to the task, such as task type, execution logic, input parameters, and output parameters. A task instance is an instantiation of a task node; that is, a task instance can be understood as the concrete manifestation of a task node during actual runtime. When a task node in a task chain is triggered for execution, that task node can generate a task instance. By executing this task instance, a specific task execution process is completed.
[0037] After a task instance is created, it is sent to a queue in the cluster for execution. That is, the cluster resources allocated to that queue are used to execute the task instance. Typically, the association between task instances and queues is established in advance. After a task instance is created, it is sent to the queue with which it is associated for execution. In other words, a task instance created by a task node can be sent to the default queue for execution.
[0038] However, since the number of cluster resources allocated to different queues is different, the execution time of different task instances is different, and the number of cluster resources required to execute different task instances is also different, the above method is very likely to cause uneven utilization of cluster resources among multiple queues. Some queues are fully loaded while others are idle. Fully loaded queues will cause task blocking problems, affecting the overall efficiency of task processing in the task chain.
[0039] In related technologies, different queues can be set with different yield times, and only queues within the yield time can accept new task instances. While this method can alleviate task blocking to some extent, it lacks flexibility in adjusting cluster resources across multiple queues.
[0040] In view of this, this application provides a task processing method. The method first obtains a first task instance, then determines the task execution information of the first task instance, and determines the queue operation information of multiple queues. The task execution information is related to the execution of the first task instance, the multiple queues are used to execute the task instance, and the queue operation information is related to the task execution status of the queues. Based on the queue operation information, a first queue set is determined from the multiple queues, and based on the task execution information, a second queue set is determined from the multiple queues. The first queue set includes queues that are allowed to receive task instances, and the second queue set includes queues that meet the task execution requirements of the first task instance. Based on the first queue set and the second queue set, a target queue is determined, and the first task instance is sent to the target queue.
[0041] This method provides a scheduling strategy for queues in a cluster. It determines the set of queues capable of receiving task instances and the set of queues capable of executing task instances by considering both the task execution information of the task instance to be scheduled and the queue operation information of multiple queues in the cluster. This, in turn, determines the target queue for executing the task instance. By combining the current task execution status and the queue's own task execution capabilities, task instances are rationally allocated among multiple queues in the cluster, achieving flexible task instance scheduling, fully utilizing cluster resources, and improving the overall efficiency of task processing.
[0042] To facilitate understanding of the technical solutions provided in the embodiments of this application, the following description will be provided in conjunction with the accompanying drawings. See also... Figure 1 The diagram shown illustrates a task processing method that can be executed by a task processing system. The method specifically includes:
[0043] S101: Obtain the first task instance.
[0044] Here, the first task instance can be understood as a task instance that has been generated, is awaiting scheduling, and is awaiting execution. In other words, the first task instance has a need to be scheduled to a queue for execution. Typically, the first task instance can be carried in a queue scheduling request. That is, when there is a first task instance to be scheduled, a queue scheduling request is sent to the task processing system. This queue scheduling can be used to request the return of a queue that can best meet the task processing needs of the first task instance.
[0045] In some embodiments, the first task instance may be generated by a first task node, which may be a task node in a first task chain. That is, the first task instance may be used to implement a subtask of a service or function point corresponding to the first task chain.
[0046] In some possible implementations, database management task instances are utilized. See [link to relevant documentation] for details. Figure 2 The flowchart shown illustrates the process of retrieving a set of task instances from the database and then determining the first task instance from that set. The database stores the task instances to be scheduled; for example, it can be a relational database.
[0047] In other words, tasks with scheduling needs and awaiting processing are stored in a database for intuitive and unified management. When task instance scheduling is required, a set of task instances is retrieved from the database; for example, a query is written to retrieve the set of task instances from the database. This allows for efficient retrieval of the set of task instances to be scheduled through interaction with the database.
[0048] This application does not limit the method for determining the first task instance from the task instance set. In some embodiments, each task instance in the task instance set is traversed, the task priority of each task instance in the task instance set is determined, and the task instance with the highest task priority is determined as the first task instance. In other embodiments, each task instance in the task instance set is traversed, the historical execution status of each task instance in the task instance set is determined, and the first task instance is determined based on the historical execution status, such as determining the task instance with the shortest historical average execution time or the task instance with the least historical average resource usage as the first task instance, etc.
[0049] Continue as Figure 2 As shown, the task instance set can include task instances of different types. In specific implementation, at least one of the following target task instances is obtained: a blocked task instance and a pending task instance with a reallocation requirement, and the target task instance is added to the task instance set in the database.
[0050] In other words, in this embodiment, the task instances with scheduling needs and pending processing can include blocked task instances and task instances awaiting execution that require reallocation. A blocked task instance can be understood as a task instance that should be executed but has not yet been executed due to insufficient available cluster resources in the queue to be scheduled. For example, task instance A should originally be scheduled to be executed in queue A, but the currently available cluster resources in queue A are insufficient to process task instance A. In this case, task instance A is a blocked task instance. Typically, when using a task processing system to monitor the overall task execution status of the task chain, the task processing system can directly return blocked task instances.
[0051] A pending task instance with a reallocation requirement can be understood as a task instance that is ready to be executed but cannot be scheduled to the default queue. The following section combines... Figure 3 The flowchart shown is used for illustration.
[0052] A1: Retrieves the second task instance that is currently being executed in multiple queues.
[0053] A2: Based on the task chain where the task node that generated the second task instance is located, determine the downstream task instance that is adjacent to the second task instance and depends only on the second task instance.
[0054] The second task instance can be understood as a task instance currently being executed in multiple queues of the cluster. By identifying the task chain where the task node that generated the second task instance is located, we can find task instances downstream of the second task instance that depend solely on the second task instance.
[0055] For example, the second task instance is task instance A. Task instance A is generated by task node A in task chain A. The logical relationship between task nodes in task chain A is "task node A -> task node B -> task node C". Task node B is a task node that is adjacent to task node A and depends only on task node A (i.e., the upstream task node only includes task node A). Therefore, the task instance generated by task node B is the downstream task instance of task instance A.
[0056] Since the second task instance is the currently executing task instance in the queue, and downstream task instances depend only on the second task instance, the downstream task instances should be executed after the second task instance completes its execution. By monitoring the current queue status of multiple queues, we can anticipate downstream task instances that are about to be executed in the queue, thus enabling us to determine whether there is a need for reallocation of downstream task instances.
[0057] A3: For each downstream task instance, perform the following steps: In response to the execution time of the second task instance adjacent to the downstream task instance meeting the first set condition and the queue operation information of the queue associated with the downstream task instance meeting the second set condition, determine the downstream task instance as a task instance to be executed with a reallocation requirement.
[0058] The first precondition can be understood as a condition used to characterize the remaining execution time of a second task instance adjacent to the downstream task instance, indicating that the second task instance adjacent to the downstream task instance is about to complete execution. For example, the first precondition can be that the remaining execution time of the second task instance adjacent to the downstream task instance is less than a first time threshold. The remaining execution time can be determined by the difference between the historical average execution time and the current execution time of the second task instance adjacent to the downstream task instance.
[0059] The second condition can be understood as a condition indicating that the queue associated with the downstream task instance does not have sufficient cluster resources to execute the downstream task instance. For example, the second condition could be that the cluster resource utilization rate of the queue associated with the downstream task instance is greater than the first proportion.
[0060] For example, the second task instances are task instance A1 and task instance B1. The downstream task instance adjacent to task instance A1 and dependent only on task instance A1 is task instance A2. The queue associated with task instance A2 (i.e., the default queue of task instance A1) is queue A. The downstream task instance adjacent to task instance B1 and dependent only on task instance B1 is task instance B2. The queue associated with task instance B2 (i.e., the default queue of task instance B1) is queue B. If the execution time of task instance A1 meets the first set condition, and queue A meets the second set condition, then task instance A2 is a task instance awaiting execution with a redistribution requirement. If the execution time of task instance B1 does not meet the first set condition, or queue B meets the second set condition, then task instance B2 is not a task instance awaiting execution with a redistribution requirement.
[0061] When the execution time of the second task instance adjacent to the downstream task instance meets the first set condition and the queue operation information of the queue associated with the downstream task instance meets the second set condition, it indicates that the second task instance is about to complete execution and will soon execute the downstream task instance. However, the default queue of the downstream task instance does not have enough cluster resources to execute the downstream task instance. Therefore, if the downstream task instance is sent to the default queue after the second task instance completes execution, the queue will not be able to execute the downstream task instance immediately, which will cause the task to be blocked.
[0062] Therefore, in this case, there is a need to reallocate the downstream task instance. The downstream task instance needs to be assigned to other queues (i.e., queues other than the default queue in the cluster) for task processing to ensure that the downstream task instance can be executed smoothly and reduce task blocking in the overall task processing process.
[0063] S102: Determine the task execution information of the first task instance, and determine the queue operation information of multiple queues.
[0064] In this embodiment, the process of determining the queue scheduling strategy is similar to that of the access control model; see below for further details. Figure 2 The access control model includes three types of functional modules: policy enforcement points, policy decision points, and policy information points.
[0065] In determining the queue scheduling strategy, the strategy execution point can be used to receive queue scheduling requests and return the target queue to the calling end, ensuring the reasonable allocation and effective utilization of cluster resources in the queue. The strategy role point can be used to combine task execution information and queue operation information to determine the target queue for the first task instance. The strategy information point can be used to obtain task execution information and queue operation information.
[0066] The task execution information can be understood as information related to the execution of the first task instance. In other words, the task execution information can be used to describe the situation related to the execution of the first task instance. For example, the task execution information may include at least one of the following: the amount of resources required to execute the first task instance, the execution time of the first task instance, and the task priority of the first task instance.
[0067] Queue operation information can be understood as information related to the task execution status of the queue. In other words, queue operation information can be used to describe the current task execution status of the queue. For example, queue operation information may include at least one of the following: the amount of resources used by the queue, the number of task instances currently executing in the queue, and the queue's release time.
[0068] In some possible implementations, task execution information and queue operation information can be obtained from the middleware by calling the interface to obtain task execution information and queue operation information, and to determine the current resource usage of each queue, queue configuration strategy, priority of task instance, resource requirements of task instance, and other information.
[0069] S103: Based on the queue operation information, determine the first queue set from multiple queues, and based on the task execution information, determine the second queue set from multiple queues.
[0070] In this embodiment, the target queue for the first task instance is determined jointly from two aspects: queue operation information and task execution information. Since queue operation information reflects the task processing capacity and cluster resource usage of each queue, the first queue set determined by combining the queue operation information can include queues that are allowed to receive task instances. Since task execution information reflects the cluster resource requirements of the first task instance, the second queue set determined by combining the task execution information can include queues that meet the task execution requirements of the first task instance.
[0071] In some embodiments, the first task instance may also be configured with an exclusion queue set, that is, queues that are not intended to be used are configured considering the business logic or specific needs of the first task instance itself. In this case, queues in the exclusion queue set can be filtered out from multiple queues, and the first queue set and the second queue set can be determined from the filtered queues to avoid unnecessary task instance scheduling attempts.
[0072] In other embodiments, the first task instance may also be configured with a responsible person; that is, different task chains or task nodes may be configured with different responsible persons, and different responsible persons may correspond to different sets of permission queues. In this case, the permission queue set corresponding to the responsible person of the first task instance can be selected from multiple queues, and the first queue set and the second queue set can be selected from the permission queue set to ensure the security of task processing.
[0073] The specific process for determining the first and second queue sets is described below. In practice, for each queue, the following steps are performed: In response to satisfying at least one of the following: the resource usage of the queue is less than the resource usage threshold of the queue, the number of task instances being executed in the queue is less than the task instance number threshold of the queue, and the current time belongs to the release time of the queue, the queue is determined as a queue in the first queue set.
[0074] The resource usage of a queue can be understood as the cluster resources currently used by the queue to execute other task instances. For example, resource usage may include the central processing unit (CPU) resources and memory resources currently used by the queue. The number of task instances currently being executed in the queue can be understood as the number of task instances that the queue is currently using cluster resources for processing. The queue's yield time can be understood as the time period during which the queue can process task instances.
[0075] In other words, by combining the real-time resource usage of the queues with the queue configuration strategy, the queues available at the current moment are selected from multiple queues to determine the first queue set. When the resource usage of a queue is less than its resource usage threshold, it indicates that the amount of cluster resources used by the queue has not exceeded the set threshold, and there are remaining cluster resources to process new task instances, ensuring the stable operation of the task processing system and the reasonable allocation of cluster resources, avoiding system performance degradation. When the number of task instances currently executing in a queue is less than the task instance count threshold for that queue, it indicates that the number of task instances currently executing in the queue has not exceeded the set threshold, and new task instances can be executed, avoiding delays in task instances due to overload. When the current time is within the queue's release time, it indicates that the queue can receive and execute new task instances at the current time, ensuring the availability of cluster resources and the smooth execution of task instances.
[0076] For each queue, perform the following steps: In response to satisfying at least one of the following: the amount of resources required to execute the first task instance is less than the resource usage threshold for a task instance of the queue, the execution time of the first task instance is less than the execution time threshold for a task instance of the queue, and the task priority of the first task instance is within the priority range of the queue, the queue is determined as a queue in the second queue set.
[0077] The resource usage required to execute the first task instance can be understood as the estimated cluster resources needed to execute the first task instance. For example, the resource usage required to execute the first task instance may include the estimated CPU and memory resources needed to execute the first task instance. The execution time of the first task instance can be understood as the estimated time required to execute the first task instance. The task priority of the first task instance can be used to characterize the importance and urgency of the first task instance.
[0078] In some possible implementations, the execution time of the first task instance can be determined by first obtaining multiple historical task instances generated by the first task node that generated the first task instance within a historical time period, and then determining the execution time of the first task instance based on the resource usage of the multiple historical task instances and their execution times. The task priority of the first task instance can be pre-configured.
[0079] In other words, by combining the estimated resource usage of the first task instance with the task execution capacity of the queue, the queue capable of processing the first task instance at the current moment is selected from multiple queues, thus determining the second queue set. When the resource usage required to execute the first task instance is less than the resource usage threshold of the queue for a single task instance, it indicates that the queue meets the cluster resource requirements of the first task instance, ensuring reasonable allocation of cluster resources. When the execution time of the first task instance is less than the execution time threshold of the queue for a single task instance, it indicates that the queue meets the execution time requirements of the first task instance, better planning the execution of each task instance in the queue. When the task priority of the first task instance is within the priority range of the queue, it indicates that the queue can accept the first task instance, preventing low-priority task instances from consuming excessive cluster resources, while ensuring that the queue's task execution capacity meets the needs of the first task instance.
[0080] S104: Determine the target queue based on the first queue set and the second queue set, and send the first task instance to the target queue.
[0081] After determining the first queue set and the second queue set, the target queue for processing the first task instance is determined, and the first task instance is sent to the target queue to complete the scheduling of the task instance. In this way, the first task instance is assigned to the most suitable queue in the cluster.
[0082] Combination Figure 2 For example, the cluster includes queue 1, queue 2 and queue 3. Different queues are allocated different cluster resources. After determining the target queue of the first task instance, the first task instance is sent to the target queue for task processing. For example, queue 1 can execute task 1 and task 2, queue 2 can execute task 3, and queue 3 can execute task 4, task 5 and task 6.
[0083] In some possible implementations, the queues in the intersection of the first queue set and the second queue set are determined, and the target queue is determined based on the queues in the intersection of the first queue set and the second queue set.
[0084] Since the queues in the first queue set are queues that are allowed to receive task instances, and the queues in the second queue set are queues that meet the task execution requirements of the first task instance, by determining the intersection of the first queue set and the second queue set, the queues in the intersection set both allow receiving task instances and meet the task execution requirements of the first task instance. After scheduling the first task instance to the queues in the intersection set, the queues in the intersection set can use the allocated cluster resources to process the first task instance, without over-allocation or under-allocation of cluster resources, thus ensuring the smooth execution of the first task instance.
[0085] In some embodiments, the queues in the intersection of the first queue set and the second queue set may include multiple candidate queues. In other words, there are multiple candidate queues in the cluster that all allow receiving task instances and meet the task execution requirements of the first task instance. In this case, the historical resource usage of the multiple candidate queues is determined, and based on the historical resource usage of the multiple candidate queues, the target queue is determined from the multiple candidate queues.
[0086] Among them, historical resource usage can be used to characterize the trend of candidate queues using cluster resources to process task instances over multiple historical time units. For example, the unit of time can be one day, and historical resource usage can be the trend of the number of resources used by the candidate queue over the past 15 days.
[0087] By analyzing the historical resource usage of multiple candidate queues, we can determine their cluster resource usage patterns, such as which time periods saw higher and lower cluster resource usage. This allows us to predict the future cluster resource usage of candidate queues to some extent, enabling us to select a target queue from among them. This avoids situations where the target queue experiences cluster resource strain in future periods due to processing the first task instance, thus achieving a more comprehensive decision-making process.
[0088] After determining the target queue, cluster resource caching operations can be performed. Specifically, the resource usage required to execute the first task instance is cached in the target queue, and the first task instance is sent to the target queue.
[0089] In some possible implementations, the number of resources cached in the target queue can be set with an expiration time. Thus, after selecting a suitable target queue from multiple queues in the cluster, the cluster resources required by the first task instance are pre-cached, and these cluster resources are retained in the target queue, ensuring the smooth execution of the first task instance.
[0090] It should be noted that in some embodiments, the first queue set or the second queue set can be empty. That is, there are no queues in the cluster that are allowed to receive task instances, or there are no queues in the cluster that meet the task execution requirements of the first task instance. In this case, since there is no target queue in the cluster capable of executing the first task instance, a response indicating that the cluster resources are not yet ready can be returned until a target queue exists in the cluster, at which point the first task instance will be scheduled to the target queue for processing.
[0091] This method provides a scheduling strategy for queues in a cluster. It determines the set of queues capable of receiving task instances and the set of queues capable of executing task instances by considering both the task execution information of the task instance to be scheduled and the queue operation information of multiple queues in the cluster. This, in turn, determines the target queue for executing the task instance. By combining the current task execution status and the queue's own task execution capabilities, task instances are rationally allocated among multiple queues in the cluster, achieving flexible task instance scheduling, fully utilizing cluster resources, and improving the overall efficiency of task processing.
[0092] The preceding text described the process of scheduling the first task instance to the target queue in the cluster. Since the task processing system can process the task instances generated in the task chain, and considering the overall processing efficiency of the services or functional points corresponding to the task chain, this application embodiment can also optimize the task nodes in the task chain.
[0093] In practice, the key task nodes in the first task chain are identified and optimized.
[0094] Among them, critical task nodes, also known as bottleneck task nodes, can be understood as task nodes that negatively impact the overall processing efficiency of the task chain. By identifying critical task nodes in the first task chain and optimizing them, the processing time of each task node in the first task chain can be reduced, thus achieving targeted efficiency improvements for the first task chain.
[0095] In some possible implementations, a critical task node may include at least one of the following: ① a task node in a critical sub-link of the first task chain whose average execution time of the task instance satisfies a third predefined condition, wherein the critical sub-link is the longest sub-link in the first task chain; ② a task node in the first task chain whose average resource usage required to execute the task instance satisfies a fourth predefined condition; ③ a task node in the first task chain whose ratio of the average resource usage of the first type to the average resource usage of the second type required to execute the task instance satisfies a fifth predefined condition; ④ an external task node associated with the first task node in the first task chain.
[0096] The third condition can be understood as a condition used to characterize the average processing time of a task instance being relatively long. For example, the third condition could be that the average execution time of a task instance is greater than the second time threshold. Considering that the path of the critical sub-link is relatively long, processing the task instances generated by the task nodes in the critical sub-link can consume a lot of time and cluster resources. Therefore, identifying the task instances with longer average execution times from the critical sub-link and performing targeted optimization on the task nodes that generate these task instances can improve the processing efficiency of the critical sub-link, thereby improving the overall processing efficiency of the first task link.
[0097] The fourth condition can be understood as a condition that characterizes the average cluster resource usage of processing task instances. For example, the fourth condition could be that the average resource usage of task instances is greater than the first condition. By identifying task instances in the first task chain that consume a lot of cluster resources, targeted optimization is performed on the task nodes that generate these task instances, reducing the consumption of cluster resources by task instances in the first task chain, improving the reasonable utilization rate of cluster resources, and increasing task processing efficiency.
[0098] The fifth condition can be understood as a condition characterizing the imbalance in the cluster resources required to process task instances. For example, the fifth condition could be that the ratio of the average resource usage of the first type to the average resource usage of the second type required to execute a task instance is greater than the second ratio. The first type of resource can be CPU resources, and the second type of resource can be memory resources. By identifying task instances with unreasonable cluster resource allocation in the first task chain, targeted optimization is performed on the task nodes that generate these task instances, improving the concurrency of multiple queues in the cluster at the same time, enabling multiple queues in the cluster to process more task instances simultaneously.
[0099] The first task chain can rely on external task nodes. That is, the task instance generated by the first task node in the first task chain needs to use the task execution data of the task instance generated by the external task node for task processing. Therefore, targeted optimization of the external task node can improve the speed at which the task instance generated by the external task node produces task execution data, thereby improving the overall processing efficiency of the first task node.
[0100] It should be noted that the embodiments of this application do not limit the way to optimize critical task nodes. For example, the code logic of critical task nodes can be optimized to reduce redundant code in critical task nodes. Or, the algorithm of task nodes can be optimized to use a more efficient algorithm for data processing.
[0101] After optimizing the key task nodes, the optimization metrics for the first task chain can be determined. These metrics can be used to measure the effectiveness of the optimization of the key task nodes.
[0102] The optimization metrics may include at least one of the following: the execution time of task instances generated by each task node in the first task chain; the cumulative execution time of task instances generated by each task node in the key sub-links of the first task chain; the number of resources used by each task instance generated by each task node in the key sub-links of the first task chain; and the ratio of the number of first-type resources used to the number of second-type resources used in each task instance generated by each task node in the key sub-links of the first task chain.
[0103] By calculating the execution time of task instances generated by each task node in the first task chain, we can measure whether optimizing the critical task nodes has reduced the overall execution time of the first task chain. By calculating the cumulative execution time of task instances generated by each task node in the critical sub-links of the first task chain, we can specifically evaluate the execution performance of the critical sub-links and measure whether optimizing the critical task nodes has improved their execution efficiency. By calculating the resource usage of task instances generated by each task node in the critical sub-links of the first task chain, we can measure whether optimizing the critical task nodes has reduced the overall resource consumption of the first task chain. By calculating the ratio of the number of first-type resource usages to the number of second-type resource usages in the task instances generated by each task node in the critical sub-links of the first task chain, we can measure whether optimizing the critical task nodes has made the cluster resource allocation of the first task chain more reasonable.
[0104] In this way, by optimizing indicator values and quantitatively measuring the optimization effect, the effectiveness of optimizing key task nodes can be reflected in multiple aspects. Furthermore, optimization indicator values can be calculated periodically, and the optimization effect at different stages can be analyzed, allowing for effective measurement of the optimization effect on key task nodes.
[0105] The task processing system used to execute the task processing method in this embodiment can be provided as a cloud service. See also Figure 4 The diagram shows the architecture of a task processing system. The task processing system adopts a layered architecture, which is divided into three layers from top to bottom: the application layer, the service layer, and the interface layer.
[0106] The application layer can be used to detect the running status of task instances, schedule task instances, and periodically calculate and optimize metrics. For example, the application layer can perform real-time monitoring of critical task nodes to prevent overall processing efficiency degradation caused by task instance blocking at critical task nodes.
[0107] The service layer provides services related to task processing. Specifically, it can offer interaction tools, processing services, and auxiliary tools. Interaction tools communicate with external systems or components to achieve efficient data acquisition and transmission. Processing services address practical needs during task processing, such as task instance status monitoring, task fault handling, and platform operation. Auxiliary tools collect and record relevant information during task processing, such as issuing alerts for task processing anomalies and providing task instance scheduling logs.
[0108] The interface layer provides stable and reliable interfaces for the service and application layers. Specifically, it can provide data access and interaction interfaces for interacting with and transmitting data with systems and components such as databases and distributed transaction processing systems during task processing.
[0109] By employing a layered architecture, the different functions and modules of the task processing system are clearly defined, making the system more modular, enhancing its flexibility and adaptability, better able to respond to changes in business needs, and highly scalable. Furthermore, the independence and low coupling between each layer effectively reduce maintenance costs and enhance maintainability.
[0110] The above text combined Figures 1 to 4 The task processing method provided in the embodiments of this application has been described in detail. The apparatus and equipment provided in the embodiments of this application will be described below with reference to the accompanying drawings.
[0111] See Figure 5 The schematic diagram of the task processing device shown shows that the device 50 includes:
[0112] Module 501 is used to obtain the first task instance;
[0113] The first determining module 502 is used to determine the task execution information of the first task instance and the queue operation information of multiple queues; wherein, the task execution information is information related to the execution of the first task instance, the multiple queues are used to execute the task instance, and the queue operation information is information related to the task execution status of the queues;
[0114] The second determining module 503 is configured to determine a first queue set from the plurality of queues based on the queue operation information, and to determine a second queue set from the plurality of queues based on the task execution information; wherein the first queue set includes queues that are allowed to receive task instances, and the second queue set includes queues that meet the task execution requirements of the first task instance;
[0115] The scheduling module 504 is used to determine a target queue based on the first queue set and the second queue set, and send the first task instance to the target queue.
[0116] In some possible implementations, the acquisition module 501 is specifically used for:
[0117] Retrieve a set of task instances from the database; wherein the database is used to store task instances to be scheduled.
[0118] From the set of task instances, determine the first task instance.
[0119] In some possible implementations, the acquisition module 501 is further configured to:
[0120] Obtain at least one of the following target task instances: a blocked task instance and a pending task instance that has a redistribution requirement;
[0121] Add the target task instance to the task instance collection in the database.
[0122] In some possible implementations, the target task instance includes the task instance to be executed that has a reallocation requirement; the acquisition module 501 is specifically used for:
[0123] Obtain the second task instance that is currently being executed in the plurality of queues;
[0124] Based on the task chain in which the task node that generated the second task instance is located, determine the downstream task instance that is adjacent to the second task instance and depends only on the second task instance;
[0125] For each of the downstream task instances, the following steps are performed: in response to the execution time of a second task instance adjacent to the downstream task instance meeting a first set condition and the queue operation information of the queue associated with the downstream task instance meeting a second set condition, the downstream task instance is determined as a task instance to be executed that has a reallocation requirement.
[0126] In some possible implementations, the queue operation information includes at least one of the following: the resource usage of the queue, the number of task instances currently executing in the queue, and the queue's release time; the second determining module 503 is specifically used for:
[0127] For each queue, the following steps are performed: in response to satisfying at least one of the following: the resource usage of the queue is less than the resource usage threshold of the queue, the number of task instances being executed in the queue is less than the task instance number threshold of the queue, and the current time belongs to the release time of the queue, the queue is determined as a queue in the first queue set.
[0128] In some possible implementations, the task execution information includes at least one of the following: the amount of resources required to execute the first task instance, the execution time of the first task instance, and the task priority of the first task instance; the second determining module 503 is specifically used for:
[0129] For each queue, the following steps are performed: in response to satisfying at least one of the following: the amount of resources required to execute the first task instance is less than the resource usage threshold for a task instance of the queue, the execution time of the first task instance is less than the execution time threshold for a task instance of the queue, and the task priority of the first task instance is within the priority range of the queue, the queue is determined as a queue in the second queue set.
[0130] In some possible implementations, the scheduling module 504 is specifically used for:
[0131] Determine the queues in the intersection of the first queue set and the second queue set;
[0132] The target queue is determined based on the queues in the intersection of the first queue set and the second queue set.
[0133] In some possible implementations, the queues in the intersection of the first queue set and the second queue set include multiple candidate queues; the scheduling module 504 is specifically used for:
[0134] Determine the historical resource usage of the multiple candidate queues;
[0135] Based on the historical resource usage of the multiple candidate queues, the target queue is determined from the multiple candidate queues.
[0136] In some possible implementations, the task execution information includes the amount of resources required to execute the first task instance; the scheduling module 504 is specifically used for:
[0137] The resource usage required to execute the first task instance is cached in the target queue, and the first task instance is sent to the target queue.
[0138] In some possible implementations, the first task instance is generated by a first task node, which is a task node in a first task chain; the device 50 further includes an optimization module, which is used to:
[0139] Identify the key task nodes in the first task chain;
[0140] The key task nodes are optimized.
[0141] In some possible implementations, the critical task node includes at least one of the following:
[0142] In the critical sub-links of the first task link, the task node whose average execution time of the task instance meets the third set condition, the critical sub-link is the sub-link with the longest path in the first task link;
[0143] In the first task chain, the task nodes whose average resource usage required to execute the task instance meets the fourth set condition;
[0144] In the first task chain, the task nodes whose ratio of the average resource usage of the first type to the average resource usage of the second type required to execute the task instance meets the fifth set condition;
[0145] An external task node associated with the first task node in the first task chain.
[0146] In some possible implementations, the optimization module is further configured to:
[0147] Determine the optimization index value of the first task link; wherein the optimization index value is used to measure the optimization effect after optimizing the key task node;
[0148] The optimization index value includes at least one of the following:
[0149] The execution time of the task instances generated by each task node in the first task chain;
[0150] The cumulative execution time of task instances generated by each task node in the key sub-link of the first task chain;
[0151] The resource usage of each task instance generated by each task node in the key sub-link of the first task chain;
[0152] The ratio of the number of resources of the first type to the number of resources of the second type in the task instances generated by each task node in the key sub-link of the first task link.
[0153] The task processing apparatus 50 according to the embodiments of this application can correspond to executing the methods described in the embodiments of this application, and the above and other operations and / or functions of each module / unit of the task processing apparatus 50 are respectively for implementing Figure 1 For the sake of brevity, the corresponding processes of each method in the illustrated embodiments will not be described in detail here.
[0154] This application also provides an electronic device. This electronic device is specifically used to implement, as described above. Figure 5 The function of the task processing device 50 in the illustrated embodiment.
[0155] Figure 6 A structural schematic diagram of an electronic device 600 is provided, such as... Figure 6 As shown, the electronic device 600 includes a bus 601, a processor 602, a communication interface 603, and a memory 604. The processor 602, the memory 604, and the communication interface 603 communicate with each other via the bus 601.
[0156] Bus 601 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be divided into address buses, data buses, control buses, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0157] The processor 602 can be any one or more of the following processors: central processing unit (CPU), graphics processing unit (GPU), microprocessor (MP), or digital signal processor (DSP).
[0158] The communication interface 603 is used for external communication. For example, the communication interface 603 can be used to communicate with a terminal.
[0159] Memory 604 may include volatile memory, such as random access memory (RAM). Memory 604 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0160] The memory 604 stores executable code, and the processor 602 executes the executable code to perform the aforementioned task processing method.
[0161] Specifically, in achieving Figure 5 In the case of the illustrated embodiment, and Figure 5 When the modules or units of the task processing device 50 described in the embodiment are implemented by software, the execution... Figure 5 The software or program code required for the functions of each module / unit can be partially or wholly stored in memory 604. Processor 602 executes the program code corresponding to each unit stored in memory 604 to perform the aforementioned task processing method.
[0162] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the task processing method applied to the task processing apparatus 50 described above.
[0163] This application also provides a computer program product comprising one or more computer instructions. When the computer instructions are loaded and executed on a computing device, all or part of the processes or functions described in this application are generated.
[0164] The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, or data center to another website, computer, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0165] When the computer program product is executed by a computer, the computer performs any of the aforementioned task processing methods. The computer program product can be a software installation package; when any of the aforementioned task processing methods is required, the computer program product can be downloaded and executed on the computer.
[0166] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0167] The units described in the embodiments of this application can be implemented in software or hardware. The names of the units / modules do not necessarily limit the specific unit itself.
[0168] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0169] In the context of embodiments of this application, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0170] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems or apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and relevant parts can be referred to the method section.
[0171] 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.
[0172] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0173] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0174] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A task processing method, characterized in that, The method includes: Obtain the first task instance; The task execution information of the first task instance is determined, and the queue operation information of multiple queues is determined; wherein, the task execution information is information related to the execution of the first task instance, the multiple queues are used to execute the task instance, and the queue operation information is information related to the task execution status of the queue; Based on the queue operation information, a first queue set is determined from the plurality of queues, and based on the task execution information, a second queue set is determined from the plurality of queues; wherein, the first queue set includes queues that are allowed to receive task instances, and the second queue set includes queues that meet the task execution requirements of the first task instance; Based on the first queue set and the second queue set, a target queue is determined, and the first task instance is sent to the target queue.
2. The method according to claim 1, characterized in that, The process of obtaining the first task instance includes: Retrieve a set of task instances from the database; wherein the database is used to store task instances to be scheduled. From the set of task instances, determine the first task instance.
3. The method according to claim 2, characterized in that, The method further includes: Obtain at least one of the following target task instances: a blocked task instance and a pending task instance that has a redistribution requirement; Add the target task instance to the task instance collection in the database.
4. The method according to claim 3, characterized in that, The target task instance includes the task instance to be executed that has a redistribution requirement; The acquisition of at least one of the following target task instances: blocked task instances and pending task instances with reallocation requirements, includes: Obtain the second task instance that is currently being executed in the plurality of queues; Based on the task chain in which the task node that generated the second task instance is located, determine the downstream task instance that is adjacent to the second task instance and depends only on the second task instance; For each of the downstream task instances, the following steps are performed: in response to the execution time of a second task instance adjacent to the downstream task instance meeting a first set condition and the queue operation information of the queue associated with the downstream task instance meeting a second set condition, the downstream task instance is determined as a task instance to be executed that has a reallocation requirement.
5. The method according to claim 1, characterized in that, The queue operation information includes at least one of the following: the amount of resources used by the queue, the number of task instances currently being executed in the queue, and the queue's release time; The step of determining the first queue set from the plurality of queues based on the queue operation information includes: For each queue, the following steps are performed: in response to satisfying at least one of the following: the resource usage of the queue is less than the resource usage threshold of the queue, the number of task instances being executed in the queue is less than the task instance number threshold of the queue, and the current time belongs to the release time of the queue, the queue is determined as a queue in the first queue set.
6. The method according to claim 1, characterized in that, The task execution information includes at least one of the following: the amount of resources required to execute the first task instance, the execution time of the first task instance, and the task priority of the first task instance; The step of determining the second queue set from the plurality of queues based on the task execution information includes: For each queue, the following steps are performed: in response to satisfying at least one of the following: the amount of resources required to execute the first task instance is less than the resource usage threshold for a task instance of the queue, the execution time of the first task instance is less than the execution time threshold for a task instance of the queue, and the task priority of the first task instance is within the priority range of the queue, the queue is determined as a queue in the second queue set.
7. The method according to claim 1, characterized in that, The step of determining the target queue based on the first queue set and the second queue set includes: Determine the queues in the intersection of the first queue set and the second queue set; The target queue is determined based on the queues in the intersection of the first queue set and the second queue set.
8. The method according to claim 7, characterized in that, The queues in the intersection of the first queue set and the second queue set include multiple candidate queues; determining the target queue based on the queues in the intersection of the first queue set and the second queue set includes: Determine the historical resource usage of the multiple candidate queues; Based on the historical resource usage of the multiple candidate queues, the target queue is determined from the multiple candidate queues.
9. The method according to claim 1, characterized in that, The task execution information includes the amount of resources required to execute the first task instance; sending the first task instance to the target queue includes: The resource usage required to execute the first task instance is cached in the target queue, and the first task instance is sent to the target queue.
10. The method according to any one of claims 1 to 9, characterized in that, The first task instance is generated by a first task node, which is a task node in a first task chain; the method further includes: Identify the key task nodes in the first task chain; The key task nodes are optimized.
11. The method according to claim 10, characterized in that, The critical task node includes at least one of the following: In the critical sub-links of the first task link, the task node whose average execution time of the task instance meets the third set condition, the critical sub-link is the sub-link with the longest path in the first task link; In the first task chain, the task nodes whose average resource usage required to execute the task instance meets the fourth set condition; In the first task chain, the task nodes whose ratio of the average resource usage of the first type to the average resource usage of the second type required to execute the task instance meets the fifth set condition; An external task node associated with the first task node in the first task chain.
12. The method according to claim 10, characterized in that, After optimizing the critical task nodes, the method further includes: Determine the optimization index value of the first task link; wherein the optimization index value is used to measure the optimization effect after optimizing the key task node; The optimization index value includes at least one of the following: The execution time of the task instances generated by each task node in the first task chain; The cumulative execution time of task instances generated by each task node in the key sub-link of the first task chain; The resource usage of each task instance generated by each task node in the key sub-link of the first task chain; The ratio of the number of resources of the first type to the number of resources of the second type in the task instances generated by each task node in the key sub-link of the first task link.
13. A task processing device, characterized in that, The device includes: The acquisition module is used to acquire the first task instance; The first determining module is used to determine the task execution information of the first task instance and the queue operation information of multiple queues; wherein the task execution information is information related to the execution of the first task instance, the multiple queues are used to execute the task instance, and the queue operation information is information related to the task execution status of the queues; The second determining module is configured to determine a first queue set from the plurality of queues based on the queue operation information, and to determine a second queue set from the plurality of queues based on the task execution information; wherein the first queue set includes queues that are allowed to receive task instances, and the second queue set includes queues that meet the task execution requirements of the first task instance; The scheduling module is used to determine a target queue based on the first queue set and the second queue set, and send the first task instance to the target queue.
14. An electronic device, characterized in that, The electronic device includes a processor and a memory; The processor is configured to execute instructions stored in the memory, causing the electronic device to perform the method as described in any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that, Includes instructions that instruct an electronic device to perform the method as described in any one of claims 1 to 12.
16. A computer program product, characterized in that, The computer program product includes computer-readable instructions for implementing the method according to any one of claims 1 to 12.