Task scheduling method and system for intelligent unmanned airport scenario

By adopting a task scheduling method for intelligent drone scenarios, dynamic resource allocation using topology scanning, memory pool data queue pre-allocation, and feedback control is achieved, thus decoupling dynamic resource allocation and function scheduling of the drone system. This solves the problems of rigid resource allocation, high system coupling, and difficulty in ensuring real-time performance in existing technologies, and improves the system's reliability and real-time response capability.

CN121433920BActive Publication Date: 2026-04-21江淮前沿技术协同创新中心
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
江淮前沿技术协同创新中心
Filing Date
2025-12-31
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing UAV mission scheduling methods face challenges such as rigid resource allocation, high system coupling, insufficient fault tolerance, and difficulty in ensuring real-time performance, and cannot meet the needs of multi-functional cluster collaboration and dynamic adjustment.

Method used

We adopt a task scheduling method for intelligent drone scenarios. Through topology scanning, memory pool data queue pre-allocation, feedback control dynamic resource allocation, and algorithm encapsulation and hot replacement mechanism, we achieve decoupling of dynamic resource allocation and function scheduling, and support flexible hot replacement of algorithms.

Benefits of technology

It improves the reliability and real-time response capability of the UAV system, enhances resource utilization and system flexibility and maintainability, and ensures timely response to critical tasks and stable system operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121433920B_ABST
    Figure CN121433920B_ABST
Patent Text Reader

Abstract

This invention provides a task scheduling method and system for intelligent drone scenarios, comprising: parsing a predefined configuration file, constructing a node connection graph, and performing mandatory type matching checks on each connection between task nodes, followed by resource requirement pre-analysis; employing a memory pool-based data queue pre-allocation algorithm to achieve memory pre-allocation and data queue isolation; initializing a resource manager and incorporating a dynamic resource allocation algorithm based on feedback control; initializing functional nodes to decouple the algorithm from the functional scheduling center; and resource acquisition polling. This invention effectively solves the technical bottlenecks of reliability, real-time performance, and flexibility faced by existing technologies in complex dynamic scenarios through a series of collaborative technical means, achieving task scheduling adaptable to highly dynamic and multi-constraint environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to unmanned aerial vehicle (UAV) mission scheduling, and in particular to mission scheduling methods and systems for intelligent UAV scenarios. Background Technology

[0002] With the widespread application of unmanned aerial vehicle (UAV) technology in fields such as military reconnaissance, power line inspection, agricultural plant protection, and emergency rescue, UAV systems are evolving from single-function to multi-functional integration, and from single-unit operation to swarm collaboration. In this evolution, traditional task scheduling methods face severe challenges:

[0003] (1) Rigid resource allocation: Existing technologies mostly adopt fixed resource allocation strategies, which cannot dynamically adjust computing resources according to task priority and system load, resulting in delayed response of high-priority tasks or waste of resources for low-priority tasks.

[0004] (2) The system is too coupled: the algorithm module is tightly coupled with the function scheduling center. Algorithm updates or replacements require recompilation and deployment, which cannot meet the needs of UAVs to dynamically adjust algorithms during long-endurance missions.

[0005] (3) Insufficient fault tolerance: Task dependencies and data interfaces are usually verified at runtime. Configuration errors can easily lead to system crashes at runtime, posing a serious safety hazard to drones in flight.

[0006] (4) Difficulty in ensuring real-time performance: In multi-task parallel scenarios, there is a lack of effective priority scheduling mechanism, and critical tasks cannot be guaranteed to respond in a timely manner.

[0007] Therefore, there is an urgent need in this field for an intelligent UAV task scheduling solution that can achieve dynamic resource allocation within a single machine, has high reliability, and supports flexible hot replacement of algorithms. Summary of the Invention

[0008] The technical problem to be solved by this invention is how to realize a method and system for intelligent drone scenarios that can adapt to task scheduling in highly dynamic and multi-constraint environments.

[0009] This invention addresses the aforementioned technical problems using the following technical means: a task scheduling method for intelligent unmanned aerial vehicle (UAV) scenarios, comprising the following steps:

[0010] S1. Perform a topology scan, parse the predefined configuration file, build a node connection graph, perform a mandatory type matching check on each connection between task nodes, and then perform a pre-analysis of resource requirements.

[0011] S2. Initialize the data queue by using a memory pool-based data queue pre-allocation algorithm to achieve memory pre-allocation and data queue isolation.

[0012] S3. Initialize the resource manager, which includes handles holding all data queues and task nodes, as well as the built-in dynamic resource allocation algorithm based on feedback control.

[0013] S4. Initialize functional nodes. Functional nodes are a unified abstraction of all algorithm modules. Through algorithm encapsulation and hot replacement mechanism, the algorithm and functional scheduling center are decoupled.

[0014] S5. Resource Acquisition Polling: After initialization, during the stable operation phase, the resource acquisition polling mechanism continuously drives the entire task scheduling process.

[0015] As a further optimized technical solution, step S1 specifically includes:

[0016] Read and parse a structured configuration file that explicitly defines the unique identifiers and types of all task nodes, the number, names and data types of input and output ports for each task node, and the dependencies between task nodes;

