A high-concurrency video stream real-time analysis engine scheduling system and method

By employing multi-dimensional task evaluation and adaptive scheduling strategies, combined with multi-level priority queues and dynamic load balancing, the problems of low resource utilization efficiency and high real-time response latency in existing video stream analysis technologies have been solved. This enables high-concurrency, low-resource-consumption video stream analysis, adapting to various scenario requirements.

CN122363897APending Publication Date: 2026-07-10CHANGFENG DIGITAL TECH (SHANDONG) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHANGFENG DIGITAL TECH (SHANDONG) CO LTD
Filing Date
2026-04-09
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing real-time video stream analysis technologies suffer from low resource utilization efficiency, insufficient concurrent processing capabilities, high real-time response latency, limited scheduling strategies, lack of adaptability to multiple scenarios, and inaccurate resource requirement assessment, thus failing to meet the needs for efficient video stream analysis under multiple cameras, multiple tasks, and multiple scenarios.

Method used

Employing a multi-dimensional task evaluation mechanism, adaptive resource scheduling strategy, multi-level priority queue, scene-aware scheduling, and dynamic load balancing technology, this system achieves high concurrency and low resource consumption video stream analysis through a multi-dimensional task evaluation module, adaptive scheduling decision module, multi-level priority queue management module, scene-aware scheduling module, and dynamic load balancing module, combined with a multi-level parallel execution architecture and resource management mechanism.

Benefits of technology

It significantly improves resource utilization efficiency, enhances high-concurrency processing capabilities, optimizes real-time response performance, achieves multi-scenario adaptation and accurate prediction of resource requirements, and meets the real-time video stream analysis needs of multiple cameras, multiple tasks, and multiple scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122363897A_ABST
    Figure CN122363897A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of video stream real-time analysis, and particularly relates to a high-concurrency video stream real-time analysis engine scheduling system and method, which comprises a scheduling management layer, a task execution layer and a resource management layer; the scheduling management layer comprises a multi-dimensional task evaluation module, an adaptive scheduling decision module, a multi-level priority queue management module, a scene-aware scheduling module and a dynamic load balancing module; the task execution layer comprises a video stream receiving module, a task decomposition module, a parallel execution engine and a result aggregation module; and the resource management layer comprises a resource monitoring module, a resource allocation module and a resource recycling module. Through the multi-dimensional task evaluation mechanism, the adaptive resource scheduling strategy, the multi-level priority queue, the scene-aware scheduling and the dynamic load balancing, the application realizes low resource consumption, high-concurrency processing and real-time response of video stream analysis scheduling, and significantly improves the video stream real-time analysis performance and resource utilization efficiency in the multi-camera, multi-task and multi-scene conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of real-time video stream analysis technology, specifically relating to a high-concurrency real-time video stream analysis engine scheduling system and method. Background Technology

[0002] With the rapid development of smart cities, intelligent security, and smart transportation, the scale of video surveillance systems is constantly expanding, and the demand for real-time analysis of video streams from multiple cameras, multiple tasks, and multiple scenarios is growing.

[0003] The main technical drawbacks of existing real-time video stream analysis technologies are: 1) Low resource utilization efficiency: Traditional scheduling algorithms cannot intelligently allocate resources based on task characteristics and resource status, resulting in low utilization of computing resources such as CPU, GPU, and memory, serious resource waste, and an inability to support large-scale concurrent processing under limited resource conditions; 2) Insufficient concurrent processing capability: The serial processing architecture of a single task queue cannot fully utilize multi-core parallel computing resources, multi-camera video streams cannot be processed in parallel, system throughput is limited, and it cannot meet the needs of large-scale concurrent video stream analysis; 3) High real-time response latency: The lack of task priority and real-time evaluation mechanisms means that critical tasks cannot be processed in a timely manner, resulting in high average response latency and an inability to meet the second-level response requirements of real-time analysis scenarios; 4) Single scheduling strategy and... 5) Lack of adaptability: Fixed scheduling strategies cannot dynamically adjust according to changes in video stream load, scene characteristics, and task types, leading to processing bottlenecks or resource waste during load fluctuations; 6) Lack of multi-scenario adaptability: Video stream characteristics, analysis task types, and real-time requirements vary greatly across different application scenarios (traffic monitoring, security monitoring, behavior analysis, etc.), and a unified scheduling strategy cannot adapt to the needs of multiple scenarios; 7) Inaccurate assessment of task resource requirements: It is impossible to dynamically assess resource requirements based on the complexity of video stream content, scene changes, and task types, resulting in unreasonable resource allocation; 8) Lack of multi-dimensional scheduling optimization: It only considers a single dimension (such as priority or load) and cannot comprehensively consider multi-dimensional factors such as task priority, resource requirements, real-time requirements, and scene characteristics for comprehensive optimization scheduling. Summary of the Invention

[0004] This invention discloses a high-concurrency video stream real-time analysis engine scheduling system and method. Through multi-dimensional task evaluation mechanism, adaptive resource scheduling strategy, multi-level priority queue, scene-aware scheduling, dynamic load balancing and other technical solutions, it realizes a video stream analysis scheduling system with low resource consumption, high concurrency processing and real-time response, which significantly improves the real-time analysis performance and resource utilization efficiency of video streams under multiple cameras, multiple tasks and multiple scenarios.

[0005] To achieve the above objectives, the technical solution of the present invention is as follows: A high-concurrency video stream real-time analysis engine scheduling system includes a scheduling management layer, a task execution layer, and a resource management layer. The scheduling management layer includes a multi-dimensional task evaluation module, an adaptive scheduling decision module, a multi-level priority queue management module, a scene-aware scheduling module, and a dynamic load balancing module. The task execution layer includes a video stream receiving module, a task decomposition module, a parallel execution engine, and a result aggregation module. The resource management layer includes a resource monitoring module, a resource allocation module, and a resource reclamation module. These modules are connected via data streams and control signaling to form a complete high-concurrency video stream real-time analysis and scheduling system.

