A method, apparatus and electronic device for allocating computing resources for multi-target tracking
Patent Information
- Application Number
- CN202510530595.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2026-10-27
AI Technical Summary
[0005]为了解决现有技术中在资源受限的多目标跟踪场景中,计算资源分配不合理的问题,本发明提供一种多目标跟踪的计算资源分配的方法
[0023]本发明实施例提供的多目标跟踪的计算资源分配的方法,通过根据输入的视频流获取每个跟踪目标的初始数据;根据初始数据确定每个跟踪目标的资源参数;根据资源参数构建生态模型,并基于生态模型预测每个跟踪目标所需计算资源的资源变化率;基于资源变化率计算资源分配比例,并根据资源分配比例进行计算资源分配。本发明通过设置生态模型模拟跟踪目标之间的资源竞争关系,并据此预测每个跟踪目标的资源变化率,进而计算出资源分配比例,并据此进行实时的资源分配,使得本发明能够适应监控场景的实时变化,确保高优先级目标获得足够的计算资源,同时避免对低优先级目标的资源浪费,从而显著提升了多目标跟踪系统的效率和响应速度,增强了整体性能和稳定性。此外,本发明的自适应特性减少了对人工干预的依赖,为复杂环境下的自动化监控提供了一种创新的解决方案。
Smart Images

