Video recording method and device, electronic equipment and medium

By using low-power image processing algorithms and EIS algorithms to process video frames during video recording, and allocating video processing based on user viewing habits, the problem of high power consumption during video recording is solved, achieving a balance between high-quality recording and low power consumption.

CN119211462BActive Publication Date: 2026-05-19VIVO MOBILE COMM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
VIVO MOBILE COMM CO LTD
Filing Date
2024-08-30
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing technologies, due to the superposition of numerous video processing algorithms during video recording, lead to increased power consumption, higher temperatures, and reduced frequency in electronic devices, resulting in device stuttering and making it difficult to balance recording quality and power consumption.

Method used

Each original video frame is processed using a first image algorithm with low power consumption, and the original video stream or the stabilized video stream processed by the EIS algorithm is saved. The video processing power consumption is flexibly allocated according to the user's viewing habits.

Benefits of technology

While ensuring video recording quality, reduce the recording power consumption of electronic devices, avoid device lag, and improve video recording efficiency and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211462B_ABST
    Figure CN119211462B_ABST
Patent Text Reader

Abstract

The application discloses a video recording method and device, electronic equipment and medium, and belongs to the technical field of camera shooting. The method comprises the following steps: in the process of video recording, a first image algorithm is used to process each original video frame to obtain and display a first video frame corresponding to each original video frame; a first video stream is saved, the first video stream comprising at least one of an original video stream and an anti-shake video stream, the original video stream comprising each original video frame, and the anti-shake video stream comprising each original video frame processed by a first EIS algorithm; wherein the running power consumption of the first image algorithm is less than or equal to a first power consumption threshold.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of camera technology, specifically relating to a video recording method, apparatus, electronic device, and medium. Background Technology

[0002] With the development of camera technology, users have increasingly higher requirements for the camera quality of electronic devices.

[0003] Currently, in order to improve the quality of video recording, a large number of video processing algorithms can be used to process the recorded video in real time during the shooting process.

[0004] However, the numerous video processing algorithms applied during recording significantly increase the power consumption of electronic devices, leading to rapid temperature increases and substantial frequency reductions, which in turn causes the devices to stutter. Therefore, balancing video recording quality with the recording power consumption of electronic devices is a pressing issue that needs to be addressed. Summary of the Invention

[0005] The purpose of this application is to provide a video recording method, apparatus, electronic device, and medium that can reduce the recording power consumption of electronic devices while ensuring video recording quality.

[0006] In a first aspect, embodiments of this application provide a video recording method, the method comprising: during video recording, processing each original video frame using a first image algorithm to obtain and display a first video frame corresponding to each original video frame; saving a first video stream, the first video stream including at least one of an original video stream and a stabilized video stream, the original video stream including each original video frame, and the stabilized video stream including each original video frame processed by a first electronic image stabilization (EIS) algorithm; wherein the power consumption of the first image algorithm is less than or equal to a first power consumption threshold.

[0007] Secondly, embodiments of this application provide a video recording apparatus, which includes: a processing module, a display module, and a storage module; the processing module is used to process each original video frame using a first image algorithm during video recording to obtain a first video frame corresponding to each original video frame; the display module is used to display the first video frame corresponding to each original video frame processed by the processing module; the storage module is used to save a first video stream, the first video stream including at least one of an original video stream and a stabilized video stream, the original video stream including each original video frame, and the stabilized video stream including each original video frame processed by a first EIS algorithm; wherein, the power consumption of the first image algorithm is less than or equal to a first power consumption threshold.

[0008] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, wherein the memory stores programs or instructions executable on the processor, and the programs or instructions, when executed by the processor, implement the steps of the method described in the first aspect.

[0009] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.

[0010] Fifthly, embodiments of this application provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the method as described in the first aspect.

[0011] 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 described in the first aspect.

[0012] In this embodiment, during video recording, on the one hand, since a first image algorithm with low power consumption can be used to process each original video frame for video preview, the power consumption of the electronic device during video recording can be significantly reduced. On the other hand, since the original video stream or the stabilized video stream processed by the first EIS algorithm can be saved, after video recording is completed, image processing can be performed on the original video stream or the stabilized video stream to obtain a finished video stream with better image quality, thereby improving the video recording quality. Thus, the video recording method provided in this embodiment can reduce the power consumption of the electronic device during video recording while ensuring video recording quality. Attached Figure Description

[0013] Figure 1 This is a flowchart illustrating a video recording method provided in an embodiment of this application;

[0014] Figure 2 This is one of the schematic diagrams illustrating the operation process of a video recording method provided in this application embodiment;

[0015] Figure 3 This is a second schematic diagram illustrating the operation process of a video recording method provided in this application embodiment;

[0016] Figure 4 This is a schematic diagram of the structure of an electronic device to which a video recording method is applied, as provided in an embodiment of this application.

[0017] Figure 5 This is the third schematic diagram illustrating the operation process of a video recording method provided in this application embodiment;

[0018] Figure 6 This is the fourth schematic diagram illustrating the operation process of a video recording method provided in this application embodiment;

[0019] Figure 7 This is a schematic diagram of the structure of the video recording device provided in the embodiments of this application;

[0020] Figure 8 This is one of the structural schematic diagrams of the electronic device provided in the embodiments of this application;