[0017] Dependency acyclicity verification: Construct a node connection graph based on the parsed dependencies;

[0018] Port matching verification: Traverse all task nodes and perform a mandatory type matching check on every connection between task nodes;

[0019] Resource requirement pre-analysis: Based on the type and preset parameters of each task node in the configuration file, pre-calculate its initial resource requirements, assign different priorities to different types of task nodes, and estimate the initial memory usage of task nodes.

[0020] As a further optimized technical solution, based on the parsed dependencies, the specific process of constructing a node connection graph is as follows:

[0021] Acyclic verification is performed using the node state marking method. All task nodes are traversed and their states are initialized to "unvisited".

[0022] Starting from any "unvisited" task node, perform a depth-first traversal and temporarily mark its status as "visiting";

[0023] During the traversal, if a successor task node with a status of "accessing" is accessed, a circular dependency is determined, an error is immediately reported, and the startup is terminated. If the task node and all its successor task nodes have been traversed, its status is marked as "accessed".

[0024] Repeat the above process until all task nodes are marked as "visited" or a circular dependency is detected.

[0025] As a further optimized technical solution, step S2 specifically includes:

[0026] Memory pool initialization: Start a global memory pool, which is managed by the buddy system and pre-allocates a series of fixed-size memory blocks;

[0027] Data queue creation and memory allocation: Based on the resource requirement pre-analysis results in S1, create independent data queues for each input port and necessary output ports;

[0028] Control instruction queue: fixed size, managed separately;

[0029] Memory block allocation: Allocate the memory block closest to the computation size from the memory pool to the data queue;

[0030] Queue policy settings: Set scheduling policies for data queues with different priorities.

[0031] As a further optimized technical solution, step S3 specifically includes:

[0032] Monitor registration: The resource manager registers a deep monitor for each data queue and a latency monitor for each task node;

[0033] Feedback control initialization: Initialize a PID controller for the task node that requires dynamic tuning. The PID controller parameters are preset according to the task type.

[0034] Load balancing ready: Initialize the instance pool manager to prepare for dynamic scaling up or creating new algorithm node instances when overload is detected.

[0035] As a further optimized technical solution, the load balancing process continues, based on a dynamic resource allocation algorithm with feedback control, specifically as follows:

[0036] Data collection: Periodically collect the current actual queue depth d(t) and the processing latency (t) of each node;

[0037] PID Decision: For a task node, calculate the queue depth error e(t) = target_depth - d(t), and calculate the resource adjustment amount Δr(t) according to the formula Δr(t) = Kp×e(t) + Ki×∫e(t)dt + Kd×de(t) / dt, where target_depth is the current actual queue depth, d(t) is the current actual queue depth, Kp is the proportional gain, Ki is the integral gain, and Kd is the derivative gain;

[0038] Execution adjustment: If the resource adjustment amount Δr(t) is greater than the adjustment threshold, resource expansion is triggered. For stateless task nodes, new algorithm node instances are automatically created, and the input data is distributed to multiple algorithm node instances through the consistent hashing algorithm to achieve load balancing. If the resource adjustment amount Δr(t) is less than the adjustment threshold, resource reclamation is triggered.

[0039] As a further optimized technical solution, step S4 specifically includes:

[0040] Standard interface encapsulation: Each algorithm is encapsulated into five standard interfaces: create(), init(), process(), deinit(), and destroy(). The create() interface is used to create an algorithm node instance, the init() interface is used to initialize the algorithm, the process() interface is used to process the algorithm, the deinit() interface is used to deinitialize the algorithm, and the destroy() interface is used to destroy the algorithm node instance. The resource manager calls these interfaces uniformly through function pointers.

[0041] Resource-aware injection: During the create() and init() interface phases, the resource manager "injects" the handles to computational resources and input and / or output data queues into the algorithm node instance;

[0042] Hot-swap algorithm ready: The system reserves a hot-swap path based on dynamic link libraries. When an algorithm needs to be updated: the new algorithm library is loaded using the dlopen() interface; the standard interface function pointer of the new algorithm library is obtained using the dlsym() interface; a new algorithm node instance is created and initialized, while the input data stream is smoothly switched from the original algorithm node instance to the new algorithm node instance; after the original algorithm node instance has finished processing the current data, the deinit() and destroy() interfaces are called to destroy it.

[0043] Adaptive degradation logic: In the process() interface, the remaining CPU and / or GPU resources can be obtained by querying the resource manager in real time. When the resources are lower than the threshold, the internal degradation strategy is triggered.

[0044] As a further optimized technical solution, step S5 specifically includes:

[0045] Input node status check: Check the data readiness status of all input nodes in a loop according to the preset polling cycle;

[0046] For each input node, check its corresponding data queue status to determine whether new data has arrived or whether the data queue is close to full.

[0047] Priority-driven task triggering: Priorities are preset for different types of tasks. When multiple input nodes have data ready at the same time, they are processed according to the preset priority order.

[0048] Dynamic resource feedback adjustment: During the polling process, the queue depth and resource usage of each task node are continuously monitored. When it is found that the data queue of a certain task node is continuously backlogged, a feedback signal is immediately sent to the resource manager. Based on this feedback, the resource manager dynamically adjusts the allocation of system resources.

