A method and system for generating tasks with sequence and priority based on a process

By generating task methods with sequence and priority through a process, tasks are broken down into the smallest units, allowing executors to focus on their own efficiency. Subsequent tasks are executed after the preceding tasks are completed, and urgent tasks are handled first. This solves the problems of resource waste and inefficiency caused by centralized task processing, and achieves resource sharing and priority execution of urgent tasks.

CN115878320BActive Publication Date: 2026-06-12SHANGHAI DATATOM INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI DATATOM INFORMATION TECH CO LTD
Filing Date
2022-12-13
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

In existing task distribution systems, centralized task processing leads to resource waste, tasks are blocked while waiting for subtasks to complete, repeated processing results in low efficiency, urgent tasks cannot be inserted for priority execution, and resource utilization is low.

Method used

By generating task methods with sequence and priority through processes, tasks are broken down into the smallest units, allowing executors to focus on their own efficiency. Subsequent tasks are executed after the preceding tasks are completed, and urgent tasks are handled first, thus achieving resource sharing and task order management.

Benefits of technology

It improved task processing efficiency, reduced resource waste, prioritized urgent tasks, and enhanced resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115878320B_ABST
    Figure CN115878320B_ABST
Patent Text Reader

Abstract

The application discloses a kind of method and system for generating task with sequence and priority based on process, method: step 1 obtains request data and processes to obtain process data and matching data, according to the trigger condition of all strategies in process data matching data matching;Step 2 generates task according to strategy trigger, according to the sequence between strategies in process data, the task state of task is set according to pause information;Step 3 sets task two by two, the former is front task, the latter is post task, and the front task of the same type is sorted according to priority;Step 4 determines whether the front task is paused according to the task state, if paused, execute step 1, if not paused, execute task and generate first feedback data;Step 5 sorts the post task of the same type according to priority;Step 6 determines whether the post task is paused according to the task state, if paused, execute step 1, if not paused, execute task and generate second feedback data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of task generation methods and systems, and more specifically to a method and system for generating tasks with sequence and priority based on a process. Background Technology

[0002] Traditional task scheduling systems support single task processing, which can put the processing of files or events into the same task and distribute it to the executor for processing. Due to the concentration of tasks, when some subtasks need time to process or require additional information, other tasks may be blocked while waiting for the subtasks to complete. Or, if the additional information required by similar tasks is the same, but needs to be processed multiple times, it will lead to inefficiency and waste of resources.

[0003] Current task distribution and processing systems define the entire process of processing corresponding files or events. However, during processing, they cannot determine whether the executor has available resources based on the intermediate state of the task, resulting in low resource utilization. Tasks cannot share resources; during task execution, additional information cannot be obtained from completed tasks by other executors, requiring repeated execution of preceding tasks to gather information before executing subsequent tasks, leading to redundant execution and resource waste. If an unexpected situation occurs during task execution causing it to fail, re-execution requires starting from the beginning, preventing retries and resulting in significant resource consumption. Furthermore, urgent tasks cannot be inserted or ordinary tasks cannot be changed to urgent tasks for priority execution. Tasks are executed in the order they are created, which fails to meet the needs of scenarios requiring priority processing of certain tasks. Summary of the Invention

[0004] The technical problem this invention aims to solve is that existing task distribution systems, with centralized task processing, suffer from resource waste due to other tasks being blocked while waiting for subtasks to complete; multiple task types requiring consistent additional information often result in repeated processing, leading to inefficiency and resource waste; and the inability to insert urgent tasks by executing tasks sequentially based on task creation time. This invention provides a process-based method for generating tasks with order and priority, and also provides a process-based system for generating tasks with order and priority. This system manages the processing flow and sequence, breaks down tasks into their smallest units, and assigns specific executors to each task type. Each executor focusing on a subtask only needs to concentrate on its own efficiency, preventing a large number of tasks from accumulating while executors remain idle. By defining a strategy order through the process, the order of tasks is determined. Once a preceding task is completed, multiple subsequent tasks can be executed. The additional information required for consistency across multiple similar tasks can be reused after a single execution, significantly improving efficiency. Furthermore, prioritizing urgent tasks addresses the shortcomings of existing technologies.

