Focusing type monitoring storage method and system based on video stream real-time analysis

By identifying and dynamically focusing on regions of interest during real-time video stream analysis, combined with lightweight analysis and differentiated coding, the problems of storage redundancy and low retrieval efficiency in surveillance technology are solved, achieving efficient and economical video storage and retrieval.

CN122027770APending Publication Date: 2026-05-12何志文
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
何志文
Filing Date
2026-02-02
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing monitoring technologies suffer from high storage redundancy, lack of emphasis on key information, and low efficiency in post-event retrieval. In particular, the failure to achieve intelligent analysis and dynamic focusing during the video acquisition stage leads to wasted storage resources and difficulties in retrieval.

Method used

By employing a lightweight two-stage analysis engine to identify regions of interest (ROIs) during the real-time video stream analysis phase, and combining motion trajectory stability and semantic value judgment, the lens focal length and encoding parameters are dynamically adjusted to encode the ROI regions at high bitrate and high resolution, and extract structured features to generate metadata tags, thereby achieving differentiated storage.

Benefits of technology

It accurately identifies high-value ROIs, reduces false positive rates, optimizes storage resource allocation, improves retrieval efficiency, extends storage life, reduces costs, and supports rapid target location and behavior retrieval.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122027770A_ABST
    Figure CN122027770A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent video monitoring, in particular to a focused monitoring storage method and system based on video stream real-time analysis, and the method comprises the following steps: carrying out the real-time analysis and recognition of ROI: carrying out the real-time analysis of collected original video streams at a monitoring equipment end, and carrying out the real-time analysis of the collected original video streams; a region of interest (ROI) in a picture is identified by a lightweight two-stage analysis engine. According to the method, a high-value monitoring target is accurately recognized by setting a lightweight dual-stage analysis engine, interference is effectively filtered out, on-demand focusing and differentiated coding are achieved by combining collection, analysis and control closed-loop linkage, it is guaranteed that key targets are clear and available, resource allocation is optimized, meanwhile, a layered packaging and differentiated storage strategy is adopted, and the method is suitable for large-scale popularization and application. The storage space occupation is obviously reduced, the storage period is prolonged, the cost is reduced, in addition, the rapid semantic retrieval of the video content is realized through the structured metadata label, and the postmortem verification and analysis efficiency is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent video surveillance technology, and more specifically, to a focused monitoring and storage method and system based on real-time video stream analysis. Background Technology

[0002] With the rapid popularization of video surveillance technology, the storage and efficient retrieval of massive amounts of video data have become key bottlenecks restricting the industry's development. Traditional surveillance systems typically use fixed bitrates or simple dynamic bitrates for full-screen recording, resulting in a large amount of storage space being occupied by static backgrounds with low information density, while truly valuable targets (such as pedestrians and vehicles) are difficult to identify due to insufficient resolution or compression distortion. Although existing technologies such as H.265, AV1, and generative compression technology (GVC) have reduced video size to some extent, they have not yet solved the fundamental problem of "low information density of stored content and unusable key targets".

[0003] A search revealed a Chinese invention patent with authorization announcement number CN119996723B, which discloses a video surveillance storage system and method based on distributed cloud storage. This system collects surveillance video streams via cameras and divides the video streams into time blocks based on the user's video search query status, forming multiple video data blocks. It then constructs a distributed cloud storage architecture for the video, uses a consistent hashing algorithm to determine the storage location of each video data block in the distributed cloud storage, and monitors the usage frequency of each video data block in real time to dynamically adjust its storage priority. While this patent technology proposes a method for video data segmentation and dynamic priority adjustment based on distributed cloud storage, its focus is on the management of backend storage resources and optimization of retrieval efficiency, without addressing content analysis and enhancement during the video acquisition stage. This type of solution still relies on the original video stream, failing to improve the visual usability of long-distance, small targets, and also failing to assign searchable semantic tags to the video content.

[0004] In addition, although some existing intelligent monitoring systems have introduced AI for target detection, they usually treat all moving objects as regions of interest (ROI), resulting in a high false positive rate (such as swaying leaves or changes in light and shadow). Furthermore, they do not achieve closed-loop linkage with the focusing control and encoding strategy of the acquisition equipment, thus failing to achieve "on-demand enhancement and on-demand storage".

