Task scheduling method and device, electronic equipment, storage medium and program product

By screening the execution nodes to be dispatched in the bank-side task processing system and scheduling tasks, the bottlenecks of execution node performance and waste of hardware resources in the existing technology are solved, and more efficient task processing and resource utilization are achieved.

CN119902883APending Publication Date: 2025-04-29INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411963181.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

The existing bank-side task processing method is not flexible enough, resulting in performance bottlenecks in execution nodes, wasted hardware resources, and task processing efficiency is low.

Method used

By obtaining the CPU usage ratio, memory usage ratio and message accumulation of each execution node, filtering the execution nodes to be scheduled, and scheduling unexecuted tasks to other execution nodes for processing, maximizing the performance utilization of the execution nodes.

Benefits of technology

It improves the performance utilization rate of execution nodes, avoids waste of hardware resources, and enhances the flexibility and processing efficiency of task scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119902883A_ABST
    Figure CN119902883A_ABST
Patent Text Reader

Abstract

The invention discloses a task scheduling method and device, electronic equipment, a storage medium and a program product, and relates to the field of distributed technologies. The method comprises the following steps: acquiring a CPU occupancy ratio, a memory occupancy ratio and a message accumulation number of each execution node; according to the CPU occupancy proportion, the memory occupancy proportion or the message accumulation number, screening at least one execution node to be scheduled from the execution nodes; detecting at least one first unexecuted task in each to-be-scheduled execution node, and scheduling each first unexecuted task to a first other execution node, so that the first other execution node processes the first unexecuted task; wherein the first other execution nodes are other execution nodes except the execution node to be scheduled. According to the technical scheme, the performance utilization rate of the execution nodes can be improved, waste of hardware resources by the execution nodes is avoided, and then the task scheduling flexibility and the task processing efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of distributed technology, and in particular to a task scheduling method, device, electronic equipment, storage medium and program product. Background Art

[0002] When banks handle various financial businesses, they need to process a large number of tasks and corresponding data, which places high demands on the performance and task processing efficiency of the bank.

[0003] Existing banks usually perform consumer deployment, that is, they have multiple execution nodes, run a fixed number of task processing threads on each execution node, and process tasks by controlling the online and offline nodes.

[0004] However, the method of processing tasks by bringing nodes online and offline is not flexible enough, and since the number of task processing threads on a single execution node is fixed, the execution node itself may reach a performance bottleneck due to reasons such as the input and output interface. However, the performance of a single execution node itself may not be saturated. At this time, adding execution nodes will waste more hardware resources, and the start and stop process of the execution node is slow, which is not suitable for frequent scaling and will also affect the task processing speed. Summary of the invention

[0005] The present invention provides a task scheduling method, device, electronic device, storage medium and program product, which can improve the performance utilization rate of execution nodes, avoid the waste of hardware resources by execution nodes, and further improve the flexibility of task scheduling and the efficiency of task processing.

[0006] According to one aspect of the present invention, a task scheduling method is provided, the method comprising:

[0007] Get the CPU usage ratio, memory usage ratio and message accumulation number of each execution node;

[0008] Selecting at least one execution node to be scheduled from each of the execution nodes according to the CPU occupancy ratio, the memory occupancy ratio or the number of message accumulations;

[0009] Detect at least one first unexecuted task in each of the execution nodes to be scheduled, and schedule each of the first unexecuted tasks to a first other execution node so that the first other execution node processes the first unexecuted task; wherein the first other execution node is an execution node other than the execution node to be scheduled.

[0010] According to another aspect of the present invention, a task scheduling device is provided, the device comprising:

[0011] Performance data acquisition module, used to obtain the CPU usage ratio, memory usage ratio and message accumulation number of each execution node;

[0012] An execution node screening module, used for screening at least one execution node to be scheduled from each of the execution nodes according to the CPU occupancy ratio, the memory occupancy ratio or the message accumulation number;

[0013] The first task scheduling module is used to detect at least one first unexecuted task in each of the execution nodes to be scheduled, and schedule each of the first unexecuted tasks to the first other execution node so that the first other execution node processes the first unexecuted task; wherein the first other execution node is an execution node other than the execution node to be scheduled.

[0014] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0015] at least one processor; and

[0016] a memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the task scheduling method described in any embodiment of the present invention.

[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the task scheduling method described in any embodiment of the present invention when executed.

[0019] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the task scheduling method described in any embodiment of the present invention is implemented.

[0020] The technical solution of the embodiment of the present invention obtains the CPU occupancy ratio, memory occupancy ratio and message accumulation number of each execution node, selects at least one execution node to be scheduled from each execution node according to the performance bottleneck degree of the CPU occupancy ratio, memory occupancy ratio or message accumulation number, detects at least one first unexecuted task in each execution node to be scheduled, and schedules each first unexecuted task to the first other execution node so that the first other execution node processes the first unexecuted task. Compared with the scheduling of each task to be executed by simply going online and offline for the execution node, the technical solution of the embodiment of the present invention introduces the CPU occupancy ratio, memory occupancy ratio and message accumulation number of each execution node, selects the execution node to be scheduled in each execution node, and schedules the first unexecuted task in the execution node to be scheduled, and maximizes the performance utilization in each execution node by adopting the node task scheduling method, which can improve the performance utilization rate of the execution node, avoid the execution node from repeatedly going online and offline, reduce the waste of hardware resources by the execution node, and improve the task scheduling flexibility and task processing efficiency.

[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0023] Figure 1 is a flowchart of a task scheduling method provided according to Embodiment 1 of the present invention;

[0024] Figure 2 is a flowchart of a task scheduling method provided according to Embodiment 2 of the present invention;

[0025] Figure 3 This is a structural diagram of a distributed message consumption deployment system provided according to Embodiment 2 of the present invention;

[0026] Figure 4 is a structural diagram of a task scheduling device provided according to Embodiment 3 of the present invention;

[0027] Figure 5 It is a structural schematic diagram of an electronic device for implementing the task scheduling method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] Embodiment 1