[0006] Preferably, the multi-dimensional task evaluation module of the scheduling management layer is used to perform multi-dimensional evaluation of each video stream analysis task, including: (1) Task priority assessment: Based on the task type (real-time alarm, behavior analysis, target detection, etc.), business importance, and user level factors, the task priority score is dynamically calculated. The priority score ranges from 0 to 100, and the higher the score, the higher the priority. (2) Resource requirement assessment: Based on the video stream resolution, frame rate, scene complexity, and analysis task type (object detection, behavior recognition, trajectory tracking, etc.), predict the CPU, GPU, memory and other resource consumption required for the task, and establish a resource requirement model; (3) Real-time requirement assessment: Based on the task type and business needs, determine the real-time requirement level of the task (millisecond level, second level, minute level), and calculate the deadline and maximum allowable delay time of the task; (4) Scene feature recognition: Through a lightweight scene classification model, the scene type of the video stream (traffic intersection, parking lot, entrance and exit, office area, etc.) is identified, and scene feature vectors are extracted to provide a basis for scene perception scheduling; (5) Content complexity assessment: Based on the first few frames of the video stream, quickly assess the complexity of the video content (number of targets, motion intensity, background complexity, etc.) and predict the processing difficulty of subsequent frames; The adaptive scheduling decision module includes: based on multi-dimensional task evaluation results, a reinforcement learning adaptive scheduling algorithm based on the Actor-Critic framework is adopted. This algorithm comprehensively considers factors such as task priority, resource requirements, real-time requirements, current resource status, and historical scheduling effects to dynamically generate the optimal scheduling decision. The scheduling decision is a composite action, including task allocation (target execution unit), resource allocation (specific number of CPU cores, GPU memory size), and execution order (startup time window). The algorithm continuously learns from the environment and optimizes its internal Actor network (policy network) and Critic network (value network) to achieve online continuous improvement of the scheduling policy. This framework supports the integration of various classic scheduling policies (such as priority scheduling and earliest deadline priority as prior knowledge or baseline policies) to accelerate the learning process. The multi-level priority queue management module is used to establish a multi-level priority queue system, including: (1) Emergency task queue, priority 90-100: real-time alarm, anomaly detection. For tasks with extremely high real-time requirements, preemptive scheduling is adopted for immediate execution; (2) High-priority task queue, priority 70-89: Key business analysis tasks adopt a priority scheduling strategy to ensure completion within the deadline; (3) Medium priority task queue, priority 40-69: Regular analysis tasks adopt a fair scheduling strategy and are allocated for execution according to resource availability; (4) Low-priority task queue, priority 0-39: batch analysis, historical playback and other non-real-time tasks, which adopt background scheduling strategy and are executed when resources are idle; Each priority queue employs a FIFO or deadline-based sorting strategy, supporting dynamic task priority adjustment and task migration between queues. The scene-aware scheduling module employs differentiated scheduling strategies based on the characteristics and requirements of different scenes, including: (1) Traffic monitoring scenario: Prioritize vehicle detection and trajectory tracking tasks, adopt a high frame rate sampling strategy, and focus on ensuring real-time performance; (2) Security monitoring scenario: Prioritize abnormal behavior detection and personnel identification tasks, adopt a full-frame processing strategy, and focus on ensuring accuracy; (3) Behavior analysis scenario: Prioritize behavior recognition and trajectory analysis tasks, adopt time-series analysis strategy, and focus on ensuring continuity; (4) Entrance and exit monitoring scenario: Prioritize personnel counting and identity recognition tasks, adopt key frame extraction strategy, and focus on ensuring efficiency; The scene-aware scheduling module automatically adjusts scheduling parameters, namely sampling rate, processing frequency, and resource allocation ratio, based on scene characteristics to achieve scene adaptive optimization. The dynamic load balancing module includes: real-time monitoring of the load status of each execution unit, namely CPU cores, GPU devices, and processing nodes, including CPU utilization, GPU utilization, memory utilization, and task queue length; employing a dynamic load balancing algorithm based on load prediction to predict load change trends over a future period and perform task migration and resource reallocation in advance; automatically triggering load balancing operations when load imbalance is detected, i.e., the load difference exceeds a threshold, migrating tasks from high-load nodes to low-load nodes; and supporting cost assessment of task migration (migration overhead, data transfer costs, etc.) to avoid performance loss caused by frequent migrations.

[0007] Preferably, the video stream receiving module is responsible for receiving video streams from multiple cameras, supporting multiple video stream protocols such as RTSP, RTMP, and HTTP; it adopts an asynchronous non-blocking I / O model to support high-concurrency video stream access; it implements video stream buffer management, dynamically adjusting the buffer size according to network conditions and system load; and it supports adaptive video stream quality, automatically reducing the video stream resolution or frame rate when network bandwidth is limited. The task decomposition module is used to decompose complex video stream analysis tasks into multiple sub-tasks, including: (1) Frame-level task decomposition: The video stream is decomposed into independent frame processing tasks, which supports parallel processing; (2) Regional task decomposition: Decompose video frames into spatial regions (e.g., decompose a 1920x1080 frame into multiple 640x480 regions) and support regional parallel processing. (3) Task-level task decomposition: Multi-task analysis, namely target detection, behavior recognition, and trajectory tracking, is decomposed into multiple independent tasks, supporting task-level parallelism; The task decomposition module dynamically selects the optimal decomposition strategy based on the current resource status and task characteristics, balancing parallelism and task overhead. The parallel execution engine adopts a multi-level parallel architecture, including: (1) Task-level parallelism: Multiple video stream tasks are executed in parallel on different execution units; (2) Frame-level parallelism: Different frames of the same video stream are processed in parallel on different processing cores; (3) Model-level parallelism: Large AI models are executed in a distributed manner on different GPU devices; (4) Data-level parallelism: different batches of data for the same task are processed in parallel; The parallel execution engine employs a work-stealing algorithm, which automatically steals tasks from the task queues of other execution units when an execution unit is idle, thereby improving resource utilization. It also supports task dependency management to ensure that dependent tasks are executed in the correct order. The result aggregation module is used to aggregate the results of parallel-executed subtasks, including: (1) Frame-level result aggregation: Aggregate the processing results of multiple frames in chronological order to generate complete video analysis results; (2) Regional result aggregation: Aggregate the processing results of multiple regions according to spatial location to generate complete frame analysis results; (3) Task-level result aggregation: The analysis results of multiple sub-tasks are merged to generate a comprehensive analysis result; The result aggregation module supports result caching and deduplication to avoid redundant calculations; it also enables streaming output of results and supports real-time result push.

