NVR and IPC management method for switching and storing multi-region dynamic video streams

By acquiring real-time video streams from multiple IPCs, identifying moving targets and calculating activity density, and dynamically adjusting video stream bandwidth and storage strategies, it solves the problems of resource waste and poor monitoring effects in traditional methods, and realizes multi-region video surveillance systems. Efficient resource management and improved response speed.

CN118741023AActive Publication Date: 2024-10-01雅安数字经济运营有限公司
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411232594.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-04
Publication Date
2024-10-01
Estimated Expiration
2044-09-04

AI Technical Summary

Technical Problem

In multi-area video surveillance systems, traditional NVR and IPC management methods are difficult to dynamically adjust the transmission bandwidth of the video stream according to the activity density of the surveillance area, resulting in a waste of network resources or the inability to timely transmit high-definition images in areas with high activity density, affecting the monitoring effect.

Method used

By acquiring real-time video streams from multiple IPCs, performing frame extraction and preprocessing, identifying moving targets, calculating the activity density of each monitoring area, and dynamically adjusting the transmission bandwidth of the IPC video stream and the storage strategy of the NVR based on the activity density, using real-time feedback Mechanism optimized for activity detection and bandwidth management.

Benefits of technology

It achieves reasonable allocation of storage resources in high activity density areas, improves the resource utilization and response speed of the monitoring system, and ensures adaptive adjustment capabilities under dynamic changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118741023A_ABST
    Figure CN118741023A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of video network application, and relates to an NVR and IPC management method for multi-region dynamic video stream switching and storage. Real-time video streams are obtained from a plurality of IPCs, a continuous image frame sequence is obtained through frame extraction and preprocessing, activity detection is carried out based on continuous image frames, moving target information in a video is recognized and extracted, the activity density value of each monitoring area is calculated through analysis of the moving target information, and after the activity density is obtained, the real-time video is obtained. The system dynamically adjusts the transmission bandwidth of the IPC video stream and the storage of the NVR according to the activity density of each region, and ensures that the storage resources of the high-activity-density region are reasonably distributed; and finally, the system analyzes the actual effect after the bandwidth and the storage strategy are adjusted through a real-time feedback mechanism, compares the actual effect with an expected effect, and continuously improves the accuracy of activity detection, bandwidth management and the storage strategy by adopting an optimization algorithm based on feedback data, so that the self-adaptive adjustment of dynamic change is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of video network application technology, and more specifically, to an NVR and IPC management method for multi-region dynamic video stream switching and storage. Background Art

[0002] In modern video surveillance systems, with the increase of urbanization and security needs, multi-area monitoring has become an indispensable part. Especially in the fields of urban security, traffic monitoring, intelligent buildings, etc., a large number of video surveillance devices (IPC, network cameras) and network video recorders (NVR) are widely deployed. These devices are interconnected through the network to realize the real-time acquisition, storage and management of video data in multiple areas. However, with the increase in the number of monitoring areas and the complexity of monitoring needs, the traditional NVR and IPC management methods face some technical challenges; that is, in a multi-area video surveillance system, the activity density of different monitoring areas changes frequently, and some areas may have a high activity density during a specific period of time, while other areas are relatively quiet. If the video streams of each area are transmitted with the same bandwidth, this will lead to a waste of network resources, or high-definition images cannot be transmitted in time in areas with high activity density, affecting the monitoring effect. Therefore, how to dynamically adjust the transmission bandwidth of the IPC video stream according to the activity density of the monitoring area has become an important technical issue in the management of video surveillance systems. Summary of the invention

[0003] The present invention provides an NVR and IPC management method for multi-region dynamic video stream switching and storage, and intends to solve the problem of dynamically adjusting the transmission bandwidth of the IPC video stream based on the activity density of the monitored area.