[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solutions:

[0006] Firstly, a method for generating tasks with sequence and priority based on a process includes the following steps:

[0007] Step 1: Obtain request data and process it to obtain process data and matching data in the request data. Match the triggering conditions of all strategies in the process data according to the matching data, and determine whether the triggering conditions can trigger the strategy.

[0008] Step 2: Trigger the generation of tasks by the strategy, sort the tasks according to the order of the strategies in the process data, set the task status of the tasks according to the pause information in the request data, and record it in the task management data;

[0009] Step 3: Based on the sorted tasks, set them in pairs, with the former being the preceding task and the latter the following task. Sort the preceding tasks of the same type according to priority by recording time and put them into a queue.

[0010] Step 4: Determine whether the preceding task is paused based on the task status. If paused, proceed to step 1. If not paused, distribute the preceding task to the task execution data through the task management data for task execution, generate first feedback data to be transmitted to the task management data, and then process the following task.

[0011] Step 5: Sort the subsequent tasks of the same type according to priority by recording time, and put them into a queue state;

[0012] Step 6: Determine whether the subsequent task is paused based on the task status. If paused, proceed to step 1. If not paused, distribute the subsequent task to the task execution data through the task management data for task execution, and generate second feedback data to be transmitted to the task management data.

[0013] The above-mentioned method for generating tasks with sequence and priority based on a process, wherein in step 1, the request data further includes a specified priority;

[0014] The process data contains multiple strategies, and each strategy includes the triggering condition, default priority, and task processing method.

[0015] The requested data is a file, and the matching data includes the file size, file type, and file storage location;

[0016] In step 2, the strategy is triggered by the triggering parameters to generate the task. The task contains task parameters that are transformed by the triggering parameters, which are recorded in the request data.

[0017] In step 3, the pre-tasks are sorted by the recorded time according to the specified priority and the default priority.

[0018] In step 4, the pre-task is distributed to the task execution data through the task management data and the task is executed according to the task processing method. The first feedback data includes success, failure, and execution.

[0019] In step 5, the subsequent tasks are sorted by the recorded time according to the specified priority and the default priority.

[0020] In step 6, the post-task is distributed to the task execution data through the task management data and executed according to the task processing method. The second feedback data includes success, failure, and execution.

[0021] The above-mentioned method for generating tasks with sequence and priority based on a process includes, wherein the triggering conditions include the file size, the file type, the file storage location, the storage node, and the triggering time.

[0022] The triggering timing is an action; when the action is matched, the triggering timing is matched, including upload completed, upload started, and download started.

[0023] The task parameters include strategy configuration generation data, data attached when the strategy is triggered, and the processing results of completing the preceding tasks.

[0024] The above-mentioned method for generating tasks with sequence and priority based on a process includes a pre-strategy and a post-strategy, wherein the post-strategy depends on the pre-strategy.

[0025] In step 2, the pre-strategy is triggered to generate the task, and after the task is completed and successful, the post-strategy is triggered to generate the task.

[0026] The above-mentioned method for generating tasks with sequence and priority based on a process, wherein the strategies in the process data and the order between the strategies change according to different scenarios.

[0027] The above-described method for generating tasks with sequence and priority based on a process is described in that only one task is executed during task execution.

[0028] The above-described method for generating tasks with sequence and priority based on a process includes a method for changing the execution order of tasks by modifying the priority during the queuing process.

[0029] The above-mentioned method for generating tasks with sequence and priority based on a process includes a task management data containing task management nodes, a task manager node containing process management data and strategy management data, and a task manager node used to record strategy information and process information, match all strategies in the process when the process is triggered, record the tasks generated by the strategy, and send the tasks to the task execution data.

[0030] The task execution data includes multiple task executor nodes. Each task execution node includes task acquisition, task feedback, and heartbeat feedback. The task execution node is used to execute tasks. After acquiring a task, it parses the task information, processes the task according to the task configuration, provides feedback on the task processing progress during the task processing, provides feedback on the task processing result after the task processing is completed, and provides feedback on the executor's vital signs and heartbeat information during the operation.

[0031] Secondly, a task system based on process generation with sequence and priority is provided, which includes a data processing module, a task processing module, a task manager module, and a task executor module.

[0032] The data processing module is used to acquire request data, process the process data and matching data in the request data, match the triggering conditions of all strategies in the process data according to the matching data, and determine whether the triggering conditions can trigger the strategy.

[0033] The task generation module is used to trigger the generation of tasks by the strategy, sort the tasks according to the order of the strategies in the process data, set the task status of the tasks according to the pause information in the request data, and record it in the task management data; it is also used to set the tasks in pairs according to the sorted tasks, with the former being a pre-task and the latter a post-task, and sort the pre-tasks of the same type according to priority by recording time, and put them into a queuing state; it is also used to determine whether the pre-task is paused according to the task status, if it is paused, then execute step 1, if it is not paused, then distribute the pre-task to the task execution data through the task management data for task execution, and generate first feedback data transmitted to the task management data, and then process the post-task; it is also used to sort the post-tasks of the same type according to priority by recording time, and put them into a queuing state; it is also used to determine whether the post-task is paused according to the task status, if it is paused, then execute step 1, if it is not paused, then distribute the post-task to the task execution data through the task management data for task execution, and generate second feedback data transmitted to the task management data;

[0034] The task manager module is used to store the task management data;

[0035] The task executor module is used to store the task execution data and allow the executor to view it.

[0036] Thirdly, a chip comprising: a processor for retrieving and running a computer program from a memory, causing a device having the chip mounted to perform: the method as described in any one of the first aspects.

[0037] The technical solution provided by the present invention, a method and system for generating tasks with sequence and priority based on a process, has the following technical effects:

[0038] By leveraging the characteristics of processes and strategies, we can match the task processing flow to the required scenarios, implement process-based task scheduling control through the sequence and start / stop of tasks, and implement task priority control through the priority function, so as to set up the task processing process more intelligently and save computing resources. Attached Figure Description

[0039] Figure 1 This invention provides a flowchart of a method for generating tasks with sequence and priority based on a process.

[0040] Figure 2 This is a flowchart illustrating a method for task scheduling based on process generation with sequential and priority parameters, according to the present invention. Detailed Implementation

[0041] In order to make the technical means, inventive features, objectives and effects of the invention easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to specific illustrations. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.

[0042] Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0043] It should be noted that the structures, proportions, sizes, etc., illustrated in the accompanying drawings of this specification are only used to complement the content disclosed in the specification for those skilled in the art to understand and read, and are not intended to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and objectives that the present invention can produce, should still fall within the scope of the technical content disclosed in the present invention.