[0031] Figure 1 A flowchart of a task scheduling method provided in Embodiment 1 of the present invention. The embodiment of the present invention is applicable to the case of scheduling tasks in distributed execution nodes, and the method can be executed by a task scheduling device, which can be implemented in the form of hardware and / or software, and the task scheduling device can be configured in an electronic device that carries the task scheduling function, such as a client or a server.

[0032] See also Figure 1 The task scheduling method shown includes:

[0033] S110, obtaining the CPU occupancy ratio, memory occupancy ratio and message accumulation number of each execution node.

[0034] The amount of tasks and data that need to be processed by the financial business on the bank side is very large. Data processing involves different processing flows, and different systems are required for distributed processing. Compared with the synchronous sequential processing method, asynchronous processing is more efficient for the financial business on the bank side. For the financial business on the bank side, there is usually at least one execution node. The execution node can be used to process financial tasks on the bank side, such as credit business. The execution nodes are distributed among each other. The number of execution nodes can be at least one. A single execution node can include at least one task processing thread. The task processing thread can be used to asynchronously process tasks in the execution node.

[0035] The CPU (Central Processing Unit, Chinese name is central processing unit) occupancy ratio, memory occupancy ratio and message accumulation number can be used to measure the performance of the execution node when processing tasks. The CPU occupancy ratio can be used to characterize the usage of the CPU resources of the execution node. The memory occupancy ratio can be used to characterize the usage of the memory resources of the execution node. One message queue corresponds to one task. The number of message accumulations in a single message queue can be used to characterize the unexecuted status of a single task. The number of message accumulations of an execution node can be the total number of unexecuted messages in each message queue of the execution node. The number of message accumulations in each consumer queue in the execution node can be used to characterize the overall task congestion level of the execution node.

[0036] Specifically, corresponding sensors can be used to perform performance detection on each execution node to obtain the CPU occupancy ratio and memory occupancy ratio of each execution node. The message queue of each execution node can be queried to obtain the number of message accumulations of each execution node.

[0037] S120 , selecting at least one execution node to be scheduled from each execution node according to the CPU occupancy ratio, the memory occupancy ratio or the number of message accumulations.

[0038] The execution node to be scheduled may be an execution node that has reached a performance bottleneck. Compared with using the available number of input and output interfaces (I / O) to measure the performance utilization of the execution node, using the CPU occupancy ratio, memory occupancy ratio and message accumulation number to detect the performance utilization of the execution node, the detected performance utilization of the execution node is closer to the actual performance utilization of the execution node, and the detection accuracy is higher.

[0039] Specifically, a first preset CPU occupancy ratio threshold, a first preset memory occupancy ratio threshold, and a preset message accumulation number threshold can be obtained. The CPU occupancy ratio is compared with the first preset CPU occupancy ratio threshold. The memory occupancy ratio is compared with the first preset memory occupancy ratio threshold. The message accumulation number is compared with the preset message accumulation number threshold. From each execution node, the execution nodes whose CPU occupancy ratio is greater than or equal to the first preset CPU occupancy ratio threshold, the memory occupancy ratio is greater than or equal to the first preset memory occupancy ratio threshold, or the message accumulation number is greater than or equal to the preset message accumulation number threshold are screened to obtain at least one execution node to be scheduled.

[0040] Among them, the first preset CPU occupancy ratio threshold value can be a preset upper limit reference value of the CPU occupancy ratio. The first preset memory occupancy ratio threshold value can be a preset upper limit reference value of the memory occupancy ratio. The preset message accumulation number threshold value can be a preset upper limit reference value of the message accumulation number of the execution node. The first preset CPU occupancy ratio threshold value, the first preset memory occupancy ratio threshold value and the preset message accumulation number threshold value can be used to measure the resource usage of the execution node. The first preset CPU occupancy ratio threshold value, the first preset memory occupancy ratio threshold value and the preset message accumulation number threshold value can be set and adjusted by technical personnel based on experience.

[0041] In an optional embodiment of the present invention, after selecting at least one execution node to be scheduled from each execution node according to the performance bottleneck degree of the CPU occupancy ratio, the memory occupancy ratio or the number of message accumulation, it also includes: obtaining a preset ratio threshold; counting the target ratio of each execution node to be scheduled in each execution node; when the target ratio is greater than or equal to the preset ratio threshold, bringing a new execution node online.

[0042] The target ratio can be the ratio between the number of execution nodes to be scheduled and the total number of execution nodes. The target ratio can be used to characterize the proportion of execution nodes that have reached a performance bottleneck among each execution node. It can be understood that the target ratio can be used to characterize the overall task processing capability of the system composed of each execution node. The preset ratio threshold can be a reference value for the upper limit of the preset target ratio. The preset ratio threshold can be set and adjusted by technical personnel based on experience. If the target ratio is greater than or equal to the preset ratio threshold, it can be understood that the number of execution nodes that have reached a performance bottleneck is too large, that is, the overall task processing capability of the system is too low. At this time, the overall task processing capability of the system can be improved by launching new execution nodes.