[0004] The NVR and IPC management method for multi-area dynamic video stream switching and storage includes the following steps: Step 1: Obtain real-time video streams from multiple IPCs to obtain video frame data, and perform frame extraction and preprocessing on the obtained video frame data to obtain a continuous image frame sequence; Step 2: Perform activity detection based on a continuous image frame sequence to identify the moving target in the video and obtain relevant information about the moving target; Step 3: Based on the relevant information of the moving target, the activity density of each monitoring area is calculated to obtain the activity density value of each monitoring area; Step 4: Dynamically adjust the transmission bandwidth of the IPC video stream and the storage strategy of the NVR according to the changes in activity density; Step 5: Provide real-time feedback on the effects of bandwidth and storage policy adjustments, analyze the gap between actual effects and expectations, obtain feedback data, and use optimization algorithms based on the feedback data to improve the accuracy of activity detection, bandwidth management, and storage policies.

[0005] The present invention obtains real-time video streams from multiple IPCs, and obtains a continuous image frame sequence through frame extraction and preprocessing, performs activity detection based on the continuous image frames, identifies and extracts the moving target information in the video, and calculates the activity density value of each monitoring area by analyzing the moving target information. After obtaining the activity density, the system dynamically adjusts the transmission bandwidth of the IPC video stream and the storage of the NVR according to the activity density of each area, ensuring that the storage resources in the high activity density area are reasonably allocated; finally, the system analyzes the actual effect of the bandwidth and storage strategy after adjustment through a real-time feedback mechanism, compares it with the expected effect, and uses an optimization algorithm based on the feedback data to continuously improve the accuracy of activity detection, bandwidth management and storage strategy, thereby realizing adaptive adjustment to dynamic changes.

[0006] Preferably, step 2 comprises the following steps: Step 2.1: Calculate the difference between the current frame and the background model based on the background difference method to obtain a differential image; Step 2.2: Adaptively binarize the difference image to convert pixels into binary format, distinguish between static and moving areas, and use an adaptive threshold method to ensure accurate identification of moving areas under different lighting conditions; Step 2.3: In the binary image, use the Connected Components detection algorithm to identify independent moving target areas; Step 2.4: For each identified moving target area, calculate the position of the centroid in the moving target area; Count the pixels of each moving target region based on the moving target region class area; The target speed is calculated by combining the streamer method, Kalman filtering and joint probabilistic data association algorithm.

[0007] Preferably, the position of the centroid in the moving target area is calculated using a weighted method: ; Where: Represents pixel The weight of Indicates the moving target area The centroid coordinates of and Respectively represent the horizontal and vertical coordinates of the pixel in the image; The weight of the pixel is calculated based on brightness and foreground probability: ; Where: Represents the pixel point in the current frame t Brightness; Represents pixel Probability of belonging to the prospect; Represents the weight coefficient of the brightness term; Represents the weight coefficient of the foreground probability term.

[0008] Preferably, the steps of calculating the speed of the target are as follows: Target position prediction and update: Use the Kalman filter to predict and update the position of each target i: Target location prediction: ; ; Where: and are the predicted values ​​of the centroid position of target i at time t; and is the actual centroid position of target i at time t-1; and are the velocity components of target i at time t-1 respectively; Location Updates: ; ; Where: and is the observed value of target i at time t; and is the Kalman gain; Target velocity calculation: The velocity of each target is estimated based on the change in the center of mass position between consecutive frames: ; Where: represents the speed of target i at time t; is the frame time interval; The joint probability data association algorithm calculates the joint probability between each observation and all observations to determine the best target-observation pair: ; Where: represents the association probability between target i and observation j; represents the inverse matrix of the covariance matrix; n represents the total number of all targets; represents the exponential term of the Gaussian distribution function; Represents the difference vector The transpose of The representation is as follows: ; Where: The horizontal axis represents the observation value j at time t; The ordinate represents the observation value j at time t; After target association, calculate the final velocity of each target: ; Where: represents the final velocity of target i; represents the velocity vector of target i and observation j; N represents the total number of all observations at time t.

[0009] Preferably, step 3 comprises the following steps: Calculate the moving target's contribution to the activity density: map the moving target's position to the corresponding monitoring area, determine the monitoring area described by the moving target, traverse all the moving targets belonging to each monitoring area, and calculate the moving target's contribution to the activity density in the area: ; Where: represents the activity density of monitoring area j; represents the area of ​​moving target i; Indicates the speed of the moving target; and represents the weight coefficient; Normalize the activity density of each region by its maximum value: ; Where: represents the normalized activity density value of the jth monitoring area; Indicates the maximum activity density value in all monitoring areas; Represents a decimal value to prevent division by zero; When the Less than the preset minimum activity density threshold When , it is considered that there is no activity in the area and the density value is set to 0; finally, the activity density value of each monitoring area j is obtained .

