A method and system for saving security detection videos based on dynamic frame rate

By dynamically adjusting the frame rate and performing frame interpolation, the problem of resource waste and video quality caused by frame rate fluctuations in security detection video storage is solved, achieving efficient and stable video storage and playback.

CN120201162BActive Publication Date: 2025-12-02CHENGDU ANMUSEN INTELLIGENT TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510337067.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-21
Publication Date
2025-12-02
Estimated Expiration
2045-03-21

AI Technical Summary

Technical Problem

In existing methods for saving security detection videos, frame rate fluctuations lead to wasted hardware resources, inconsistent video quality, and unstable frame rates during startup, affecting video integrity and system stability.

Method used

A security detection video storage method based on dynamic frame rate is adopted. Video frames are collected in real time by smart cameras and timestamped. Data is managed by thread queue and cache queue, the appropriate frame rate is dynamically calculated, and appropriate frame supplementation is performed when the number of frames is insufficient.

Benefits of technology

It effectively reduces storage space and computing resource consumption, improves video playback smoothness and integrity, enhances system stability and storage efficiency, and reduces operating costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120201162B_ABST
    Figure CN120201162B_ABST
Patent Text Reader

Abstract

This invention relates to the field of personnel security detection, and discloses a method and system for saving security detection videos based on dynamic frame rate, including the following steps: S1, real-time acquisition of video frames and security detection using a smart camera; S2, timestamping each frame and recording detection result information; S3, sending the timestamp, image, and detection result information to the video storage thread through a thread queue; S4, in the video storage thread, retrieving the timestamp, image, and detection result information in a loop and placing them into a cache queue; S5, calculating whether the end time of the video has been reached based on the latest timestamp, and counting the total number of video frames acquired within that time period. By monitoring and dynamically adjusting the video frame rate in real time, the problem of saving videos at a high frame rate when the frame rate is low is effectively avoided, thus significantly reducing the consumption of storage space and computing resources. In addition, intelligent frame rate management enables the rational allocation and utilization of resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of personnel security detection, specifically to a method and system for saving security detection videos based on dynamic frame rate. Background Technology

[0002] In the field of security monitoring technology, the application of intelligent cameras is becoming increasingly widespread, with their main function being the real-time detection and recording of human activity. However, due to the complexity of security detection algorithms and limitations in hardware performance, the frame rate of cameras often fluctuates when performing detection tasks. This fluctuation is particularly noticeable in the initial startup phase, with the frame rate gradually increasing from 0 to a stable value. In current technical practices, a fixed frame rate video saving method is commonly used to meet the requirement of saving video segments at fixed intervals. However, this method has some significant problems and shortcomings:

[0003] Waste of hardware resources: If a fixed frame rate is still used to save the video when the frame rate is low, it will inevitably lead to excessive video frame interpolation, which not only occupies a lot of storage space, but also increases the consumption of computing resources.

[0004] Inconsistent video quality: Frame rate fluctuations directly impact the quality of saved videos. Saving videos at a fixed frame rate when the frame rate is unstable will cause stuttering or dropped frames during playback, severely affecting the overall video quality.

[0005] Instability of frame rate during startup: Especially in the early stages of camera startup, as the frame rate gradually increases from 0, using a fixed frame rate to save the video will result in insufficient frame rate in the initial part of the video. This not only affects the integrity of the video content, but also increases the consumption of hardware resources and delays the time for the device to enter a stable working state.

[0006] Based on this, those skilled in the art propose a method and system for saving security detection videos based on dynamic frame rate to solve the above problems. Summary of the Invention

[0007] To address the shortcomings of existing technologies, this invention provides a method and system for saving security detection videos based on dynamic frame rate, which solves the problems mentioned in the background section.

[0008] To achieve the above objectives, the present invention provides the following technical solution: a method for saving security detection videos based on dynamic frame rate, comprising the following steps:

[0009] S1. Real-time video frame capture and security detection via smart camera;

[0010] S2. Timestamp each frame and record the detection results.

[0011] S3. Send the timestamp, image, and detection result information to the video storage thread via the thread queue;

[0012] S4. In the video storage thread, retrieve the timestamp, image, and detection result information in a loop and put them into the cache queue;

[0013] S5. Calculate whether the end time of the video has been reached based on the latest timestamp, and count the total number of video frames collected within this time period;

[0014] S6. Calculate the appropriate frame rate for storing the video based on the total number of frames in the cache queue and the video duration, and round down to the preset frame rate level as the frame rate for saving the video.