[0043] Specifically, after screening at least one execution node to be scheduled from each execution node according to the CPU occupancy ratio, memory occupancy ratio or the degree of performance bottleneck of the number of message accumulation, the preset ratio threshold value pre-set by the technician can be obtained. The ratio between the number of each execution node to be scheduled and the total number of each execution node can be calculated to obtain the target ratio. When the target ratio is less than the preset ratio threshold, at least one first unexecuted task in each execution node to be scheduled can be detected, and each first unexecuted task can be scheduled to the first other execution node so that the first other execution node processes the first unexecuted task; when the target ratio is greater than or equal to the preset ratio threshold, a new execution node can be launched. After the new node is launched, at least one first unexecuted task in each execution node to be scheduled is detected, and each first unexecuted task is scheduled to the new execution node so that the new execution node processes the first unexecuted task.

[0044] This solution introduces the detection of the target ratio of the execution nodes to be scheduled in each execution node. When the target ratio is too high, a new execution node is put online. This comprehensively considers the overall performance status of all execution nodes in the system, which can improve the stability of task scheduling and task processing.

[0045] In an optional embodiment of the present invention, after selecting at least one execution node to be scheduled from each execution node according to the CPU occupancy ratio, the memory occupancy ratio or the number of message accumulations, it also includes: obtaining the task waiting time of each task processing thread in each execution node and a preset task waiting time threshold; from each execution node, selecting the execution nodes in which the task waiting time of the task processing thread is greater than or equal to the preset task waiting time threshold, and obtaining at least one execution node to be processed; for a single execution node to be processed, in each task processing thread of the execution node to be processed, detecting the task processing thread to be exited whose task waiting time is greater than or equal to the preset task waiting time threshold, and exiting the task processing thread to be exited.

[0046] The task waiting time of the task processing thread may be the waiting time for the task processing thread to wait for the next task. The task waiting time of the task processing thread may be used to characterize the idleness of the task processing thread. The preset task processing time threshold may be a preset upper limit reference value of the task waiting time. The preset task waiting time threshold may be used to measure the idleness of the task processing thread. The preset task waiting time threshold may be preset and adjusted by a technician.

[0047] Specifically, a preset task waiting time threshold value can be obtained. The task waiting time of the task processing thread of each execution node can be detected. The task waiting time of each task processing thread in each execution node can be compared with the preset task waiting time threshold value. From each execution node, the execution nodes whose task waiting time is greater than or equal to the preset task waiting time threshold value are screened to obtain at least one execution node to be processed. For a single execution node to be processed, the task processing thread to be exited whose task waiting time is greater than or equal to the preset task waiting time threshold value can be detected in each task processing thread of the execution node to be processed, and the task processing thread to be exited can be exited.

[0048] This solution introduces a screening process for the execution nodes to be processed and the task processing threads to be exited in the execution nodes to be processed based on the task waiting time, as well as an exit process for the task processing threads to be exited, thereby avoiding the ineffective occupation of execution node resources by idle task processing threads, further improving the system resource utilization of the execution nodes, and thus improving the task processing efficiency of the execution nodes.

[0049] In an optional embodiment of the present invention, after selecting at least one execution node to be scheduled from each execution node according to the CPU occupancy ratio, the memory occupancy ratio or the number of message accumulations, it also includes: obtaining a second preset CPU occupancy ratio threshold and a second preset memory occupancy ratio threshold; selecting, from each execution node, execution nodes whose CPU occupancy ratio is less than the second preset CPU occupancy ratio threshold or whose memory occupancy ratio is less than the second preset memory occupancy ratio threshold, to obtain at least one execution node to be taken offline; detecting at least one second unexecuted task in each execution node to be taken offline, and scheduling each second unexecuted task to a second other execution node, so that the second other execution node processes the second unexecuted task; and taking the execution node to be taken offline offline.

[0050] The second preset CPU occupancy ratio threshold value may be a preset lower limit reference value of the CPU occupancy ratio. The second preset memory occupancy ratio threshold value may be a preset lower limit reference value of the memory occupancy ratio. The second preset CPU occupancy ratio threshold value and the second preset memory occupancy ratio may be used to measure the resource usage of the execution node. The second preset CPU occupancy ratio threshold value and the second preset memory occupancy ratio may be set and adjusted by technical personnel based on experience. If the CPU occupancy ratio is less than the second preset CPU occupancy ratio threshold value, it can be understood that the CPU resources of the execution node are underused and the execution node is in an idle state. If the memory occupancy ratio is less than the second preset memory occupancy ratio threshold value, it can be understood that the memory resources of the execution node are underused and the execution node is in an idle state.

[0051] The execution node to be taken offline may be an execution node in an idle state, that is, an execution node that needs to be taken offline. The second unexecuted task may be a task that has not been executed in the execution node to be taken offline. It can be understood that the first unexecuted task may be a schedulable task in the execution node to be taken offline. The second other execution node may be other execution nodes except the execution node to be taken offline and the execution node to be scheduled. The second other execution node may also be an execution node that has not reached a performance bottleneck, and tasks can be added on the basis of the existing tasks of the execution node. In comparison, both the first other execution node and the second other execution node have not reached a performance bottleneck, and tasks can be added on the basis of the existing tasks of the execution node. However, the range of the first other execution node is greater than or equal to the range of the second other execution node.

