Video recording method and device, equipment and storage medium

By receiving input in the wearable device and splicing pre-recorded videos in a circular buffer queue, the problem of missing key moments during wearable device recording is solved, and complete video recording is achieved.

CN121509601APending Publication Date: 2026-02-10VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511846456.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-08
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Wearable devices require the camera to be reopened when the user starts recording, causing them to miss crucial moments they want to record.

Method used

By receiving input from the wearable device, a first video is recorded and then spliced ​​with a second video in a circular buffer queue. The second video is a video taken within a preset time period before the first video started recording.

Benefits of technology

Ensure that the recorded video fully captures the content the user wants, and avoid missing key moments due to the recording process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121509601A_ABST
    Figure CN121509601A_ABST
Patent Text Reader

Abstract

The invention discloses a video recording method and device, equipment and a storage medium, and belongs to the technical field of wearable equipment. The method comprises the following steps: receiving a first input to the wearable device; recording a first video in response to the first input; splicing the first video and the second video in the circular buffer queue to obtain a third video; wherein the second video is a video in a preset time period before the recording starting moment of the first video.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of wearable devices, and particularly relates to a video recording method, device, equipment and storage medium. BACKGROUND

[0002] With the popularity of wearable devices such as smart glasses and action cameras, users have an increasing demand for convenient video recording. Traditional video recording methods usually require users to start recording in advance, so as to capture key moments. However, in most scenarios, the camera of a wearable device is in an off state, and when a user starts recording, the camera needs to be turned on again, which takes a certain amount of time and may cause the user to miss the video to be recorded. SUMMARY

[0003] Embodiments of the present application provide a video recording method, device, equipment, storage medium and program product, which can solve the problem that a wearable device easily misses video content to be recorded when shooting.

[0004] In a first aspect, embodiments of the present application provide a video recording method, which comprises: receiving a first input to a wearable device; recording a first video in response to the first input; performing splicing processing on the first video and a second video in a circular buffer queue to obtain a third video; wherein the second video is a video in a preset time period before a recording start time of the first video.

[0005] In a second aspect, embodiments of the present application provide a video recording device, which comprises: a receiving module configured to receive a first input to a wearable device; a recording module configured to record a first video in response to the first input; a processing module configured to perform splicing processing on the first video and a second video in a circular buffer queue to obtain a third video; wherein the second video is a video in a preset time period before a recording start time of the first video.

[0006] In a third aspect, embodiments of the present application provide an electronic device, which comprises a processor and a memory. The memory stores programs or instructions executable on the processor, and the programs or instructions are executed by the processor to implement the steps of the method of the first aspect.

[0007] In a fourth aspect, embodiments of the present application provide a readable storage medium, which stores programs or instructions. The programs or instructions are executed by a processor to implement the steps of the method of the first aspect.

[0008] Fifthly, embodiments of this application provide a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the method as described in the first aspect.

[0009] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the method as described in the first aspect.

[0010] In this embodiment, a first input to the wearable device is received; in response to the first input, a first video is recorded; the first video is then spliced ​​with a second video in a circular buffer queue to obtain a third video; wherein the second video is a video within a preset time period before the start of recording of the first video. In this way, by splicing the first video, which is the first video that has officially started recording, with the second video, which was pre-recorded in the circular buffer queue before the start of recording of the first video, a complete third video can be obtained. This ensures that the user does not miss crucial moments due to the time lost during the start of formal recording, thereby ensuring that the third video can completely record the video content the user wants to record. Attached Figure Description

[0011] Figure 1 This is a flowchart illustrating a video recording method provided in some embodiments of this application; Figure 2 This is one of the schematic diagrams illustrating the working principle of the video recording method provided in some embodiments of this application; Figure 3 This is the second schematic diagram illustrating the working principle of the video recording method provided in some embodiments of this application; Figure 4 These are schematic diagrams of the video recording apparatus provided in some embodiments of this application; Figure 5 These are schematic diagrams of the structure of electronic devices provided in some embodiments of this application; Figure 6 These are schematic diagrams of the hardware structure of electronic devices provided in some embodiments of this application. Detailed Implementation

[0012] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0013] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0014] The video recording method provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.

[0015] Figure 1 This is a flowchart illustrating the video recording method provided in an embodiment of this application. The video recording method may include: Step 101: Receive the first input to the wearable device.

[0016] In step 101, wearable devices may include artificial intelligence (AI) glasses, action cameras, smartwatches, smart bracelets, and so on. These wearable devices may have built-in cameras to meet the user's need for recording videos.

