Task scheduling method and device, computing equipment and storage medium

CN120569712APending Publication Date: 2025-08-29BOE TECHNOLOGY GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380012611.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-28
Publication Date
2025-08-29

AI Technical Summary

Technical Problem

In the prior art, task scheduling efficiency is low, especially in distributed systems, the scheduling and execution efficiency of timing tasks is difficult to meet complex business needs.

Method used

By obtaining the time slice sent by the time poller, matching the task list based on the task event model, combining the node selection strategy, selecting the appropriate target node from multiple execution nodes to perform timing tasks, and decoupling during the task registration process to avoid blockage.

Benefits of technology

It improves the efficiency of task scheduling and the execution efficiency of timing tasks, improves the system throughput, and realizes a non-blocking task execution process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120569712A_ABST
    Figure CN120569712A_ABST
Patent Text Reader

Abstract

The invention provides a task scheduling method which comprises the steps that a time slice sent by a time polling device is obtained, the time slice represents time allocated to be used for executing timed tasks in a task list, the task list comprises a plurality of timed tasks registered in the form of task events, each corresponding timed task has a timestamp, and the time slice represents time allocated to be used for executing the timed tasks in the task list; the timestamps represent the time when the corresponding timed tasks are to be executed; based on the time slice, a matched task event is determined from a task list, and the matched task event represents a target timed task with a timestamp matched with the time slice; determining a node selection strategy; selecting a target node suitable for executing the target timed task from a plurality of execution nodes according to the node selection strategy; and issuing the target timed task to the target node to execute the target timed task.
Need to check novelty before this filing date? Find Prior Art

Description

Task scheduling method and device, computing device and storage medium Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a task scheduling method and apparatus, a computing device, and a computer storage medium. Background Art

[0002] With the development of computer technology, task scheduling, especially distributed task scheduling, has become widely used in various computer systems and business systems. The efficiency of task scheduling directly affects the execution efficiency of computer and business systems. In recent years, the project organization and architecture of various computer and business systems have become increasingly complex, the scope of business coverage has expanded, and the number of scheduled tasks has also increased. Therefore, how to improve the scheduling and execution efficiency of scheduled tasks has become a pressing technical problem.

[0003] Summary of the Invention

[0004] In view of this, the present disclosure provides a task scheduling method and apparatus, a computing device, and a computer storage medium, in an effort to overcome some or all of the above-mentioned deficiencies and other possible deficiencies.

[0005] According to a first aspect of the present disclosure, a task scheduling method is provided, comprising: obtaining a time slice sent by a time poller, wherein the time slice represents the time allocated for executing a scheduled task in a task list, the task list comprising a plurality of scheduled tasks registered in the form of task events, each corresponding scheduled task having a timestamp, the timestamp representing the time at which the corresponding scheduled task is to be executed; based on the time slice, determining a matching task event from the task list, the matching task event representing a target scheduled task having a timestamp matching the time slice; determining a node selection strategy; selecting a target node suitable for executing the target scheduled task from a plurality of execution nodes according to the node selection strategy; and sending the target scheduled task to the target node to execute the target scheduled task.

[0006] In some embodiments, the method further includes: receiving a task registration request, the task registration request being used to request registration of a target task; in response to the target task being a scheduled task, enabling the time poller, and registering the target task as a scheduled task to the task list in the form of a task event, wherein the scheduled task has a timestamp.

[0007] In some embodiments, the method further includes: in response to the target task being a non-scheduled task, registering the target task as a non-scheduled task in a task list in the form of a task event.

[0008] In some embodiments, each corresponding scheduled task has a task identifier for identifying the corresponding scheduled task, and wherein, based on the time slice, a matching task event is determined from the task list, including: in response to the timestamp of the scheduled task represented by the task event in the task list matching the time slice, loading the task list and obtaining the task event from the loaded task list as a matching task event according to the task identifier corresponding to the timestamp.

[0009] In some embodiments, according to the node selection strategy, a target node suitable for executing the target timed task is selected from a plurality of execution nodes, including: in response to the node selection strategy being a node selection strategy based on weight, determining the node weight of each execution node among the plurality of execution nodes, wherein the node weight of each execution node depends on the weighted sum of the delay weight and the load weight of each execution node, the delay weight is used to characterize the delay condition of the corresponding execution node executing the task, and the load weight is used to characterize the load condition of the corresponding execution node executing the task; based on the node weight of each execution node among the plurality of execution nodes, selecting a target node suitable for executing the target timed task from the plurality of execution nodes.

[0010] In some embodiments, the delay weight of each execution node depends on the regional average delay of the node area where the corresponding execution node is located and the regional node delay of the corresponding execution node in the node area, wherein the regional average delay represents the delay in sending the task to the node area where the corresponding execution node is located, and the regional node delay represents the delay in sending the task to the corresponding execution node within the node area.

[0011] In some embodiments, the load weight of each execution node depends on the regional average load of the node area where the corresponding execution node is located and the regional node load of the corresponding execution node in the node area, wherein the regional average load represents the average load of each execution node in the node area for executing tasks, and the regional node load represents the load of the corresponding execution node in the node area.

[0012] In some embodiments, the node weight of each execution node in the plurality of execution nodes is determined by a scheduled task registered in the task list in the form of a task event.

[0013] In some embodiments, according to the node selection strategy, a target node suitable for executing the target timed task is selected from multiple execution nodes, including: in response to the node selection strategy being a specified node strategy, selecting the execution node specified by the specified node strategy from the multiple execution nodes as the target node suitable for executing the target timed task.

[0014] In some embodiments, according to the node selection strategy, a target node suitable for executing the target timed task is selected from multiple execution nodes, including: in response to the node selection strategy being a node selection strategy in sequence, determining the execution node that most recently executed the task from the multiple execution nodes, and selecting an execution node whose execution order is next to the execution node that most recently executed the task from the multiple execution nodes as the target node suitable for executing the target timed task.

[0015] In some embodiments, the target timed task is sent to the target node to execute the target timed task, including: in response to determining that there is no associated task of the target timed task, the target timed task is sent to the target node to execute the target timed task; wherein, the associated task includes at least one of a predecessor task and a successor task of the target timed task, the predecessor task includes the task on which the execution of the target timed task depends, and the successor task includes the task that depends on the execution of the target timed task.

[0016] In some embodiments, the target timed task is sent to the target node to execute the target timed task, including: in response to determining that there is an associated task of the target timed task, and the associated task includes a predecessor task of the target timed task, then when it is determined that the predecessor task has been completed, the target timed task is sent to the target node to execute the target timed task.