[0052] Specifically, after at least one execution node to be scheduled is screened from each execution node according to the CPU occupancy ratio, the memory occupancy ratio or the number of message accumulations, a second preset CPU occupancy ratio threshold and a second preset memory occupancy ratio threshold predetermined by a technician can be obtained. The CPU occupancy ratio and the second preset CPU occupancy ratio threshold can be compared. The memory occupancy ratio and the second preset memory occupancy ratio threshold can be compared. From each execution node, an execution node whose CPU occupancy ratio is less than the second preset CPU occupancy ratio threshold or whose memory occupancy ratio is less than the second preset memory occupancy ratio threshold is screened to obtain at least one execution node to be offline.

[0053] Other execution nodes except the execution node to be taken offline and the execution node to be scheduled may be determined as the second other execution nodes. Tasks in each execution node to be taken offline may be detected to obtain at least one second unexecuted task in each execution node to be scheduled. Load balancing may be performed on each second other execution node, and each second unexecuted task in each execution node to be taken offline may be scheduled to the second other execution node, so that the second other execution node processes the second unexecuted task. The execution node to be taken offline may be taken offline.

[0054] Exemplarily, a second unexecuted task copy may be created for the second unexecuted task, and the second unexecuted task in the execution node to be scheduled may be deleted. The second unexecuted task copy may be scheduled to a second other execution node so that the second other execution node processes the second unexecuted task.

[0055] Optionally, if it is detected that the tasks in the execution node to be taken offline are empty, the execution node to be taken offline may be directly taken offline.

[0056] This solution introduces a process of screening execution nodes to be taken offline based on the CPU occupancy ratio and memory occupancy ratio, and taking the execution nodes to be taken offline, thereby avoiding the ineffective occupation of system resources by idle execution nodes and further improving the utilization rate of system resources.

[0057] S130: Detect at least one first unexecuted task in each execution node to be scheduled, and schedule each first unexecuted task to a first other execution node, so that the first other execution node processes the first unexecuted task.

[0058] The first unexecuted task may be an unexecuted task in the execution node to be scheduled. It can be understood that the first unexecuted task may be a schedulable task in the execution node to be scheduled. The first other execution node may be an execution node other than the execution node to be scheduled. The first other execution node may be an execution node that has not reached a performance bottleneck and can add tasks based on the existing tasks of the execution node.

[0059] Specifically, other execution nodes except the execution node to be scheduled can be determined as the first other execution nodes. The tasks in each execution node to be scheduled can be detected to obtain at least one first unexecuted task in each execution node to be scheduled. Each first other execution node can be load balanced, and each first unexecuted task in each execution node to be scheduled can be scheduled to the first other execution node, so that the first other execution node processes the first unexecuted task. Exemplarily, a first unexecuted task copy can be created for the first unexecuted task, and the first unexecuted task in the execution node to be scheduled can be deleted. The first unexecuted task copy can be scheduled to the first other execution node, so that the first other execution node processes the first unexecuted task.

[0060] The technical solution of the embodiment of the present invention obtains the CPU occupancy ratio, memory occupancy ratio and message accumulation number of each execution node, selects at least one execution node to be scheduled from each execution node according to the performance bottleneck degree of the CPU occupancy ratio, memory occupancy ratio or message accumulation number, detects at least one first unexecuted task in each execution node to be scheduled, and schedules each first unexecuted task to the first other execution node so that the first other execution node processes the first unexecuted task. Compared with the scheduling of each task to be executed by simply going online and offline for the execution node, the technical solution of the embodiment of the present invention introduces the CPU occupancy ratio, memory occupancy ratio and message accumulation number of each execution node, selects the execution node to be scheduled in each execution node, and schedules the first unexecuted task in the execution node to be scheduled, and maximizes the performance utilization in each execution node by adopting the node task scheduling method, which can improve the performance utilization rate of the execution node, avoid the execution node from repeatedly going online and offline, reduce the waste of hardware resources by the execution node, and improve the task scheduling flexibility and task processing efficiency.

[0061] Embodiment 2

[0062] Figure 2 A flowchart of a task scheduling method provided for the second embodiment of the present invention. Based on the above embodiments, the embodiment of the present invention specifies "selecting at least one execution node to be scheduled from each execution node according to the CPU occupancy ratio, the memory occupancy ratio or the number of message accumulations" as "obtaining the task processing time, the preset task processing time threshold, the first preset CPU occupancy ratio threshold, the first preset memory occupancy ratio threshold and the preset message accumulation number threshold of each execution node; from each execution node, selecting the execution node whose task processing time is greater than or equal to the preset task processing time threshold, and obtaining at least one candidate execution node; from each candidate execution node, selecting the execution node whose CPU occupancy ratio is greater than or equal to the first preset CPU occupancy ratio threshold, the memory occupancy ratio is greater than or equal to the first preset memory occupancy ratio threshold or the number of message accumulations is greater than or equal to the preset message accumulation number threshold, and obtaining at least one execution node to be scheduled", introducing the task processing time, performing the initial screening of each execution node, and performing the secondary screening of each execution node based on the CPU occupancy ratio, the memory occupancy ratio and the number of message accumulations, which can improve the screening accuracy of the execution nodes to be scheduled, thereby improving the accuracy of task scheduling, and thereby improving the efficiency and accuracy of task processing. It should be noted that for the parts not described in detail in the embodiments of the present invention, reference may be made to the descriptions of other embodiments.

[0063] See also Figure 2 The task scheduling method shown includes:

[0064] S210, obtaining the CPU occupancy ratio, memory occupancy ratio and message accumulation number of each execution node.

[0065] S220, obtaining the task processing time of each execution node, a preset task processing time threshold, a first preset CPU occupancy ratio threshold, a first preset memory occupancy ratio threshold, and a preset message accumulation number threshold.