[0015] S7. Calculate the position of each frame in the video based on the timestamp of each frame and the start time of the stored video.

[0016] S8. If the number of frames is insufficient within a certain period of time, the smoothness and integrity of the video will be ensured by frame interpolation, while limiting each frame interpolation to only 1 frame.

[0017] S9. Before saving the video, calculate the number of frames needed to supplement the full-length video, use the last frame for frame supplementation, and finally save the video file and the corresponding detection information file.

[0018] Preferably, the smart camera in step S1 includes:

[0019] Image sensors are used to capture video frames;

[0020] The processor is used to execute security detection algorithms;

[0021] The memory is used to store timestamps and detection result information.

[0022] Preferably, the thread queue in step S3 includes:

[0023] The producer thread is used to send timestamps, images, and detection results.

[0024] The consumer thread is used to retrieve information from the queue.

[0025] Preferably, in step S4, the cache queue is used to temporarily store the timestamps, images, and detection results information retrieved from the thread queue. At the same time, the cache queue can classify the information into the current video frame or the next video frame according to the end time of the video.

[0026] Preferably, the step of calculating the appropriate frame rate in step S6 further includes:

[0027] S601, Count the total number of frames in the buffer queue;

[0028] S602. Calculate the actual frame rate based on the video duration and total number of frames;

[0029] S603. Compare the actual frame rate with the preset frame rate level, and select the level that is closest to and no greater than the actual frame rate as the frame rate for video saving.

[0030] Preferably, the frame interpolation step in step S8 further includes:

[0031] S801, Detect whether the number of frames within a certain period of time is insufficient;

[0032] S802. If there are not enough frames, use the current frame to fill in the missing frames from the previous frames;

[0033] S803 limits each frame interpolation to only one frame to prevent cached subsequent frames from being discarded if they exceed the video duration.

[0034] A security detection video storage system based on dynamic frame rate includes:

[0035] The video capture module is used to capture video frames in real time.

[0036] The video detection module is used for real-time security detection, and timestamps each frame, attaches detection result information, and sends it to the video storage thread;

[0037] The video storage frame count module calculates whether the end time of the video has been reached based on the timestamp. If it has, it counts the total number of video frames collected within that time period.

[0038] The dynamic frame rate adjustment module for video storage calculates the actual frame rate based on the total number of frames and the video duration, and determines the video saving frame rate according to the preset level.

[0039] The video saving module calculates the position of each frame in the video based on the timestamp of each frame, and performs appropriate frame padding when the number of frames is insufficient. The frame is then written into the video and saved locally, along with the relevant detection result information.

[0040] Preferably, the video acquisition module further includes:

[0041] Smart cameras are used to capture video frames;

[0042] The image processing unit is used to perform preliminary processing on the video frames.

[0043] Preferably, the video detection module further includes:

[0044] Security detection algorithms are used to analyze security-related information in video frames;

[0045] A timestamp generator is used to timestamp each frame that passes the inspection.

[0046] Preferably, the video saving module further includes:

[0047] A frame interpolation processor is used to perform appropriate frame interpolation when the number of frames is insufficient;

[0048] A video encoder is used to encode processed video frames and save them locally.

[0049] A detection information recorder is used to save relevant detection result information.

[0050] This invention provides a method and system for saving security detection videos based on dynamic frame rate. It has the following beneficial effects:

[0051] 1. This invention effectively avoids saving video at a high frame rate when the frame rate is low by monitoring and dynamically adjusting the video frame rate in real time, thus significantly reducing the consumption of storage space and computing resources. This method achieves rational allocation and utilization of resources through intelligent frame rate management, enabling hardware resources to serve video processing and storage more efficiently, rather than being wasted in unnecessary frame interpolation.

[0052] 2. This invention effectively solves the stuttering and frame dropping problems caused by frame rate fluctuations by introducing a frame interpolation mechanism, ensuring the smoothness and integrity of video playback. This method, through dynamic frame rate adjustment and intelligent frame interpolation, not only improves the visual quality of the video but also enhances the reliability and validity of the video as evidence.

[0053] 3. This invention can adapt to frame rate fluctuations that occur during the camera's startup and operation phases. By dynamically adjusting the frame rate, it ensures the stability of the video saving process. This adaptability enables the system to maintain efficient operation under different working conditions, reducing the risk of system failures and video loss caused by unstable frame rates, thereby improving the stability and reliability of the entire security monitoring system.