[0005] Therefore, there is an urgent need for a technical solution that can perform intelligent analysis, dynamic focusing, local enhancement, and fusion of structured semantic information at the video acquisition source, so as to significantly reduce storage redundancy and improve retrieval efficiency while ensuring that key information is clear and usable. Summary of the Invention

[0006] The purpose of this invention is to provide a focused monitoring storage method and system based on real-time video stream analysis, so as to solve the problems of high storage redundancy, lack of prominence of key information, and low efficiency of post-event retrieval in existing monitoring technologies mentioned in the background.

[0007] To achieve the above objectives, the present invention aims to provide a focused monitoring and storage method based on real-time video stream analysis, comprising the following steps:

[0008] S1: Real-time analysis and identification of ROI: On the monitoring device, the raw video stream is analyzed in real time, and the region of interest (ROI) in the picture is identified through a lightweight two-stage analysis engine;

[0009] S2: Dynamic Focusing and Differentiated Encoding: Based on the analysis results of the ROI, dynamically adjust the acquisition parameters and encoding parameters of the monitoring equipment, perform optical / electronic focusing on the ROI area and allocate high bit rate and high resolution, and allocate low bit rate and low resolution to the background area;

[0010] S3: Feature Extraction and Label Generation: Extract the structured feature information of the ROI region and generate metadata labels containing target type, color, and behavioral features;

[0011] S4: Associated Encapsulation Storage: The video stream after focusing and encoding processing is associated and stored with the metadata tag.

[0012] As a further improvement to this technical solution, the specific steps for real-time analysis and identification of ROI in step S1 are as follows:

[0013] S11. Initial screening of moving targets: The pixel motion vectors between adjacent video frames are calculated using the optical flow method. The basic constraint equation is expressed as follows:

[0014]

[0015] in, For gradient operators, For pixel intensity, , representing the velocity component. Indicates pixel intensity Regarding time The partial derivatives;

[0016] Simultaneously, the lightweight deep learning model YOLO-Nano is used to classify and initially locate targets in salient motion regions, and output target bounding boxes. ,in, and Representing the target bounding box Top left corner coordinates and coordinate, and Representing the target bounding box bottom right corner coordinates and coordinate;

[0017] S12. High-value ROI determination: Based on the target bounding box output in step S11. First, determine the stability of the motion trajectory. Once the stability of the motion trajectory meets the requirements, then determine the semantic value. Specifically:

[0018] The YOLO-Nano model, or a lightweight classifier linked to it, outputs the confidence score of the target class. When confidence level When the value is greater than 0.85, the region is determined to be a high-value Region of Interest (ROI).

[0019] As a further improvement to this technical solution, the specific steps for determining the stability of the motion trajectory in step S12 are as follows:

[0020] Calculate the target in continuous Motion stability in a frame is given by the formula:

[0021]

[0022] in, This represents the stability score of the motion trajectory. This represents the number of consecutive video frames used to calculate the stability score. For intersection, union, and comparison, , Indicates the target is in the first place. The position of the bounding box in the frame. Indicates the target is in the first place. The position of the bounding box in the frame;

[0023] when If the value is greater than 0.7 and the target area occupies more than 3% of the screen, the motion trajectory stability is deemed to have met the requirements, and the process proceeds to the next step.

[0024] As a further improvement to this technical solution, the specific operation steps of dynamic focusing and differential encoding in step S2 are as follows:

[0025] S21. Optical Focus Control: Based on the center coordinates of the Region of Interest (ROI) determined in step S12, calculate the lens focal length adjustment. And through the control module, it drives the autofocus motor to adjust the lens focal length from the default value. Adjust to target value The relationship is expressed as:

[0026]

[0027] in, The distance is determined by the offset of the ROI's center position relative to the image center and the object distance estimation model, ensuring that the target within the ROI area is clearly imaged.

[0028] S22. Differentiated Encoding Parameter Configuration: Based on the bounding box coordinates of the ROI, the parameters of the video encoder are dynamically configured. Specifically:

[0029] For the ROI region, an encoding bitrate of not less than 4 Mbps is allocated, and encoding is performed using an equivalent resolution of not less than 3840×2160 pixels;