[0017] Understandably, wearable devices are typically small in size, and their video processing, storage, and batteries are all located inside the device, resulting in limited memory space and battery power. Therefore, the cameras of wearable devices are usually turned off in most scenarios.

[0018] Based on this, the first input to the wearable device can be received, which may be the input that triggers the wearable device's camera to start recording video.

[0019] The first input can be: a user's click on the wearable device, a voice command input by the user, or a specific gesture input by the user. The specific gesture can be determined according to actual usage needs, and this application embodiment does not limit this. The specific gesture in this application embodiment can be any one of a single-click gesture, a swipe gesture, a drag gesture, a pressure-recognition gesture, a long-press gesture, an area-change gesture, a double-press gesture, or a double-tap gesture. The click input in this application embodiment can be a single-click input, a double-tap input, or any number of clicks, and can also be a long-press input or a short-press input.

[0020] Step 102: In response to the first input, record the first video.

[0021] In step 102, in response to the first input, video recording can be officially started through the camera of the wearable device to obtain the first video.

[0022] For example, the process of a camera recording video is essentially a complete chain involving the continuous acquisition of image frames, signal processing, data compression, and storage, encompassing three core modules: optics, electronics, and algorithms. It involves six key steps: The first step is light acquisition and optical control, which is the "source input" of the image. The starting point of video recording is "capturing light," which is accomplished by the optical system of the camera device. The core components include the lens, aperture, and focus motor, and their function is to accurately converge the light from the real scene onto the image sensor.

[0023] The second step is photoelectric conversion and digitization, following the path of optical signal → electrical signal → digital signal. Optical images are "invisible light," which needs to be converted into "computable digital signals" through image sensors. This is a crucial transition from "physical light" to "electronic data."

[0024] The third step is image signal preprocessing, used to optimize the quality of the original image. The converted raw digital image, known as RAW data, contains issues such as noise and color deviation, requiring optimization by an Image Signal Processor (ISP). Common processing techniques include black level correction, white balance adjustment, color interpolation, noise reduction, and sharpening and contrast adjustment.

[0025] The fourth step is frame sequence generation, which is crucial for transforming a "single image" into a "continuous sequence of images." The essence of video recording is the rapid playback of a series of static images; due to the persistence of vision, the human eye perceives these consecutive image frames as dynamic images. Its core is generating a continuous sequence of image frames at a fixed frame rate.

[0026] The fifth step is video encoding and compression. Uncompressed raw video data is extremely large and cannot be directly stored or transmitted; therefore, it must be compressed through video encoding. The encoding principle is to remove redundant data, its core being the deletion of invalid or repetitive information. Video encoding can be divided into two categories: intra-frame compression, which compresses a single image itself, removing redundant pixels within the image, such as repetitive data in large areas of solid color. Inter-frame compression utilizes the correlation between frames; for example, when recording a static scene, adjacent frames are almost identical, and only the changing parts are recorded.

[0027] The sixth step is video encapsulation and storage to generate a playable file. The encoded "video stream," which contains only image data, needs to be encapsulated with the "audio stream" into a complete video file before it can be recognized by the player. The "audio stream" is captured and encoded by a microphone. A "timestamp" is recorded during encapsulation to ensure synchronized playback of audio and video and avoid misalignment between the picture and sound. The encapsulated video file is then written to storage media via interfaces such as USB or PCIe.

[0028] Based on the above steps, it can be seen that the first video recorded is obtained by capturing images and performing a series of subsequent processing in response to the user's first input to the wearable device. However, there is a certain time difference between when the user observes the scene they want to record and when the user inputs the first input and the wearable device responds. This time difference may cause the user to miss the key scene they really want to record.

[0029] Step 103: The first video is spliced ​​with the second video in the circular buffer queue to obtain the third video; wherein the second video is a video within a preset time period before the first video starts recording.

[0030] In step 103, before recording the first video, the circular buffer queue can store pre-recorded videos. Pre-recording is a method that records video recordings from N seconds prior to the current time. Here, N is greater than 0, and N can be set according to actual needs, such as 5s, 10s, 30s, or even longer, to meet different user requirements. In other words, the circular buffer queue can store a second video within a preset time period before the start of recording the first video.

[0031] The second video can be stored in a circular buffer queue in a packaged video format, or it can be a RAW image without image signal preprocessing and the corresponding audio data stored in a circular buffer queue, which is then processed during the splicing process to generate a video format and merged with the first video.