[0008] Preferably, the resource monitoring module is used to monitor the system resource status in real time, including: (1) CPU resource monitoring: Monitor the utilization, load, and temperature of each CPU core; (2) GPU resource monitoring: Monitor the utilization rate, memory usage rate, temperature and power consumption of each GPU device; (3) Memory resource monitoring: Monitor the usage and fragmentation level of system memory and video memory; (4) Network resource monitoring: Monitor network bandwidth utilization, latency, and packet loss rate; (5) Storage resource monitoring: Monitor storage space utilization and IO performance; The resource monitoring module adopts a lightweight monitoring mechanism, with monitoring overhead controlled within 1% of system resources; it supports resource prediction, forecasting future resource needs based on historical data. The resource allocation module is used to dynamically allocate computing resources based on scheduling decisions and resource monitoring results, including: (1) CPU resource allocation: CPU affinity binding is adopted to bind tasks to specific CPU cores, reducing context switching overhead; CPU resource limiting (cgroup) is supported to limit the CPU utilization of tasks and prevent resource preemption; (2) GPU resource allocation: GPU virtualization technology is adopted to divide the physical GPU into multiple virtual GPUs, supporting multi-task sharing of GPU resources; GPU resource time slice allocation is implemented, and GPU task preemption and migration are supported; (3) Memory resource allocation: Memory pool management is adopted to reduce memory allocation and release overhead; memory pre-allocation and reclamation strategies are implemented to avoid memory fragmentation; memory limits are supported to prevent system crashes caused by task memory leaks; (4) Dynamic resource adjustment: Based on the task execution status and resource status, the resource allocation is dynamically adjusted to support resource expansion and contraction; The resource recycling module is used to recycle unused resources in a timely manner, including: (1) Resource recycling after task completion: The allocated resources are immediately recycled after the task is completed and released for use by other tasks; (2) Resource reclamation for timed-out tasks: For timed-out tasks, resources are forcibly reclaimed to avoid resource occupation; (3) Abnormal task resource cleanup: For tasks that exit abnormally, clean up the resources they occupy to prevent resource leakage; (4) Regular resource organization: Regularly organize resources, reclaim fragmented resources, and optimize resource allocation; The resource recycling module employs a delayed recycling strategy, caching frequently used resources to reduce resource allocation overhead.

[0009] A method for scheduling a real-time video stream analysis engine includes the following steps: Step 1: System Initialization and Resource Preparation: After system startup, initialize the scheduling management layer, task execution layer, and resource management layer modules; the resource monitoring module scans and registers all available computing resources, including CPU cores, GPU devices, and memory, and establishes a resource pool; initialize multi-level priority queues and set scheduling parameters for each queue; load the scenario classification model and resource demand prediction model; configure scheduling policy parameters, including load balancing thresholds and priority adjustment rules. Step 2: Video Stream Access and Task Creation: The video stream receiving module receives video streams from multiple cameras and creates an analysis task for each video stream; the multi-dimensional task evaluation module evaluates the newly created tasks and calculates dimensional indicators such as task priority, resource requirements, real-time requirements, scene characteristics, and content complexity; based on the evaluation results, the tasks are added to the corresponding priority queues. Step 3: Scheduling Decision Generation. The adaptive scheduling decision module generates scheduling decisions based on the current system state (resource utilization), task queue status, historical scheduling effects, and task characteristics (priority, resource requirements, and real-time requirements). Scheduling decisions include: selecting tasks to execute, allocating execution units, allocating resource amounts, and execution order. The scenario-aware scheduling module adjusts scheduling parameters based on task scenario characteristics. The dynamic load balancing module evaluates the current load distribution and triggers load balancing operations if necessary. Step 4: Task Decomposition and Resource Allocation: The task decomposition module decomposes the task into subtasks that can be executed in parallel based on scheduling decisions and resource status; the resource allocation module allocates CPU, GPU, and memory resources to the task based on resource requirements and resource monitoring results; and submits the subtasks to the task queue of the parallel execution engine. Step 5: Parallel Execution and Result Aggregation: Based on the resource allocation results, the parallel execution engine assigns subtasks to the corresponding execution units, namely CPU cores and GPU devices, for parallel execution. During execution, the resource monitoring module continuously monitors resource usage. If insufficient resources or unbalanced load are detected, resource adjustments or task migrations are triggered. After the subtasks are completed, the result aggregation module aggregates the results to generate the final analysis results. The results are pushed to the upper-layer application through the result output interface. Step 6: Resource reclamation and scheduling optimization: After the task is completed, the resource reclamation module reclaims the resources occupied by the task and releases them for use by other tasks; the adaptive scheduling decision module updates the scheduling strategy parameters and optimizes subsequent scheduling decisions based on the task execution status, i.e., execution time, resource consumption, and whether it is completed on time; the system continuously monitors the overall performance indicators, i.e., throughput, average latency, and resource utilization, and dynamically adjusts the scheduling strategy according to performance changes.

[0010] The beneficial effects of the high-concurrency video stream real-time analysis engine scheduling system and method of the present invention are as follows: 1) Significant improvement in resource utilization efficiency: Through multi-dimensional task evaluation, accurate resource profiling is achieved, and combined with a refined resource isolation and recycling mechanism, the utilization rate of key computing resources such as CPU and GPU is maintained in the high-efficiency range. Compared with the traditional static scheduling algorithm, the resource utilization rate is significantly improved, and it can support a higher number of concurrent video streams under the same hardware resource conditions. 2) Powerful high-concurrency processing capability: It adopts a multi-level adaptive parallel architecture that combines task-level, frame-level and data-level processing, and combines it with an efficient task scheduling strategy, enabling the system to support the efficient concurrent processing of hundreds of video streams. The overall throughput of the system is increased by orders of magnitude compared with the serial processing architecture. 3) Excellent real-time response performance: Through multi-level priority queues and a real-time guarantee mechanism based on deadlines, it ensures that critical alarm tasks can be prioritized and executed quickly, and its average response latency is greatly reduced, which can meet the millisecond to second-level response requirements of various real-time analysis scenarios. 4) Intelligent adaptive scheduling capability: The system adopts an adaptive scheduling algorithm based on reinforcement learning, which enables the system to dynamically adjust resource allocation and task scheduling strategies according to real-time load, task characteristics and historical execution results, thereby maintaining stable system performance when facing load fluctuations. 5) Comprehensive multi-scenario adaptability: Through the scenario-aware scheduling mechanism, it can automatically identify different scenarios such as traffic monitoring and security monitoring, and dynamically adjust scheduling parameters such as analysis frame rate and model accuracy, so that the system can maintain high performance in different application scenarios. 6) Accurate resource demand prediction capability: Based on historical data, a resource demand prediction model is built, which can accurately predict the computing resource consumption of the video stream according to the complexity of the video stream content and the task type, providing a basis for the rational and advance allocation of resources. 7) Highly efficient multi-dimensional comprehensive optimization: It comprehensively considers multiple factors such as task priority, resource requirements, real-time requirements, and scenario characteristics to make unified scheduling decisions, which overcomes the limitations of single-dimensional optimization and achieves overall system performance optimization; 8) Low resource consumption characteristics: Through refined resource management across the entire chain from scheduling decisions to resource recycling, the system effectively controls its own operating costs, allowing more resources to serve core video analysis tasks, reflecting the design characteristics of low resource consumption. Attached Figure Description

[0011] Figure 1 This is the overall system architecture diagram.

[0012] Figure 2 This is a flowchart of the scheduling process.

[0013] Figure 3 This is a diagram of the scheduling algorithm architecture.