[0017] In some embodiments, the target timed task is sent to the target node to execute the target timed task, including: in response to determining that there is an associated task of the target timed task, and the associated task includes a predecessor task of the target timed task, then when it is determined that the predecessor task is not completed, registering a first task callback for the target timed task, so that after the predecessor task is completed, the target timed task is called back so that the target timed task can be sent to the target node to execute the target timed task.

[0018] In some embodiments, the method further includes: sending the target scheduled task to the target node to execute the target scheduled task, including: in response to determining that there is an associated task of the target scheduled task, and the associated task includes a subsequent task of the target scheduled task, registering a second task callback for the target scheduled task, so that after the target scheduled task is executed, the subsequent task is called back to send the subsequent task to the target node.

[0019] According to a second aspect of the present disclosure, a task scheduling device is provided, comprising: an acquisition module configured to acquire a time slice sent by a time poller, wherein the time slice represents the time allocated for executing a scheduled task in a task list, the task list comprising a plurality of scheduled tasks registered in the form of task events, each corresponding scheduled task having a timestamp, and the timestamp representing the time when the corresponding scheduled task is to be executed; a task event determination module configured to determine a matching task event from the task list based on the time slice, the matching task event representing a target scheduled task having a timestamp matching the time slice; a selection strategy determination module configured to determine a node selection strategy; a target node selection module configured to select a target node suitable for executing the target scheduled task from a plurality of execution nodes according to the node selection strategy; and a task dispatching module configured to dispatch the target scheduled task to the target node to execute the target scheduled task.

[0020] According to a third aspect of the present disclosure, a computing device is provided, comprising a processor; and a memory configured to store computer-executable instructions thereon, wherein when the computer-executable instructions are executed by the processor, any of the methods described above is executed.

[0021] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, which stores computer-executable instructions. When the computer-executable instructions are executed, any of the methods described above is executed.

[0022] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising computer executable instructions, which perform any of the methods described above when executed.

[0023] In the task scheduling method and device claimed for protection in the present disclosure, the task list includes a plurality of scheduled tasks registered in the form of task events, and after determining the matching task event from the task list based on the time slice, a target node is selected from a plurality of execution nodes according to a node selection strategy in order to execute the target scheduled task. Therefore, in the present application, all tasks are registered in the form of events, thereby decoupling the overall interaction process, so that the scheduling and execution of tasks are non-blocking, improving the efficiency of task scheduling and improving the efficiency and throughput of scheduled task execution. Moreover, the present application can select a suitable node selection strategy according to the current task scheduling scenario, thereby further improving the efficiency of task scheduling and improving the efficiency and throughput of scheduled task execution.

[0024] These and other advantages of the disclosure will be apparent from and elucidated with reference to the embodiments described hereinafter. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Embodiments of the present disclosure will now be described in more detail and with reference to the accompanying drawings, in which:

[0026] FIG1 shows an exemplary application scenario in which the technical solution according to an embodiment of the present disclosure can be implemented;

[0027] FIG2 illustrates a schematic flow chart of a task scheduling method according to an embodiment of the present disclosure;

[0028] FIG3 illustrates a schematic flowchart of a method for performing task registration according to an embodiment of the present disclosure;

[0029] FIG4 illustrates an exemplary implementation flowchart of the method for performing task registration according to an embodiment of the present disclosure;

[0030] FIG5 illustrates an exemplary implementation flow chart of a method for determining and publishing node weights according to an embodiment of the present disclosure;

[0031] FIG6 illustrates an exemplary implementation flowchart of a method for selecting a target node suitable for executing the target scheduled task under a node selection strategy based on weight according to an embodiment of the present disclosure;

[0032] FIG7 illustrates an exemplary implementation flowchart of a method for performing task relevance checking according to an embodiment of the present disclosure;

[0033] FIG8 illustrates a schematic implementation flow chart of a task scheduling method according to an embodiment of the present disclosure;

[0034] FIG9 illustrates an exemplary structural block diagram of a task scheduling device according to an embodiment of the present disclosure;

[0035] 10 illustrates an example system including an example computing device that represents one or more systems and / or devices that may implement the various techniques described herein. DETAILED DESCRIPTION

[0036] The following description provides specific details of various embodiments of the present disclosure so that those skilled in the art can fully understand and implement the various embodiments of the present disclosure. It should be understood that the technical solutions of the present disclosure can be implemented without some of these details. In some cases, the present disclosure does not show or describe in detail some well-known structures or functions to avoid these unnecessary descriptions from obscuring the description of the embodiments of the present disclosure. The terms used in this disclosure should be understood in their broadest reasonable manner, even if they are used in conjunction with specific embodiments of the present disclosure.

[0037] First, some of the terms involved in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.

[0038] Distributed: refers to breaking a large problem into multiple small problems, solving them one by one, and finally working together to complete a specific task.

[0039] Task scheduling: refers to the process in which computer systems and business systems assign tasks to be executed to resources responsible for execution according to certain strategies and rules.

[0040] Scheduled tasks: refers to the automatic execution of some specified tasks or operations at a specified time point or time interval.

[0041] Event-driven: refers to a decision-making strategy in the process of ongoing transaction management, that is, following the events that occur at the current point in time, mobilizing available resources, and executing related tasks to solve emerging problems and prevent transaction accumulation.

[0042] In the relevant embodiments, scheduled task scheduling relies on annotations to determine whether it is the target scheduled task. This requires polling the annotation class each time, and the framework is highly dependent, making it less universally applicable. Furthermore, the process is highly coupled, and each timer poll requires waiting for the previous schedule to complete, resulting in low efficiency in task scheduling and execution.

[0043] Based on this, the embodiments of the present disclosure provide a task scheduling method and apparatus, a computing device, and a computer storage medium to decouple the overall interactive process of task scheduling, thereby improving the efficiency of task scheduling and enhancing the efficiency and throughput of scheduled task execution.

[0044] Figure 1 illustrates an exemplary application scenario 100 in which the technical solutions according to the embodiments of the present disclosure can be implemented. As shown in Figure 1 , the application scenario includes a terminal 110 and a server 120 , wherein the terminal 110 is communicatively coupled to the server 120 via a network 130 .

[0045] The terminal 110 can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The server 120 can be an independent physical server, or 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 communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application is not limited thereto. The network 130 can be, for example, a wide area network (WAN), a local area network (LAN), a wireless network, a public telephone network, an intranet, and any other type of network well known to those skilled in the art.

[0046] For example, the terminal 110 may interact with a server to execute a function or request the server to execute a function. When executing a function, the server 120 may be involved in executing multiple tasks, which may include scheduled tasks and, optionally, non-scheduled tasks. The server needs to schedule these tasks to ensure accuracy and improve efficiency of task execution.