[0010] Preferably, step 4 comprises the following steps: Calculate bandwidth and storage allocation for each monitoring area based on activity density values: ; ; Where: Indicates the minimum bandwidth of each monitoring area; represents the normalized activity density value of the jth monitoring area; represents the normalized activity density value of the kth monitoring area; Indicates the total bandwidth; Indicates the total storage space of the NVR; Indicates the minimum storage space for each monitoring area; and represents the Lagrange multiplier; Indicates the number of monitoring areas; represents the bandwidth allocation of monitoring area j; Indicates the storage allocation of the monitoring area; Calculate the objective function based on the calculated bandwidth and storage allocation: ; Where: and represents the weight coefficient; When calculating the objective function, the following constraints need to be met: ; ; Adjust based on objective function and constraints: If the objective function does not reach the desired optimal value or the constraints are not met, adjust the parameters , or weight coefficient , , recalculate the bandwidth and storage allocation until the objective function reaches the optimal value while satisfying all constraints.

[0011] Preferably, the specific steps of step 5 are as follows: Initialization: Use the value calculated in the previous step , , , As initial value; Minimize the deviation: Use gradient descent to minimize the parameters , , , Fine-tune the object to minimize the objective function so that the deviation rate is close to 0, where the objective function is: ; Where: Indicates the actual bandwidth usage and expected bandwidth of each area The relative deviation between Indicates the actual storage used and expected storage in each area The relative deviation between represents the storage redundancy coefficient; Represents the value of minimizing the corresponding objective function; In each round of iteration, the bandwidth and storage allocation values ​​of each monitoring area are recalculated, and feedback data is collected and processed again until the objective function reaches the optimal value or meets the convergence conditions.

[0012] Preferably, in step 4, the following objective function is used to perform bandwidth and storage allocation in the monitoring area: ; Where: and represents the adjustment parameter; Indicates the actual bandwidth usage and expected bandwidth of each area The relative deviation between Indicates the actual storage used and expected storage in each area The relative deviation between represents the storage redundancy coefficient; Indicates the total bandwidth; Indicates the total storage space of the NVR; represents the bandwidth allocation of monitoring area j; represents the storage allocation of monitoring area j; and represents the weight coefficient; represents the normalized activity density value of the jth monitoring area; Represents the value of minimizing the corresponding objective function; Indicates the actual bandwidth usage and expected bandwidth of monitoring area j The difference between Indicates the actual storage usage and expected storage capacity of monitoring area j The difference between .

[0013] The beneficial effects of the present invention include: The present invention obtains real-time video streams from multiple IPCs, and obtains a continuous image frame sequence through frame extraction and preprocessing, performs activity detection based on the continuous image frames, identifies and extracts the moving target information in the video, and calculates the activity density value of each monitoring area by analyzing the moving target information. After obtaining the activity density, the system dynamically adjusts the transmission bandwidth of the IPC video stream and the storage of the NVR according to the activity density of each area, ensuring that the storage resources in the high activity density area are reasonably allocated; finally, the system analyzes the actual effect of the bandwidth and storage strategy after adjustment through a real-time feedback mechanism, compares it with the expected effect, and uses an optimization algorithm based on the feedback data to continuously improve the accuracy of activity detection, bandwidth management and storage strategy, thereby realizing adaptive adjustment to dynamic changes. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0015] Figure 1 An overall step block diagram provided for an embodiment of the present invention.

[0016] Figure 2 A specific step block diagram of step 2 provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0017] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0018] Example 1, see Figure 1 As shown, the NVR and IPC management method for multi-area dynamic video stream switching and storage includes the following steps: Step 1: Obtain real-time video streams from multiple IPCs to obtain video frame data, and perform frame extraction and preprocessing on the obtained video frame data to obtain a continuous image frame sequence; Exemplary technical solutions are as follows: Get the video stream from IPC and extract a continuous sequence of image frames; use a Gaussian mixture model to distinguish the foreground and background and adapt to lighting changes and dynamic backgrounds; use adaptive histogram equalization and median filtering to enhance contrast and eliminate noise, respectively.

