Timing task processing method and device, computer device and storage medium

By splitting serial timed tasks into independent subtasks for parallel execution, the problem of low execution efficiency of timed tasks is solved, and more efficient task processing is achieved.

CN115543568BActive Publication Date: 2026-11-06CHINA CONSTRUCTION BANK +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211197882.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-29
Publication Date
2026-11-06
Estimated Expiration
2042-09-29

AI Technical Summary

Technical Problem

In large and complex business processing scenarios, the execution efficiency of scheduled tasks is reduced due to excessive complexity, and existing technologies are unable to effectively improve it.

Method used

The serial timed task is split into independent subtasks, which are then executed in parallel. Task allocation is optimized through parallel scheduling strategies, and execution efficiency is improved by leveraging multiprocessor systems.

Benefits of technology

By splitting and executing serial timed tasks in parallel, the execution time was shortened, meeting the downstream requirements for timeliness and improving task execution efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115543568B_ABST
    Figure CN115543568B_ABST
Patent Text Reader

Abstract

The application discloses a timing task processing method and device, computer equipment, a storage medium and a computer program product, and relates to the technical field of big data task scheduling. The method comprises the following steps: acquiring a task file set and performance parameters generated by a to-be-processed serial timing task; splitting the serial timing task according to the performance parameters, so as to obtain at least two independent serial timing subtasks; determining a target task file subset of each serial timing subtask from the task file set; and performing the target task file subset in parallel, so as to perform parallel scheduling on the at least two independent serial timing subtasks. The method can reduce the execution time length of the timing task, and effectively improves the timeliness of data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of big data task scheduling technology, and in particular to a timed task processing method, apparatus, computer equipment, storage medium and computer program product. Background Technology

[0002] Task scheduling refers to the automatic execution of tasks based on pre-set time points, pre-set time intervals, or pre-set execution counts. Task scheduling is widely used in various business scenarios, where it can meet the needs of different scenarios. For example, in business scenarios with high operational volumes, task scheduling can automatically trigger batch tasks when certain business conditions are met to complete the required processing.

[0003] However, with the widespread use of task scheduling, when the complexity of scheduled tasks exceeds a certain level in solving large and complex business processing scenarios, there is a problem of reduced execution efficiency of scheduled tasks when they are executed serially or in parallel by the configured scheduled tasks. Summary of the Invention

[0004] Therefore, it is necessary to provide a timed task processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve the execution efficiency of timed tasks, in order to address the above-mentioned technical problems.

[0005] Firstly, this application provides a method for processing scheduled tasks. The method includes:

[0006] Obtain the set of task files and performance parameters generated by the serial timed task to be processed;

[0007] The serial timing task is split according to the performance parameters to obtain at least two independent serial timing subtasks;

[0008] Determine the target task file subset for each of the serially timed subtasks from the task file set;

[0009] The at least two independent serially timed subtasks are scheduled in parallel by executing the subset of the target task files in parallel.

[0010] In one embodiment, determining the target task file subset for each of the serially timed subtasks from the task file includes:

[0011] Determine the number of task files for each of the serially timed subtasks;

[0012] According to the pre-configured parallel scheduling strategy, the task files in the task file set are allocated and combined according to the number of task files for each serial timed subtask to obtain a subset of target task files for each serial timed subtask.

[0013] In one embodiment, the step of allocating and combining the task files in the task file set according to the number of task files for each of the serial timing subtasks based on a pre-configured parallel scheduling strategy to obtain a target task file subset for each of the serial timing subtasks includes:

[0014] Obtain the execution time required for each task file in the task file set;

[0015] Based on the number of task files for each of the serial timed subtasks and the execution duration of each, the task files in the task file set are allocated to the at least two independent serial timed subtasks until the task file set is completely allocated, thereby obtaining at least two candidate task file subsets for each of the serial timed subtasks.

[0016] The subset of candidate task files that are executed in parallel for each of the serially timed subtasks, and the subset of candidate task files with the shortest required execution time, are determined as the target task file subset for each of the serially timed subtasks.

[0017] In one embodiment, the task files in the task file set are allocated to the at least two independent serial timed subtasks based on the number of task files for each of the serial timed subtasks and the execution duration of each subtask, until the task file set is completely allocated, resulting in at least two candidate task file subsets for each of the serial timed subtasks, including:

[0018] Based on the execution duration, the task files in the task file set are traversed, and the task file with the shortest execution duration is selected as the task file to be assigned each time.

[0019] According to the number of task files for each of the serial timing subtasks, the task files to be assigned are allocated to any one of the at least two independent serial timing subtasks until the task file set is completely allocated, thereby obtaining at least two candidate task file subsets for each of the serial timing subtasks.

[0020] In one embodiment, the step of allocating and combining the task files in the task file set according to the number of task files for each of the serial timing subtasks based on a pre-configured parallel scheduling strategy to obtain a target task file subset for each of the serial timing subtasks includes:

[0021] Obtain the computing resources required to execute each task file in the task file set;

[0022] Based on the number of task files for each of the serial timed subtasks and the computing resources occupied by each, the task files in the task file set are allocated to the at least two independent serial timed subtasks until the task file set is completely allocated, thereby obtaining at least two candidate task file subsets for each of the serial timed subtasks.

[0023] The subset of candidate task files that occupies the least computing resources among the candidate task file subsets that execute each of the serial timed subtasks in parallel is determined as the target task file subset for each of the serial timed subtasks.

[0024] In one embodiment, the process of allocating task files in the task file set to the at least two independent serial timed subtasks based on the number of task files for each of the serial timed subtasks and the computing resources they occupy, until the task file set is completely allocated, results in at least two candidate task file subsets for each of the serial timed subtasks, including:

[0025] Based on the computing resources occupied, the task files are traversed sequentially, and the task file with the least computing resources is selected as the task file to be assigned each time.

[0026] According to the number of task files for each of the serial timing subtasks, the task files to be assigned are allocated to any one of the at least two independent serial timing subtasks until the task file set is completely allocated, thereby obtaining at least two candidate task file subsets for each of the serial timing subtasks.

[0027] In one embodiment, the step of allocating and combining the task files in the task file set according to the number of task files for each of the serial timing subtasks based on a pre-configured parallel scheduling strategy to obtain a target task file subset for each of the serial timing subtasks includes:

[0028] Obtain the execution time and computing resources required for each task file in the task file set;

[0029] The resource density value is determined based on the execution duration and computing resources occupied by each task file;

[0030] Based on the number of task files for each of the serially timed subtasks and the resource density values, the task files in the task file set are allocated to the at least two independent serially timed subtasks until the task file set is completely allocated, thereby obtaining at least two candidate task file subsets for each of the serially timed subtasks.

