Video storage method and device for low-power-consumption camera and storage medium
By acquiring transitional videos in low-power mode using a low-power camera and extracting partial frames based on temporal proximity and image features to generate frame-segmented videos, the problem of incomplete videos in low-power camera storage solutions is solved, achieving all-time video storage and a user-friendly video viewing experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU HUACHENG SOFTWARE TECH CO LTD
- Filing Date
- 2025-12-10
- Publication Date
- 2026-04-14
AI Technical Summary
The storage solutions for low-power cameras result in incomplete video content on the storage side, with large periods of time without video images between event recordings, affecting the user's recording viewing experience, and significantly increasing storage costs and device power consumption.
The low-power camera captures transitional video in low-power mode, and switches to high-power mode to capture event video when an event is detected. It extracts some frames from the transitional video based on temporal proximity and image features to generate frame-segmented video, and uploads it and the event video to the storage terminal to achieve full-time video storage.
Without significantly increasing storage costs and device power consumption, it achieves all-time video storage, provides context awareness of key events, facilitates user access, and improves user experience.
Smart Images

Figure CN121864931A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of video processing technology, and in particular to a video storage method, device and storage medium for a low-power camera. Background Technology
[0002] With the development of IoT technology, low-power cameras such as Always-On-Video (AOV) cameras are becoming increasingly popular. The core working mode of such devices is as follows: when no event occurs, they are in a low-power state and capture images at an extremely low frame rate (such as one frame every 2-10 seconds) to generate low frame rate recordings; when an event occurs, the device's main system is woken up, and normal recording at full frame rate is performed and stored to generate event recordings.
[0003] Currently, in order to save storage costs and device upload power consumption, low-power cameras generally only send event recordings to the storage end for storage. However, this results in incomplete video content stored on the storage end, with a large number of time gaps between event recordings without video images, affecting the user's recording viewing experience. Summary of the Invention
[0004] To address the aforementioned technical problems, this application provides at least one video storage method, device, and storage medium for a low-power camera.
[0005] The first aspect of this application provides a video storage method for a low-power camera. The low-power camera acquires image frames in a low-power mode when no event is detected, obtaining a transition video. When an event is detected, it acquires image frames in a high-power mode, obtaining an event video. The frame rate and / or resolution of the transition video is lower than that of the event video. The method includes: storing the transition video acquired by the low-power camera in low-power mode; detecting whether a preset upload trigger condition is met; if met, extracting a portion of image frames from the transition video based on the temporal proximity between the transition video and the event video, and / or image features of the transition video, to obtain a frame-segmented video corresponding to the low-power mode; uploading the frame-segmented video corresponding to the low-power mode to a storage terminal; and uploading the event video acquired in high-power mode to the storage terminal, so that a user terminal can read and play the video stored on the storage terminal.
[0006] In one embodiment, the upload triggering condition includes one or more of the following conditions: Condition 1: An event is detected, and the low-power camera enters a high-power mode to collect event video; Condition 2: A preset periodic upload time is reached; Condition 3: The cumulative number of collected transition videos reaches a preset number threshold.
[0007] In one embodiment, a portion of image frames are extracted from the transition video based on the temporal proximity between the transition video and the event video to obtain a frame-stripped video corresponding to the low-power mode. This includes: obtaining the event occurrence time corresponding to the event video; determining the proximity between the frame acquisition time corresponding to the transition video and the event occurrence time to obtain a temporal proximity; setting a corresponding extraction frame rate for the transition video based on the temporal proximity; and extracting a portion of image frames from the transition video based on the extraction frame rate to obtain a frame-stripped video corresponding to the low-power mode.
[0008] In one embodiment, the event video includes a first event video and a second event video, with a transition video located between the first and second event videos. Based on temporal proximity, a corresponding extraction frame rate is set for the transition video, including: setting a first extraction frame rate for the transition video based on the temporal proximity between the frame acquisition time of the transition video and the event occurrence time of the first event video; setting a second extraction frame rate for the transition video based on the temporal proximity between the frame acquisition time of the transition video and the event occurrence time of the second event video; and calculating the final extraction frame rate corresponding to the transition video based on the first and second extraction frame rates.
[0009] In one embodiment, the final extracted frame rate of the transition video is calculated based on the first extracted frame rate and the second extracted frame rate, including: obtaining the duration of the transition video; if the duration is less than a preset duration threshold, the maximum value of the first extracted frame rate and the second extracted frame rate is selected as the extracted frame rate of the transition video; if the duration is not less than the preset duration threshold, the first extracted frame rate and the second extracted frame rate are weighted and summed to obtain the extracted frame rate of the transition video.
[0010] In one embodiment, extracting a portion of image frames from a transition video based on its image features to obtain a frame-segmented video corresponding to a low-power mode includes: extracting image features from the transition video; dividing the transition video into different semantic time periods based on the image features; setting corresponding extraction frame rate setting strategies for different semantic time periods; determining the extraction frame rate corresponding to the transition video based on the extraction frame rate setting strategies; and extracting a portion of image frames from the transition video based on the extraction frame rate to obtain a frame-segmented video corresponding to a low-power mode.
[0011] A second aspect of this application provides a video storage method for a low-power camera, applied at a storage end. The low-power camera acquires image frames in a low-power mode when no event is detected, obtaining a transitional video. When an event is detected, it acquires image frames in a high-power mode, obtaining an event video. The method includes: receiving a frame-stripped video corresponding to the low-power mode and an event video acquired in the high-power mode uploaded by the low-power camera; wherein, after the low-power camera detects that a preset upload trigger condition is met, it extracts a portion of image frames from the transitional video based on the temporal proximity between the transitional video and the event video, and / or the image features of the transitional video, to obtain a frame-stripped video corresponding to the low-power mode; sorting the frame-stripped video and the event video according to chronological order to obtain a globally integrated video; and sending the globally integrated video to a user terminal for playback.
[0012] A third aspect of this application provides a video storage method for a low-power camera, applied to a user terminal. The low-power camera acquires image frames in a low-power mode when no event is detected, obtaining a transitional video. When an event is detected, it acquires image frames in a high-power mode, obtaining an event video. The method includes: displaying a video playback interface; acquiring a globally integrated video from a storage terminal; wherein, after the low-power camera detects that a preset upload trigger condition is met, it extracts a portion of image frames from the transitional video based on the temporal proximity between the transitional video and the event video, and / or the image features of the transitional video, to obtain a frame-segmented video corresponding to the low-power mode, and uploads the frame-segmented video and the event video to the storage terminal; the storage terminal sorts the frame-segmented video and the event video uploaded by the low-power camera according to chronological order to obtain a globally integrated video; and different playback strategies are used in the video playback interface to play the video content of the event video and the video content of the frame-segmented video in the globally integrated video.
[0013] A fourth aspect of this application provides a video storage device for a low-power camera, deployed in the low-power camera. The device includes: a storage module for storing transitional videos acquired by the low-power camera in low-power mode; an image frame extraction module for detecting whether a preset upload trigger condition is met, and if so, extracting a portion of image frames from the transitional video based on the temporal proximity between the transitional video and the event video, and / or the image features of the transitional video, to obtain a frame-stripped video corresponding to the low-power mode; and a video upload module for uploading the frame-stripped video corresponding to the low-power mode to the storage terminal, and uploading the event video acquired in high-power mode to the storage terminal, so that the user terminal can read and play the video in the storage terminal.
[0014] The fifth aspect of this application provides a video storage device for a low-power camera, deployed on a storage end. The device includes: a video receiving module for receiving frame-segmented videos corresponding to low-power mode and event videos acquired in high-power mode uploaded by the low-power camera; wherein, after the low-power camera detects that a preset upload trigger condition is met, it extracts a portion of image frames from the transition video based on the temporal proximity between the transition video and the event video, and / or the image features of the transition video, to obtain the frame-segmented video corresponding to the low-power mode; a video integration module for sorting the frame-segmented video and the event video in chronological order to obtain a globally integrated video; and a user interaction module for sending the globally integrated video to a user terminal for playback.
[0015] The sixth aspect of this application provides a video storage device for a low-power camera, deployed on a user end. The device includes: an interface display module for displaying a video playback interface; a video acquisition module for acquiring a globally integrated video from the storage end; wherein, after the low-power camera detects that a preset upload trigger condition is met, it extracts a portion of image frames from the transition video based on the temporal proximity between the transition video and the event video, and / or the image features of the transition video, to obtain a frame-segmented video corresponding to the low-power mode, and uploads the frame-segmented video and the event video to the storage end; the storage end sorts the frame-segmented video and the event video uploaded by the low-power camera according to the chronological order to obtain a globally integrated video; and a playback decision module for using different playback strategies in the video playback interface to play the video content of the event video and the video content of the frame-segmented video in the globally integrated video.
[0016] The seventh aspect of this application provides an electronic device, including a memory and a processor, wherein the processor is configured to execute program instructions stored in the memory to implement the video storage method of the low-power camera described above.
[0017] The eighth aspect of this application provides a computer-readable storage medium having program instructions stored thereon, which, when executed by a processor, implement the video storage method of the low-power camera described above.
[0018] The above solution stores transitional videos captured by a low-power camera in low-power mode; detects whether preset upload trigger conditions are met; if so, extracts a portion of image frames from the transitional video based on the temporal proximity between the transitional video and the event video, and / or the image features of the transitional video, to obtain a frame-segmented video corresponding to the low-power mode; uploads the frame-segmented video corresponding to the low-power mode to the storage terminal, and also uploads the event video captured in high-power mode to the storage terminal, so that the user terminal can read and play the video stored on the storage terminal. This solution can achieve all-time video storage without significantly increasing storage costs and device upload power consumption, realizes context awareness of key events, facilitates user access to video information, and improves user experience.
[0019] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application. Attached Figure Description
[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application.
[0021] Figure 1 This is a schematic diagram illustrating the implementation environment of the solution in an exemplary embodiment of this application; Figure 2 This is a flowchart illustrating a low-power camera video storage method in an exemplary embodiment of this application; Figure 3 This is a schematic diagram illustrating the configuration of the frame rate based on temporal proximity, as shown in an exemplary embodiment of this application. Figure 4 This is a schematic diagram illustrating the configuration of the extraction frame rate based on image features, as shown in an exemplary embodiment of this application. Figure 5 This is a flowchart illustrating a video storage method for a low-power camera, as shown in another exemplary embodiment of this application; Figure 6 This is a schematic diagram illustrating the generation of a globally integrated video, as shown in an exemplary embodiment of this application; Figure 7 This is a flowchart illustrating a video storage method for a low-power camera, as shown in another exemplary embodiment of this application; Figure 8 This is a schematic diagram illustrating a video playback interface in an exemplary embodiment of this application; Figure 9 This is a block diagram illustrating a video storage device deployed in a low-power camera, as shown in an exemplary embodiment of this application; Figure 10 This is a block diagram illustrating a video storage device deployed at a storage end, as shown in an exemplary embodiment of this application; Figure 11 This is a block diagram illustrating a video storage device deployed on a user terminal, as shown in an exemplary embodiment of this application; Figure 12 This is a schematic diagram of the structure of an electronic device shown in an exemplary embodiment of this application; Figure 13 This is a schematic diagram illustrating the structure of a computer-readable storage medium, as shown in an exemplary embodiment of this application. Detailed Implementation
[0022] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0023] In the following description, specific details such as particular system architectures, interfaces, and technologies are presented for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of this application.
[0024] In this document, the term "and / or" is merely a description of the association information of related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "many" in this document means two or more. Moreover, the term "at least one" in this document means any combination of at least two of any one or more of a plurality of elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0025] To save on storage costs and device upload power consumption, storage devices typically only store and back up event recordings. This results in significant gaps in information on the storage device, preventing users from understanding the context before the event and impacting the continuity of recordings and the efficiency of subsequent recording analysis. However, uploading all recordings to storage would drastically increase storage costs and quickly deplete the battery of low-power cameras, making it commercially unfeasible.
[0026] To address the aforementioned technical problems, this application provides at least one video storage method, device, and storage medium for a low-power camera.
[0027] The video storage method for a low-power camera provided in the embodiments of this application is described below.
[0028] Please refer to Figure 1 , Figure 1 This is a schematic diagram illustrating an implementation environment of the scheme in an exemplary embodiment of this application. The implementation environment may include a low-power camera 110, a storage terminal 120, and a user terminal 130, with the storage terminal 120 communicating with both the low-power camera 110 and the user terminal 130.
[0029] The low-power camera 110 is used for continuous video recording and sends the obtained video data to the storage unit 120 for storage.
[0030] Storage terminal 120 can receive video viewing requests from user terminal 130, send the stored video data to user terminal 130, and user terminal 130 plays the received video data.
[0031] The storage device 120 can be a cloud server, a network video recorder, or other storage device; this application does not limit the scope of the storage device.
[0032] Please see Figure 2 , Figure 2 This is a flowchart illustrating a video storage method for a low-power camera, as shown in an exemplary embodiment of this application, and is applied to a low-power camera, such as... Figure 2 As shown, the video storage method for a low-power camera includes at least steps S210 to S230, which are described in detail below: Step S210: Store the transition video captured by the low-power camera in low-power mode.
[0033] The low-power camera acquires image frames in a low-power mode when no event is detected, resulting in a transitional video. When an event is detected, it acquires image frames in a high-power mode, resulting in an event video. The low-power camera can be an AOV camera or other types of cameras; this application does not limit its use.
[0034] The frame rate and / or resolution of the transition video are lower than that of the event video. In other words, the frame rate and / or resolution of the image frames acquired in low power mode are lower than that of the image frames acquired in high power mode, in order to reduce the power consumption of the low power camera.
[0035] For example, when no event is detected, the low-power camera operates in low-power mode. In low-power mode, the main system sleeps, while the low-power coprocessor, low-power image sensor, etc., operate, acquiring image frames at a low frame rate and / or low resolution to obtain transitional video. The main system includes the main processor, image sensor, and image signal processor (ISP), enabling high-quality image acquisition. If an event is detected, the main system is immediately awakened, and it acquires event video using full frame rate, high-resolution image frames.
[0036] Store transitional videos captured by a low-power camera in low-power mode.
[0037] For example, image frames captured by a low-power camera in low-power mode can be temporarily stored in a buffer. After the buffer reaches a preset condition, the image frame sequence in the buffer is written as a transitional video to a local non-volatile memory (such as a memory card (Secure Digital, SD)).
[0038] Step S220: Detect whether the preset upload triggering conditions are met. If they are met, extract some image frames from the transition video based on the temporal proximity between the transition video and the event video, and / or the image features of the transition video, to obtain the frame-sampling video corresponding to the low-power mode.
[0039] The system detects in real time whether the preset upload trigger conditions are met. If the upload trigger conditions are met, the system performs the storage processing of the transition video.
[0040] Specifically, the process acquires the transition video that needs to be stored and processed, and extracts some image frames from the transition video based on the temporal proximity between the transition video and the event video, and / or the image features of the transition video, to obtain the frame-sampling video corresponding to the low-power mode.
[0041] The transition video can be obtained from non-volatile memory or by further obtaining a sequence of image frames acquired in low-power mode from a buffer.
[0042] Analyze one or more transition videos that need to be stored to obtain the temporal proximity between the transition video and the event video, and / or the image features of the transition video. Based on the temporal proximity between the transition video and the event video, and / or the image features of the transition video, determine a specific frame extraction strategy. The frame extraction strategy can be used to limit the frame extraction rate, and / or the frame extraction ratio, and / or the total number of image frames extracted, etc., so as to extract some image frames from the transition video based on the frame extraction strategy to obtain the frame-extracted video corresponding to the low-power mode.
[0043] For example, if the temporal proximity between the transition video and the event video represents the closer the time interval between the transition video and the event video, and / or the image features represent the more important the image content of the transition video, then the frame extraction rate of the transition video will be higher, and / or the frame extraction ratio will be higher, and / or the total number of extracted image frames will be greater; if the temporal proximity between the transition video and the event video represents the farther the time interval between the transition video and the event video, and / or the image features represent the less important the image content of the transition video, then the frame extraction rate of the transition video will be lower, and / or the frame extraction ratio will be lower, and / or the total number of extracted image frames will be less.
[0044] Preferably, after the image frame sequence acquired in low-power mode is written to the non-volatile memory as transition video, and the upload trigger condition is met, global frame extraction is performed on multiple consecutive transition videos in the non-volatile memory. By performing global frame extraction across time periods, a better frame extraction field of view can be obtained.
[0045] Step S230: Upload the frame-sampling video corresponding to the low-power mode to the storage terminal, and upload the event video collected in the high-power mode to the storage terminal, so that the user terminal can read the video in the storage terminal for playback.
[0046] After extracting frames from the transition video to obtain the extracted frame video, the extracted frame video corresponding to the low-power mode is uploaded to the storage terminal for storage.
[0047] Additionally, if there are event videos captured in high-power mode that are not stored, then the event videos will be uploaded to the storage device.
[0048] This application does not limit the process of uploading event videos to storage immediately upon collection of such videos, or it may upload them only after a preset upload trigger condition is detected.
[0049] This can be done by uploading the entire event video to the storage device, or by extracting frames from the event video and then uploading the extracted event video to the storage device. For example, the frame extraction frequency can be determined according to a preset frame extraction frequency or according to the event priority corresponding to the event video. Frames are extracted from the event video according to the frame extraction frequency, and the extracted event video is then uploaded to the storage device. This application does not limit this method.
[0050] The storage device can store event videos and frame-by-frame videos in chronological order, and the user device can read and play the videos stored on the storage device.
[0051] The video storage method of this application stores transitional videos captured by a low-power camera in low-power mode; detects whether preset upload trigger conditions are met; if so, extracts a portion of image frames from the transitional videos based on the temporal proximity between the transitional videos and event videos, and / or the image features of the transitional videos, to obtain frame-segmented videos corresponding to the low-power mode; uploads the frame-segmented videos corresponding to the low-power mode to the storage terminal, and also uploads event videos captured in high-power mode to the storage terminal, so that the user terminal can read and play the videos stored on the storage terminal. This method can achieve all-time video storage without significantly increasing storage costs and device upload power consumption, realizes context awareness of key events, facilitates users to view video information, and improves user experience.
[0052] The following describes some embodiments of this application in detail.
[0053] In one implementation, the upload triggering condition includes one or more of the following conditions: Condition 1: An event is detected, and the low-power camera enters high-power mode to capture event video; Condition 2: The preset periodic upload time has been reached; Condition 3: The cumulative number of transition videos collected reaches the preset threshold.
[0054] This could be triggered by simultaneously storing transitional videos captured in the previous low-power mode after an event is detected that causes the low-power camera to enter high-power mode; alternatively, it could be triggered after a preset periodic upload time, such as storing transitional videos once every hour; or it could be triggered by counting the cumulative number of transitional videos collected, and then storing all the accumulated transitional videos once a preset threshold is reached, such as storing every 10 accumulated transitional videos.
[0055] After the storage process of the transition video is triggered, the frame extraction strategy of the transition video to be stored is determined based on the temporal proximity between the transition video and the event video, and / or the image features of the transition video.
[0056] It should be noted that the same transition video can correspond to one frame-skipping strategy, and the video content of different time periods of the same transition video can also correspond to different frame-skipping strategies. That is, the configuration granularity of the frame-skipping strategy can be the entire transition video or a part of the video content of the transition video. This application does not limit this.
[0057] The granularity of the frame-skipping strategy can be preset based on experience or calculated flexibly according to the actual situation.
[0058] For example, the configuration granularity of the frame extraction strategy is determined based on the event priority corresponding to the event video adjacent to the transition video. The transition video configuration is then divided according to this configuration granularity to obtain multiple video segments to be configured. The frame extraction strategy corresponding to each video segment to be configured is determined based on the temporal proximity between the video segment to be configured and the event video, and / or the image features of the video segment to be configured. Here, event priority is used to characterize the importance of the event video, and can be determined based on the event type corresponding to the event video, and / or the event duration, and / or the type of target object detected, and / or the number of target objects detected, etc.
[0059] For example, the higher the event priority of an event video, the higher the information value of its adjacent transition videos. Therefore, the finer the granularity of the frame extraction strategy for adjacent transition videos, the more accurate the strategy configuration and the overall frame extraction precision of the transition videos can be improved, ensuring that more high-value transition video content can be selected. Conversely, the lower the event priority, the lower the information value of its adjacent transition videos. Therefore, the coarser the granularity of the frame extraction strategy configuration can be, reducing the frame extraction complexity and thus reducing power consumption.
[0060] The finer the configuration granularity of the video segment to be configured, the shorter the duration of video content in a single segment; conversely, the coarser the configuration granularity, the longer the duration of video content in a single segment. For example, a fine-granularity video segment corresponds to 1 minute of video content, while a coarse-granularity video segment corresponds to 3 minutes of video content.
[0061] When dividing the transition video configuration according to the configuration granularity, it can be uniformly divided into multiple video segments to be configured; or it can be non-uniformly divided into multiple video segments to be configured. In this case, the configuration granularity determined according to the event priority can include the maximum granularity and the minimum granularity. The video segments to be configured that are closer to the event video are shorter, and the video segments to be configured that are farther away from the event video are longer.
[0062] Then, based on the temporal proximity between the transition video and the event video, and / or the frame extraction strategy corresponding to the image features of the transition video, image frame extraction processing is performed on the transition video.
[0063] The following example illustrates the frame-skipping strategy, including the frame-skipping rate.
[0064] In one embodiment, step S220 involves extracting a portion of image frames from the transition video based on the temporal proximity between the transition video and the event video to obtain the frame-sampling video corresponding to the low-power mode, including the following steps S2211 to S2214.
[0065] Step S2211: Obtain the event occurrence time corresponding to the event video.
[0066] Step S2212: Determine the temporal proximity between the frame acquisition time corresponding to the transition video and the event occurrence time.
[0067] This can be the temporal proximity between the entire transition video and the event video, or it can be the temporal proximity between a portion of the transition video and the event video, such as the temporal proximity between the video segment to be configured and the event video obtained according to the aforementioned embodiment. Specifically, it is determined by the configuration granularity of the frame extraction strategy.
[0068] The smaller the time interval between frame acquisition time and event occurrence time, the higher the temporal proximity; conversely, the larger the time interval, the lower the temporal proximity.
[0069] Step S2213: Based on temporal proximity, set the corresponding extraction frame rate for the transition video.
[0070] Set the extraction frame rate for the transition video based on time proximity.
[0071] For transitional video content with high temporal proximity, a higher extraction frame rate is used for extraction; for transitional video content with low temporal proximity, a lower extraction frame rate is used for extraction. The extraction frame rate can be dynamically reduced as the temporal proximity to the event decreases.
[0072] As above, the basic unit for configuring the frame rate is determined by the configuration granularity of the frame extraction strategy.
[0073] For example, please refer to Figure 3 , Figure 3 This is a schematic diagram illustrating the configuration of the frame rate based on temporal proximity, as shown in an exemplary embodiment of this application. Figure 3 As shown, the transition videos to be uploaded include Transition Video 1 and Transition Video 2. There is an event video between Transition Video 1 and Transition Video 2. The configuration granularity, determined by event priority, has a maximum granularity of 2 minutes and a minimum granularity of 1 minute. The video segments to be configured from Transition Video 1 include: Segment 1-1 (1 minute), Segment 1-2 (2 minutes), and Segment 1-3 (2 minutes); the video segments to be configured from Transition Video 2 include: Segment 2-1 (1 minute), Segment 2-2 (2 minutes), and Segment 2-3 (2 minutes). Based on the temporal proximity of Segment 1-1, Segment 2-1, and the event video, the frame extraction rate for Segment 1-1 and Segment 2-1 is set to 1 frame every 5 seconds; based on the temporal proximity of Segment 1-2, Segment 2-2, and the event video, the frame extraction rate for Segment 1-2 and Segment 2-2 is set to 1 frame every 15 seconds; based on the temporal proximity of Segment 1-3, Segment 2-3, and the event video, the frame extraction rate for Segment 1-3 and Segment 2-3 is set to 1 frame every 30 seconds.
[0074] The above example uses a single event video as an illustration. In real-world applications, a transition video may have event videos before and after it. In this case, the calculation can be based on the event video with the highest event priority, or the calculation can be based on a combination of the two event videos.
[0075] For example, the event video includes a first event video and a second event video, with a transition video located between the first and second event videos. Based on temporal proximity, a corresponding extraction frame rate is set for the transition video, including: setting a first extraction frame rate for the transition video based on the temporal proximity between the frame acquisition time of the transition video and the event occurrence time of the first event video; setting a second extraction frame rate for the transition video based on the temporal proximity between the frame acquisition time of the transition video and the event occurrence time of the second event video; and calculating the final extraction frame rate corresponding to the transition video based on the first and second extraction frame rates.
[0076] This can be achieved by selecting the maximum or minimum value between the first and second extraction frame rates to obtain the final extraction frame rate, or by weighted summing of the first and second extraction frame rates to obtain the final extraction frame rate.
[0077] Preferably, the final extraction frame rate corresponding to the transition video is calculated based on the first extraction frame rate and the second extraction frame rate, including: obtaining the duration of the transition video; if the duration is less than a preset duration threshold, the maximum value of the first extraction frame rate and the second extraction frame rate is selected as the extraction frame rate corresponding to the transition video; if the duration is not less than the preset duration threshold, the first extraction frame rate and the second extraction frame rate are weighted and summed to obtain the extraction frame rate corresponding to the transition video.
[0078] The transition video between the first event video and the second event video can be a single transition video or a combination of multiple transition videos; this application does not impose any limitations on this.
[0079] Specifically, the weights of the first and second extraction frame rates can be set during weighted summation based on the temporal proximity between the transition video and the first and second event videos, and / or the event priorities corresponding to the first and second event videos, respectively.
[0080] Specifically, the higher the temporal proximity between the transition video and the first event video, and / or the higher the event priority of the first event video, the greater the weight of the first extracted frame rate; the lower the temporal proximity between the transition video and the first event video, and / or the lower the event priority of the first event video, the smaller the weight of the first extracted frame rate; the higher the temporal proximity between the transition video and the second event video, and / or the higher the event priority of the second event video, the greater the weight of the second extracted frame rate; the lower the temporal proximity between the transition video and the second event video, and / or the lower the event priority of the second event video, the smaller the weight of the second extracted frame rate.
[0081] In the above embodiments, the specific calculation method for determining the final extracted frame rate is based on the duration of the transition video. If the duration of the transition video is short, it indicates that the interval between the two events is short. In this case, the probability that the transition video contains important contextual information is higher, so a higher frame rate is used for frame extraction. Conversely, if the duration of the transition video is long, the probability that the transition video contains important contextual information is lower. A weighted fusion method can be used to calculate a more accurate extracted frame rate, saving storage costs and device upload power consumption.
[0082] Optionally, to further save storage costs and device upload power consumption, if the temporal proximity of the video content containing the transition video to the first event video and the second event video is less than the minimum proximity threshold, it indicates that the importance of this part of the video content is low. The minimum value between the first extraction frame rate and the second extraction frame rate can be selected as the extraction frame rate corresponding to this part of the video content. Alternatively, a preset minimum extraction frame rate can be used as the extraction frame rate corresponding to this part of the video content, or the extraction frame rate can be determined by combining the image features in the following embodiments. This application does not limit this.
[0083] Step S2214: Based on the extraction frame rate, extract some image frames from the transition video to obtain the frame-extracted video corresponding to the low-power mode.
[0084] Of course, in addition to determining the extraction frame rate based on the temporal proximity between the transition video and the event video as exemplified in the above embodiments, the extraction frame rate can also be determined by combining the temporal proximity between the transition video and the event video and the event priority of the event video. If the temporal proximity is higher and the event priority is higher, the extraction frame rate will be higher; if the temporal proximity is lower and the event priority is lower, the extraction frame rate will be lower.
[0085] In one embodiment, adjacent time periods can be divided according to the time of event occurrence. For transitional videos within adjacent time periods, the above steps S2211 to S2214 are used to extract frames. For transitional videos not within adjacent time periods, a pre-set frame extraction strategy can be used to extract frames.
[0086] In one embodiment, step S220 involves extracting a portion of image frames from the transition video based on the image features of the transition video to obtain a frame-sampling video corresponding to the low-power mode, including the following steps S2221 to S2223.
[0087] Step S2221: Extract image features from the transition video and divide the transition video into different semantic time periods based on the image features.
[0088] Semantic time periods can include: daytime time periods and nighttime time periods; or, semantic time periods can include: sunny time periods, rainy time periods, foggy time periods, etc., depending on the actual application scenario.
[0089] For example, by analyzing image features, the camera's state switching events can be automatically identified. If the flash is detected, it can be determined that a day / night mode switching event has occurred, and the corresponding image frame in the transition video at the switching moment can be set as a mandatory keyframe. Then, different semantic time periods can be obtained from the mandatory keyframes, resulting in daytime time periods and nighttime time periods.
[0090] Step S2222: Set corresponding extraction frame rate setting strategies for different semantic time periods, and determine the extraction frame rate corresponding to the transition video based on the extraction frame rate setting strategies.
[0091] Different frame rate extraction strategies can be used for different semantic time periods.
[0092] For example, during the nighttime period, a preset frame extraction rate is used to uniformly extract frames from the transition video. During the daytime period, the frame extraction rate is calculated using the methods described in steps S2211 to S2214 above, or it is determined whether frame extraction is needed based on changes in image features (such as changes in image brightness) to perform non-uniform frame extraction on the transition video.
[0093] For example, during sunny weather periods, the frame rate calculation method described in steps S2211 to S2214 above is used to perform non-uniform frame extraction on the transition video based on the calculated frame rate; during rainy weather periods, the frame rate is determined by combining the temporal proximity between the transition video and the event video and the event priority of the event video, and non-uniform frame extraction is performed on the transition video based on the calculated frame rate.
[0094] For example, during nighttime hours, a preset first frame extraction rate is used to extract frames from the transition video; during daytime hours, a preset second frame extraction rate is used to extract frames from the transition video.
[0095] The extraction frame rate setting strategy corresponding to different semantic time periods can be flexibly set according to the actual application scenario, and this application does not limit it.
[0096] For example, please refer to Figure 4 , Figure 4 This is a schematic diagram illustrating the configuration of the extraction frame rate based on image features, as shown in an exemplary embodiment of this application. Figure 4 As shown, based on the image characteristics of the transition video, the time periods from 00:00 to 06:00 and from 18:00 to 24:00 are classified as nighttime periods, and the time period from 06:00 to 18:00 is classified as daytime periods. The image frames of the transition video at the moment of switching between semantic time periods are set as mandatory keyframes. Then, the transition video in the nighttime period is uniformly extracted using a preset frame extraction rate (e.g., 1 frame every 15 minutes). For the transition video in the daytime period, it is determined whether frame extraction is needed based on the changes in image brightness, so as to perform non-uniform frame extraction on the transition video.
[0097] Step S2223: Based on the extraction frame rate, extract some image frames from the transition video to obtain the frame-extracted video corresponding to the low-power mode.
[0098] In addition to determining the frame extraction rate to obtain the frame extraction strategy in the above embodiments, the frame extraction ratio and / or the total number of image frames extracted can also be determined to obtain the frame extraction strategy. This application does not limit this.
[0099] Of course, the frame extraction strategy can also be determined by combining the temporal proximity between the transition video and the event video, as well as the image features of the transition video, in order to integrate temporal information and semantic content and improve the accuracy of frame extraction; or, without dividing semantic time periods, image frames can be extracted directly based on image features, such as directly determining whether to extract image frames based on the changes in image brightness between image frames.
[0100] After extracting some image frames from the transition video to obtain frame-segmented video, the frame-segmented video corresponding to the low-power mode is uploaded to the storage terminal. In addition, the event video collected in the high-power mode is uploaded to the storage terminal.
[0101] In one implementation, the low-power camera employs a chunked upload mechanism when uploading video data (frame-sliced video and / or event video). Specifically, the frame-sliced video and / or event video are divided into multiple data packets and uploaded sequentially. If the network is interrupted during the upload process, the low-power camera records the breakpoint and, upon network recovery, prioritizes attempting to resume the transmission of the incomplete data packets.
[0102] In addition, the storage device performs integrity checks when receiving video data. For video data that fails to be received or times out, it initiates a re-upload request to the low-power camera and marks the affected time period as "pending synchronization" during this process.
[0103] The above embodiments can avoid data loss caused by network anomalies and ensure the continuity and reliability of video data at the storage end.
[0104] Please see Figure 5 , Figure 5 This is a flowchart illustrating a video storage method for a low-power camera, as shown in another exemplary embodiment of this application, applied to the storage end, such as... Figure 5 As shown, Figure 5 As shown, the video storage method for a low-power camera includes at least steps S510 to S530, which are described in detail below: Step S510: Receive the low-power mode corresponding frame-stripped video and the event video acquired in high-power mode uploaded by the low-power camera; wherein, after the low-power camera detects that the preset upload trigger condition is met, it extracts part of the image frames from the transition video based on the temporal proximity between the transition video and the event video and / or the image features of the transition video to obtain the low-power mode corresponding frame-stripped video.
[0105] The specific method for generating frame-skipped videos is described in the aforementioned embodiments and will not be repeated here.
[0106] Step S520: Sort the extracted frame video and event video in chronological order to obtain the globally integrated video.
[0107] The received frame-by-frame videos and event videos are sorted and integrated in chronological order to obtain a globally integrated video with continuous time.
[0108] In one embodiment, if a data blank segment exceeding a preset duration is detected, boundary frame compensation and visual marking are performed.
[0109] Specifically, when a data blank segment is detected, the last frame of the video data preceding the data blank segment is copied as the "end marker frame," and the first frame of the video data following the data blank segment is copied as the "start marker frame." These frames are then associated with the data blank segment so that the user can visually mark the data based on the "end marker frame" and "start marker frame" during video playback, making it easier for the user to view.
[0110] For example, please refer to Figure 6 , Figure 6 This is a schematic diagram illustrating the generation of a globally integrated video, as shown in an exemplary embodiment of this application. Figure 6 As shown, in chronological order, the video clips at different frame rates and the event video at full frame rate are integrated. There may also be data blank segments, which are marked as "end marker frame" and "start marker frame".
[0111] In one embodiment, for the frame-stripped video composed of image frames acquired in low-power mode, an inter-frame transition animation is generated to obtain a continuous and complete globally integrated video on the timeline, thereby improving visual coherence and enhancing the playback effect on subsequent user terminals.
[0112] Step S530: Send the globally integrated video to the user's terminal for playback.
[0113] If a video playback request is detected on the user's device, the globally integrated video will be sent to the user's device for playback.
[0114] Please see Figure 7 , Figure 7 This is a flowchart illustrating a video storage method for a low-power camera, as shown in another exemplary embodiment of this application, applied to a user terminal, such as... Figure 7 As shown, the video storage method for a low-power camera includes at least steps S710 to S730, which are described in detail below: Step S710: Display the video playback interface.
[0115] Step S720: Obtain the globally integrated video from the storage terminal; wherein, after the low-power camera detects that the preset upload trigger condition is met, it extracts some image frames from the transition video to obtain the frame-sampling video corresponding to the low-power mode, and uploads the frame-sampling video and event video to the storage terminal; the storage terminal sorts the frame-sampling video and event video uploaded by the low-power camera in chronological order to obtain the globally integrated video.
[0116] The method for generating globally integrated videos is described in the aforementioned embodiments and will not be repeated here.
[0117] Step S730: In the video playback interface, different playback strategies are used to play the video content of the event video and the video content of the frame-skipped video in the globally integrated video.
[0118] For example, for event videos, the video progress bar is rendered using a first-person visual style (such as highlighting and thick solid lines).
[0119] For example, for frame-skipped videos, a secondary visual style (such as light color, dashed line, or thin solid line) is used to render the video progress bar.
[0120] For example, for data blank segments, based on the "end marker frame" and "start marker frame" corresponding to the data blank segment, a third-view style that is different from event video and frame-skipping video is used to render the video progress bar. In addition, the reason for marking the data blank segment can also be identified.
[0121] By displaying different types of video data, users can intuitively understand the source and status of each video data.
[0122] When user interaction with the video progress bar is detected, the corresponding playback mode is switched based on the type of video data.
[0123] For example, the event video can be played at normal speed, while the frame-by-frame transition animation generated by the storage terminal can be used for fast-forwarding of the frame-by-frame video, or the frame-by-frame display can be performed when there is no frame-by-frame transition animation.
[0124] Optionally, a quick jump button can be set in the video playback interface. If the quick jump button is triggered, the frame transition animation generated on the storage side will jump to the frame-dropped video uploaded by the low-power camera, making it convenient for users to select and view.
[0125] For example, please refer to Figure 8 , Figure 8 This is a schematic diagram illustrating a video playback interface as shown in an exemplary embodiment of this application, such as... Figure 8As shown, the video playback window is used to play video content, and the playback pointer in the video progress bar is used to indicate the position of the currently playing content in the overall video. The video progress bar distinguishes different types of videos: frame-skipped videos are displayed in light color, event videos are displayed in blue, and blank data segments are displayed in red.
[0126] To illustrate the video storage method of this application in detail, several specific application scenarios are provided as examples: Scene 1: The low-power camera is specifically an AOV camera. When there is no event, the camera acquires image frames at a rate of 0.1 frames per second (i.e., 1 frame every 10 seconds) and stores them in the buffer; when there is an event, it records event video at a rate of 15 frames per second.
[0127] Specifically, in AOV mode, the camera continuously writes the captured low frame rate image frames (with precise timestamps) into the circular buffer of the buffer. When the buffer is full of 1000 frames, the camera's main system is woken up and writes the 1000 frames in the buffer as a transitional video to the SD card.
[0128] At 2:00 PM, the camera detected movement, the main system was activated, and began recording a 2-minute video of the event. Simultaneously, video storage processing was performed, reading multiple recently accumulated transition videos from the SD card. For transition videos within 10 minutes before and after the event (specifically, the event start time 2:00:00 PM), the frame rate was set based on temporal proximity: 0-2 minutes before / after the event were sampled at 1 frame / 5 seconds, 2-5 minutes at 1 frame / 20 seconds, and 5-10 minutes at 1 frame / 60 seconds; for transition videos in other time periods, 1 frame / 10 minutes was sampled.
[0129] The camera extracts frame images from the transition video to obtain frame-segmented video. The camera then packages the captured event video and the extracted frame-segmented video together and uploads them to the storage device.
[0130] On the storage side, the received 2-minute event video and the sampled frame video are integrated into a unified timeline according to their respective timestamps to obtain a globally integrated video.
[0131] On the user side, the user requests globally integrated videos from the storage device through the application (App) for playback. The video playback interface plays the video and displays a video progress bar. Event videos are displayed as a highlighted blue thick bar, while videos with skipped frames are displayed as light gray thin lines. When the user drags the video progress bar to a previous event, the player displays the skipped frame video in fast-forward mode; when playing back to the event video, it automatically switches to normal playback speed.
[0132] Scene 2: When the camera is in AOV mode, whenever the buffer is full, the sequence of image frames in the buffer is written as a transition video to the SD card, and the cumulative number of transition videos written is recorded.
[0133] When the number of transition videos accumulated in the SD card reaches 6, the upload trigger condition is met, triggering video storage processing. Global sampling is directly performed on these 6 transition videos. The extraction frame rate is set to 2 frames per hour according to the semantic time period in which they are located. Image frames are extracted to obtain frame-picked videos, which are then uploaded to the storage end.
[0134] On the storage side, during video integration, a one-hour gap was found between 03:00 and 04:00 (possibly due to a brief power outage or malfunction of the camera). This gap was treated as a data gap segment. The last image frame at 02:59:59 was marked as the "end marker frame" of this data gap segment, and the first image frame at 04:00:01 was marked as the "start marker frame".
[0135] On the user's end, the blank data segment on the video progress bar is displayed with a red dotted line, and a text message is generated to prompt the user that the data for that period is abnormal.
[0136] Scene 3: The camera captures event A at time T1 and event B at time T2, with a 45-minute transition video in between.
[0137] When the camera is awakened by event B and prepares to upload the event video, image frames are simultaneously extracted from the transition video between T1 and T2. Specifically: near the end of event A (T1+2min to T1+5min), 1 frame is sampled at 10 seconds; near the beginning of event B (T2-5min to T2), 1 frame is sampled at 15 seconds; and in the middle section (T1+5min to T2-5min), 1 frame is sampled at 2 minutes. This frame extraction method ensures rich context before and after the event while quickly skipping low-value video content in between.
[0138] Scene 4: For transitional videos lasting up to 24 hours, image frames are extracted by dividing them into semantic time periods.
[0139] Specifically, the system analyzes the image features of the transition video to automatically identify the time when night turns into day (T_morning). For example, if the screen changes from black and white to color, the corresponding time is T_morning. Similarly, the system identifies the time when day turns into night (T_evening). For example, if the screen changes from color to black and white, the corresponding time is T_evening.
[0140] The image frames corresponding to times T_morning and T_evening are unconditionally selected as mandatory keyframes for transmission.
[0141] Then, for the transition video during the nighttime period before T_morning and the transition video during the nighttime period after T_evening, low-frequency uniform sampling (e.g., 1 frame every 15 minutes) is used; for the daytime period between T_morning and T_evening, it is determined whether frame extraction is needed based on the changes in image brightness. When the brightness difference between frames is greater than a threshold, image frames are extracted; otherwise, they are skipped.
[0142] Using the above method, a complete day's activities and environmental changes can be vividly displayed without requiring a small number of image frames.
[0143] Scene 5: The camera was activated by an event and began uploading a frame-by-frame video containing the event video and 50 image frames. During the upload of the 30th image frame, the camera's Wi-Fi signal was temporarily interrupted, causing the upload to fail.
[0144] The camera records the breakpoint of this upload (i.e., the 31st image) and marks this upload task as "incomplete." Then, after no further events, the camera enters sleep mode, but retains this task record. Approximately 5 minutes later, the camera is awakened again due to new events and the Wi-Fi signal is restored. Before performing a new round of frame-by-frame upload, it checks and executes the "incomplete" upload task, uploading only the remaining images from the 31st to the 50th, thus saving bandwidth and time.
[0145] On the storage end, when a complete data packet is not received for the first time, it marks the corresponding timeline position (i.e., the time corresponding to the 31st image) as "data pending synchronization". When the remaining images are received for subsequent transmission, the "pending synchronization" mark is cleared, and all images are integrated to the correct time position, ensuring data integrity.
[0146] Scene Six: When integrating video data, the storage device identifies a 30-minute frame-drop video consisting of 5 image frames (with a frame interval of about 6 minutes). It calculates the motion vectors between adjacent image frames using optical flow and interpolates to generate intermediate transition frames. Finally, it synthesizes a shortened transition animation with a total playback time of 10 seconds and a frame rate of 5fps.
[0147] When the user plays back the video, when the video reaches the time segment corresponding to the above-mentioned frame-dropped video, the generated 10-second transition animation will be played automatically. The animation will present the slow changes in the scene (such as the movement of light and shadow, and the passing of clouds) in a fast-forward but visually coherent manner, providing a far superior experience to the original frame-by-frame playback of the frame-dropped video.
[0148] Additionally, the user's device displays a red dotted line segment on the video progress bar, representing a data gap. If the system detects that the user hovers the mouse or touches this red segment with their finger, a pop-up message will appear: "Device offline during this period, data missing," indicating the cause of the error. Alternatively, when the playback progress passes through this data gap segment, the playback window will display a prompt icon and / or text: "Device offline, skip the gap segment," and then automatically and quickly jump to the start of the next valid video data point to avoid prolonged black screens.
[0149] Figure 9 This is a block diagram illustrating a video storage device deployed in a low-power camera, as shown in an exemplary embodiment of this application. Figure 9 As shown, the exemplary video storage device 900 deployed in a low-power camera includes: Storage module 910 is used to store transitional videos captured by the low-power camera in low-power mode; The image frame extraction module 920 is used to detect whether the preset upload trigger conditions are met. If they are met, it extracts some image frames from the transition video based on the temporal proximity between the transition video and the event video and / or the image features of the transition video to obtain the frame-extracted video corresponding to the low-power mode. The video upload module 930 is used to upload the frame-sampling video corresponding to the low-power mode to the storage end, and to upload the event video collected in the high-power mode to the storage end, so that the user end can read the video in the storage end for playback.
[0150] Figure 10 This is a block diagram illustrating a video storage device deployed on a storage end, as shown in an exemplary embodiment of this application. Figure 10 As shown, the exemplary video storage device 1000 deployed at the storage end includes: The video receiving module 1010 is used to receive the low-power mode corresponding frame-stripped video and the event video acquired in the high-power mode uploaded by the low-power camera; wherein, after the low-power camera detects that the preset upload trigger condition is met, it extracts part of the image frames from the transition video based on the temporal proximity between the transition video and the event video and / or the image features of the transition video to obtain the low-power mode corresponding frame-stripped video. The video integration module 1020 is used to sort the extracted frame videos and event videos according to the time sequence to obtain the globally integrated video; User interaction module 1030 is used to send the globally integrated video to the user terminal for playback.
[0151] Figure 11 This is a block diagram illustrating a video storage device deployed on a user terminal, as shown in an exemplary embodiment of this application. Figure 11As shown, the exemplary video storage device 1100 deployed on a user end includes: Interface display module 1110 is used to display the video playback interface; The video acquisition module 1120 is used to acquire the globally integrated video in the storage terminal. After the low-power camera detects that a preset upload trigger condition is met, it extracts a portion of image frames from the transition video based on the temporal proximity between the transition video and the event video, and / or the image features of the transition video, to obtain the frame-segmented video corresponding to the low-power mode. The frame-segmented video and the event video are then uploaded to the storage terminal. The storage terminal sorts the frame-segmented video and the event video uploaded by the low-power camera according to chronological order to obtain the globally integrated video. The playback decision module 1130 is used to employ different playback strategies in the video playback interface to play the video content of the event video and the video content of the frame-skipped video in the globally integrated video.
[0152] It should be noted that the video storage device for the low-power camera provided in the above embodiments and the video storage method for the low-power camera provided in the above embodiments belong to the same concept. The specific ways in which each module and unit performs operations have been described in detail in the method embodiments, and will not be repeated here. In practical applications, the video storage device for the low-power camera provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. This is not a limitation.
[0153] Please see Figure 12 , Figure 12 This is a schematic diagram illustrating the structure of an electronic device in an exemplary embodiment of this application. The electronic device 1200 includes a memory 1201 and a processor 1202. The processor 1202 is used to execute program instructions stored in the memory 1201 to implement the steps in any of the video storage method embodiments of the low-power camera described above.
[0154] Specifically, processor 1202 controls itself and memory 1201 to implement the steps in any of the video storage method embodiments of the low-power camera described above. Processor 1202 can also be referred to as a Central Processing Unit (CPU). Processor 1202 may be an integrated circuit chip with signal processing capabilities. Processor 1202 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor. Furthermore, processor 1202 can be implemented using integrated circuit chips.
[0155] Please see Figure 13 , Figure 13 This is a schematic diagram illustrating the structure of a computer-readable storage medium according to an exemplary embodiment of this application. The computer-readable storage medium 1300 stores program instructions 1310 that can be executed by a processor. The program instructions 1310 are used to implement the steps in any of the video storage method embodiments of the low-power camera described above.
[0156] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0157] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.
[0158] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0159] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A video storage method for a low-power camera, characterized in that, The method, applied to a low-power camera, acquires image frames in a low-power mode to obtain a transition video when no event is detected, and acquires image frames in a high-power mode to obtain an event video when an event is detected. The frame rate and / or resolution of the transition video is lower than that of the event video. Store the transitional video captured by the low-power camera in the low-power mode; Detect whether the preset upload trigger condition is met. If it is met, extract some image frames from the transition video based on the temporal proximity between the transition video and the event video, and / or the image features of the transition video, to obtain the frame-sampling video corresponding to the low power mode. The low-power mode corresponding frame-sampling video is uploaded to the storage terminal, and the high-power mode event video is uploaded to the storage terminal so that the user terminal can read and play the video in the storage terminal.
2. The method according to claim 1, characterized in that, The upload triggering conditions include one or more of the following conditions: Condition 1: When an event is detected, the low-power camera enters high-power mode to capture event video; Condition 2: The preset periodic upload time has been reached; Condition 3: The cumulative number of transition videos collected reaches the preset threshold.
3. The method according to claim 1, characterized in that, Based on the temporal proximity between the transition video and the event video, a portion of image frames are extracted from the transition video to obtain the frame-sampling video corresponding to the low-power mode, including: Obtain the event occurrence time corresponding to the event video; Determine the proximity between the frame acquisition time corresponding to the transition video and the event occurrence time to obtain the time proximity. Based on the time proximity, a corresponding extraction frame rate is set for the transition video; Based on the extraction frame rate, a portion of image frames are extracted from the transition video to obtain the frame-extracted video corresponding to the low-power mode.
4. The method according to claim 3, characterized in that, The event video includes a first event video and a second event video, and the transition video is located between the first event video and the second event video; The step of setting a corresponding extraction frame rate for the transition video based on the temporal proximity includes: Based on the temporal proximity between the frame acquisition time corresponding to the transition video and the event occurrence time of the first event video, a first extraction frame rate of the transition video is set. Based on the temporal proximity between the frame acquisition time corresponding to the transition video and the event occurrence time of the second event video, a second extraction frame rate of the transition video is set. Based on the first extraction frame rate and the second extraction frame rate, the final extraction frame rate corresponding to the transition video is calculated.
5. The method according to claim 4, characterized in that, The step of calculating the final extracted frame rate of the transition video based on the first extracted frame rate and the second extracted frame rate includes: Obtain the duration of the transition video; If the duration is less than a preset duration threshold, the maximum value of the first extraction frame rate and the second extraction frame rate is selected as the extraction frame rate corresponding to the transition video. If the duration is not less than the preset duration threshold, then the first extraction frame rate and the second extraction frame rate are weighted and summed to obtain the extraction frame rate corresponding to the transition video.
6. The method according to claim 1, characterized in that, Based on the image features of the transition video, a portion of image frames are extracted from the transition video to obtain the frame-segmented video corresponding to the low-power mode, including: Extract image features from the transition video, and divide the transition video into different semantic time periods based on the image features; For different semantic time periods, a corresponding extraction frame rate setting strategy is set, and the extraction frame rate corresponding to the transition video is determined based on the extraction frame rate setting strategy. Based on the extraction frame rate, a portion of image frames are extracted from the transition video to obtain the frame-extracted video corresponding to the low-power mode.
7. A video storage method for a low-power camera, characterized in that, Applied to the storage end, the low-power camera acquires image frames in low-power mode when no event is detected to obtain transitional video, and acquires image frames in high-power mode when an event is detected to obtain event video. The method includes: The system receives frame-stripped video corresponding to the low-power mode and event video acquired in the high-power mode uploaded by the low-power camera. Wherein, after the low-power camera detects that a preset upload trigger condition is met, it extracts a portion of image frames from the transition video based on the temporal proximity between the transition video and the event video, and / or the image features of the transition video, to obtain the frame-stripped video corresponding to the low-power mode. The extracted video and the event video are sorted according to the chronological order to obtain the globally integrated video; The globally integrated video is sent to the user's device for playback.
8. A video storage method for a low-power camera, characterized in that, Applied to the user end, the low-power camera acquires image frames in low-power mode when no event is detected to obtain transitional video, and acquires image frames in high-power mode when an event is detected to obtain event video. The method includes: Displays the video playback interface; The system acquires a globally integrated video from the storage device. Specifically, after the low-power camera detects that a preset upload trigger condition is met, it extracts a portion of image frames from the transition video based on the temporal proximity between the transition video and the event video, and / or the image features of the transition video, to obtain a frame-segmented video corresponding to the low-power mode. The frame-segmented video and the event video are then uploaded to the storage device. The storage device sorts the frame-segmented video and the event video uploaded by the low-power camera according to their chronological order to obtain the globally integrated video. Different playback strategies are used in the video playback interface to play the video content of the event video and the video content of the frame-skipped video in the globally integrated video.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the processor being configured to execute program instructions stored in the memory to implement the steps of the method as described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program instructions that can be executed by a processor to implement the steps of the method as described in any one of claims 1-8.