[0044] Furthermore, the terms such as "upper," "lower," "left," "right," "middle," and "one" used in this specification are merely for clarity of description and are not intended to limit the scope of the invention. Any changes or adjustments to their relative relationships, without substantially altering the technical content, should also be considered within the scope of the invention.

[0045] The first embodiment of the present invention provides a method for generating tasks with sequence and priority based on a process, and the second embodiment provides a system for generating tasks with sequence and priority based on a process. The purpose is to utilize the characteristics of processes and strategies to match the task processing flow under the demand scenario, realize process-based task scheduling control through the order of tasks and task start and stop, realize task priority control through the priority function, and set up the task processing process more intelligently, saving computing resources.

[0046] like Figure 1 As shown, in the first aspect, a method for generating tasks with sequence and priority based on a process includes the following steps:

[0047] Step 1: Obtain request data and process it to obtain process data and matching data in the request data. Match the triggering conditions of all strategies in the process data according to the matching data, and determine whether the triggering conditions can trigger the strategy.

[0048] Step 2: Trigger the generation of tasks by the strategy, sort the tasks according to the order of the strategies in the process data, set the task status of the tasks according to the pause information in the request data, and record it in the task management data. The same strategy triggers the generation of the same task.

[0049] Tasks with pause information are in a paused state. The task will not be distributed to the executor for processing. It waits for further request data from the client. Based on the subsequent request data from the client, the paused task will be distributed to the executor for processing (which can be viewed by the executor through the task execution data). The executor processes the task and returns the task result to the task manager (which can be viewed by the task manager through the task management data).

[0050] Step 3: Based on the sorted tasks, set them in pairs, with the former being the preceding task and the latter the following task. Sort the preceding tasks of the same type according to priority by recording time and put them into a queue state, prioritizing the distribution of tasks with higher priority and earlier recording time.

[0051] Step 4: Determine whether the preceding task is paused based on the task status. If paused (pausing means skipping the task when distributing it), proceed to step 1 to obtain new request data. If not paused, distribute the preceding task to the task execution data through the task management data for task execution, generate first feedback data to be transmitted to the task management data, and then process the following task.