[0030] For the background area, an encoding bitrate of no more than 512 Kbps is allocated, and encoding is performed at a resolution of no more than 848×480 pixels.

[0031] As a further improvement to this technical solution, the specific steps for feature extraction and label generation in step S3 are as follows:

[0032] S31. Feature extraction: Perform feature extraction on the high-value Region of Interest (ROI) identified in step S12 to extract color and behavioral features.

[0033] S32, Semantic Mapping and Label Generation: Map the features extracted in step S31 to a predefined semantic library to generate standardized structured metadata labels. These labels must include at least the target type, color, behavior, confidence level, and timestamp fields.

[0034] S33. Dynamic Update: Update the metadata tags of ROI at a frequency of no less than once per second. When a significant change in ROI characteristics is detected, trigger a re-analysis and tag update, and adopt an incremental update mechanism to store or transmit only the changed tag fields.

[0035] As a further improvement to this technical solution, the specific steps for feature extraction in step S31 are as follows:

[0036] S311. Target Type Recognition: Obtain the probability distribution vector of the target belonging to a predefined category using a lightweight convolutional neural network classifier. ,in, Represents the total number of predefined target categories, taking The corresponding category is used as the target type. This indicates the index corresponding to the value with the highest probability.

[0037] S312. Color Feature Extraction: Calculate the mean vector of the ROI region in the HSV color space. ,in, , and These represent the mean values ​​of hue, saturation, and brightness, respectively, and are then grouped using a pre-defined color clustering dictionary. Mapping to the primary color description;

[0038] S313. Behavioral Feature Extraction: Calculate the velocity vector based on the changes in the center point coordinates of the ROI region in consecutive frames. ,in, Represents the horizontal velocity component. It represents the velocity component in the vertical direction and determines the behavior state based on the magnitude and direction of the velocity.

[0039] As a further improvement to this technical solution, the specific operation steps for associating and encapsulating storage in step S4 are as follows:

[0040] S41. Timestamp Alignment and Frame-Level Binding: Extract timestamps frame by frame from a differentially encoded video stream. Simultaneously, the metadata tags generated in step S3 are sorted by timestamp. Perform alignment when the following conditions are met. At that time, the video data of that frame is bound to the corresponding metadata tag, where The preset time synchronization tolerance threshold;

[0041] S42. Layered Packaging and Index Construction: Using a custom packaging format, the video stream is divided into an ROI data layer and a background data layer, and packaged separately. At the same time, an index table is generated for each video data segment. The index table contains at least the following fields: start timestamp, end timestamp, ROI region coordinates, target type, behavior label, and storage offset.

[0042] S43. Differentiated storage strategy execution: A high-reliability storage strategy is adopted for the ROI data layer, including write verification and redundant backup, and a high-compression storage strategy is adopted for the background data layer, allowing lossy compression or periodic overwrite when storage pressure is high.

[0043] S44. Metadata Plugin and Fast Search Support: The index table and metadata tags are stored together with the video stream as lightweight plugin files, supporting fast search and target location directly through metadata without decoding the video.

[0044] The present invention also provides a focused monitoring and storage system based on real-time video stream analysis, the system comprising:

[0045] The acquisition module is used to acquire raw video streams;

[0046] The analysis module is equipped with a lightweight two-stage analysis engine for real-time ROI identification;

[0047] The control module is used to adjust the lens focal length and encoding parameters based on the analysis results;

[0048] The metadata generation module is used to extract ROI features and generate structured labels;

[0049] The storage module is used to associate and store the processed video stream with metadata tags.

[0050] As a further improvement to this technical solution, the output end of the acquisition module is connected to the input end of the analysis module, which is used to transmit the acquired raw video stream to the analysis module in real time.

[0051] The output of the analysis module is connected to the input of the control module and the input of the metadata generation module, respectively, and is used to transmit the identified ROI information and its bounding box coordinates and target category confidence to the control module, and to transmit the ROI region image data and its spatiotemporal information to the metadata generation module.

[0052] The output of the control module is connected to the control interface of the acquisition module, and is used to send optical focus adjustment commands and encoding parameter configuration commands to the acquisition module;