[0021] Figure 9 This is the second schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0022] 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.

[0023] 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 use of data can be interchanged 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.

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

[0025] Currently, to improve video recording quality, numerous video processing algorithms can be used to process the recorded video in real time during the recording process. However, overlaying numerous video processing algorithms during recording significantly increases the power consumption of electronic devices, leading to a rapid increase in temperature and a large reduction in frequency, which in turn causes the electronic devices to lag.

[0026] In related technologies, when electronic devices lag, the number of algorithms can be reduced to gradually eliminate them in order to meet the recording power consumption standard. However, this may result in poor quality of the recorded video stream.

[0027] To address the aforementioned problems, this application provides a video recording method that balances power consumption and recording quality. The method includes: during video recording, processing each original video frame using a first image algorithm to obtain and display a first video frame corresponding to each original video frame; saving a first video stream, which includes at least one of an original video stream and a stabilized video stream. The original video stream includes each original video frame, and the stabilized video stream includes each original video frame processed by a first EIS algorithm. The power consumption of the first image algorithm is less than or equal to a first power consumption threshold. Thus, during video recording, on the one hand, since a low-power first image algorithm can be used to process each original video frame for video preview, the power consumption of the electronic device during video recording can be significantly reduced. On the other hand, since either the original video stream or the stabilized video stream processed by the first EIS algorithm can be saved, after video recording is completed, image processing can be performed on the original video stream or the stabilized video stream to obtain a finished video stream with better image quality, thereby improving the overall video recording quality. Thus, the video recording method provided in this application embodiment can reduce the recording power consumption of electronic devices while ensuring video recording quality.

[0028] It is understood that the video recording method provided in this application embodiment can ensure that the power consumption and temperature rise can meet the user experience, and the saved original video stream or stabilized video stream provides greater operational space for later video processing, thus ensuring that the final finished video stream has better video effects.

[0029] The video recording method provided in this application can be executed by an electronic device, or at least one of the functional modules and physical modules within the electronic device capable of performing the video recording. The specific execution subject can be determined according to actual usage requirements, and this application does not impose any limitations. This application uses an electronic device executing the video recording method as an example to illustrate the video recording method provided in this application.

[0030] This application provides a video recording method. Figure 1 A flowchart illustrating the video recording method provided in an embodiment of this application is shown, as follows: Figure 1 As shown, the video recording method provided in this application embodiment may include the following steps 101 and 102.

[0031] Step 101: During the video recording process, the electronic device uses the first image algorithm to process each original video frame, and obtains and displays the first video frame corresponding to each original video frame.

[0032] The power consumption of the first image algorithm is less than or equal to the first power consumption threshold.

[0033] It should be noted that the power consumption of the first image algorithm being less than or equal to the first power consumption threshold can be understood as: when the electronic device uses the first image algorithm to process the original video frame, the power consumption of the electronic device is less than or equal to the first power consumption threshold.

[0034] In some embodiments of this application, the types of algorithms included in the first image algorithm may be the same as the types of algorithms superimposed when recording video in related technologies.

[0035] For example, the first image algorithm may include at least one of the following algorithms: beautification algorithm, filter addition algorithm, dynamic range expansion algorithm, interpolation algorithm, etc.

[0036] It should be noted that in this embodiment, a first image algorithm with low power consumption is used to process the original video frames to be previewed, without reducing the number of algorithms. Therefore, users can see a more complete video effect during video recording. In other words, a cost-effective image algorithm with low processing power and good processing effect can be used to process the original video frames to be previewed.

[0037] For example, super-resolution algorithms can be used to perform super-resolution processing on video frames to improve their clarity and quality. Super-resolution algorithms can include those based on bilinear interpolation and those based on trilinear interpolation. While the super-resolution effect of bilinear interpolation-based algorithms is less than that of trilinear interpolation-based algorithms, they require less computation and consume less power. Therefore, using bilinear interpolation-based algorithms to process video frames for preview not only allows users to preview clearer video images but also avoids excessive increases in the power consumption of electronic devices.

[0038] In some embodiments of this application, the electronic device can record video using a camera sensor within the electronic device.

[0039] Step 102: The electronic device saves the first video stream.

[0040] The first video stream includes at least one of an original video stream and a stabilized video stream. The original video stream includes each original video frame, and the stabilized video stream includes each original video frame processed by the first EIS algorithm.

[0041] In some embodiments of this application, the first EIS algorithm may also be referred to as the video recording EIS algorithm.

[0042] In some embodiments of this application, the video frames processed by the first EIS algorithm have better image stabilization performance, for example, better than the video frames processed by the second EIS algorithm described below.

[0043] In some embodiments of this application, the stabilized video stream may also be referred to as a semi-finished video stream.

[0044] In some embodiments of this application, for each original video frame recorded by the electronic device, the electronic device may process the original video frame using a first image algorithm; and the electronic device may save the original video frame, and / or, the electronic device may process the original video frame using a first EIS algorithm and save the processed original video frame.

[0045] It's understandable that performing image stabilization on the original video frames during recording can reduce the power consumption of post-processing video frames.

[0046] It should be noted that the video recording method provided in this application embodiment can save both the original video stream and the stabilized video stream, thus facilitating secondary editing of the recorded video stream by the user. For example, the image algorithm intensity of the original video stream can be readjusted, such as adjusting the stabilization intensity or the enhancement intensity.