[0052] Step 5: Sort the subsequent tasks of the same type according to priority by recording time, and put them into a queue state;

[0053] Step 6: Determine whether the subsequent task is paused based on the task status. If paused, proceed to step 1. If not paused, distribute the subsequent task to the task execution data through the task management data for task execution, and generate second feedback data to be transmitted to the task management data.

[0054] Pre-tasks and post-tasks are defined as follows: In a process, strategy A depends on strategy B. Under this process, if strategy A and strategy B are successfully triggered, tasks a and b are generated respectively. After task b succeeds, task a is executed. At this time, task a is a post-task relative to task b, and task b is a pre-task relative to task a. Processing pre-tasks means processing pre-tasks first according to the task dependency order. After a pre-task succeeds, its post-tasks are processed.

[0055] The above-mentioned method for generating tasks with sequence and priority based on a process, wherein in step 1, the request data further includes a specified priority;

[0056] The process data contains multiple strategies, and each strategy includes the triggering condition, default priority, and task processing method.

[0057] The requested data is a file, and the matching data includes the file size, file type, and file storage location;

[0058] In step 2, the strategy is triggered by the triggering parameters to generate the task. The task contains task parameters that are transformed by the triggering parameters, which are recorded in the request data.

[0059] In step 3, the pre-tasks are sorted by the recorded time according to the specified priority and the default priority.

[0060] In step 4, the pre-task is distributed to the task execution data through the task management data and the task is executed according to the task processing method. The first feedback data includes success, failure, and execution.

[0061] In step 5, the subsequent tasks are sorted by the recorded time according to the specified priority and the default priority.

[0062] In step 6, the post-task is distributed to the task execution data through the task management data and executed according to the task processing method. The second feedback data includes success, failure, and execution.

[0063] The above-mentioned method for generating tasks with sequence and priority based on a process includes, wherein the triggering conditions include the file size, the file type, the file storage location, the storage node, and the triggering time.

[0064] The triggering timing is an action; when the action is matched, the triggering timing is matched, including upload completed, upload started, and download started.

[0065] The task parameters include strategy configuration generation data, data attached when the strategy is triggered, and the processing results of completing the preceding tasks.

[0066] The above-mentioned method for generating tasks with sequence and priority based on a process includes a pre-strategy and a post-strategy. The post-strategy depends on the pre-strategy. When the pre-strategy generates the corresponding task, and the task is completed and successful, the post-strategy generates the corresponding task. This means that the post-strategy's corresponding post-task depends on the pre-strategy's corresponding pre-task.

[0067] In step 2, the pre-strategy is triggered to generate the task, and after the task is completed and successful, the post-strategy is triggered to generate the task.

[0068] The above-described method for generating tasks with sequence and priority based on a process involves the strategy and the order of the strategy in the process data changing according to different scenarios. The strategy and order in the process data are configured with multiple processes for different scenarios and file types. In the corresponding scenario, the corresponding process is used. After specifying the corresponding process, all strategies in the process will be adapted. When the triggering condition of the strategy is met, the strategy is triggered to generate a task. If the task has no prerequisite tasks, it is handed over to the executor for processing. If the task has prerequisite tasks, it waits for the executor to process the prerequisite tasks. If the prerequisite tasks are successful, the task is handed over to the executor for processing.

[0069] The above-mentioned process-based method for generating tasks with sequence and priority is characterized by the following: only one task is executed at a time. When an executor is executing a task, that task will not be acquired and executed by other executors. Other executors will acquire the next task and execute it. During the execution process, the executor will actively report its physical condition. After the task is completed, the executor will report the task result. When the task is successful, the system will send the subsequent tasks of the task to the executor for processing according to the strategy sequence defined in the process.

[0070] The above-described method for generating tasks with sequence and priority based on a process includes a queue state where the execution order of tasks is changed by modifying the priority. The task priority can be defined by a strategy or at the time of triggering. When the strategy is triggered to generate a task, the system distributes and processes the task according to the task priority and the task triggering time. Tasks with higher priority are sent to the executor first. When the priorities are the same, the task generated earlier is sent to the executor first. The strategy includes a default priority. When the process is triggered, a priority can be specified. When a priority is specified, the specified priority is used. When no priority is specified, the default priority is used. The priority is suitable for scenarios where tasks need to be completed first.