[0019] Step 2: Perform activity detection based on a continuous image frame sequence to identify the moving target in the video and obtain relevant information about the moving target; See also Figure 2 As shown, step 2 includes the following steps: Step 2.1: Calculate the current frame based on the background difference method With background model The difference between ; ; Where: It represents the difference between each pixel in the image and the background model, and is used to identify the moving area in the image.

[0020] Step 2.2: Difference image Adaptive binarization is performed to convert pixels into binary format to distinguish between static and moving areas, and an adaptive threshold method is used to ensure accurate identification of moving areas under different lighting conditions; ; Where: is a threshold that is adaptively adjusted according to the local characteristics of the image; Represents the binary image matrix, used to represent pixel points Whether it belongs to the motion area (value 1) or the static area (value 0); It is stated The steps to determine are as follows: ; ; ; Where: Indicates the number of pixels within the window; Represents the pixel in the current frame The brightness value of Represents the mean value of pixels within the window; Represents the standard deviation of pixels within the window; Represents the control factor, which is used to adjust the sensitivity of the threshold; In this embodiment, by calculating the mean and standard deviation within the local window, the threshold is adaptively adjusted according to the local characteristics of the image, so that the threshold can dynamically adapt to different lighting conditions; ensuring that in scenes with uneven lighting or changing lighting conditions, the moving area can still be accurately identified, avoiding the problem of false detection or missed detection of traditional fixed threshold methods in such scenes.

[0021] Step 2.3: In the binary image, use the Connected Components detection algorithm to identify independent moving target areas; The specific steps are as follows: Marker initialization: Initialize a marker matrix , and the binary image They have the same dimensions, and the initial value of all elements in the matrix is ​​0, indicating pixels that have not been marked; Scanning binary image: Binarized image Scan pixel by pixel, and when a pixel is detected and When , it means that the pixel belongs to a newly discovered moving target area, and the area expansion begins; Region expansion: from the starting pixel First, mark the adjacent pixels in the same motion area through four-connectivity or eight-connectivity, use recursion or stack to expand, mark all pixels in the current area, and assign a unique area mark value ; Region marking completed: After all motion regions are marked, the marking matrix Each non-zero value in represents an independent moving target area, and the mark value represents the i-th region; Generate motion target area: Based on the marking matrix , extract all independent moving target areas , record the boundaries, area and other information of each area.

[0022] In this embodiment, the Connected Components detection algorithm can accurately separate different moving targets to avoid target overlap or confusion.

[0023] Step 2.4: For each identified moving target area, calculate the position of the centroid in the moving target area; The position of the center of mass in the moving target area is calculated using a weighted method: ; Where: Represents pixel The weight of Indicates the moving target area The centroid coordinates of and Respectively represent the horizontal and vertical coordinates of the pixel in the image; The weight of the pixel is calculated based on brightness and foreground probability: ; Where: Represents the pixel point in the current frame t Brightness; Represents pixel Probability of belonging to the prospect; Represents the weight coefficient of the brightness term; Represents the weight coefficient of the foreground probability term.

[0024] In this embodiment, the centroid is calculated for each moving target area, so that the position of the moving target can be accurately located. The pixel brightness and foreground probability are combined and a weighted average method is adopted to make the calculation result more accurate. The position of the centroid can not only reflect the central position of the moving target, but also provide information about the target shape and distribution, which is helpful for subsequent target tracking and behavior analysis. Since some areas of some moving targets may have a high similarity with the background, the accuracy of the target centroid calculation can be effectively improved by adjusting the weights of the brightness and foreground probability, thereby avoiding the influence of background interference on target positioning.

[0025] Count the pixels of each moving target region based on the moving target region class Area ; The target speed is calculated by combining the streamer method, Kalman filtering and joint probabilistic data association algorithm.