[0014] Figure 4 This is a flowchart of a multi-sensor fusion algorithm.

[0015] Figure 5 This is a flowchart of the adaptive scheduling decision-making process. Detailed Implementation

[0016] The following description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

[0017] The following embodiments can be understood as illustrating a part of the structure or method of the present invention individually, or as combining the embodiments to explain the broader structure or method of the present invention.

[0018] Example 1: like Figure 1As shown in the system architecture diagram, the overall architecture of the high-concurrency video stream real-time analysis engine scheduling system of this invention is divided into a scheduling management layer, a task execution layer, and a resource management layer. The scheduling management layer includes: a multi-dimensional task evaluation module, an adaptive scheduling decision module, a multi-level priority queue management module, a scene-aware scheduling module, and a dynamic load balancing module. The task execution layer includes: a video stream receiving module, a task decomposition module, a parallel execution engine, and a result aggregation module. The resource management layer includes: a resource monitoring module, a resource allocation module, and a resource reclamation module. These modules are connected through data streams and control signaling to form a complete high-concurrency video stream real-time analysis and scheduling system.

[0019] Example 2: Based on Example 1, this example discloses: like Figure 1 , 2 As shown, the scheduling management layer includes: 1.1 Multi-dimensional Task Evaluation Module: Performs multi-dimensional evaluation on each video stream analysis task, including: (1) Task priority assessment: Based on factors such as task type (real-time alarm, behavior analysis, target detection, etc.), business importance, and user level, the task priority score is dynamically calculated. The priority score ranges from 0 to 100, and the higher the score, the higher the priority.

[0020] (2) Resource requirement assessment: Based on the video stream resolution, frame rate, scene complexity, and analysis task type (object detection, behavior recognition, trajectory tracking, etc.), predict the CPU, GPU, memory and other resource consumption required for the task and establish a resource requirement model.

[0021] (3) Real-time requirement assessment: Based on the task type and business needs, determine the real-time requirement level of the task (millisecond level, second level, minute level), and calculate the deadline and maximum allowable delay time of the task.

[0022] (4) Scene feature recognition: Through a lightweight scene classification model, the scene type of the video stream (traffic intersection, parking lot, entrance and exit, office area, etc.) is identified, and scene feature vectors are extracted to provide a basis for scene perception and scheduling.

[0023] (5) Content complexity assessment: Based on the first few frames of the video stream, quickly assess the complexity of the video content (number of targets, motion intensity, background complexity, etc.) and predict the processing difficulty of subsequent frames.

[0024] 1.2 Adaptive Scheduling Decision Module: Based on multi-dimensional task evaluation results, an adaptive scheduling algorithm based on the Actor-Critic framework is adopted, employing reinforcement learning. This algorithm comprehensively considers factors such as task priority, resource requirements, real-time requirements, current resource status, and historical scheduling effects to dynamically generate optimal scheduling decisions. Scheduling decisions are complex actions, including task allocation (target execution unit), resource allocation (specific number of CPU cores, GPU memory size), and execution order (startup time window). The algorithm continuously learns from and interacts with the environment, optimizing its internal Actor network (policy network) and Critic network (value network) to achieve continuous online improvement of the scheduling policy. This framework supports the integration of various classic scheduling policies (such as priority scheduling and earliest deadline priority) as prior knowledge or baseline policies to accelerate the learning process.

[0025] 1.3 Multi-level Priority Queue Management Module: Establishes a multi-level priority queue system, including: (1) Emergency task queue (priority 90-100): Tasks with extremely high real-time requirements, such as real-time alarms and anomaly detection, are executed immediately using preemptive scheduling.

[0026] (2) High-priority task queue (priority 70-89): Key business analysis tasks are assigned to priority scheduling strategies to ensure completion within the deadline.

[0027] (3) Medium priority task queue (priority 40-69): routine analysis tasks, using a fair scheduling strategy, are allocated for execution according to resource availability.

[0028] (4) Low-priority task queue (priority 0-39): Non-real-time tasks such as batch analysis and historical playback are executed when resources are idle by adopting a background scheduling strategy.

[0029] Each priority queue employs a FIFO or deadline-based sorting strategy, supporting dynamic priority adjustment of tasks and task migration between queues.

[0030] 1.4 Scene-Aware Scheduling Module: Employs differentiated scheduling strategies based on the characteristics and requirements of different scenes. (1) Traffic monitoring scenario: Prioritize vehicle detection and trajectory tracking tasks, adopt a high frame rate sampling strategy, and focus on ensuring real-time performance.

[0031] (2) Security monitoring scenario: Prioritize abnormal behavior detection and personnel identification tasks, adopt full-frame processing strategy, and focus on ensuring accuracy.

[0032] (3) Behavior analysis scenario: Prioritize behavior recognition and trajectory analysis tasks, adopt time-series analysis strategy, and focus on ensuring continuity.

[0033] (4) Entrance and exit monitoring scenario: Prioritize personnel counting and identity recognition tasks, adopt key frame extraction strategy, and focus on ensuring efficiency.

[0034] The scene-aware scheduling module automatically adjusts scheduling parameters (sampling rate, processing frequency, resource allocation ratio, etc.) based on scene characteristics to achieve scene adaptive optimization.

[0035] 1.5 Dynamic Load Balancing Module: Real-time monitoring of the load status of each execution unit (CPU cores, GPU devices, processing nodes), including metrics such as CPU utilization, GPU utilization, memory utilization, and task queue length; employing a dynamic load balancing algorithm based on load prediction to predict load change trends over a future period and proactively migrate tasks and reallocate resources; automatically triggering load balancing operations when load imbalance is detected (load difference exceeds a threshold), migrating tasks from high-load nodes to low-load nodes; supporting cost assessment of task migration (migration overhead, data transfer costs, etc.) to avoid performance loss caused by frequent migrations.

[0036] Example 3: Based on Example 1, this example discloses: like Figure 1 As shown, the task execution layer includes: 2.1 Video Stream Receiving Module: Responsible for receiving video streams from multiple cameras, supporting multiple video stream protocols such as RTSP, RTMP, and HTTP; adopts an asynchronous non-blocking I / O model to support high-concurrency video stream access; implements video stream buffer management, dynamically adjusting the buffer size according to network conditions and system load; supports adaptive video stream quality, automatically reducing video stream resolution or frame rate when network bandwidth is limited.

[0037] 2.2 Task Decomposition Module: This module breaks down complex video stream analysis tasks into multiple sub-tasks, including: (1) Frame-level task decomposition: The video stream is decomposed into independent frame processing tasks, which supports parallel processing.

[0038] (2) Regional task decomposition: Decompose video frames into spatial regions (e.g., decompose a 1920x1080 frame into multiple 640x480 regions) and support regional parallel processing.