[0054] 4. This invention reduces the size of video files by dynamically adjusting the frame rate, thereby improving the utilization of storage space. This means that more video data can be stored with the same storage capacity, or the investment in storage devices can be reduced while ensuring video quality. Furthermore, the optimized storage strategy simplifies data management, reduces long-term operating costs, and makes the security monitoring system more economical and efficient. Attached Figure Description

[0055] Figure 1 This is the overall operation flowchart of the present invention;

[0056] Figure 2This is a flowchart of the video storage system of the present invention;

[0057] Figure 3 This is a flowchart of the intelligent camera of the present invention. Detailed Implementation

[0058] The technical solutions in 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.

[0059] Example 1:

[0060] Please see the appendix Figure 1 - Appendix Figure 3 This invention provides a method for saving security detection videos based on dynamic frame rate, comprising the following steps:

[0061] S1. Real-time video frame capture and security detection via smart camera;

[0062] Smart cameras include:

[0063] An image sensor, used to capture video frames, is a device that converts light signals into electrical signals, enabling it to capture image information in a scene.

[0064] The processor executes security detection algorithms, including motion detection, facial recognition, and abnormal behavior detection. It analyzes video frames captured by image sensors to identify and respond to specific security events.

[0065] The memory stores timestamps and detection result information. The timestamps record the exact time each frame was captured. The detection result information includes detailed data on any security events identified by the processor.

[0066] The smart camera continuously acquires video frames from the image sensor and executes security detection algorithms through the processor.

[0067] After the detection is completed, the processor stores the detection results (such as whether there is an intruder, abnormal behavior, etc.) and the timestamp of the frame in the memory.

[0068] S2. Timestamp each frame and record the detection results.

[0069] Specifically, this step ensures that each frame of video can be associated with the time it was captured and the relevant security detection results. This is crucial for subsequent video processing and analysis, especially when rapid location and response to security incidents are required.

[0070] S3. Send the timestamp, image, and detection result information to the video storage thread via the thread queue;

[0071] Thread queues include:

[0072] The producer thread is used to send timestamps, images, and detection results information. The producer thread reads this information from the smart camera's memory and puts it into a queue.

[0073] The consumer thread is used to retrieve information from the queue. The consumer thread reads the data in the queue and passes it to the video storage thread for further processing.

[0074] Using a thread queue, the producer thread sends captured video frame information (including timestamps and detection results) to the consumer thread. This design allows the system to effectively manage the data stream, avoid data loss, and ensure that video frame information is processed and stored in a timely and accurate manner.

[0075] S4. In the video storage thread, retrieve the timestamp, image, and detection result information in a loop and put them into the cache queue;

[0076] The cache queue is used to temporarily store timestamps, images, and detection results retrieved from the thread queue. At the same time, the cache queue can classify the information into the current video frame or the next video frame based on the end time of the video.

[0077] Specifically, the cache queue serves as a temporary storage area for storing timestamps, images, and detection results retrieved from the thread queue. The primary function of this queue is to temporarily store this information until it can be further processed, such as calculating frame rates or performing video encoding.

[0078] The buffer queue can categorize information into the current video frame or the next video frame based on the video's end time. This means that the buffer queue not only stores information but also organizes it according to the video's recording timestamp, ensuring that video frames are processed in the correct order.

[0079] S5. Calculate whether the end time of the video has been reached based on the latest timestamp, and count the total number of video frames collected within this time period;

[0080] S6. Calculate the appropriate frame rate for storing the video based on the total number of frames in the cache queue and the video duration, and round down to the preset frame rate level as the frame rate for saving the video.

[0081] Specifically, the appropriate frame rate for storing the video is calculated based on the total number of frames in the cache queue and the video duration. This step involves determining the video's frame rate based on the actual number of frames captured, rather than simply using a fixed frame rate. The frame rate is rounded down from a preset frame rate level as the final video storage frame rate. This means the system will select the frame rate closest to the calculated value but not exceeding its preset frame rate level (e.g., 10, 15, 20, 25, 30 frames per second) as the final video storage frame rate.

[0082] The dynamic frame rate calculation adjusts the video saving quality based on the actual video content and security detection requirements, thereby optimizing the use of storage space while ensuring video quality.

[0083] The steps for calculating the appropriate frame rate further include:

[0084] S601, Count the total number of frames in the buffer queue;

[0085] S602. Calculate the actual frame rate based on the video duration and total number of frames;

[0086] S603. Compare the actual frame rate with the preset frame rate level, and select the level that is closest to and no greater than the actual frame rate as the frame rate for video saving.