[0047] In some embodiments of this application, the electronic device can determine whether to save the original video stream or the stabilized video stream based on the user's historical playback information. The user's historical playback information is used to indicate the user's video playback habits.

[0048] In some embodiments of this application, step 102 may include step 102A or step 102B.

[0049] Step 102A: If the user's history playback information instructs the user to play the video after a preset duration following the completion of video recording, save the original video stream.

[0050] Step 102B: If the user's history playback information instructs the user to play the video within a preset duration after the video recording, save the stabilized video stream.

[0051] It is understandable that the preset duration can be 5 seconds, 20 seconds, 20 seconds, 1 minute, or 5 minutes, etc., and the specific duration can be determined according to the processing time of the first EIS algorithm.

[0052] It should be noted that, in order to present a better video effect, when a user rewatches the first video stream, the electronic device can first process the image of the first video stream and then display the processed first video stream.

[0053] Therefore, when a user's historical playback information indicates that the user is accustomed to watching the recorded video stream within a preset time after the video recording is completed, the electronic device can perform EIS image stabilization on each original video frame during the video recording process to shorten the processing time when the user watches the video stream, thus improving the playback efficiency of the user's video stream.

[0054] When a user's history playback information indicates that the user is accustomed to watching the recorded video stream after a preset time after recording, since the user is unlikely to view the recorded video stream immediately, the power consumption of video processing can be balanced as much as possible. That is, EIS image stabilization is performed in the background after the video recording is completed. This can further reduce the power consumption of electronic devices during video recording, thereby avoiding the overheating and frequency reduction of electronic devices, and thus avoiding stuttering of electronic devices during video recording.

[0055] For example, if users are used to leaving videos on after recording and rarely watching them immediately, electronic devices can directly save the original video stream to balance video processing power consumption as much as possible to the background rendering. If users are used to watching videos immediately after recording, electronic devices can consider video playback performance and prioritize algorithms that require caching for a certain period of time, such as 1 second, to complete them during the video recording process.

[0056] Thus, when users typically watch videos a preset time after recording, the electronic device saves the original video stream for post-processing; when users typically watch videos within a preset time after recording, the electronic device can save the stabilized video stream processed by the first EIS algorithm for post-processing. Therefore, the electronic device can flexibly and evenly distribute video processing power consumption according to the user's video playback habits, thereby improving the flexibility of balancing video processing power consumption.

[0057] In the video recording method provided in this application, during the video recording process, on the one hand, since a first image algorithm with low power consumption can be used to process each original video frame for video preview, the power consumption of the electronic device during video recording can be significantly reduced. On the other hand, since the original video stream or the stabilized video stream processed by the first EIS algorithm can be saved, after the video recording is completed, image processing can be performed on the original video stream or the stabilized video stream to obtain a finished video stream with better image quality, thereby improving the video recording quality. Thus, the video recording method provided in this application can reduce the power consumption of the electronic device during video recording while ensuring video recording quality. Furthermore, it can prevent stuttering of the electronic device during video recording.

[0058] In some embodiments of this application, before step 101 above, the video recording method provided in the embodiments of this application may further include step 103 below, and step 101 above may include step 101A below.

[0059] Step 103: The electronic device processes each raw video frame using the second EIS algorithm.

[0060] Step 101A: The electronic device uses the first image algorithm to process each original video frame processed by the second EIS algorithm, and obtains and displays the first video frame corresponding to each original video frame.

[0061] In this algorithm, the number of reference frames for the second EIS algorithm is less than that for the first EIS algorithm. Therefore, because the second EIS algorithm references fewer reference frames, the computational load for image stabilization is lower, resulting in lower power consumption for the electronic device when running the second EIS algorithm.

[0062] For example, the number of reference frames corresponding to the first EIS algorithm can be 40 to 60 frames, while the number of reference frames corresponding to the second EIS algorithm can be 2 frames.

[0063] Specifically, the first EIS algorithm can refer to the i-40 to i-1 original video frames and the i+1 to i+40 original video frames to perform EIS processing on the i-th original video frame;

[0064] The second EIS algorithm can perform EIS processing on the i-th original video frame by referring to the (i-1)-th and (i+1)-th original video frames, where i is a positive integer.

[0065] When i-40 is less than 0, all the original video frames preceding the i-th original video frame can be used as reference frames.

[0066] In some embodiments of this application, the first EIS algorithm may be called a video recording EIS algorithm, and the second EIS algorithm may be called a preview EIS algorithm. Wherein, as... Figure 2 As shown, the video recording EIS algorithm can be simply referred to as video recording EIS, and the preview EIS algorithm can be simply referred to as preview EIS.

[0067] The following is combined Figure 2 and Figure 3 The video recording method provided in the embodiments of this application will be described.

[0068] Example 1, such as Figure 2 As shown, the electronic device records video through a camera. Each raw video frame output by the camera can be divided into three channels. The first channel is used to save the raw video stream, the second channel is sent to the preview EIS algorithm to generate a preview video stream, and the third channel is sent to the recording EIS algorithm to save the semi-finished video stream.

