Task scheduling method and device, equipment and medium

By dynamically adjusting the scheduling rate based on publisher information and system indicators in the task scheduling system, the failure problem caused by the upper limit of downstream resource processing capacity is solved, and more efficient task scheduling and resource utilization are achieved.

CN120803670APending Publication Date: 2025-10-17ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511276998.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-08
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

When the upper limit of downstream resource processing capacity in existing task scheduling methods is exceeded, it is easy to cause faults and task processing failures.

Method used

By obtaining task information and system information, tasks are added to queues of different levels based on publisher information, and the scheduling rate is dynamically adjusted according to stability and resource utilization indicators to avoid downstream processing bottlenecks.

Benefits of technology

It reduces the probability of downstream failures, improves the stability and resource utilization of the task scheduling system, and avoids resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803670A_ABST
    Figure CN120803670A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a task scheduling method and device, equipment and a medium. The scheme can comprise the steps of obtaining task information of a plurality of to-be-processed tasks; the task information at least comprises publisher information of each to-be-processed task; based on the publisher information of each to-be-processed task, adding each to-be-processed task to a corresponding queue of a preset level; the preset grade at least comprises a first grade and a second grade, and the priority of the first grade is higher than that of the second grade; acquiring system information of the task scheduling system; the system information at least comprises a stability index and a resource utilization rate index; based on the stability index and the resource utilization rate index, determining a scheduling rate for the queue of the preset level; and scheduling the to-be-processed tasks in the queue of the preset level according to the scheduling rate.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer data processing, and in particular to a task scheduling method and device, equipment and a medium. BACKGROUND

[0002] With the rapid development of the Internet, the scale of marketing is increasing day by day. After reaching hundreds of millions of business tasks, the downstream resources are called based on the business tasks, and the downstream has an upper limit of the processing task capability. If the instantaneous business task quantity exceeds the upper limit of the downstream processing task capability, the downstream is prone to fail to process the business task, resulting in failure.

[0003] Therefore, how to provide a task scheduling method capable of reducing the probability of failure of the downstream is a technical problem to be solved. SUMMARY

[0004] The embodiments of the present specification provide a task scheduling method, device, equipment and medium to solve the problem that the existing task scheduling method causes a high probability of failure of the downstream.

[0005] To solve the above technical problems, the embodiments of the present specification provide a task scheduling method, which is applied to a task scheduling system and includes: obtaining task information of a plurality of to-be-processed tasks; the task information at least includes publisher information of each to-be-processed task; adding each to-be-processed task into a queue of a corresponding preset level based on the publisher information of each to-be-processed task; the preset level at least includes a first level and a second level, and the priority of the first level is higher than that of the second level; obtaining system information of the task scheduling system; the system information at least includes a stability index and a resource utilization index; determining a scheduling rate for the queue of the preset level based on the stability index and the resource utilization index; scheduling the to-be-processed tasks in the queue of the preset level according to the scheduling rate.

[0006] The embodiments of the present specification also provide a task scheduling device, which is applied to a task scheduling system and includes: a task obtaining module configured to obtain task information of a plurality of to-be-processed tasks; the task information at least includes publisher information of each to-be-processed task; a queue determining module configured to add each to-be-processed task into a queue of a corresponding preset level based on the publisher information of each to-be-processed task; the preset level at least includes a first level and a second level, and the priority of the first level is higher than that of the second level; a system information obtaining module, configured to obtain system information of the task scheduling system; the system information at least includes a stability index and a resource utilization index; a scheduling rate determining module, configured to determine a scheduling rate for the queue of the preset level based on the stability index and the resource utilization index; a scheduling module, configured to schedule the to-be-processed task in the queue of the preset level according to the scheduling rate.

[0007] Embodiments of the present specification further provide a task scheduling device, which is applied to a task scheduling system and includes: at least one processor; and a memory in communication connection with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: obtain task information of a plurality of to-be-processed tasks; the task information at least includes publisher information of each to-be-processed task; add each to-be-processed task into a corresponding queue of a preset level based on the publisher information of each to-be-processed task; the preset level at least includes a first level and a second level, and the priority of the first level is higher than that of the second level; obtain system information of the task scheduling system; the system information at least includes a stability index and a resource utilization index; determine a scheduling rate for the queue of the preset level based on the stability index and the resource utilization index; schedule the to-be-processed task in the queue of the preset level according to the scheduling rate.

[0008] Embodiments of the present specification further provide a computer readable storage medium, which stores a computer program or instructions executable by a processor to implement a task scheduling method.

[0009] At least one of the embodiments in the specification can achieve the following beneficial effects: by obtaining task information of a plurality of to-be-processed tasks containing publisher information, each to-be-processed task can be added to a queue of a corresponding preset level according to the publisher information, system information such as a stability index and a resource utilization index of the task scheduling system can be obtained, and further, the scheduling rate of the queue of the preset level can be determined based on the stability index and the resource utilization index, and the to-be-processed tasks can be scheduled from the queue of the preset level according to the scheduling rate. Thus, the rate of scheduling the to-be-processed tasks from the queue of the preset level can be controlled through the stability index and the resource utilization index of the task scheduling system, and the number of to-be-processed tasks in the queue can be controlled, so that the processing bottleneck of the downstream can be avoided, and the probability of failure of the downstream can be reduced. BRIEF DESCRIPTION OF DRAWINGS