[0053] The output of the metadata generation module is connected to the input of the storage module, and is used to output structured metadata tags to the storage module;

[0054] The acquisition module is also connected to the storage module through an encoding output interface, which is used to transmit the video stream after differential encoding processing to the storage module;

[0055] The storage module is used to receive and associate the video stream from the acquisition module with the metadata tags from the metadata generation module, and establish an index relationship between the two to support fast retrieval.

[0056] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0057] 1. This invention, by setting up a lightweight dual-stage analysis engine and combining a dual judgment mechanism of motion trajectory stability and semantic value, enables the system to accurately identify high-value regions of interest and effectively filter interference such as leaf swaying and light and shadow changes, thereby significantly reducing the false alarm rate and improving the reliability and practicality of monitoring and analysis.

[0058] 2. This invention constructs a closed-loop linkage mechanism for acquisition, analysis and control, enabling the system to dynamically adjust the lens focal length and encoding parameters based on the ROI recognition results, and to perform optical or electronic focusing and high-bitrate, high-resolution encoding on key targets, thereby achieving the purpose of on-demand enhancement and on-demand storage, and thus significantly optimizing bandwidth and storage resource allocation while ensuring the visual availability of key targets.

[0059] 3. By adopting a layered encapsulation and differentiated storage strategy, this invention implements high-reliability storage for the ROI data layer and high-compression storage for the background data layer. This enables the system to significantly reduce the overall storage space usage while ensuring that key information is not lost, thereby extending the storage cycle, reducing storage costs, and ultimately improving the system's economy and sustainability in long-term monitoring scenarios.

[0060] 4. This invention extracts the structured features of the ROI region and generates standardized metadata tags, and then aligns and encapsulates them with the video stream using timestamps. This enables the video content to have searchable semantic information, thereby supporting rapid target location and behavior retrieval based on metadata without decoding the video, which greatly improves the efficiency of post-event verification and analysis. Attached Figure Description

[0061] Figure 1 This is a flowchart illustrating the steps of the focused monitoring and storage method based on real-time video stream analysis of the present invention.

[0062] Figure 2 This is a schematic diagram of the modules of the focused monitoring and storage system based on real-time video stream analysis of the present invention. Detailed Implementation

[0063] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0064] In one specific embodiment, such as Figure 1 As shown, this invention provides a focused monitoring and storage method based on real-time video stream analysis, comprising the following steps:

[0065] Step 1: Real-time Analysis and Identification of ROI: On the monitoring device, the acquired raw video stream is analyzed in real time. A lightweight two-stage analysis engine is used to identify the Region of Interest (ROI) in the image. Specifically:

[0066] 1. Initial screening of moving targets: The optical flow method is used to calculate the pixel motion vectors between adjacent video frames. The basic constraint equation is expressed as follows:

[0067]

[0068] in, For gradient operators, For pixel intensity, , representing the velocity component. Indicates pixel intensity Regarding time The partial derivatives;

[0069] Simultaneously, the lightweight deep learning model YOLO-Nano is used to classify and initially locate targets in salient motion regions, and output target bounding boxes. ,in, and Representing the target bounding box Top left corner coordinates and coordinate, and Representing the target bounding box bottom right corner coordinates and coordinate.

[0070] 2. High-Value ROI Determination: Based on the target bounding box output in the above steps. To determine the stability of the motion trajectory, specifically:

[0071] Calculate the target in continuous Motion stability in a frame is given by the formula:

[0072]

[0073] in, This represents the stability score of the motion trajectory. This represents the number of consecutive video frames used to calculate the stability score. For intersection, union, and comparison, , Indicates the target is in the first place. The position of the bounding box in the frame. Indicates the target is in the first place. The position of the bounding box in the frame;

[0074] when If the value is greater than 0.7 and the target area occupies more than 3% of the screen, the motion trajectory stability is deemed to have met the requirements, and the process proceeds to the next step.

[0075] Once the stability of the motion trajectory meets the requirements, the semantic value is then determined. Specifically:

[0076] The YOLO-Nano model, or a lightweight classifier linked to it, outputs the confidence score of the target class. When confidence level When the value is greater than 0.85, the region is determined to be a high-value Region of Interest (ROI).