[0069] See Figure 2 The original video stream after EIS preview processing will be calculated by multiple basic algorithms, and finally presented to the user as a preview video stream with effects. The basic algorithm refers to a simplified algorithm of the complete effect algorithm.

[0070] As can be seen, the video stream after EIS processing is stored as a semi-finished video stream, which is then rendered into a finished video stream in real time and displayed when the user watches the video, or rendered into a finished video stream and stored by the electronic device using background rendering.

[0071] Example 2, such as Figure 3 As shown, the electronic device records video via a camera. Each raw video frame output by the camera can be divided into two streams: the first stream is used to store the raw video stream, and the second stream is fed into the preview EIS algorithm to generate a preview video stream. See Example 1 above for a description of generating the preview video stream.

[0072] Thus, during video recording, because the second EIS algorithm with a smaller number of reference frames and the first image algorithm with lower power consumption can be used sequentially to process each original video frame, users can see a more complete video effect in the preview and the power consumption of the electronic device can be reduced. Furthermore, because the power consumption of the electronic device is low during video recording, stuttering during video recording can be avoided.

[0073] In some embodiments of this application, after step 102 described above, the video recording method provided in this application may further include step 104 as described below.

[0074] Step 104: The electronic device uses the second image algorithm to process each video frame in the first video stream, and obtains and saves the second video frame corresponding to each video frame.

[0075] In this case, the image quality of the first video frame is lower than that of the second video frame. For example, assuming that both the first and second image algorithms are noise reduction algorithms, then the noise in the first video frame is greater than the noise in the second video frame.

[0076] It can be understood that after the electronic device processes all the video frames in the first video stream using the second image algorithm, it can obtain the second video stream. This second video stream can also be referred to as the finished video stream.

[0077] In some embodiments of this application, the type of the second image algorithm is the same as the type of the first image algorithm.

[0078] For example, the first image algorithm includes: beautification algorithm, filter algorithm, face slimming algorithm, and background blurring algorithm; then the second image algorithm also includes beautification algorithm, filter algorithm, face slimming algorithm, and background blurring algorithm.

[0079] In some embodiments of this application, the processing effect of each algorithm in the second image algorithm is greater than the processing effect of the corresponding algorithm in the first image algorithm.

[0080] For example, combining Figure 2 and Figure 5 The first image algorithm includes image algorithm 1 and image algorithm 2, and the second image algorithm includes image algorithm 1' and image algorithm 2'. The quality of the image processed by image algorithm 1' is better than that of the image processed by image algorithm 1, and the quality of the image processed by image algorithm 2' is better than that of the image processed by image algorithm 2.

[0081] In some embodiments of this application, after the electronic device obtains the second video stream, it can delete the first video stream to reduce the storage space occupied by the electronic device.

[0082] It is understandable that step 104 is performed after the video recording is completed.

[0083] In some embodiments of this application, the electronic device may perform step 104 using either real-time foreground rendering or background rendering. The real-time foreground rendering process is perceptible to the user, meaning that video frames in the first video stream are processed and the processed video frames are displayed simultaneously. The background rendering process is imperceptible to the user, meaning that the rendering process is performed in the background of the electronic device.

[0084] It should be noted that the process by which an electronic device processes all the video frames in the first video stream can be called a rendering process.

[0085] Thus, since the electronic device can use a second image algorithm with higher processing power to process the recorded first video stream, the video quality of the processed video stream can be higher, thereby improving the video recording quality.

[0086] In some embodiments of this application, step 104 may include step 104A.

[0087] Step 104A: When the first information satisfies the rendering conditions or when the user receives playback input for the first video stream, the electronic device uses the second image algorithm to process each video frame in the first video stream, and obtains and saves the second video frame corresponding to each video frame.

[0088] The first information may include at least one of the following:

[0089] System status information of electronic devices;

[0090] User behavior information of the user currently using the electronic device;

[0091] User history behavior information when using the electronic device.

[0092] In some embodiments of this application, in mode 1, when the first information meets the rendering conditions, the electronic device can use background rendering mode and employ a second image algorithm to process each video frame in the first video stream; in mode 2, when the electronic device receives user display input for the first video stream, the electronic device can use foreground real-time rendering mode and employ a second image algorithm to process each video frame in the first video stream.

[0093] It is understood that the video recording method provided in this application ensures that users can still see the complete effect when watching the video through real-time rendering; during post-rendering, it determines whether to trigger background rendering based on user habits and the system status of the electronic device, aiming to achieve background rendering that is as imperceptible to the user as possible. After rendering is completed, real-time rendering is no longer required when the first video stream is displayed again. This solves the problem of high recording power consumption caused by stacking multiple algorithms.

[0094] In some embodiments of this application, the first information satisfying the rendering conditions indicates that the electronic device is currently capable of processing the first video stream.

[0095] In some embodiments of this application, in method 1 described above, after the electronic device saves the first video stream, as follows: Figure 4 As shown, the monitoring module 40 in the electronic device can monitor the system status of the electronic device and the user's behavior in using the electronic device to obtain first information. Then, the monitoring module 40 can output the monitored first information to the decision module 41 in the electronic device. The decision module 41 can determine whether the first information meets the rendering conditions, that is, whether the electronic device is currently capable of processing the video stream. If the decision module determines that the first information meets the rendering conditions, the decision module 41 can trigger the processing module 42 of the electronic device to start rendering, so that the processing module 42 can use the second image algorithm to perform image processing on each video frame in the first video stream.