[0049] System status monitoring and logging: In each polling cycle, key performance indicators are recorded. When the processing latency of a certain task node is detected to continuously exceed the threshold, it is marked as a performance bottleneck node, and an alarm message is generated in the system log.

[0050] This invention also provides a task scheduling system for intelligent drone scenarios, comprising:

[0051] The resource acquisition module is used to perform topology scanning. It constructs a node connection graph by parsing a predefined configuration file, performs mandatory type matching checks on each connection between task nodes, and then performs pre-analysis of resource requirements.

[0052] The data queue module is used to perform data queue initialization. It adopts a memory pool-based data queue pre-allocation algorithm to achieve memory pre-allocation and data queue isolation.

[0053] The resource manager initialization module is used to initialize the resource manager, including handles that hold all data queues and task nodes, as well as a built-in dynamic resource allocation algorithm based on feedback control.

[0054] The function node initialization module is used to initialize function nodes. Function nodes are a unified abstraction of all algorithm modules. Through algorithm encapsulation and hot replacement mechanism, the algorithm and function scheduling center are decoupled.

[0055] The polling module is used for resource acquisition polling. After initialization, during the stable operation phase, it continuously drives the entire task scheduling operation through the resource acquisition polling mechanism.

[0056] As a further optimized technical solution, the resource acquisition module specifically includes:

[0057] The parsing unit is used to read and parse a structured configuration file, which explicitly defines the unique identifiers and types of all task nodes, the number, names and data types of input and output ports of each task node, and the dependencies between task nodes;

[0058] The dependency acyclic verification unit is used to construct a node connection graph based on the parsed dependencies;

[0059] The port matching verification unit is used to traverse all task nodes and perform a mandatory type matching check on every connection between task nodes.

[0060] The resource requirement pre-analysis unit is used to pre-calculate the initial resource requirements of each task node based on the type and preset parameters in the configuration file, assign different priorities to different types of task nodes, and estimate the initial memory usage of task nodes.

[0061] The execution process of each module in this task scheduling system for intelligent drone scenarios is the same as the task scheduling method for intelligent drone scenarios described above.

[0062] The advantages of this invention are as follows: This invention adopts a method of hierarchical decoupling of function scheduling and algorithms, uses topology configuration for dynamic system initialization, uses a memory pool-based queue pre-allocation algorithm and a feedback control dynamic resource allocation algorithm to realize data queue resource management, and uses algorithm encapsulation and hot replacement mechanism and adaptive degradation logic to realize the scheduling of functional nodes in the system. This method solves the technical problems of resource competition, task conflict and real-time guarantee faced by intelligent UAV systems in complex scenarios.

[0063] Compared with the prior art, the present invention has the following significant advantages:

[0064] 1. High reliability and robustness

[0065] Technical approach: Static topology verification at startup (including dependency loop-free checks and port type matching) replaces the traditional runtime dynamic discovery mechanism.

[0066] The technical problem solved: It fundamentally avoids runtime task chain breaks or system crashes caused by configuration errors, circular dependencies, or data type mismatches.

[0067] The technical effects achieved include: ensuring the initial stability and continuous operational reliability of the unmanned aerial vehicle (UAV) system in complex and highly dynamic mission scenarios, and reducing the risk of mission failure.

[0068] 2. Excellent real-time response capability

[0069] Technical means: Priority-based preemptive scheduling and microsecond-level configurable polling cycle are adopted, combined with data queue backlog monitoring and dynamic resource feedback adjustment mechanism.

[0070] Technical problem solved: It solved the response latency problem caused by resource contention when multiple tasks are running in parallel, ensuring extremely low latency for critical tasks (such as obstacle avoidance and control).

[0071] Technical results achieved: Hard real-time or soft real-time guarantee for task scheduling is achieved, meeting the stringent requirements of UAVs for immediate response in scenarios such as inspection and emergency rescue.

[0072] 3. Dynamically adaptive resource utilization

[0073] Technical approach: A dynamic resource allocation algorithm based on PID control principle is introduced to automatically adjust CPU / GPU resources, queue memory, and the number of task instances according to real-time indicators such as data queue depth.

[0074] Technical problem solved: Overcoming resource waste or performance bottlenecks caused by static resource allocation in scenarios with fluctuating loads.

[0075] The technical effect achieved is that the system resources can be "elastically scaled" according to the load, which greatly improves the utilization efficiency of limited onboard computing resources while ensuring performance.

[0076] 4. High flexibility and maintainability

[0077] Technical means: By decoupling function scheduling and algorithm layer by layer, the algorithm is encapsulated into a "functional node" with five standard interfaces, and supports hot replacement of the algorithm based on dynamic link library.

[0078] Technical problems solved: It solved the problem of high maintenance costs that require system shutdown and restart when replacing or upgrading algorithms in traditional systems.

[0079] Technical effects achieved: The algorithm module is "plug and play" and can be upgraded online without interruption. This allows the UAV to flexibly switch algorithm models during missions, greatly improving the system's adaptability and maintainability.