[0087] S7. Calculate the position of each frame in the video based on the timestamp of each frame and the start time of the stored video.

[0088] Specifically, the purpose of calculating the position of each frame in the video is to determine the exact position of each frame of video data in the final video file.

[0089] Operation: The system calculates the frame's position by comparing its timestamp with the video's storage start time. The timestamp records the exact moment each frame was captured, while the start time is the point in time when the video segment begins. This comparison determines the position of each frame relative to the start of the video, ensuring the correct ordering and continuity of the video frames.

[0090] S8. If the number of frames is insufficient within a certain period of time, the smoothness and integrity of the video will be ensured by frame interpolation, while limiting each frame interpolation to only 1 frame.

[0091] The frame interpolation process further includes:

[0092] S801, Detect whether the number of frames within a certain period of time is insufficient;

[0093] S802. If there are not enough frames, use the current frame to fill in the missing frames from the previous frames;

[0094] S803 limits each frame interpolation to only one frame to prevent cached subsequent frames from being discarded if they exceed the video duration.

[0095] Specifically, the purpose of frame interpolation is to ensure the smoothness and integrity of video playback, especially when the frame rate fluctuates or the frame rate is unstable during the camera startup phase.

[0096] operate:

[0097] Insufficient frame rate detection: The system will detect whether there are not enough frames to meet the set frame rate requirements within a certain period of time.

[0098] Fill with current frame: If insufficient frames are detected, the system will use the current frame to fill in the missing frames. This means the current frame will be reused to ensure that there are no frame skips or stuttering during video playback.

[0099] Limiting the number of frames added: To maintain the realism of the video content and avoid excessive distortion, the system limits each frame addition to only one frame. This prevents cached subsequent frames from being discarded due to exceeding the video duration, and also avoids video redundancy caused by too many repeated frames.

[0100] The effect of frame interpolation is as follows:

[0101] Smoothness: By interpolating frames, video playback remains smooth even when the frame rate is low or fluctuating.

[0102] Completeness: Frame interpolation ensures the completeness of video content and avoids video content loss due to insufficient frame rate.

[0103] Authenticity: By limiting each frame interpolation to only one frame, the authenticity of the video content is maintained, avoiding video distortion caused by too many repeated frames.

[0104] S9. Before saving the video, calculate the number of frames needed to supplement the full-length video, use the last frame for frame supplementation, and finally save the video file and the corresponding detection information file.

[0105] A security detection video storage system based on dynamic frame rate includes:

[0106] The video capture module is used to capture video frames in real time.

[0107] The video capture module further includes:

[0108] Smart cameras are used to capture video frames;

[0109] The image processing unit is used to perform preliminary processing on the video frames.

[0110] Specifically, the image processing unit is another important component of the video acquisition module, responsible for the initial processing of video frames. This includes:

[0111] Image enhancement: Improves the sharpness, contrast, and brightness of an image, making details in the image more apparent.

[0112] Noise filtering: Reduces random noise in images and improves image quality.

[0113] Format conversion: Converting image data into a format suitable for further processing and storage.

[0114] The video detection module is used for real-time security detection, and timestamps each frame, attaches detection result information, and sends it to the video storage thread;

[0115] Specifically, the video detection module is responsible for performing real-time security detection on the captured video frames, timestamping each frame, attaching detection result information, and then sending this information to the video storage thread. The main functions of this module include:

[0116] Real-time security detection: Analyze video frames using various security algorithms (such as motion detection, facial recognition, etc.) to identify and respond to potential security threats.

[0117] Timestamp marking: Each frame of video is timestamped, recording the exact time the frame was captured. This is crucial for accurate event location and analysis.

[0118] Detection result information: Record the results of security detection, such as detected motion, facial recognition results, etc., and associate this information with video frames.

[0119] Information transmission: Timestamps, images, and detection results are sent to the video storage thread via a thread queue for subsequent video saving and analysis.

[0120] The video detection module further includes:

[0121] Security detection algorithms are used to analyze security-related information in video frames;

[0122] A timestamp generator is used to timestamp each frame that passes the inspection.

[0123] Function: The timestamp generator is responsible for timestamping each frame of video that passes the inspection, recording the specific time when the frame was captured.

[0124] Function: Timestamps provide precise time information for video frames. By using timestamps, the exact time an event occurred can be determined, thereby improving the response speed and accuracy of security monitoring systems.

