Intelligent command and data processing method based on workflow engine algorithm
Through the workflow engine algorithm and machine learning model, the flexibility and path optimization problems of the existing command and dispatch system are solved, and efficient task execution and resource utilization are achieved.
Patent Information
- Application Number
- CN202510620962.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-14
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2045-05-14
AI Technical Summary
The existing command and dispatch systems are not flexible enough in task scheduling and fixed priority lead to low resource utilization and insufficient task path optimization, making it difficult to meet the efficiency and flexibility requirements in complex scenarios.
The intelligent command and scheduling method based on the workflow engine algorithm is adopted, and task scheduling and resource utilization are optimized through the earliest deadline priority algorithm, dynamic resource allocation and dynamic planning path selection, combined with the decision tree model of machine learning.
It improves task execution efficiency, resource utilization rate and system adaptability, reduces task delays and resource waste, and improves emergency response speed and task completion rate.
Smart Images

Figure CN120542818A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent command, and in particular to an intelligent command based on a workflow engine algorithm and a data processing method thereof. Background Art
[0002] The field of intelligent command and dispatch technology focuses on how to model, analyze and optimize complex task processes through information technology, integrate various types of resource information, and use specific algorithm strategies to ensure that command and dispatch activities can be carried out accurately, quickly and orderly under multi-task, multi-resource and multi-constraint conditions, so as to meet the key needs of timeliness, accuracy and efficiency of command and dispatch in many industry scenarios such as police analysis and crackdown, emergency rescue, traffic and logistics allocation. Different from adjacent technical fields such as general information system management or simple data processing, it is a specific technical field specifically for the intelligent operation of command and dispatch processes.
[0003] In the field of intelligent command and dispatch technology, existing command and dispatch systems mostly adopt traditional task allocation and management models. However, these technical solutions have the following significant drawbacks:
[0004] Inflexible task scheduling: Existing command and dispatch systems often utilize a task scheduling approach based on fixed rules or simple sequences. Many systems allocate resources and execute tasks sequentially based on the order in which they arrive, lacking the ability to dynamically adjust. This approach fails to consider complex factors such as task urgency, execution time, and resource requirements. This can lead to delays in important and urgent tasks, impacting overall efficiency and timeliness. For example, in emergency rescue missions, if resource allocation is not timely, the optimal opportunity for rescue can be missed, resulting in serious consequences.
[0005] Fixed priorities and lack of flexibility: Other command and dispatch systems use a fixed-priority scheduling strategy, setting fixed priority levels for different types of tasks and executing them sequentially based on their priority. While this approach ensures the order in which tasks are executed to a certain extent, it also suffers from a lack of flexibility. Especially when task resources are limited, fixed-priority scheduling can lead to intense resource competition, causing some tasks to stall while waiting for resources, thereby reducing system responsiveness and overall efficiency. Resources cannot be dynamically adjusted based on actual conditions, resulting in low resource utilization and an inability to promptly meet the needs of high-priority tasks.
[0006] Insufficient task path optimization: When dealing with complex task flows, existing technologies often face the problem of being unable to effectively optimize the task execution path. Existing scheduling solutions are usually unable to cope with workflows with multiple task nodes and complex dependencies, and are unable to accurately calculate the optimal path from the start to the target. Whether from the perspective of shortest execution time or lowest cost, the final path cannot achieve the best results. Especially in scenarios involving multi-node dependencies (such as logistics distribution, production scheduling, etc.), traditional solutions often find it difficult to fully optimize the task path, resulting in waste of resources and inefficient task execution. Summary of the Invention
[0007] The purpose of the present invention is to provide an intelligent command and dispatch method based on a workflow engine algorithm, which improves task execution efficiency and resource utilization by optimizing task scheduling, resource allocation and path selection, and enhances the adaptability and flexibility of the system in complex scenarios.
[0008] The technical solution of the present invention is to provide an intelligent command and data processing method based on a workflow engine algorithm, the method comprising:
[0009] S1. Task reception and creation: The system receives task information, and the task management module automatically generates corresponding tasks based on the specific information of the task. The task management module submits the task to the workflow engine module for subsequent processing;
[0010] S2. Task Scheduling: The workflow engine module uses the earliest deadline first algorithm to schedule tasks and calculate the slack L of each task. i :
[0011] L i =D i -A i -C i ;
[0012] Among them, D i is the deadline of the task, A i is the arrival time of the task, C i is the execution time of the task; the workflow engine module prioritizes the task with the smallest slack for scheduling execution;
[0013] S3. Resource Allocation: The workflow engine module transmits the resource requirements of the task to the resource management module. The resource management module dynamically adjusts and intelligently selects appropriate resources for allocation based on the task priority, task type, and resource availability, optimizing resource utilization and avoiding resource conflicts.
[0014] S4. Workflow path selection and optimization: The workflow engine module constructs tasks as a directed acyclic graph and uses a dynamic programming algorithm to calculate the longest path of the task flow, thereby selecting the optimal execution path to ensure the minimum execution time or cost of the task. The specific formula for path calculation is:
[0015] d v =max(d u +w(u,v)),(u,v)∈E;
[0016] Among them, d v is the longest path length from the start node to the task node v, d u is the longest path length from the starting node to task node u, where task node u is the node between the starting point and task node v. w(u,v) is the weight of task node u to task node v, representing the execution time and resource consumption from task node u to task node v. E is the set of dependencies between task nodes.
[0017] S5. Task execution and monitoring: After resources are allocated, the task begins execution. The task management module monitors the progress of the task in real time. The monitoring and alarm module tracks the task execution status and issues alarm notifications in a timely manner.
[0018] S6. Data storage: The system selects an appropriate database based on the data type to store all task information, execution logs, resource allocation information, and task progress data;
[0019] S7. After the above-mentioned intelligent command and data processing methods have been implemented for a period of time, the system introduces a scheduling method based on machine learning to replace the earliest deadline priority algorithm in step S2 and continue to work. The new scheduling method combines historical task data to build a scheduling model, and predicts the urgency of the task by building a decision model, and dynamically adjusts the task execution order accordingly.
[0020] In any of the above technical solutions, further, step S7 specifically includes:
[0021] S71. Collect historical task data from the data storage module, including task arrival time, deadline, execution time, task type, resource consumption, actual completion time, task delay, and task slack; clean, remove outliers, and normalize the historical task data to construct a training sample dataset S in a unified format;
[0022] S72. Based on experience, set a task slack threshold L0, and label the samples in the training sample dataset S according to the task slack and whether it is delayed, forming three types of task data: Category 1, task slack L i >L0 and delay occurs; Category 2, task slack L i<L0 and there is a delay; Category 3, the task has no delay;
[0023] S73. Construct a C4.5 decision tree and introduce a weight factor α i Define the weighted entropy E of the dataset S mod (S) Optimize the standard C4.5 algorithm, the weighted entropy E mod (S) The expression is:
[0024]
[0025] Among them, the subscript i represents three types of data in the dataset, p i represents the proportion belonging to the i-th category in the dataset S, and the weight factor α1 > α2 > α3, giving higher weights to urgent and delayed tasks;
[0026] Next, the system uses the improved formula to calculate the information gain Gain mod (S, A) of each task attribute A:
[0027]
[0028] Among them, S v represents the subset when the value of the attribute A is v; then, by calculating the improved information gain rate of each attribute, the split information SplitInfo(A) is obtained:
[0029]
[0030] Finally, define the weighted information gain rate GainRatio mod (A) as:
[0031]
[0032] S74. The constructed decision tree model will evaluate the priority of newly received tasks in real time during the system scheduling phase, perform dynamic scheduling and sorting according to the task category output by the model, and allocate in combination with the available resource situation;
[0033] S75. The system regularly collects the execution data of newly generated tasks, updates the dataset S, and retrains the scheduling model based on the latest data.
[0034] In any of the above technical solutions, further, the task management module interacts with the system through the user interface module, providing functions such as task creation, submission, monitoring, and result query.
[0035] In any of the above technical solutions, further, the resource management module realizes the intelligent allocation of resources through the following logic:
[0036] Based on the requirements of the task, resources are allocated to high-priority tasks first; when resources are limited, available resources closest to the task execution location are allocated first; whether resources are allocated to the current task is determined based on the busy status of the resources.
[0037] In any of the above technical solutions, further, the monitoring and alarm module monitors the system's operating status in real time, including task execution status, resource usage and system performance indicators; once a task timeout, resource anomaly or other problems are detected, the system will promptly issue an alarm and provide an exception report to help administrators respond and handle the problem in a timely manner to ensure the smooth completion of the task.
[0038] In any of the above technical solutions, further, the data storage module ensures data security and efficient query through multiple storage strategies, and supports storage methods of relational databases, non-relational databases or distributed file systems.
[0039] In any of the above technical solutions, further, the data storage module records and traces the life cycle of each task, including detailed information on task creation, scheduling, resource allocation, and execution progress.
[0040] The beneficial effects of the present invention are:
[0041] The technical solution of this invention dynamically schedules tasks by introducing an earliest deadline first algorithm. The earliest deadline first algorithm prioritizes tasks with the least slack based on the time characteristics of the tasks (such as arrival time, deadline, etc.). This strategy breaks through the limitations of traditional fixed-priority scheduling and simple sequential scheduling, and can reasonably allocate resources according to actual task requirements, ensuring that urgent tasks are prioritized and avoiding task delays. For example, in emergency rescue scenarios, the system can dynamically adjust the execution order of tasks based on their urgency, ensuring that critical tasks such as the allocation of rescue supplies are not delayed.
[0042] In scenarios involving complex task flows, the present invention introduces a workflow path selection algorithm based on dynamic programming. This algorithm effectively solves the problem of difficult task path optimization in the prior art by modeling the task flow (i.e., constructing the task as a directed acyclic graph). The dynamic programming algorithm can calculate the longest path for task execution and optimize the task execution path from multiple dimensions such as execution time and cost to ensure that the task is completed in the best way, maximize resource utilization efficiency, and reduce resource waste in task execution. For example, in a logistics distribution scenario, the system can optimize distribution routes, reduce transportation time and cost, and improve logistics efficiency.
[0043] In a preferred implementation of the present invention, the system combines a workflow engine with a resource management module to intelligently allocate resources in real time based on task requirements and resource status. This not only optimizes resource utilization but also prevents idle and wasted resources. Through a precise resource allocation algorithm, the system dynamically adjusts resource allocation based on the real-time needs of tasks, ensuring that resources are always optimally utilized during task execution. This approach significantly improves task completion efficiency, particularly in large-scale, complex task scheduling scenarios.
[0044] In the preferred implementation of the present invention, the system introduces an improved C4.5 decision tree model based on weighted entropy, cleans, normalizes and weightedly classifies historical rescue mission data including task slack, delay signs, resource consumption, etc., and constructs a dynamic scheduling prediction model; when a new task arrives, its urgency is evaluated in real time and the scheduling priority is adjusted dynamically; and the model is automatically retrained by periodically collecting execution feedback to form a closed-loop self-learning and adaptive optimization, which greatly improves the emergency response speed, task punctuality and resource utilization efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The advantages of the above and additional aspects of the present invention will become apparent and readily understood from the following description of the embodiments with reference to the accompanying drawings, in which:
[0046] Figure 1 This is a block diagram of the overall architecture of intelligent command based on a workflow engine algorithm and a data processing method thereof according to an embodiment of the present invention;
[0047] Figure 2 This is a flowchart of a task scheduling algorithm based on earliest deadline priority and an intelligent command and data processing method based on a workflow engine algorithm according to an embodiment of the present invention;
[0048] Figure 3 The present invention is a schematic diagram of a workflow path selection algorithm based on dynamic programming of an intelligent command based on a workflow engine algorithm and a data processing method thereof according to an embodiment of the present invention. DETAILED DESCRIPTION
[0049] In order to more clearly understand the above-mentioned objects, features and advantages of the present invention, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present invention and the features therein can be combined with each other without conflict.
[0050] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the scope of protection of the present invention is not limited to the specific embodiments disclosed below.
[0051] like Figures 1 to 3 As shown, this embodiment provides an intelligent command and data processing method based on a workflow engine algorithm, the method comprising:
[0052] S1. Task Receiving and Creating: First, the system receives task information through the user interface module. The task management module automatically generates the corresponding task based on the task's specific information (such as its nature, execution time, and deadline). Task information includes, but is not limited to, the task's arrival time, execution time, task priority, and deadline. After a task is created, the task management module submits it to the workflow engine module for scheduling and processing. The workflow engine module schedules the task based on actual needs and passes the task information to other modules for subsequent processing.
[0053] S2. Task Scheduling: The task management module schedules tasks using the earliest deadline first (EDF) algorithm through the workflow engine module. The slack of each task L i The calculation formula is:
[0054] L i =D i -A i -C i ;
[0055] Among them, D i is the deadline of the task, A i is the arrival time of the task, C i is the task execution time; based on the above calculation results, the workflow engine module prioritizes the task with the smallest slack for execution. This scheduling strategy ensures that time-sensitive tasks are prioritized, thereby avoiding task delays and significantly improving the on-time completion rate, especially in time-critical mission scenarios such as emergency rescue.
[0056] S3. Resource Allocation: After task scheduling, the workflow engine module passes the task's resource requirements to the resource management module. The resource management module dynamically adjusts and allocates resources based on factors such as task priority, resource availability, and resource location. The resource management module implements intelligent resource allocation through the following logic:
[0057] Based on the requirements of the task, resources are allocated to high-priority tasks first. When resources are limited, available resources closest to the task execution location are allocated first. Whether resources are allocated to the current task is determined based on the resource status (such as idle, busy, or under maintenance).
[0058] Through the above methods, the system can maximize the efficiency of resource utilization, avoid resource waste and idleness, improve resource utilization and reduce operating costs.
[0059] S4. Workflow Path Selection and Optimization: For task flows involving multiple task nodes and dependencies, the workflow engine module constructs the tasks as a directed acyclic graph and uses a dynamic programming algorithm to calculate the optimal execution path for the task flow. The workflow path is selected based on the execution time and resource consumption of each task node. The specific path selection is calculated according to the following recursive formula to calculate the longest path:
[0060] d v =max(d u +w(u,v)),(u,v)∈E;
[0061] Among them, d v is the longest path length from the start node to the task node v, d u is the longest path length from the starting node to task node u, where task node u is the node between the starting point and task node v. w(u,v) is the weight of task node u to task node v, representing the execution time, resource consumption, and other metrics from task node u to task node v. E is the set of dependencies between task nodes.
[0062] S5. Task Execution and Monitoring: After resources are allocated, tasks begin execution. The task management module uses the monitoring system to track the task's progress in real time, including information such as task completion status, execution time, and resource consumption. During task execution, the system updates the task's execution status at predetermined intervals (e.g., every 10 minutes) and records the execution log.
[0063] The monitoring and alarm module monitors the system's operating status in real time, including task execution, resource usage, and system performance indicators. Once a task timeout, resource anomaly, or other problem is detected, the system will promptly issue an alarm and provide an exception report to help administrators respond and handle the problem in a timely manner to ensure the smooth completion of the task.
[0064] S6. Data Storage: All task information, execution logs, resource allocation information, task progress, and other data are stored in the data storage module. Depending on the data type, the system selects different database types (such as relational databases, non-relational databases, or distributed file systems) for storage to ensure data security, accessibility, and efficiency. The data storage module ensures that the system can record and trace the lifecycle of each task, including detailed information such as task creation, scheduling, resource allocation, and execution progress, providing a solid foundation for the system's subsequent task analysis and decision-making.
[0065] S7. After the above intelligent command and its data processing method have been running for a period of time, to further improve the rationality and intelligence of task scheduling, the system introduces a scheduling method based on machine learning to replace the EDF algorithm in step S2, constructs a scheduling model by combining historical task data, predicts the urgency of tasks through constructing a decision model, and dynamically adjusts the task execution order accordingly to achieve higher scheduling efficiency and system response capabilities. Specifically, it includes the following steps:
[0066] S71. Collect historical task data from the data storage module, including task arrival time, deadline, execution time, task type, resource consumption, actual completion time, task delay, and the slack of the task; clean, remove outliers, and normalize the historical task data, and construct it into a training sample data set S in a unified format.
[0067] S72. Set a task slack threshold L0 according to experience, and label the samples in the training sample data set S according to the task slack and whether there is a delay, forming three types of task data:
[0068] Category 1: Task slack L i > L0 and there is a delay.
[0069] Category 2: Task slack L i < L0 and there is a delay.
[0070] Category 3: The task has no delay.
[0071] S73. Construct a C4.5 decision tree, introduce a weight factor α i Define the weighted entropy E mod (S) to optimize the standard C4.5 algorithm, and the expression of the weighted entropy E mod (S) is:
[0072]
[0073] where the subscript i represents the three types of data in the data set, and p i represents the proportion belonging to the i-th category in the data set S, and the weight factors α1 > α2 > α3, giving higher weights to urgent and delayed tasks.
[0074] Next, the system uses the improved formula to calculate the information gain Gain mod (S, A) of each task attribute A:
[0075]
[0076] where S vrepresents the subset when the attribute A takes the value v; then, by calculating the improved information gain rate of each attribute, the split information SplitInfo(A) is obtained:
[0077]
[0078] Finally, the weighted information gain rate GainRatio is defined mod (A) is:
[0079]
[0080] The construction of this decision tree not only takes into account the distribution characteristics of the data, but also incorporates the urgency of delay consequences and slack into model training through weights, making the model more inclined to prioritize potentially high-risk tasks when making predictions.
[0081] S74. The constructed decision tree model will evaluate the priority of newly received tasks in real time during the system scheduling phase, dynamically schedule and sort the tasks according to the task categories output by the model, and allocate them based on the availability of resources.
[0082] For tasks predicted to have “low slack and prone to delay”, the system will significantly increase their scheduling priority to reduce the risk of delays in critical tasks.
[0083] S75. The system regularly collects newly generated task execution data, updates the data set S, and retrains the scheduling model based on the latest data.
[0084] In order to better illustrate the implementation of the present invention, the application of the present invention is specifically described below in conjunction with the urban emergency rescue command and dispatch scenario.
[0085] When a large-scale fire occurs in a city, the city's emergency command center needs to coordinate multiple departments and resources to quickly respond. In this case, the intelligent command and dispatch system based on the workflow engine algorithm of the present invention can achieve efficient task scheduling and resource allocation based on the urgency of the task and the availability of resources. The following is the specific implementation process:
[0086] S1. Task Receiving and Creating: When a citizen calls the police or reports a fire through other channels, command center staff enter the alarm information into the system through the user interface module. The task management module automatically generates the corresponding emergency rescue task. Task parameters include: fire type, fire location, estimated execution time (how long it will take to extinguish the fire), and deadline (taking into account the spread of the fire and the maximum potential damage).
[0087] S2. Task Scheduling: After generating the above tasks, the task management module submits the fire rescue tasks to the workflow engine module for scheduling. The workflow engine module uses the earliest deadline first algorithm to schedule the fire rescue tasks. The slack of each task L i is calculated as:
[0088] L i =D i -A i -C i ;
[0089] Among them, D i is the deadline of the task, A i is the arrival time of the task, C i is the execution time of the task; assuming that the deadline for the fire rescue task is 15:00, the task arrival time is 14:30, and the execution time is 30 minutes, the calculated slack is 0 minutes, which is very urgent. The workflow engine will prioritize the task to prevent the fire from spreading.
[0090] S3. Resource Allocation: After task scheduling, the workflow engine module communicates task requirements to the resource management module. The resource management module allocates resources based on task priority, resource availability, and geographic location. For example, it dispatches the nearest fire truck, allocates a sufficient number of firefighters and rescue equipment, and prioritizes specialized equipment based on the type of fire.
[0091] The resource management module intelligently allocates resources based on resource availability and task requirements. If a fire truck is currently performing another task or undergoing maintenance, the system automatically selects another available fire truck for task dispatch.
[0092] S4. Workflow Path Selection and Optimization: When handling multiple tasks and dependencies, the workflow engine constructs tasks as a directed acyclic graph. For example, if a fire rescue task consists of multiple subtasks, such as assembling personnel, preparing equipment, and directing traffic, the workflow engine module calculates the optimal path using a dynamic programming algorithm.
[0093] For example, in a fire rescue mission, the starting node is "receiving a fire alarm," and subsequent mission nodes include "assembling firefighters," "dispatching fire trucks," and "traveling to the fire scene." Assuming the fire truck needs to pass through a congested road, the dynamic programming algorithm will adjust the optimal route based on traffic conditions, choosing the path that will reach the fire scene in the shortest time. The dynamic programming algorithm calculates the optimal path based on the following formula:
[0094] d v =max(d u +w(u,v)),(u,v)∈E;
[0095] Among them, d v is the longest path length from the start node to the task node v, d u is the longest path length from the starting node to task node u, where task node u is the node between the starting point and task node v, w(u,v) is the execution resource from task node u to task node v, where the execution resource is a time parameter, and E is the set of dependencies between task nodes.
[0096] S5. Task Execution and Monitoring: Once a task begins, the task management module monitors its progress in real time to ensure it is completed according to plan. The monitoring and alarm module monitors resource usage in real time, such as the remaining fuel in fire trucks and the consumption of firefighting equipment.
[0097] If a fire truck runs out of fuel during a rescue, the monitoring and alarm module will promptly issue an alarm. Based on the alarm, the system will request the resource management module to allocate additional fuel or a replacement fire truck to ensure the rescue mission is not affected.
[0098] S6. Data Storage: During task execution, all task information, execution logs, resource allocation, task progress, and other data are stored in the data storage module. The data storage module selects an appropriate database for storage based on the data type to ensure data security and query efficiency. Upon task completion, the system stores the task execution data in the database for subsequent analysis and evaluation, ensuring traceability throughout the task lifecycle.
[0099] S7. Scheduling optimization and model self-learning: When fire rescue tasks occur frequently or the system has been running for a period of time, the system automatically introduces a scheduling optimization module based on machine learning to replace the original EDF scheduling algorithm. This module extracts historical fire rescue task data (including task arrival time, deadline, execution time, resource usage, task completion status, delay, slack, etc.) from the data storage module and cleans and classifies the task data.
[0100] The system divides historical tasks into three categories according to "slackness" and "delay situation", and constructs a weighted C4.5 decision tree model, in which delayed and urgent tasks are given higher weights. Through indicators such as weighted entropy and improved information gain rate, the model learns the key attributes that affect the effect of task scheduling.
[0101] When new tasks arrive, the model can predict their urgency and dynamically adjust the scheduling priority accordingly.
[0102] The model is regularly updated and trained with new mission data, forming a closed-loop "task-execution-evaluation-optimization" mechanism, enabling self-optimization and continuous evolution of scheduling strategies, and further improving the efficiency of urban emergency response.
[0103] In summary, the present invention proposes an intelligent command and data processing method based on a workflow engine algorithm, including:
[0104] S1. Task reception and creation: The system receives task information, and the task management module automatically generates corresponding tasks based on the specific information of the task. The task management module submits the task to the workflow engine module for subsequent processing.
[0105] S2. Task Scheduling: The workflow engine module uses the earliest deadline first algorithm to schedule tasks and calculate the slack L of each task. i :
[0106] L i =D i -A i -C i ;
[0107] Among them, D i is the deadline of the task, A i is the arrival time of the task, C i is the execution time of the task; the workflow engine module gives priority to scheduling the task with the smallest slack.
[0108] S3. Resource allocation: The workflow engine module passes the resource requirements of the task to the resource management module. The resource management module dynamically adjusts and intelligently selects appropriate resources for allocation based on the task priority, task type and available status of resources, thereby optimizing resource utilization and avoiding resource conflicts.
[0109] S4. Workflow path selection and optimization: The workflow engine module constructs tasks as a directed acyclic graph and uses a dynamic programming algorithm to calculate the longest path of the task flow, thereby selecting the optimal execution path to ensure the minimum execution time or cost of the task. The specific formula for path calculation is:
[0110] d v =max(d u +w(u,v)),(u,v)∈E;
[0111] Among them, d v is the longest path length from the start node to the task node v, d u is the longest path length from the starting node to task node u, where task node u is the node between the starting point and task node v. w(u,v) is the weight of task node u to task node v, representing the execution time and resource consumption from task node u to task node v. E is the set of dependencies between task nodes.
[0112] S5. Task execution and monitoring: After resources are allocated, the task begins to be executed. The task management module monitors the execution progress of the task in real time. The monitoring and alarm module tracks the execution status of the task and issues alarm notifications in a timely manner.
[0113] S6. Data storage: The system selects a suitable database based on the data type to store all task information, execution logs, resource allocation information, and task progress data.
[0114] S7. After the above-mentioned intelligent command and data processing methods have been implemented for a period of time, the system introduces a scheduling method based on machine learning to replace the EDF algorithm in step S2. The new scheduling method combines historical task data to build a scheduling model, predicts the urgency of the task by building a decision model, and dynamically adjusts the task execution order accordingly.
[0115] The steps in the present invention can be adjusted in sequence, combined, or deleted according to actual needs.
[0116] The units in the device of the present invention can be combined, divided and deleted according to actual needs.
[0117] Although the present invention has been disclosed in detail with reference to the accompanying drawings, it should be understood that these descriptions are merely illustrative and are not intended to limit the application of the present invention. The scope of the present invention is defined by the appended claims and includes various modifications, variations, and equivalents made to the invention without departing from the scope and spirit of the present invention.
Claims
1. An intelligent command and data processing method based on workflow engine algorithm, characterized in that: The method comprises: S1. Task reception and creation: The system receives task information, and the task management module automatically generates corresponding tasks based on the specific information of the task. The task management module submits the task to the workflow engine module for subsequent processing; S2. Task Scheduling: The workflow engine module uses the earliest deadline first algorithm to schedule tasks and calculate the slack L of each task. i : L i =D i -A i -C i ; Among them, D i is the deadline of the task, A i is the arrival time of the task, C i is the execution time of the task; the workflow engine module prioritizes the task with the smallest slack for scheduling execution; S3. Resource Allocation: The workflow engine module transmits the resource requirements of the task to the resource management module. The resource management module dynamically adjusts and intelligently selects appropriate resources for allocation based on the task priority, task type, and resource availability, optimizing resource utilization and avoiding resource conflicts. S4. Workflow path selection and optimization: The workflow engine module constructs tasks as a directed acyclic graph and uses a dynamic programming algorithm to calculate the longest path of the task flow, thereby selecting the optimal execution path to ensure the minimum execution time or cost of the task. The specific formula for path calculation is: d v =max(d u +w(u,v)),(u,v)∈E; Among them, d v is the longest path length from the start node to the task node v, d u is the longest path length from the starting node to task node u, where task node u is the node between the starting point and task node v. w(u,v) is the weight of task node u to task node v, representing the execution time and resource consumption from task node u to task node v. E is the set of dependencies between task nodes. S5. Task execution and monitoring: After resources are allocated, the task begins execution. The task management module monitors the progress of the task in real time. The monitoring and alarm module tracks the task execution status and issues alarm notifications in a timely manner. S6. Data storage: The system selects an appropriate database based on the data type to store all task information, execution logs, resource allocation information, and task progress data; S7. After the above-mentioned intelligent command and data processing methods have been implemented for a period of time, the system introduces a scheduling method based on machine learning to replace the earliest deadline priority algorithm in step S2 and continue to work. The new scheduling method combines historical task data to build a scheduling model, and predicts the urgency of the task by building a decision model, and dynamically adjusts the task execution order accordingly.
2. The intelligent command and data processing method based on workflow engine algorithm according to claim 1, characterized in that: The step S7 specifically includes: S71. Collect historical task data from the data storage module, including task arrival time, deadline, execution time, task type, resource consumption, actual completion time, task delay, and task slack; clean, remove outliers, and normalize the historical task data to construct a training sample dataset S in a unified format; S72. Set the task slack threshold L0 according to experience, and label the samples in the training sample dataset S based on the task slack and whether there is a delay, forming three types of task data: Category 1, task slack L i > L0 and there is a delay; Category 2, task slack L i < L0 and there is a delay; Category 3, no delay occurs; S73. Build a C4.5 decision tree and introduce the weight factor α i Define the weighted entropy E of the data set S mod (S) Optimize the standard C4.5 algorithm and weighted entropy E mod (S) expression is: Among them, the subscript i represents the three types of data in the data set, p i It represents the proportion of the i-th category in the dataset S. The weight factors α1>α2>α3 give higher weights to urgent and delayed tasks. Next, the system uses the improved formula to calculate the information gain of each task attribute A. mod (S,A) is calculated: Among them, S v represents the subset when the attribute A takes the value v; then, by calculating the improved information gain rate of each attribute, the split information SplitInfo(A) is obtained: Finally, the weighted information gain rate GainRatio is defined mod (A) is: S74. The constructed decision tree model will evaluate the priority of newly received tasks in real time during the system scheduling phase, dynamically schedule and sort the tasks according to the task categories output by the model, and allocate them based on the availability of resources. S75. The system regularly collects newly generated task execution data, updates the data set S, and retrains the scheduling model based on the latest data.
3. The intelligent command and data processing method based on workflow engine algorithm according to claim 1, characterized in that: The task management module interacts with the system through the user interface module, providing task creation, submission, monitoring and result query functions.
4. The intelligent command and data processing method based on workflow engine algorithm according to claim 1, characterized in that: The resource management module implements intelligent resource allocation through the following logic: Based on the requirements of the task, resources are allocated to high-priority tasks first; when resources are limited, available resources closest to the task execution location are allocated first; whether resources are allocated to the current task is determined based on the busy status of the resources.
5. The intelligent command and data processing method based on workflow engine algorithm according to claim 1, characterized in that: The monitoring and alarm module monitors the system's operating status in real time, including task execution, resource usage, and system performance indicators. Once a task timeout, resource anomaly, or other problem is detected, the system will promptly issue an alarm and provide an exception report to help administrators respond and handle the problem in a timely manner to ensure the smooth completion of the task.
6. The intelligent command and data processing method based on workflow engine algorithm according to claim 1, characterized in that: The data storage module ensures data security and efficient query through a variety of storage strategies, and supports storage methods such as relational databases, non-relational databases, or distributed file systems.
7. The intelligent command and data processing method based on workflow engine algorithm according to claim 1, characterized in that: The data storage module records and traces the life cycle of each task, including detailed information on task creation, scheduling, resource allocation, and execution progress.
Citation Information
Patent Citations
Workflow scheduling method based on critical path task prospects
CN107301500A
Micro-service workflow scheduling method and device based on dynamic resource selection strategy
CN115033357A
Cited By
A language-driven intelligent workflow planning method and system
CN122672775A