[0032] Understandably, due to the limited memory capacity of the circular buffer queue, pre-recorded videos can be overwritten cyclically. That is, when the circular buffer queue exceeds its set length, video segments from the first time period will overwrite video segments from the second time period, where the first time period is later than the second time period. In other words, new videos in the circular buffer queue will continuously overwrite old videos.

[0033] The first video can be concatenated with the second video in the circular buffer queue to obtain the third video. Thus, the third video can include both the officially recorded video content and video content from a period preceding the official recording.

[0034] In this embodiment, the video recording method can receive a first input to the wearable device; in response to the first input, record a first video; and concatenate the first video with a second video in a circular buffer queue to obtain a third video; wherein the second video is a video within a preset time period before the start of recording of the first video. In this way, by concatenating the first video, which is the first video that has officially started recording, with the second video, which is pre-recorded in the circular buffer queue before the start of recording of the first video, a complete third video can be obtained. This ensures that the user will not miss crucial moments due to the time lost during the start of formal recording, thereby ensuring that the third video can completely record the video content that the user wants to record.

[0035] In some embodiments, before receiving the first input to the wearable device, the method may further include: Receive a second input to the wearable device; In response to the second input, start recording the fourth video; In response to a third input to the wearable device, the recording of the fourth video ends; Store the fourth video video in a circular buffer queue; In the circular buffer queue, if the size of the fourth video is greater than the capacity threshold of the circular buffer queue, the video segments of the first time period in the fourth video cover the video segments of the second time period in the fourth video, and the first time period is later than the second time period; the second video includes at least a portion of the video content in the fourth video.

[0036] In this embodiment, since the battery capacity of wearable devices is limited, prolonged pre-recording is a burden on their power consumption. Therefore, the start and end times of pre-recording on the wearable device can be actively triggered by the user and are not considered as always-on functions of the wearable device.

[0037] It can receive a second input and a third input to the wearable device. The second input can be an input that triggers the wearable device's camera to start pre-recording video, and the third input can be an input that triggers the wearable device's camera to stop pre-recording video.

[0038] The second and third inputs can be: user clicks on the wearable device, voice commands input by the user, or specific gestures input by the user. The specific gestures can be determined based on actual usage needs, and this application embodiment does not limit this. The specific gestures in this application embodiment can be any one of the following: single-click gesture, swipe gesture, drag gesture, pressure recognition gesture, long-press gesture, area change gesture, double-press gesture, or double-tap gesture. The click input in this application embodiment can be a single-click input, double-click input, or any number of clicks, and can also be a long-press input or a short-press input.

[0039] It can respond to the second input to start recording the fourth video, and can respond to the third input to stop recording the fourth video.

[0040] In some examples, the end of pre-recording can also be the start of formal recording. In other words, the third input can be the first input used to trigger the wearable device's camera to formally record the first video. That is, after receiving the second input, the wearable device's camera performs pre-recording until it receives the first input for formal recording, at which point the wearable device's camera ends pre-recording and begins formal recording.

[0041] The recorded fourth video can be stored in a circular buffer queue. For example, after the user triggers pre-recording, the wearable device continuously saves the video data stream to the circular buffer queue and refreshes it repeatedly. That is, in the circular buffer queue, if the size of the fourth video is greater than the capacity threshold of the circular buffer queue, the video segments of the first time period in the fourth video will overwrite the video segments of the second time period in the fourth video, and the first time period is later than the second time period.

[0042] It is understandable that the second video can include the entire video content of the fourth video stored in the circular buffer queue, or it can include a portion of the video content of the fourth video stored in the circular buffer queue. For example, the circular buffer queue can store a 30-second fourth video, while the second video can be the video within 5 seconds before the start of recording of the first video. The specific settings can be configured according to actual needs and are not limited here.

[0043] When a user needs to actually record a video, the formal recording is triggered. The user can choose to stop the formal recording and obtain the first video. The pre-recorded video and the first video are then stitched together to form a complete video as the user's recording result. By using pre-recording technology to save video from a point in time up to the current moment, the user's need to capture exciting moments is met, without taking up storage space.

[0044] In this way, before the first input, the fourth video is pre-recorded using the second input and stored in a circular buffer queue. The storage space is managed using an overwrite mechanism, enabling dynamic management of the circular buffer, avoiding storage overflow, and saving memory resources. Furthermore, pre-recording provides a stable data source for subsequent video stitching.