[0026] The steps to calculate the target's velocity are as follows: Target position prediction and update: Use the Kalman filter to predict and update the position of each target i: Target location prediction: ; ; Where: and are the predicted values ​​of the centroid position of target i at time t; and is the actual centroid position of target i at time t-1; and are the velocity components of target i at time t-1 respectively; Location Updates: ; ; Where: and is the observed value of target i at time t; and is the Kalman gain; Target velocity calculation: The velocity of each target is estimated based on the change in the center of mass position between consecutive frames: ; Where: represents the speed of target i at time t; is the frame time interval; The joint probability data association algorithm calculates the joint probability between each observation and all observations to determine the best target-observation pair: ; Where: represents the association probability between target i and observation j; represents the inverse matrix of the covariance matrix; n represents the total number of all targets; represents the exponential term of the Gaussian distribution function; Represents the difference vector The transpose of The representation is as follows: ; Where: The horizontal axis represents the observation value j at time t; The ordinate represents the observation value j at time t; After target association, calculate the final velocity of each target: ; Where: represents the final velocity of target i; represents the velocity vector of target i and observation j; N represents the total number of all observations at time t.

[0027] In order to handle the interaction between multiple targets and avoid mismatching, the JPDA algorithm is used for target association, which can accurately estimate the speed of each target in multi-target application scenarios and ensure robustness and accuracy in complex scenarios.

[0028] This embodiment combines Kalman filtering, streamer method and joint probabilistic data association algorithm to form an efficient and robust multi-target detection and tracking system. The system can not only accurately detect moving targets in complex environments, but also provide accurate target position and speed information, ensuring reliable operation under complex conditions such as noise, occlusion, and dense targets.

[0029] Step 3: Based on the relevant information of the moving target, the activity density of each monitoring area is calculated to obtain the activity density value of each monitoring area; The step 3 comprises the following steps: Calculate the moving target's contribution to the activity density: map the moving target's position to the corresponding monitoring area, determine the monitoring area described by the moving target, traverse all the moving targets belonging to each monitoring area, and calculate the moving target's contribution to the activity density in the area: ; Where: represents the activity density of monitoring area j; represents the area of ​​moving target i; Indicates the speed of the moving target; and represents the weight coefficient; Normalize the activity density of each region by its maximum value: ; Where: represents the normalized activity density value of the jth monitoring area; Indicates the maximum activity density value in all monitoring areas; Represents a decimal value to prevent division by zero; When the Less than the preset minimum activity density threshold When , it is considered that there is no activity in the area and the density value is set to 0; finally, the activity density value of each monitoring area j is obtained .

[0030] In this embodiment, the area and speed of the moving target are used as the key factors for calculating the activity density, and the weight coefficient is used to calculate the activity density. and By weighting and summing their contributions, this method can effectively capture the actual movement in the monitoring area. The activity density is normalized with the maximum value, and the effective monitoring area is screened out according to the preset threshold. This process ensures the accuracy and comparability of the activity density, especially in scenarios with multiple targets or complex motion trajectories.

[0031] Step 4: Dynamically adjust the transmission bandwidth of the IPC video stream and the storage strategy of the NVR according to the changes in activity density; The step 4 comprises the following steps: Calculate bandwidth and storage allocation for each monitoring area based on activity density values: ; ; Where: Indicates the minimum bandwidth of each monitoring area; represents the normalized activity density value of the jth monitoring area; represents the normalized activity density value of the kth monitoring area; Indicates the total bandwidth; Indicates the total storage space of the NVR; Indicates the minimum storage space for each monitoring area; and represents the Lagrange multiplier; Indicates the number of monitoring areas; represents the bandwidth allocation of monitoring area j; Indicates the storage allocation of the monitoring area; Calculate the objective function based on the calculated bandwidth and storage allocation: ; Where: and represents the weight coefficient; When calculating the objective function, the following constraints need to be met: ; ; Adjust based on objective function and constraints: If the objective function does not reach the desired optimal value or the constraints are not met, adjust the parameters , or weight coefficient , , recalculate the bandwidth and storage allocation until the objective function reaches the optimal value while satisfying all constraints.

[0032] In this embodiment, based on the calculated activity density, the IPC video stream transmission bandwidth and NVR storage strategy of the monitoring area are dynamically adjusted to make resource allocation more flexible and efficient. This method considers the weight of activity density, so that bandwidth and storage resources can be intelligently adjusted according to real-time needs to avoid resource waste or overload, thereby improving the operating efficiency and response speed of the entire monitoring system. For example, in an intelligent traffic monitoring system, the traffic flow of different roads and sections varies greatly. This solution can dynamically adjust the video stream bandwidth and storage strategy according to the actual traffic density, ensure the monitoring quality of high-flow sections, and reduce resource consumption in low-flow areas.