[0010] In order to more clearly illustrate the technical solutions in the embodiments of the specification or the prior art, the following briefly introduces the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor.

[0011] Figure 1 is an architecture schematic diagram of a task scheduling method provided by an embodiment of the specification in the prior art; Figure 2 is an overall scheme architecture schematic diagram of a task scheduling method in an actual application scenario provided by an embodiment of the specification; Figure 3 is a flow schematic diagram of a task scheduling method provided by an embodiment of the specification; Figure 4 is a structure schematic diagram of a task scheduling device provided by an embodiment of the specification; Figure 5 is a structure schematic diagram of a task scheduling device provided by an embodiment of the specification. DETAILED DESCRIPTION

[0012] In order to make the purpose, technical solutions and advantages of one or more embodiments of the specification more clear, the technical solutions of one or more embodiments of the specification will be described clearly and completely below in combination with specific embodiments of the specification and corresponding drawings. Obviously, the described embodiments are only some embodiments of the specification, not all embodiments. Based on the embodiments in the specification, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of one or more embodiments of the specification.

[0013] The terminology used in this disclosure of one or more embodiments is for the purpose of describing particular embodiments only and is not intended to be limiting of one or more embodiments. As used in this disclosure and the appended claims, the singular forms "a," "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0014] It is to be understood that, although the terms first, second, etc. can be used herein to describe various information, these terms are not intended to denote a particular order or relationship between the information. These terms are used only to distinguish one from another. For example, a first item can be termed a second item, and, similarly, a second item can be termed a first item, without departing from the scope of one or more embodiments. Depending on the context, the word "if' as used herein can be interpreted to mean "when" or "in response to determining" or "in response to a determination."

[0015] For the convenience of utilizing the embodiments in the specification, the following terms are explained.

[0016] Message queue: can represent a middleware technology for asynchronous communication. It can realize the functions of temporary storage and forwarding of messages, and can enable reliable data transmission between different services, applications or systems.

[0017] The technical solutions provided by the embodiments of the present specification are described in detail below with reference to the accompanying drawings.

[0018] Figure 1 An architecture schematic diagram of a task scheduling method in the prior art is provided for the embodiments of the present specification.

[0019] As Figure 1 shown, the prior art can include a task database, a scheduling control module, and a task processor. The scheduling control module can obtain tasks from the task database and send them to the task processor, and the task processor can execute tasks according to a preset number of tasks and frequency. After the downstream resources called by the task processor reach a bottleneck, the task processor still executes tasks according to the preset frequency and number of tasks, and the downstream resources can already be insufficient for processing tasks, which can easily cause task processing failure, a large number of error reports, and downstream failure.

[0020] To solve the defects in the prior art, the present scheme provides the following embodiments: Figure 2 An overall scheme architecture schematic diagram of a task scheduling method provided for the embodiments of the present specification in an actual application scenario.

[0021] AsFigure 2 As shown, the solution may include a task database, a scheduling control module, a queue of a preset level, a system information receiver, and a task processor. The scheduling control module may obtain pending tasks from the task database, and based on the publisher information contained in the pending tasks, add the pending tasks to the queue of the preset level, and then determine the scheduling rate based on the stability index and resource utilization index of the task scheduling system received from the system information receiver, schedule the pending tasks from the queue of the preset level according to the scheduling rate, and send the scheduled pending tasks to the task processor so that the task processor can process the pending tasks according to the dequeue rate of the pending tasks, thereby avoiding the problem of processing pending tasks at a constant rate reaching a downstream bottleneck and causing downstream failures.

[0022] Next, a task scheduling method provided in the embodiments of the specification will be described in detail with reference to the accompanying drawings.

[0023] Figure 3 This is a flowchart of a task scheduling method provided in an embodiment of this specification. From a program perspective, the execution subject of the process can be a program, application client, or task scheduling system installed on an application server. From a hardware perspective, the execution subject of the process can be a task scheduling system used to schedule pending tasks.

[0024] like Figure 3 As shown, the method may include the following steps.

[0025] Step 302: Obtain task information of several tasks to be processed.

[0026] The task information at least includes information about the publisher of each of the tasks to be processed.

[0027] In the embodiments of this specification, pending tasks may include at least one notification task. A notification task may refer to a task that delivers information to a target user through some technical means, such as an order information display task, a content push task, a system notification task, a user message display task, a service reminder task, etc. Publisher information may be information indicating the task publisher that initiated the pending task. The publisher information may include at least one of the publisher's name, publisher identification information, and publisher type information.

[0028] Step 304: Based on the publisher information of each of the tasks to be processed, each of the tasks to be processed is added to a queue of a corresponding preset level.

[0029] The preset levels include at least a first level and a second level, and the priority of the first level is higher than that of the second level.

[0030] In the embodiments of the present specification, the task scheduling system can include multiple levels of queues, which can be message queues. The queue of the preset level can be a queue corresponding to the publisher information determined from the multiple levels of queues. If the priority of the first level is higher than that of the second level, it can be indicated that the importance of the pending task in the queue of the first level is higher than that of the pending task in the queue of the second level. It can be understood that the higher the importance of the pending task, the higher the priority of the queue to join. The importance of the pending task can be determined based on the publisher information.