[0066] The task processing time may be a comprehensive value of a single task processing time of each task processing thread in the execution node. The task processing time may be used to measure the comprehensive task processing capability of each task processing thread in the execution node. Exemplarily, the task processing time may be an average or maximum value of a single processing time of each task processing thread in the execution node for a task. The preset task processing time threshold may be a preset upper limit reference value of the task processing time. The preset task processing time threshold may be preset and adjusted by a technician.

[0067] Specifically, each task processing thread in each execution node can be detected to obtain the single task processing time of each task processing thread in each execution node. For a single execution node, the single task processing time of each task processing thread can be integrated to obtain the task processing time of the execution node. The preset task processing time threshold, the first preset CPU occupancy ratio threshold, the first preset memory occupancy ratio threshold and the preset message accumulation number threshold pre-set by the technician can be obtained.

[0068] S230 , screening out execution nodes whose task processing time is greater than or equal to a preset task processing time threshold from among the execution nodes, and obtaining at least one candidate execution node.

[0069] The candidate execution node can be used to characterize the execution node with insufficient task processing capability. The candidate execution node can be the initial screening result of the execution node based on the task processing time. The execution node with a task processing time greater than or equal to the preset task processing time threshold can be understood as an execution node with too long task processing time, that is, an execution node with insufficient task processing capability.

[0070] Specifically, the task processing time may be compared with a preset task processing time threshold, and the execution nodes whose task processing time is greater than or equal to the preset task processing time threshold may be screened from the execution nodes to obtain at least one candidate execution node.

[0071] In an optional embodiment of the present invention, after screening out execution nodes whose CPU occupancy ratio is greater than or equal to a first preset CPU occupancy ratio threshold, whose memory occupancy ratio is greater than or equal to a first preset memory occupancy ratio threshold, or whose message accumulation number is greater than or equal to a preset message accumulation number threshold from each candidate execution node, and obtaining at least one execution node to be scheduled, it also includes: detecting a first other execution node other than the execution node to be scheduled; and when the first other execution node is empty, bringing a new execution node online.

[0072] Specifically, a comparison can be made between the number of nodes to be executed and the total number of nodes of the execution nodes. When the number of nodes to be executed is less than the total number of nodes of the execution nodes, it is determined that the first other execution node except the execution node to be scheduled is not empty; when the number of nodes to be executed is equal to the total number of nodes of the execution nodes, it is determined that the first other execution node except the execution node to be scheduled is empty. When the first other execution node is not empty, at least one first unexecuted task in each execution node to be scheduled can be detected, and each first unexecuted task can be scheduled to the first other execution node, so that the first other execution node processes the first unexecuted task; when the first other execution node is empty, a new execution node is put online. After the new node is put online, at least one first unexecuted task in each execution node to be scheduled is detected, and each first unexecuted task is scheduled to the new execution node, so that the new execution node processes the first unexecuted task.

[0073] This solution brings a new execution node online when the first other execution node is empty, which can avoid scheduling stagnation of the first unexecuted task in the execution node to be scheduled, thereby improving the fault tolerance of task scheduling and task processing.

[0074] S240. Filter, from among the candidate execution nodes, execution nodes whose CPU occupancy ratio is greater than or equal to a first preset CPU occupancy ratio threshold, whose memory occupancy ratio is greater than or equal to a first preset memory occupancy ratio threshold, or whose message accumulation number is greater than or equal to a preset message accumulation number threshold, to obtain at least one execution node to be scheduled.

[0075] If the CPU usage ratio is greater than or equal to the first preset CPU usage ratio threshold, it can be understood that the CPU resource usage has reached a performance bottleneck. If the memory usage ratio is greater than or equal to the first preset memory usage ratio threshold, it can be understood that the memory resource usage has reached a performance bottleneck. If the number of message accumulations is greater than or equal to the preset message accumulation number threshold, it can be understood that the congestion level of the message queue has reached a performance bottleneck.

[0076] Specifically, the CPU occupancy ratio is compared with a first preset CPU occupancy ratio threshold. The memory occupancy ratio is compared with a first preset memory occupancy ratio threshold. The number of message accumulations is compared with a preset message accumulation number threshold. From each candidate execution node, an execution node whose CPU occupancy ratio is greater than or equal to the first preset CPU occupancy ratio threshold, whose memory occupancy ratio is greater than or equal to the first preset memory occupancy ratio threshold, or whose message accumulation number is greater than or equal to the preset message accumulation number threshold is selected to obtain at least one execution node to be scheduled.

[0077] S250: Detect at least one first unexecuted task in each execution node to be scheduled, and schedule each first unexecuted task to a first other execution node, so that the first other execution node processes the first unexecuted task.

[0078] The first other execution nodes are other execution nodes except the execution node to be scheduled.

[0079] The technical solution of the embodiment of the present invention performs preliminary screening of each execution node through the task processing time of the execution node to obtain at least one candidate execution node, and realizes preliminary screening of the execution nodes from the dimension of the comprehensive task processing capability of the execution node; performs secondary screening of each execution node through the CPU occupancy ratio, memory occupancy ratio and message accumulation number of each execution node, and realizes secondary screening of the execution nodes from three dimensions: the CPU resource usage of each execution node, the memory resource usage and the message congestion degree of the message queue, which can improve the screening accuracy of the execution nodes to be scheduled, thereby improving the accuracy of task scheduling, and thereby improving the task processing efficiency and accuracy.

[0080] Figure 3 This is a schematic diagram of the structure of a distributed message consumption deployment system. Based on the above embodiment, Figure 3 A preferred embodiment of the present invention is provided. Figure 3 As shown, the distributed message consumption deployment system mainly includes: policy configuration module, policy execution module, task management module, task scheduling module, task start and stop module, consumption task module, message queue module, message load module, performance detection module and execution node module.