[0096] In some embodiments of this application, such as Figure 4 As shown, during the process of the processing module 42 using the second image algorithm to process the video frames in the first video stream, the monitoring module 40 can continuously monitor the system status of the electronic device and the user's behavior when using the electronic device. If the first information obtained by monitoring no longer meets the rendering conditions, the decision module 41 can trigger the processing module 42 to stop rendering.

[0097] In some embodiments of this application, the processing module described above may be a graphics processing unit (GPU) in an electronic device.

[0098] In some embodiments of this application, such as Figure 4 As shown, the electronic device also includes a system artificial intelligence (AI) module 43. The system AI module 43 is used to collect and analyze user data to obtain the user's historical usage information and the user's current usage behavior information of the electronic device, and outputs the user's historical usage information and the user's current usage behavior information of the electronic device to the monitoring module.

[0099] In some embodiments of this application, in method 2, after saving the first video stream, the electronic device can add a first task to process the first video stream in the background processing task queue of the electronic device. When the first information meets the rendering conditions, the above-mentioned processing module can obtain the first task from the task queue, perform frame splitting processing on the first video stream, and then send each video frame obtained by the frame splitting processing into the second image algorithm for processing.

[0100] In some embodiments of this application, in the above-described method 2, when the user triggers the playback of the first video stream, the electronic device may preferentially use the second image algorithm to process the anti-shake video stream in the first video stream so as to present a video stream with a more complete image effect to the user in real time.

[0101] It should be noted that in Method 2, the electronic device can use the above-mentioned processing module to perform image processing on each video frame in the first video stream using the second image algorithm, as detailed in Method 1.

[0102] In some embodiments of this application, the system status information of the electronic device may include at least one of the following:

[0103] The load size of the central processing unit (CPU) of electronic devices;

[0104] The workload of the GPU in electronic devices;

[0105] Screen status information of electronic devices;

[0106] The temperature of electronic devices;

[0107] Battery level of electronic devices;

[0108] The amount of memory used by electronic devices.

[0109] In some embodiments of this application, user behavior information regarding the user's current use of the electronic device can indicate at least one of the following:

[0110] Is the user currently using an electronic device?

[0111] The type of application the user is currently using.

[0112] In some embodiments of this application, the user's historical behavior information regarding the use of the electronic device can indicate at least one of the following:

[0113] The time periods during which a user historically used electronic devices;

[0114] The types of applications used in the user's history.

[0115] In some embodiments of this application, the rendering conditions may include at least one of the following:

[0116] 1) The CPU load is less than or equal to the first load threshold;

[0117] 2) The GPU load is less than or equal to the second load threshold;

[0118] 3) The screen of the electronic device is off;

[0119] 4) The temperature of the electronic device is less than or equal to the first temperature threshold;

[0120] 5) The battery level of the electronic device is less than or equal to the first battery level threshold;

[0121] 6) The user is not currently using any electronic device;

[0122] 7) The application currently being used by the user is of type 1;

[0123] 8) The type of application the user is currently using is different from the second type;

[0124] 9) The system time of the electronic device is the first time, which is the start time of the background processing period determined based on the user's historical behavior when using the electronic device;

[0125] 10) The screen of the electronic device is on and the temperature of the electronic device is less than or equal to the second temperature threshold.

[0126] 11) The memory usage of the electronic device is less than the first memory threshold.

[0127] The first temperature threshold is greater than the second temperature threshold.

[0128] In some embodiments of this application, the first type of application can be an application in an electronic device whose operating power consumption is less than or equal to a second power consumption threshold; the first type of application can also be an application in an electronic device whose operating power consumption is greater than the second power consumption threshold. The first power consumption threshold and the second power consumption threshold may be the same or different.

[0129] In some embodiments of this application, the first type may include at least one of the following: music application, social application, map application, novel application, and financial application.

[0130] The second type can include: game applications or video applications.

[0131] The video recording method provided in this application embodiment will be described below with reference to specific examples.

[0132] For example, when an electronic device's screen is on, if the device's temperature is too high, the screen brightness may decrease, potentially leading to a poor user experience and consequently, poor human-computer interaction performance. Therefore, it's necessary to consider the current temperature of the electronic device; if the temperature is high, it indicates that video rendering is not suitable at this time.

[0133] For example, if a user's historical usage habits of an electronic device suggest that the user may be a student, and the electronic device, such as a mobile phone, is idle during weekday class hours, then the device can monitor its temperature and battery level during those class hours to determine if it is suitable for video rendering during that time period. For instance, if the device's temperature is below 40 degrees Celsius and its battery level is above 80%, then the device can trigger background rendering.

[0134] Thus, since the electronic device can use the second image algorithm to process each video frame in the first video stream when it receives playback input for the first video stream or when it hears that the first information meets the rendering conditions, that is, when the user triggers playback of the first video stream or the electronic device has video processing capabilities, the second image algorithm is used to process the first video stream, thereby improving the flexibility of processing the first video stream.

[0135] In some embodiments of this application, in the above-described method 2, after step 104A, the video recording method provided in this application embodiment may further include the following step 105.