[0031] Step 306: Obtain system information of the task scheduling system.

[0032] The system information at least includes stability indicators and resource utilization indicators.

[0033] In the embodiments of the present specification, the system information can be information for describing the running environment of the task scheduling system, such as stability indicators, resource utilization indicators, etc. The stability indicators can indicate the stability of the current running environment of the task scheduling system, such as the task execution success rate, the frequency of failure of the task scheduling system, etc. The resource utilization indicators can indicate the use of various resources in the task scheduling system, such as CPU utilization, bandwidth utilization, memory utilization, etc. Both the stability indicators and the resource utilization indicators can be indicator values obtained by the task scheduling system using a monitoring device for continuous monitoring.

[0034] Step 308: Based on the stability indicators and the resource utilization indicators, determine a scheduling rate for the queue of the preset level.

[0035] In the embodiments of the present specification, the scheduling rate can represent the number of tasks scheduled from the queue of the preset level per minute. The higher the stability indicators, the faster the scheduling rate of the queue of the preset level; on the contrary, the lower the stability indicators, the slower the scheduling rate of the queue of the preset level. The higher the resource utilization indicators, the faster the scheduling rate of the queue of the preset level; on the contrary, the lower the resource utilization indicators, the slower the scheduling rate of the queue of the preset level.

[0036] Step 310: Schedule the pending task in the queue of the preset level according to the scheduling rate.

[0037] In the embodiments of the present specification, if there are multiple queues in the task scheduling system, the task scheduling system can control the dequeue rate of the pending task in each queue in parallel according to the scheduling rate corresponding to each queue, and complete the task scheduling. The task scheduling system can dynamically adjust the scheduling rate based on the stability indicators and the resource utilization indicators, so that the task scheduled according to the scheduling rate does not reach the downstream bottleneck of the task scheduling system in the execution process, and the probability of downstream failure is reduced.

[0038] It should be understood that the order of the steps of the method described in one or more embodiments of the present specification can be exchanged according to actual needs, or some of the steps can be omitted or deleted.

[0039] Figure 3 In the method, by acquiring task information of a plurality of to-be-processed tasks containing publisher information, each to-be-processed task can be added to a queue of a corresponding preset level according to the publisher information, system information such as a stability index and a resource utilization rate index of the task scheduling system can be acquired, and further, the scheduling rate of the queue of the preset level can be determined based on the stability index and the resource utilization rate index, and the to-be-processed tasks can be scheduled from the queue of the preset level according to the scheduling rate. Thus, the rate of scheduling the to-be-processed tasks from the queue of the preset level can be controlled through the stability index and the resource utilization rate index of the task scheduling system, and further, the number of tasks out of the queue at the moment can be controlled, and the probability of failure of the downstream can be reduced.

[0040] Based on the method, Figure 3 The embodiments of the present specification also provide some specific implementations of the method, which are described below.

[0041] By normalizing the stability index value, the accuracy of the scheduling rate for the preset level queue is improved. Optionally, after acquiring the system information of the task scheduling system in the embodiments of the present specification, the method can further include: normalizing the stability index to obtain a target stability index; determining the scheduling rate for the queue of the preset level based on the stability index and the resource utilization rate index, specifically including: determining the scheduling rate for the queue of the preset level based on the target stability index and the resource utilization rate index.

[0042] In the embodiments of the present specification, the server can normalize the stability index by using a preset normalization algorithm. The preset normalization algorithm can be any one of a linear normalization algorithm, a Z-Score standardization algorithm, a mean normalization algorithm, and a nonlinear normalization algorithm. The target stability index can be a normalized stability index value. Thus, the target stability index obtained by normalization can be used to determine the scheduling rate for the queue of the preset level, improve the accuracy of the calculation result of the scheduling rate, and enhance the robustness of the calculation method of the scheduling rate.

[0043] For more clearly understanding the process of normalizing the stability index by the embodiments of the present specification, a calculation method of normalization is further provided. Optionally, the normalization of the stability index in the embodiments of the present specification can specifically include: obtaining a preset upper limit of the stability index; obtaining a preset lower limit of the stability index; determining a first reference index difference value based on the preset upper limit of the stability index and the preset lower limit of the stability index; determining a first target index difference value based on the stability index and the preset lower limit of the stability index; determining a target stability index based on a ratio of the first reference index difference value and the first target index difference value.

[0044] In the embodiments of the present specification, the preset upper limit of the stability index can represent the maximum value of the stability index that the task scheduling system can reach. The preset upper limit of the stability index can be determined based on the performance of the task scheduling system; or, can also be set based on the performance of the task scheduling system and expert experience. The preset lower limit of the stability index can represent the minimum value of the stability index that the task scheduling system is allowed to reach. The preset lower limit of the stability index can be set based on expert experience; or, can also be determined based on user demand. The first reference index difference value can be obtained by subtracting the preset lower limit of the stability index from the preset upper limit of the stability index. The first target index difference value can be obtained by subtracting the preset lower limit of the stability index from the stability index. If the stability index of the task scheduling system is less than the preset lower limit of the stability index, it can be determined that the task scheduling system has a major failure, and in order to avoid system crash, the operation of the task scheduling system can be stopped.