[0081] Among them, the policy configuration module can be used to configure the task scheduling strategy, that is, to control the expansion and contraction of the execution node. The policy execution module (i.e., the task scheduling device in this solution) can be used to process the corresponding tasks in the to-be-executed nodes according to the performance indicator information (i.e., CPU occupancy ratio, memory occupancy ratio, message accumulation number, task processing time, and task waiting time) obtained by the performance detection module, according to the task scheduling strategy and the task information of the task management module (i.e., the tasks in each execution node). The task management module can be used to configure executable tasks. The task scheduling module can be used to perform remote task scheduling of distributed execution nodes, and can also sense the online and offline execution nodes, and issue tasks. The task start and stop module can be used to respond to the task scheduling module to start and stop the execution task. The consumption task module can be used to complete the function of the consumption task. The message queue module can be used to complete the message transmission of the consumption task. The message load module can be used to evenly load the message to the task processing thread after the execution node is expanded and contracted. The performance detection module can be used to detect the CPU occupancy ratio, memory occupancy ratio, message accumulation number, task processing time, and task waiting time of the execution node, and return relevant indicators. The execution node module can be the physical carrier for the task processing thread to process tasks.

[0082] The specific usage steps between the modules in the above distributed message consumption deployment system include:

[0083] After the policy configuration module configures the task scheduling strategy, and the task management module configures the information of the executable tasks (such as task name, maximum number of task copies, start time, loop start and execution interval, etc.), the policy execution module schedules the tasks in each execution node according to the CPU occupancy ratio, memory occupancy ratio, number of message accumulation, task processing time, task waiting time and task scheduling strategy. That is, according to the first other execution node that can carry the unexecuted tasks online, according to the load balancing strategy, the unexecuted tasks are assigned to a first other execution node for processing. There are many consumer tasks deployed on the execution node. When the task scheduling notifies the execution node to start the task, the task start and stop module will start the specific consumer task. The consumer task registers the message queue in the message load module, calls the message queue module, and sends the message of the consumer task to the message queue through the message load module by polling and other methods. The message load module sends the number of message accumulations to the performance detection module.

[0084] Among them, the task scheduling strategy may include:

[0085] 1) If the CPU occupancy ratio of the execution node exceeds a first preset CPU occupancy ratio threshold or the memory occupancy ratio exceeds a first preset memory occupancy ratio threshold, the execution node is determined as an execution node to be scheduled, and at least one first unexecuted task in the execution node to be scheduled is detected, and the first unexecuted task is scheduled to a first other execution node so that the first other execution node processes the first unexecuted task.

[0086] 2) If the number of message accumulations exceeds a preset message accumulation threshold, the execution node is determined as an execution node to be scheduled, at least one first unexecuted task in the execution node to be scheduled is detected, and the first unexecuted task is scheduled to a first other execution node so that the first other execution node processes the first unexecuted task.

[0087] 3) If the consumption waiting time exceeds the preset consumption waiting time threshold, and the CPU occupancy ratio exceeds the first preset CPU occupancy ratio threshold (or the memory occupancy ratio exceeds the first preset memory occupancy ratio threshold), the execution node is determined as the execution node to be scheduled, and at least one first unexecuted task in the execution node to be scheduled is detected, and the first unexecuted task is scheduled to the first other execution node so that the first other execution node processes the first unexecuted task; if the first other execution node is empty, a new execution node is put online; if the consumption waiting time exceeds the preset consumption waiting time threshold, and the CPU occupancy ratio is less than or equal to the first preset CPU occupancy ratio threshold (or the memory occupancy ratio is less than or equal to the first preset memory occupancy ratio threshold), the new execution node is not triggered to be put online.

[0088] 4) If the target proportion of each execution node to be scheduled among all execution nodes is greater than the preset abnormal proportion threshold, a new execution node is put online.

[0089] 5) If the task waiting time of the task processing thread is greater than or equal to the preset task waiting time threshold, the task processing thread is determined as the task processing thread to be exited, and the task processing thread to be exited is actively exited to increase the load of other task processing threads.

[0090] 6) If the performance detection module senses that a certain execution node is idle, that is, it detects that the CPU occupancy ratio of the execution node is less than the second preset CPU occupancy ratio threshold or the memory occupancy ratio is less than the second preset memory occupancy ratio threshold, then the task scheduling module is notified to take the execution node offline to save system resources.

[0091] This system obtains the CPU occupancy rate, memory occupancy rate, message accumulation number, task processing time and task waiting time, and schedules the tasks in the execution node according to the set task scheduling strategy, which can improve the resource utilization rate of the execution node and reduce the additional resource occupation. It can improve the availability of the task scheduling method and the overall throughput of the system without manual intervention, and can reduce labor costs. Compared with increasing the startup overhead when deploying nodes, the cost of starting and stopping tasks is lower, and the task scheduling efficiency and task processing efficiency are higher.

[0092] Embodiment 3

[0093] Figure 4 A structural diagram of a task scheduling device provided in Embodiment 3 of the present invention. The embodiment of the present invention can be applied to the situation of scheduling tasks in distributed execution nodes, the device can execute the task scheduling method, the device can be implemented in the form of hardware and / or software, and the device can be configured in an electronic device that carries the task scheduling function, such as a client or a server.