[0136] Step 105: The electronic device plays the second video frame corresponding to each video frame.

[0137] The following is in conjunction with the appendix Figure 5 The video recording method provided in the embodiments of this application will be described.

[0138] For example, to ensure users see the complete video when watching a replay, a second image algorithm can be used to process the semi-finished video stream in real time to obtain the finished video stream for display to the user. Assuming the second image algorithm includes image algorithm 1' and image algorithm 2', then referring to... Figure 5 The real-time rendering process includes the following steps:

[0139] Step 1: In the system's photo album, the electronic device detects that the user has clicked to play a semi-finished video stream;

[0140] Step 2: The electronic device parses the semi-finished video stream. The electronic device can sequentially use image algorithm 1' and image algorithm 2' to process each video frame in the semi-finished video stream.

[0141] Step 3: The electronic device displays the video frames processed by image algorithm 1' and image algorithm 2' to the user;

[0142] Step 4: The electronic device stores the video frames processed by image algorithm 1' and image algorithm 2' to obtain the finished video stream.

[0143] Thus, since the second image algorithm can be used directly to process the semi-finished video stream, the processing speed of the video stream can be improved.

[0144] For example, the first video stream is Figure 3 The original video stream, assuming the second image algorithm includes image algorithm 1' and image algorithm 2', then refer to Figure 6 In the real-time rendering stage, the recording EIS algorithm, image algorithm 1' and image algorithm 2' can be used sequentially to process each original video frame in the original video stream; then the processed video frames are played and stored.

[0145] Thus, when a user rewatches the first video stream, because the electronic device can process each video frame in the first video stream in real time, as well as the corresponding second video frame for each video frame, the user can view the finished video stream with complete image effects.

[0146] In some embodiments of this application, the first video stream is the original video stream. Before step 104 above, the video recording method provided in the embodiments of this application may also include the following step 106. The above step 104 may include the following step 104B.

[0147] Step 106: The electronic device uses the first EIS algorithm to process each video frame in the first video stream.

[0148] Step 104B: The electronic device uses the second image algorithm to process each video frame processed by the first EIS algorithm, and obtains and saves the second video frame corresponding to each video frame.

[0149] It is understandable that step 106 is illustrated by the example of an electronic device using the first EIS algorithm to process each video frame in the first video stream. In actual implementation, the electronic device can also use an EIS algorithm with higher anti-shake performance to process the video frames in the first video stream so that the final video stream has a better anti-shake effect.

[0150] Thus, when the first video stream is the raw video stream, since the electronic device can first use the first EIS algorithm to process each raw video frame in the raw video stream, and then use the second image algorithm to perform image processing on the raw video frames processed by the first EIS algorithm, it can ensure that the final video frame has good image quality.

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

[0152] This application provides a video recording device. Figure 7 A schematic diagram of the structure of the video recording device provided in an embodiment of this application is shown, as follows: Figure 7 As shown, the video recording device 700 provided in this application embodiment may include: a processing module 701, a display module 702, and a storage module 703;

[0153] The processing module 701 is used to process each original video frame using a first image algorithm during the video recording process to obtain the first video frame corresponding to each original video frame.

[0154] Display module 702 is used to display the first video frame corresponding to each original video frame processed by processing module 701;

[0155] Storage module 703 is used to store a first video stream, which includes at least one of an original video stream and a stabilized video stream. The original video stream includes each original video frame, and the stabilized video stream includes each original video frame processed by a first EIS algorithm.

[0156] The power consumption of the first image algorithm is less than or equal to the first power consumption threshold.

[0157] In some embodiments of this application, the processing module 701 is further configured to process each original video frame using a second EIS algorithm before processing each original video frame using a first image algorithm to obtain and display the first video frame corresponding to each original video frame, wherein the number of reference frames corresponding to the second EIS algorithm is less than the number of reference frames corresponding to the first EIS algorithm.

[0158] The processing module 701 is specifically used to process each original video frame processed by the second EIS algorithm using the first image algorithm to obtain the first video frame corresponding to each original video frame.

[0159] In some embodiments of this application, the storage module 703 is specifically used for:

[0160] If the user's history playback information indicates that the user should play the video after a preset duration following the completion of video recording, the original video stream is saved.

[0161] If the user's history playback information instructs the user to play the video within a preset time after the video recording, the stabilized video stream is saved.

[0162] In some embodiments of this application, the processing module 701 is further configured to process each video frame in the first video stream using a second image algorithm after the storage module 703 saves the first video stream, so as to obtain a second video frame corresponding to each video frame.

[0163] Storage module 703 is also used to store the second video frame corresponding to each video frame processed by processing module 701;

[0164] The image quality of the first video frame is lower than that of the second video frame.

[0165] In some embodiments of this application, the first video stream is the original video stream;

[0166] The processing module 701 is further configured to process each video frame in the first video stream using the first EIS algorithm before processing each video frame in the first video stream using the second image algorithm to obtain the second video frame corresponding to each video frame.

[0167] The processing module 701 is specifically used to process each video frame processed by the first EIS algorithm using the second image algorithm to obtain the second video frame corresponding to each video frame.