[0077] Step 2, Dynamic Focusing and Differentiated Encoding: Based on the ROI analysis results, dynamically adjust the acquisition and encoding parameters of the monitoring equipment. Perform optical / electronic focusing on the ROI area and allocate high bitrate and high resolution, while allocating low bitrate and low resolution to the background area. Specifically:

[0078] 1. Optical Focus Control: Based on the center coordinates of the Region of Interest (ROI) determined in the above steps, calculate the lens focal length adjustment. And through the control module, it drives the autofocus motor to adjust the lens focal length from the default value. Adjust to target value The relationship is expressed as:

[0079]

[0080] in, The distance is determined by the offset of the ROI's center position relative to the image center and the object distance estimation model, ensuring that the target within the ROI area is clearly imaged.

[0081] 2. Differentiated Encoding Parameter Configuration: Based on the bounding box coordinates of the ROI, the parameters of the video encoder are dynamically configured. Specifically:

[0082] For the ROI region, an encoding bitrate of not less than 4 Mbps is allocated, and encoding is performed using an equivalent resolution of not less than 3840×2160 pixels;

[0083] For the background area, an encoding bitrate of no more than 512 Kbps is allocated, and encoding is performed at a resolution of no more than 848×480 pixels.

[0084] Step 3: Feature Extraction and Label Generation: Extract structured feature information from the ROI region and generate metadata labels containing target type, color, and behavioral features. Specifically:

[0085] 1. Feature Extraction: Perform feature extraction on the high-value Regions of Interest (ROIs) identified in the above steps to extract color and behavioral features. Specifically:

[0086] Target type recognition: A lightweight convolutional neural network classifier is used to obtain the probability distribution vector of targets belonging to predefined categories. ,in, Represents the total number of predefined target categories, taking The corresponding category is used as the target type. This indicates the index corresponding to the value with the highest probability.

[0087] Color feature extraction: Calculate the mean vector of the ROI region in the HSV color space. ,in, , and These represent the mean values ​​of hue, saturation, and brightness, respectively, and are then grouped using a pre-defined color clustering dictionary. Mapping to the primary color description;

[0088] Behavioral feature extraction: Calculate the velocity vector based on the changes in the center point coordinates of the ROI region in consecutive frames. ,in, Represents the horizontal velocity component. It represents the velocity component in the vertical direction and determines the behavior state based on the magnitude and direction of the velocity.

[0089] 2. Semantic Mapping and Tag Generation: Map the features extracted in the above steps to a predefined semantic library to generate standardized structured metadata tags. These tags must include at least the target type, color, behavior, confidence level, and timestamp fields.

[0090] 3. Dynamic Update: Update the metadata tags of ROI at a frequency of no less than once per second. When a significant change in ROI characteristics is detected, trigger a re-analysis and tag update, and adopt an incremental update mechanism to store or transmit only the changed tag fields.

[0091] Step 4: Associated Encapsulation and Storage: The video stream, after focusing and encoding processing, is associated and stored with the metadata tags. Specifically:

[0092] 1. Timestamp alignment and frame-level binding: Extract timestamps frame by frame from a differentially encoded video stream. At the same time, the metadata tags generated in the above steps are sorted by timestamp. Perform alignment when the following conditions are met. At that time, the video data of that frame is bound to the corresponding metadata tag, where This is the preset time synchronization tolerance threshold.

[0093] 2. Layered encapsulation and index construction: Using a custom encapsulation format, the video stream is divided into an ROI data layer and a background data layer, and encapsulated separately. At the same time, an index table is generated for each video data segment. The index table contains at least the following fields: start timestamp, end timestamp, ROI region coordinates, target type, behavior label, and storage offset.

[0094] 3. Differentiated storage strategy execution: A high-reliability storage strategy is adopted for the ROI data layer, including write verification and redundant backup, and a high-compression storage strategy is adopted for the background data layer, allowing for lossy compression or periodic overwrite when storage pressure is high.

[0095] 4. Metadata plugin and fast search support: The index table and metadata tags are stored together with the video stream as lightweight plugin files, supporting fast search and target location directly through metadata without decoding the video.