[0094] See also Figure 4 The task scheduling device shown includes: a performance data acquisition module 410, an execution node screening module 420 and a first task scheduling module 430. The performance data acquisition module 410 is used to obtain the CPU occupancy ratio, memory occupancy ratio and message accumulation number of each execution node; the execution node screening module 420 is used to screen at least one execution node to be scheduled from each execution node according to the CPU occupancy ratio, the memory occupancy ratio or the message accumulation number; the first task scheduling module 430 is used to detect at least one first unexecuted task in each execution node to be scheduled, and schedule each first unexecuted task to the first other execution node, so that the first other execution node processes the first unexecuted task; wherein the first other execution node is other execution node except the execution node to be scheduled.

[0095] The technical solution of the embodiment of the present invention obtains the CPU occupancy ratio, memory occupancy ratio and message accumulation number of each execution node, selects at least one execution node to be scheduled from each execution node according to the performance bottleneck degree of the CPU occupancy ratio, memory occupancy ratio or message accumulation number, detects at least one first unexecuted task in each execution node to be scheduled, and schedules each first unexecuted task to the first other execution node so that the first other execution node processes the first unexecuted task. Compared with the scheduling of each task to be executed by simply going online and offline for the execution node, the technical solution of the embodiment of the present invention introduces the CPU occupancy ratio, memory occupancy ratio and message accumulation number of each execution node, selects the execution node to be scheduled in each execution node, and schedules the first unexecuted task in the execution node to be scheduled, and maximizes the performance utilization in each execution node by adopting the node task scheduling method, which can improve the performance utilization rate of the execution node, avoid the execution node from repeatedly going online and offline, reduce the waste of hardware resources by the execution node, and improve the task scheduling flexibility and task processing efficiency.

[0096] In an optional embodiment of the present invention, the execution node screening module includes: a task processing time acquisition unit, used to obtain the task processing time of each of the execution nodes, a preset task processing time threshold, a first preset CPU occupancy ratio threshold, a first preset memory occupancy ratio threshold and a preset message accumulation number threshold; an alternative execution node screening unit, used to screen the execution nodes whose task processing time is greater than or equal to the preset task processing time threshold from each of the execution nodes, and obtain at least one alternative execution node; a to-be-scheduled execution node screening unit, used to screen the execution nodes whose CPU occupancy ratio is greater than or equal to the first preset CPU occupancy ratio threshold, the memory occupancy ratio is greater than or equal to the first preset memory occupancy ratio threshold, or the message accumulation number is greater than or equal to the preset message accumulation number threshold from each of the alternative execution nodes, and obtain at least one to-be-scheduled execution node.

[0097] In an optional embodiment of the present invention, the device also includes: a first other execution node detection module, which is used to screen the execution nodes whose CPU occupancy ratio is greater than or equal to the first preset CPU occupancy ratio threshold, the memory occupancy ratio is greater than or equal to the first preset memory occupancy ratio threshold, or the message accumulation number is greater than or equal to the preset message accumulation number threshold from the candidate execution nodes, and after obtaining at least one execution node to be scheduled, detect the first other execution nodes other than the execution node to be scheduled; and a first execution node online module, which is used to bring a new execution node online when the first other execution node is empty.

[0098] In an optional embodiment of the present invention, the device also includes: a preset ratio threshold acquisition module, which is used to obtain the preset ratio threshold after selecting at least one execution node to be scheduled from each of the execution nodes according to the CPU occupancy ratio, the memory occupancy ratio or the message accumulation number; a target ratio statistics module, which is used to count the target ratio of each of the execution nodes to be scheduled in each of the execution nodes; and a second execution node online module, which is used to bring a new execution node online when the target ratio is greater than or equal to the preset ratio threshold.

[0099] In an optional embodiment of the present invention, the device also includes: a task waiting time acquisition module, which is used to obtain the task waiting time and the preset task waiting time threshold of each execution node after selecting at least one execution node to be scheduled from each execution node according to the CPU occupancy ratio, the memory occupancy ratio or the number of message accumulations; a pending execution node screening module, which is used to screen the execution nodes whose task waiting time of the task processing thread is greater than or equal to the preset task waiting time threshold from each execution node, and obtain at least one pending execution node; a task processing thread exit module, which is used to detect, for a single pending execution node, the task waiting time of the task processing thread to be exited in each task processing thread of the pending execution node, which is greater than or equal to the preset task waiting time threshold, and exit the pending task processing thread.

[0100] In an optional embodiment of the present invention, the device also includes: a second preset occupancy ratio threshold acquisition module, which is used to obtain the second preset CPU occupancy ratio threshold and the second preset memory occupancy ratio threshold after selecting at least one execution node to be scheduled from each of the execution nodes according to the CPU occupancy ratio, the memory occupancy ratio or the number of message accumulations; a to-be-offline execution node screening module, which is used to screen the execution nodes whose CPU occupancy ratio is less than the second preset CPU occupancy ratio threshold or the memory occupancy ratio is less than the second preset memory occupancy ratio threshold from each of the execution nodes, and obtain at least one to-be-offline execution node; a second task scheduling module, which is used to detect at least one second unexecuted task in each of the to-be-offline execution nodes, and schedule each of the second unexecuted tasks to a second other execution node, so that the second other execution node processes the second unexecuted task; wherein the second other execution node is other execution nodes except the to-be-offline execution node and the to-be-scheduled execution node; an execution node offline module, which is used to offline the to-be-offline execution node.

[0101] The task scheduling device provided in the embodiment of the present invention can execute the task scheduling method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0102] In the technical solution of the embodiment of the present invention, the collected information is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0103] Embodiment 4

[0104] According to an embodiment of the present invention, the present invention also provides an electronic device, a readable storage medium and a computer program product.