[0080] 5. Good scalability

[0081] Technical approach: Adopting configuration file-driven topology construction and a centralized resource manager.

[0082] Technical problems solved: The system's functionality was expanded, which resulted in significant code modifications and complex testing due to high module coupling.

[0083] Technical benefits achieved: Adding or modifying task nodes only requires updating the configuration file, without modifying the core function scheduling center code, enabling the system to quickly adapt to new drone application scenarios (such as expanding from power line inspection to agricultural plant protection), with simple expansion and low cost. Attached Figure Description

[0084] Figure 1 This is a functional diagram illustrating the application scenarios of the task scheduling method for intelligent unmanned aerial vehicle (UAV) scenarios of the present invention.

[0085] Figure 2 This is a flowchart of the task scheduling method for intelligent drone scenarios according to the present invention. Detailed Implementation

[0086] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. 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.

[0087] This invention provides a task scheduling system for complex scenarios involving intelligent unmanned aerial vehicles (UAVs), comprising a functional scheduling center and an algorithm, which are hierarchically decoupled. The UAV scheduling system for this intelligent UAV scenario is as follows: Figure 1 As shown, the UAV scheduling system consists of two parts: the operating system and the application layer. The task scheduling method for intelligent UAV scenarios proposed in this invention operates at the application layer, which includes a function scheduling center and an algorithm module.

[0088] The functional scheduling center comprises a resource acquisition module, a data queue module, a resource manager, and a functional node module. The resource acquisition module is the system's data input source, and the data it acquires drives the entire system's operation. The data queue module serves as a storage container for input data, temporary data, and output data. The resource manager manages the data queue and task nodes. The functional node module is the framework layer abstraction for all algorithms, abstracting algorithms into task nodes.

[0089] The algorithm module is the module in the system that needs to perform intelligent processing or other specific functional modules.

[0090] The workflow of the task scheduling method of the above-mentioned task scheduling system for intelligent drone scenarios is as follows: Figure 2 As shown, it includes the following steps:

[0091] S1. Upon system startup, a topology scan is performed first. This step parses a predefined configuration file, constructs a node connection graph as the task scheduling topology, and performs static verification to ensure the system is in a stable and reliable state before operation. The specific execution process is as follows:

[0092] Configuration file parsing: Reads and parses a structured configuration file (such as YAML or JSON format). This configuration file explicitly defines the unique identifiers and types of all task nodes (input nodes, processing nodes, processing and output nodes), defines the number, names and data types of input and output ports for each task node, and defines the dependencies between task nodes, i.e., the data flow (for example, output port 1 of task node A is connected to input port 1 of task node B).

[0093] Dependency Acyclic Validation: Based on the parsed dependencies, construct a node connection graph. Perform acyclic validation using node state labeling, traversing all task nodes and initializing their state to "unvisited".

[0094] Starting from any "unvisited" task node, a depth-first traversal is performed, temporarily marking its state as "visiting". During the traversal, if a successor task node with a "visiting" state is encountered, a circular dependency is detected, an error is immediately reported, and the startup process terminates. If a task node and all its successor task nodes have been traversed, its state is marked as "visited". This process is repeated until all task nodes are marked as "visited" or a circular dependency is detected.

[0095] Port matching verification: Traverse all task nodes and perform a mandatory type matching check on every connection between them. The check primarily includes ensuring data type names are consistent (e.g., RGBImage must connect to RGBImage, not PointCloud). For structured data types, further checks are performed on key attributes such as image width, height, and number of channels. If a type mismatch is found, the system immediately reports an error, explicitly indicating the mismatched port pair, and terminates the initialization process.

[0096] Resource requirement pre-analysis: Based on the type and preset parameters of each task node in the configuration file, pre-calculate its initial resource requirements. Assign lower CPU scheduling priorities to input nodes and higher CPU scheduling priorities to processing nodes and processing / output nodes. Estimate its initial memory usage based on factors such as the buffer size and data type processed by each task node.

[0097] By employing a rigorous static verification process, circular dependencies and data type conflicts caused by configuration errors are eliminated before the system runs. This prevents runtime failures such as data flow interruptions or logical inconsistencies during drone mission execution, significantly improving the initial stability and reliability of the system. This method is logically clear, computationally inexpensive, and well-suited for execution during the startup phase of resource-constrained embedded devices.

[0098] S2. After successful topology scan verification, the data queue is initialized. This step employs a memory pool-based data queue pre-allocation algorithm to achieve efficient memory pre-allocation and data queue isolation. The specific execution process is as follows:

[0099] Memory pool initialization: Start a global memory pool. The memory pool is managed by the Buddy System. The pre-allocated memory block sizes are {4KB, 8KB, 16KB, 32KB, 64KB}, and a series of fixed-size memory blocks are pre-allocated.

[0100] Data queue creation and memory allocation: Based on the resource requirement pre-analysis results in S1, create independent data queues for each input port and necessary output ports. The data queue size is dynamically calculated based on the data type.

[0101] Image queue: Q_size = W × H × C × B × S

[0102] Where W is the width, H is the height, C is the number of channels, B is the buffer factor, and S is the element size. Preferably, B is 2.0 by default, so as to achieve the best balance between system throughput and processing latency.