[0096] like Figure 2 As shown, the present invention also provides a focused monitoring and storage system based on real-time video stream analysis, including an acquisition module, an analysis module, a control module, a metadata generation module, and a storage module.

[0097] The output of the acquisition module is connected to the input of the analysis module, used to transmit the acquired raw video stream to the analysis module in real time. The output of the analysis module is connected to the inputs of the control module and the metadata generation module, respectively, used to transmit the identified ROI information, its bounding box coordinates, and target category confidence to the control module, and to transmit the ROI region image data and its spatiotemporal information to the metadata generation module. The output of the control module is connected to the control interface of the acquisition module, used to send optical focus adjustment commands and encoding parameter configuration commands to the acquisition module. The output of the metadata generation module is connected to the input of the storage module, used to output structured metadata tags to the storage module. The acquisition module is also connected to the storage module through an encoding output interface, used to transmit the video stream after differential encoding processing to the storage module. The storage module is used to receive and associate the video stream from the acquisition module and the metadata tags from the metadata generation module, and to establish an index relationship between the two to support fast retrieval.

[0098] The following example of a typical outdoor security monitoring scenario illustrates the specific implementation process of this invention.

[0099] Example: Intelligent monitoring system at the entrance of a residential community.

[0100] This system is deployed at the entrance of the residential community, and the monitoring footage covers the sidewalk, driveway, and surrounding green areas. The system hardware includes IPC cameras that support autofocus, Edge devices with built-in lightweight AI chips, and network storage devices.

[0101] 1. Video acquisition and real-time analysis.

[0102] The camera captures a 1080P raw video stream at 30fps and transmits it to the Edge device in real time. The analytics module then activates a lightweight two-stage engine.

[0103] First, the moving areas in the image are quickly detected using optical flow. Then, the YOLO-Nano model is used to identify candidate targets such as "pedestrians" and "vehicles" and output bounding boxes.

[0104] Next, trajectory stability analysis is performed on the candidate targets: the IoU stability score is calculated for 10 consecutive frames. If the score is >0.7 and the target area ratio is >3%, then the semantic value is determined.

[0105] A lightweight classifier is used to classify targets. If a target is identified as a "pedestrian" or "vehicle" with a confidence score > 0.85, it is marked as a high-value ROI.

[0106] 2. Dynamic Focus and Differentiated Coding.

[0107] The control module calculates the focal length adjustment based on the ROI center coordinates and drives the camera to automatically focus, ensuring that targets within the ROI are in sharp focus. Simultaneously, the encoder dynamically sets its settings based on the ROI bounding box.

[0108] The ROI area (such as a car entering the community) is encoded at 4K equivalent resolution and 4Mbps bitrate;

[0109] Background areas (such as stationary trees and buildings) are encoded at 480P resolution and 512Kbps bitrate.

[0110] 3. Feature extraction and label generation.

[0111] The metadata generation module extracts features from the ROI:

[0112] Target type: Identified as "sedan";

[0113] Color characteristics: Extract the HSV mean and map it to "silver";

[0114] Behavioral characteristics: The speed is calculated based on the displacement of the center point of consecutive frames, and it is determined to be "low-speed entry".

[0115] The generated tags are in the format: {"type":"car","color":"silver","behavior":"entering","confidence":0.92,"timestamp":1635678901234}, and are updated at a frequency of 1Hz.

[0116] 4. Related encapsulation and storage.

[0117] The storage module receives the encoded video stream and metadata tags, and executes:

[0118] Timestamp alignment: Bind each frame of video to a tag corresponding to that time point;

[0119] Layered encapsulation: The video data is divided into ROI layer and background layer, and packaged separately;

[0120] Differentiated storage: ROI layer video is written to a RAID array and backed up, while background layer video is stored using H.265 high compression and is allowed to be automatically overwritten after 30 days;

[0121] Indexing and Add-ons: Generate an index file that records the start and end times, ROI coordinates, target type, etc. of each video segment, and store it together with the video file.

[0122] 5. Retrieval and Application.

[0123] Afterwards, security personnel can input search criteria through the management platform, such as "find all silver vehicle entry records on XX / XX / XXXX". The system directly parses the metadata index and quickly locates relevant video clips without needing to decode the entire video, greatly improving the efficiency of verification.