[0045] In some embodiments, the fourth video may include image frame data and audio data; Storing the fourth video video to a circular buffer queue can include: Image frame data and audio data are encoded and compressed to obtain encoded data; The encoded data is stored in a circular buffer queue of Double Rate Synchronous Dynamic Random Access Memory (DDR). or, The image frame data is compressed to obtain compressed data; Compressed data and audio data are stored in a circular buffer queue of random access memory (RAM).

[0046] As can be understood, as mentioned above, the complete video recording chain includes: light → lens → image sensor → image signal conversion → ISP preprocessing → video encoding → encapsulation of video and audio streams to obtain the final video. Therefore, the fourth video stream typically includes image frame data and audio data.

[0047] The traditional video recording process involves directly processing the RAW image output from the image sensor through an ISP to obtain image frame data, encoding and compressing the image frame data, and then encapsulating the encoded and compressed image frame data with audio data before storing it.

[0048] In some examples of this embodiment, for wearable devices with severely insufficient memory space, during pre-recording, the wearable device can encode and compress image frame data and audio data together to obtain encoded data, which is then directly stored in the circular buffer queue of Double Data Rate (DDR). When the size of the stored encoded data exceeds the capacity threshold of the circular buffer queue, the old encoded data will be overwritten.

[0049] When it is necessary to splice the video with the first video, the encoded data will be read from the DDR for further processing.

[0050] DDR offers superior read / write speeds and lower power consumption compared to directly writing to embedded MultiMediaCard (eMMC). Therefore, directly reading and writing to DDR can reduce overall power consumption and improve recording performance. eMMC has a limited write lifespan, so infrequent writes to eMMC can indirectly extend the lifespan of wearable devices.

[0051] Encoded data is stored in DDR, which can greatly reduce memory usage. The memory usage after H.265 encoding is only about 1 / 200 of that before encoding. Reducing DDR bandwidth usage allows for caching of videos for longer periods.

[0052] In this way, by encoding and compressing image frames and audio data and storing them in the circular buffer queue of DDR, the high bandwidth of DDR is utilized to improve data read and write efficiency, making it suitable for processing high bitrate video. Furthermore, encoding and compression reduce storage usage and optimize resource utilization.

[0053] In other examples of this embodiment, for wearable devices with relatively ample memory space, only the image frame data may be compressed to obtain compressed data, which is then stored directly along with the audio data in a circular buffer queue of Random Access Memory (RAM) without encapsulation. It is understood that the image frame data here may refer to the RAW image output by the image sensor before it has undergone ISP processing.

[0054] In this way, by compressing only the image frame data and retaining the original audio data, it is stored in the circular buffer queue of RAM. Since RAM has a faster read and write speed, it is suitable for low-latency scenarios. At the same time, selective compression reduces the computational load and balances performance and storage requirements.

[0055] In this way, different video data storage strategies can be flexibly selected for different optimization goals. The most suitable pre-recorded video storage solution can be selected based on specific application scenarios such as video resolution, frame rate, real-time requirements, and hardware resources, thereby improving the overall efficiency and adaptability of the system.

[0056] In some embodiments, where the circular buffer queue includes compressed data and audio data, concatenating the first video with the second video in the circular buffer queue to obtain a third video may include: Image processing is performed on the compressed data and audio data in the circular buffer queue to obtain the second video; The second video is spliced ​​with the first video to obtain the third video.

[0057] In this embodiment, as Figure 2 As shown, wearable devices may include an MCU (Microcontroller Unit) 201, an image sensor 202, RAM 203, and a SOC (System on a Chip) 204.

[0058] During pre-recording, Sensor202 can be connected to the low-power MCU201. MCU201 adjusts the Auto Exposure (AE) and Auto White Balance (AWB) of Sensor202 in real time, without requiring the entire SOC204 to be powered on. The RAW image output from Sensor202 is compressed by MCU201 and written to RAM203. Compression reduces both the storage space in RAM203 and the bandwidth required to write to RAM203. Audio data is also written to RAM203 via MCU201.

[0059] When the user begins recording, SOC204 starts up, Sensor202 outputs images normally, and the RAW images and audio data cached in RAM203 are fed back to SOC204. Subsequent image processing is then performed normally through the ISP in SOC204. When the user finishes recording, Sensor202 stops working until all RAW images in RAM203 have been processed. Subsequent steps, such as video compression and encapsulation, are then performed to generate the final third video.