[0103] Point cloud queue: S_size = N × P × B

[0104] Where N is the maximum number of points, P is the size of the point data structure, and B is the buffer factor mentioned above;

[0105] Control instruction queue: fixed size, managed separately;

[0106] Memory block allocation: Allocate the data queue with the memory block closest to the computation size from the memory pool to reduce memory fragmentation.

[0107] Queue strategy settings: Set scheduling strategies for queues of different priorities. High-priority queues (such as control commands) use min-heap management to ensure real-time performance; ordinary data queues (such as images and radar) use a FIFO strategy.

[0108] The technical benefits of this step are: by using fine-grained memory pre-allocation and data queue isolation, the independence and order of multi-source heterogeneous data (such as images and radar point clouds) are ensured during the processing, avoiding data mixing, and reducing the overhead and uncertainty of dynamic memory allocation at runtime.

[0109] S3. Initialize the resource manager. The resource manager is the core of the system's dynamic scheduling. Its initialization not only includes holding handles to all data queues and task nodes, but also incorporates a dynamic resource allocation algorithm based on feedback control. The specific implementation steps are as follows:

[0110] Monitor registration: The resource manager registers a deep monitor for each data queue and a latency monitor for each task node.

[0111] Feedback control initialization: Initialize a PID controller for the task node that requires dynamic tuning. The PID controller parameters (such as proportional coefficient Kp, integral coefficient Ki, and derivative coefficient Kd) are pre-tuned according to the task type.

[0112] Load balancing ready: Initialize the instance pool manager, preparing to dynamically scale up or create new algorithm node instances when overload is detected. This load balancing process continues, based on a feedback-controlled dynamic resource allocation algorithm, specifically:

[0113] Data collection: Periodically collect the current actual queue depth d(t) and the processing latency (t) of each node.

[0114] PID Decision: For a task node, calculate the queue depth error e(t) = target_depth - d(t), and calculate the resource adjustment amount Δr(t) according to the formula Δr(t) = Kp×e(t) + Ki×∫e(t)dt + Kd×de(t) / dt, where target_depth is the current actual queue depth, d(t) is the current actual queue depth, Kp is the proportional gain, which is used to react immediately based on the current error magnitude, Ki is the integral gain, which is used to eliminate persistent deviations based on historical accumulated errors, and Kd is the derivative gain, which is used to prevent system oscillations based on future error trends.

[0115] Adjustment Execution: If the resource adjustment amount Δr(t) is greater than the adjustment threshold, resource expansion is triggered. For example, this could involve increasing the CPU priority of the node or dynamically expanding its data queue. For stateless task nodes, new algorithm node instances can be automatically created, and input data can be distributed across multiple algorithm node instances using a consistent hashing algorithm to achieve load balancing. If the resource adjustment amount Δr(t) is less than the adjustment threshold, resource reclamation is triggered.

[0116] The technical advantage of this step is that it applies the feedback mechanism in control theory to the scheduling of computing resources, enabling the system to dynamically optimize itself according to the real-time load, effectively preventing data accumulation and global blocking of the processing link, and improving the throughput and stability of the system in highly dynamic scenarios.

[0117] S4. Initialize functional nodes. Functional nodes are a unified abstraction of all algorithm modules. This step decouples the algorithm from the functional scheduling center through algorithm encapsulation and hot-swap mechanisms. Here, the algorithm refers to the algorithm in the scheduling system that needs to perform intelligent processing or other specific functions. The specific implementation steps are as follows:

[0118] Standard interface encapsulation: Each algorithm is encapsulated into five standard interfaces: create(), init(), process(), deinit(), and destroy(). The create() interface is used to create an algorithm node instance, the init() interface is used to initialize the algorithm, the process() interface is used to process the algorithm, the deinit() interface is used to deinitialize the algorithm, and the destroy() interface is used to destroy the algorithm node instance. The resource manager calls these interfaces uniformly through function pointers.

[0119] Resource-aware injection: During the create() and init() interface phases, the resource manager "injects" handles to computational resources (such as CPU core bindings and GPU memory) and input and / or output data queues into the algorithm node instance.

[0120] Hot-swap algorithm ready: The system reserves a hot-swap path based on dynamic link libraries (.so). When an algorithm update is needed, the resource manager performs the following steps:

[0121] a. Load the new algorithm library using the dlopen() interface;

[0122] b. Use the dlsym() interface to obtain pointers to the standard interface functions of the new algorithm library;

[0123] c. Create and initialize a new algorithm node instance, and smoothly switch the input data stream from the original algorithm node instance to the new algorithm node instance;

[0124] d. After the original algorithm node instance has finished processing the current data, call the deinit() and destroy() interfaces to release resources.

[0125] Adaptive degradation logic: In the process() interface, the algorithm can query the resource manager in real time to obtain the remaining CPU and / or GPU resources. When the resources are below the threshold, an internal degradation strategy is triggered, such as switching the image detection algorithm from YOLOv5 to MobileNetV3, reducing the processing density of the point cloud processing algorithm, and extending the planning cycle of the navigation algorithm.