[0071] The priority can be modified during the task queuing process, raising the priority of certain tasks so that they can be executed first; the priority level can be divided into 255 levels, from 0 to 254, with higher levels indicating higher priority.

[0072] The above-mentioned method for generating tasks with sequence and priority based on a process includes a task management data containing task management nodes, a task manager node containing process management data and strategy management data, and a task manager node used to record strategy information and process information, match all strategies in the process when the process is triggered, record the tasks generated by the strategy, and send the tasks to the task execution data.

[0073] The task execution data includes multiple task executor nodes. Each task execution node includes task acquisition, task feedback, and heartbeat feedback. The task execution node is used to execute tasks. After acquiring a task, it parses the task information, processes the task according to the task configuration, provides feedback on the task processing progress during the task processing, provides feedback on the task processing result after the task processing is completed, and provides feedback on the executor's vital signs and heartbeat information during the operation.

[0074] Different task executor nodes execute different types of tasks. Task executor 001, task executor 002, and task executor 003 execute only task a, task b, and task c, respectively.

[0075] The task manager is used to record processes, strategies contained in the process, and the order between strategies. When a task is processed in a specified process, the matching strategy A is used to generate the corresponding task a and the task a is sent to the task executor 001.

[0076] Task executor 001 is used to acquire task a and execute task a. During execution, it returns the task progress and result of task a to the task manager. During operation, task executor 001 returns its own running status to the task manager.

[0077] During the operation, the task manager records the task execution progress and final status, and records the running status of the task executor. When the task is successfully executed, the manager obtains the follow-up task c of task b according to the strategy sequence defined in the process, and sends the follow-up task c to the task executor 003.

[0078] The above-mentioned process-based task generation system has sequential and priority functions, wherein the processes and strategies in the task manager support full customization;

[0079] During the task manager's operation, strategies can be freely defined, including strategy triggering conditions and task execution details. Strategy triggering conditions include file type, size, storage location, storage node, and trigger timing. Trigger timing is an action; when a business logic operation matches this action, the trigger timing is matched. Examples include upload complete, upload started, and download started. Task execution details are the task parameters generated when the task is created, including file storage location, execution parameters, location of generated derivative files, and task type. During the task manager's operation, processes can be freely defined. These processes contain the strategies to be matched and the dependencies between these strategies. Process f contains strategy A, strategy B, and strategy C, where strategy C depends on strategy B; that is, strategy B is a prerequisite strategy for strategy C, and strategy C is a follow-up strategy of strategy B.

[0080] During the task manager's operation, corresponding processes can be used according to business workflows. Under a certain business logic, process f is required. Based on the current business conditions, such as the file type, size, storage location, storage node, and timing of the business, it is determined whether strategies A, B, and C in process f are triggered. Tasks a, b, and c are generated according to the task execution details in the strategies. Tasks a and b have no prerequisite tasks. The task manager selects the highest priority task for execution based on task priority and determines whether tasks a and b need to be paused based on business conditions. When tasks a and b are both executed first and are not paused, tasks a and b will be assigned to task executors 001 and 002 respectively.

[0081] The above-mentioned process-based task generation system has sequence and priority, in which task executors are used to execute tasks of a specific type.

[0082] Task executor 001 executes task a, and task executor 002 executes task b. After obtaining the task details, they parse the specific parameters of the task. The task details include the parameters configured in the strategy, business logic parameters, and the result parameters of the preceding tasks. The task executors execute the tasks according to the configuration content in the parameters.

[0083] The parameters configured in the strategy can be used to obtain task processing parameters, file storage location, and derivative file storage location. After the derivative files are generated, the location where the derivative files need to be stored needs to be determined.

[0084] The parameters of the business logic can specify different task parameters for each different business logic, thus defining the characteristics of task execution.

[0085] The parameters of the result of the preceding task are applicable to the subsequent task c. When executing the subsequent task c, the execution result of task b can be obtained through the task parameters. The execution result of task b can be used to obtain the result of the preceding task under task dependency.

[0086] During the execution of the task, the task executor will report the task progress and results to the task manager. The task manager will determine the successor of task b based on the result of task b returned by task executor 002. When task b is successfully completed, the task manager will use the result of task b as the result parameter of the successor of task c and assign task c to task executor 003 for execution.

