Task scheduling management method and system, medium and computer
By dividing peak and trough periods in task scheduling and adjusting task processing time, the problem of uneven distribution of data processing tasks is solved, and efficient resource utilization and processing efficiency are achieved.
Patent Information
- Application Number
- CN202510162473.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-04-29
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, data processing tasks are unevenly distributed during peak periods, resulting in increased resource idleness and processing costs, and poor timeliness.
By dividing the time into peak periods and trough periods based on the historical data of task scheduling, obtaining the level identification of the peak period tasks, dividing the tasks into adjustable and unadjustable tasks, and adjusting the adjustable tasks to the trough period for processing according to the predetermined rules.
Effectively schedule tasks to avoid data loss caused by resource accumulation, and avoid resource idle waste during low-time periods, improving resource utilization and processing efficiency.
Smart Images

Figure CN119902897A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of task scheduling, and more specifically, to a task scheduling management method, system, medium and computer. Background Art
[0002] Big data processing business is usually completed by two relatively independent systems: the scheduling system and the big data processing platform. The scheduling system receives pre-defined data processing tasks and sends tasks to the big data processing platform in batches on a regular basis according to the settings of business personnel. The big data processing platform needs to handle the execution of all tasks sent and the data output, thereby realizing an orderly and controllable data processing process.
[0003] A large number of data processing tasks are accumulated during the peak period of data processing, which not only places high demands on data processing resources, resulting in a significant increase in processing costs, but also causes some tasks to be processed untimely and inefficiently due to too many tasks and heavy loads. After the peak period of processing, due to a sudden drop in processing resource consumption, some processing resources are idle, resulting in uneven resource consumption. Summary of the invention
[0004] In view of the deficiencies in the prior art, the purpose of the present invention is to provide a task scheduling management method, system, medium and computer to overcome the shortcomings of the prior art, such as uneven distribution of data processing tasks, increased processing costs and idle resources.
[0005] The above technical objectives of the present invention are achieved through the following technical solutions: A task scheduling management method, comprising:
[0006] S1. According to the historical data of task scheduling, the time of task scheduling is divided into peak period and valley period;
[0007] S2. Obtain all tasks during the peak period and obtain the level identifier corresponding to each task;
[0008] S3. Dividing the tasks into adjustable tasks and non-adjustable tasks according to the level identifiers;
[0009] S4. According to a predetermined rule, at least one adjustable task is adjusted to a low-peak period for processing.
[0010] Optionally, dividing the time of task scheduling into peak period and valley period according to the historical data of task scheduling includes:
[0011] Obtaining a computing power log for task processing within a predetermined time from a database, dividing the predetermined time into a plurality of unit time periods; determining a first computing power requirement for task processing within each unit time period according to the computing power log;
[0012] Based on all the first computing power requirements, calculate the average computing power requirement for task processing in each unit time period;
[0013] Determine whether the first computing power requirement corresponding to each unit time period is greater than the average computing power requirement, and if so, record the corresponding unit time period as the first unit time;
[0014] Count the number of times each unit time period is marked as the first unit time, and arrange each unit time period in descending order according to the number of times it is marked;
[0015] The median of the marking times is obtained, and the unit time period in which the marking times are greater than the median is recorded as the peak period.
[0016] Optionally, all tasks in the peak period are obtained, and the level identifier corresponding to each task is obtained respectively, including:
[0017] Create multiple priority queues with different priority levels; create temporary super priority queues;
[0018] During peak hours, obtain all tasks currently to be executed;
[0019] According to the level identifier corresponding to each task, each task is assigned to each priority queue.
[0020] Optionally, the creating of multiple priority queues with different priority levels includes:
[0021] Create a high priority queue, a higher priority queue, a medium priority queue, a medium priority queue, a lower priority queue, and a low priority queue.
[0022] Optionally, the tasks are divided into adjustable tasks and non-adjustable tasks according to the level identifier, including: obtaining the remaining network space, determining whether the remaining space reaches a threshold, and if so, processing the tasks in the temporary super priority queue, the tasks in the high priority queue, the tasks in the higher priority queue, the tasks in the medium priority queue, the tasks in the medium priority queue, the tasks in the lower priority queue, and the tasks in the low priority queue in parallel according to the time order of task creation; if not, obtaining the processing time of each task respectively, calculating the total processing time of all tasks, and determining whether the processing time is greater than a predetermined processing time threshold, and if not, executing the tasks in each priority queue in sequence according to the order of the temporary super priority queue, the high priority queue, the higher priority queue, the medium priority queue, the medium priority queue, the lower priority queue, and the low priority queue; if so, sorting all tasks in the order of the temporary super priority queue, the high priority queue, the higher priority queue, the medium priority queue, the medium priority queue, the lower priority queue, and the low priority queue, and classifying the tasks whose processing time does not exceed the processing time threshold as non-adjustable tasks, and classifying the tasks whose processing time exceeds the processing time threshold as adjustable tasks.
[0023] Optionally, adjusting at least one adjustable task to a low-volume period for processing according to a predetermined rule includes:
[0024] Obtain the time length that the processing time exceeds the preset processing time threshold, which is recorded as the first delay time length;
[0025] According to historical data, the longest delay duration in the task processing history is obtained and recorded as the second delay duration;
[0026] Determine whether the first delay duration is less than the second delay duration. If not, adjust the adjustable tasks whose processing time is between the end point of the second delay duration and the end point of the first delay duration to the off-peak period for processing.
[0027] Optionally, the method further includes: adjusting the adjustable tasks whose processing time is within the second delay time to be processed during the off-peak period.
[0028] A task scheduling management system, comprising:
[0029] Time period division module: used to divide the task scheduling time into peak period and valley period according to the historical data of task scheduling;
[0030] Task level acquisition module: used to obtain all tasks during peak hours and obtain the level identifier corresponding to each task;
[0031] Task type classification module: used for classifying tasks into adjustable tasks and non-adjustable tasks according to the level identification;
[0032] Task adjustment module: used to adjust at least one adjustable task to a low-peak period for processing according to a predetermined rule.
[0033] A computer-readable storage medium stores a computer program, which implements the steps of the above method when executed by a processor.
[0034] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0035] In summary, the present invention provides a task scheduling management method, including: dividing the task scheduling time into peak period and off-peak period according to the historical data of task scheduling; obtaining all tasks in the peak period, and obtaining the level identification corresponding to each task respectively; dividing the tasks into adjustable tasks and non-adjustable tasks according to the level identification; adjusting at least one adjustable task to the off-peak period for processing according to predetermined rules: adopting the task scheduling method of the present application can effectively process data, avoid data loss due to resource accumulation, and avoid waste of idle computing resources in the off-peak period. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 A flow chart of a task scheduling management method of the present invention;
[0037] Figure 2 A task scheduling management system structure diagram of the present invention;
[0038] Figure 3 is an internal structure diagram of a computer device in an embodiment of the present invention;
[0039] Figure 4 The flowchart of the present invention is to divide tasks into adjustable tasks or non-adjustable tasks.
[0040] In the figure: 1. Time period division module; 2. Task level acquisition module; 3. Task type division module; 4. Task adjustment module. DETAILED DESCRIPTION
[0041] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings. Several embodiments of the present invention are shown in the accompanying drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein.
[0042] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal connection of two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances. The terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.
[0043] In the present invention, unless otherwise clearly specified and limited, the first feature being "above" or "below" the second feature may include the first and second features being in direct contact, or may include the first and second features being in contact not directly but through another feature between them. Moreover, the first feature being "above", "above" and "above" the second feature includes the first feature being directly above and obliquely above the second feature, or simply indicates that the first feature is higher in level than the second feature. The first feature being "below", "below" and "below" the second feature includes the first feature being directly below and obliquely below the second feature, or simply indicates that the first feature is lower in level than the second feature. The terms "vertical", "horizontal", "left", "right", "above", "below" and similar expressions are for illustrative purposes only, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.
[0044] The present invention is described in detail below in conjunction with the accompanying drawings and embodiments.
[0045] The present invention provides a task scheduling management method, such as Figure 1 As shown, including:
[0046] S1. According to the historical data of task scheduling, the time of task scheduling is divided into peak period and valley period;
[0047] S2. Obtain all tasks during the peak period and obtain the level identifier corresponding to each task;
[0048] S3. Dividing the tasks into adjustable tasks and non-adjustable tasks according to the level identifiers;
[0049] S4. According to a predetermined rule, at least one adjustable task is adjusted to a low-peak period for processing.
[0050] In actual applications, during the data transmission process, a large amount of network resources are needed to transmit data, and to write the data to the storage device for persistent storage, the data needs to be written to the memory for temporary storage first, and then transferred to the storage device through the CPU for persistence. This process will consume a lot of CPU resources and network transmission resources. Therefore, when there are many tasks, it is necessary to schedule the transmission of recognition and reading to avoid data loss due to failure to store important tasks in time. The peak period of data processing can be determined according to the threshold of the data processing task, such as judging by the network resource occupancy. When the network resource occupancy is low, it is a low period, and when the network resource occupancy is high, it is a peak period. Alternatively, it can be judged according to the CPU computing resource occupancy or the memory write resource occupancy, and the time can be divided into peak period or low period.
[0051] According to the importance of the task, the task is divided into important tasks and unimportant tasks. The important tasks need to be written to the storage server for storage first, and the unimportant tasks can be sorted to the end for processing. The task scheduling method of the present application can effectively process data, avoid data loss caused by resource accumulation, and avoid waste of idle computing resources during low-peak time periods.
[0052] Furthermore, the task scheduling time is divided into peak time period and valley time period according to the historical data of task scheduling, including:
[0053] Obtaining a computing power log for task processing within a predetermined time from a database, dividing the predetermined time into a plurality of unit time periods; determining a first computing power requirement for task processing within each unit time period according to the computing power log;
[0054] Based on all the first computing power requirements, calculate the average computing power requirement for task processing in each unit time period;
[0055] Determine whether the first computing power requirement corresponding to each unit time period is greater than the average computing power requirement, and if so, record the corresponding unit time period as the first unit time;
[0056] Count the number of times each unit time period is marked as the first unit time, and arrange each unit time period in descending order according to the number of times it is marked;
[0057] The median of the marking times is obtained, and the unit time period in which the marking times are greater than the median is recorded as the peak period.
[0058] In practical applications, the scheduled time is divided into several unit time periods, which can be divided into ten-minute units. That is to say, within a certain ten-minute period, a large number of data tasks will flow in, so that the server's network resources or the server's CPU resources used for data writing will exceed the load capacity. In this case, it is necessary to reallocate the computing resources during this time to avoid data loss due to insufficient computing resources. Then divide the time into peak time and trough time. First, divide a certain time period in the past (such as a month) into unit time periods according to a certain rule, such as ten minutes as a unit time, and then count the computing power requirements in the unit time. For example, during the ten minutes from 6 o'clock to 6:10, the computing power exceeds the average computing power threshold, then the ten minutes from 6 o'clock to 6:10 are marked as the first unit time, and then the number of times the ten minutes from 6 o'clock to 6:10 in the past month are marked as the first unit time, such as 18 times. The number of times each unit time is marked is counted, and the median of the number of times the unit time period is marked is obtained, such as 12 times. The median is used as the standard to determine whether a certain unit time period is the first unit time. For example, the number of times the ten minutes from 6 o'clock to 6:10 are marked as the first unit time is 18 times, which is higher than the median of the marking times. Therefore, the ten minutes from 6 o'clock to 6:10 will be marked as the first unit time.
[0059] Furthermore, all tasks in the peak period are obtained, and the level identifier corresponding to each task is obtained respectively, including:
[0060] Create multiple priority queues with different priority levels; create temporary super priority queues;
[0061] During peak hours, obtain all tasks currently to be executed;
[0062] According to the level identifier corresponding to each task, each task is assigned to each priority queue.
[0063] In actual applications, the transmitted data will be accompanied by an identification data before being sent. Since the tasks include different levels, the corresponding message queue is set at the receiving end to receive messages of different levels, so that the messages can be arranged according to the actual urgency. The important messages are stored in the server through the queue with high priority for persistence, and the messages with important levels are arranged at the back to avoid the loss of important data and cause more serious consequences.
[0064] Furthermore, the creating of multiple priority queues with different priority levels includes: creating a high priority queue, a relatively high priority queue, a medium priority queue, a relatively medium priority queue, a relatively low priority queue, and a low priority queue.
[0065] Further, such as Figure 4 As shown, the tasks are divided into adjustable tasks and non-adjustable tasks according to the level identification, including:
[0066] Obtain the remaining network space and determine whether the remaining space reaches the threshold; if so, process the tasks in the temporary super priority queue, the tasks in the high priority queue, the tasks in the higher priority queue, the tasks in the medium priority queue, the tasks in the medium priority queue, the tasks in the lower priority queue and the tasks in the low priority queue in parallel according to the time sequence of task creation; if not, obtain the processing time of each task respectively and calculate the total processing time of all tasks; determine whether the processing time is greater than the predetermined processing time threshold, if not, execute the tasks in each priority queue in sequence according to the order of the temporary super priority queue, the high priority queue, the higher priority queue, the medium priority queue, the medium priority queue, the lower priority queue and the low priority queue; if so, sort all tasks in the order of the temporary super priority queue, the high priority queue, the higher priority queue, the medium priority queue, the medium priority queue, the lower priority queue and the low priority queue, and classify the tasks whose processing time does not exceed the processing time threshold as non-adjustable tasks, and classify the tasks whose processing time exceeds the processing time threshold as adjustable tasks.
[0067] To determine whether a task can be adjusted, first determine whether the system resources have exceeded the load capacity. If they have not exceeded the load capacity, such as network resources or CPU computing resources have not yet reached saturation, then each task can be processed in parallel to improve the processing efficiency of data tasks. If the idle network resources exceed the threshold, the task data needs to be processed sequentially so that the data can complete related tasks in an environment with limited resources. In the case of sequential execution, since the length of the unit time period (10 minutes) is certain, it is necessary to calculate the total time of the sequentially executed tasks. If it exceeds this unit time period, it means that the task at this time exceeds the processing capacity of the computer, and it is necessary to divide the excess part, that is, the part of the tasks with priority level disclosure, into adjustable tasks, and adjust these tasks to the low-peak time period for processing.
[0068] Furthermore, adjusting at least one adjustable task to a low-peak period for processing according to a predetermined rule includes:
[0069] Obtain the time length that the processing time exceeds the preset processing time threshold, which is recorded as the first delay time length;
[0070] According to historical data, the longest delay duration in the task processing history is obtained and recorded as the second delay duration;
[0071] Determine whether the first delay duration is less than the second delay duration. If not, adjust the adjustable tasks whose processing time is between the end point of the second delay duration and the end point of the first delay duration to the off-peak period for processing.
[0072] In practical applications, the length of a unit time period is specific, but the length of the processing time of each task is uncertain. For example, during the ten minutes from 6:00 to 6:10, four tasks are received, which require 3 minutes of processing time, 4 minutes of processing time, 2 minutes of processing time, and 3 minutes of processing time respectively after being sorted. Then, at 6:10, the last task will cause a delay of 2 minutes. These two minutes are the first delay time indicated in this application. The first delay time is compared with the preset second delay time (for example, 1 minute or 3 minutes). Compare and judge whether the second delay time is greater than the first delay time. If the second delay time is 3 minutes, it means that the second delay time is greater than the first delay time, then there is no need to adjust the task. You only need to complete the task in time within the delay time to complete the task processing without affecting the system operation. If the second delay time is 1 minute, it means that the second delay time is less than the first delay time, then it is necessary to transfer the task exceeding the second delay time to the low time for processing to avoid too long delay time of task processing, which will affect the subsequent task processing flow.
[0073] Furthermore, it also includes: adjusting the adjustable tasks whose processing time is within the second delay time to the off-peak period for processing.
[0074] In practical applications, all tasks that require processing time exceeding the unit time period can be directly transferred to the off-peak period for processing, so as to improve the utilization efficiency of computing resources during the off-peak period.
[0075] like Figure 2 As shown, the present invention also provides a task scheduling management system, comprising:
[0076] Time period division module: used to divide the task scheduling time into peak period and valley period according to the historical data of task scheduling;
[0077] Task level acquisition module: used to obtain all tasks during peak hours and obtain the level identifier corresponding to each task;
[0078] Task type classification module: used for classifying tasks into adjustable tasks and non-adjustable tasks according to the level identification;
[0079] Task adjustment module: used to adjust at least one adjustable task to a low-peak period for processing according to a predetermined rule.
[0080] For the specific definition of a task scheduling management system, please refer to the definition of a task scheduling management method above, which will not be repeated here. Each module in the above-mentioned task scheduling management system can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0081] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. When the computer program is executed by the processor, a task scheduling management method is implemented.
[0082] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0083] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0084] S1. According to the historical data of task scheduling, the time of task scheduling is divided into peak period and valley period;
[0085] S2. Obtain all tasks during the peak period and obtain the level identifier corresponding to each task;
[0086] S3. Dividing the tasks into adjustable tasks and non-adjustable tasks according to the level identifiers;
[0087] S4. According to a predetermined rule, at least one adjustable task is adjusted to a low-peak period for processing.
[0088] In one embodiment, dividing the time of task scheduling into peak period and valley period according to the historical data of task scheduling includes:
[0089] Obtaining a computing power log for task processing within a predetermined time from a database, dividing the predetermined time into a plurality of unit time periods; determining a first computing power requirement for task processing within each unit time period according to the computing power log;
[0090] Based on all the first computing power requirements, calculate the average computing power requirement for task processing in each unit time period;
[0091] Determine whether the first computing power requirement corresponding to each unit time period is greater than the average computing power requirement, and if so, record the corresponding unit time period as the first unit time;
[0092] Count the number of times each unit time period is marked as the first unit time, and arrange each unit time period in descending order according to the number of times it is marked;
[0093] The median of the marking times is obtained, and the unit time period in which the marking times are greater than the median is recorded as the peak period.
[0094] In one embodiment, all tasks in the peak period are obtained, and the level identifier corresponding to each task is obtained respectively, including:
[0095] Create multiple priority queues with different priority levels; create temporary super priority queues;
[0096] During peak hours, obtain all tasks currently to be executed;
[0097] According to the level identifier corresponding to each task, each task is assigned to each priority queue.
[0098] In one embodiment, the creating a plurality of priority queues with different priority levels includes: creating a high priority queue, a higher priority queue, a medium priority queue, a medium priority queue, a lower priority queue, and a low priority queue.
[0099] In one embodiment, dividing the tasks into adjustable tasks and non-adjustable tasks according to the level identifier includes:
[0100] Obtain the remaining network space and determine whether the remaining space reaches the threshold. If so, process the tasks in the temporary super priority queue, the high priority queue, the higher priority queue, the medium priority queue, the medium priority queue, the lower priority queue and the low priority queue in parallel according to the time sequence of task creation; if not, obtain the processing time of each task respectively, calculate the total processing time of all tasks, and determine whether the processing time is greater than the predetermined processing time threshold. If not, execute the tasks in each priority queue in sequence according to the temporary super priority queue, the high priority queue, the higher priority queue, the medium priority queue, the medium priority queue, the lower priority queue and the low priority queue; if so, sort all tasks in the order of the temporary super priority queue, the high priority queue, the higher priority queue, the medium priority queue, the medium priority queue, the lower priority queue and the low priority queue, and classify the tasks whose processing time does not exceed the processing time threshold as non-adjustable tasks, and classify the tasks whose processing time exceeds the processing time threshold as adjustable tasks.
[0101] In one embodiment, adjusting at least one adjustable task to a low-peak period for processing according to a predetermined rule includes:
[0102] Obtain the time length that the processing time exceeds the preset processing time threshold, which is recorded as the first delay time length;
[0103] According to historical data, the longest delay duration in the task processing history is obtained and recorded as the second delay duration;
[0104] Determine whether the first delay duration is less than the second delay duration. If not, adjust the adjustable tasks whose processing time is between the end point of the second delay duration and the end point of the first delay duration to the off-peak period for processing.
[0105] In one embodiment, it also includes: adjusting the adjustable tasks whose processing time is within the second delay time to the low-peak period for processing.
[0106] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0107] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0108] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. A task scheduling management method, characterized in that: include: S1. According to the historical data of task scheduling, the time of task scheduling is divided into peak period and valley period; S2. Obtain all tasks during the peak period and obtain the level identifier corresponding to each task; S3. Dividing the tasks into adjustable tasks and non-adjustable tasks according to the level identifiers; S4. According to a predetermined rule, at least one adjustable task is adjusted to a low-peak period for processing.
2. A task scheduling management method according to claim 1, characterized in that: According to the historical data of task scheduling, the time of task scheduling is divided into peak period and valley period, including: Obtaining a computing power log for task processing within a predetermined time from a database, dividing the predetermined time into a plurality of unit time periods; determining a first computing power requirement for task processing within each unit time period according to the computing power log; Based on all the first computing power requirements, calculate the average computing power requirement for task processing in each unit time period; Determine whether the first computing power requirement corresponding to each unit time period is greater than the average computing power requirement, and if so, record the corresponding unit time period as the first unit time; Count the number of times each unit time period is marked as the first unit time, and arrange each unit time period in descending order according to the number of times it is marked; The median of the marking times is obtained, and the unit time period in which the marking times are greater than the median is recorded as the peak period.
3. A task scheduling management method according to claim 2, characterized in that: Get all the tasks during the peak period and get the level identifier of each task, including: Create multiple priority queues with different priority levels; create temporary super priority queues; During peak hours, obtain all tasks currently to be executed; According to the level identifier corresponding to each task, each task is assigned to each priority queue.
4. A task scheduling management method according to claim 3, characterized in that: The step of creating multiple priority queues with different priority levels includes: Create a high priority queue, a higher priority queue, a medium priority queue, a medium priority queue, a lower priority queue, and a low priority queue.
5. A task scheduling management method according to claim 4, characterized in that: The step of dividing the tasks into adjustable tasks and non-adjustable tasks according to the level identifier includes: Obtain the remaining network space and determine whether the remaining space reaches the threshold. If so, process the tasks in the temporary super priority queue, the high priority queue, the higher priority queue, the medium priority queue, the medium priority queue, the lower priority queue and the low priority queue in parallel according to the time sequence of task creation; if not, obtain the processing time of each task respectively, calculate the total processing time of all tasks, and determine whether the processing time is greater than the predetermined processing time threshold. If not, execute the tasks in each priority queue in sequence according to the temporary super priority queue, the high priority queue, the higher priority queue, the medium priority queue, the medium priority queue, the lower priority queue and the low priority queue; if so, sort all tasks in the order of the temporary super priority queue, the high priority queue, the higher priority queue, the medium priority queue, the medium priority queue, the lower priority queue and the low priority queue, and classify the tasks whose processing time does not exceed the processing time threshold as non-adjustable tasks, and classify the tasks whose processing time exceeds the processing time threshold as adjustable tasks.
6. A task scheduling management method according to claim 5, characterized in that: The step of adjusting at least one adjustable task to a low-peak period for processing according to a predetermined rule includes: Obtain the time length that the processing time exceeds the preset processing time threshold, which is recorded as the first delay time length; According to historical data, the longest delay duration in the task processing history is obtained and recorded as the second delay duration; Determine whether the first delay duration is less than the second delay duration. If not, adjust the adjustable tasks whose processing time is between the end point of the second delay duration and the end point of the first delay duration to the off-peak period for processing.
7. A task scheduling management method according to claim 6, characterized in that: Also includes: Adjustable tasks whose processing time is within the second delay time period are adjusted to the off-peak period for processing.
8. A task scheduling management system, characterized in that: include: Time period division module: used to divide the task scheduling time into peak period and valley period according to the historical data of task scheduling; Task level acquisition module: used to obtain all tasks during peak hours and obtain the level identifier corresponding to each task; Task type classification module: used for classifying tasks into adjustable tasks and non-adjustable tasks according to the level identification; Task adjustment module: used to adjust at least one adjustable task to a low-peak period for processing according to a predetermined rule.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Task scheduling method suitable for security transaction monitoring service
CN120851536A
A task scheduling method suitable for securities transaction monitoring business
CN120851536B
Task allocation method and device for robot cluster, equipment and medium
CN122392858A