[0126] The technical advantage of this step is that it achieves "plug-and-play" functionality and seamless runtime upgrades for algorithm modules through standard interfaces and dynamic libraries, meeting the needs of UAVs for updating algorithm models during long-term missions. Resource awareness and adaptive degradation ensure that the core functions of the system can still operate even when resources are limited.

[0127] S5. Resource Acquisition Polling: After initialization, the scheduling system enters a stable operation phase, continuously driving the entire task scheduling process through a resource acquisition polling mechanism. This step employs an efficient polling strategy to ensure the scheduling system can respond promptly to various inputs and make reasonable resource scheduling decisions. The specific execution process of the resource acquisition polling mechanism is as follows:

[0128] Input node status check: Check the data readiness status of all input nodes (such as cameras, radar, GPS, etc.) in a loop according to a preset polling period (configurable from microseconds to milliseconds);

[0129] For each input node, check its corresponding data queue status to determine whether new data has arrived or whether the data queue is close to full.

[0130] Priority-driven task triggering: Priorities are preset for different types of tasks. When multiple input nodes have data ready at the same time, they are processed according to the preset priority order.

[0131] Highest priority: Safety-related commands, such as emergency obstacle avoidance commands and system fault signals, are triggered immediately and can interrupt currently executing low-priority tasks.

[0132] Medium priority: Tasks with high real-time requirements, such as target tracking data and video stream data, are guaranteed to be processed within the specified time.

[0133] Low priority: Background computing tasks, such as map building and data recording, are processed when system resources are idle.

[0134] Dynamic resource feedback adjustment: During the polling process, the queue depth and resource usage of each task node are continuously monitored. When a task node's data queue is found to be continuously backlogged (exceeding a preset threshold), a feedback signal is immediately sent to the resource manager. Based on this feedback, the resource manager dynamically adjusts the system resource allocation, such as allocating more CPU time slices to backlogged task nodes, automatically triggering the expansion of the task node's algorithm node instance, and executing algorithm degradation strategies (such as reducing image processing resolution) in extreme cases.

[0135] System status monitoring and logging: During each polling cycle, key performance indicators are recorded, including processing latency of each task node, queue depth, and resource utilization. When the processing latency of a task node consistently exceeds a threshold, it is marked as a performance bottleneck node, and an alarm message is generated in the system log to facilitate subsequent optimization and troubleshooting.

[0136] The technical advantage of this step is that it ensures timely responses to critical tasks through a simple and efficient polling mechanism and a clear priority strategy. Simultaneously, through real-time monitoring and dynamic feedback adjustment, the system can adaptively handle different workloads, improving overall resource utilization efficiency while maintaining real-time performance. This solution is simple to implement, highly reliable, and well-suited for stable operation in resource-constrained UAV embedded systems.

[0137] This invention also provides a task scheduling system for intelligent drone scenarios, comprising:

[0138] The resource acquisition module is used to perform topology scanning. It constructs a node connection graph by parsing a predefined configuration file, performs mandatory type matching checks on each connection between task nodes, and then performs pre-analysis of resource requirements.

[0139] The data queue module is used to perform data queue initialization. It adopts a memory pool-based data queue pre-allocation algorithm to achieve memory pre-allocation and data queue isolation.

[0140] The resource manager initialization module is used to initialize the resource manager, including handles that hold all data queues and task nodes, as well as a built-in dynamic resource allocation algorithm based on feedback control.

[0141] The function node initialization module is used to initialize function nodes. Function nodes are a unified abstraction of all algorithm modules. Through algorithm encapsulation and hot replacement mechanism, the algorithm and function scheduling center are decoupled.

[0142] The polling module is used for resource acquisition polling. After initialization, during the stable operation phase, it continuously drives the entire task scheduling operation through the resource acquisition polling mechanism.

[0143] As a further optimized technical solution, the resource acquisition module specifically includes:

[0144] The parsing unit is used to read and parse a structured configuration file, which explicitly defines the unique identifiers and types of all task nodes, the number, names and data types of input and output ports of each task node, and the dependencies between task nodes;

[0145] The dependency acyclic verification unit is used to construct a node connection graph based on the parsed dependencies;

[0146] The port matching verification unit is used to traverse all task nodes and perform a mandatory type matching check on every connection between task nodes.

[0147] The resource requirement pre-analysis unit is used to pre-calculate the initial resource requirements of each task node based on the type and preset parameters in the configuration file, assign different priorities to different types of task nodes, and estimate the initial memory usage of task nodes.

[0148] The execution process of each module in this task scheduling system for intelligent drone scenarios is the same as the task scheduling method for intelligent drone scenarios described above.