[0087] During operation, the task executor reports its status to the task manager via heartbeats. The task manager uses the task executor's heartbeats to determine its running status. When the task executor is running normally and there are no tasks currently being executed, the corresponding task will be issued to the task executor in the process.

[0088] The entire process of this invention, which provides a method for generating tasks with sequence and priority based on a workflow, is as follows:

[0089] The business system creates corresponding strategies within the process based on business needs. Each strategy includes strategy triggering conditions and task execution details. Strategy triggering conditions include file type, size, storage location, storage node, and trigger timing. Trigger timing is an action; when a business logic operation matches this action, the trigger timing is matched. Examples include upload complete, upload started, and download started. Task execution details are the task parameters generated when the task is created, including file storage location, task execution parameters, storage location of generated derivative files, and task type.

[0090] A set of strategies is formed into a process, which contains specific strategies and the sequential dependencies between strategies, serving as the execution order of tasks.

[0091] Under specific events, a corresponding process is designated to trigger a strategy. In the task manager, the strategy for the matching process is determined by the strategy's trigger conditions, including the corresponding file type, file size within the matching range, file storage location within the corresponding location, file storage node within the corresponding node, and the strategy triggering timing being the execution event and timing under the current business logic. The task manager generates corresponding tasks based on the matched strategies. By obtaining the sequence of these strategies, it determines whether the tasks have a sequential order. If tasks A and B have no prerequisite tasks, they can be executed directly.

[0092] When there are many tasks and a backlog exists, when the task manager needs to assign tasks to designated workers, the task priority is determined first. This priority is determined by the priority attached to the task trigger. If the trigger does not include a priority, the default priority in the strategy is used. Priorities are sorted in ascending order, with higher-priority tasks being selected and sent to their respective task executors. For example, task A is sent to task executor 001, and task B is sent to task executor 002. When tasks have the same priority, the trigger time is used; the earlier the task is triggered, the earlier it is executed, following a first-triggered-first-processing approach.

[0093] After determining the task order, the task manager needs to decide whether a task should be paused. In the business logic, some tasks may be executed within the process. These tasks need to be paused during execution, and only resumed after other business logic is satisfied, returning to the logic for execution by the task executor. During the process, the pause status of tasks can be adjusted based on the triggering command. When a task is paused, it is in a pending activation state; otherwise, it is pushed to the task executor for processing.

[0094] Task executor 001 obtains task a, and task executor 002 obtains task b. The task executors begin to execute the tasks. During the execution of the tasks, the task executors report the task execution progress. After the task is completed, the task executors report the task result, and the task manager obtains the task execution status.

[0095] During operation, task executors 001, 002, and 003 send their own running status information to the task manager at regular intervals via a heartbeat mechanism. This information includes the service running status, information on the tasks being processed, memory usage, CPU usage, network I / O data, disk I / O data, file handle data, and total task duration.

[0096] Service operation status, indicating whether the task executor is running normally and can receive information and process tasks normally;

[0097] Information on tasks being processed: The task currently being executed by the task executor. When the task executor is executing a task, this is the current task information. When the task executor is idle, this is the idle state, which can accept tasks for processing.

[0098] Memory usage refers to tasks that consume a lot of memory during operation, such as some Java program tasks. Available memory is an important parameter for judging whether the task executor is running well and whether it can handle more tasks.

[0099] CPU utilization, as a key indicator of task execution speed, is also an important factor affecting the computing performance of task execution nodes. When task execution nodes execute tasks, especially computational tasks that require CPU, CPU utilization directly affects the success or failure of task execution and task execution efficiency. The calculation of task weight values ​​for such tasks depends on CPU utilization.

[0100] Network I / O data is affected by factors such as server response latency, bandwidth limitations, network latency, routing latency, and local reception latency. For data transmission tasks, especially massive data transmission tasks, network I / O data is directly related to the execution efficiency of the task. When judging whether the task executor is running well and whether it can handle more tasks, network I / O data is an important parameter value.

[0101] Disk I / O data: In some business scenarios, tasks need to frequently access massive amounts of disk data. However, due to the limited hard drive read and write speed, the data transfer speed of the task execution node is fixed. In this case, disk I / O data will directly affect the execution efficiency of such tasks and is an important parameter for judging whether the task executor is running well and whether it can handle more tasks.