[0031] The subset of candidate task files that requires the highest resource density among the subsets of candidate task files for parallel execution of each of the serially timed subtasks is determined as the target task file subset for each of the serially timed subtasks.

[0032] In one embodiment, the task files in the task file set are allocated to the at least two independent serial timed subtasks based on the number of task files for each of the serial timed subtasks and the resource density values, until all task files are allocated, resulting in at least two candidate task file subsets for each of the serial timed subtasks, including:

[0033] Based on the resource density value, the task files in the task file set are traversed sequentially, and the task file with the largest resource density value is selected as the task file to be assigned each time.

[0034] Based on the number of task files for each of the serial timing subtasks, the task files to be allocated are assigned to any one of the at least two independent serial timing subtasks until all task files are allocated, resulting in at least two candidate task file subsets for each of the serial timing subtasks. In one embodiment, splitting the serial timing task according to the performance parameters to obtain at least two independent serial timing subtasks includes:

[0035] Obtain the actual duration required to execute the serial timed task;

[0036] Based on the time consumption of each task file, the size of the task file, the timeliness parameter, and the actual duration in the performance parameters, the serial timed task is split into at least two independent serial timed subtasks.

[0037] Secondly, this application also provides a timed task processing device. The device includes:

[0038] The data acquisition module is used to acquire all task file sets and performance parameters generated by the serial timed task to be processed;

[0039] The task splitting module is used to split the serial timed task according to the performance parameters to obtain at least two independent serial timed subtasks.

[0040] The task combination module is used to determine the target task file subset for each of the serially timed subtasks from the task file set;

[0041] A parallel scheduling module is used to perform parallel scheduling of the at least two independent serially timed subtasks by executing the subset of the target task files.

[0042] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0043] Obtain the set of task files and performance parameters generated by the serial timed task to be processed;

[0044] The serial timing task is split according to the performance parameters to obtain at least two independent serial timing subtasks;

[0045] Determine the target task file subset for each of the serially timed subtasks from the task file set;

[0046] The at least two independent serially timed subtasks are scheduled in parallel by executing the subset of the target task files in parallel.

[0047] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0048] Obtain the set of task files and performance parameters generated by the serial timed task to be processed;

[0049] The serial timing task is split according to the performance parameters to obtain at least two independent serial timing subtasks;

[0050] Determine the target task file subset for each of the serially timed subtasks from the task file set;

[0051] The at least two independent serially timed subtasks are scheduled in parallel by executing the subset of the target task files in parallel.

[0052] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0053] Obtain the set of task files and performance parameters generated by the serial timed task to be processed;

[0054] The serial timing task is split according to the performance parameters to obtain at least two independent serial timing subtasks;

[0055] Determine the target task file subset for each of the serially timed subtasks from the task file set;

[0056] The at least two independent serially timed subtasks are scheduled in parallel by executing the subset of the target task files in parallel.

[0057] The aforementioned serial task processing method, apparatus, computer equipment, storage medium, and computer program product, when executing a serial timed task to be processed, split the serial timed task according to performance parameters to obtain at least two independent serial timed subtasks; determine the target task file subset for each serial timed subtask from the task file set; and perform parallel scheduling of the at least two independent serial timed subtasks by executing the target task file subset. By splitting the serial timed task into at least two independent serial timed subtasks and scheduling these split independent serial timed subtasks in parallel, the split serial timed subtasks begin execution at the same time point, completing the execution of the serial timed task. Compared to the original serial timed task, this reduces the file size of the executing timed task and shortens the execution time of the timed task, thereby reducing the original execution time of the serial timed task and ensuring the timeliness requirements of the downstream of the serial timed task. Parallel scheduling of the split serial timed subtasks allows the serial timed task to be scheduled into a multiprocessor system, improving task execution efficiency. Attached Figure Description

[0058] Figure 1 This is a flowchart illustrating a timed task processing method in one embodiment;

[0059] Figure 2 This is a flowchart illustrating the steps for determining a subset of target task files for a serially timed subtask in one embodiment.

[0060] Figure 3 This is a flowchart illustrating a method for determining a subset of target task files for a serially timed subtask in one embodiment.

[0061] Figure 4 This is a flowchart illustrating a method for determining a subset of target task files for a serially timed subtask in another embodiment.

[0062] Figure 5 This is a flowchart illustrating a method for determining a subset of target task files for a serially timed subtask in another embodiment.

[0063] Figure 6 This is a flowchart illustrating a timed task processing method in another embodiment;

[0064] Figure 7 This is a flowchart illustrating a timed task processing method in another embodiment;

[0065] Figure 8 This is a structural block diagram of a timed task processing device in one embodiment;

[0066] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0067] It is understood that the acquisition, storage, use, and processing of data in the technical solution of this application all comply with the relevant provisions of national laws and regulations.

[0068] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0069] In one embodiment, such as Figure 1 As shown, a method for processing scheduled tasks is provided. This embodiment illustrates the application of this method to a server. It is understood that this method can also be applied to a terminal, or to a system including both a terminal and a server, and is implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0070] Step 102: Obtain the set of task files and performance parameters generated by the serial timed task to be processed.

[0071] Scheduled tasks are executed by triggering specific times using triggers, including SimpleTrigger and CronTrigger. Serial scheduled tasks can be understood as single-threaded execution. These tasks can be executed using a task scheduling framework, such as Quartz. Quartz is a task progress manager that executes (or notifies) other software components when the time is reached. The core of Quartz includes jobs, triggers, and a scheduler. A job is a task class that implements the `execute` method to complete the task. The scheduler is responsible for executing jobs based on triggers.

[0072] The execution of serial scheduled tasks requires pre-configuration of relevant execution information. This includes configuring custom jobs, task descriptions, triggers, and scheduling factories in Quartz. Each serial scheduled task requires a certain execution duration and consumes computational resources. These durations and resource consumption are determined by the file size of each task file generated by the serial scheduled task. For example, task files have execution duration and resource consumption attributes; for task files of different sizes, their corresponding execution durations and resource consumption are known.

[0073] Performance parameters include the file size of the task file generated by the serial timed task, computing resources and task file consumption time, and data supply timeliness. Among them, data supply timeliness refers to the speed at which the upstream provides data to the downstream. For example, the execution results obtained by executing the serial timed task need to be provided to the downstream task or business system. The speed at which the data is provided can be understood as data supply timeliness.

[0074] Step 104: Split the serial timing task according to the performance parameters to obtain at least two independent serial timing subtasks.