[0124] In summary, this invention, through an integrated process of lightweight analysis, dynamic focusing, differentiated encoding, feature extraction, and associated storage, significantly reduces the storage burden while ensuring the visual quality of key targets, and endows video content with a searchable semantic structure. It is applicable to various monitoring scenarios such as security, transportation, and retail, and has good practicality and scalability.

[0125] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.

Claims

1. A focused monitoring and storage method based on real-time video stream analysis, characterized in that, Includes the following steps: S1: Real-time analysis and identification of ROI: On the monitoring device, the raw video stream is analyzed in real time, and the region of interest (ROI) in the picture is identified through a lightweight two-stage analysis engine; S2: Dynamic Focusing and Differentiated Encoding: Based on the analysis results of the ROI, dynamically adjust the acquisition parameters and encoding parameters of the monitoring equipment, perform optical / electronic focusing on the ROI area and allocate high bit rate and high resolution, and allocate low bit rate and low resolution to the background area; S3: Feature Extraction and Label Generation: Extract the structured feature information of the ROI region and generate metadata labels containing target type, color, and behavioral features; S4: Associated Encapsulation Storage: The video stream after focusing and encoding processing is associated and stored with the metadata tag.

2. The focused monitoring and storage method based on real-time video stream analysis according to claim 1, characterized in that, The specific steps for real-time analysis and identification of ROI in step S1 are as follows: S11. Initial screening of moving targets: The pixel motion vectors between adjacent video frames are calculated using the optical flow method. The basic constraint equation is expressed as follows: in, For gradient operators, For pixel intensity, , representing the velocity component. Indicates pixel intensity Regarding time The partial derivatives; Simultaneously, the lightweight deep learning model YOLO-Nano is used to classify and initially locate targets in salient motion regions, and output target bounding boxes. ,in, and Representing the target bounding box Top left corner coordinates and coordinate, and Representing the target bounding box bottom right corner coordinates and coordinate; S12. High-value ROI determination: Based on the target bounding box output in step S11. First, determine the stability of the motion trajectory. Once the stability of the motion trajectory meets the requirements, then determine the semantic value. Specifically: The YOLO-Nano model, or a lightweight classifier linked to it, outputs the confidence score of the target class. When confidence level When the value is greater than 0.85, the region is determined to be a high-value Region of Interest (ROI).

3. The focused monitoring and storage method based on real-time video stream analysis according to claim 2, characterized in that, The specific steps for determining the stability of the motion trajectory in step S12 are as follows: Calculate the target in continuous Motion stability in a frame is given by the formula: in, This represents the stability score of the motion trajectory. This represents the number of consecutive video frames used to calculate the stability score. For intersection, union, and comparison, , Indicates the target is in the first place. The position of the bounding box in the frame. Indicates the target is in the first place. The position of the bounding box in the frame; when If the value is greater than 0.7 and the target area occupies more than 3% of the screen, the motion trajectory stability is deemed to have met the requirements, and the process proceeds to the next step.

4. The focused monitoring and storage method based on real-time video stream analysis according to claim 2, characterized in that, The specific steps for dynamic focusing and differential coding in step S2 are as follows: S21. Optical Focus Control: Based on the center coordinates of the Region of Interest (ROI) determined in step S12, calculate the lens focal length adjustment. And through the control module, it drives the autofocus motor to adjust the lens focal length from the default value. Adjust to target value The relationship is expressed as: in, The distance is determined by the offset of the ROI's center position relative to the image center and the object distance estimation model, ensuring that the target within the ROI area is clearly imaged. S22. Differentiated Encoding Parameter Configuration: Based on the bounding box coordinates of the ROI, the parameters of the video encoder are dynamically configured. Specifically: For the ROI region, an encoding bitrate of not less than 4 Mbps is allocated, and encoding is performed using an equivalent resolution of not less than 3840×2160 pixels; For the background area, an encoding bitrate of no more than 512 Kbps is allocated, and encoding is performed at a resolution of no more than 848×480 pixels.