[0039] (3) Task-level task decomposition: Multi-task analysis (object detection + behavior recognition + trajectory tracking) is decomposed into multiple independent tasks, supporting task-level parallelism.

[0040] The task decomposition module dynamically selects the optimal decomposition strategy based on the current resource status and task characteristics, balancing parallelism and task overhead.

[0041] 2.3 Parallel Execution Engine: Employs a multi-level parallel architecture, including: (1) Task-level parallelism: Multiple video stream tasks are executed in parallel on different execution units.

[0042] (2) Frame-level parallelism: Different frames of the same video stream are processed in parallel on different processing cores.

[0043] (3) Model-level parallelism: Large AI models are executed in a distributed manner on different GPU devices.

[0044] (4) Data-level parallelism: different batches of data for the same task are processed in parallel.

[0045] The parallel execution engine employs a work-stealing algorithm, which automatically steals tasks from the task queues of other execution units when an execution unit is idle, thereby improving resource utilization. It also supports task dependency management to ensure that dependent tasks are executed in the correct order.

[0046] 2.4 Result Aggregation Module: Aggregates the results of parallel-executed subtasks, including: (1) Frame-level result aggregation: Aggregate the processing results of multiple frames in chronological order to generate complete video analysis results.

[0047] (2) Regional result aggregation: Aggregate the processing results of multiple regions according to spatial location to generate complete frame analysis results.

[0048] (3) Task-level result aggregation: The analysis results of multiple sub-tasks are merged to generate a comprehensive analysis result.

[0049] The results aggregation module supports result caching and deduplication to avoid redundant calculations; it also enables streaming output of results and supports real-time result push.

[0050] Example 4: Based on Example 1, this example discloses: The resource management layer includes: 3.1 Resource Monitoring Module: Monitors system resource status in real time, including: (1) CPU resource monitoring: Monitor the utilization, load, temperature and other indicators of each CPU core.

[0051] (2) GPU resource monitoring: Monitor the utilization rate, memory usage rate, temperature, power consumption and other indicators of each GPU device.

[0052] (3) Memory resource monitoring: Monitor the usage of system memory and video memory, the degree of fragmentation, etc.

[0053] (4) Network resource monitoring: Monitor network bandwidth utilization, latency, packet loss rate, etc.

[0054] (5) Storage resource monitoring: Monitor storage space utilization, IO performance, etc.

[0055] The resource monitoring module adopts a lightweight monitoring mechanism, keeping monitoring overhead to within 1% of system resources; it supports resource prediction, forecasting future resource needs based on historical data.

[0056] 3.2 Resource Allocation Module: Dynamically allocates computing resources based on scheduling decisions and resource monitoring results. (1) CPU resource allocation: CPU affinity binding is adopted to bind tasks to specific CPU cores, reducing context switching overhead; CPU resource limiting (cgroup) is supported to limit the CPU utilization of tasks and prevent resource preemption.

[0057] (2) GPU resource allocation: GPU virtualization technology is adopted to divide the physical GPU into multiple virtual GPUs, supporting multi-task sharing of GPU resources; GPU resource time slice allocation is implemented, and GPU task preemption and migration are supported.

[0058] (3) Memory resource allocation: Memory pool management is adopted to reduce memory allocation and release overhead; memory pre-allocation and reclamation strategies are implemented to avoid memory fragmentation; memory limits are supported to prevent system crashes caused by task memory leaks.

[0059] (4) Dynamic resource adjustment: Based on the task execution status and resource status, the resource allocation is dynamically adjusted to support resource expansion and contraction.

[0060] 3.3 Resource Recycling Module: Timely recycling of unused resources, including: (1) Resource recycling after task completion: The allocated resources are immediately recycled after the task is completed and released for use by other tasks.

[0061] (2) Resource recovery for timed-out tasks: For timed-out tasks, resources are forcibly recovered to avoid resource occupation.

[0062] (3) Abnormal task resource cleanup: For tasks that exit abnormally, clean up the resources they occupy to prevent resource leakage.

[0063] (4) Regular resource organization: Regularly organize resources, recycle fragmented resources, and optimize resource allocation.

[0064] The resource recycling module adopts a delayed recycling strategy, caching frequently used resources to reduce resource allocation overhead.

[0065] Example 5: Based on the above embodiments, the specific implementation process of the present invention (see...) Figure 2The scheduling process flowchart includes the following steps: Step 1: System Initialization and Resource Preparation. After system startup, the scheduling management layer, task execution layer, and resource management layer modules are initialized; the resource monitoring module scans and registers all available computing resources (CPU cores, GPU devices, memory, etc.) and establishes a resource pool; multi-level priority queues are initialized, and scheduling parameters for each queue are set; the scenario classification model and resource demand prediction model are loaded; and scheduling policy parameters (load balancing threshold, priority adjustment rules, etc.) are configured.

[0066] Step 2: Video Stream Access and Task Creation. The video stream receiving module receives video streams from multiple cameras and creates an analysis task for each video stream. The multi-dimensional task evaluation module evaluates the newly created tasks, calculating dimensional indicators such as task priority, resource requirements, real-time requirements, scene characteristics, and content complexity. Based on the evaluation results, the tasks are added to the corresponding priority queues.

[0067] Step 3: Scheduling Decision Generation. The adaptive scheduling decision module generates scheduling decisions based on the current system state (resource utilization, task queue status, historical scheduling effects, etc.) and task characteristics (priority, resource requirements, real-time requirements, etc.). Scheduling decisions include: selecting tasks to execute, allocating execution units, allocating resource amounts, and execution order. The scenario-aware scheduling module adjusts scheduling parameters based on task scenario characteristics. The dynamic load balancing module evaluates the current load distribution and triggers load balancing operations if necessary.

[0068] Step 4: Task Decomposition and Resource Allocation. The task decomposition module decomposes the task into subtasks that can be executed in parallel based on scheduling decisions and resource status; the resource allocation module allocates resources such as CPU, GPU, and memory to the task based on resource requirements and resource monitoring results; and submits the subtasks to the task queue of the parallel execution engine.

[0069] Step 5: Parallel Execution and Result Aggregation. Based on resource allocation results, the parallel execution engine assigns subtasks to corresponding execution units (CPU cores, GPU devices) for parallel execution. During execution, the resource monitoring module continuously monitors resource usage; if insufficient resources or unbalanced load are detected, it triggers resource adjustments or task migration. After the subtasks are completed, the result aggregation module aggregates the results to generate the final analysis results. The results are then pushed to the upper-layer application through the result output interface.