[0075] The number of independent serial timed subtasks that a serial timed task can be split into can be determined based on at least one of the following factors: system computing resources, the timeliness of the downstream of the serial timed task, the size of the task file, and the execution time.

[0076] Specifically, based on the actual business scenario requirements, the serial timed task is split into a corresponding number of serial timed subtasks based on at least one of the following factors: system computing resources, the timeliness of downstream tasks of the serial timed task, task file size, and execution duration. For example, the split serial timed subtasks can be three or four.

[0077] Step 106: Determine the target task file subset for each serially timed subtask from the task file set.

[0078] Understandably, a serial timed task generates a corresponding number of task files, resulting in a task file set. To improve the execution efficiency of the serial timed task and meet the timeliness requirements of downstream processing, the serial timed task is split into at least two serial timed subtasks. These subtasks are then scheduled in parallel to shorten the execution time. Building upon this shortened execution time, further optimization of the parallelism of the serial timed subtasks can maximize the reduction in execution time, conserve computational resources, or simultaneously minimize both execution time and computational resource consumption. This can be achieved by combining the task files in the task file set to obtain the optimal combination, thus determining the target task file subset for each serial timed subtask.

[0079] Specifically, the serial timed task is split into at least two serial timed subtasks. When scheduling the serial timed subtasks in parallel, the task files in the task file set are combined based on a greedy algorithm parallel scheduling strategy, which can be based on maximizing the reduction of execution time, saving computing resources, or simultaneously satisfying the requirements of the shortest execution time and the least computing resources. This results in the optimal task file subset for each serial timed subtask, i.e., the target task file subset.

[0080] Step 108: Parallel scheduling of at least two independent serially timed subtasks is achieved by executing a subset of the target task files in parallel.

[0081] In the above-described method for handling scheduled tasks, when executing a serial scheduled task, the task is split into at least two independent serial scheduled subtasks based on performance parameters. A target task file subset is determined from the task file set for each subtask. The at least two independent serial scheduled subtasks are then scheduled in parallel by executing the target task file subset. By splitting the scheduled task into at least two independent subtasks and scheduling them in parallel, the split subtasks begin execution simultaneously, completing the serial scheduled task. Compared to the original serial scheduled task, this reduces the file size and execution time, thereby shortening the original execution time and ensuring the timeliness requirements of downstream processes. Parallel scheduling of the split serial scheduled subtasks allows the serial scheduled task to be scheduled into a multiprocessor system, improving task execution efficiency.

[0082] After splitting the serial timed task into several serial timed subtasks, in order to further improve the execution efficiency of the timed task when scheduling the split serial timed subtasks in parallel, it is necessary to combine the task files in the task file set of the serial timed task to obtain a subset of task files for each timed subtask.

[0083] In one embodiment, a method is provided for determining the target subset of task files for each serially timed subtask from a set of task files, such as... Figure 2 As shown, it includes the following steps:

[0084] Step 202: Determine the number of task files for each serial timed subtask.

[0085] Step 204: According to the pre-configured parallel scheduling strategy, the task files in the task file set are allocated and combined according to the number of task files for each serial timed subtask to obtain the target task file subset for each serial timed subtask.

[0086] The number of task files for each serial timed subtask can be pre-configured or determined based on the number of split serial timed subtasks and the number of task files for each serial timed task. For example, the number of task files for each serial timed subtask can be the average of the number of task files for each serial timed task divided by the number of serial timed subtasks. The pre-configured parallel scheduling strategy includes at least one of the following: execution duration parallel scheduling strategy, computational resource occupancy parallel scheduling strategy, and resource density value parallel scheduling strategy. Further, the execution duration parallel scheduling strategy can be the scheduling strategy with the shortest execution duration, the computational resource occupancy parallel scheduling strategy can be the scheduling strategy with the least computational resource occupancy, and the resource density value parallel scheduling strategy can be the scheduling strategy with the highest resource density. Resource density can be understood as the ratio of task file execution duration to computational resource occupancy; that is, with the same execution duration, the less computational resources are occupied, the higher the resource density value.

[0087] Specifically, the serial timed task is split into at least two independent serial timed subtasks. Based on the actual business scenario requirements, a parallel scheduling strategy matching the actual business scenario requirements is determined from three options: the scheduling strategy with the shortest execution time, the scheduling strategy with the least computational resource consumption, and the scheduling strategy with the highest resource density. Using a greedy algorithm-based parallel scheduling strategy, task files are allocated and combined according to the number of task files for each serial timed subtask, resulting in a subset of target task files that satisfy each serial timed subtask. Determining the corresponding parallel scheduling strategy based on the actual business scenario requirements can meet the needs of different scenarios.

[0088] In one embodiment, such as Figure 3 As shown, a method for determining a subset of target task files for a serially timed subtask is provided. This embodiment illustrates the method by applying it to a server. It is understood that this method can also be applied to a terminal, or to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0089] Step 302: Obtain the execution time required for each task file in the task file set.

[0090] Step 304: Based on the number of task files and execution duration of each serial timed subtask, allocate the task files in the task file set to at least two independent serial timed subtasks until the task file set is completely allocated, obtaining at least two candidate task file subsets for each serial timed subtask. Each task file has corresponding attributes, including at least one of execution duration, computational resource usage, and resource density value. In business scenarios with high timeliness requirements, after splitting the serial timed task into at least two serial timed subtasks, and during parallel scheduling of the serial timed subtasks, the task files are combined based on their execution duration to obtain at least two candidate task file subsets for each serial timed subtask.

[0091] Step 306: The subset of candidate task files that are executed in parallel for each serial timed subtask, and the subset of candidate task files with the shortest required execution time, are determined as the target task file subset for each serial timed subtask.

[0092] In this process, when a serial timed task is split into at least two serial timed subtasks, and each serial timed subtask's corresponding task file subset is executed in parallel, the execution time of each serial timed subtask may be the same or different. If the execution time of each serial timed subtask is different, the longest execution time is determined as the parallel scheduling execution time after splitting the serial timed task. Based on different file combinations within the task file set, the optimal file combination needs to be determined to minimize the parallel scheduling execution time.

[0093] Specifically, based on the number of task files and the execution duration of each serial timed subtask, the task files in the task file set are allocated to at least two independent serial timed subtasks until the task file set is completely allocated, resulting in at least two candidate task file subsets for each serial timed subtask. Using a greedy algorithm, based on the at least two candidate task file subsets for each serial timed subtask, the candidate task file subsets for each serial timed subtask are executed in parallel. The candidate task file subset with the shortest required execution time is determined as the target task file subset for each corresponding serial timed subtask.