[0060] Because the SOC204 component is relatively complex, it has high power consumption after power-on. When only Sensor202, MCU201 and RAM203 are working in the system, the power consumption is relatively low. This allows the original data to be retained for a long time without waking up the SOC204, without affecting the shooting experience, and can ensure long battery life.

[0061] In this way, while reducing power consumption, unnecessary data movement can be minimized, making full use of the low latency characteristics of RAM, thereby significantly reducing video stitching latency and improving processing efficiency and real-time performance.

[0062] In some embodiments, recording a first video in response to a first input may include: In response to the first input, video recording is performed using an event camera to obtain multiple event images and audio data; the event images include the change values ​​corresponding to the pixel brightness changes.

[0063] In this embodiment, to reduce the power consumption of the wearable device during video recording, some video quality is sacrificed during recording. The restoration of this sacrificed video quality is handled by post-processing algorithms from other electronic devices, such as mobile phones, with the aim of restoring the original recording quality of the wearable device as closely as possible.

[0064] For example, a low-resolution event camera can be used to record video, obtaining multiple event images and audio data. The first video may include multiple event images and audio data, and the event images include the change values ​​corresponding to the pixel brightness changes.

[0065] Among them, the event camera is a novel visual sensor that mimics the principles of biological vision. It differs fundamentally from traditional frame-based cameras, its core characteristic being asynchronous, event-based output of visual information. Each pixel on the event camera operates independently, continuously monitoring the brightness falling on it. When a pixel detects a brightness change exceeding a preset threshold, that pixel immediately generates an "event." The event camera does not output complete image frames, but only a time-ordered "event stream," which consists of a series of discrete data points in time. Pixels that do not experience changes do not generate any output.

[0066] In some examples, the pre-recorded fourth video can also be obtained through video recording via an event camera; this is not specifically limited here. The following explanation will use pre-recording via an event camera as an example.

[0067] Because the event camera consumes extremely low power, it only outputs a tiny change in value when pixel brightness changes, while other pixels remain inactive. The event camera sensor is connected to the MCU, which controls its AE (Active Event) and AWB (Automatic Event Browsing). The entire system-on-a-chip (SoC) does not need to be powered on. The sparse event images from the sensor are transmitted to the system and temporarily stored in RAM along with the audio data without processing. When the user-defined pre-recording time is exceeded, a cyclic write operation begins. When the user starts actual recording, the event camera continues to operate. When the user stops recording, the event images in RAM are cleared, and the event camera stops operating. Then, the pre-recorded event images and the actual recorded event images are compressed and packaged with the audio data to obtain the relevant data for the third video. This third video data can be sent back to the electronic device for further processing to obtain the final video.

[0068] A dedicated neural network can be deployed on electronic devices to process sparse event images, resulting in 30fps image frames arranged in a Bayer pattern. These image frames are then fed back to the electronic device's image signal processor (ISP) for video processing. These processes include offline electronic image stabilization (EIS) algorithms, video denoising algorithms, and video super-resolution algorithms.

[0069] In some examples, a small AI chip can be configured in the wearable device. This AI chip detects ambient brightness and outputs the current scene around the wearer. It also determines the user's activity level, whether they are sleeping, have their eyes closed, or are lying down by analyzing their movement. When the user is in darkness, the wearable device's camera is turned off. Similarly, when the user is resting, not wearing the device, or has not opened their eyes for an extended period, the camera is also turned off. Conversely, when the user is moving, moving their eyes, or exhibiting other body movements such as forward or backward movements or head rotations, the wearable device's camera is immediately activated.

[0070] In this way, by recording video through an event camera, event images and audio data based on pixel changes are generated. The event camera only records dynamic scenes, which greatly reduces the amount of data, saves storage and power consumption, and is more suitable for wearable devices that require low power consumption and high efficiency.

[0071] In some embodiments, after concatenating the first video with the second video in the circular buffer queue to obtain the third video, the method may further include: The third video is sent to the mobile terminal, where it is used to perform image processing to generate the fifth video.

[0072] In this embodiment, as mentioned above, please refer to... Figure 3 The wearable device 301 may include a pre-recording stage 3011 and a formal recording stage 3012. The video obtained in the pre-recording stage 3011 can be stored in a circular buffer queue and overwritten cyclically in the circular buffer queue. The second video obtained in the pre-recording stage 3011 can be spliced ​​with the first video obtained in the formal recording stage 3012 to obtain a third video.