[0045] In actual application, the server can obtain the target stability index value based on the formula wherein, S represents the stability index; Smin represents the preset lower limit of the stability index; Smax represents the preset upper limit of the stability index; and Starget represents the target stability index value.

[0046] ​​​In actual applications, the stability index obtained from the task scheduling system can be monitored by an index monitoring device of the task scheduling system, or can be obtained by using a preset algorithm, for example, a task processing success rate calculation result of the task scheduling system, or can be obtained by weighting multiple indexes, for example, by weighting indexes such as non-delay rate, task processing success rate, and throughput.

[0047] As an implementation manner, the resource utilization rate can also be normalized. Optionally, after obtaining the system information of the task scheduling system in the embodiment of the present specification, the method can further include: normalizing the resource utilization rate index to obtain a target resource utilization rate index; determining the scheduling rate of the queue of the preset level based on the stability index and the resource utilization rate index, and specifically can include: determining the scheduling rate of the queue of the preset level based on the stability index and the target resource utilization rate index.

[0048] In the embodiment of the present specification, the server can normalize the resource utilization rate index by using a preset normalization algorithm. The preset normalization algorithm can be any one of a linear normalization algorithm, a Z-Score standardization algorithm, a mean normalization algorithm, and a nonlinear normalization algorithm. The target stability index can be a normalized stability index value. Thus, the target resource utilization rate index obtained by normalization can be used to determine the scheduling rate of the queue of the preset level, improve the accuracy of the calculation result of the scheduling rate, and enhance the robustness of the calculation manner of the scheduling rate.

[0049] In actual applications, in order to facilitate fast calculation and to eliminate differences between different types of data, the same normalization algorithm can be used to calculate the resource utilization rate index and the stability index. The server can calculate the scheduling rate by using the target resource utilization rate index and the target stability index obtained by normalization, eliminate data differences caused by different types of data when calculating the scheduling rate, improve the accuracy of calculating the scheduling rate, and thus make the system schedule and process tasks according to the calculated scheduling rate, and reduce the failure rate of the system.

[0050] In order to more clearly understand the process of normalizing the resource utilization rate index in the embodiment of the present specification, a normalization calculation manner is also provided. Optionally, the normalization of the resource utilization rate index in the embodiment of the present specification can specifically include: obtaining a preset upper limit of the resource utilization rate index; obtaining a preset lower limit of the resource utilization rate index; determining a second reference index difference value based on the upper limit of the preset resource utilization index and the lower limit of the preset resource utilization index; determining a second target index difference value based on the resource utilization index and the lower limit of the resource utilization index; determining a target resource utilization index based on a ratio of the second reference index difference value and the second target index difference value.

[0051] In the embodiments of the present specification, the upper limit of the preset resource utilization index can represent the maximum value of the resource utilization index that the task scheduling system can reach. The upper limit of the preset resource utilization index can be determined based on the performance of the task scheduling system; or, it can also be set based on the performance of the task scheduling system and expert experience. The lower limit of the preset resource utilization index can represent the minimum value of the resource utilization index that the task scheduling system can reach. The lower limit of the preset resource utilization index can be determined based on the performance of the task scheduling system; or, it can be set based on expert experience; or, it can also be determined based on user demand. The second reference index difference value can be obtained by subtracting the lower limit of the preset resource utilization index from the upper limit of the preset resource utilization index. The second target index difference value can be obtained by subtracting the lower limit of the preset resource utilization index from the resource utilization index.

[0052] In actual application, the server can calculate the target resource utilization index value based on the formula wherein, R represents the resource utilization index; and represents the target resource utilization index value; R represents the resource utilization index; represents the lower limit of the preset resource utilization index; represents the upper limit of the preset resource utilization index. For ease of understanding, taking the resource utilization index as 0.85, the lower limit of the preset resource utilization index as 0, and the upper limit of the preset resource utilization index as 100% as an example, the target resource utilization index is calculated as 0.85.

[0053] As an implementation manner, optionally, the embodiments of the present specification can specifically include the following steps: obtaining a first preset rate of the queue of the preset level; obtaining a second preset rate of the queue of the preset level; the second preset rate is less than the first preset rate; calculating an evaluation score for evaluating the performance of the task scheduling system based on the stability index and the resource utilization index; determining the scheduling rate based on the first preset rate, the second preset rate, and the evaluation score.

[0054] In the embodiments of the present specification, the first preset rate can be a maximum rate value of the preset level queue set based on expert experience, or can also be set based on actual user demand. The second preset rate can be a minimum rate value of the preset level queue set based on expert experience, or can also be set based on actual user demand. The first preset rate and the second preset rate corresponding to different levels of queues in the task scheduling system are different, and the higher the priority of the queue, the higher the first preset rate and the second preset rate. It can be understood that the first preset rate and the second preset rate of the first level queue are higher than the first preset rate and the second preset rate of the second level queue. The evaluation score can be a score for evaluating the overall performance of the task scheduling system. The higher the evaluation score, the faster the task scheduling rate of each level of the message queue in the task scheduling system, but not higher than the first preset rate; the lower the evaluation score, the slower the task scheduling rate of each level of the message queue in the task scheduling system, but not lower than the second preset rate.