[0094] Furthermore, when allocating and combining task files in a task file set, determining at least two candidate task file subsets for each serial timing subtask can be achieved in the following way:

[0095] Method 1: Obtain the execution duration of each task file in the task file set. Sort the task files in descending or ascending order based on their execution duration to obtain a sequence of task files corresponding to the task file set. Then, in descending or ascending order, select a predetermined number of task files from this sequence as pending task files. Assign these pending task files to at least one of at least two independent serial timed subtasks until the task file set is completely allocated. This yields at least two candidate task file subsets for each serial timed subtask. The predetermined number can be a single value or determined based on the number of serial timed subtasks. The predetermined number can be preset according to actual needs. When assigning pending task files to at least one of at least two independent serial timed subtasks, various combinations of task files will be obtained.

[0096] Method 2: Obtain the execution time of each task file in the task file set. Based on the execution time of each task file, traverse the task files in the task file set. Each time, select the task file with the shortest execution time as the task file to be assigned. According to the number of task files in each serial timed subtask, assign the task file to be assigned to any one of at least two independent serial timed subtasks until all task files are assigned, thus obtaining at least two candidate task file subsets for each serial timed subtask.

[0097] Specifically, the execution duration of each task file in the task file set is obtained. The task file set is traversed to find the task file with the shortest execution duration to be assigned. Based on the number of task files for each serial timed subtask, the task file to be assigned is allocated to any one of at least two independent serial timed subtasks. The assigned task file is then removed from the task file set, the task file set is updated, and the updated task file set is allocated again until all task files are allocated. This process yields at least two candidate task file subsets for each serial timed subtask. In other words, a task file is selected from the task file set in ascending order of execution duration and assigned to any serial timed subtask, resulting in combinations of task files under various conditions. Therefore, each serial timed subtask has at least two candidate task file subsets. Based on a greedy algorithm, the target task file subset for each serial timed subtask under the condition of shortest parallel scheduling execution duration is determined from the at least two candidate task file subsets for each serial timed subtask. For example, a serial timed task generates 300 task files named obj1, obj2, obj3, ..., obj300. This serial timed task is then divided into serial timed subtasks 1, 2, and 3, each with 100 task files. When allocating and combining these 300 task files, multiple combinations exist. A greedy algorithm is used to determine the combination of task files with the shortest parallel scheduling execution time. Determining the shortest execution time using a greedy algorithm can be understood as finding the optimal solution. The specific method can be implemented using existing greedy algorithms, which will not be elaborated upon here.

[0098] In the above embodiments, the task file set is allocated and combined based on the execution time of each task file. Based on the greedy algorithm, the target task file subset of each serial timed subtask is obtained under the condition of shortest parallel scheduling execution time, which further reduces the execution time of serial timed tasks and effectively improves the timeliness of data transmission.

[0099] In another embodiment, such as Figure 4 As shown, a method for determining a subset of target task files for a serially timed subtask is provided. This embodiment illustrates the application of this method to a server. In this embodiment, the method includes the following steps:

[0100] Step 402: Obtain the computing resources required to execute each task file in the task file set.

[0101] Step 404: Based on the number of task files and the computing resources occupied by each serial timed subtask, allocate the task files in the task file set to at least two independent serial timed subtasks until the task file set is completely allocated, thereby obtaining at least two candidate task file subsets for each serial timed subtask.

[0102] In application scenarios with complex timed tasks and high requirements for computing resources, the serial timed task is split into at least two serial timed subtasks. When scheduling the serial timed subtasks in parallel, the resource consumption is reduced while shortening the execution time. The task files are combined according to the computing resources consumed, and at least two candidate task file subsets for each serial timed subtask are obtained, thus obtaining the optimal task file combination with the least computing resources consumed.

[0103] Step 406: The subset of candidate task files that occupies the least computing resources among the candidate task file subsets that execute each serial timed subtask in parallel is determined as the target task file subset for each serial timed subtask.

[0104] Specifically, based on the number of task files and the computational resources occupied by each serial timed subtask, the task files in the task file set are allocated to at least two independent serial timed subtasks until the task file set is completely allocated, resulting in at least two candidate task file subsets for each serial timed subtask. Based on a greedy algorithm, according to the at least two candidate task file subsets for each serial timed subtask, a candidate task file subset for parallel execution of each serial timed subtask is determined. The candidate task file subset with the least computational resources is determined as the target task file subset for each corresponding serial timed subtask. Further, when allocating and combining task files in the task file set, determining at least two candidate task file subsets for each serial timed subtask based on computational resources occupied can be achieved in the following way:

[0105] Method 1: Obtain the computational resources occupied by each task file in the task file set. Sort the task files according to their computational resources in descending or ascending order to obtain the task file sequence corresponding to the task file set. Then, in descending or ascending order, select a predetermined number of task files from the sequence as pending task files. Assign these pending task files to at least one of at least two independent serial timed subtasks until the task file set is completely allocated. This yields at least two candidate task file subsets for each serial timed subtask. This method only requires sorting the task file set once to directly obtain the pending task files, reducing processing steps. The predetermined number can be a single value or determined based on the number of serial timed subtasks. The predetermined number can be preset according to actual needs. When assigning the pending task files to at least one of at least two independent serial timed subtasks, various combinations of task files will be obtained.

[0106] Method 2: Based on the computing resources occupied, the task files are traversed sequentially, and the task file with the least computing resources is selected as the task file to be assigned. According to the number of task files for each serial timed subtask, the task file to be assigned is assigned to any one of at least two independent serial timed subtasks until the task file set is completely assigned, thus obtaining at least two candidate task file subsets for each serial timed subtask.

[0107] Specifically, the computational resources occupied by each task file in the task file set are obtained. The task file set is traversed to find the task file with the least computational resources to be assigned. Based on the number of task files for each serial timed subtask, the task file to be assigned is allocated to any one of at least two independent serial timed subtasks. The assigned task file is then removed from the task file set, and the task file set is updated. The updated task file set is then used to select the task file with the least computational resources to be assigned, and this process continues until all task files are allocated, resulting in at least two candidate task file subsets for each serial timed subtask. Each time, selecting the task file with the least computational resources and assigning it to any serial timed subtask will result in various combinations of task files.

[0108] Based on a greedy algorithm, the target task file subset for each serial timed subtask is determined from at least two candidate task file subsets for each serial timed subtask, minimizing the computational resource consumption during parallel scheduling. For example, if a serial timed task generates 300 task files (obj1, obj2, obj3, ..., obj300), and the serial timed task is split into serial timed subtask 1, serial timed subtask 2, and serial timed subtask 3, with 100 task files for each serial timed subtask, multiple allocation combinations exist when allocating and combining these 300 task files. The greedy algorithm then determines the task file combination that minimizes the computational resource consumption during parallel scheduling.