[0105] Figure 5 A schematic diagram of the structure of an electronic device 500 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0106] like Figure 5 As shown, the electronic device 500 includes at least one processor 501, and a memory connected to the at least one processor 501 in communication, such as a read-only memory (ROM) 502, a random access memory (RAM) 503, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 501 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 502 or the computer program loaded from the storage unit 508 to the random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 can also be stored. The processor 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0107] Multiple components in the electronic device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the electronic device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0108] The processor 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 501 performs the various methods and processes described above, such as a task scheduling method.

[0109] In some embodiments, the task scheduling method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the processor 501, one or more steps of the task scheduling method described above may be performed. Alternatively, in other embodiments, the processor 501 may be configured to perform the task scheduling method in any other appropriate manner (e.g., by means of firmware).

[0110] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0111] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0112] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0113] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0114] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0115] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS (Virtual Private Server) services.

[0116] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0117] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A task scheduling method, characterized in that: The method comprises: Get the CPU usage ratio, memory usage ratio and message accumulation number of each execution node; Selecting at least one execution node to be scheduled from each of the execution nodes according to the CPU occupancy ratio, the memory occupancy ratio or the number of message accumulations; Detect at least one first unexecuted task in each of the execution nodes to be scheduled, and schedule each of the first unexecuted tasks to a first other execution node so that the first other execution node processes the first unexecuted task; wherein the first other execution node is an execution node other than the execution node to be scheduled.

2. The method according to claim 1, characterized in that The selecting at least one execution node to be scheduled from each of the execution nodes according to the CPU occupancy ratio, the memory occupancy ratio or the number of message accumulations includes: Obtaining the task processing time of each of the execution nodes, a preset task processing time threshold, a first preset CPU occupancy ratio threshold, a first preset memory occupancy ratio threshold, and a preset message accumulation number threshold; From the execution nodes, select the execution nodes whose task processing time is greater than or equal to the preset task processing time threshold to obtain at least one candidate execution node; From each of the candidate execution nodes, filter out the execution nodes whose CPU occupancy ratio is greater than or equal to the first preset CPU occupancy ratio threshold, whose memory occupancy ratio is greater than or equal to the first preset memory occupancy ratio threshold, or whose message accumulation number is greater than or equal to the preset message accumulation number threshold, and obtain at least one execution node to be scheduled.

3. The method according to claim 2, characterized in that After selecting, from the candidate execution nodes, the execution nodes whose CPU occupancy ratio is greater than or equal to the first preset CPU occupancy ratio threshold, the memory occupancy ratio is greater than or equal to the first preset memory occupancy ratio threshold, or the message accumulation number is greater than or equal to the preset message accumulation number threshold, and obtaining at least one execution node to be scheduled, the method further includes: Detecting a first other execution node except the execution node to be scheduled; When the first other execution node is empty, a new execution node is brought online.

4. The method according to claim 1, characterized in that: After selecting at least one execution node to be scheduled from each of the execution nodes according to the CPU occupancy ratio, the memory occupancy ratio or the number of message accumulations, the method further includes: Get the preset ratio threshold; Counting the target proportion of each of the execution nodes to be scheduled among the execution nodes; When the target ratio is greater than or equal to the preset ratio threshold, a new execution node is brought online.

5. The method according to claim 1, characterized in that: After selecting at least one execution node to be scheduled from each of the execution nodes according to the CPU occupancy ratio, the memory occupancy ratio or the number of message accumulations, the method further includes: Obtaining the task waiting time of each task processing thread in each of the execution nodes and a preset task waiting time threshold; From each of the execution nodes, select an execution node where the task waiting time of the task processing thread is greater than or equal to the preset task waiting time threshold, and obtain at least one execution node to be processed; For a single execution node to be processed, in each of the task processing threads of the execution node to be processed, a task processing thread to be exited whose task waiting time is greater than or equal to the preset task waiting time threshold is detected, and the task processing thread to be exited is exited.

6. The method according to claim 1, characterized in that After selecting at least one execution node to be scheduled from each of the execution nodes according to the CPU occupancy ratio, the memory occupancy ratio or the number of message accumulations, the method further includes: Obtain a second preset CPU occupancy ratio threshold and a second preset memory occupancy ratio threshold; Filtering, from the execution nodes, the execution nodes whose CPU occupancy ratio is less than the second preset CPU occupancy ratio threshold or the memory occupancy ratio is less than the second preset memory occupancy ratio threshold, to obtain at least one execution node to be taken offline; Detect at least one second unexecuted task in each of the execution nodes to be taken offline, and schedule each of the second unexecuted tasks to a second other execution node, so that the second other execution node processes the second unexecuted task; wherein the second other execution node is an execution node other than the execution node to be taken offline and the execution node to be scheduled; The node to be taken offline is taken offline.

7. A task scheduling device, characterized in that: The device comprises: Performance data acquisition module, used to obtain the CPU usage ratio, memory usage ratio and message accumulation number of each execution node; An execution node screening module, used for screening at least one execution node to be scheduled from each of the execution nodes according to the CPU occupancy ratio, the memory occupancy ratio or the message accumulation number; The first task scheduling module is used to detect at least one first unexecuted task in each of the execution nodes to be scheduled, and schedule each of the first unexecuted tasks to the first other execution node so that the first other execution node processes the first unexecuted task; wherein the first other execution node is an execution node other than the execution node to be scheduled.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the task scheduling method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the task scheduling method according to any one of claims 1 to 6 when executed.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program implements the task scheduling method according to any one of claims 1 to 6.