[0055] In actual application, if the calculated scheduling rate is higher than the first preset rate, the first preset rate can be used as the target scheduling rate, and the task scheduling system schedules the tasks in the message queue according to the target scheduling rate; if the calculated scheduling rate is lower than the second preset rate, the second preset rate can be used as the target scheduling rate, and the task scheduling system schedules the tasks in the message queue according to the target scheduling rate. Thus, it can avoid too high task scheduling rate, so that the downstream resources are insufficient to cause failure, and also avoid too low task scheduling rate, so that the downstream resources cannot be fully utilized.

[0056] As an implementation manner, the evaluation score can also be calculated by using the resource utilization rate index and the stability index in a weighted manner. Optionally, in the embodiments of the present specification, the evaluation score for evaluating the performance of the task scheduling system based on the stability index and the resource utilization rate index can specifically include: determining a first weight corresponding to the stability index based on the level of the preset level queue; determining a second weight corresponding to the resource utilization rate index based on the level of the preset level queue; performing weighted summation according to the stability index, the first weight, the resource utilization rate index and the second weight to calculate the evaluation score.

[0057] In the embodiments of the present specification, the sum of the first weight and the second weight can be one. The first weight and the second weight can be set based on expert experience. The first weight value and the second weight value corresponding to the message queue of different levels can be different. In order to improve the accuracy of the evaluation score, the target resource utilization index and the target stability index obtained after normalization can be used to calculate the evaluation score.

[0058] In practical applications, the evaluation score can be calculated based on the formula The score represents the evaluation score. The first weight is represented by a. The second weight is represented by b. And satisfy , and the preset conditions. The physical meaning of other characters can be referred to the above description. For ease of understanding, taking the normalized stability index as 0.8 and the normalized resource utilization index as 0.85 as an example, assuming that the first weight is 0.3 and the second weight is 0.7, the evaluation score is 0.835.

[0059] In practical applications, when the task scheduling system can run, the stability of the task scheduling system is good, and users often pay more attention to the resource utilization of the task scheduling system, and then the second weight value corresponding to the resource utilization index can be set to be higher than the first weight of the stability index. The second weight value of the resource utilization index of the first level queue is higher than the second weight value of the resource utilization index of the second level queue; the first weight value of the stability index of the first level queue is lower than the stability index value of the second level queue. It can be understood that the higher the priority of the message queue, the higher the second weight value of the resource utilization index, and the lower the first weight value of the stability index. For example, the task scheduling system has three priority levels of message queues, which are high priority queue, medium priority queue and low priority queue; wherein the second weight value of the high priority queue can be 0.9, and the first weight value can be 0.1; the second weight value of the medium priority queue can be 0.8, and the first weight value can be 0.2; the second weight value of the low priority queue can be 0.7; the first weight value can be 0.4. The server can also adjust the first weight value and the second weight value based on the demand of the user and the performance of the task scheduling system.

[0060] As an implementation manner, optionally, in the embodiments of the present specification, the scheduling rate is determined based on the first preset rate, the second preset rate and the evaluation score, which can specifically include: determining the rate difference of the first preset rate and the second preset rate; calculating a product of the rate difference and the evaluation score, determining a rate increment; determining a sum of the second preset rate and the rate increment as the scheduling rate.

[0061] In the embodiments of the present specification, the rate difference can be obtained by subtracting the second preset rate from the first preset rate. The rate increment can represent a rate value that the queue of the preset level can increase at the second preset rate under the system information of the current task scheduling system. Thus, the scheduling rate of each level of queue can be dynamically adjusted by the stability index and the resource utilization index, so as to adapt the scheduling rate to the running environment of the current task scheduling system and avoid causing downstream failure.

[0062] In actual application, the scheduling rate of the queue of the preset level can be calculated based on the formula wherein, V represents the scheduling rate of the queue of the preset level; represents the second preset rate; represents the first preset rate; and score represents the evaluation score. In order to facilitate the calculation of the scheduling rate, taking the above evaluation score as 0.835 for example, it is assumed that the first preset rate is 1000 and the second preset rate is 100. Through calculation, it can be determined that the scheduling rate is 851.5. In order to avoid increasing the burden of the downstream, the calculation result can be rounded down to 851, so it can be determined that 851 tasks per minute need to be scheduled from the queue of the preset level for processing.

[0063] As an implementation manner, the queue to which the to-be-processed task needs to be added can be determined by the publisher information. Alternatively, in the embodiments of the present specification, the adding each to-be-processed task to the queue of the corresponding preset level based on the publisher information of each to-be-processed task can specifically include: judging whether the publisher information of any to-be-processed task in each to-be-processed task exists in the preset publisher information of the first level of queue; if the publisher information of the any to-be-processed task exists in the preset publisher information, adding the any to-be-processed task to the first level of queue.

[0064] In the embodiments of the present specification, if the publisher information of the any to-be-processed task does not exist in the preset publisher information, the any to-be-processed task is added to the second level of queue.

[0065] In actual application, the to-be-processed task can be a plurality of tasks generated simultaneously or a task generated at one time. If the to-be-processed task is a plurality of tasks generated simultaneously, the level of the queue to which each to-be-processed task needs to be added can be judged in parallel, and each task can be added to the queue of the corresponding level, thereby improving the task processing efficiency.