[0168] In some embodiments of this application, the processing module 701 is specifically used to process each video frame in the first video stream using a second image algorithm when the first information satisfies the rendering conditions or when the user's playback input for the first video stream is received, so as to obtain a second video frame corresponding to each video frame.

[0169] The first piece of information includes at least one of the following:

[0170] System status information of electronic devices;

[0171] User behavior information of the user currently using the electronic device;

[0172] User history behavior information when using the electronic device.

[0173] In some embodiments of this application, the display module 702 is further configured to, after the processing module 701 receives the user's playback input for the first video stream, process each video frame in the first video stream using a second image algorithm, obtain and save the second video frame corresponding to each video frame, and then play the second video frame corresponding to each video frame.

[0174] In some embodiments of this application, the system state of the electronic device may include at least one of the following:

[0175] The CPU load of electronic devices;

[0176] The workload of the GPU in electronic devices;

[0177] Screen status information of electronic devices;

[0178] The temperature of electronic devices;

[0179] Battery level of electronic devices;

[0180] In the video recording apparatus provided in this application embodiment, during the video recording process, on the one hand, since a first image algorithm with low power consumption can be used to process each original video frame for video preview, the power consumption of the electronic device during video recording can be significantly reduced. On the other hand, since the original video stream or the stabilized video stream processed by the first EIS algorithm can be saved, after the video recording is completed, image processing can be performed on the original video stream or the stabilized video stream to obtain a finished video stream with better image quality, thereby improving the video recording quality. Thus, the video recording apparatus provided in this application embodiment can reduce the recording power consumption of the electronic device during the video recording process while ensuring video recording quality.