[0102] File handle data: Some tasks require the continuous creation of new file handles during execution due to business scenarios. If the scheduling system does not consider the handle factor, the execution result may be affected when the number of handles grows to a certain threshold. Therefore, the number of file handles needs to be used as a parameter to judge whether the executor of the task is running well and whether it can handle more tasks.

[0103] Total task duration data: For some non-incremental tasks, especially those that need to be executed repeatedly, the task execution duration is basically fixed. Combining the task execution duration with the task execution resource consumption is necessary to calculate the actual execution situation of the task. This is an important parameter for judging whether the task executor is running well and whether it can handle more tasks.

[0104] With this information, the task manager can determine the running status of the task executor, judge the running status and load of the task executor through various parameters, and further determine whether the task can be sent to the corresponding execution node for processing.

[0105] The task manager receives the result of task b from task executor 002, obtains the subsequent task c through task b, and can process the subsequent task c when the result of task b is successful. The task manager then checks whether task c is in a paused state. When task c can be executed, the task manager hands over task c to task executor 003 for processing.

[0106] Secondly, a task system based on process generation with sequence and priority is provided, which includes a data processing module, a task processing module, a task manager module, and a task executor module.

[0107] The data processing module is used to acquire request data, process the process data and matching data in the request data, match the triggering conditions of all strategies in the process data according to the matching data, and determine whether the triggering conditions can trigger the strategy.

[0108] The task generation module is used to trigger the generation of tasks by the strategy, sort the tasks according to the order of the strategies in the process data, set the task status of the tasks according to the pause information in the request data, and record it in the task management data; it is also used to set the tasks in pairs according to the sorted tasks, with the former being a pre-task and the latter a post-task, and sort the pre-tasks of the same type according to priority by recording time, and put them into a queuing state; it is also used to determine whether the pre-task is paused according to the task status, if it is paused, then execute step 1, if it is not paused, then distribute the pre-task to the task execution data through the task management data for task execution, and generate first feedback data transmitted to the task management data, and then process the post-task; it is also used to sort the post-tasks of the same type according to priority by recording time, and put them into a queuing state; it is also used to determine whether the post-task is paused according to the task status, if it is paused, then execute step 1, if it is not paused, then distribute the post-task to the task execution data through the task management data for task execution, and generate second feedback data transmitted to the task management data;

[0109] The task manager module is used to store the task management data;

[0110] The task executor module is used to store the task execution data and allow the executor to view it.

[0111] Thirdly, a chip comprising: a processor for retrieving and running a computer program from a memory, causing a device having the chip mounted to perform: the method as described in any one of the first aspects.

[0112] In summary, the present invention provides a process-based method and system for generating tasks with sequence and priority. This method and system can utilize the characteristics of processes and strategies to match the task processing flow under the required scenario. It achieves process-based task scheduling control through the order of tasks and task start / stop, and achieves task priority control through the priority function. This allows for more intelligent setting of the task processing process and saves computing resources.

[0113] The specific embodiments of the invention have been described above. It should be understood that the invention is not limited to the specific embodiments described above, and the devices and structures not described in detail should be understood to be implemented in a manner common to the art; those skilled in the art can make various modifications or alterations within the scope of the claims, and make several simple deductions, variations or substitutions, which do not affect the substantive content of the invention.

Claims

1. A method for generating tasks with sequence and priority based on a process, characterized in that, Includes the following steps: Step 1: Obtain request data and process it to obtain process data and matching data in the request data. Match the triggering conditions of all strategies in the process data according to the matching data, and determine whether the triggering conditions can trigger the strategy. Step 2: Trigger the generation of tasks by the strategy, sort the tasks according to the order of the strategies in the process data, set the task status of the tasks according to the pause information in the request data, and record it in the task management data; Step 3: Based on the sorted tasks, set them in pairs, with the former being the preceding task and the latter the following task. Sort the preceding tasks of the same type according to priority by recording time and put them into a queue. Step 4: Determine whether the preceding task is paused based on the task status. If paused, proceed to step 1. If not paused, distribute the preceding task to the task execution data through the task management data for task execution, generate first feedback data to be transmitted to the task management data, and then process the following task. Step 5: Sort the subsequent tasks of the same type according to priority by recording time, and put them into a queue state; Step 6: Determine whether the subsequent task is paused based on the task status. If paused, proceed to step 1. If not paused, distribute the subsequent task to the task execution data through the task management data for task execution, and generate second feedback data to be transmitted to the task management data. In step 1, the request data also includes a specified priority; The process data contains multiple strategies, and each strategy includes the triggering condition, default priority, and task processing method. The requested data is a file, and the matching data includes the file size, file type, and file storage location; In step 2, the strategy is triggered by the triggering parameters to generate the task. The task contains task parameters that are transformed by the triggering parameters, which are recorded in the request data. In step 3, the pre-tasks are sorted by the recorded time according to the specified priority and the default priority. In step 4, the pre-task is distributed to the task execution data through the task management data and the task is executed according to the task processing method. The first feedback data includes success, failure, and execution. In step 5, the subsequent tasks are sorted by the recorded time according to the specified priority and the default priority. In step 6, the post-task is distributed to the task execution data through the task management data and executed according to the task processing method. The second feedback data includes success, failure, and execution.