[0047] For example, the server 120 (specifically, it can be a task scheduling module in the server 120) can obtain a time slice sent by a time poller, wherein the time slice represents the time allocated for executing a scheduled task in a task list, and the task list includes a plurality of scheduled tasks registered in the form of task events, each corresponding scheduled task having a timestamp, and the timestamp represents the time when the corresponding scheduled task is to be executed. The server 120 can determine a matching task event from the task list based on the time slice, the matching task event represents a target scheduled task with a timestamp that matches the time slice, and determine a node selection strategy, and then can select a target node suitable for executing the target scheduled task from a plurality of execution nodes according to the node selection strategy. Finally, the server 120 can send the target scheduled task to the target node to execute the target scheduled task. The execution node can be a part of the server 120 (for example, one or more servers in a server cluster) or other nodes different from the server 120.

[0048] The scenario described above is merely an example of how the embodiments of the present disclosure may be implemented and is not intended to be limiting. For example, in some exemplary scenarios, the above method may also be implemented on terminal 110. In some embodiments, the server may independently perform task scheduling without interacting with the terminal or executing functions based on requests from the terminal, which is not intended to be limiting.

[0049] Figure 2 illustrates a schematic flow chart of a task scheduling method 200 according to an embodiment of the present disclosure. The task scheduling method may be implemented by, for example, the terminal 110 or the server 120 shown in Figure 1. As shown in Figure 2, the method 200 includes the following steps.

[0050] In step 210, a time slice sent by a time poller is obtained. The time slice represents the time allocated for executing a scheduled task in a task list. The task list includes a plurality of scheduled tasks registered in the form of task events. Each corresponding scheduled task has a timestamp, wherein the timestamp represents the time when the corresponding scheduled task is to be executed.

[0051] A time poller can be understood as a timer, which uses a reference clock to implement timing to call different tasks separately. The time poller will periodically or periodically send a time slice representing the time of the reference clock to call the task to be executed in the time slice. Each time stamp indicates the time when the corresponding timed task is to be executed. The timestamp can be recorded in the task list in any suitable manner. In addition, the timed task may also have a task identifier and task content for the user to identify the timed task. The task identifier is used to identify the timed task, and the task content is used to represent the execution logic of the corresponding timed task. The execution logic can be, for example, a program for representing the implementation of the task or any other form of suitable descriptive content.

[0052] During task scheduling, all tasks to be scheduled need to be registered in a task list and wait for scheduling. In an embodiment of the present disclosure, the task list includes multiple scheduled tasks, and the scheduled tasks are all registered in the task list in the form of task events, so that the scheduled tasks can be driven based on the event model, that is, event-driven. In this way, the overall interactive process of task scheduling is decoupled, so that the execution of tasks is non-blocking, thereby improving the efficiency of task scheduling and the efficiency and throughput of scheduled task execution.

[0053] In step 220, based on the time slice, a matching task event is determined from the task list, where the matching task event represents a target scheduled task with a timestamp that matches the time slice. "Match" here can mean "identical." As an example, the timestamp of the scheduled task in the task list can be compared to the time indicated by the time slice to see if they are the same. If the two are the same, the scheduled task is determined to be a matching task event. Of course, if there is no matching task event, the current execution process of the task scheduling method is terminated, and the time slice sent by the time poller is obtained next time.

[0054] As described above, each corresponding scheduled task may have a task identifier for identifying the corresponding scheduled task. In some embodiments, if a time stamp of a scheduled task represented by a task event in the task list matches the time slice, the task list is loaded and the task event is retrieved from the loaded task list as a matching task event based on the task identifier corresponding to the time stamp. This allows the task list to be loaded only when a match is determined, thereby improving the efficiency of determining matching task events.

[0055] In step 230, the node selection strategy is determined. As an example, there may be a variety of node selection strategies, such as a node selection strategy by weight, a designated node strategy, a node selection strategy in order, etc. In the node selection strategy by weight, the execution node for executing the target timed task is selected according to the weight of the execution node. In the designated node strategy, an execution node is designated as the execution node of the target timed task. In the node selection strategy in order, the execution node is selected from multiple execution nodes in order as the execution node of the target timed task. The node selection strategy may depend on the current task scheduling scenario. For example, the node selection strategy by weight is relatively suitable for complex large-scale task scheduling environments, the designated node strategy is relatively suitable for simple small-scale task scheduling environments, and the node selection strategy in order is relatively suitable for medium-sized task scheduling environments.

[0056] In step 240 , a target node suitable for executing the target scheduled task is selected from a plurality of execution nodes according to the node selection strategy.

[0057] In some embodiments, when selecting a target node suitable for executing the target timed task from a plurality of execution nodes according to the node selection strategy, if the node selection strategy is a node selection strategy based on weight, the node weight of each execution node in the plurality of execution nodes is first determined. The node weight of each execution node can be pre-saved in a node status list so that the node weight of each execution node in the plurality of execution nodes can be determined directly from the node status list. The node weight of each execution node depends on the weighted sum of the delay weight and the load weight of each execution node, the delay weight being used to characterize the delay condition of the corresponding execution node executing the task, and the load weight being used to characterize the load condition of the corresponding execution node executing the task. As an example, the delay condition can specifically be the time delay between the execution of the scheduled task and the actual execution of the task by the corresponding execution node, and the load condition can specifically be the number of execution tasks of the corresponding execution node or the proportion of processing resources used when executing the task, etc. Then, based on the node weight of each execution node in the plurality of execution nodes, a target node suitable for executing the target timed task is selected from the plurality of execution nodes. For example, the execution node with the highest node weight can be selected from the multiple execution nodes as the target node. Of course, this is not restrictive. All execution nodes whose node weights are before a predetermined ranking can also be selected, and then an execution node is randomly selected from all execution nodes before the predetermined ranking as the target node.

[0058] In some embodiments, the node weight of each execution node in the plurality of execution nodes can be determined (i.e., calculated) and published by a node weight publishing task, which is a timed task registered in the task list in the form of a task event. This will be described in detail below with reference to FIG5 . Of course, this is not restrictive, and the node weight can also be executed by any other suitable module or entity and saved in the node status list.

[0059] The calculation standard for node weight is deeply related to the actual business scenario. For high-load tasks, the node execution cannot be selected simply based on the node's latency. This may cause the node to be too complex, resulting in a backlog of tasks, inefficient task execution, and a decrease in node throughput. For low-load tasks with high real-time efficiency, it is necessary to select the node with the highest corresponding speed based on latency to improve the real-time performance of task execution. Therefore, the node weight is determined by the weighted sum of the latency weight and load weight of each execution node.

[0060] For example, the node weight S of a node n It can be calculated as follows:

[0061] S n =a*S d +b*Sl ;

