Task distribution method, electronic equipment, storage medium and program product
By dividing the computing tasks into multiple subtasks and selecting computing nodes in real time for distribution, the performance bottlenecks and efficiency problems of traditional rules engines when dealing with large-scale data and high-frequency rule updates are solved, and efficient computing resource utilization and rapid response are achieved.
Patent Information
- Application Number
- CN202510192030.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-20
- Publication Date
- 2025-06-06
AI Technical Summary
When handling large-scale data and high-frequency rule updates, traditional rules engines face performance bottlenecks and efficiency problems, and cannot meet the needs of real-time processing and rapid response.
By dividing the computing tasks into multiple computing subtasks and selecting child nodes from online computing nodes in real time for distribution, the computing resources of multiple nodes are used to improve the processing performance of the rules engine.
It realizes adaptive discovery and scheduling of computing resources, improves computing performance and efficiency, and can meet the needs of real-time processing and fast response.
Smart Images

Figure CN120104282A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and more particularly to a task dispatching method, electronic device, storage medium and program product. Background Art
[0002] In modern enterprises, rule engines are widely used in various business scenarios with high complexity and high frequency of hot releases, and undertake important logic processing and decision support tasks. However, with the rapid growth of business volume and the continuous increase in business logic complexity, traditional rule engines face performance bottlenecks and efficiency issues when processing large-scale data and high-frequency rule updates, and cannot meet the needs of real-time processing and rapid response. Summary of the invention
[0003] The present disclosure provides a task dispatching method, an electronic device, a storage medium and a program product.
[0004] According to one aspect of the present disclosure, a task dispatching method is provided, including: obtaining a computing task, and determining a computing node that obtains the computing task as a master node; dividing the computing task into a plurality of computing subtasks according to different business logics; querying online computing nodes to obtain an available node list, wherein the available node list includes all online computing nodes; selecting at least one of the online computing nodes in the available node list to be determined as a child node; and dispatching the computing subtask from the master node to the child node.
[0005] According to at least one embodiment of the task dispatching method of the present disclosure, it also includes: obtaining the dispatching result of the computing subtask; and in response to the dispatching result of the computing subtask indicating a dispatching failure, notifying the subnode corresponding to the computing subtask that failed to dispatch that the task execution failed.
[0006] According to at least one embodiment of the task dispatching method disclosed herein, obtaining the dispatching result of the computing subtask includes: scanning all the computing subtasks waiting to be executed, and obtaining the computing subtasks that have timed out; determining the computing subtasks that have timed out as dispatching failed tasks; obtaining the retry upper limit and the number of retries of the child node corresponding to the dispatching failed task; in response to the number of retries being less than or equal to the retry upper limit, re-dispatching the dispatching failed task to the child node; and in response to the number of retries of the dispatching failed task being greater than or equal to the retry upper limit, determining the dispatching result of the dispatching failed task as dispatching failure.
[0007] According to the task dispatching method of at least one embodiment of the present disclosure, the computing subtask is dispatched from the main node to the child node, including: obtaining the loadable quantity of the dispatch queue of the main node; in response to the loadable quantity being greater than 0, loading one of the multiple computing subtasks into the dispatch queue; in response to the loadable quantity being equal to 0, pausing the loading of the remaining computing subtasks, and dispatching the computing subtasks in the dispatch queue to the child node; obtaining the settlement receipt of each of the computing subtasks in the dispatch queue; and in response to having obtained the settlement receipt of each of the computing subtasks in the dispatch queue, clearing each of the computing subtasks in the dispatch queue, and restarting the loading of the remaining computing subtasks.
[0008] According to the task dispatching method of at least one embodiment of the present disclosure, the computing subtask is dispatched from the main node to the child node, and also includes: obtaining an offline node queue, the offline node queue is used to record computing nodes that are converted from an online state to an offline state; in response to the existence of computing nodes in the offline node queue, determining the computing nodes in the offline node queue as offline nodes, and adding the offline nodes to a blacklist to obtain an updated blacklist; in response to the updated blacklist including the child node, terminating the dispatch of the computing subtask corresponding to the child node, determining the child node as the offline node; and re-adding the computing subtask to be dispatched to the offline node to the dispatch queue of the main node.
[0009] According to at least one embodiment of the task dispatching method of the present disclosure, it also includes: in response to high load feedback from the child node, determining the child node that issues the high load feedback as a high load node; and saving the high load node in a shielding list for a predetermined time, and forwarding the computing subtask dispatched to the high load node to other child nodes that are not saved in the shielding list.
[0010] According to at least one embodiment of the task dispatching method disclosed herein, online computing nodes are queried to obtain a list of available nodes, including: periodically scanning sessions of each registered computing node to obtain scanning results; and in response to the scanning result being that the session is normal, determining the computing node corresponding to the session whose scanning result is that the session is normal as an online computing node, and updating the online computing node in the available node list to obtain the updated available node list.
[0011] According to the task dispatching method of at least one embodiment of the present disclosure, online computing nodes are queried to obtain a list of available nodes, and the method also includes: in response to the scanning result being a session exception, determining the session with the scanning result being a session exception as a failed session, terminating the failed session, and removing the computing node corresponding to the failed session from the available node list to obtain an updated list of available nodes.
[0012] According to another aspect of the present disclosure, an electronic device is provided, comprising: a memory storing execution instructions; and a processor executing the execution instructions stored in the memory, so that the processor executes the task dispatching method of any embodiment of the present disclosure.
[0013] According to another aspect of the present disclosure, a readable storage medium is provided, wherein the readable storage medium stores execution instructions, and when the execution instructions are executed by a processor, the task dispatching method of any embodiment of the present disclosure is implemented.
[0014] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the task dispatching method according to any one of the embodiments of the present disclosure is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The accompanying drawings illustrate exemplary embodiments of the present disclosure and together with the description serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.
[0016] Figure 1 It is a schematic diagram of an application scenario of a task dispatching method according to an embodiment of the present disclosure.
[0017] Figure 2 It is a flowchart of a task dispatching method according to an embodiment of the present disclosure.
[0018] Figure 3 It is a schematic diagram of the structure of a computing node according to an embodiment of the present disclosure.
[0019] Figure 4 It is a schematic diagram of the architecture of a cloud container platform according to an embodiment of the present disclosure.
[0020] Figure 5 It is a schematic diagram of the process of a master node dispatching computing subtasks to subnodes according to an embodiment of the present disclosure.
[0021] Figure 6 It is a flowchart of a task dispatching method according to an embodiment of the present disclosure.
[0022] Figure 7It is a schematic diagram of the dispatching process of computing subtasks according to an embodiment of the present disclosure.
[0023] Figure 8 It is a flowchart of a task dispatching method according to an embodiment of the present disclosure.
[0024] Fig. 9 It is a schematic diagram of a process of obtaining a dispatch result of a computing subtask according to an embodiment of the present disclosure.
[0025] Fig.10 It is a flowchart of a task dispatching method according to an embodiment of the present disclosure.
[0026] Fig.11 It is a flowchart of a task dispatching method according to an embodiment of the present disclosure.
[0027] Fig.12 It is a schematic diagram of the process of filling calculation subtasks according to an embodiment of the present disclosure.
[0028] Fig.13 It is a flowchart of a task dispatching method according to an embodiment of the present disclosure.
[0029] Fig.14 It is a process diagram of a blacklist time-limit mechanism according to an embodiment of the present disclosure.
[0030] Fig.15 It is a flowchart of a task dispatching method according to an embodiment of the present disclosure.
[0031] Fig.16 Schematic diagram of a high-load feedback strategy according to an embodiment of the present disclosure.
[0032] Fig.17 It is a schematic block diagram of the structure of a task dispatching device according to an embodiment of the present disclosure.
[0033] Fig.18 It is a schematic block diagram of the structure of an electronic device equipped with a task dispatching device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0034] The present disclosure is further described in detail below in conjunction with the accompanying drawings and examples. It is understood that the specific examples described herein are only used to explain the relevant content, rather than to limit the present disclosure. It should also be noted that, for ease of description, only the parts related to the present disclosure are shown in the accompanying drawings.
[0035] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure can be combined with each other. The technical solution of the present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0036] In various business scenarios, the rule engine is responsible for processing business logic. As the business develops, the amount of data that needs to be processed by the business increases, and the complexity of business rules also continues to expand, resulting in an increasing burden on the calculation of the rule engine and facing the problem of low efficiency.
[0037] Figure 1 The application scenario of the task dispatching method of an embodiment of the present disclosure is shown. The task in the task dispatching method refers to the computing task of the rule engine. Traditional rule engines are usually deployed on a single node and do not have the ability of distributed computing. The task dispatching method of an embodiment of the present disclosure can perform distributed computing on the computing tasks of the rule engine to utilize the computing resources of multiple nodes to improve the processing performance of the rule engine.
[0038] like Figure 1 As shown, one embodiment of the present disclosure is to build a cloud container platform for a rule engine. There are multiple computing nodes in the cloud container platform environment, each of which contains a complete distributed structure, and the computing tasks of the rule engine can be triggered at any computing node. Among them, the computing node can be a client in the cloud container platform. When the computing node goes online, it registers its own IP to the registration center (redis). The computing node can also refresh the online computing node information from the registration center and update its own routing table, thereby dynamically obtaining the online computing nodes of the distributed cluster, that is, the available computing resources.
[0039] When any computing node triggers the computing task of the rule engine, the computing node that obtains the computing task of the rule engine is determined as the master node. As the core control unit of the distributed system, the master node is responsible for coordinating and managing workloads, and is used to perform tasks such as task distribution, task progress monitoring, fault detection and recovery, and resource scheduling. The master node can divide the computing task into multiple computing subtasks according to different business logics, create a distributed session, and dispatch the computing subtasks to other computing nodes for execution.
[0040] When dispatching computing subtasks, the master node can query the online computing nodes in the registration center to obtain a list of available nodes, and adjust the allocation of computing resources in real time according to the business needs and computing load corresponding to the computing tasks. In other words, the subnodes used to execute computing subtasks can be selected from the online computing nodes in real time, and the computing subtasks can be dispatched to the subnodes. In this way, available computing resources can be discovered in real time, and computing subtasks can be dispatched to appropriate subnodes for processing, so as to improve computing efficiency and make the rule engine run more efficiently.
[0041] Based on the above scheme, the task dispatching method disclosed in the present invention can divide the computing tasks of the rule engine into multiple computing subtasks according to different business logics, and select subnodes from online computing nodes in real time as computing nodes for executing computing subtasks, and dispatch the computing subtasks to the subnodes, thereby realizing adaptive discovery of computing resources and adaptive scheduling of computing resources, thereby improving computing performance and efficiency.
[0042] Figure 2 FIG. 1 is a schematic diagram showing the overall process of a task dispatching method M100 according to an embodiment of the present disclosure. Figure 2 The method shown includes steps S110 to S150. The method can be executed by electronic devices such as mobile phones and tablet computers.
[0043] Specifically, Figure 2 The methods shown include:
[0044] S110: Obtain a computing task, and determine a computing node that obtains the computing task as a master node.
[0045] The computing tasks may be related computing tasks submitted by the rule engine for executing logic processing, decision support, etc. In a distributed system under a cloud container environment, each client device can act as a computing node, providing certain computing resources to execute computing tasks.
[0046] Please combine Figure 3 In one embodiment of the present disclosure, in a distributed system in a cloud container environment, each computing node includes a complete distributed structure. For example, a computing node may include a task submission terminal, a task session terminal, and a local executor. Among them, the task submission terminal is used to trigger the computing task and submit the acquired computing task to the task session terminal. The task session terminal is used to publish computing tasks, for example, dividing the computing task into multiple computing subtasks and dispatching them to the lower-level computing nodes for execution, and the computing results obtained by the lower-level computing nodes executing the computing subtasks are returned to the task session terminal. The local executor is used to receive computing tasks / computing subtasks dispatched by other computing nodes, and the computing results obtained after the task is executed are returned to the computing node that dispatched the task.
[0047] Please combine Figure 4, each client device can be used as a computing node to trigger computing tasks. When a client triggers a computing task, that is, when a computing node obtains a computing task, this computing node is determined as the master node. The master node is used to obtain computing tasks and dispatch computing tasks to other computing nodes for execution. When the computing node is determined to be the master node, the function of the master node can be realized through the task submission end and the task session end. In this way, since each node can become a temporary master node, there is no need to conduct a complex election process to determine who is the master node, which can avoid the cluster in the distributed system from splitting into multiple competing sub-clusters in order to compete for the master node. In addition, since there is no need to continuously maintain a global master node state, the demand and pressure on the load balancer can be reduced.
[0048] If a computing node receives a computing task dispatched by the master node, the computing node will be regarded as a subordinate computing node of the master node and recorded as a working node. After receiving the computing task, the working node can execute the received computing task through the local executor.
[0049] S120. Divide the computing task into multiple computing subtasks according to different business logics.
[0050] Among them, the computing tasks submitted by the rule engine are usually used to implement the processing of a certain business logic, and a business logic can usually be divided into multiple business logics with finer granularity and can be executed independently, and each finer granularity business logic corresponds to a computing subtask. For example, the computing tasks submitted by the rule engine are used to settle a total profit. For the settlement business of the total profit, it can be divided into computing tasks such as the calculation tasks of total income, the calculation tasks of total costs, and the calculation tasks of total expenditures. The calculation task of total income can be divided into income calculation tasks for multiple regions by region. Then, the income calculation task of one region can be used as a computing subtask and calculated by one computing node, and the income calculation task of another region can be used as another computing subtask and calculated in parallel by another computing node, so as to effectively utilize computing resources to process computing tasks in parallel and improve the operation efficiency of the rule engine.
[0051] Computing tasks are divided according to different business logics, where different business logics refer to independently executable business logics. Independently executable business logic refers to business logic that can be processed independently and in parallel without waiting for the processing results of other business logics. For example, the revenue calculation tasks in two different regions are independent of each other, and whether the execution of the revenue calculation task in one region can start does not depend on waiting for the execution result of the revenue calculation task in another region. The revenue calculation tasks in two different regions can be executed in parallel, and the common superior computing task of the revenue calculation tasks in these two different regions (such as the calculation task of total revenue) can be used to divide the revenue calculation tasks in these two different regions.
[0052] The granularity of the division of computing subtasks can be adjusted according to the load capacity of the computing nodes. For example, if the number of currently available computing nodes is small and the load capacity of a single computing node is relatively high, computing subtasks with relatively coarse granularity can be divided to make the total number of computing subtasks relatively small. When the number of computing nodes is small, the number of times each computing node processes computing subtasks can be reduced to improve efficiency. For another example, if the number of currently available computing nodes is large and the load capacity of a single computing node is relatively low, computing subtasks with relatively fine granularity can be divided to make the total number of computing subtasks relatively large, so that more computing nodes can be used for calculation at the same time, reducing idle computing nodes and improving efficiency.
[0053] S130 , query online computing nodes to obtain an available node list, where the available node list includes all online computing nodes.
[0054] When the client of the cloud container platform goes online, it registers its IP address with the registration center (Redis), becoming an online computing node. When the computing node needs to go offline, it cancels its IP address with the registration center.
[0055] In one example, the registration center maintains a registration table for recording IPs registered in the registration center. When a computing node goes offline, its IP is removed from the registration table. Based on this, to query the online computing nodes, the computing node corresponding to the IP currently recorded in the registration table can be obtained by querying the IP currently recorded in the registration table, which is the computing node currently online.
[0056] In one example, the master node maintains a dynamically updated list of available nodes. The master node periodically queries the currently online computing nodes and updates the available node list so that the available node list includes all the online computing nodes.
[0057] In some embodiments of the present disclosure, the computing node is configured to self-check liveness, that is, the computing node refreshes its own expiration time at regular intervals to maintain its own online status. In addition, the computing node regularly refreshes the IP of the online computing node from the registration center and updates its own routing table. When the computing node is determined to be the master node, the routing table maintained by the computing node is the list of available nodes.
[0058] S140: Select at least one online computing node from the available node list and determine it as a child node.
[0059] Among them, the online computing nodes in the available node list are all computing nodes that can be allocated computing resources. However, when executing a computing task, it is not necessary to dispatch corresponding computing subtasks to each online computing node. According to the number of business logics divided by the computing task, the computing resources required for the computing task, the load capacity of the online computing nodes and other factors, a certain number of online computing nodes can be selected from the available node list to perform computing subtasks. The computing nodes selected to perform computing subtasks are recorded as child nodes, and as the master node, they obtain the next-level working nodes, receive computing subtasks dispatched by the master node and return the corresponding computing results to the master node.
[0060] S150, dispatching computing subtasks from the master node to the subnodes.
[0061] In some embodiments of the present disclosure, the master node dispatches the computing subtasks to the child nodes according to the configured dispatching strategy. According to the dispatching strategy, the same number of child nodes as the computing subtasks can be selected, and multiple computing subtasks can be dispatched to the corresponding child nodes one by one. Alternatively, the number of child nodes less than the number of computing subtasks can be selected, and a computing subtask may be dispatched to 1, 2, 3 or more child nodes, which is not limited here.
[0062] Among them, the distribution strategies include random distribution strategy, consistent hash algorithm distribution strategy, round distribution strategy, etc. The random distribution strategy is to randomly distribute computing subtasks to each child node, which can ensure the uniform use of computing resources and avoid excessive concentration of computing resources. The consistent hash algorithm distribution strategy uses the consistent hash algorithm to map both child nodes and computing subtasks to a fixed hash ring, and then decides which child node each computing subtask should be distributed to based on the hash value. In this way, the uniformity and stability of task distribution can be ensured, and the overhead caused by task redistribution can be reduced. The round distribution strategy distributes computing subtasks through multiple distribution rounds, and each distribution round distributes the computing subtasks to each child node in turn. In this way, it can ensure that each node can obtain balanced computing tasks and avoid the problem of overload of a single node.
[0063] Please combine Figure 5 In some embodiments of the present disclosure, the process of the master node dispatching computing subtasks to the subnodes is as follows: Figure 5 After determining the child node through the above step S140, the main node selects a dispatching strategy, then calls the interface of the child node to dispatch the computing subtask according to the dispatching strategy, and waits for the response of the child node to determine whether the dispatch is successful.
[0064] If a response is received from the child node, indicating that the task is successfully dispatched, the task status is changed to "waiting for execution" to avoid the task being dispatched repeatedly. After the task with the status of "waiting for execution" is processed by the child node, the status of the task is changed to "completed", and the child node returns the corresponding calculation data to the main node.
[0065] If a response is received from a child node, indicating that the task dispatching has failed, and the response of the child node has not timed out, the child node may be in a state of overload or other inability to execute tasks. In this case, the computing subtask of the child node can be quickly failed, and the method in step S130 can be re-executed to update the currently online computing node, and the method in step S140 can be re-executed to select a child node based on the latest list of available nodes, and then the computing subtasks that have not been successfully dispatched are dispatched to the re-determined child node.
[0066] If the response of the child node cannot be received within a certain period of time, it means that the task dispatching fails and the child node has a link timeout. At this time, the child node with a link timeout can be added to the blacklist, and the method in step S130 can be re-executed to update the currently online computing node, and the method in step S140 can be re-executed to select the child node according to the latest available node list. Among them, when the method in step S140 is executed to select the child node according to the available node list, the computing nodes in the blacklist will be excluded to avoid dispatching tasks to the computing nodes with a link timeout.
[0067] In summary, the task dispatching method provided in this embodiment constructs a federal distributed cluster, so that all computing nodes can be used as master nodes. When any computing node triggers a computing task, the computing node that triggers the computing task is used as the master node, which is responsible for the distribution of tasks, which can reduce the overhead of data processing and improve processing efficiency. In a federal distributed cluster, a computing task can be divided into multiple computing subtasks, which are executed by different subnodes, and the utilization rate of computing resources can be improved. The subnode is a node selected from the online computing nodes discovered in real time. It can be selected according to specific business needs and the amount of data required for calculation. It can quickly respond to the computing task to select the corresponding subnode, and ensure that efficient and stable computing can be achieved under different loads. The computing subtasks are dispatched to the subnodes by the master node according to a certain dispatching strategy, which can ensure the uniform distribution of computing subtasks and avoid the concentration of computing resources.
[0068] In some embodiments of the present disclosure, the task dispatching method M100 may further include: Figure 6 Steps S160 to S170 are shown.
[0069] S160: Obtain the dispatch result of the computing subtask.
[0070] The dispatch result of the computing subtask includes a successful dispatch and a failed dispatch. In one example, if the computing subtask is dispatched successfully, the child node returns a signal to the master node indicating a successful dispatch. In another example, if the computing subtask is dispatched successfully, the status of the computing subtask dispatched to the child node is modified to "waiting for execution", and the master node monitors the status of each computing subtask. If the status of a computing subtask is modified to "waiting for execution", it means that the dispatch result of the computing subtask is a successful dispatch.
[0071] In one example, if the computation subtask fails to be dispatched, the child node returns a signal to the master node indicating the dispatch failure. In another example, if the computation subtask is dispatched successfully, the status of the computation subtask dispatched to the child node is modified to "waiting for execution", and the master node monitors the status of each computation subtask. If the status of a dispatched computation subtask is not modified to "waiting for execution" after a certain period of time after its dispatch, it indicates that the dispatch result of the computation subtask is a dispatch failure.
[0072] S170 , in response to the dispatch result of the computing subtask indicating a dispatch failure, notifying a subnode corresponding to the computing subtask that failed to be dispatched that the task execution failed.
[0073] If the computation subtask dispatched to a child node fails, the child node will be notified immediately that the computation subtask it executed failed. When responding to the notification of task execution failure, the child node will terminate all tasks related to the computation subtask. In this way, on the one hand, it can avoid the child node that failed to dispatch continuously waiting for the computation subtask to be dispatched and deadlocking, and on the other hand, it can avoid the child node from running incorrectly without receiving the computation subtask.
[0074] Please combine Figure 7 In some embodiments of the present disclosure, the dispatching process of computing subtasks is as follows: Figure 7 As shown. After the computing subtask is dispatched by the method of step S150, the dispatch result of the computing subtask is obtained, and it is determined whether the dispatch is successful. If the dispatch is successful, it is further determined whether all computing subtasks have been dispatched. If the dispatch is completed, the dispatch process of the computing subtask is terminated. If the dispatch is not completed, the dispatch of the computing subtask continues. If it is determined that a computing subtask fails to be dispatched, the subnode task to which the computing subtask is dispatched fails to execute, and the dispatch of the computing subtask is retried.
[0075] Regarding step S160, in some embodiments of the present disclosure, it may include: Figure 8 Steps S1601 to S1605 are shown.
[0076] S1601. Scan all computing subtasks waiting to be executed, and obtain computing subtasks whose waiting has timed out.
[0077] In one example, the status of a successfully dispatched computing subtask is changed to "waiting for execution". If a computing subtask's status is not changed to "waiting for execution" after a certain period of time has passed after dispatch, then the computing subtask is determined to be a computing subtask that has timed out.
[0078] S1602: Determine the computing subtask that has timed out as a dispatch failure task.
[0079] A failed dispatch task means that the task has been dispatched but failed to be dispatched, and is a task that has not yet been executed.
[0080] S1603: Obtain the upper limit of the retry and the number of retries of the child node corresponding to the failed dispatch task.
[0081] In one example, each computing node is configured with a corresponding retry limit. The retry limit refers to the upper limit of the number of times the computing node can re-accept the dispatch of a task when the computing node fails to accept the dispatch of the task. The number of retries of a child node refers to the number of times the child node attempts to dispatch the task to the child node when the child node fails to accept the dispatch of the task. The first time a task is dispatched to a child node is not counted in the number of retries.
[0082] S1604: In response to the number of retries being less than or equal to the upper limit of retries, re-dispatching the failed task to the child node.
[0083] The number of retries is less than or equal to the upper limit of retries, which means that you can still try to dispatch the same task (the task that failed to be dispatched) to the child node.
[0084] In some application scenarios, the child node may fail to dispatch a new computing subtask due to temporary problems such as high load and unstable network. The dispatch retry mechanism of step S1604 can try to re-dispatch the task to the child node when the number of retries is less than or equal to the upper limit of the retry. In this way, there is a certain probability that when retrying to dispatch the task, the temporary problem that caused the dispatch failure of the child node has been fixed, such as the load has been reduced, the network has been stable, etc., so that the re-dispatched dispatch failed task can be successfully dispatched.
[0085] S1605: In response to the number of retries of the dispatch failure task being greater than or equal to the upper limit of retry, determining the dispatch result of the dispatch failure task as dispatch failure.
[0086] If the number of retries is greater than the upper limit of the retry limit, the dispatch result of the failed dispatch task is immediately determined as a dispatch failure. In this way, it can avoid a computing subtask spending a long time waiting to be dispatched to a child node, thereby improving processing efficiency.
[0087] Please combine Fig. 9 , Fig. 9 It is a flowchart for obtaining the dispatch result of a computing subtask. When obtaining the dispatch result, first scan all computing subtasks waiting to be executed. If a computing subtask that has timed out is scanned, it is determined as a dispatch failure task, and it is determined whether the number of retries of the current child node exceeds the retry limit. If it does not exceed the retry limit, retry to dispatch the dispatch failure task; if it exceeds the retry limit, the output dispatch result is a dispatch failure, and the error that occurred on the child node is recorded, and the child node is removed from the list of available nodes for a period of time to avoid selecting this node as a child node within a period of time.
[0088] Regarding step S130, in some embodiments of the present disclosure, it may include the following steps: Fig.10 Steps S1301 to S1302 are shown.
[0089] S1301. Periodically scan the sessions of each registered computing node to obtain the scan results.
[0090] The session of a computing node refers to the communication interaction between the computing node and the server. Usually, when a computing node comes online, the server creates a corresponding session for the computing node and stores the status information of the computing node to track the activity status of the computing node. Scanning the session of the registered computing node is to obtain the status information of the computing node to determine the activity status of the computing node based on the scanning results.
[0091] In step S1301, it is configured to scan periodically. Periodic scanning means scanning once every certain period of time. For example, scanning is performed once every 1 minute, once every 2 minutes, and so on. The shorter the interval, the higher the scanning frequency, and the stronger the real-time nature of the scanning result; the longer the interval, the lower the scanning frequency, and the smaller the computing resources occupied by the scanning.
[0092] S1302: In response to the scanning result indicating that the session is normal, determine the computing node corresponding to the session whose scanning result indicates that the session is normal as an online computing node, and update the online computing node in the available node list to obtain an updated available node list.
[0093] A normal session indicates that the computing node is in a normal online state. If the scan result of a computing node is that the session is normal, the computing node is determined to be an online computing node. The list of available nodes is updated regularly, and each time the list of available nodes is updated, all currently online computing nodes are updated. In response to the scan result being that the session is normal, the list of available nodes is updated once to ensure that the computing node whose current scan result is that the session is normal can be added to the list of available nodes immediately. For example, it is possible to adaptively discover available computing resources, and dynamically discover new computing nodes when the system is started or during operation.
[0094] Regarding step S130, in some embodiments of the present disclosure, it may include the following steps: Fig.10 Step S1303 shown.
[0095] S1303: In response to the scanning result being that the session is abnormal, the session with the scanning result being that the session is abnormal is determined as a failed session, the failed session is terminated, and the computing node corresponding to the failed session is removed from the available node list to obtain an updated available node list.
[0096] Session abnormality means that the computing node cannot communicate and interact with the server normally. For example, the reasons for session abnormality may include session timeout, session hijacking, session data conflict, etc., which make the computing node unable to communicate and interact with the server normally. In this case, the abnormal session is determined as a failed session and terminated immediately instead of trying to recover it. This can avoid falling into a complex fault recovery process that causes the system to wait and reduce efficiency.
[0097] When the session of a computing node is scanned as abnormal, the computing node is immediately removed from the available node list, and the available node list is updated once, so that the computing node with abnormal session is excluded from the updated available node list. In this way, it can be avoided that the computing node with abnormal session is selected as a child node and causes task dispatch failure.
[0098] Regarding step S150, in some embodiments of the present disclosure, it may include: Fig.11 Steps S1501 to S1505 are shown.
[0099] S1501. Obtain the number of items that can be loaded into the dispatch queue of the master node.
[0100] The dispatch queue is a queue maintained by the master node for dispatching tasks to child nodes. Tasks in a dispatch queue are dispatched to multiple child nodes synchronously and executed in parallel by multiple child nodes.
[0101] In one example, the capacity of the dispatch queue can be dynamically adjusted according to the number of available nodes and the load capacity of the distributed session. If the number of available nodes is large and the load capacity is high, it means that a large number of tasks can be executed in parallel. In this case, a larger capacity can be configured for the dispatch queue to accommodate more tasks; if the number of available nodes is small and the load capacity is low, it means that a small number of tasks can be executed in parallel. In this case, a smaller capacity can be configured for the dispatch queue to avoid excessive load pressure.
[0102] The number of available items in the dispatch queue refers to the remaining capacity of the dispatch queue. In an example, the master node sequentially adds each computing subtask to the dispatch queue. When there is no computing subtask in the dispatch queue, the number of available items in the dispatch queue is equal to the remaining capacity of the dispatch queue. Each time a computing subtask is loaded in the dispatch queue, the count value of the number of available items in the dispatch queue is reduced by 1.
[0103] S1502: In response to the loadable quantity being greater than 0, one of the plurality of computing subtasks is loaded into a dispatch queue.
[0104] If the number of available tasks is greater than 0, it means that there is still remaining capacity in the dispatch queue. The computing subtasks that have not been added to the dispatch queue can be added to the dispatch queue until the number of loaded computing subtasks reaches the upper limit.
[0105] S1503: In response to the loadable quantity being equal to 0, suspending the loading of the remaining computing subtasks, and dispatching the computing subtasks in the dispatch queue to the child nodes.
[0106] The loadable quantity is equal to 0, indicating that the number of computing subtasks in the dispatch queue has reached the upper limit of capacity, and the computing subtasks in the dispatch queue are dispatched at this time.
[0107] In one example, a settlement waiting mechanism is introduced. Fig.12 ,exist Fig.12 In the illustrated flowchart, when the loadable quantity is equal to 0, that is, when the number of calculation subtasks reaches the capacity limit, the settlement waiting mechanism can be selectively enabled or disabled.
[0108] When the number of available tasks is equal to 0, if the settlement waiting mechanism is not enabled, the computing subtasks in the dispatch queue will be dispatched immediately. When a computing subtask is dispatched, there will be one more task available in the dispatch queue, and the remaining computing subtasks can still be loaded. In other words, if the settlement waiting mechanism is not enabled, the remaining computing subtasks will be loaded in the dispatch queue while the computing subtasks are dispatched.
[0109] When the available quantity is equal to 0, if the settlement waiting mechanism is enabled, the remaining computing subtasks will be suspended from loading when the computing subtasks in the dispatch queue are dispatched. This ensures that the computing subtasks in the same dispatch queue are dispatched at the same time. If there is an exception in the dispatch, the batch of the dispatch queue of the computing subtask can be accurately traced, which is convenient for handling the abnormal dispatch. In addition, ensuring that the computing subtasks in the same dispatch queue are dispatched at the same time can balance the load pressure of each subnode.
[0110] S1504. Obtain the settlement receipt of each computing subtask in the dispatch queue.
[0111] Settlement receipt is used to indicate that the computation subtask has been completed. If the settlement waiting mechanism is enabled, after the computation subtask in the dispatch queue is dispatched, it waits for each child node that receives the computation subtask to return a settlement receipt.
[0112] S1505. In response to obtaining the settlement receipt of each computing subtask in the dispatch queue, clear each computing subtask in the dispatch queue, and restart the loading of the remaining computing subtasks.
[0113] In this way, when the computing subtasks in the dispatch queue are dispatched and executed, the dispatch queue continues to maintain the state where the number of available loads is equal to 0, and suspends the loading of the remaining computing subtasks, waiting until all the computing subtasks in the current dispatch queue are completed and executed and the settlement receipt of the execution completion is obtained from the main node, then the various computing subtasks in the dispatch queue are cleared, so that the number of available loads in the dispatch queue is equal to the upper limit of the capacity of the dispatch queue again, and then the loading of the remaining computing subtasks is restarted to carry out the next round of task dispatch in the dispatch queue.
[0114] In one example, the loading of the remaining computing subtasks can be suspended by calling the "await()" method and setting a counter to record the number of computing subtasks in the dispatch queue. The "await()" method can block the loading task, so that the loading thread of the computing subtask enters a waiting state. The count value of the counter is reduced by 1 each time a settlement receipt of a computing subtask is obtained, until the count value of the counter is reduced to 0, and then the waiting loading thread is awakened to restart the loading of the remaining computing subtasks.
[0115] Regarding step S150, in some embodiments of the present disclosure, it may include: Fig.13 Steps S1506 to S1509 are shown. During the dispatching process, the child node waiting for task dispatching may go offline during the process. Steps S1506 to S1509 are used to scan the offline child nodes when dispatching the computing subtasks, so as to avoid dispatching the computing subtasks to the offline child nodes.
[0116] S1506: Obtain offline node queue.
[0117] The offline node queue is used to record the computing nodes that have changed from the online state to the offline state. In one example, the computing node will change from the online state to the offline state when the session times out, reaches the expiration time, or is attacked. In this example, there is no need to record the offline reason of the computing node, nor to wait for the offline computing node to come back online. It is only necessary to determine whether the computing node is offline by obtaining the health status of the computing node in the registration center, and promptly transfer the computing subtasks assigned to the offline node to other online computing nodes for execution, which can reduce the system's waiting response and improve processing efficiency.
[0118] S1507 . In response to the existence of a computing node in the offline node queue, determine the computing node in the offline node queue as an offline node, and add the offline node to a blacklist to obtain an updated blacklist.
[0119] The presence of a computing node in the offline node queue indicates that a registered online computing node has been converted to an offline state and is recorded in the offline node queue. At this time, the computing node in the offline node queue is determined as an offline node. When an offline node is scanned, the blacklist is updated so that the computing node in the blacklist is the offline node currently scanned. For example, the node name or IP in the blacklist is overwritten with the name or IP of the offline node currently scanned to obtain an updated blacklist.
[0120] S1508 . In response to the updated blacklist including the child node, terminating the dispatch of the computing subtask corresponding to the child node, and determining the child node as an offline node.
[0121] After obtaining the blacklist, determine whether the selected child node is in the blacklist. If a child node is in the blacklist, the child node is determined as an offline node, and the dispatch of the computing subtask to the child node is terminated. In one example, if the computing subtask has been dispatched to the offline node, the execution of the computing subtask is terminated, and the status of the computing subtask is modified to execution failure, so that the computing subtask can be re-dispatched as a failed task.
[0122] S1509: Add the computing subtask to be dispatched to the offline node back into the dispatch queue.
[0123] If a child node is determined to be an offline node, resulting in the termination of the dispatch of the computing subtask that should have been dispatched to the offline node, the computing subtask will be rejoined to the dispatch queue after the dispatch is terminated, waiting for the next round of dispatch. At this time, since the offline node has been added to the blacklist, the offline node does not belong to the online computing node when the child node is selected next time, and thus cannot be selected as a child node. In this way, when the computing node goes offline, the offline computing node can be expired in time, and the corresponding dispatch tasks can be quickly failed, to avoid dispatching computing subtasks to the offline computing node.
[0124] Please combine Fig.14 In some embodiments of the present disclosure, a time-limited blacklist mechanism is introduced to avoid the waste of computing resources caused by offline nodes being unable to be selected as child nodes after coming back online.
[0125] like Fig.14 As shown, at the beginning of the dispatch of the subtask, the offline node queue is obtained, and it is determined whether there is an offline node in the offline node queue. If there is an offline node, the offline node is added to the blacklist for a predetermined time, and is removed from the blacklist after the predetermined time. For example, the offline node is added to the blacklist for 1 minute, 3 minutes, 5 minutes or other predetermined time, and then removed from the blacklist. In this way, if the offline node comes back online, it can be determined as an online computing node again after a predetermined time, and can be used as a candidate for a child node, thereby avoiding the waste of computing resources.
[0126] If there is an offline node in the offline node queue, the blacklist is updated after the offline node is added to the blacklist, and the updated blacklist is obtained as the current blacklist. If there is no offline node in the offline node queue, the currently maintained blacklist is obtained as the current blacklist. After obtaining the blacklist, determine whether the selected child node is an offline node in the blacklist. If not, continue to execute the dispatch of the computing subtask of the child node; if so, quickly fail the dispatch of the computing subtask of the child node, and re-add the computing subtask to the dispatch queue for re-dispatching.
[0127] In some embodiments of the present disclosure, the task dispatching method M100 may further include: Fig.15 Steps S180 to S190 are shown.
[0128] S180 . In response to the high load feedback from the child node, determine the child node that issues the high load feedback as a high load node.
[0129] Among them, high load feedback is used to indicate that the allocatable computing resources of the child node are low, and it is difficult to reserve enough computing resources to execute the newly assigned computing subtasks. When the main node receives high load feedback returned by a child node, the child node that issues the high load feedback is determined as a high load node, indicating that the child node is in a state of low allocatable computing resources.
[0130] In one example, when a subnode receives a dispatched computing subtask, it obtains the computing resources required to be allocated for the computing subtask and evaluates whether its remaining allocatable computing resources are sufficient. If the difference between the remaining allocatable computing resources of the subnode and the computing resources required to be allocated for the computing subtask is lower than a pre-configured difference threshold, it is considered that the remaining allocatable computing resources of the computing subnode are low and cannot be used to execute the computing subtask. At this time, the subnode returns high load feedback to the master node.
[0131] S190: Save the high-load node in the shielding list for a predetermined time, and forward the computing subtasks dispatched to the high-load node to other subnodes that are not saved in the shielding list.
[0132] The shielding list is used to temporarily shield high-load computing nodes. In one example, if a computing node is in the shielding list, tasks will not be dispatched to the computing nodes in the shielding list when dispatching tasks.
[0133] The computing subtasks dispatched to the high-load node are forwarded to other child nodes that are not saved in the shielding list. Specifically, instead of directly sending the computing subtasks from the high-load node to other child nodes that are not saved in the shielding list, the master node regulates the redistribution of the computing subtasks. If a child node returns a high-load feedback to the master node when receiving a dispatched task, the received computing subtask is returned to the master node, and the master node notifies the high-load node that the task execution has failed, and re-adds the computing subtask to the dispatch queue to redistribute the computing subtask.
[0134] Please combine Fig.16 In some embodiments of the present disclosure, the high load feedback strategy is configured as a strategy that can be selectively enabled. Fig.16As shown, when a child node receives a computing subtask, if the high-load feedback strategy is not turned on, the computing subtask is executed on the child node. If the remaining allocatable computing resources of the child node do not meet the computing resources required for the calculation, the received computing subtask enters a queue waiting state, waiting until the child node completes other computing tasks and releases enough computing resources before executing. When a child node receives a computing subtask, if the high-load feedback strategy is turned on, the child node evaluates whether its remaining allocatable computing resources are abundant. If the allocatable computing resources are abundant, the computing subtask is executed and the computing data is returned to the main node. If the allocatable computing resources are scarce, high-load feedback is returned to the main node.
[0135] Based on any of the above implementations, the present disclosure also provides a task dispatching device. Fig.17 It is a schematic block diagram of the structure of a task dispatching device according to an embodiment of the present disclosure.
[0136] like Fig.17 As shown, the task dispatching device includes:
[0137] The acquisition module 110 is used to acquire a computing task and determine a computing node that acquires the computing task as a master node.
[0138] The division module 120 is used to divide the computing task into multiple computing subtasks according to different business logics.
[0139] The query module 130 is used to query online computing nodes and obtain an available node list, which includes all online computing nodes.
[0140] The selection module 140 is used to select at least one online computing node in the available node list to determine as a child node.
[0141] The dispatching module 150 is used to dispatch the computing subtasks from the master node to the subnodes.
[0142] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.
[0143] The executor of the task dispatching method in the specific implementation manner of the present disclosure may be a mobile phone, a tablet computer, a server or other electronic device.
[0144] Therefore, based on any of the above embodiments, the present disclosure further provides an electronic device, which can execute the task dispatching method of any of the above embodiments of the present disclosure, and the task dispatching device of any of the above embodiments can be configured on the electronic device.
[0145] Fig.18 It is a schematic block diagram of the structure of an electronic device 1000 equipped with a task dispatching device for dispatching tasks according to an embodiment of the present disclosure.
[0146] The hardware structure of the electronic device 1000 can be implemented using a bus architecture. The bus architecture can include any number of interconnected buses and bridges, depending on the specific application and overall design constraints of the hardware. The bus 1100 connects various circuits including one or more processors 1200, memory 1300 and / or hardware modules together. The bus 1100 can also connect various other circuits 1400 such as peripherals, voltage regulators, power management circuits, external antennas, etc.
[0147] The bus 1100 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the figure only uses one connecting line, but does not mean that there is only one bus or one type of bus.
[0148] The present disclosure also provides a readable storage medium, in which a computer program is stored, and the computer program is used to implement the above method when executed by a processor. "Readable storage medium" can be any device that can contain, store, communicate, propagate or transmit a program for use in an instruction execution system, device or equipment or in combination with these instruction execution systems, devices or equipment. More specific examples of readable storage media include the following: an electrical connection portion (electronic device) with one or more wirings, a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM), etc.
[0149] The present disclosure also provides a computer program product. The method of the present disclosure can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed, the process or function of the present disclosure is executed in whole or in part.
[0150] A computer program or instruction may be stored in a readable storage medium or transmitted from one readable storage medium to another readable storage medium, for example, a computer program or instruction may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired or wireless means. The readable storage medium may be any available medium that can be accessed or a data storage device such as a server, data center, etc. that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it may also be an optical medium, such as a digital video disk; it may also be a semiconductor medium, such as a solid state drive. The computer readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.
[0151] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0152] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable task dispatching device to produce a machine, so that the instructions executed by the processor of the computer or other programmable task dispatching device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0153] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable task dispatching device to work in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0154] These computer program instructions can also be loaded onto a computer or other programmable task distribution device so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0155] In the description of this specification, the description with reference to the terms "one embodiment / method", "some embodiments / methods", "example", "specific example", or "some examples" etc. means that the specific features, structures, or characteristics described in conjunction with the embodiment / method or example are included in at least one embodiment / method or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment / method or example. Moreover, the specific features, structures, or characteristics described may be combined in any one or more embodiments / methods or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments / methods or examples described in this specification and features of different embodiments / methods or examples, unless they are contradictory.
[0156] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0157] Those skilled in the art should understand that the above embodiments are only for the purpose of clearly illustrating the present disclosure, and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or modifications may be made based on the above disclosure, and these changes or modifications are still within the scope of the present disclosure.
Claims
1. A task dispatching method, characterized in that: include: Obtaining a computing task, and determining a computing node that obtains the computing task as a master node; Dividing the computing task into multiple computing subtasks according to different business logics; Querying online computing nodes to obtain an available node list, wherein the available node list includes all online computing nodes; Selecting at least one of the online computing nodes in the available node list to be determined as a child node; as well as The computing subtask is dispatched from the master node to the subnode.
2. The task dispatching method according to claim 1, characterized in that: Also includes: Obtaining the dispatch result of the computing subtask; as well as In response to the dispatch result of the computing subtask indicating a dispatch failure, the subnode corresponding to the computing subtask that failed to dispatch is notified of a task execution failure.
3. The task dispatching method according to claim 2, characterized in that: Obtain the dispatch result of the computing subtask, including: Scan all the computing subtasks waiting to be executed, and obtain the computing subtasks whose waiting time has expired; Determine the computing subtask that has timed out as a dispatch failure task; Obtain the retry upper limit and the number of retries of the child node corresponding to the failed dispatch task; In response to the number of retries being less than or equal to the retry limit, re-dispatching the failed task to the child node; and In response to the number of retries of the dispatch failure task being greater than or equal to the retry upper limit, the dispatch result of the dispatch failure task is determined as a dispatch failure.
4. The task dispatching method according to claim 1, characterized in that: Dispatching the computing subtask from the master node to the subnode includes: Obtain the available number of the dispatch queue of the master node; In response to the loadable quantity being greater than 0, loading one of the plurality of computing subtasks into the dispatch queue; In response to the loadable quantity being equal to 0, suspending the loading of the remaining computing subtasks, and dispatching the computing subtasks in the dispatch queue to the child node; Obtaining a settlement receipt for each of the computing subtasks in the dispatch queue; and In response to obtaining the settlement receipt of each of the computing subtasks in the dispatch queue, each of the computing subtasks in the dispatch queue is cleared, and the filling of the remaining computing subtasks is restarted.
5. The task dispatching method according to claim 1, characterized in that: The computing subtask is dispatched from the master node to the subnode, further comprising: Obtaining an offline node queue, where the offline node queue is used to record computing nodes that are converted from an online state to an offline state; In response to the presence of a computing node in the offline node queue, determining the computing node in the offline node queue as an offline node, and adding the offline node to a blacklist to obtain an updated blacklist; In response to the updated blacklist including the child node, terminating the dispatch of the computing subtask corresponding to the child node, and determining the child node as the offline node; and The computing subtask to be dispatched to the offline node is added back into the dispatch queue of the master node.
6. The task dispatching method according to claim 1, characterized in that: Also includes: In response to the high load feedback from the child node, determining the child node that issues the high load feedback as a high load node; as well as The high-load node is stored in a shielding list for a predetermined time, and the computing subtask dispatched to the high-load node is forwarded to other subnodes that are not stored in the shielding list.
7. The task dispatching method according to claim 1, characterized in that: Query the online computing nodes and get a list of available nodes, including: Periodically scan sessions of each registered computing node and obtain scan results; and In response to the scanning result indicating that the session is normal, determining the computing node corresponding to the session whose scanning result indicates that the session is normal as an online computing node, and updating the online computing node in the available node list to obtain the updated available node list; Optionally, query the online computing nodes to obtain a list of available nodes, including: In response to the scanning result being a session exception, the session with the scanning result being a session exception is determined as a failed session, the failed session is terminated, and the computing node corresponding to the failed session is removed from the available node list to obtain an updated available node list.
8. An electronic device, characterized in that: include: A memory storing execution instructions; as well as A processor, wherein the processor executes the execution instructions stored in the memory, so that the processor executes the task dispatching method according to any one of claims 1 to 7.
9. A readable storage medium, characterized in that: The readable storage medium stores execution instructions, which are used to implement the task dispatching method according to any one of claims 1 to 7 when executed by a processor.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the task dispatching method according to any one of claims 1 to 7 is implemented.