[0181] 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 (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.

[0182] 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.

[0183] The video recording device provided in this application embodiment can achieve... Figures 1 to 6 The various processes implemented in the method embodiments achieve the same technical effect, and will not be described again here to avoid repetition.

[0184] Optionally, such as Figure 8 As shown, this application embodiment also provides an electronic device 800, including a processor 801 and a memory 802. The memory 802 stores a program or instructions that can run on the processor 801. When the program or instructions are executed by the processor 801, 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.

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

[0186] Figure 9 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.

[0187] The electronic device 1500 includes, but is not limited to, components such as: radio frequency unit 1501, network module 1502, audio output unit 1503, input unit 1504, sensor 1505, display unit 1506, user input unit 1507, interface unit 1508, memory 1509, and processor 1510.

[0188] Those skilled in the art will understand that the electronic device 1500 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 1510 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 9 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.

[0189] The processor 1510 is used to process each original video frame using a first image algorithm during video recording to obtain the first video frame corresponding to each original video frame.

[0190] Display unit 1506 is used to display the first video frame corresponding to each original video frame processed by processor 1510;

[0191] The memory 1509 is used to store a first video stream, which includes at least one of an original video stream and a stabilized video stream. The original video stream includes each original video frame, and the stabilized video stream includes each original video frame processed by a first EIS algorithm.

[0192] The power consumption of the first image algorithm is less than or equal to the first power consumption threshold.

[0193] In some embodiments of this application, the processor 1510 is further configured to process each original video frame using a second EIS algorithm before processing each original video frame using a first image algorithm to obtain the first video frame corresponding to each original video frame, wherein the number of reference frames of the second EIS algorithm is less than the number of reference frames of the first EIS algorithm.

[0194] The processor 1510 is specifically used to process each original video frame processed by the second EIS algorithm using the first image algorithm to obtain the first video frame corresponding to each original video frame.

[0195] In some embodiments of this application, the memory 1509 is specifically used for:

[0196] If the user's history playback information instructs the user to play the video within a preset time after completing the video recording, the original video stream is saved;

[0197] If the user's history playback information instructs the user to play the video after a preset duration following video recording, the stabilized video stream is saved.

[0198] In some embodiments of this application, the processor 1510 is further configured to process each video frame in the first video stream using a second image algorithm after the first video stream is saved in the memory 1509, so as to obtain a second video frame corresponding to each video frame.

[0199] The memory 1509 is also used to store the second video frame corresponding to each video frame processed by the processor 1510;

[0200] The image quality of the first video frame is lower than that of the second video frame.

[0201] In some embodiments of this application, the first video stream is the original video stream;

[0202] The processor 1510 is further configured to process each video frame of the first video stream using the first EIS algorithm before processing each video frame in the first video stream using the second image algorithm to obtain the second video frame corresponding to each video frame.

[0203] The processor 1510 is specifically used to process each video frame processed by the first EIS algorithm using the second image algorithm to obtain the second video frame corresponding to each video frame.

[0204] In some embodiments of this application, the processor 1510 is specifically used to process each video frame in the first video stream using a second image algorithm when the first information satisfies the rendering conditions or when the user's playback input for the first video stream is received, so as to obtain a second video frame corresponding to each video frame.

[0205] The first piece of information includes at least one of the following:

[0206] System status information of electronic devices;

[0207] User behavior information of the user currently using the electronic device;

[0208] User history behavior information when using the electronic device.

[0209] In some embodiments of this application, the display unit 1506 is further configured to, upon receiving a user's playback input for the first video stream, process each video frame in the first video stream using a second image algorithm, obtain and save the second video frame corresponding to each video frame, and then play the second video frame corresponding to each video frame.

[0210] In some embodiments of this application, the system state of the electronic device includes at least one of the following:

[0211] The CPU load of electronic devices;

[0212] The workload of the GPU in electronic devices;

[0213] Screen status information of electronic devices;

[0214] The temperature of electronic devices;

[0215] Battery level of electronic devices.

[0216] In the electronic device provided in this application embodiment, during video recording, on the one hand, since a first image algorithm with low power consumption can be used to process each original video frame for video preview, the power consumption of the electronic device during video recording can be significantly reduced. On the other hand, since the original video stream or the stabilized video stream processed by the first EIS algorithm can be saved, after video recording is completed, image processing can be performed on the original video stream or the stabilized video stream to obtain a finished video stream with better image quality, thereby improving the video recording quality. Thus, the electronic device provided in this application embodiment can reduce the power consumption of the electronic device during video recording while ensuring video recording quality.

[0217] It should be understood that, in this embodiment, the input unit 1504 may include a graphics processor 15041 and a microphone 15042. The graphics processor 15041 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 1506 may include a display panel 15061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 1507 includes a touch panel 15071 and at least one of other input devices 15072. The touch panel 15071 is also called a touch screen. The touch panel 15071 may include a touch detection device and a touch controller. Other input devices 15072 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.

[0218] The memory 1509 can be used to store software programs and various data. The memory 1509 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 1509 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 1509 in this embodiment includes, but is not limited to, these and any other suitable types of memory.

[0219] Processor 1510 may include one or more processing units; optionally, processor 1510 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 1510.

[0220] 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.

[0221] 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.

[0222] 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.

[0223] 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.

[0224] 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.

[0225] 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.

[0226] 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.

[0227] 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: During the video recording process, a first image algorithm is used to process each original video frame to obtain and preview the first video frame corresponding to each original video frame. Save a first video stream, the first video stream including at least one of an original video stream and a stabilized video stream, the original video stream including each original video frame, and the stabilized video stream including each original video frame processed by a first EIS algorithm during video recording; Wherein, the power consumption of the first image algorithm is less than or equal to the first power consumption threshold; Saving the first video stream includes: If the user's history playback information indicates that the user should play the video after a preset duration following the completion of video recording, the original video stream is saved. If the user's history playback information instructs the user to play the video within a preset time after the video recording, the stabilized video stream is saved.

2. The method according to claim 1, characterized in that, Before processing each original video frame using the first image algorithm to obtain and display the first video frame corresponding to each original video frame, the method further includes: Each original video frame is processed using a second EIS algorithm, wherein the number of reference frames corresponding to the second EIS algorithm is less than the number of reference frames corresponding to the first EIS algorithm. The step of processing each original video frame using a first image algorithm to obtain and display the first video frame corresponding to each original video frame includes: The first image algorithm is used to process each original video frame that has been processed by the second EIS algorithm, and the first video frame corresponding to each original video frame is obtained and displayed.

3. The method according to claim 1 or 2, characterized in that, After saving the first video stream, the method further includes: A second image algorithm is used to process each video frame in the first video stream to obtain and save the second video frame corresponding to each video frame. The image quality of the first video frame is lower than that of the second video frame.

4. The method according to claim 3, characterized in that, The first video stream is the original video stream; Before processing each video frame in the first video stream using the second image algorithm to obtain and save the second video frame corresponding to each video frame, the method further includes: Each video frame in the first video stream is processed using the first EIS algorithm. The step of processing each video frame in the first video stream using a second image algorithm to obtain and save the second video frame corresponding to each video frame includes: The second image algorithm is used to process each video frame that has been processed by the first EIS algorithm, and the second video frame corresponding to each video frame is obtained and saved.

5. The method according to claim 3, characterized in that, The step of processing each video frame in the first video stream using a second image algorithm to obtain and save the second video frame corresponding to each video frame includes: When the first information satisfies the rendering conditions or when the user receives playback input for the first video stream, the second image algorithm is used to process each video frame in the first video stream to obtain and save the second video frame corresponding to each video frame. The first information includes at least one of the following: System status information of electronic devices; User behavior information of the user currently using the electronic device; User history behavior information when using the electronic device.

6. The method according to claim 5, characterized in that, After processing each video frame in the first video stream using the second image algorithm to obtain and save the second video frame corresponding to each video frame, the method further includes: Play the second video frame corresponding to each of the aforementioned video frames.

7. A video recording device, characterized in that, The device includes: a processing module, a display module, and a storage module; The processing module is used to process each original video frame using a first image algorithm during the video recording process to obtain a first video frame corresponding to each original video frame. The display module is used to preview and display the first video frame corresponding to each original video frame processed by the processing module; The storage module is used to store a first video stream, which includes at least one of an original video stream and a stabilized video stream. The original video stream includes each original video frame, and the stabilized video stream includes each original video frame processed by the first EIS algorithm during the video recording process. Wherein, the power consumption of the first image algorithm is less than or equal to the first power consumption threshold; The storage module is specifically used for: If the user's history playback information indicates that the user should play the video after a preset duration following the completion of video recording, the original video stream is saved. If the user's history playback information instructs the user to play the video within a preset time after the video recording, the stabilized video stream is saved.

8. 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 video recording method as described in any one of claims 1 to 6.

9. 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 video recording method as described in any one of claims 1 to 6.