[0070] Step 6: Resource Reclamation and Scheduling Optimization. After a task is completed, the resource reclamation module reclaims the resources occupied by the task and releases them for use by other tasks; the adaptive scheduling decision module updates the scheduling strategy parameters and optimizes subsequent scheduling decisions based on the task execution status (execution time, resource consumption, whether it is completed on time, etc.); the system continuously monitors overall performance indicators (throughput, average latency, resource utilization, etc.) and dynamically adjusts the scheduling strategy according to performance changes.

[0071] Working principle of the invention: In this system, the adaptive scheduling decision module is the core, responsible for generating optimal scheduling decisions by comprehensively considering multiple factors, ensuring high concurrency and real-time response with low resource consumption. The multi-dimensional task evaluation module provides accurate input data for scheduling decisions, the multi-level priority queue management module ensures timely processing of critical tasks, the scenario-aware scheduling module achieves adaptive optimization across multiple scenarios, and the dynamic load balancing module ensures efficient resource utilization. The parallel execution engine fully utilizes multi-core parallel computing resources to achieve high concurrency. The resource management layer achieves low resource consumption through refined resource monitoring, allocation, and reclamation. This innovative scheduling algorithm architecture (see details...) Figure 3 (Scheduling algorithm architecture diagram) The system can achieve video stream analysis performance with low resource consumption, high concurrency processing, and real-time response, effectively meeting the real-time video stream analysis needs of multiple cameras, multiple tasks, and multiple scenarios.

[0072] like Figure 3 As shown in the scheduling algorithm architecture diagram, the system adopts a hierarchical scheduling architecture design, which includes three core scheduling layers: Layer 1 - Global Scheduling Layer: Responsible for global task scheduling and resource allocation, including modules such as multi-dimensional task evaluation, adaptive scheduling decision, and multi-level priority queue management. It adopts an adaptive scheduling algorithm based on reinforcement learning, which comprehensively considers factors such as task characteristics, resource status, and historical performance to generate the globally optimal scheduling decision.

[0073] Layer 2 - Local Scheduling Layer: Responsible for local task decomposition and parallel execution scheduling, including modules such as task decomposition, parallel execution engine, and result aggregation. It adopts work-stealing algorithm and dynamic load balancing to achieve multi-level parallel processing at the task level, frame level, model level, and data level, making full use of parallel computing resources.

[0074] Layer 3 - Resource Scheduling Layer: Responsible for resource monitoring, allocation, and reclamation. It includes modules for resource monitoring, resource allocation, and resource reclamation. It adopts a refined resource management strategy to achieve dynamic allocation and reclamation of resources such as CPU, GPU, and memory, ensuring efficient resource utilization and low consumption.

[0075] Each layer is connected according to the control flow path of "global scheduling → local scheduling → resource scheduling", and information exchange is achieved through standardized interfaces to ensure the system's hierarchical scheduling, efficient collaboration and low resource consumption characteristics.

[0076] like Figure 4 As shown in the flowchart of the multi-dimensional task evaluation, the multi-dimensional task evaluation module evaluates each video stream analysis task across five dimensions: Dimension 1 - Task Priority Assessment: Based on factors such as task type (real-time alerts, behavior analysis, target detection, etc.), business importance, and user level, a weighted scoring model is used to calculate task priority scores; real-time alert tasks have the highest priority (90-100), followed by behavior analysis tasks (70-89), then target detection tasks (40-69), and batch analysis tasks have the lowest priority (0-39).

[0077] Dimension 2 - Resource Requirement Assessment: Based on video stream resolution, frame rate, scene complexity, and analysis task type, a resource requirement prediction model based on historical data is used to predict the resource consumption of CPU cores, GPU memory, system memory, etc. required by the task; tasks with high resolution, high frame rate, complex scenes, and multi-task analysis have high resource requirements.

[0078] Dimension 3 - Real-time Requirement Assessment: Determine the real-time requirement level of the task based on the task type and business needs; real-time alarm tasks require millisecond-level response, behavior analysis tasks require second-level response, and target detection tasks require second- to minute-level response; calculate the deadline and maximum allowable delay time for the task.

[0079] Dimension 4 - Scene Feature Recognition: To achieve efficient real-time recognition, this module employs a lightweight convolutional neural network scene classifier. In a preferred embodiment, we use a pruned and quantized EfficientNet-B0 model as the basic architecture, as it offers an excellent balance between computational complexity, parameter accuracy, and classification performance, making it particularly suitable for resource-constrained deployment environments. This model rapidly analyzes the first consecutive frames (e.g., 5 frames) of the video stream, comprehensively outputting scene classification results (e.g., traffic intersections, parking lots, entrances / exits, office areas, etc.) and a scene feature vector. This step elevates the raw pixel stream into scheduling context information with clear semantics, serving as a key basis for driving subsequent differentiated scheduling strategies.

[0080] Dimension 5 - Content Complexity Assessment: Based on the first few frames of the video stream, quickly assess the complexity of the video content, including indicators such as the number of targets, motion intensity, and background complexity. Video streams with high content complexity require more computing resources and should be prioritized for resource allocation during scheduling.

[0081] The evaluation results from the five dimensions are combined to form a complete feature vector for the task, providing accurate input data for subsequent scheduling decisions.

[0082] like Figure 5 As shown in the flowchart of adaptive scheduling decision-making, the adaptive scheduling decision-making module uses an adaptive scheduling algorithm based on reinforcement learning to achieve intelligent scheduling decisions: Input processing: Receives multi-dimensional task evaluation results (task priority, resource requirements, real-time requirements, scenario characteristics, content complexity), current system status (resource utilization, task queue status, load distribution), historical scheduling effects (task execution time, resource consumption, whether it was completed on time), and other multi-dimensional input data.

[0083] State representation: Convert input data into state vectors, including task state vectors (priority, resource requirements, real-time requirements, scenario characteristics, content complexity), system state vectors (CPU utilization, GPU utilization, memory utilization, task queue length, load distribution), and historical state vectors (historical average execution time, historical resource consumption, historical completion rate), etc.

[0084] Action Space: Defines the scheduling action space, including task selection actions (which task to execute), resource allocation actions (how much CPU, GPU, and memory to allocate), execution order actions (when to start execution), load balancing actions (whether to trigger task migration), etc.

[0085] Reward Function: Design a reward function that comprehensively considers factors such as task completion time (shorter is better), resource utilization (higher is better), real-time performance (whether it is completed on time), and system throughput (higher is better). The reward function is: R = α×T_reward + β×U_reward + γ×D_reward + δ×S_reward, where T_reward is the time reward, U_reward is the utilization reward, D_reward is the real-time reward, S_reward is the throughput reward, and α, β, γ, and δ are weighting coefficients.