[0109] In the above embodiments, the allocation files of the task file set are allocated and combined based on the computing resources occupied by each task file. Based on the greedy algorithm, the target task file subset of each serial timed subtask is obtained under the condition of minimizing the computing resources occupied by parallel scheduling. This avoids too many timed tasks being executed at the same time, which would consume too much computer resources. In this way, the computing resources required for the execution of serial timed tasks are reduced, computing resources are saved, the processing efficiency and accuracy of timed tasks are improved, and the timeliness of data transmission is effectively improved.

[0110] In another embodiment, such as Figure 5 As shown, a method for determining a subset of target task files for a serially timed subtask is provided. This embodiment illustrates the application of this method to a server. In this embodiment, the method includes the following steps:

[0111] Step 502: Obtain the execution time and computing resources required for each task file in the task file set.

[0112] Step 504: Determine the resource density value of the task file based on the execution time and the computing resources used.

[0113] Resource density is the ratio of execution time to computing resources used. Executing too many scheduled tasks simultaneously can consume excessive computer resources. Combining task files within a task file set based on resource density ensures that multiple scheduled tasks can be executed concurrently, reducing resource consumption and waste, and shortening execution time.

[0114] Step 506: Based on the number of task files and resource density values ​​of each serial timed subtask, assign the task files in the task file set to at least two independent serial timed subtasks until the task file set is completely assigned, thereby obtaining at least two candidate task file subsets for each serial timed subtask.

[0115] In application scenarios with complex timed tasks and high timeliness requirements, serial timed tasks are split into at least two serial timed subtasks. When scheduling serial timed subtasks in parallel, in order to improve the execution efficiency of serial timed tasks, shorten the execution time, and minimize the use of computing resources, task files are combined according to resource density values. At least two candidate task file subsets for each serial timed subtask are obtained, and then the optimal task file combination with the largest resource density value is obtained.

[0116] Step 508: The subset of candidate task files that execute each serial timed subtask in parallel, and the subset of candidate task files with the largest resource density value, are determined as the target task file subset for each serial timed subtask.

[0117] Specifically, based on the number of task files and resource density values ​​of each serial timed subtask, the task files in the task file set are allocated to at least two independent serial timed subtasks until the task file set is completely allocated, resulting in at least two candidate task file subsets for each serial timed subtask. Using a greedy algorithm, based on the at least two candidate task file subsets for each serial timed subtask, a candidate task file subset for parallel execution of each serial timed subtask is determined. The candidate task file subset with the highest resource density value is determined as the target task file subset for each corresponding serial timed subtask.

[0118] Furthermore, when allocating and combining task files in a task file set, determining at least two candidate task file subsets for each serial timing subtask based on resource density values ​​can be achieved in the following way:

[0119] Method 1: Obtain the resource density value of each task file in the task file set. Sort the task files according to their resource density values ​​in descending or ascending order to obtain a sequence of task files corresponding to the task file set. Then, in descending or ascending order, select a predetermined number of task files from this sequence as pending task files. Assign these pending task files to at least one of at least two independent serial timed subtasks until the task file set is completely allocated. This yields at least two candidate task file subsets for each serial timed subtask. This method only requires sorting the task file set once to directly obtain the pending task files, reducing processing steps. The predetermined number can be a single value or determined based on the number of serial timed subtasks. The predetermined number can be preset according to actual needs. When assigning pending task files to at least one of at least two independent serial timed subtasks, various combinations of task files will be obtained.

[0120] Method 2: Based on the resource density value, the task files in the task file set are traversed sequentially, and the task file with the largest resource density value is selected as the task file to be assigned each time. According to the number of task files in each serial timed subtask, the task file to be assigned is assigned to any one of at least two independent serial timed subtasks until all task files are assigned, thus obtaining at least two candidate task file subsets for each serial timed subtask.

[0121] Specifically, based on the number of task files in each serial timed subtask, the task files to be allocated are assigned to any one of at least two independent serial timed subtasks until all task files are allocated, resulting in at least two candidate task file subsets for each serial timed subtask. Using a greedy algorithm, the target task file subset for each serial timed subtask, maximizing the parallel scheduling resource density, is determined from these at least two candidate task file subsets. For example, if a serial timed task generates 300 task files (obj1, obj2, obj3, ..., obj300), the serial timed task can be split into serial timed subtasks 5, 6, and 7, with each subtask containing 100 task files.

[0122] In the first case, the task file with the highest resource density value is selected each time. The resulting subset of candidate task files for serial timed subtask 5 can be obj1, ..., obj100; for serial timed subtask 6, obj101, ..., obj200; and for serial timed subtask 7, obj201, ..., obj300. In the second case, the same process is repeated. Based on these multiple scenarios, a greedy algorithm is used to determine the combination of task files with the highest parallel scheduling resource density, thus defining the target task file subset for each serial timed subtask.

[0123] In the above embodiments, the task file set is traversed based on the resource density value of each task file. Each time, the file with the largest resource density value in the updated task file set is selected for allocation and combination. Based on the greedy algorithm, the target task file subset of each serial timed subtask under the condition of the maximum parallel scheduling resource density value is obtained, thus obtaining the optimal task file combination, ensuring the shortest execution time and the least amount of computing resources occupied.

[0124] In another embodiment, such as Figure 6 As shown, a method for processing scheduled tasks is provided. This embodiment illustrates the application of this method to a server. In this embodiment, the method includes the following steps:

[0125] Step 602: Obtain the set of task files and performance parameters generated by the serial timed task to be processed.

[0126] Step 604: Split the serial timing task according to the performance parameters to obtain at least two independent serial timing subtasks.

[0127] Step 606: Determine the parallel scheduling strategy.

[0128] Step 608: If the parallel scheduling strategy is the scheduling strategy with the shortest execution time, then the task files in the task file set are combined according to the execution time required for each task file to be executed, and the target task file subset for each serial timed subtask is determined.

[0129] Specifically, if the parallel scheduling strategy is the scheduling strategy with the shortest execution time, when determining the optimal subset of task files for each serial timed subtask, the execution time of each task file in the task file set is obtained. The task file set is traversed to obtain the task file to be assigned with the shortest execution time. According to the number of task files for each serial timed subtask, the task file to be assigned is assigned to any one of at least two independent serial timed subtasks until all task files are assigned, resulting in at least two candidate task file subsets for each serial timed subtask. Based on a greedy algorithm, the target task file subset for each serial timed subtask under the condition of shortest parallel scheduling execution time is determined from the at least two candidate task file subsets for each serial timed subtask.