[0033] And in this embodiment, by calculating the objective function and combining the Lagrange multiplier and And the weight coefficient , The adjustment enables optimal allocation under the total resource limit, ensuring that the resource allocation of each monitoring area meets the overall optimization goal of the system and avoiding system bottlenecks caused by unreasonable resource allocation. At the same time, through the optimization adjustment of the objective function and constraint conditions, the solution ensures the robustness and stability of the system.

[0034] Step 5: Provide real-time feedback on the effects of bandwidth and storage policy adjustments, analyze the gap between actual effects and expectations, obtain feedback data, and use optimization algorithms based on the feedback data to improve the accuracy of activity detection, bandwidth management, and storage policies.

[0035] The specific steps of step 5 are as follows: Initialization: Use the value calculated in the previous step , , , As initial value; Minimize the deviation: Use gradient descent to minimize the parameters , , , Fine-tune the object to minimize the objective function so that the deviation rate is close to 0, where the objective function is: ; Where: Indicates the actual bandwidth usage and expected bandwidth of each area The relative deviation between Indicates the actual storage used and expected storage in each area The relative deviation between represents the storage redundancy coefficient; Represents the value of minimizing the corresponding objective function; Indicates the actual bandwidth usage and expected bandwidth of monitoring area j The difference between Indicates the actual storage usage and expected storage capacity of monitoring area j The difference between .

[0036] In each round of iteration, the bandwidth and storage allocation values ​​of each monitoring area are recalculated, and feedback data is collected and processed again until the objective function reaches the optimal value or meets the convergence conditions.

[0037] The present invention obtains real-time video streams from multiple IPCs, and obtains a continuous image frame sequence through frame extraction and preprocessing, performs activity detection based on the continuous image frames, identifies and extracts the moving target information in the video, and calculates the activity density value of each monitoring area by analyzing the moving target information. After obtaining the activity density, the system dynamically adjusts the transmission bandwidth of the IPC video stream and the storage of the NVR according to the activity density of each area, ensuring that the storage resources in the high activity density area are reasonably allocated; finally, the system analyzes the actual effect of the bandwidth and storage strategy after adjustment through a real-time feedback mechanism, compares it with the expected effect, and uses an optimization algorithm based on the feedback data to continuously improve the accuracy of activity detection, bandwidth management and storage strategy, thereby realizing adaptive adjustment to dynamic changes.

[0038] Embodiment 2: The difference between Embodiment 2 and Embodiment 1 is that the objective function used in step 4 is different. The objective function of Embodiment 2 is as follows: The following objective function is used in step 4 to perform bandwidth and storage allocation in the monitoring area: ; Where: and represents the adjustment parameter; Indicates the actual bandwidth usage and expected bandwidth of each area The relative deviation between Indicates the actual storage used and expected storage in each area The relative deviation between represents the storage redundancy coefficient; Indicates the total bandwidth; Indicates the total storage space of the NVR; represents the bandwidth allocation of monitoring area j; represents the storage allocation of monitoring area j; and represents the weight coefficient; represents the normalized activity density value of the jth monitoring area; Represents the value of minimizing the corresponding objective function; Indicates the actual bandwidth usage and expected bandwidth of monitoring area j The difference between Indicates the actual storage usage and expected storage capacity of monitoring area j The difference between .

[0039] In this embodiment, by simultaneously considering the objective functions of activity density and deviation minimization, we have considered the problem of deviation minimization in the initial stage. Therefore, when the optimization effect is good, we do not need to adopt the objective function of deviation minimization in step 5; if fine-tuning is required, the deviation minimization function in step 5 can be used for further optimization to ensure that the system can still further reduce the deviation based on the fusion objective function (the objective function considering activity density and deviation minimization); if the initial optimization stage based on the original fusion objective function has shown good convergence and sufficient accuracy, then the deviation minimization objective function in step 5 is not needed; therefore, in this embodiment, through the design of the fusion objective function, the optimization needs can be considered in the initial stage of resources, thereby reducing the magnitude of subsequent adjustments and improving the overall stability and efficiency of the system.