[0086] Policy Learning: A reinforcement learning algorithm based on the Actor-Critic framework is used for policy optimization. The policy network (Actor) is responsible for learning the mapping from state to scheduling actions, i.e., outputting specific scheduling decisions (such as task placement and resource allocation) based on the current system state (task queue, resource utilization, etc.). The value network (Critic) is responsible for evaluating the long-term expected benefits of taking a certain scheduling action in this state. The two networks work together, continuously updating network parameters by interacting online with the system environment (rather than relying on large amounts of offline historical data), thereby enabling the scheduling policy to continuously approach the optimal state and achieving online improvement and self-adaptation of scheduling performance.

[0087] Decision output: Based on the learned scheduling strategy, a scheduling decision is generated, including the task to be executed, the execution unit to be allocated, the amount of resources to be allocated, and the execution order. The scheduling decision is passed to the task execution layer and the resource management layer for execution through the scheduling interface.

[0088] Feedback and Updates: After a task is completed, the task execution status (execution time, resource consumption, whether it was completed on time, etc.) is collected, the reward value is calculated, the parameters of its policy network and value network are updated, and subsequent scheduling decisions are optimized. Through continuous learning and optimization, the scheduling strategy is constantly adapted to system changes, achieving adaptive scheduling.

Claims

1. A high-concurrency video stream real-time analysis engine scheduling system, characterized in that, The system comprises a scheduling management layer, a task execution layer, and a resource management layer. The scheduling management layer includes a multi-dimensional task evaluation module, an adaptive scheduling decision module, a multi-level priority queue management module, a scene-aware scheduling module, and a dynamic load balancing module. The task execution layer includes a video stream receiving module, a task decomposition module, a parallel execution engine, and a result aggregation module. The resource management layer includes a resource monitoring module, a resource allocation module, and a resource reclamation module. These modules are connected via data streams and control signaling to form a complete high-concurrency video stream real-time analysis and scheduling system.

2. The high-concurrency video stream real-time analysis engine scheduling system as described in claim 1, characterized in that, The multi-dimensional task evaluation module of the scheduling management layer is used to perform multi-dimensional evaluation of each video stream analysis task, including: (1) Task priority assessment: Based on the task type, i.e., real-time alarm, behavior analysis, target detection; business importance; user level factors, the task priority score is dynamically calculated. The priority score ranges from 0 to 100, and the higher the score, the higher the priority. (2) Resource requirement assessment: Based on the video stream resolution, frame rate, scene complexity, and analysis task type (target detection, behavior recognition, trajectory tracking), predict the CPU, GPU, memory and other resource consumption required for the task and establish a resource requirement model. (3) Real-time requirement assessment: Based on the task type and business requirements, determine the real-time requirement level of the task, i.e., millisecond level, second level, and minute level, and calculate the deadline and maximum allowable delay time of the task. (4) Scene feature recognition: Through a lightweight scene classification model, the scene type of the video stream is identified, namely traffic intersection, parking lot, entrance and exit, and office area. Scene feature vectors are extracted to provide a basis for scene perception and scheduling. (5) Content complexity assessment: Based on the first few frames of the video stream, quickly assess the complexity of the video content, namely the number of targets, motion intensity, and background complexity, and predict the processing difficulty of subsequent frames. The adaptive scheduling decision module includes: an adaptive scheduling algorithm based on a reinforcement learning framework using multi-dimensional task evaluation results. This algorithm comprehensively considers factors such as task priority, resource requirements, real-time requirements, current resource status, and historical scheduling effects to dynamically generate the optimal scheduling decision. The scheduling decision is a composite action, including task allocation, resource allocation, and execution order. The algorithm continuously learns from the environment and optimizes its internal Actor and Critic networks to achieve continuous online improvement of the scheduling strategy. The framework supports the integration of various classic scheduling strategies (such as priority scheduling and earliest deadline priority as prior knowledge or baseline strategies) to accelerate the learning process. The multi-level priority queue management module is used to establish a multi-level priority queue system, including: (1) Emergency task queue, priority 90-100: real-time alarm, anomaly detection. For tasks with extremely high real-time requirements, preemptive scheduling is adopted for immediate execution; (2) High-priority task queue, priority 70-89: Key business analysis tasks adopt a priority scheduling strategy to ensure completion within the deadline; (3) Medium priority task queue, priority 40-69: Regular analysis tasks adopt a fair scheduling strategy and are allocated for execution according to resource availability; (4) Low-priority task queue, priority 0-39: batch analysis, historical playback and other non-real-time tasks, which adopt background scheduling strategy and are executed when resources are idle; Each priority queue employs a FIFO or deadline-based sorting strategy, supporting dynamic task priority adjustment and task migration between queues. The scene-aware scheduling module employs differentiated scheduling strategies based on the characteristics and requirements of different scenes, including: (1) Traffic monitoring scenario: Prioritize vehicle detection and trajectory tracking tasks, adopt a high frame rate sampling strategy, and focus on ensuring real-time performance; (2) Security monitoring scenario: Prioritize abnormal behavior detection and personnel identification tasks, adopt a full-frame processing strategy, and focus on ensuring accuracy; (3) Behavior analysis scenario: Prioritize behavior recognition and trajectory analysis tasks, adopt time-series analysis strategy, and focus on ensuring continuity; (4) Entrance and exit monitoring scenario: Prioritize personnel counting and identity recognition tasks, adopt key frame extraction strategy, and focus on ensuring efficiency; The scene-aware scheduling module automatically adjusts scheduling parameters, namely sampling rate, processing frequency, and resource allocation ratio, based on scene characteristics to achieve scene adaptive optimization. The dynamic load balancing module includes: real-time monitoring of the load status of each execution unit, namely CPU cores, GPU devices, and processing nodes, including CPU utilization, GPU utilization, memory utilization, and task queue length; employing a dynamic load balancing algorithm based on load prediction to predict load change trends over a future period and perform task migration and resource reallocation in advance; automatically triggering load balancing operations when load imbalance is detected, i.e., the load difference exceeds a threshold, to migrate tasks from high-load nodes to low-load nodes; and supporting cost assessment of task migration to avoid performance loss caused by frequent migrations.