[0130] Step 610: If the parallel scheduling strategy is the scheduling strategy that occupies the least amount of computing resources, then the task files in the task file set are combined according to the computing resources occupied by each task file to determine the target task file subset for each serial timed subtask.

[0131] Specifically, if the parallel scheduling strategy is the one that consumes the least amount of computing resources, when determining the optimal subset of task files for each serial timed subtask, the execution time of each task file in the task file set is obtained. The task file set is traversed to obtain the task file to be allocated that consumes the least amount of computing resources. According to the number of task files for each serial timed subtask, the task file to be allocated is assigned to any one of at least two independent serial timed subtasks until all task files are allocated, resulting in at least two candidate task file subsets for each serial timed subtask. Based on a greedy algorithm, the target task file subset for each serial timed subtask under the condition of consuming the least amount of computing resources in parallel scheduling is determined from the at least two candidate task file subsets for each serial timed subtask.

[0132] Step 612: If the parallel scheduling strategy is the scheduling strategy with the largest resource density value, then the task files in the task file set are combined according to the resource density value of each task file to determine the target task file subset for each serial timed subtask.

[0133] Specifically, if the parallel scheduling strategy is the one that consumes the least amount of computing resources, when determining the optimal subset of task files for each serial timed subtask, the execution time of each task file in the task file set is obtained. The task file set is traversed to obtain the task file to be allocated that consumes the least amount of computing resources. According to the number of task files for each serial timed subtask, the task file to be allocated is assigned to any one of at least two independent serial timed subtasks until all task files are allocated, resulting in at least two candidate task file subsets for each serial timed subtask. Based on a greedy algorithm, the target task file subset for each serial timed subtask under the condition of consuming the least amount of computing resources in parallel scheduling is determined from the at least two candidate task file subsets for each serial timed subtask.

[0134] Step 614: Parallel scheduling of at least two independent serially timed subtasks is achieved by executing a subset of the target task files in parallel.

[0135] In the above embodiments, when executing a serial timed task to be processed, the serial timed task is split according to performance parameters to obtain at least two independent serial timed subtasks. When determining the target task file subset for each serial timed subtask from the task file set, the target task file subset for the split serial timed subtask is determined in different ways according to the business requirements under different scenarios and the parallel scheduling strategy corresponding to each business scenario. By executing the target task file subset, at least two independent serial timed subtasks are scheduled in parallel. When executing a serial timed task, by splitting the timed task to obtain at least two independent serial timed subtasks, and scheduling the split independent serial timed subtasks in parallel, the split serial timed subtasks start executing at the same time point to complete the execution of the serial timed task. Compared with the original serial timed task, the file size of the executed timed task is reduced and the execution time of the timed task is shortened, thereby reducing the execution time of the original serial timed task and ensuring the timeliness requirements of the downstream of the serial timed task. Parallel scheduling of the split serial timed subtasks can realize the scheduling of the serial timed task to a multi-processor system, improving the execution efficiency of the task.

[0136] In another embodiment, such as Figure 7 As shown, a method for processing scheduled tasks is provided. This embodiment illustrates the application of this method to a server. In this embodiment, the method includes the following steps:

[0137] Step 702: Obtain the set of task files and performance parameters generated by the serial timed task to be processed.

[0138] Step 704: Obtain the actual duration required to execute the serial timed task.

[0139] The actual duration refers to the time required for the serial timed task to be executed without being split.

[0140] Step 706: Based on the time consumption, file size, timing parameters, and actual duration of each task file in the performance parameters, split the serial timed task to obtain at least two independent serial timed subtasks.

[0141] The time consumption of each task file can be the required execution duration of each task file. The timeliness parameter can be preset, for example, the execution duration of a serial timed task.

[0142] Furthermore, when splitting the serial timed task, the server's current idle computing resources are obtained. Taking the actual duration as a reference, the serial timed task is split according to the idle computing resources, the time consumption of each task file, the size of the task file, and the timeliness parameters to obtain at least two independent serial timed subtasks.

[0143] Step 708: Determine the target task file subset for each serially timed subtask from the task file set.

[0144] The determination of the target task file subset for each serial timing subtask can be achieved in the manner described above, and will not be elaborated upon here.

[0145] Step 710: Parallel scheduling of at least two independent serially timed subtasks is achieved by executing a subset of the target task files in parallel.

[0146] In the above embodiments, when executing a serial timed task to be processed, the serial timed task is accurately split according to performance parameters, task file set, and other parameters to obtain serial timed subtasks that are allowed by the current server's computing resources. These split, independent serial timed subtasks are then scheduled in parallel, and execution begins simultaneously at the same time, completing the execution of the serial timed task. Compared to the original serial timed task, this reduces the file size and execution time of the timed task, thereby reducing the original execution time and ensuring the timeliness requirements of downstream processes. Parallel scheduling of the split serial timed subtasks allows the serial timed task to be scheduled into a multiprocessor system, improving task execution efficiency.

[0147] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0148] Based on the same inventive concept, this application also provides a timed task processing apparatus for implementing the timed task processing method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more timed task processing apparatus embodiments provided below can be found in the limitations of the timed task processing method described above, and will not be repeated here.

[0149] In one embodiment, such as Figure 8As shown, a timed task processing device is provided, including: a data acquisition module 802, a task splitting module 804, a task combination module 806, and a parallel scheduling module 808, wherein:

[0150] The acquisition module 802 is used to acquire all task file sets and performance parameters generated by the serial timed task to be processed.

[0151] The task splitting module 804 is used to split the serial timed task according to performance parameters to obtain at least two independent serial timed subtasks.

[0152] Task combination module 806 is used to determine the target task file subset for each serially timed subtask from the task file set.

[0153] The parallel scheduling module 808 is used to perform parallel scheduling of at least two independent serially timed subtasks by executing a subset of the target task file.

[0154] In the aforementioned timed task processing device, when executing a serial timed task to be processed, the serial timed task is split into at least two independent serial timed subtasks based on performance parameters; a target task file subset for each serial timed subtask is determined from the task file set; and the at least two independent serial timed subtasks are scheduled in parallel by executing the target task file subset. By splitting the serial timed task into at least two independent serial timed subtasks and scheduling them in parallel, the split serial timed subtasks begin execution at the same time, completing the execution of the serial timed task. Compared to the original serial timed task, this reduces the file size and execution time of the timed task, thereby reducing the original execution time of the serial timed task and ensuring the timeliness requirements of downstream processes. Parallel scheduling of the split serial timed subtasks allows the serial timed task to be scheduled into a multiprocessor system, improving task execution efficiency.