[0066] In actual application, the publisher can publish a task for a plurality of receivers, and the server can generate a corresponding number of to-be-processed tasks based on the number of targeted receivers, thereby improving the processing accuracy and precision of the to-be-processed tasks. For example, the publisher A publishes a task of promoting a product to 900 users, and the server can generate 900 promotion tasks.

[0067] In actual application, if the task scheduling system contains three levels of queues, i.e., three levels of high, medium and low queues, the first publisher information set corresponding to the high-level queue can be set; the second publisher information set corresponding to the medium-level queue can be set; if the publisher information of any to-be-processed task belongs to the information in the first publisher information set, any to-be-processed task can be added to the high-level queue; if the publisher information of any to-be-processed task belongs to the information in the second publisher information set, any to-be-processed task can be added to the medium-level queue; if the publisher information of any to-be-processed task does not belong to the first publisher information set or the second publisher information set, any to-be-processed task can be added to the low-level queue. In this way, the more the levels, the more the publisher sets that need to be set.

[0068] In actual application, if the to-be-processed task is a notification task, the level of the queue corresponding to each to-be-processed task can also be determined based on the notification method. For example, the to-be-processed tasks corresponding to the notification methods such as short message, email and instant messaging can be added to the first-level queue; the to-be-processed tasks corresponding to the notification methods such as system notification can be added to the second-level queue.

[0069] Through the above method, the resource utilization rate index and the stability index of the task scheduling system can be used to dynamically calculate the scheduling rate of the system, so as to achieve the effect of flexible scheduling by dynamically controlling the scheduling rate according to the resources of the environment itself and the downstream processing capacity, reduce the risk of downstream failure caused by too large scheduling level, and also reduce the case of waste of downstream resources caused by too small resource level, and further improve the scheduling efficiency and utilization rate of the task scheduling system.

[0070] Based on the same idea, the above method corresponding to the device is also provided by the embodiments of the present specification. Figure 4 A structural schematic diagram of a task scheduling device provided by the embodiments of the present specification. The device is applied to a task scheduling system, such as Figure 4As shown, the apparatus can include: a task obtaining module 402 configured to obtain task information of a plurality of to-be-processed tasks; the task information at least includes publisher information of each to-be-processed task; a queue determining module 404 configured to add each to-be-processed task into a queue of a corresponding preset level based on the publisher information of each to-be-processed task; the preset level at least includes a first level and a second level, and the priority of the first level is higher than that of the second level; a system information obtaining module 406 configured to obtain system information of the task scheduling system; the system information at least includes a stability index and a resource utilization index; a scheduling rate determining module 408 configured to determine a scheduling rate of the queue of the preset level based on the stability index and the resource utilization index; a scheduling module 410 configured to schedule to-be-processed tasks in the queue of the preset level according to the scheduling rate.

[0071] Based on the apparatus, Figure 4 the embodiments of the present specification also provide some specific implementation solutions of the method, which are described below.

[0072] Optionally, the apparatus can further include a first normalization module, which can be specifically configured to: perform normalization processing on the stability index to obtain a target stability index; and determine the scheduling rate of the queue of the preset level based on the stability index and the resource utilization index, specifically including: determining the scheduling rate of the queue of the preset level based on the target stability index and the resource utilization index.

[0073] Optionally, the first normalization module can be specifically configured to: obtain a preset upper limit of the stability index; obtain a preset lower limit of the stability index; determine a first reference index difference based on the preset upper limit of the stability index and the preset lower limit of the stability index; determine a first target index difference based on the stability index and the lower limit of the stability index; and determine a target stability index based on a ratio of the first reference index difference to the first target index difference.

[0074] Optionally, the apparatus can further include a second normalization module, which can be specifically configured to: perform normalization processing on the resource utilization index to obtain a target resource utilization index; and determine the scheduling rate of the queue of the preset level based on the stability index and the resource utilization index, specifically including: determining the scheduling rate of the queue of the preset level based on the stability index and the target resource utilization index.

[0075] Optionally, the second normalization module can be specifically configured to: obtain a preset resource utilization rate index upper limit; obtain a preset resource utilization rate index lower limit; determine a second reference index difference based on the preset resource utilization rate index upper limit and the preset resource utilization rate index lower limit; determine a second target index difference based on the resource utilization rate index and the resource utilization rate index lower limit; and determine a target resource utilization rate index based on a ratio of the second reference index difference to the second target index difference.

[0076] Optionally, the scheduling rate determination module can be specifically configured to: obtain a first preset rate of the queue of the preset level; obtain a second preset rate of the queue of the preset level; the second preset rate is less than the first preset rate; calculate an evaluation score for evaluating the performance of the task scheduling system based on the stability index and the resource utilization rate index; and determine the scheduling rate based on the first preset rate, the second preset rate, and the evaluation score.

[0077] Optionally, the scheduling rate determination module can be specifically configured to: determine a first weight corresponding to the stability index based on the level of the queue of the preset level; determine a second weight corresponding to the resource utilization rate index based on the level of the queue of the preset level; and calculate the evaluation score by weighted summation according to the stability index, the first weight, the resource utilization rate index, and the second weight.