[0125] The video storage frame count module calculates whether the end time of the video has been reached based on the timestamp. If it has, it counts the total number of video frames collected within that time period.

[0126] The dynamic frame rate adjustment module for video storage calculates the actual frame rate based on the total number of frames and the video duration, and determines the video saving frame rate according to the preset level.

[0127] Specifically, the video detection module is a crucial part of a security monitoring system, responsible for analyzing video content and identifying security-related events. It comprises the following two main components:

[0128] Function: Security detection algorithms are a series of computational methods used to analyze video frames and identify specific events (such as intrusion, theft, etc.). These algorithms can be based on various technologies such as motion detection, behavior analysis, and facial recognition.

[0129] Function: By analyzing video frames in real time, security detection algorithms can identify abnormal behaviors or events in the video and generate corresponding detection results.

[0130] The video storage module is responsible for managing the storage process of video data, including two key parts: frame count statistics and dynamic frame rate adjustment.

[0131] Frame count module

[0132] Function: Calculates the end time of the video based on the timestamp and counts the total number of video frames captured within that time period.

[0133] Function: The frame count module ensures the integrity and accuracy of video data. By counting frames, the length and frame rate of the video can be determined.

[0134] Dynamic frame rate adjustment module

[0135] Function: Calculates the actual frame rate based on the total number of frames and the video duration, and determines the video saving frame rate according to the preset frame rate level.

[0136] Function: The dynamic frame rate adjustment module optimizes video storage efficiency. By dynamically adjusting the saved frame rate based on the actual frame rate, it reduces wasted storage space and improves video playback quality. This dynamic adjustment mechanism makes video saving more flexible and efficient, adaptable to different monitoring scenarios and needs.

[0137] The video saving module calculates the position of each frame in the video based on the timestamp of each frame, performs appropriate frame padding when the number of frames is insufficient, writes the frames into the video and saves them locally, and saves relevant detection result information. The video saving module further includes:

[0138] A frame interpolation processor is used to perform appropriate frame interpolation when the number of frames is insufficient;

[0139] A video encoder is used to encode processed video frames and save them locally.

[0140] A detection information recorder is used to save relevant detection result information.

[0141] In summary, by monitoring and dynamically adjusting the video frame rate in real time, this method effectively avoids saving video at a high frame rate when the frame rate is low, thus significantly reducing the consumption of storage space and computing resources. Through intelligent frame rate management, this method achieves rational allocation and utilization of resources, enabling hardware resources to serve video processing and storage more efficiently, rather than being wasted on unnecessary frame interpolation. Furthermore, by introducing a frame interpolation mechanism, it effectively solves the stuttering and frame dropping problems caused by frame rate fluctuations, ensuring the smoothness and integrity of video playback.

[0142] This invention reduces video file size by dynamically adjusting the frame rate, thereby improving storage space utilization. This means that more video data can be stored with the same storage capacity, or the investment in storage devices can be reduced while maintaining video quality. Furthermore, the optimized storage strategy simplifies data management, reduces long-term operating costs, and makes security monitoring systems more economical and efficient.

[0143] Example 2:

[0144] To demonstrate the effectiveness of the dynamic frame rate-based security detection video storage system described in this invention, we conducted a series of tests and compared it with existing fixed frame rate video storage systems. The following is a detailed description of the embodiments, including test methods, test results, and data analysis.

[0145] Test environment: The dynamic frame rate video saving system of this invention and the traditional fixed frame rate video saving system were deployed under the same hardware configuration.

[0146] Test content: Under different frame rate fluctuation conditions, compare the performance of the two systems in terms of video storage space usage, video quality, system stability and storage efficiency.

[0147] Test data: Record and analyze the following data:

[0148] Storage space usage: The storage space required to save videos of the same duration.

[0149] Video quality: Video quality is assessed through subjective ratings and objective metrics such as PSNR and SSIM.

[0150] System stability: Records the number of failures and video loss rate during system operation.

[0151] Storage efficiency: Calculates the duration of video stored per unit of storage space.

[0152] The test results are shown in Table 1 below:

[0153]

[0154] Table 1

[0155] From Table 1, we can draw the following conclusions:

[0156] Storage space usage: The dynamic frame rate system reduces storage space usage by 20% compared to the fixed frame rate system. This is because the dynamic frame rate system can adjust the saving strategy according to the actual frame rate, avoiding unnecessary frame padding and thus reducing storage space waste.