[0073] The third video can be sent to mobile terminal 302, where image processing is performed to generate a fifth video. For example, if the third video is recorded by an event camera, image processing may include converting the event image into image frames. Image processing may also include processing the image frames of the third video based on video enhancement algorithms to obtain a video with better resolution and stability, etc., without specific limitations here.

[0074] In this way, the spliced ​​third video is sent to the mobile terminal for further processing to generate the fifth video. The mobile terminal's stronger computing power can be used to complete complex processing, reducing the burden on wearable devices and improving the quality of the final video.

[0075] The video recording method provided in this application can be executed by a video recording device. This application uses a video recording device to perform the video recording method as an example to illustrate the video recording device provided in this application.

[0076] like Figure 4 As shown, the video recording device 400 may include: Receiver module 401 is used to receive the first input to the wearable device; Recording module 402 is used to record a first video in response to the first input; Processing module 403 is used to concatenate the first video with the second video in the circular buffer queue to obtain the third video; The second video is a video taken within a preset time period before the first video begins recording.

[0077] In this way, a complete third video can be obtained by splicing the first video that has officially started recording with the second video that was pre-recorded in the circular buffer queue before the first video started recording. This ensures that the user will not miss key moments due to the time lost in starting the official recording, and thus ensures that the third video can completely record the video content that the user wants to record.

[0078] In some embodiments, the receiving module 401 can also be used to receive a second input to the wearable device; Recording module 402 can also be used for: In response to the second input, start recording the fourth video; In response to a third input to the wearable device, the recording of the fourth video ends; Processing module 403 can also be used to store the fourth video to a circular buffer queue; In the circular buffer queue, if the size of the fourth video is greater than the capacity threshold of the circular buffer queue, the video segments of the first time period in the fourth video cover the video segments of the second time period in the fourth video, and the first time period is later than the second time period; the second video includes at least a portion of the video content in the fourth video.

[0079] In this way, before the first input, the fourth video is pre-recorded using the second input and stored in a circular buffer queue. The storage space is managed using an overwrite mechanism, enabling dynamic management of the circular buffer, avoiding storage overflow, and saving memory resources. Furthermore, pre-recording provides a stable data source for subsequent video stitching.

[0080] In some embodiments, the fourth video includes image frame data and audio data; Processing module 403 can also be used for: Image frame data and audio data are encoded and compressed to obtain encoded data; The encoded data is stored in a circular buffer queue of Double Rate Synchronous Dynamic Random Access Memory (DDR). or, The image frame data is compressed to obtain compressed data; Compressed data and audio data are stored in a circular buffer queue of random access memory (RAM).

[0081] In this way, different video data storage strategies can be flexibly selected for different optimization goals. The most suitable pre-recorded video storage solution can be selected based on specific application scenarios such as video resolution, frame rate, real-time requirements, and hardware resources, thereby improving the overall efficiency and adaptability of the system.

[0082] In some embodiments, where the circular buffer queue includes compressed data and audio data, the processing module is further configured to: Image processing is performed on the compressed data and audio data in the circular buffer queue to obtain the second video; The second video is spliced ​​with the first video to obtain the third video.

[0083] In this way, while reducing power consumption, unnecessary data movement can be minimized, making full use of the low latency characteristics of RAM, thereby significantly reducing video stitching latency and improving processing efficiency and real-time performance.

[0084] In some embodiments, the recording module 402 can also be used for: In response to the first input, video recording is performed using an event camera to obtain multiple event images and audio data; the event images include the change values ​​corresponding to the pixel brightness changes.

[0085] In this way, by recording video through an event camera, event images and audio data based on pixel changes are generated. The event camera only records dynamic scenes, which greatly reduces the amount of data, saves storage and power consumption, and is more suitable for wearable devices that require low power consumption and high efficiency.

[0086] In some embodiments, the video recording device 400 may further include: The transmission module is used to send the third video to the mobile terminal, and the third video is used to perform image processing on the third video through the mobile terminal to generate the fifth video.

[0087] In this way, the spliced ​​third video is sent to the mobile terminal for further processing to generate the fifth video. The mobile terminal's stronger computing power can be used to complete complex processing, reducing the burden on wearable devices and improving the quality of the final video.