[0040] However, in Example 1 of the present application, two objective functions are adopted, namely, the initial allocation objective function in step 4 is intended to reasonably allocate bandwidth and storage resources according to the activity density of each monitoring area; the optimization objective function is the objective function of minimizing the deviation; therefore, the allocation scheme given by the initial allocation objective function deviates greatly from the demand in actual operation, which may lead to cumbersome adjustments and parameter changes in the optimization process, affecting the stability of the system; however, this technical problem also has a technical solution, that is, in the initial stage, set the allocation scheme as accurately as possible. , , , to ensure the rationality and stability of the initial allocation; we can set the initial values ​​of the above four parameters by testing; through testing, we can avoid the problem of large deviations, cumbersome adjustments and parameter changes in the optimization process, and affect the stability of the system.

[0041] The above are only preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. NVR and IPC management method for multi-region dynamic video stream switching and storage, characterized in that: The following steps are involved: Step 1: Obtain real-time video streams from multiple IPCs to obtain video frame data, and perform frame extraction and preprocessing on the obtained video frame data to obtain a continuous image frame sequence; Step 2: Perform activity detection based on a continuous image frame sequence to identify the moving target in the video and obtain relevant information about the moving target; Step 3: Based on the relevant information of the moving target, the activity density of each monitoring area is calculated to obtain the activity density value of each monitoring area; Step 4: Dynamically adjust the transmission bandwidth of the IPC video stream and the storage strategy of the NVR according to the changes in activity density; Step 5: Provide real-time feedback on the effects of bandwidth and storage policy adjustments, analyze the gap between actual effects and expectations, obtain feedback data, and use optimization algorithms based on the feedback data to improve the accuracy of activity detection, bandwidth management, and storage policies.

2. The NVR and IPC management method for multi-region dynamic video stream switching and storage according to claim 1 is characterized in that: The step 2 comprises the following steps: Step 2.1: Calculate the difference between the current frame and the background model based on the background difference method to obtain a differential image; Step 2.2: Adaptively binarize the difference image to convert pixels into binary format, distinguish between static and moving areas, and use an adaptive threshold method to ensure accurate identification of moving areas under different lighting conditions; Step 2.3: In the binary image, use the Connected Components detection algorithm to identify independent moving target areas; Step 2.4: For each identified moving target area, calculate the position of the centroid in the moving target area; Count the pixels of each moving target region based on the moving target region class area; The target speed is calculated by combining the streamer method, Kalman filtering and joint probabilistic data association algorithm.

3. The NVR and IPC management method for multi-region dynamic video stream switching and storage according to claim 2 is characterized in that: The position of the center of mass in the moving target area is calculated using a weighted method: ; Where: Represents pixel The weight of Indicates the moving target area The centroid coordinates of and Respectively represent the horizontal and vertical coordinates of the pixel in the image; The weight of the pixel is calculated based on brightness and foreground probability: ; Where: Represents the pixel point in the current frame t Brightness; Represents pixel Probability of belonging to the prospect; Represents the weight coefficient of the brightness term; Represents the weight coefficient of the foreground probability term.

4. The NVR and IPC management method for multi-region dynamic video stream switching and storage according to claim 2 is characterized in that: The steps to calculate the target's velocity are as follows: Target position prediction and update: Use the Kalman filter to predict and update the position of each target i: Target location prediction: ; ; Where: and are the predicted values ​​of the centroid position of target i at time t; and is the actual centroid position of target i at time t-1; and are the velocity components of target i at time t-1 respectively; Location Updates: ; ; Where: and is the observed value of target i at time t; and is the Kalman gain; Target velocity calculation: The velocity of each target is estimated based on the change in the center of mass position between consecutive frames: ; Where: represents the speed of target i at time t; is the frame time interval; The joint probability data association algorithm calculates the joint probability between each observation and all observations to determine the best target-observation pair: ; Where: represents the association probability between target i and observation j; represents the inverse matrix of the covariance matrix; n represents the total number of all targets; represents the exponential term of the Gaussian distribution function; Represents the difference vector The transpose of The representation is as follows: ; Where: The horizontal axis represents the observation value j at time t; The ordinate represents the observation value j at time t; After target association, calculate the final velocity of each target: ; Where: represents the final velocity of target i; represents the velocity vector of target i and observation j; N represents the total number of all observations at time t.