Figure CN122985366A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of multi-target tracking, and more specifically, to a method, apparatus, electronic device, and computer-readable storage medium for allocating computational resources for multi-target tracking. Background Technology
[0002] With technological advancements and growing security demands, surveillance systems are playing an increasingly important role in several key areas, such as traffic management, security monitoring, and industrial automation. One of the core functions of these systems is multi-target tracking technology, which allows for the real-time identification and tracking of multiple moving targets, such as vehicles, pedestrians, or other important objects, from video data. Multi-target tracking technology is crucial for improving the efficiency of traffic flow analysis, abnormal behavior detection, and production process monitoring.
[0003] However, with the increasing number of surveillance cameras and the improvement of video resolution, multi-target tracking technology faces unprecedented challenges. Multi-target tracking is inherently a resource-intensive problem, requiring extensive computational processing, including target detection, data association, state estimation, and trajectory updating. The computational resource demands of these tasks increase dramatically with the number of targets and the amount of video data.
[0004] In resource-constrained real-world applications, how to rationally allocate limited computing resources to ensure the overall performance and real-time response capability of the monitoring system is a technical problem that needs to be solved in this field. Summary of the Invention
[0005] To address the problem of unreasonable allocation of computing resources in resource-constrained multi-target tracking scenarios in existing technologies, this invention provides a method for allocating computing resources for multi-target tracking.
[0006] A method for allocating computational resources for multi-target tracking includes: Initial data for each tracked target is obtained from the input video stream; The resource parameters for each of the tracked targets are determined based on the initial data; An ecological model is constructed based on the resource parameters, and the resource change rate required to calculate the resources for each of the tracking targets is predicted based on the ecological model. The resource allocation ratio is calculated based on the resource change rate, and resource allocation is performed according to the resource allocation ratio.
[0007] Optionally, the initial data includes the position, size, and velocity of each of the tracked targets; The step of determining the resource parameters for each tracking target based on the initial data includes: Calculate the corresponding intrinsic growth rate based on the speed of each of the tracked targets:
[0008] in, For the first The intrinsic growth rate of the tracked target, Calculate the function for the intrinsic growth rate. For the first The speed of the tracked target The internal growth rate ratio coefficient. This represents the maximum value of the intrinsic growth rate. Calculate the corresponding environmental capacity based on the location and size of each tracked target:
[0009] in, For the first The environmental capacity of a tracking target This is the function for calculating environmental capacity. For the first The size of the tracked target, For the first The location of the tracking target. This is the environmental capacity ratio coefficient. For position weighting functions; Calculate the corresponding initial resource amount based on the size and speed of each tracked target:
[0010] in, For the first The initial resource amount for each tracking target, This is the function for calculating the initial resource quantity. This is the initial resource quantity ratio coefficient; Calculate the corresponding interaction coefficient based on the position and velocity of each tracked target:
[0011] in, For the first The x-coordinate of each tracked target, For the first The vertical coordinate of the tracked target, For the first The x-coordinate of each tracked target, For the first The vertical coordinate of the tracked target, For the first The tracking target and the first The distance between the tracked targets For the first The tracking target and the first The interaction coefficient between the tracked targets This refers to the interaction ratio coefficient. Optionally, the step of constructing an ecological model based on the resource parameters and predicting the resource change rate required for each tracked target based on the ecological model includes: Based on the resource parameters, construct a corresponding ecological model for each tracking target:
[0012] in, For the first The resource change rate that needs to be calculated for each tracking target. The total number of the tracked targets.
[0013] Optionally, the step of calculating the resource allocation ratio based on the resource change rate and calculating resource allocation according to the resource allocation ratio includes: Obtain a preset time step, and calculate the resource change amount for each tracked target based on the time step and the resource change rate:
[0014] in, For the first The amount of resource change for each tracking target. For time step; Obtain a preset threshold, and update the initial resource quantity based on the preset threshold and the resource change amount:
[0015] in, For the first The updated resource quantity for each tracking target. The preset threshold; Calculate the resource allocation ratio for each tracked target based on the resource change and the initial resource amount:
[0016] in, For the first The resource allocation ratio for each tracking target. For the first The updated resource quantity for each tracking target.
[0017] Optionally, before updating the initial resource quantity based on the preset threshold and the resource change amount, the method further includes: The input modification command is executed to modify the preset threshold.
[0018] Optionally, obtaining initial data for each tracked target based on the input video stream includes: Identify tracking targets from the video stream and detect the ecological attribute parameters of each tracking target; The position, size, and velocity of each tracked target are read from the ecological attribute parameters; The position, size, and velocity of each of the tracked targets are determined as the initial data.
[0019] Optionally, the ecological attribute parameters may also include at least one of the following: activity range, activity level, survival time, type, interaction relationship, and environmental capacity.
[0020] An apparatus for allocating computational resources for multi-target tracking, comprising: The acquisition module is used to acquire initial data for each tracked target based on the input video stream; A determination module is used to determine the resource parameters of each of the tracking targets based on the initial data; The model building module is used to construct an ecological model based on the resource parameters, and to predict the resource change rate of each tracking target based on the ecological model. The calculation module is used to calculate the resource allocation ratio based on the resource change rate, and to calculate resource allocation according to the resource allocation ratio.
[0021] An electronic device, comprising: A processor and a memory, the memory being used to store at least one instruction, which, when loaded and executed by the processor, implements a method for allocating computational resources for multi-target tracking as described in any of the preceding embodiments.
[0022] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for allocating computational resources for multi-target tracking as described in any of the preceding claims.
[0023] The method for allocating computational resources for multi-target tracking provided in this invention involves: acquiring initial data for each tracked target based on the input video stream; determining resource parameters for each tracked target based on the initial data; constructing an ecosystem model based on the resource parameters and predicting the resource change rate of each tracked target based on the ecosystem model; calculating the resource allocation ratio based on the resource change rate; and allocating computational resources according to the resource allocation ratio. This invention simulates the resource competition relationship between tracked targets by setting up an ecosystem model, predicting the resource change rate of each tracked target accordingly, and then calculating the resource allocation ratio and performing real-time resource allocation. This allows the invention to adapt to real-time changes in the monitoring scenario, ensuring that high-priority targets receive sufficient computational resources while avoiding resource waste for low-priority targets, thereby significantly improving the efficiency and response speed of the multi-target tracking system and enhancing overall performance and stability. Furthermore, the adaptive nature of this invention reduces reliance on manual intervention, providing an innovative solution for automated monitoring in complex environments. Attached Figure Description
[0024] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 A flowchart illustrating a method for allocating computational resources for multi-target tracking, provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of a computing resource allocation device for multi-target tracking provided in an embodiment of the present invention. Detailed Implementation
[0026] To better understand the technical solution of the present invention, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0027] It should be understood that the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0028] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” as used in the embodiments of this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0029] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0030] With the increasing number of surveillance cameras and the improvement of video resolution, multi-target tracking technology faces unprecedented challenges. Multi-target tracking is inherently a resource-intensive problem, requiring extensive computational processing, including target detection, data association, state estimation, and trajectory updating. The computational resource demands of these tasks increase dramatically with the number of targets and the amount of video data.
[0031] Traditional resource allocation methods are typically based on static priorities or manual configuration. These methods lack flexibility and adaptability, and cannot effectively cope with dynamic changes in monitoring scenarios. Therefore, this invention provides a method for allocating computational resources for multi-target tracking to solve the above problems.
[0032] Please refer to Figure 1 The flowchart below shows a method for allocating computational resources for multi-target tracking, provided by an embodiment of the present invention, including the following steps: Step S01: Obtain initial data for each tracked target based on the input video stream.
[0033] In this embodiment, the purpose of acquiring initial data for each tracked target is to determine accurate baseline data for resource parameters, providing necessary input data for subsequent resource parameter calculations and ecological model construction. In this way, the system can establish a detailed initial profile for each tracked target, thereby laying the foundation for dynamic resource allocation.
[0034] In some embodiments, to improve data extraction speed and thus improve the efficiency of computing resource allocation, the initial data may specifically include the position, size, and speed of the tracking target. Based on this, the initial data for each tracking target mentioned in step S01, obtained according to the input video stream, can specifically be as follows: Identify and track targets from the video stream, and detect the ecological attribute parameters of each tracked target; Read the initial data for each tracked target from the ecological attribute parameters; The position, size, and velocity of each tracked target are determined as initial data.
[0035] Based on the above embodiments, in some embodiments, the ecological attribute parameter may include, in addition to the location, size and speed of the tracking target mentioned above, at least one of the following: the activity range, activity level, survival time, type, interaction relationship and environmental capacity of the tracking target.
[0036] In some embodiments, identifying tracking targets from a video stream and detecting the ecological attribute parameters of each tracking target may include the following steps: 1) Video stream parsing: The system receives video streams from cameras or video files and parses the video frames to extract visual information from each frame.
[0037] 2) Target detection: Computer vision algorithms are used to process each frame to identify and locate all target objects in the frame, such as pedestrians and vehicles.
[0038] 3) Attribute extraction: For each detected target, the system extracts its relevant attributes, including but not limited to location coordinates, size, speed, activity range, activity level, survival time, type, interaction relationship, environmental capacity, etc.
[0039] In some embodiments, the acquired ecological attribute parameters can also be designed in the format shown in Table 1 below:
[0040] Table 1 Furthermore, to make information storage, transmission, and processing more efficient and flexible, and to facilitate data exchange between developers and the system, the attributes of each tracking target can be encapsulated into a JSON (JavaScript Object Notation) format data structure.
[0041] Below are two examples of JSON objects, describing the ecological attribute parameters of a pedestrian and a vehicle, respectively: pedestrian: { "ID": 1, "Position": {"x": 320, "y": 480}, "Velocity": {"vx": 0.5, "vy": -1.0}, "Size": {"width": 30, "height": 60}, "Range": [[300, 450], [340, 510]], "Activity": 0.7, "Lifetime": 5, "Type": "Pedestrian", "Interaction": ["Avoidance", "Coexistence"], "Capacity": 10 } In this example, ID represents the pedestrian's unique identifier, Position is the pedestrian's position in the current video frame, Velocity represents the pedestrian's velocity vector, Size is the size of the pedestrian's bounding box, Range defines the spatial range of the pedestrian's activity (using the top-left and bottom-right coordinates to represent the bounding box), Activity describes the intensity of the pedestrian's activity, Lifetime is the time the pedestrian has been tracked in the system (in seconds), Type is the target type, Interaction lists the possible interactions between the pedestrians, and Capacity defines the environment's capacity to accommodate its type.
[0042] vehicle: { "ID": 2, "Position": {"x": 620, "y": 380}, "Velocity": {"vx": 2.0, "vy": 0.0}, "Size": {"width": 180, "height": 60}, "Range": [[580, 350], [800, 430]], "Activity": 0.9, "Lifetime": 15, Type: "Vehicle", "Interaction": ["Competition", "Predation"], "Capacity": 5 } For a vehicle, ID is its unique identifier, Position indicates the vehicle's position in the current frame, Velocity represents the vehicle's velocity vector, Size is the size of the vehicle's bounding box, Range indicates the spatial region where the vehicle is active, Activity refers to the activity level of the vehicle's movement, Lifetime is the duration of tracking the vehicle, Type refers to the type of target, Interaction describes the competition or predation relationship that the vehicle may have with other targets, and Capacity defines the capacity limit of a specific environment to support the vehicle.
[0043] In this embodiment, JSON is a lightweight data exchange format that is easy for humans to read and write, as well as easy for machines to parse and generate. JSON has excellent compatibility with modern programming languages and frameworks, supporting fast serialization and deserialization operations, thereby accelerating data processing. At the same time, the self-descriptive nature of the JSON format makes the data structure clear, easy to maintain and extend, enhancing the system's scalability and maintainability. This format also supports nested complex data structures, allowing the expression of rich target attributes and relationships in multi-target tracking systems, facilitating further data analysis and intelligent decision-making.
[0044] Step S02: Determine the resource parameters for each tracking target based on the initial data.
[0045] In this embodiment, the resource parameters for each tracked target are determined through specific calculation methods and models, combined with initial data, to calculate a series of key resource-related parameters for each target. These resource-related parameters may include, but are not limited to, intrinsic growth rate, environmental capacity, initial resource quantity, and interaction coefficient. This process forms the basis for dynamic resource allocation in a multi-target tracking system, ensuring that the required computing resources can be reasonably predicted and allocated based on the target's real-time status and behavioral characteristics, thereby optimizing the efficiency and responsiveness of the entire tracking system.
[0046] In some embodiments, the intrinsic growth rate (IRR) is a metric for measuring target activity, reflecting the frequency and speed of target activity within a monitored area. If a tracked target exhibits rapid movement or frequent appearances within the monitored field of view, it indicates high activity, and its IRR is correspondingly set to a higher value. The IRR can be set by analyzing historical target behavior data, for example, by calculating the target's average speed or other activity metrics over a specific time period. A target with a high IRR will require more computational resources to ensure accurate tracking in a multi-target tracking system, as it may enter or leave the monitored area more frequently or interact with other targets. This evaluation method facilitates dynamic optimization of resource allocation, ensuring the system can adapt to constantly changing target behavior.
[0047] In some embodiments, environmental capacity defines the maximum amount of computational resources that can be allocated to a specific target in a multi-target tracking system. These computational resources may include processing time, memory usage, or other critical system resources. The environmental capacity is set taking into account the type and characteristics of the tracked target, as different types of tracked targets may have different resource requirements. For example, a large or high-speed moving vehicle may require more processing power for effective tracking than a small, stationary object. The value of the environmental capacity is typically set based on the overall performance metrics of the system and the specific requirements of the type of tracked target. System designers need to assess available computational resources and allocate them according to the importance of the tracked target, the tracking difficulty, and the expected behavior. By setting the environmental capacity appropriately, it is ensured that each tracked target receives sufficient resources to maintain tracking accuracy and responsiveness, while avoiding resource waste and improving the overall operating efficiency of the system.
[0048] In some embodiments, the initial resource amount is represented by the "population" size of the tracked targets. This can be understood as the amount of computational resources currently occupied or allocated to a tracked target in the system, reflecting the importance of the tracked target and the processing power required during the tracking process. For example, if a tracked target is located in the central region of the monitoring field of view at the beginning of a video frame, or if its motion characteristics and behavioral patterns indicate that it will soon interact with other targets or attract significant visual attention, the system may allocate more initial resources to it to ensure accurate and effective tracking. In other words, the setting of the initial resource amount is closely related to the target's initial position, expected behavior, and likelihood of interaction, and is a key factor in dynamic resource allocation strategies.
[0049] In some embodiments, the interaction coefficient describes the competitive relationship between two tracked targets, specifically the degree to which target A may preempt or influence target B in resource allocation. This parameter measures the relative influence of different tracked targets competing with each other in a resource-constrained environment and is an important component of the dynamic resource allocation strategy in a multi-target tracking system.
[0050] If the activity trajectories of two targets within a monitored area are independent, such as two vehicles traveling in different lanes, their interaction coefficient will be relatively low because they have less competition for resources. Conversely, if two targets are frequently in close proximity or have potential interaction possibilities, such as pedestrians and vehicles meeting at the same intersection, their interaction coefficient will be set accordingly higher to reflect the possible competition between them.
[0051] The setting of interaction coefficients is typically based on in-depth analysis of the monitoring scenario and empirical estimation of the behavioral patterns of the tracked targets. Properly evaluating these coefficients is crucial for ensuring that the system can effectively balance resource allocation among multiple tracked targets, preventing some targets from failing to track due to insufficient resources, while also ensuring that resources are not over-allocated to targets with minimal mutual influence. In this way, the system can more intelligently respond to the relative importance and interactivity between tracked targets, optimizing overall tracking performance.
[0052] Based on the above embodiments, in some embodiments, the initial data includes the position, size, and velocity of each tracked target. Based on this, the determination of resource parameters for each tracked target according to the initial data mentioned in step S02 can specifically be as follows: Calculate the intrinsic growth rate based on the speed of each tracked target:
[0053] in, For the first The intrinsic growth rate of the tracked target, Calculate the function for the intrinsic growth rate. For the first The speed of the tracked target The internal growth rate ratio coefficient. This represents the maximum value of the intrinsic growth rate. Calculate the corresponding environmental capacity based on the location and size of each tracked target:
[0054] in, For the first The environmental capacity of a tracking target This is the function for calculating environmental capacity. For the first The size of the tracked target, For the first The location of the tracking target. This is the environmental capacity ratio coefficient. For position weighting functions; Calculate the initial resource quantity based on the size and velocity of each tracked target:
[0055] in, For the first The initial resource amount for each tracking target, This is the function for calculating the initial resource quantity. This is the initial resource quantity ratio coefficient; Calculate the corresponding interaction coefficient based on the position and velocity of each tracked target:
[0056] in, For the first The x-coordinate of each tracked target, For the first The vertical coordinate of the tracked target, For the first The x-coordinate of each tracked target, For the first The vertical coordinate of the tracked target, For the first The tracking target and the first The distance between the tracked targets For the first The tracking target and the first The interaction coefficient between the tracked targets This is the interaction proportionality coefficient.
[0057] In this embodiment, the intrinsic growth rate is calculated based on the speed of each tracked target, enabling a quantitative assessment of target activity and providing a scientific basis for dynamic resource allocation. This method ensures that the system can identify rapidly moving or frequently changing tracked targets and allocate more computing resources to them, guaranteeing the continuity and accuracy of tracking. By calculating the intrinsic growth rate, the system can adapt to rapid changes in target behavior, optimize resource allocation between active and relatively stationary targets, improve resource utilization efficiency, reduce waste of computing resources, and ensure that critical tracked targets receive sufficient processing power, thereby enhancing the performance and response speed of the entire multi-target tracking system.
[0058] In this embodiment, the corresponding environmental capacity is calculated based on the location and size of each tracked target, providing a quantitative method for defining and limiting the maximum resource allocation for each target in a multi-target tracking system, ensuring that resource allocation is both reasonable and efficient. By considering the physical size of the target and its specific location in the monitoring scene, the system can more accurately assess the actual computing resource requirements of each target, thereby allocating more resources to targets in large or central areas, and less resources to targets in small or peripheral areas.
[0059] In this embodiment, the initial resource allocation is calculated based on the size and speed of the tracked target, ensuring that system resources are preferentially allocated to large or fast-moving targets that require more processing power, thereby improving tracking accuracy and efficiency. By considering the physical size and speed of the target, the system can more accurately predict the computing resource requirements of each target, optimize resource allocation, avoid resource waste, and ensure that critical targets receive sufficient attention.
[0060] In this embodiment, the interaction coefficient is calculated based on the position and velocity of each tracked target, enabling precise quantification of the potential influence and competition between targets, thus providing an important reference for resource allocation. This method allows the system to intelligently identify and respond to the proximity and dynamic interactions between targets, dynamically adjusting resources for targets in high-risk or critical positions to ensure they receive sufficient processing power to maintain tracking stability and accuracy. Furthermore, by rationally setting the interaction coefficient, the system can balance resource allocation among multiple targets, optimize overall tracking efficiency, reduce tracking errors caused by mutual interference between targets, and enhance the robustness and adaptability of the multi-target tracking system in complex scenarios.
[0061] Step S03: Construct an ecological model based on resource parameters, and predict the resource change rate required to calculate resources for each tracking target based on the ecological model.
[0062] In this embodiment, by constructing an ecological model based on resource parameters and predicting the rate of change of computational resources required for each tracked target, the dynamic competitive relationship and resource demands among tracked targets can be simulated. This allows the system to dynamically adjust resource allocation based on the simulated real-time behavior and scene changes of the tracked targets, ensuring that critical targets receive sufficient computational resources while reducing resource allocation to non-critical targets. This improves resource utilization efficiency and the overall performance of the multi-target tracking system. Furthermore, predicting the rate of change of resources helps the system respond in advance to potential fluctuations in resource demand, optimize long-term resource planning, avoid tracking errors or system overload caused by improper resource allocation, and achieve more stable and reliable tracking results.
[0063] In some embodiments, an ecological model is constructed based on resource parameters, and the rate of change of resources required for each tracked target is predicted based on the ecological model. Specifically, the Lotka-Volterra equation or other similar mathematical models can be used to describe the competition and resource allocation relationship between tracked targets. Then, numerical integration methods, such as the Euler method or the Runge-Kutta method, are used to perform time-step simulation of the ecological model to predict the rate of change of resources over time.
[0064] Based on the above embodiments, in some embodiments, step S03, which involves constructing an ecological model based on resource parameters and predicting the resource change rate required to calculate resources for each tracking target based on the ecological model, can specifically be as follows: Build a corresponding ecological model for each tracking target based on resource parameters:
[0065] in, For the first The resource change rate that needs to be calculated for each tracking target. The total number of targets being tracked.
[0066] This embodiment, by setting appropriate initial conditions and applying numerical integration techniques to integrate the ecological model equations, can accurately predict the resource allocation required for each tracked target over time, i.e., the rate of resource change. This process also reveals how the competitive relationships between targets affect real-time resource allocation. With this key information, the multi-target tracking algorithm can precisely adjust the tracking intensity of different targets at any given time based on the predicted resource requirements and competitive dynamics. This dynamic resource management strategy ensures close tracking of high-priority targets while rationally allocating resources to other targets, thereby optimizing the overall tracking performance and improving the system's adaptability and efficiency in complex environments.
[0067] Step S04: Calculate the resource allocation ratio based on the resource change rate, and then calculate the resource allocation according to the resource allocation ratio.
[0068] In this embodiment, by quantifying the resource requirements of the tracked targets over time, the share of computing resources each target should receive is determined. Resource allocation is dynamically adjusted based on the changing resource requirements of each target, ensuring that critical targets receive sufficient resources to maintain effective tracking, while avoiding over-allocation of resources to targets with lower resource requirements. This maximizes resource utilization efficiency, ensuring that the system can intelligently respond to changes in target behavior even with limited resources, optimizing the overall performance of multi-target tracking, and improving the system's response speed and accuracy. In this way, the multi-target tracking system can operate more flexibly and efficiently, adapting to constantly changing monitoring environments and target behaviors.
[0069] In some embodiments, the resource requirements of each tracked target can be compared with the total requirements of all tracked targets to obtain a resource allocation ratio. Then, the calculated resource allocation ratio is applied to the actual resource allocation, allocating CPU time, memory, and other computing resources to each tracked target according to the ratio. Finally, the system continuously monitors the actual resource usage and adjusts the resource allocation ratio based on real-time feedback to ensure that resource allocation meets current needs while maintaining long-term stable system operation. Through this dynamic resource management method, the system can adapt to changes in the behavior of tracked targets, optimize resource utilization efficiency, and improve the performance of multi-target tracking.
[0070] Based on the above embodiments, in some embodiments, the step S04 mentioned in calculating the resource allocation ratio based on the resource change rate and calculating resource allocation according to the resource allocation ratio can specifically be as follows: Obtain the preset time step, and calculate the resource change for each tracked target based on the time step and the resource change rate:
[0071] in, For the first The amount of resource change for each tracking target. For time step; Obtain a preset threshold and update the initial resource quantity based on the preset threshold and the resource change amount:
[0072] in, For the first The updated resource quantity for each tracking target. The preset threshold; Calculate the resource allocation ratio for each tracked target based on the changes in resources and the initial resource quantity:
[0073] in, For the first The resource allocation ratio for each tracking target. For the first The updated resource quantity for each tracking target.
[0074] In some embodiments, since the amount of resources allocated to the tracking target cannot be reduced to a negative value, if the calculated result of the updated amount of resources is negative, it is set to a preset threshold to avoid the occurrence of a negative amount of resources.
[0075] Based on the above technical solution, this invention simulates the resource competition relationship between tracking targets by setting up an ecological model, and predicts the resource change rate of each tracking target accordingly. This allows for the calculation of resource allocation ratios and real-time resource allocation, enabling the invention to adapt to real-time changes in the monitoring scenario. It ensures that high-priority targets receive sufficient computing resources while avoiding resource waste on low-priority targets, thus significantly improving the efficiency and response speed of multi-target tracking systems and enhancing overall performance and stability. Furthermore, the adaptive nature of this invention reduces reliance on manual intervention, providing an innovative solution for automated monitoring in complex environments.
[0076] The following example illustrates the computational process of resource allocation for multi-target tracking: Suppose a surveillance scenario involves two tracking targets: two vehicles and one pedestrian. The Lotka-Volterra competition model is used to determine how to allocate computational resources among these three targets. In this embodiment, the amount of resources allocated can be analogized to tracking priority; that is, targets with larger resource allocations will receive more tracking effort.
[0077] The computational process for allocating computational resources in multi-target tracking may include: 1. Initialize parameters: Obtain initial data for the three tracking targets based on the input video stream. 1) Target 1 (Vehicle A): ①Internal growth rate r1 = 0.2 ②Environmental capacity K1 = 150 ③ Initial resource quantity X1 = 60 2) Target 2 (Vehicle B): ① Internal growth rate r² = 0.15 ②Environmental capacity K2=120 ③ Initial resource quantity X2 = 40 3) Target 3 (Pedestrian): ①The internal growth rate r3 = 0.1 ②Environmental capacity K3=80 ③ Initial resource quantity x 3 = 30 4) Interaction coefficient: ①α 12 (Influence of car A on car B): 0.8 ②α 21 (Influence of car B on car A): 0.8 ③α 13 (Depth of impact of vehicle A on pedestrians): 1.0 ④α 31 (Influence of pedestrians on vehicle A): 1.0 ⑤α23 (Depth of impact of vehicle B on pedestrians): 0.5 ⑥α 32 (Influence of pedestrians on vehicle B): 0.5 II. Calculation process: Assume the time step Δt = 1.
[0078] 1) Resource change rate for objective 1 (vehicle A):
[0079] 2) Resource change rate for objective 2 (vehicle B):
[0080] 3) Resource change rate for objective 3 (pedestrians):
[0081] 4) Update resource quantity: ① Updated resource quantity for Target 1 (Vehicle A):
[0082] ② Resource quantity after update for Objective 2 (Vehicle B):
[0083] ③ Updated resource quantity for Target 3 (pedestrians):
[0084] III. Calculation Results: After a time update, the computational resources allocated to vehicle A increased from 60 to 62.24, the computational resources allocated to vehicle B increased from 40 to 40.85, while the computational resources allocated to the pedestrian decreased to 29.0625. Therefore, vehicle A will be allocated 47% of the computational resources according to 62.24 / (62.24+40.85+29.0625)=0.47. Similarly, vehicle B will be allocated 31% of the computational resources, and the pedestrian will be allocated 22%.
[0085] Please refer to Figure 2 This is a schematic diagram of a computing resource allocation device for multi-target tracking provided in an embodiment of the present invention. The computing resource allocation device for multi-target tracking includes: The acquisition module 100 is used to acquire initial data for each tracked target based on the input video stream; The determination module 200 is used to determine the resource parameters of each tracking target based on the initial data; The model building module 300 is used to build an ecological model based on resource parameters and predict the resource change rate of each tracking target based on the ecological model. The calculation module 400 is used to calculate the resource allocation ratio based on the resource change rate, and to calculate resource allocation according to the resource allocation ratio.
[0086] Based on the above embodiments, in one specific embodiment, the initial data includes the position, size, and velocity of each tracked target; the determination module 200 can specifically be used for: Calculate the intrinsic growth rate based on the speed of each tracked target:
[0087] in, For the first The intrinsic growth rate of the tracked target, Calculate the function for the intrinsic growth rate. For the first The speed of the tracked target The internal growth rate ratio coefficient. This represents the maximum value of the intrinsic growth rate. Calculate the corresponding environmental capacity based on the location and size of each tracked target:
[0088] in, For the first The environmental capacity of a tracking target This is the function for calculating environmental capacity. For the first The size of the tracked target, For the first The location of the tracking target. This is the environmental capacity ratio coefficient. For position weighting functions; Calculate the initial resource quantity based on the size and velocity of each tracked target:
[0089] in, For the first The initial resource amount for each tracking target, This is the function for calculating the initial resource quantity. This is the initial resource quantity ratio coefficient; Calculate the corresponding interaction coefficient based on the position and velocity of each tracked target:
[0090] in, For the first The x-coordinate of each tracked target, For the first The vertical coordinate of the tracked target, For the first The x-coordinate of each tracked target, For the first The vertical coordinate of the tracked target, For the first The tracking target and the first The distance between the tracked targets For the first The tracking target and the first The interaction coefficient between the tracked targets This is the interaction proportionality coefficient.
[0091] Based on the above embodiments, in one specific embodiment, the model building module 300 can be specifically used for: Build a corresponding ecological model for each tracking target based on resource parameters:
[0092] in, For the first The resource change rate that needs to be calculated for each tracking target. The total number of targets being tracked.
[0093] Based on the above embodiments, in one specific embodiment, the computing module 400 may be used for: Obtain the preset time step, and calculate the resource change for each tracked target based on the time step and the resource change rate:
[0094] in, For the first The amount of resource change for each tracking target. For time step; Obtain a preset threshold and update the initial resource quantity based on the preset threshold and the resource change amount:
[0095] in, For the first The updated resource quantity for each tracking target. The preset threshold; Calculate the resource allocation ratio for each tracked target based on the changes in resources and the initial resource quantity:
[0096] in, For the first The resource allocation ratio for each tracking target. For the first The updated resource quantity for each tracking target.
[0097] Based on the above embodiments, in one specific embodiment, the calculation module 400 can also be used for: Execute the input modification command to modify the preset threshold.
[0098] Based on the above embodiments, in one specific embodiment, the acquisition module 100 can be specifically used for: Identify and track targets from the video stream, and detect the ecological attribute parameters of each tracked target; Read the position, size, and velocity of each tracked target from the ecological attribute parameters; The position, size, and velocity of each tracked target are determined as initial data.
[0099] Based on the above embodiments, in a specific embodiment, the ecological attribute parameters further include at least one of the following: activity range, activity level, survival time, type, interaction relationship, and environmental capacity.
[0100] This embodiment provides an electronic device, including a processor and a memory. The memory is used to store at least one instruction. When the instruction is loaded and executed by the processor, it implements the above-described method for allocating computing resources for multi-target tracking. Its execution method and beneficial effects are similar and will not be described again here.
[0101] This invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the above-described method for allocating computing resources for multi-target tracking. The execution method and beneficial effects are similar and will not be described again here.
[0102] It should be noted that although the steps are described in a specific order above, it does not mean that the steps must be executed in the above specific order. In fact, some of these steps can be executed concurrently, or even in a different order, as long as the required function can be achieved.
[0103] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for allocating computational resources for multi-target tracking, characterized in that, include: Initial data for each tracked target is obtained from the input video stream; The resource parameters for each of the tracked targets are determined based on the initial data; An ecological model is constructed based on the resource parameters, and the resource change rate required to calculate the resources for each of the tracking targets is predicted based on the ecological model. The resource allocation ratio is calculated based on the resource change rate, and resource allocation is performed according to the resource allocation ratio.
2. The method according to claim 1, characterized in that, The initial data includes the position, size, and velocity of each tracked target; The step of determining the resource parameters for each tracking target based on the initial data includes: Calculate the corresponding intrinsic growth rate based on the speed of each of the tracked targets: in, For the first The intrinsic growth rate of the tracked target, Calculate the function for the intrinsic growth rate. For the first The speed of the tracked target The internal growth rate ratio coefficient. This represents the maximum value of the intrinsic growth rate. Calculate the corresponding environmental capacity based on the location and size of each tracked target: in, For the first The environmental capacity of a tracking target This is the function for calculating environmental capacity. For the first The size of the tracked target, For the first The location of the tracking target. This is the environmental capacity ratio coefficient. For position weighting functions; Calculate the corresponding initial resource amount based on the size and speed of each tracked target: in, For the first The initial resource amount for each tracking target, This is the function for calculating the initial resource quantity. This is the initial resource quantity ratio coefficient; Calculate the corresponding interaction coefficient based on the position and velocity of each tracked target: in, For the first The x-coordinate of each tracked target, For the first The vertical coordinate of the tracked target, For the first The x-coordinate of each tracked target, For the first The vertical coordinate of the tracked target, For the first The tracking target and the first The distance between the tracked targets For the first The tracking target and the first The interaction coefficient between the tracked targets This is the interaction proportionality coefficient.
3. The method according to claim 2, characterized in that, The step of constructing an ecological model based on the resource parameters and predicting the resource change rate required for each tracking target based on the ecological model includes: Based on the resource parameters, construct a corresponding ecological model for each tracking target: in, For the first The resource change rate that needs to be calculated for each tracking target. The total number of the tracked targets.
4. The method according to claim 3, characterized in that, The step of calculating the resource allocation ratio based on the resource change rate and calculating resource allocation according to the resource allocation ratio includes: Obtain a preset time step, and calculate the resource change amount for each tracked target based on the time step and the resource change rate: in, For the first The amount of resource change for each tracking target. For time step; Obtain a preset threshold, and update the initial resource quantity based on the preset threshold and the resource change amount: in, For the first The updated resource quantity for each tracking target. The preset threshold; Calculate the resource allocation ratio for each tracked target based on the resource change and the initial resource amount: in, For the first The resource allocation ratio for each tracking target. For the first The updated resource quantity for each tracking target.
5. The method according to claim 4, characterized in that, Before updating the initial resource quantity based on the preset threshold and the resource change amount, the method further includes: The input modification command is executed to modify the preset threshold.
6. The method according to claim 1, characterized in that, The step of obtaining initial data for each tracked target based on the input video stream includes: Identify tracking targets from the video stream and detect the ecological attribute parameters of each tracking target; The position, size, and velocity of each tracked target are read from the ecological attribute parameters; The position, size, and velocity of each of the tracked targets are determined as the initial data.
7. The method according to claim 6, characterized in that, The ecological attribute parameters also include at least one of the following: activity range, activity level, survival time, type, interaction relationship, and environmental capacity.
8. A device for allocating computational resources for multi-target tracking, characterized in that, include: The acquisition module is used to acquire initial data for each tracked target based on the input video stream; A determination module is used to determine the resource parameters of each of the tracking targets based on the initial data; The model building module is used to construct an ecological model based on the resource parameters, and to predict the resource change rate of each tracking target based on the ecological model. The calculation module is used to calculate the resource allocation ratio based on the resource change rate, and to calculate resource allocation according to the resource allocation ratio.
9. An electronic device, characterized in that, include: A processor and a memory, the memory being used to store at least one instruction, which, when loaded and executed by the processor, implements the method for allocating computational resources for multi-target tracking as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method for allocating computational resources for multi-target tracking as described in any one of claims 1-7.