[0062] Among them, the S d represents the delay weight of the node, S l represents the load weight of the node. a and b are weighting coefficients for the delay weight and load weight of the node, respectively. The values ​​of the weighting coefficients can be determined as needed.

[0063] In some embodiments, the delay weight S of each execution node d Depends on the regional average delay S of the node area where the corresponding execution node is located dd The regional node delay S of the corresponding execution node in the node area dn The average delay of the area is S dd Characterizes the delay of sending the task to the node area where the corresponding execution node is located, which can be expressed as the average delay of sending the task to multiple different execution nodes in the node area. dn Characterizes the delay of sending the task to the corresponding execution node in the node area. As an example, the delay weight S of each execution node d It can be expressed as S d =-(S dd +S dn Since the delay needs to be as low as possible, the delay weight needs to be negative.

[0064] In some embodiments, the load weight S of each execution node l Depends on the regional average load S of the node region where the corresponding execution node is located ld The regional node load S of the corresponding execution node in the node area ln The average load of the area is S ld Characterizes the average load of each execution node in the node area and the regional node load S ln Characterizes the load of the corresponding execution node in the node area. As an example, the load weight S of each execution node l It can be expressed as S d =-(S ld +S ln Since the load needs to be as low as possible, the load weight needs to be negative.

[0065] In some embodiments, when selecting a target node suitable for executing the target timed task from multiple execution nodes according to the node selection strategy, if the node selection strategy is a specified node strategy, the execution node specified by the specified node strategy is selected from the multiple execution nodes as the target node suitable for executing the target timed task.

[0066] In some embodiments, when selecting a target node suitable for executing the target timing task from a plurality of execution nodes according to the node selection strategy, if the node selection strategy is a node selection strategy in order, the execution node of the most recently executed task is determined from the plurality of execution nodes, and the execution node whose execution order is in the next order of the execution node of the most recently executed task is selected from the plurality of execution nodes as the target node suitable for executing the target timing task. As an example, assume that 10 execution nodes are numbered 1-10 in sequence, and the execution nodes are selected in order according to the order of the numbers. If the execution node of the most recently executed task is numbered 5, the execution node in the next order (i.e., numbered 6) can be selected as the target node suitable for executing the target timing task.

[0067] In step 250, the target scheduled task is sent to the target node to execute the target scheduled task. The target node is responsible for executing the execution logic represented by the task content of the target scheduled task. Scheduled tasks are often not simply single-task executions, but also have the possibility of multi-task associated executions. When a scheduled task has a predecessor or successor task, the associated predecessor and successor tasks need to be processed. Therefore, in some embodiments, before the target scheduled task is sent to the target node, a correlation check can be performed, that is, checking or determining whether there are associated tasks of the target scheduled task, and the associated tasks include at least one of the predecessor task and the successor task of the target scheduled task. The predecessor task includes the task on which the execution of the target scheduled task depends. The successor task includes the task that depends on the execution of the target scheduled task.

[0068] In some embodiments, when it is determined that there is no associated task of the target timed task, the target timed task is sent to the target node to execute the target timed task. If it is determined that there is an associated task of the target timed task, corresponding processing needs to be performed. As an example, when it is determined that there is a predecessor task and the predecessor task is not completed, it is necessary to register a first task callback for the target timed task, so that after the predecessor task is completed, the target timed task is called back so that the target timed task is sent to the target node to execute the target timed task. When it is determined that there is a predecessor task and the predecessor task has been completed, it is necessary to register a first task callback for the target timed task, and directly send the target timed task to the target node to execute the target timed task. When it is determined that there is a subsequent task, it is necessary to register a second task callback for the target timed task, so that after the target timed task is completed, the subsequent task is called back so that the subsequent task is sent to the target node for execution. The conventional process for association is to determine whether the associated task has been completed (usually the predecessor task) after the scheduled task is triggered. If it has not been completed, the execution will continue after it is completed. This will cause thread blocking and waiting, wasting a lot of resources. However, in this embodiment, through an event-driven approach, when it is determined that there is an unfinished predecessor task or a subsequent task, a task callback is registered for the target scheduled task. In this way, when the predecessor task is completed, the execution of the subsequent task is automatically triggered, avoiding thread blocking and waiting, saving a lot of resources.

[0069] In the task scheduling method claimed in the present disclosure, the task list includes a plurality of scheduled tasks registered in the form of task events, and after determining the matching task event from the task list based on the time slice, the target node is selected from the plurality of execution nodes according to the node selection strategy in order to execute the target scheduled task. Therefore, in the present application, all tasks are registered in the form of events, thereby decoupling the overall interaction process, so that the scheduling and execution of tasks are non-blocking, improving the efficiency of task scheduling and improving the efficiency and throughput of scheduled task execution. Moreover, the present application can select a suitable node selection strategy according to the current task scheduling scenario, thereby further improving the efficiency of task scheduling and improving the efficiency and throughput of scheduled task execution.

[0070] As described above, scheduled tasks are registered in the task list in the form of task events. In addition, non-scheduled tasks can also be registered in the task list in the form of task events, but unlike scheduled tasks, non-scheduled tasks are directly scheduled for execution at one time, rather than scheduled for execution. It should be pointed out that task registration is also a part of task scheduling. For a specific task, it needs to be registered in the task list before it can be scheduled for execution. Figure 3 illustrates a schematic flow chart of a method 300 for performing task registration according to an embodiment of the present disclosure. The method 300 for performing task registration can be implemented as part of the task scheduling method 200. The method 300 can also be implemented by, for example, the terminal 110 or the server 120 as shown in Figure 1. As shown in Figure 3, in addition to the method 300 including the following steps.

[0071] In step 310, a task registration request is received, wherein the task registration request is used to request registration of a target task. The target task may be a scheduled task or a non-scheduled task. The task registration request may include an identifier of the target task and the task content. If the target task is a scheduled task, the task registration request may also include a timestamp of the scheduled task.

[0072] In step 320 , it is determined whether the target task is a scheduled task. For example, it can be determined by checking whether the target task has a timestamp.

[0073] In response to the target task being a timed task, in step 330, the time poller is turned on, and the target task is registered as a timed task in the task list in the form of a task event. When the time poller is in the off state, the time poller can be turned on. As an example, when the task scheduling service is started, a timer state change event can be registered in the task registration list. This event is a change event of the time poller switch, and executing this event will change the state of the time poller. When the time poller is in the off state, the timer state change time can be triggered to turn on the time poller.

[0074] In some embodiments, when registering the target task as a scheduled task in a task list in the form of a task event, the timestamp can be used as a new task identifier, and the original task identifier and task content can be registered as the new task content in the task list. This helps improve efficiency when subsequently determining matching task events from the task list based on the time slice, although this is not restrictive.

[0075] Optionally, in response to the target task being a non-scheduled task, the target task is registered as a non-scheduled task in the task list in the form of a task event in step 340. In some embodiments, when the target task is registered as a non-scheduled task in the task list in the form of a task event, the task identifier and task content can be directly registered in the task list.

[0076] It should be noted that the method 300 for performing task registration may be implemented before steps 210 - 250 or simultaneously implemented during steps 210 - 250 to achieve dynamic updating of the task list, which is not restrictive.

[0077] As an example, FIG4 illustrates an exemplary implementation flowchart of the method 300 for performing task registration according to one embodiment of the present disclosure. As shown in FIG4 , at block 401, a task registration request is received, requesting registration of a target task. At block 402, a determination is made as to whether the target task is a scheduled task. If the target task is a scheduled task, at block 403, a check is made as to whether the time poller is enabled. If the time poller is enabled, the task is registered at block 404 so that the scheduled task is registered as a task event in the task list 406. If the time poller is disabled, the time poller is enabled at block 405, and the process then continues with step 404 to register the task so that the scheduled task is registered as a task event in the task list 406. If the target task is a non-scheduled task, the task is directly registered at block 404 so that the non-scheduled task is registered as a task event in the task list 406. This provides a simple and efficient method for performing task registration.

[0078] As described above, the node weight of each execution node in a plurality of execution nodes can be determined (i.e., calculated) and published by a node weight publishing task, which is a timed task registered in the task list in the form of a task event. For example, when the task scheduling service is started, a node weight publishing task can be registered in the task registration list in the form of a task event. The task queries the load and delay of the node and then calculates the node weight based on this. The calculated node weight will be published through the task so that it can be saved in the node status list or the original node weight in the node status list is updated.

[0079] Figure 5 illustrates an exemplary implementation flow chart of a method 500 for determining and publishing node weights according to an embodiment of the present disclosure. As shown in Figure 5, in block 501, the node weight publishing task is registered so that it can be registered as a scheduled task in the form of a task event in the task list shown in block 502. In block 503, the time poller polls the node weight publishing task, that is, based on the time slice sent by the time poller, it is determined from the task list that the matching task event is a node weight publishing task. Then in block 504, the node weight is determined. The method for determining the node weight can refer to step 240 in method 200 and is not repeated here. After determining the node weight, the publishing task can be executed, and the node weight publishing is executed in block 505 so that the node weight is saved in the node status list or the original node weight in the node status list is updated, as shown in block 506.

[0080] Further, as an example, FIG6 illustrates an exemplary implementation flow chart of a method 600 for selecting a target node suitable for executing the target timed task under a weighted node selection strategy according to an embodiment of the present disclosure. As shown in FIG6 , after determining the target timed task in block 601, a list of execution nodes can be queried in block 602, wherein the list records a plurality of selectable execution nodes. Then, in block 603, a target node suitable for executing the target timed task can be selected from the plurality of execution nodes based on the node weight of each execution node in the plurality of execution nodes. Then, in block 604, the target timed task is sent to the target node for execution. In block 605, it can be determined whether the execution of the task is successful. If the execution is successful, the execution success status can be returned in block 606, and if necessary, the target timed task can be re-registered in block 607 for scheduling execution in the next cycle. If the execution fails, the execution is prepared for re-execution in block 608, and the number of failed executions is recorded. In block 609, determine whether the number of times of execution failure exceeds the maximum number of retries. If it exceeds the maximum number of retries, then send an alarm in block 610. If it does not exceed the maximum number of retries, then return to block 601 to re-execute. The re-registration target timed task can be realized by task change task. When the task scheduling service is started, a task change event can be generated in the task registration list. When the timed task of a certain task identifier changes (for example, a timestamp or task content changes, the task is completed or cancelled, etc.), a task change event can be initiated. The task change event can first remove the association relationship of the original timestamp and the task identifier in the task list, and then register the association event of the new timestamp and the task identifier when necessary.

[0081] As described above, in some embodiments, before the target timed task is sent to the target node, an association check can be performed, that is, checking or determining whether there are associated tasks of the target timed task, and the associated tasks include at least one of the predecessor task and the successor task of the target timed task. The predecessor task includes the task on which the execution of the target timed task depends. The successor task includes the task that depends on the execution of the target timed task. If it is determined that there are no associated tasks of the target timed task, the target timed task is sent to the target node to execute the target timed task.

[0082] In some embodiments, in response to determining that there are associated tasks of the target timed task, and the associated tasks include the predecessor tasks of the target timed task, then when it is determined that the predecessor tasks have been completed, the target timed task is sent to the target node to execute the target timed task. In some embodiments, in response to determining that there are associated tasks of the target timed task, and the associated tasks include the predecessor tasks of the target timed task, then when it is determined that the predecessor tasks are not completed, a first task callback is registered for the target timed task, so that after the predecessor tasks are completed, the target timed task is called back so that the target timed task is sent to the target node to execute the target timed task. In this way, when the predecessor tasks are completed, the execution of the successor tasks is automatically triggered, avoiding thread blocking and waiting, and saving a lot of resources.

[0083] In some embodiments, in response to determining that there are associated tasks of the target scheduled task, and the associated tasks include subsequent tasks of the target scheduled task, a second task callback is registered for the target scheduled task, so that after the target scheduled task is executed, the subsequent task is called back to send the subsequent task to the target node. The target scheduled task is the predecessor task of the subsequent task, so similarly, after the target scheduled task is executed, the subsequent task is automatically called back to send the subsequent task to the target node for execution.

[0084] FIG7 illustrates an exemplary implementation flow chart of a method 700 for performing a task relevance check according to an embodiment of the present disclosure. As shown in FIG7 , in block 701, task execution is triggered after the target timed task is determined. Then, a task relevance check can be performed in block 702 to determine whether there are associated tasks of the target timed task, as further shown in block 703. If it is determined that there are no associated tasks of the target timed task, task execution processing is performed in block 704 to send the target timed task to the target node for execution.

[0085] When it is determined that there is an associated task of the target timed task, a check of the predecessor task and the subsequent task is performed in block 705 to determine whether the associated task is a predecessor task or a subsequent task. In the case that the associated task is a predecessor task, it is determined in block 706 whether the predecessor task has been completed. If the predecessor task has been completed, the callback of the predecessor task is executed, that is, the task execution processing is performed in block 704 to send the target timed task to the target node for execution. If the predecessor task has not been completed, the registration task callback is executed in block 707, specifically here registering the first task callback for the target timed task, so that after the predecessor task is completed, the target timed task is called back so that the target timed task can be sent to the target node to execute the target timed task. In the case where the associated task is a subsequent task, register the subsequent task, that is, execute the registration task callback in block 707, specifically registering the second task callback for the target scheduled task, so that after the target scheduled task is executed, the subsequent task is called back to send the subsequent task to the target node.

[0086] After the task execution process is completed in block 704, in block 708, the execution of the currently executed scheduled task is terminated and the callback task is triggered, that is, the task registered when the registered task callback is executed in block 707 above is executed.

[0087] Figure 8 illustrates a schematic implementation flow chart of a task scheduling method according to an embodiment of the present disclosure. At block 801, a task registration request is received, and the task registration request is used to request registration of a target task. At block 802, it is determined whether the target task is a scheduled task. If the target task is a scheduled task, at block 803, it is checked whether the time poller is turned on. If the time poller is turned on, the task is registered at block 804 so that the scheduled task is registered in the form of a task event to the task list 806. If the time poller is turned off, the time poller is turned on at block 805, and then the task is continued to be registered at block 804 so that the scheduled task is registered in the form of a task event to the task list 806. If the target task is a non-scheduled task, the task is directly registered at block 804 so that the non-scheduled task is registered in the form of a task event to the task list 806. In addition, the node weight publishing task can also be registered in the task list 806

[0088] In block 807, the task scheduling module obtains the time slice sent by the time poller, wherein the time slice represents the time allocated for executing the scheduled tasks in the task list, and wherein the task list includes multiple scheduled tasks registered in the form of task events, each corresponding scheduled task having a timestamp. The task scheduling module then determines a matching task event from the task list based on the time slice, wherein the matching task event represents a target scheduled task with a timestamp matching the time slice. Then, a target node suitable for executing the target scheduled task is selected from multiple execution nodes 808, and the target scheduled task is sent to the target node to execute the target scheduled task. The task scheduling module can also schedule a node weight publishing task, which obtains the status of the multiple execution nodes 808 and calculates the node weights of the multiple execution nodes in block 809. The node weight publishing task can publish the calculated node weights so that they are saved in the node status table 810.

[0089] The overall process of the task scheduling method is described above, which can be understood as an exemplary implementation of the method 200 described with reference to FIG2 including the method 300 described with reference to FIG3 , and the relevant technical details are not repeated here.

[0090] Figure 9 illustrates an exemplary structural block diagram of a task scheduling apparatus 900 according to an embodiment of the present disclosure. As shown in Figure 9 , the task scheduling apparatus includes an acquisition module 910 , a task event determination module 920 , a selection strategy determination module 930 , a target node selection module 940 , and a task dispatching module 950 .

[0091] The acquisition module 910 is configured to acquire a time slice sent by a time poller, wherein the time slice represents the time allocated for executing a scheduled task in a task list, wherein the task list includes a plurality of scheduled tasks registered in the form of task events, and each corresponding scheduled task has a timestamp, wherein the timestamp represents the time when the corresponding scheduled task is to be executed.

[0092] The task event determination module 920 is configured to determine a matching task event from the task list based on the time slice, where the matching task event represents a target scheduled task having a timestamp that matches the time slice. As an example, the timestamp of the scheduled task in the task list can be compared with the time indicated by the time slice to see if they are the same. If the timestamps are the same, the scheduled task is determined to be a matching task event. Of course, if no matching task event exists, the current execution process of the task scheduling method is terminated, and the next time a time slice sent by the time poller is obtained.

[0093] The selection strategy determination module 930 is configured to determine a node selection strategy. As an example, there may be multiple node selection strategies, such as a strategy of selecting nodes by weight, a strategy of specifying nodes, a strategy of selecting nodes by order, and the like.

[0094] The target node selection module 940 is configured to select a target node suitable for executing the target timed task from a plurality of execution nodes according to the node selection strategy. In some embodiments, the target node selection module is further configured to determine the node weight of each execution node in the plurality of execution nodes in response to the node selection strategy being a node selection strategy based on weight, wherein the node weight of each execution node depends on the weighted sum of the delay weight and the load weight of each execution node, the delay weight being used to characterize the delay condition of the corresponding execution node executing the task, and the load weight being used to characterize the load condition of the corresponding execution node executing the task; based on the node weight of each execution node in the plurality of execution nodes, select a target node suitable for executing the target timed task from the plurality of execution nodes.

[0095] The task issuing module 950 is configured to issue the target timed task to the target node to execute the target timed task. The target node is responsible for executing the execution logic represented by the task content of the target timed task. In some embodiments, the task issuing module is further configured to perform a correlation check before issuing the target timed task to the target node, that is, to check or determine whether there is an associated task of the target timed task, and the associated task includes at least one of the predecessor task and the successor task of the target timed task. The predecessor task includes the task on which the execution of the target timed task depends. The successor task includes the task that depends on the execution of the target timed task.

[0096] FIG10 illustrates an example system 1000, which includes an example computing device 1010 representing one or more systems and / or devices that can implement the various techniques described herein. Computing device 1010 can be, for example, a server of a service provider, a device associated with a server, a system on a chip, and / or any other suitable computing device or computing system. The task scheduling apparatus 900 described above with reference to FIG11 can take the form of computing device 1010. Alternatively, task scheduling apparatus 900 can be implemented as a computer program in the form of an application 1016.

[0097] The example computing device 1010 as shown includes a processing system 1011, one or more computer-readable media 1012, and one or more I / O interfaces 1013 that are communicatively coupled to each other. Although not shown, the computing device 1010 may also include a system bus or other data and command transmission system that couples various components to each other. The system bus may include any one or a combination of different bus structures, such as a memory bus or memory controller, a peripheral bus, a universal serial bus, and / or a processor or local bus utilizing any one of a variety of bus architectures. Various other examples are also contemplated, such as control and data lines.

[0098] Processing system 1011 represents functionality that uses hardware to perform one or more operations. Thus, processing system 1011 is illustrated as including hardware elements 1014 that can be configured as processors, functional blocks, and the like. This can include hardware implementations as application-specific integrated circuits or other logic devices formed using one or more semiconductors. Hardware elements 1014 are not limited by the materials from which they are formed or the processing mechanisms employed therein. For example, a processor can be comprised of (a plurality of) semiconductors and / or transistors (e.g., electronic integrated circuits (ICs)). In such a context, processor-executable instructions can be electronically executable instructions.

[0099] Computer-readable media 1012 is illustrated as including memory / storage 1015. Memory / storage 1015 represents memory / storage capacity associated with one or more computer-readable media. Memory / storage 1015 may include volatile media (such as random access memory (RAM)) and / or non-volatile media (such as read-only memory (ROM), flash memory, optical disks, magnetic disks, etc.). Memory / storage 1015 may include fixed media (e.g., RAM, ROM, fixed hard drives, etc.) and removable media (e.g., flash memory, removable hard drives, optical disks, etc.). Computer-readable media 1012 may be configured in various other ways as further described below.

[0100] One or more I / O interfaces 1013 represent functionality that allows a user to input commands and information to the computing device 1010 using various input devices, and optionally also allows information to be presented to the user and / or other components or devices using various output devices. Examples of input devices include a keyboard, a cursor control device (e.g., a mouse), a microphone (e.g., for voice input), a scanner, touch functionality (e.g., a capacitive or other sensor configured to detect physical touch), a camera (e.g., that can detect motion that does not involve touch as gestures using visible or invisible wavelengths (such as infrared frequencies), etc.). Examples of output devices include a display device (e.g., a monitor or projector), speakers, a printer, a network card, a tactile response device, etc. Thus, the computing device 1010 can be configured in various ways, as further described below, to support user interaction.

[0101] Computing device 1010 also includes application 1016. Application 1016 may be, for example, a software instance of task scheduling apparatus 900 and, in combination with other elements in computing device 1010, implements the techniques described herein.

[0102] Various techniques may be described herein in the general context of software, hardware, or program modules. Generally, these modules include routines, programs, objects, elements, components, data structures, and the like that perform specific tasks or implement specific abstract data types. As used herein, the terms "module," "function," and "component" generally refer to software, firmware, hardware, or a combination thereof. The techniques described herein are platform-independent, meaning that these techniques can be implemented on a variety of computing platforms with a variety of processors.

[0103] An implementation of the described modules and techniques may be stored on or transmitted across some form of computer-readable media. Computer-readable media may include various media accessible by computing device 1010. By way of example, and not limitation, computer-readable media may include “computer-readable storage media” and “computer-readable signal media.”

[0104] As opposed to a mere signal transmission, carrier wave, or signal itself, "computer-readable storage medium" refers to a medium and / or device, and / or tangible storage device, capable of persistently storing information. Thus, computer-readable storage media refers to non-signal-bearing media. Computer-readable storage media include hardware such as volatile and non-volatile, removable and non-removable media and / or storage devices implemented in a method or technology suitable for storing information (such as computer-readable instructions, data structures, program modules, logic elements / circuits, or other data). Examples of computer-readable storage media may include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical storage devices, hard disks, cassettes, magnetic tape, magnetic disk storage devices or other magnetic storage devices, or other storage devices, tangible media, or articles of manufacture suitable for storing desired information and accessible by a computer.

[0105] "Computer-readable signal media" refers to signal-bearing media that is configured to send instructions to the hardware of the computing device 1010, such as via a network. Signal media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave, data signal, or other transport mechanism. Signal media also includes any information delivery media. The term "modulated data signal" refers to a signal that has one or more of its characteristics set or changed so as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct connection, and wireless media such as acoustic, RF, infrared, and other wireless media.

[0106] As previously described, hardware elements 1014 and computer-readable media 1012 represent instructions, modules, programmable device logic, and / or fixed device logic implemented in hardware form, which in some embodiments can be used to implement at least some aspects of the technology described herein. Hardware elements can include integrated circuits or systems on a chip, application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), complex programmable logic devices (CPLDs), and other implementations in silicon or components of other hardware devices. In this context, hardware elements can be used as processing equipment for executing program tasks defined by the instructions, modules, and / or logic embodied by the hardware elements, as well as hardware devices for storing instructions for execution, such as the computer-readable storage media previously described.

[0107] The aforementioned combination may also be used to implement the various techniques and modules described herein. Therefore, software, hardware or program modules and other program modules may be implemented as one or more instructions and / or logic embodied on some form of computer-readable storage medium and / or by one or more hardware elements 1014. Computing device 1010 may be configured to implement specific instructions and / or functions corresponding to software and / or hardware modules. Therefore, for example, by using a computer-readable storage medium and / or hardware elements 1014 of a processing system, a module may be implemented as a module that can be executed by computing device 1010 as software, at least in part, in hardware. Instructions and / or functions may be executable / operable to implement the techniques, modules, and examples described herein by one or more articles of manufacture (e.g., one or more computing devices 1010 and / or processing systems 1011).

[0108] In various embodiments, computing device 1010 can be implemented in a variety of different configurations. For example, computing device 1010 can be implemented as a computer-type device including a personal computer, a desktop computer, a multi-screen computer, a laptop computer, a netbook, etc. Computing device 1010 can also be implemented as a mobile device-type device including mobile devices such as mobile phones, portable music players, portable gaming devices, tablet computers, multi-screen computers, etc. Computing device 1010 can also be implemented as a television-type device, which includes devices having or connected to generally larger screens in casual viewing environments. These devices include televisions, set-top boxes, game consoles, etc.

[0109] The techniques described herein can be supported by these various configurations of computing device 1010 and are not limited to the specific examples of the techniques described herein. Functionality can also be implemented in whole or in part on the "cloud" 1020 using a distributed system, such as through platform 1022 as described below.

[0110] Cloud 1020 includes and / or represents a platform 1022 for resources 1024. Platform 1022 abstracts the underlying functionality of the hardware (e.g., servers) and software resources of cloud 1020. Resources 1024 may include applications and / or data that can be used when executing computer processing on servers remote from computing device 1010. Resources 1024 may also include services provided over the Internet and / or over a subscriber network such as a cellular or Wi-Fi network.

[0111] The platform 1022 can abstract resources and functionality to connect the computing device 1010 with other computing devices. The platform 1022 can also be used to abstract hierarchies of resources to provide a corresponding level of hierarchy in the demand encountered for resources 1024 implemented via the platform 1022. Thus, in an interconnected device embodiment, the implementation of the functionality described herein can be distributed throughout the system 1000. For example, functionality can be implemented partially on the computing device 1010 and through the platform 1022 that abstracts the functionality of the cloud 1020.

[0112] The present disclosure provides a computer-readable storage medium having computer-readable instructions stored thereon. When the computer-readable instructions are executed, any of the above methods is implemented.

[0113] The present disclosure provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computing device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computing device to perform any of the methods provided in the various optional implementations described above.

[0114] It should be understood that, for the sake of clarity, embodiments of the present disclosure have been described with reference to different functional units. However, it will be apparent that, without departing from the present disclosure, the functionality of each functional unit can be implemented in a single unit, in multiple units, or as a part of other functional units. For example, the functionality described as being performed by a single unit can be performed by multiple different units. Therefore, reference to a specific functional unit is only considered as a reference to the appropriate unit for providing the described functionality, rather than indicating a strict logical or physical structure or organization. Therefore, the present disclosure can be implemented in a single unit, or can be physically and functionally distributed between different units and circuits.

[0115] It will be understood that although the terms first, second, third, etc. may be used herein to describe various devices, elements, parts, or portions, these devices, elements, parts, or portions should not be limited by these terms. These terms are only used to distinguish one device, element, part, or portion from another device, element, part, or portion.

[0116] Although the present disclosure has been described in conjunction with some embodiments, it is not intended to be limited to the specific forms set forth herein. On the contrary, the scope of the present disclosure is limited only by the appended claims. Additionally, although individual features may be included in different claims, these may possibly be advantageously combined, and the inclusion in different claims does not imply that a combination of features is not feasible and / or advantageous. The order of the features in the claims does not imply any specific order in which the features must work. Furthermore, in the claims, the word "comprising" does not exclude other elements, and the term "a" or "an" does not exclude a plurality. The reference signs in the claims are provided merely as clear examples and should not be construed as limiting the scope of the claims in any way.

Claims

1. A task scheduling method, comprising: Obtaining a time slice sent by a time poller, wherein the time slice represents the time allocated for executing scheduled tasks in a task list, the task list includes a plurality of scheduled tasks registered in the form of task events, and each corresponding scheduled task has a time stamp, the time stamp represents the time when the corresponding scheduled task is to be executed; Based on the time slice, determining a matching task event from the task list, the matching task event representing a target scheduled task having a time stamp matching the time slice; Determining a node selection policy; According to the node selection policy, selecting a target node suitable for executing the target scheduled task from a plurality of execution nodes; Sending the target scheduled task to the target node to execute the target scheduled task.

2. The method according to claim 1, further comprising: Receiving a task registration request for requesting to register a target task; In response to the target task being a scheduled task, enabling the time poller to be in an open state, and registering the target task as a scheduled task in the task list in the form of a task event, wherein the scheduled task has a time stamp.

3. The method according to claim 2, further comprising: In response to the target task being a non-scheduled task, registering the target task as a non-scheduled task in the task list in the form of a task event.

4. The method according to claim 1, wherein Each corresponding scheduled task has a task identifier for identifying the corresponding scheduled task, and wherein, based on the time slice, determining a matching task event from the task list includes: In response to the time stamp of the scheduled task represented by the task event in the task list matching the time slice, loading the task list and obtaining the task event as the matching task event from the loaded task list according to the task identifier corresponding to the time stamp.

5. The method according to claim 1, wherein, According to the node selection policy, selecting a target node suitable for executing the target scheduled task from a plurality of execution nodes includes: In response to the node selection policy being a node selection policy of selecting nodes by weight, determining the node weight of each execution node in the plurality of execution nodes, wherein the node weight of each execution node Depends on the weighted sum of the delay weight and the load weight of each execution node, the delay weight is used to characterize the delay condition of the corresponding execution node in executing tasks, and the load weight is used to characterize the load condition of the corresponding execution node in executing tasks; Based on the node weights of each execution node in the plurality of execution nodes, selecting a target node suitable for executing the target scheduled task from the plurality of execution nodes.

6. The method according to claim 5, wherein, The delay weight of each execution node depends on the regional average delay of the node area where the corresponding execution node is located and the regional node delay of the corresponding execution node in the node area, the regional average delay characterizes the delay in sending a task to the node area where the corresponding execution node is located, and the regional node delay characterizes the delay in sending a task to the corresponding execution node within the node area.

7. The method according to claim 5, wherein, The load weight of each execution node depends on the regional average load of the node area where the corresponding execution node is located and the regional node load of the corresponding execution node in the node area. The regional average load represents the average load of each execution node in the node area for task execution, and the regional node load represents the load of the corresponding execution node in the node area.

8. The method according to claim 5, wherein The node weight of each execution node among the multiple execution nodes is determined by the timing tasks registered in the task list in the form of task events.

9. The method according to claim 5, wherein Selecting a target node suitable for executing the target timing task from multiple execution nodes according to the node selection policy includes: In response to the node selection policy being the specified node policy, selecting the execution node specified by the specified node policy from the multiple execution nodes as the target node suitable for executing the target timing task.

10. The method according to claim 5, wherein, Selecting a target node suitable for executing the target timing task from multiple execution nodes according to the node selection policy includes: In response to the node selection policy being the sequential node selection policy, determining the execution node that has most recently executed a task from the multiple execution nodes, and selecting the execution node whose execution order is the next order after the execution node that has most recently executed a task from the multiple execution nodes as the target node suitable for executing the target timing task.

11. The method according to claim 1, wherein Issuing the target timing task to the target node to execute the target timing task includes: In response to determining that there is no associated task for the target timing task, issuing the target timing task to the target node to execute the target timing task; Wherein, the associated task includes at least one of the pre-task and the post-task of the target timing task. The pre-task includes the tasks on which the execution of the target timing task depends, and the post-task includes the tasks that depend on the execution of the target timing task.

12. The method according to claim 1, wherein, Issuing the target timing task to the target node to execute the target timing task includes: In response to determining that there is an associated task for the target timing task and the associated task includes the pre-task of the target timing task, issuing the target timing task to the target node to execute the target timing task when it is determined that the pre-task has been executed.

13. The method according to claim 1, wherein Issuing the target timing task to the target node to execute the target timing task includes: In response to determining that there is an associated task for the target timing task and the associated task includes the pre-task of the target timing task, registering a first task callback for the target timing task when it is determined that the pre-task is not completed, so that the target timing task is called back after the pre-task is executed to issue the target timing task to the target node to execute the target timing task.

14. The method according to claim 1, wherein Issuing the target timing task to the target node to execute the target timing task includes: In response to determining that there is an associated task of the target timing task and the associated task includes a subsequent task of the target timing task, a second task callback is registered for the target timing task, so that after the target timing task is executed, the subsequent task is called back to send the subsequent task to the target node.

15. A task scheduling device, comprising: An acquisition module, configured to acquire a time slice sent by a time poller, where the time slice represents the time allocated for executing a timing task in a task list, the task list includes a plurality of timing tasks registered in the form of task events, and each corresponding timing task has a time stamp, and the time stamp represents the time when the corresponding timing task is to be executed; A task event determination module, configured to determine a matching task event from the task list based on the time slice, where the matching task event represents a target timing task having a time stamp matching the time slice; A selection policy determination module, configured to determine a node selection policy; A target node selection module, configured to select a target node suitable for executing the target timing task from a plurality of execution nodes according to the node selection policy; A task distribution module, configured to distribute the target timing task to the target node to execute the target timing task.

16. A computing device, characterized in that, The computing device includes: A memory, configured to store computer-executable instructions; A processor, configured to execute the method according to any one of claims 1-14 when the computer-executable instructions are executed by the processor.

17. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed, the method according to any one of claims 1-14 is executed.

18. A computer program product, characterized in that, The computer program product includes computer-executable instructions, and the computer-executable instructions, when executed, implement the method according to any one of claims 1 to 14.