3. The high-concurrency video stream real-time analysis engine scheduling system as described in claim 1, characterized in that, The video stream receiving module is responsible for receiving video streams from multiple cameras and supports multiple video stream protocols such as RTSP, RTMP, and HTTP; it adopts an asynchronous non-blocking I / O model and supports high-concurrency video stream access. Implement video stream buffer management, dynamically adjust the buffer size according to network conditions and system load; support adaptive video stream quality, automatically reduce video stream resolution or frame rate when network bandwidth is limited; The task decomposition module is used to decompose complex video stream analysis tasks into multiple sub-tasks, including: (1) Frame-level task decomposition: The video stream is decomposed into independent frame processing tasks, which supports parallel processing; (2) Regional task decomposition: Decompose video frames into spatial regions to support parallel processing of regions; (3) Task-level task decomposition: Multi-task analysis, namely target detection, behavior recognition, and trajectory tracking, is decomposed into multiple independent tasks, supporting task-level parallelism; The task decomposition module dynamically selects the optimal decomposition strategy based on the current resource status and task characteristics, balancing parallelism and task overhead. The parallel execution engine adopts a multi-level parallel architecture, including: (1) Task-level parallelism: Multiple video stream tasks are executed in parallel on different execution units; (2) Frame-level parallelism: Different frames of the same video stream are processed in parallel on different processing cores; (3) Model-level parallelism: Large AI models are executed in a distributed manner on different GPU devices; (4) Data-level parallelism: different batches of data for the same task are processed in parallel; The parallel execution engine employs a work-stealing algorithm, which automatically steals tasks from the task queues of other execution units when an execution unit is idle, thereby improving resource utilization. It also supports task dependency management to ensure that dependent tasks are executed in the correct order. The result aggregation module is used to aggregate the results of parallel-executed subtasks, including: (1) Frame-level result aggregation: Aggregate the processing results of multiple frames in chronological order to generate complete video analysis results; (2) Regional result aggregation: Aggregate the processing results of multiple regions according to spatial location to generate complete frame analysis results; (3) Task-level result aggregation: The analysis results of multiple sub-tasks are merged to generate a comprehensive analysis result; The result aggregation module supports result caching and deduplication to avoid redundant calculations; it also enables streaming output of results and supports real-time result push.

4. The high-concurrency video stream real-time analysis engine scheduling system as described in claim 1, characterized in that, The resource monitoring module is used to monitor the system resource status in real time, including: (1) CPU resource monitoring: Monitor the utilization, load, and temperature of each CPU core; (2) GPU resource monitoring: Monitor the utilization rate, memory usage rate, temperature, and power consumption of each GPU device; (3) Memory resource monitoring: Monitor the usage and fragmentation level of system memory and video memory; (4) Network resource monitoring: Monitor network bandwidth utilization, latency, and packet loss rate; (5) Storage resource monitoring: Monitor storage space utilization and IO performance; The resource monitoring module adopts a lightweight monitoring mechanism, with monitoring overhead controlled within 1% of system resources; it supports resource prediction, forecasting future resource needs based on historical data. The resource allocation module is used to dynamically allocate computing resources based on scheduling decisions and resource monitoring results, including: (1) CPU resource allocation: CPU affinity binding is adopted to bind tasks to specific CPU cores, reducing context switching overhead; CPU resource limits are supported to limit the CPU utilization of tasks and prevent resource preemption; (2) GPU resource allocation: GPU virtualization technology is adopted to divide the physical GPU into multiple virtual GPUs, supporting multi-task sharing of GPU resources; GPU resource time slice allocation is implemented, and GPU task preemption and migration are supported; (3) Memory resource allocation: Memory pool management is adopted to reduce memory allocation and release overhead; memory pre-allocation and reclamation strategies are implemented to avoid memory fragmentation; memory limits are supported to prevent system crashes caused by task memory leaks; (4) Dynamic resource adjustment: Based on the task execution status and resource status, the resource allocation is dynamically adjusted to support resource expansion and contraction; The resource recycling module is used to recycle unused resources in a timely manner, including: (1) Resource recycling after task completion: The allocated resources are immediately recycled after the task is completed and released for use by other tasks; (2) Resource reclamation for timed-out tasks: For timed-out tasks, resources are forcibly reclaimed to avoid resource occupation; (3) Abnormal task resource cleanup: For tasks that exit abnormally, clean up the resources they occupy to prevent resource leakage; (4) Regular resource organization: Regularly organize resources, reclaim fragmented resources, and optimize resource allocation; The resource recycling module employs a delayed recycling strategy, caching frequently used resources to reduce resource allocation overhead.

5. A method for scheduling a real-time analysis engine for high-concurrency video streams, characterized in that: The high-concurrency video stream real-time analysis engine scheduling system as described in any one of claims 1-4 includes the following steps: Step 1: System Initialization and Resource Preparation: After system startup, initialize the scheduling management layer, task execution layer, and resource management layer modules; the resource monitoring module scans and registers all available computing resources, including CPU cores, GPU devices, and memory, and establishes a resource pool; initialize multi-level priority queues and set scheduling parameters for each queue; load the scenario classification model and resource demand prediction model; configure scheduling policy parameters, including load balancing thresholds and priority adjustment rules. Step 2: Video Stream Access and Task Creation: The video stream receiving module receives video streams from multiple cameras and creates an analysis task for each video stream; the multi-dimensional task evaluation module evaluates the newly created tasks and calculates dimensional indicators such as task priority, resource requirements, real-time requirements, scene characteristics, and content complexity; based on the evaluation results, the tasks are added to the corresponding priority queues. Step 3: Scheduling Decision Generation. The adaptive scheduling decision module generates scheduling decisions based on the current system state (resource utilization), task queue status, historical scheduling effects, and task characteristics (priority, resource requirements, and real-time requirements). Scheduling decisions include: selecting tasks to execute, allocating execution units, allocating resource amounts, and execution order. The scenario-aware scheduling module adjusts scheduling parameters based on task scenario characteristics. The dynamic load balancing module evaluates the current load distribution and triggers load balancing operations if necessary. Step 4: Task Decomposition and Resource Allocation: The task decomposition module decomposes the task into subtasks that can be executed in parallel based on scheduling decisions and resource status; the resource allocation module allocates CPU, GPU, and memory resources to the task based on resource requirements and resource monitoring results; and submits the subtasks to the task queue of the parallel execution engine. Step 5: Parallel Execution and Result Aggregation: Based on the resource allocation results, the parallel execution engine assigns subtasks to the corresponding execution units, namely CPU cores and GPU devices, for parallel execution. During execution, the resource monitoring module continuously monitors resource usage. If insufficient resources or unbalanced load are detected, resource adjustments or task migrations are triggered. After the subtasks are completed, the result aggregation module aggregates the results to generate the final analysis results. The results are pushed to the upper-layer application through the result output interface. Step 6: Resource reclamation and scheduling optimization: After the task is completed, the resource reclamation module reclaims the resources occupied by the task and releases them for use by other tasks; the adaptive scheduling decision module updates the scheduling strategy parameters and optimizes subsequent scheduling decisions based on the task execution status, i.e., execution time, resource consumption, and whether it is completed on time; the system continuously monitors the overall performance indicators, i.e., throughput, average latency, and resource utilization, and dynamically adjusts the scheduling strategy according to performance changes.