[0157] Video Quality: The dynamic frame rate system performs better in terms of video quality, with an average PSNR improvement of 8.57%. This is thanks to the dynamic frame rate system's frame interpolation mechanism, which effectively solves the stuttering and frame drop issues caused by frame rate fluctuations, ensuring smooth and complete video playback.

[0158] System stability: The dynamic frame rate system experienced no failures during testing, with a video loss rate of 0%, while the fixed frame rate system experienced two failures and a 5% video loss rate. This demonstrates that the dynamic frame rate system can better adapt to frame rate fluctuations, ensuring the stability of the video saving process and improving the overall reliability of the security monitoring system.

[0159] Storage efficiency: The dynamic frame rate system improves storage efficiency by 25%, allowing more video data to be stored with the same storage capacity. This enables security monitoring systems to reduce investment in storage devices and lower long-term operating costs while maintaining video quality.

[0160] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for saving security detection videos based on dynamic frame rate, characterized in that, Includes the following steps: S1. Real-time video frame capture and security detection via smart camera; The smart camera in step S1 includes: Image sensors are used to capture video frames; The processor is used to execute security detection algorithms; The memory is used to store timestamps and detection result information; S2. Timestamp each frame and record the detection results. S3. Send the timestamp, image, and detection result information to the video storage thread via the thread queue; The thread queue in step S3 includes: The producer thread is used to send timestamps, images, and detection results. The consumer thread is used to retrieve information from the queue; S4. In the video storage thread, retrieve the timestamp, image, and detection result information in a loop and put them into the cache queue; S5. Calculate whether the end time of the video has been reached based on the latest timestamp, and count the total number of video frames collected during the time period from the start time of the current video to the end time of the video. S6. Calculate the appropriate frame rate for storing the video based on the total number of frames in the cache queue and the video duration, and round down to the preset frame rate level as the frame rate for saving the video. The step of calculating the appropriate frame rate in step S6 further includes: S601, Count the total number of frames in the buffer queue; S602. Calculate the actual frame rate based on the video duration and total number of frames; S603. Compare the actual frame rate with the preset frame rate level, and select the level that is closest to and no greater than the actual frame rate as the frame rate for video saving. S7. Calculate the position of each frame in the video based on the timestamp of each frame and the start time of the stored video. S8. If the number of frames is insufficient within a certain period of time, the smoothness and integrity of the video will be ensured by frame interpolation, while limiting each frame interpolation to only 1 frame. S9. Before saving the video, calculate the number of frames needed to supplement the full-length video, use the last frame for frame supplementation, and finally save the video file and the corresponding detection information file.

2. The method for saving security detection video based on dynamic frame rate according to claim 1, characterized in that, In step S4, the cache queue is used to temporarily store the timestamps, images, and detection results retrieved from the thread queue. At the same time, the cache queue can classify the information into the current video frame or the next video frame according to the end time of the video.

3. A security detection video storage system based on dynamic frame rate, comprising a security detection video storage method based on dynamic frame rate according to any one of claims 1-2, characterized in that, include: The video capture module is used to capture video frames in real time. The video detection module is used for real-time security detection and timestamps each frame, along with the detection result information, and sends it to the video storage thread. The video storage frame count module calculates whether the end time of the video has been reached based on the timestamp. If it has, it counts the total number of video frames collected within that time period. The dynamic frame rate adjustment module for video storage calculates the actual frame rate based on the total number of frames and the video duration, and determines the video saving frame rate according to the preset level. The video saving module calculates the position of each frame in the video based on the timestamp of each frame, and performs appropriate frame padding when the number of frames is insufficient. The frame is then written into the video and saved locally, along with the relevant detection result information.

4. The security detection video storage system based on dynamic frame rate according to claim 3, characterized in that, The video acquisition module further includes: Smart cameras are used to capture video frames; The image processing unit is used to perform preliminary processing on the video frames.

5. A security detection video storage system based on dynamic frame rate according to claim 3, characterized in that, The video detection module further includes: Security detection algorithms are used to analyze security-related information in video frames; A timestamp generator is used to timestamp each frame that passes the inspection.

6. A security detection video storage system based on dynamic frame rate according to claim 3, characterized in that, The video saving module further includes: A frame interpolation processor is used to perform appropriate frame interpolation when the number of frames is insufficient; A video encoder is used to encode processed video frames and save them locally. A detection information recorder is used to save relevant detection result information.

Citation Information

Patent Citations

  • Dynamic frame rate storage method and device and monitoring equipment

    CN110650320A

  • Video conference cloud recording method and device, electronic equipment and storage medium

    CN117294805A