[0088] The video recording device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television set (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.

[0089] The video recording device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system used.

[0090] The video recording device provided in this application embodiment can achieve... Figures 1 to 3 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.

[0091] Optionally, such as Figure 5 As shown, this application embodiment also provides an electronic device 500, including a processor 501 and a memory 502. The memory 502 stores a program or instructions that can run on the processor 501. When the program or instructions are executed by the processor 501, they implement the various steps of the above-described video recording method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.

[0092] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.

[0093] Figure 6 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application.

[0094] The electronic device 600 includes, but is not limited to, components such as: radio frequency unit 601, network module 602, audio output unit 603, input unit 604, sensor 605, display unit 606, user input unit 607, interface unit 608, memory 609, and processor 610.

[0095] Those skilled in the art will understand that the electronic device 600 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 610 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 6 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0096] The user input unit 607 can be used to receive the first input to the wearable device; Processor 610 can be used for: In response to the first input, record the first video; The first video is concatenated with the second video in the circular buffer queue to obtain the third video; The second video is a video taken within a preset time period before the first video begins recording.

[0097] In this way, a complete third video can be obtained by splicing the first video that has officially started recording with the second video that was pre-recorded in the circular buffer queue before the first video started recording. This ensures that the user will not miss key moments due to the time lost in starting the official recording, and thus ensures that the third video can completely record the video content that the user wants to record.

[0098] In some embodiments, the user input unit 607 can also be used to receive a second input to the wearable device; The processor 610 can also be used for: In response to the second input, start recording the fourth video; In response to a third input to the wearable device, the recording of the fourth video ends; Store the fourth video video in a circular buffer queue; In the circular buffer queue, if the size of the fourth video is greater than the capacity threshold of the circular buffer queue, the video segments of the first time period in the fourth video cover the video segments of the second time period in the fourth video, and the first time period is later than the second time period; the second video includes at least a portion of the video content in the fourth video.

[0099] In this way, before the first input, the fourth video is pre-recorded using the second input and stored in a circular buffer queue. The storage space is managed using an overwrite mechanism, enabling dynamic management of the circular buffer, avoiding storage overflow, and saving memory resources. Furthermore, pre-recording provides a stable data source for subsequent video stitching.

[0100] In some embodiments, the fourth video includes image frame data and audio data; The processor 610 can also be used for: Image frame data and audio data are encoded and compressed to obtain encoded data; The encoded data is stored in a circular buffer queue of Double Rate Synchronous Dynamic Random Access Memory (DDR). or, The image frame data is compressed to obtain compressed data; Compressed data and audio data are stored in a circular buffer queue of random access memory (RAM).

[0101] In this way, different video data storage strategies can be flexibly selected for different optimization goals. The most suitable pre-recorded video storage solution can be selected based on specific application scenarios such as video resolution, frame rate, real-time requirements, and hardware resources, thereby improving the overall efficiency and adaptability of the system.

[0102] In some embodiments, where the circular buffer queue includes compressed data and audio data, the processor 610 can also be used for: Image processing is performed on the compressed data and audio data in the circular buffer queue to obtain the second video; The second video is spliced ​​with the first video to obtain the third video.

[0103] In this way, while reducing power consumption, unnecessary data movement can be minimized, making full use of the low latency characteristics of RAM, thereby significantly reducing video stitching latency and improving processing efficiency and real-time performance.

[0104] In some embodiments, the processor 610 can also be used for: In response to the first input, video recording is performed using an event camera to obtain multiple event images and audio data; the event images include the change values ​​corresponding to the pixel brightness changes.

[0105] In this way, by recording video through an event camera, event images and audio data based on pixel changes are generated. The event camera only records dynamic scenes, which greatly reduces the amount of data, saves storage and power consumption, and is more suitable for wearable devices that require low power consumption and high efficiency.

[0106] In some embodiments, the processor 610 can also be used for: The third video is sent to the mobile terminal, where it is used to perform image processing to generate the fifth video.

[0107] In this way, the spliced ​​third video is sent to the mobile terminal for further processing to generate the fifth video. The mobile terminal's stronger computing power can be used to complete complex processing, reducing the burden on wearable devices and improving the quality of the final video.

[0108] It should be understood that, in this embodiment, the input unit 604 may include a graphics processing unit (GPU) 6041 and a microphone 6042. The GPU 6041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 606 may include a display panel 6061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 607 includes at least one of a touch panel 6071 and other input devices 6072. The touch panel 6071 is also called a touch screen. The touch panel 6071 may include a touch detection device and a touch controller. Other input devices 6072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.