5. The focused monitoring and storage method based on real-time video stream analysis according to claim 2, characterized in that, The specific steps for feature extraction and label generation in step S3 are as follows: S31. Feature extraction: Perform feature extraction on the high-value Region of Interest (ROI) identified in step S12 to extract color and behavioral features. S32, Semantic Mapping and Label Generation: Map the features extracted in step S31 to a predefined semantic library to generate standardized structured metadata labels. These labels must include at least the target type, color, behavior, confidence level, and timestamp fields. S33. Dynamic Update: Update the metadata tags of ROI at a frequency of no less than once per second. When a significant change in ROI characteristics is detected, trigger a re-analysis and tag update, and adopt an incremental update mechanism to store or transmit only the changed tag fields.

6. The focused monitoring and storage method based on real-time video stream analysis according to claim 5, characterized in that, The specific steps for feature extraction in step S31 are as follows: S311. Target Type Recognition: Obtain the probability distribution vector of the target belonging to a predefined category using a lightweight convolutional neural network classifier. ,in, Represents the total number of predefined target categories, taking The corresponding category is used as the target type. This indicates the index corresponding to the value with the highest probability. S312. Color Feature Extraction: Calculate the mean vector of the ROI region in the HSV color space. ,in, , and These represent the mean values ​​of hue, saturation, and brightness, respectively, and are then grouped using a pre-defined color clustering dictionary. Mapping to the primary color description; S313. Behavioral Feature Extraction: Calculate the velocity vector based on the changes in the center point coordinates of the ROI region in consecutive frames. ,in, Represents the horizontal velocity component. It represents the velocity component in the vertical direction and determines the behavior state based on the magnitude and direction of the velocity.

7. The focused monitoring and storage method based on real-time video stream analysis according to claim 1, characterized in that, The specific steps for associating and encapsulating storage in step S4 are as follows: S41. Timestamp Alignment and Frame-Level Binding: Extract timestamps frame by frame from a differentially encoded video stream. Simultaneously, the metadata tags generated in step S3 are sorted by timestamp. Perform alignment when the following conditions are met. At that time, the video data of that frame is bound to the corresponding metadata tag, where The preset time synchronization tolerance threshold; S42. Layered Packaging and Index Construction: Using a custom packaging format, the video stream is divided into an ROI data layer and a background data layer, and packaged separately. At the same time, an index table is generated for each video data segment. The index table contains at least the following fields: start timestamp, end timestamp, ROI region coordinates, target type, behavior label, and storage offset. S43. Differentiated storage strategy execution: A high-reliability storage strategy is adopted for the ROI data layer, including write verification and redundant backup, and a high-compression storage strategy is adopted for the background data layer, allowing lossy compression or periodic overwrite when storage pressure is high. S44. Metadata Plugin and Fast Search Support: The index table and metadata tags are stored together with the video stream as lightweight plugin files, supporting fast search and target location directly through metadata without decoding the video.

8. A focused monitoring and storage system based on real-time video stream analysis, characterized in that, The system includes: The acquisition module is used to acquire raw video streams; The analysis module is equipped with a lightweight two-stage analysis engine for real-time ROI identification; The control module is used to adjust the lens focal length and encoding parameters based on the analysis results; The metadata generation module is used to extract ROI features and generate structured labels; The storage module is used to associate and store the processed video stream with metadata tags.

9. The focused monitoring and storage system based on real-time video stream analysis according to claim 8, characterized in that, The output of the acquisition module is connected to the input of the analysis module, and is used to transmit the acquired raw video stream to the analysis module in real time. The output of the analysis module is connected to the input of the control module and the input of the metadata generation module, respectively, and is used to transmit the identified ROI information and its bounding box coordinates and target category confidence to the control module, and to transmit the ROI region image data and its spatiotemporal information to the metadata generation module. The output of the control module is connected to the control interface of the acquisition module, and is used to send optical focus adjustment commands and encoding parameter configuration commands to the acquisition module; The output of the metadata generation module is connected to the input of the storage module, and is used to output structured metadata tags to the storage module; The acquisition module is also connected to the storage module through an encoding output interface, which is used to transmit the video stream after differential encoding processing to the storage module; The storage module is used to receive and associate the video stream from the acquisition module with the metadata tags from the metadata generation module, and establish an index relationship between the two to support fast retrieval.