[0155] In another embodiment, a timed task processing device is provided, which, in addition to including a data acquisition module 802, a task splitting module 804, a task combining module 806, and a parallel scheduling module 808, further includes: a first traversal module, a first optimization module, a second traversal module, a second optimization module, a resource density value determination module, a third traversal module, and a third optimization module, wherein:

[0156] The task combination module 806 is also used to determine the number of task files for each serially timed subtask;

[0157] Based on the pre-configured parallel scheduling strategy, the task files are allocated and combined according to the number of task files for each serial timing subtask, resulting in a subset of target task files that satisfy each serial timing subtask.

[0158] The first pass module is used to obtain the execution time required for each task file in the task file set.

[0159] The task combination module 806 is used to allocate task files in the task file set to at least two independent serial timed subtasks based on the number of task files and the execution duration of each serial timed subtask, until the task file set is completely allocated, thereby obtaining at least two candidate task file subsets for each serial timed subtask.

[0160] The first optimization module is used to determine the candidate task file subset with the shortest required execution time from the candidate task file subsets that execute each serial timed subtask in parallel, and then use it as the target task file subset for each serial timed subtask.

[0161] The first traversal module is also used to traverse the task files in the task file set based on each execution duration, and each time select the task file with the shortest execution duration as the task file to be assigned.

[0162] The task combination module 806 is also used to allocate the task files to be assigned to any one of at least two independent serial timed subtasks according to the number of task files for each serial timed subtask, until the task file set is completely allocated, thereby obtaining at least two candidate task file subsets for each serial timed subtask.

[0163] The second traversal module is used to obtain the computing resources required to execute each task file in the task file set.

[0164] The task combination module 806 is used to allocate task files in the task file set to at least two independent serial timed subtasks based on the number of task files and the computing resources occupied by each serial timed subtask, until the task file set is completely allocated, thereby obtaining at least two candidate task file subsets for each serial timed subtask.

[0165] The second optimization module is used to determine the subset of candidate task files that consumes the least computing resources among the subsets of candidate task files that execute each serial timed subtask in parallel, and then use that subset as the target task file subset for each serial timed subtask.

[0166] The second traversal module is also used to traverse the task files sequentially based on the computing resources occupied, and each time select the task file with the least computing resources to be assigned as the task file.

[0167] The task combination module 806 is also used to allocate the task files to be assigned to any one of at least two independent serial timed subtasks according to the number of task files for each serial timed subtask, until the task file set is completely allocated, thereby obtaining at least two candidate task file subsets for each serial timed subtask.

[0168] The resource density value determination module is used to obtain the execution time and computing resources required for each task file.

[0169] The resource density value of the task file is determined based on the execution time and the computing resources used.

[0170] The task combination module 806 is used to allocate task files in the task file set to at least two independent serial timed subtasks based on the number of task files and resource density values ​​of each serial timed subtask, until all task files are allocated, thereby obtaining at least two candidate task file subsets for each serial timed subtask.

[0171] The third optimization module is used to determine the subset of candidate task files with the highest resource density among the subsets of candidate task files that execute each serial timed subtask in parallel, and then use that subset as the target task file subset for each serial timed subtask.

[0172] The third traversal module is used to traverse the task files in the task file set sequentially based on the resource density value, and each time selects the task file with the largest resource density value as the task file to be assigned.

[0173] The task combination module 806 is also used to allocate the task files to be assigned to any one of at least two independent serial timed subtasks according to the number of task files for each serial timed subtask, until all task files are allocated, thereby obtaining at least two candidate task file subsets for each serial timed subtask.

[0174] Task splitting module 804 is used to obtain the actual duration required to execute a serial timed task;

[0175] Based on the time consumption, file size, timing parameters, and actual duration of each task file in the performance parameters, the serial timed task is split into at least two independent serial timed subtasks.

[0176] Each module in the aforementioned timed task processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0177] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 9 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores task file data and related data for serial timed tasks. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements a timed task processing method.

[0178] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0179] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0180] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0181] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0182] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0183] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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.

[0184] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for processing timed tasks, characterized in that, The method includes: Obtain the set of task files and performance parameters generated by the serial timed task to be processed; The serial timing task is split according to the performance parameters to obtain at least two independent serial timing subtasks; The number of task files for each of the serially timed subtasks is determined; the execution time required for each task file in the task file set is obtained; based on the number of task files for each of the serially timed subtasks and the execution time of each task file, the task files in the task file set are allocated to the at least two independent serially timed subtasks until the task file set is completely allocated, resulting in at least two candidate task file subsets for each of the serially timed subtasks; the candidate task file subset with the shortest required execution time among the candidate task file subsets for parallel execution of each of the serially timed subtasks is determined as the target task file subset for each of the serially timed subtasks, and the target task file subset is obtained by combining the task files in the task file set based on a greedy algorithm parallel scheduling strategy; The at least two independent serially timed subtasks are scheduled in parallel by executing the subset of the target task files in parallel.

2. The method according to claim 1, characterized in that, Based on the number of task files in each of the serially timed subtasks and the execution duration of each, the task files in the task file set are allocated to the at least two independent serially timed subtasks until the task file set is completely allocated, resulting in at least two candidate task file subsets for each of the serially timed subtasks, including: Based on the execution duration, the task files in the task file set are traversed, and the task file with the shortest execution duration is selected as the task file to be assigned each time. According to the number of task files for each of the serial timing subtasks, the task files to be assigned are allocated to any one of the at least two independent serial timing subtasks until the task file set is completely allocated, thereby obtaining at least two candidate task file subsets for each of the serial timing subtasks.

3. The method according to claim 1, characterized in that, The step of allocating and combining task files in the task file set according to the number of task files for each serial timing subtask based on a pre-configured parallel scheduling strategy, to obtain a target task file subset for each serial timing subtask, includes: Obtain the computing resources required to execute each task file in the task file set; Based on the number of task files for each of the serial timed subtasks and the computing resources occupied by each, the task files in the task file set are allocated to the at least two independent serial timed subtasks until the task file set is completely allocated, thereby obtaining at least two candidate task file subsets for each of the serial timed subtasks. The subset of candidate task files that occupies the least computing resources among the candidate task file subsets that execute each of the serial timed subtasks in parallel is determined as the target task file subset for each of the serial timed subtasks.