[0109] The memory 609 can be used to store software programs and various data. The memory 609 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 609 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 609 in this embodiment includes, but is not limited to, these and any other suitable types of memory.

[0110] Processor 610 may include one or more processing units; optionally, processor 610 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 610.

[0111] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described video recording method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0112] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0113] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above video recording method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0114] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0115] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the video recording method embodiments described above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0116] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0117] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0118] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A video recording method, characterized in that, The method includes: Receive the first input to the wearable device; In response to the first input, record the first video; The first video is concatenated with the second video in the circular buffer queue to obtain the third video; The second video is a video taken within a preset time period before the first video begins recording.

2. The method according to claim 1, characterized in that, Before receiving the first input to the wearable device, the method further includes: Receive a second input to the wearable device; In response to the second input, start recording the fourth video; In response to a third input to the wearable device, the recording of the fourth video ends; Store the fourth video into the circular buffer queue; Wherein, in the circular buffer queue, if the size of the fourth video is greater than the capacity threshold of the circular buffer queue, a video segment of the first time period in the fourth video covers a video segment of the second time period in the fourth video, and the first time period is later than the second time period; the second video includes at least a portion of the video content in the fourth video.

3. The method according to claim 2, characterized in that, The fourth video includes image frame data and audio data; The step of storing the fourth video into the circular buffer queue includes: The image frame data and the audio data are encoded and compressed to obtain encoded data; The encoded data is stored in a circular buffer queue of a double-rate synchronous dynamic random access memory (DDR). or, The image frame data is compressed to obtain compressed data; The compressed data and the audio data are stored in a circular buffer queue of random access memory (RAM).

4. The method according to claim 3, characterized in that, When the circular buffer queue includes the compressed data and the audio data, the step of concatenating the first video with the second video in the circular buffer queue to obtain the third video includes: Image processing is performed on the compressed data and audio data in the circular buffer queue to obtain a second video; The second video is spliced ​​with the first video to obtain the third video.

5. The method according to claim 1, characterized in that, The step of recording the first video in response to the first input includes: In response to the first input, video recording is performed using an event camera to obtain multiple event images and audio data; the event images include change values ​​corresponding to pixel brightness changes.

6. The method according to any one of claims 1 to 5, characterized in that, After concatenating the first video with the second video in the circular buffer queue to obtain the third video, the method further includes: The third video is sent to a mobile terminal, and the third video is used to perform image processing on the third video through the mobile terminal to generate a fifth video.

7. A video recording device, characterized in that, The device includes: The receiving module is used to receive the first input to the wearable device; The recording module is used to record the first video in response to the first input; The processing module is used to concatenate the first video with the second video in the circular buffer queue to obtain the third video; The second video is a video taken within a preset time period before the first video begins recording.

8. The apparatus according to claim 7, characterized in that, The receiving module is also configured to receive a second input to the wearable device; The recording module is also used for: In response to the second input, start recording the fourth video; In response to a third input to the wearable device, the recording of the fourth video ends; The processing module is also used to store the fourth video into the circular buffer queue; Wherein, in the circular buffer queue, if the size of the fourth video is greater than the capacity threshold of the circular buffer queue, a video segment of the first time period in the fourth video covers a video segment of the second time period in the fourth video, and the first time period is later than the second time period; the second video includes at least a portion of the video content in the fourth video.

9. The apparatus according to claim 8, characterized in that, The fourth video includes image frame data and audio data; The processing module is further configured to: The image frame data and the audio data are encoded and compressed to obtain encoded data; The encoded data is stored in a circular buffer queue of a double-rate synchronous dynamic random access memory (DDR). or, The image frame data is compressed to obtain compressed data; The compressed data and the audio data are stored in a circular buffer queue of random access memory (RAM).

10. The apparatus according to claim 9, characterized in that, When the circular buffer queue includes the compressed data and the audio data, the processing module is further configured to: Image processing is performed on the compressed data and audio data in the circular buffer queue to obtain a second video; The second video is spliced ​​with the first video to obtain the third video.

11. The apparatus according to claim 7, characterized in that, The recording module is also used for: In response to the first input, video recording is performed using an event camera to obtain multiple event images and audio data; the event images include change values ​​corresponding to pixel brightness changes.

12. The apparatus according to any one of claims 7 to 11, characterized in that, The device further includes: A transmission module is used to send the third video to a mobile terminal, and the third video is used to perform image processing on the third video through the mobile terminal to generate a fifth video.

13. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the method as described in any one of claims 1-6.

14. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1-6.