[0078] Optionally, the scheduling rate determination module can be specifically configured to: determine a rate difference of the first preset rate and the second preset rate; calculate a product of the rate difference and the evaluation score to determine a rate increment; and determine the sum of the second preset rate and the rate increment as the scheduling rate.

[0079] Optionally, the queue determination module can be specifically configured to: for any one of the to-be-processed tasks, judge whether the publisher information of the any one to-be-processed task exists in preset publisher information of the queue of the first level; if the publisher information of the any one to-be-processed task exists in the preset publisher information, add the any one to-be-processed task to the queue of the first level.

[0080] Optionally, the queue determination module can be specifically configured to: if the publisher information of the any one to-be-processed task does not exist in the preset publisher information, add the any one to-be-processed task to the queue of the second level.

[0081] Optionally, the to-be-processed task at least includes a reach notification task.

[0082] Based on the same idea, the embodiments of the present specification also provide a device corresponding to the above method.

[0083] Figure 5 A structural schematic diagram of a task scheduling device provided by the embodiments of the present specification is shown in FIG. 5. As shown in FIG. 5, the device 500 can include: Figure 5 at least one processor 510; and a memory 530 in communication with the at least one processor; wherein the memory 530 stores instructions 520 executable by the at least one processor 510, and the instructions are executed by the at least one processor 510 to enable the at least one processor 510 to: obtain task information of a plurality of to-be-processed tasks; the task information at least includes publisher information of each to-be-processed task; based on the publisher information of each to-be-processed task, add each to-be-processed task to a queue of a corresponding preset level; the preset level at least includes a first level and a second level, and the priority of the first level is higher than that of the second level; obtain system information of the task scheduling system; the system information at least includes a stability index and a resource utilization index; based on the stability index and the resource utilization index, determine a scheduling rate for the queue of the preset level; schedule the to-be-processed tasks in the queue of the preset level according to the scheduling rate.

[0084] Based on the same idea, the embodiments of the present specification also provide a computer readable storage medium corresponding to the above method. The computer readable storage medium stores a computer program or instructions, which can be executed by a processor to implement the steps of the task scheduling method in any of the above embodiments.

[0085] Each of the embodiments in the present specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments. In particular, for the device shown in FIG. 5, since it is basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiments. Figure 5

[0086] ​​In the 1990s, it was possible to distinguish whether an improvement in a technology was a hardware improvement (e.g., an improvement in the circuit structure of a diode, transistor, switch, etc.) or a software improvement (an improvement in a method flow). However, as technology has advanced, many improvements in method flows today can be considered as direct improvements in hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into a hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (e.g., a field programmable gate array (FPGA)) is an integrated circuit whose logic function is determined by user programming of the device. A designer programs a digital system "integrated" on a PLD by himself / herself, without having to ask a chip manufacturer to design and manufacture a special integrated circuit chip. Moreover, instead of manually manufacturing an integrated circuit chip, this programming is now mostly implemented using "logic compiler" software, which is similar to a software compiler used when developing a program, and the original code before compilation must also be written in a specific programming language, which is called a hardware description language (HDL), and there are many types of HDL, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., and the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also be aware that it is only necessary to logically program a method flow using the above-mentioned hardware description languages and program it into an integrated circuit to easily obtain a hardware circuit that implements the logical method flow.

[0087] The controller can be implemented in any suitable way, for example, the controller can take the form of a microprocessor or processor and a computer readable medium storing computer readable program code, such as software or firmware, executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, the memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that, in addition to implementing the controller in pure computer readable program code, it is also possible to implement the controller in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers and embedded microcontrollers, etc. to perform the same functions by logically programming the method steps. Such a controller can therefore be considered as a hardware component, and the means included therein for performing various functions can also be considered as structures within the hardware component. Alternatively, the means for performing various functions can even be considered as both a software module implementing the method and a structure within the hardware component.

[0088] The systems, apparatuses, modules or units illustrated by the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0089] For the sake of description, the above apparatuses are described in various units by functions respectively. Of course, the functions of each unit can be implemented in the same or multiple software and / or hardware in the implementation of the present application.

[0090] Those skilled in the art will understand that the embodiments of the present application can be provided as a method, a system or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application can 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.

[0091] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof.

[0092] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof.

[0093] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof.

[0094] In one typical configuration, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0095] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) and / or cache memory, non-volatile memory, such as read-only memory (ROM), EPROM, and / or flash memory. The memory is an example of computer-readable media.

[0096] Computer-readable media includes permanent and non-permanent, movable and non-movable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carriers.

[0097] It should also be noted that the terms "comprising", "comprising" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or apparatus that includes a list of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or apparatus. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.

[0098] Those skilled in the art will appreciate that embodiments of the present application can be provided as methods, systems or computer program products. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application can 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.

[0099] The present application can be described in the general context of computer-executable instructions, such as program modules, executed by computers. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The present application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including storage devices.

[0100] The above merely provides an example of the present application, but is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application should be included in the scope of claims of the present application.

Claims

1. A task scheduling method, applied to a task scheduling system, comprising: Get the task information of several pending tasks; The task information at least includes information about the publisher of each of the tasks to be processed; Based on the publisher information of each of the pending tasks, each of the pending tasks is added to a queue of a corresponding preset level; the preset levels include at least a first level and a second level, and the first level has a higher priority than the second level; Acquiring system information of the task scheduling system; the system information includes at least a stability index and a resource utilization index; Determining a scheduling rate for the queue of the preset level based on the stability indicator and the resource utilization indicator; The tasks to be processed in the queue of the preset level are scheduled according to the scheduling rate.