4. The method according to claim 3, characterized in that, Based on the number of task files and the computing resources occupied by each of the serially timed subtasks, the task files in the task file set are allocated to the at least two independent serially timed subtasks until the task file set is completely allocated, resulting in at least two candidate task file subsets for each serially timed subtask, including: Based on the computing resources occupied, the task files are traversed sequentially, and the task file with the least computing resources is selected as the task file to be assigned each time. According to the number of task files for each of the serial timing subtasks, the task files to be assigned are allocated to any one of the at least two independent serial timing subtasks until the task file set is completely allocated, thereby obtaining at least two candidate task file subsets for each of the serial timing subtasks.

5. The method according to claim 1, characterized in that, The step of allocating and combining task files in the task file set according to the number of task files for each serial timing subtask based on a pre-configured parallel scheduling strategy, to obtain a target task file subset for each serial timing subtask, includes: Obtain the execution time and computing resources required for each task file in the task file set; The resource density value is determined based on the execution duration and computing resources occupied by each task file; Based on the number of task files for each of the serially timed subtasks and the resource density values, the task files in the task file set are allocated to the at least two independent serially timed subtasks until all the task files are allocated, thereby obtaining at least two candidate task file subsets for each of the serially timed subtasks. The subset of candidate task files that requires the highest resource density among the subsets of candidate task files for parallel execution of each of the serially timed subtasks is determined as the target task file subset for each of the serially timed subtasks.

6. The method according to claim 5, characterized in that, Based on the number of task files in each of the serially timed subtasks and the resource density values, the task files in the task file set are allocated to the at least two independent serially timed subtasks until all task files are allocated, resulting in at least two candidate task file subsets for each of the serially timed subtasks, including: Based on the resource density value, the task files in the task file set are traversed sequentially, and the task file with the largest resource density value is selected as the task file to be assigned each time. According to the number of task files for each of the serial timing subtasks, the task files to be assigned are allocated to any one of the at least two independent serial timing subtasks until all task files are allocated, thereby obtaining at least two candidate task file subsets for each of the serial timing subtasks.

7. The method according to any one of claims 1 to 6, characterized in that, The step of splitting the serial timing task according to the performance parameters to obtain at least two independent serial timing subtasks includes: Obtain the actual duration required to execute the serial timed task; Based on the time consumption of each task file, the size of the task file, the timeliness parameter, and the actual duration in the performance parameters, the serial timed task is split into at least two independent serial timed subtasks.

8. A timed task processing device, characterized in that, The device includes: The data acquisition module is used to acquire all task file sets and performance parameters generated by the serial timed task to be processed; The task splitting module is used to split the serial timed task according to the performance parameters to obtain at least two independent serial timed subtasks. The first acquisition module is used to acquire the execution time required for each task file in the task file set. The task combination module is used to determine the number of task files for each of the serial timed subtasks; based on the number of task files for each of the serial timed subtasks and the execution duration of each, the task files in the task file set are allocated to the at least two independent serial timed subtasks until the task file set is completely allocated, thereby obtaining at least two candidate task file subsets for each of the serial timed subtasks. The first optimization module is used to determine the candidate task file subsets that are executed in parallel for each of the serial timed subtasks, and the candidate task file subsets with the shortest required execution time, as the target task file subsets for each of the serial timed subtasks. The target task file subsets are obtained by combining the task files in the task file set based on the parallel scheduling strategy of the greedy algorithm. A parallel scheduling module is used to perform parallel scheduling of the at least two independent serially timed subtasks by executing the subset of the target task files.

9. The apparatus according to claim 8, characterized in that, The device further includes: The first traversal module is used to traverse the task files in the task file set based on the execution duration, and each time select the task file with the shortest execution duration as the task file to be assigned. The task combination module is further configured to allocate the task file to be allocated to any one of the at least two independent serial timed subtasks according to the number of task files for each serial timed subtask, until the task file set is completely allocated, thereby obtaining at least two candidate task file subsets for each serial timed subtask.

10. The apparatus according to claim 8, characterized in that, The device further includes: The second traversal module is used to obtain the computing resources required to execute each task file in the task file set. The task combination module is further configured to allocate the task files in the task file set to the at least two independent serial timed subtasks based on the number of task files for each serial timed subtask and the computing resources occupied by each task file set until the task file set is fully allocated, thereby obtaining at least two candidate task file subsets for each serial timed subtask. The second optimization module is used to determine the subset of candidate task files that occupies the least computing resources among the subset of candidate task files that execute each serial timed subtask in parallel, and then use that subset as the target task file subset for each serial timed subtask.

11. The apparatus according to claim 10, characterized in that, The device further includes: The second traversal module is used to traverse the task files sequentially based on the computing resources occupied, and each time select the task file with the least computing resources to be assigned as the task file to be assigned. The task combination module is further configured to allocate the task file to be allocated to any one of the at least two independent serial timed subtasks according to the number of task files for each serial timed subtask, until the task file set is completely allocated, thereby obtaining at least two candidate task file subsets for each serial timed subtask.

12. The apparatus according to claim 8, characterized in that, The device further includes: The resource density value determination module is used to obtain the execution time and computing resources required for each task file in the task file set. The resource density value is determined based on the execution duration and computing resources occupied by each task file; The task combination module is further configured to allocate the task files in the task file set to the at least two independent serial timed subtasks based on the number of task files for each serial timed subtask and the resource density values, until all task files are allocated, thereby obtaining at least two candidate task file subsets for each serial timed subtask. The third optimization module is used to determine the candidate task file subset with the highest resource density among the candidate task file subsets that execute each serial timed subtask in parallel, as the target task file subset corresponding to each serial timed subtask.

13. The apparatus according to claim 12, characterized in that, The device further includes: The third traversal module is used to traverse the task files in the task file set sequentially based on the resource density value, and select the task file to be assigned with the largest resource density value each time. The task combination module is further configured to allocate the task file to be allocated to any one of the at least two independent serial timed subtasks according to the number of task files for each serial timed subtask, until all task files are allocated, thereby obtaining at least two candidate task file subsets for each serial timed subtask.

14. The apparatus according to any one of claims 8 to 13, characterized in that, The task splitting module is also used to obtain the actual duration required to execute the serial timed task; Based on the time consumption of each task file, the size of the task file, the timeliness parameter, and the actual duration in the performance parameters, the serial timed task is split into at least two independent serial timed subtasks.

15. 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, it implements the steps of the method according to any one of claims 1 to 7.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

17. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Task splitting method and system

    CN105117283A

  • Task scheduling file generation method and device and storage medium

    CN112035230A

  • Parallel Search in Program Synthesis

    US20190332704A1