[0149] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A task scheduling method for intelligent unmanned aerial vehicle (UAV) scenarios, characterized in that: For standalone applications, the following steps are included: S1. Perform a topology scan by parsing a predefined configuration file, constructing a node connection graph, traversing all task nodes, and performing a mandatory type matching check on each connection between task nodes, followed by a pre-analysis of resource requirements. S2. Initialize the data queue by using a memory pool-based data queue pre-allocation algorithm to achieve memory pre-allocation and data queue isolation. S3. Initialize the resource manager, including handles for all data queues and task nodes, and the built-in dynamic resource allocation algorithm based on feedback control, specifically including: Monitor registration: The resource manager registers a deep monitor for each data queue and a latency monitor for each task node; Feedback control initialization: Initialize a PID controller for the task node that requires dynamic tuning. The PID controller parameters are preset according to the task type. Load balancing ready: Initialize the instance pool manager to prepare for dynamic scaling up or creating new algorithm node instances when overload is detected; S4. Initialize functional nodes. Functional nodes are a unified abstraction of all algorithm modules. Through algorithm encapsulation and hot replacement mechanism, the algorithm and functional scheduling center are decoupled. S5. Resource Acquisition Polling: After initialization, during the stable operation phase, the resource acquisition polling mechanism continuously drives the entire task scheduling process. In this step, the data readiness status of all input nodes is checked cyclically according to the preset polling cycle. When multiple input nodes have data ready at the same time, they are processed according to the preset priority order.

2. The task scheduling method for intelligent unmanned aerial vehicle scenarios as described in claim 1, characterized in that: Step S1 specifically includes: Read and parse a structured configuration file that explicitly defines the unique identifiers and types of all task nodes, the number, names and data types of input and output ports for each task node, and the dependencies between task nodes; Dependency acyclicity verification: Construct a node connection graph based on the parsed dependencies; Port matching verification: Traverse all task nodes and perform a mandatory type matching check on every connection between task nodes; Resource requirement pre-analysis: Based on the type and preset parameters of each task node in the configuration file, pre-calculate its initial resource requirements, assign different priorities to different types of task nodes, and estimate the initial memory usage of task nodes.

3. The task scheduling method for intelligent unmanned aerial vehicle scenarios as described in claim 2, characterized in that: Based on the parsed dependencies, the specific process of constructing a node connection graph is as follows: Acyclic verification is performed using the node state marking method. All task nodes are traversed and their states are initialized to "unvisited". Starting from any "unvisited" task node, perform a depth-first traversal and temporarily mark its status as "visiting"; During the traversal, if a successor task node with a status of "accessing" is accessed, a circular dependency is determined, an error is immediately reported, and the startup is terminated. If the task node and all its successor task nodes have been traversed, its status is marked as "accessed". Repeat the above process until all task nodes are marked as "visited" or a circular dependency is detected.

4. The task scheduling method for intelligent unmanned aerial vehicle scenarios as described in claim 1, characterized in that: Step S2 specifically includes: Memory pool initialization: Start a global memory pool, which is managed by the buddy system and pre-allocates a series of fixed-size memory blocks; Data queue creation and memory allocation: Based on the resource requirement pre-analysis results in S1, create independent data queues for each input port and necessary output ports; Control instruction queue: fixed size, managed separately; Memory block allocation: Allocate the memory block closest to the computation size from the memory pool to the data queue; Queue policy settings: Set scheduling policies for data queues with different priorities.

5. A task scheduling method for intelligent unmanned aerial vehicle scenarios as described in claim 4, characterized in that: The load balancing process is continuous and is based on a dynamic resource allocation algorithm with feedback control, specifically as follows: Data collection: Periodically collect the current actual queue depth d(t) and the processing latency (t) of each node; PID Decision: For a task node, calculate the queue depth error e(t) = target_depth - d(t), and calculate the resource adjustment amount Δr(t) according to the formula Δr(t) = Kp×e(t) + Ki×∫e(t)dt + Kd×de(t) / dt, where target_depth is the current actual queue depth, d(t) is the current actual queue depth, Kp is the proportional gain, Ki is the integral gain, and Kd is the derivative gain; Execution adjustment: If the resource adjustment amount Δr(t) is greater than the adjustment threshold, resource expansion is triggered. For stateless task nodes, new algorithm node instances are automatically created, and the input data is distributed to multiple algorithm node instances through the consistent hashing algorithm to achieve load balancing. If the resource adjustment amount Δr(t) is less than the adjustment threshold, resource reclamation is triggered.

6. The task scheduling method for intelligent unmanned aerial vehicle scenarios as described in claim 1, characterized in that: Step S4 specifically includes: Standard interface encapsulation: Each algorithm is encapsulated into five standard interfaces: create(), init(), process(), deinit(), and destroy(). The create() interface is used to create an algorithm node instance, the init() interface is used to initialize the algorithm, the process() interface is used to process the algorithm, the deinit() interface is used to deinitialize the algorithm, and the destroy() interface is used to destroy the algorithm node instance. The resource manager calls these interfaces uniformly through function pointers. Resource-aware injection: During the create() and init() interface phases, the resource manager "injects" the handles of computational resources and input and / or output data queues into the algorithm node instance; Hot-swap algorithm ready: The system reserves a hot-swap path based on dynamic link libraries. When an algorithm needs to be updated: the dlopen() interface is used to load the new algorithm library; the dlsym() interface is used to obtain the standard interface function pointer of the new algorithm library; a new algorithm node instance is created and initialized, while the input data stream is smoothly switched from the original algorithm node instance to the new algorithm node instance; after the original algorithm node instance has finished processing the current data, the deinit() and destroy() interfaces are called to release resources. Adaptive degradation logic: In the process() interface, the remaining CPU and / or GPU resources can be obtained by querying the resource manager in real time. When the resources are lower than the threshold, the internal degradation strategy is triggered.