2. The method according to claim 1, further comprising: Normalizing the stability index to obtain a target stability index; The determining, based on the stability indicator and the resource utilization indicator, a scheduling rate for the queue of the preset level specifically includes: Based on the target stability indicator and the resource utilization indicator, a scheduling rate for the queue of the preset level is determined.

3. The method according to claim 2, wherein the normalizing process of the stability index comprises: Get the preset upper limit of stability index; Get the preset lower limit of stability index; Determining a first benchmark indicator difference based on the preset stability indicator upper limit and the preset stability indicator lower limit; Determining a first target indicator difference based on the stability indicator and the stability indicator lower limit; A target stability index is determined based on a ratio of the first benchmark index difference to the first target index difference.

4. The method according to claim 1, after obtaining the system information of the task scheduling system, further comprising: Normalizing the resource utilization index to obtain a target resource utilization index; The determining, based on the stability indicator and the resource utilization indicator, a scheduling rate for the queue of the preset level specifically includes: Based on the stability indicator and the target resource utilization indicator, a scheduling rate for the queue of the preset level is determined.

5. The method according to claim 4, wherein the normalizing the resource utilization index comprises: Get the preset resource utilization indicator upper limit; Get the preset resource utilization indicator lower limit; Determining a second benchmark indicator difference based on the preset resource utilization indicator upper limit and the preset resource utilization indicator lower limit; Determining a second target indicator difference based on the resource utilization indicator and the resource utilization indicator lower limit; A target resource utilization index is determined based on a ratio of the second benchmark index difference to the second target index difference.

6. The method according to claim 1, wherein determining the scheduling rate for the queue of the preset level based on the stability index and the resource utilization index specifically comprises: Obtaining a first preset rate of the queue of the preset level; Obtaining a second preset rate of the queue of the preset level; The second preset rate is less than the first preset rate; Calculating an evaluation score for evaluating the performance of the task scheduling system based on the stability index and the resource utilization index; The scheduling rate is determined based on the first preset rate, the second preset rate, and the evaluation score.

7. The method according to claim 6, wherein calculating an evaluation score for evaluating the performance of the task scheduling system based on the stability index and the resource utilization index comprises: determining a first weight corresponding to the stability indicator based on the level of the queue of the preset level; determining a second weight corresponding to the resource utilization indicator based on the level of the queue of the preset level; The evaluation score is calculated by performing a weighted summation based on the stability index, the first weight, the resource utilization index, and the second weight.

8. The method according to claim 6, wherein determining the scheduling rate based on the first preset rate, the second preset rate, and the evaluation score comprises: determining a rate difference between the first preset rate and the second preset rate; Calculating the product of the rate difference and the evaluation score to determine a rate increment; The sum of the second preset rate and the rate increment is determined as the scheduling rate.

9. The method according to claim 1, wherein adding each of the pending tasks to a queue of a corresponding preset level based on the publisher information of each of the pending tasks comprises: For any of the pending tasks, determine whether publisher information of the pending task exists in the preset publisher information of the first-level queue; If the publisher information of any of the to-be-processed tasks exists in the preset publisher information, then the to-be-processed tasks are added to the first-level queue.

10. The method according to claim 9, further comprising: If the publisher information of any of the to-be-processed tasks does not exist in the preset publisher information, then the to-be-processed tasks are added to the second-level queue.

11. The method according to claim 1, wherein the tasks to be processed at least include a touch notification task.

12. A task scheduling device, applied to a task scheduling system, comprising: The task acquisition module is used to obtain the task information of several tasks to be processed; The task information at least includes information about the publisher of each of the tasks to be processed; a queue determination module, configured to add each of the pending tasks to a queue of a corresponding preset level based on information about the publisher of each of the pending tasks; the preset levels include at least a first level and a second level, the first level having a higher priority than the second level; A system information acquisition module, configured to acquire system information of the task scheduling system; the system information includes at least a stability index and a resource utilization index; a scheduling rate determination module, configured to determine a scheduling rate for a queue of the preset level based on the stability index and the resource utilization index; The scheduling module is used to schedule the pending tasks in the queue of the preset level according to the scheduling rate.

13. A task scheduling device, applied to a task scheduling system, comprising: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Obtaining task information of a plurality of tasks to be processed; the task information at least includes information of a publisher of each of the tasks to be processed; Based on the publisher information of each of the pending tasks, each of the pending tasks is added to a queue of a corresponding preset level; the preset levels include at least a first level and a second level, and the first level has a higher priority than the second level; Acquiring system information of the task scheduling system; the system information includes at least a stability index and a resource utilization index; Determining a scheduling rate for the queue of the preset level based on the stability indicator and the resource utilization indicator; The tasks to be processed in the queue of the preset level are scheduled according to the scheduling rate.

14. A computer-readable storage medium having a computer program or instructions stored thereon, wherein the computer program or instructions are executed by a processor to implement the steps of the task scheduling method according to any one of claims 1 to 11.