5. The NVR and IPC management method for multi-region dynamic video stream switching and storage according to claim 1 is characterized in that: The step 3 comprises the following steps: Calculate the moving target's contribution to the activity density: map the moving target's position to the corresponding monitoring area, determine the monitoring area described by the moving target, traverse all the moving targets belonging to each monitoring area, and calculate the moving target's contribution to the activity density in the area: ; Where: represents the activity density of monitoring area j; represents the area of ​​moving target i; Indicates the speed of the moving target; and represents the weight coefficient; Normalize the activity density of each region by its maximum value: ; Where: represents the normalized activity density value of the jth monitoring area; Indicates the maximum activity density value in all monitoring areas; Represents a decimal value to prevent division by zero; When the Less than the preset minimum activity density threshold When , it is considered that there is no activity in the area and the density value is set to 0; finally, the activity density value of each monitoring area j is obtained .

6. The NVR and IPC management method for multi-region dynamic video stream switching and storage according to claim 1, characterized in that: The step 4 comprises the following steps: Calculate bandwidth and storage allocation for each monitoring area based on activity density values: ; ; Where: Indicates the minimum bandwidth of each monitoring area; represents the normalized activity density value of the jth monitoring area; represents the normalized activity density value of the kth monitoring area; Indicates the total bandwidth; Indicates the total storage space of the NVR; Indicates the minimum storage space for each monitoring area; and represents the Lagrange multiplier; Indicates the number of monitoring areas; represents the bandwidth allocation of monitoring area j; represents the storage allocation of monitoring area j; Calculate the objective function based on the calculated bandwidth and storage allocation: ; Where: and represents the weight coefficient; When calculating the objective function, the following constraints need to be met: ; ; Adjust based on objective function and constraints: If the objective function does not reach the desired optimal value or the constraints are not met, adjust the parameters , or weight coefficient , , recalculate the bandwidth and storage allocation until the objective function reaches the optimal value while satisfying all constraints.

7. The NVR and IPC management method for multi-region dynamic video stream switching and storage according to claim 6, characterized in that: The specific steps of step 5 are as follows: Initialization: Use the value calculated in the previous step , , , As initial value; Minimize the deviation: Use gradient descent to minimize the parameters , , , Fine-tune the object to minimize the objective function, where the objective function is: ; Where: Indicates the actual bandwidth usage and expected bandwidth of each area The relative deviation between Indicates the actual storage used and expected storage in each area The relative deviation between represents the storage redundancy coefficient; Represents the value of minimizing the corresponding objective function; In each round of iteration, the bandwidth and storage allocation values ​​of each monitoring area are recalculated, and feedback data is collected and processed again until the objective function reaches the optimal value or meets the convergence conditions.

8. The NVR and IPC management method for multi-region dynamic video stream switching and storage according to claim 1, characterized in that: In step 4, the following objective function is used to perform bandwidth and storage allocation in the monitoring area: ; Where: and represents the adjustment parameter; Indicates the actual bandwidth usage and expected bandwidth of each area The relative deviation between Indicates the actual storage used and expected storage in each area The relative deviation between represents the storage redundancy coefficient; Indicates the total bandwidth; Indicates the total storage space of the NVR; represents the bandwidth allocation of monitoring area j; Indicates the storage allocation of the monitoring area; and represents the weight coefficient; represents the normalized activity density value of the jth monitoring area; Represents the value of minimizing the corresponding objective function; Indicates the actual bandwidth usage and expected bandwidth of monitoring area j The difference between Indicates the actual storage usage and expected storage capacity of monitoring area j The difference between .

Citation Information

Patent Citations

  • Video monitoring method and system

    CN102547244A

  • Station intelligent video monitoring module, system and method, and storage medium

    CN107911653A

  • Multi-target tracking method based on multi-characteristic binding in combination with Camshift algorithm

    CN108198206A

  • A forward-looking sonar underwater target tracking method based on adaptive particle swarm optimization

    CN109146922A

  • Intelligent community monitoring management method and system based on dynamic target detection and medium

    CN116456061A