2. The method for generating tasks with sequence and priority based on a process, as described in claim 1, is characterized in that... The triggering conditions include the file size, the file type, the file storage location, the storage node, and the triggering time; The triggering timing is an action; when the action is matched, the triggering timing is matched, including upload completed, upload started, and download started. The task parameters include strategy configuration generation data, data attached when the strategy is triggered, and the processing results of completing the preceding tasks.

3. The method for generating tasks with sequence and priority based on a process, as described in claim 2, is characterized in that... The strategy includes a pre-strategy and a post-strategy, and the post-strategy depends on the pre-strategy; In step 2, the pre-strategy is triggered to generate the task, and after the task is completed and successful, the post-strategy is triggered to generate the task.

4. A method for generating tasks with sequence and priority based on a process, as described in any one of claims 1-3, characterized in that, The strategies and their order in the process data change depending on the scenario.

5. The method for generating tasks with sequence and priority based on a process, as described in claim 4, is characterized in that... Only one of the tasks mentioned above will be executed at a time.

6. The method for generating tasks with sequence and priority based on a process, as described in claim 5, is characterized in that... When in a queued state, the execution order of the tasks can be changed by modifying the priority.

7. The method for generating tasks with sequence and priority based on a process, as described in claim 6, is characterized in that... The task management data includes task management nodes. The task manager nodes include process management data and strategy management data. The task manager nodes are used to record strategy information and process information, match all strategies in the process when a process is triggered, record the tasks generated by the strategies, and send the tasks to the task execution data. The task execution data includes multiple task executor nodes. Each task execution node includes task acquisition, task feedback, and heartbeat feedback. The task execution node is used to execute tasks. After acquiring a task, it parses the task information, processes the task according to the task configuration, provides feedback on the task processing progress during the task processing, provides feedback on the task processing result after the task processing is completed, and provides feedback on the executor's vital signs and heartbeat information during the operation.

8. A process-based task generation system with sequence and priority, used to implement the process-based task generation method with sequence and priority as described in any one of claims 1-7, characterized in that, It includes a data processing module, a task processing module, a task manager module, and a task executor module; The data processing module is used to acquire request data, process the process data and matching data in the request data, match the triggering conditions of all strategies in the process data according to the matching data, and determine whether the triggering conditions can trigger the strategy. The task generation module is used to trigger the generation of tasks by the strategy, sort the tasks according to the order of the strategies in the process data, set the task status of the task according to the pause information in the request data, and record it in the task management data. It is also used to set up tasks in pairs according to the sorting, with the former being the preceding task and the latter being the following task. The preceding tasks of the same type are sorted by priority according to the recorded time and put into a queuing state. It is also used to determine whether the preceding task is paused based on the task status. If paused, step 1 is executed; if not paused, the preceding task is distributed to the task execution data through the task management data for task execution, and first feedback data is generated and transmitted to the task management data, followed by processing the subsequent task. It is also used to sort the subsequent tasks of the same type according to priority by recording time and put them into a queuing state. Furthermore, it is used to determine whether the subsequent task is paused based on the task status. If paused, step 1 is executed; if not paused, the subsequent task is distributed to the task execution data through the task management data for task execution, and second feedback data is generated and transmitted to the task management data. The task manager module is used to store the task management data; The task executor module is used to store the task execution data and allow the executor to view it.

9. A chip, characterized in that, Includes: a processor for retrieving and running a computer program from memory, causing a device on which the chip is mounted to perform: the method as described in any one of claims 1-7.