7. A task scheduling method for intelligent unmanned aerial vehicle scenarios as described in claim 1, characterized in that: Step S5 specifically includes: Input node status check: Check the data readiness status of all input nodes in a loop according to the preset polling cycle; For each input node, check its corresponding data queue status to determine whether new data has arrived or whether the data queue is close to full. Priority-driven task triggering: Priorities are preset for different types of tasks. When multiple input nodes have data ready at the same time, they are processed according to the preset priority order. Dynamic resource feedback adjustment: During the polling process, the queue depth and resource usage of each task node are continuously monitored. When it is found that the data queue of a certain task node is continuously backlogged, a feedback signal is immediately sent to the resource manager. Based on this feedback, the resource manager dynamically adjusts the allocation of system resources. System status monitoring and logging: In each polling cycle, key performance indicators are recorded. When the processing latency of a certain task node is detected to continuously exceed the threshold, it is marked as a performance bottleneck node, and an alarm message is generated in the system log.

8. A task scheduling system for intelligent unmanned aerial vehicle (UAV) scenarios, characterized in that: Applied to standalone machines, including: The resource acquisition module is used to perform topology scanning. It parses a predefined configuration file, builds a node connection graph, traverses all task nodes, performs mandatory type matching checks on every connection between task nodes, and then performs pre-analysis of resource requirements. The data queue module is used to perform data queue initialization. It adopts a memory pool-based data queue pre-allocation algorithm to achieve memory pre-allocation and data queue isolation. The resource manager initialization module is used to initialize the resource manager. Initialization includes holding handles for all data queues and task nodes, as well as a built-in dynamic resource allocation algorithm based on feedback control. Specifically, this includes: Monitor registration: The resource manager registers a deep monitor for each data queue and a latency monitor for each task node; Feedback control initialization: Initialize a PID controller for the task node that requires dynamic tuning. The PID controller parameters are preset according to the task type. Load balancing ready: Initialize the instance pool manager to prepare for dynamic scaling up or creating new algorithm node instances when overload is detected; The function node initialization module is used to initialize function nodes. Function nodes are a unified abstraction of all algorithm modules. Through algorithm encapsulation and hot replacement mechanism, the algorithm and function scheduling center are decoupled. The polling module is used for resource acquisition polling. After initialization, during the stable operation phase, it continuously drives the entire task scheduling through the resource acquisition polling mechanism. In this module, the data readiness status of all input nodes is checked cyclically according to the preset polling cycle, and when multiple input nodes have data ready at the same time, they are processed according to the preset priority order.

9. A task scheduling system for intelligent unmanned aerial vehicle scenarios as described in claim 8, characterized in that: The resource acquisition module specifically includes: The parsing unit is used to read and parse a structured configuration file, which explicitly defines the unique identifiers and types of all task nodes, the number, names and data types of input and output ports of each task node, and the dependencies between task nodes; The dependency acyclic verification unit is used to construct a node connection graph based on the parsed dependencies; The port matching verification unit is used to traverse all task nodes and perform a mandatory type matching check on every connection between task nodes. The resource requirement pre-analysis unit is used to pre-calculate the initial resource requirements of each task node based on the type and preset parameters in the configuration file, assign different priorities to different types of task nodes, and estimate the initial memory usage of task nodes.

10. A task scheduling system for intelligent unmanned aerial vehicle scenarios as described in claim 8, characterized in that: The functional node initialization module performs the following steps: Standard interface encapsulation: Each algorithm is encapsulated into five standard interfaces: create(), init(), process(), deinit(), and destroy(). The create() interface is used to create an algorithm node instance, the init() interface is used to initialize the algorithm, the process() interface is used to process the algorithm, the deinit() interface is used to deinitialize the algorithm, and the destroy() interface is used to destroy the algorithm node instance. The resource manager calls these interfaces uniformly through function pointers. Resource-aware injection: During the create() and init() interface phases, the resource manager "injects" the handles of computational resources and input and / or output data queues into the algorithm node instance; Hot-swap algorithm ready: The system reserves a hot-swap path based on dynamic link libraries. When an algorithm needs to be updated: the dlopen() interface is used to load the new algorithm library; the dlsym() interface is used to obtain the standard interface function pointer of the new algorithm library; a new algorithm node instance is created and initialized, while the input data stream is smoothly switched from the original algorithm node instance to the new algorithm node instance; after the original algorithm node instance has finished processing the current data, the deinit() and destroy() interfaces are called to release resources. Adaptive degradation logic: In the process() interface, the remaining CPU and / or GPU resources can be obtained by querying the resource manager in real time. When the resources are lower than the threshold, the internal degradation strategy is triggered.

Citation Information

Patent Citations

  • Intelligent algorithm integration application platform for typical structural member of airplane

    CN119312902A

  • Unmanned system cluster distributed task cooperative scheduling method and system

    CN120669715A

  • Intelligent task scheduling and optimizing method, system, medium and equipment

    CN121029351A