Video processing method and device, equipment and storage medium

Through the video processing method of asynchronous processing architecture and memory mapping relationship, the delay and heating problems caused by limited hardware resources are solved, the stability and battery life of high-resolution video are balanced, and the user experience is improved.

CN120751194APending Publication Date: 2025-10-03GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511000446.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-18
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

When processing high-resolution or high-frame-rate videos, existing technologies suffer from increased latency and severe heat generation due to limited hardware resources, making it difficult to balance system stability and battery life while ensuring image quality.

Method used

Adopting an asynchronous processing architecture, the original video data is stored through the first storage path, preset processing is performed based on video browsing instructions and real-time hardware parameters, the processed video data is obtained, and it is replaced with the second storage path for playback through a memory mapping relationship, realizing peak-shifting scheduling of computing power and reconstruction of the storage architecture.

Benefits of technology

While ensuring video quality, it improves system stability and battery life, avoids hardware resource conflicts, and improves video processing efficiency and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120751194A_ABST
    Figure CN120751194A_ABST
Patent Text Reader

Abstract

The invention discloses a video processing method and device, equipment and a storage medium, and the method comprises the steps: obtaining original video data, obtaining the original video data, and storing the original video data according to a first storage path; based on a received video browsing instruction and / or real-time hardware parameters, performing first preset processing on the original video data to obtain first processed video data; and storing the first processed video data according to a second storage path, and replacing the memory mapping relationship corresponding to the first storage path with the memory mapping relationship corresponding to the second storage path, so as to perform video playing based on the first processed video data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of video processing technology, and in particular to a video processing method and apparatus, device and storage medium. Background Art

[0002] With the widespread use of mobile devices for video recording and processing, users' requirements for video quality, smoothness, and device performance are constantly increasing. Video processing involves large amounts of data reading and writing and real-time computing, placing high demands on the terminal's processor computing power, storage speed, and power consumption control.

[0003] Related technologies typically use a unified path to store raw video data and perform real-time processing to reduce system complexity. However, when processing high-resolution or high-frame-rate video, hardware resource limitations can lead to increased latency, severe heat generation, and other issues. Summary of the Invention

[0004] The embodiments of the present application provide a video processing method and apparatus, a device, and a storage medium, which can solve the problem of resource conflicts between processing and storage, thereby ensuring image quality while taking into account the stability and battery life of the system.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides a video processing method, the method comprising:

[0007] Acquire original video data, and store the original video data according to a first storage path;

[0008] Based on the received video browsing instruction and / or real-time hardware parameters, performing a first preset processing on the original video data to obtain first processed video data;

[0009] The first processed video data is stored according to the second storage path, and the memory mapping relationship corresponding to the first storage path is replaced by the memory mapping relationship corresponding to the second storage path, so as to play the video based on the first processed video data.

[0010] In a second aspect, an embodiment of the present application provides a video processing device, the video processing device comprising:

[0011] An acquisition unit, used for acquiring original video data;

[0012] A storage unit, configured to store the original video data according to a first storage path;

[0013] The acquiring unit is further configured to perform a first preset processing on the original video data based on the received video browsing instruction and / or real-time hardware parameters to obtain first processed video data;

[0014] The storage unit is further configured to store the first processed video data according to a second storage path;

[0015] A replacement unit is used to replace the memory mapping relationship corresponding to the first storage path with the memory mapping relationship corresponding to the second storage path, so as to play the video based on the first processed video data.

[0016] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory storing instructions executable by the processor. When the instructions are executed by the processor, the method of the first aspect is implemented.

[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the method of the first aspect described above is implemented.

[0018] The embodiment of the present application provides a video processing method and apparatus, device and storage medium, which obtains original video data and stores the original video data according to a first storage path; based on the received video browsing instruction and / or real-time hardware parameters, performs a first preset processing on the original video data to obtain first processed video data; stores the first processed video data according to a second storage path, and replaces the memory mapping relationship corresponding to the first storage path with the memory mapping relationship corresponding to the second storage path, so as to play the video based on the first processed video data. It can be seen that in the present application, the obtained original video data can be stored first, and then the stored original video data can be post-processed according to the instruction for browsing the video and / or the real-time hardware situation, wherein the original video data and the processed video data are stored independently according to different storage paths, and the original video data is replaced with the processed video data through the memory mapping relationship to complete the video playback. In other words, the present application can solve the problem of resource conflict between processing and storage by peak-shifting scheduling of computing power and reconstruction of storage architecture, thereby ensuring the image quality while taking into account the stability and endurance of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A schematic diagram of the video processing method implementation process proposed in the embodiment of the present application;

[0020] Figure 2 A schematic diagram of the video processing method implementation process proposed in the embodiment of the present application;

[0021] Figure 3 A schematic diagram of the video processing method implementation process proposed in the embodiment of the present application;

[0022] Figure 4A schematic diagram of the video processing method implementation process proposed in the embodiment of the present application;

[0023] Figure 5 A schematic diagram of the application of the video processing method proposed in an embodiment of the present application;

[0024] Figure 6 A schematic diagram of the application of the video processing method proposed in an embodiment of the present application;

[0025] Figure 7 A schematic diagram of the application of the video processing method proposed in an embodiment of the present application;

[0026] Figure 8A A schematic diagram of a video processing method used in related technologies;

[0027] Figure 8B A schematic diagram of a video processing method used in related technologies;

[0028] Figure 9A A schematic diagram of a video processing method used in related technologies;

[0029] Figure 9B A schematic diagram of a video processing method used in related technologies;

[0030] Figure 10A A schematic diagram of a video processing method used in related technologies;

[0031] Figure 10B A schematic diagram of a video processing method used in related technologies;

[0032] Figure 11 A schematic diagram of the structure of the video processing device proposed in an embodiment of the present application;

[0033] Figure 12 This is a schematic diagram of the structure of the electronic device proposed in the embodiment of the present application. DETAILED DESCRIPTION

[0034] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. It should be understood that the specific embodiments described herein are only used to explain the different applications and are not intended to limit the application. It should also be noted that for ease of description, the drawings only show the parts that differ from the related applications.

[0035] With the widespread use of mobile devices for video recording and processing, users' requirements for video quality, smoothness, and device performance are constantly increasing. Since video processing involves large amounts of data reading and writing and real-time computing, it places high demands on the terminal's processor computing power, storage speed, and power consumption control.

[0036] Current video processing solutions typically use a unified path to store raw video data and perform real-time processing to reduce system complexity. Specifically, upon receiving a video browsing instruction, the video processing device pre-processes the raw video data and overwrites the original data to enable an updated display. However, when processing high-resolution or high-frame-rate video, such solutions are prone to increased latency and excessive heat generation due to limited hardware resources.

[0037] Related technical solutions fail to effectively separate the storage paths of original data and processed data during the processing process, resulting in resource conflicts between processing and storage, making it difficult to balance system stability and battery life while ensuring image quality.

[0038] In order to solve the above problems, the embodiments of the present application provide a video processing method and apparatus, device and storage medium, which obtains original video data and stores the original video data according to a first storage path; based on the received video browsing instruction and / or real-time hardware parameters, performs a first preset processing on the original video data to obtain first processed video data; stores the first processed video data according to a second storage path, and replaces the memory mapping relationship corresponding to the first storage path with the memory mapping relationship corresponding to the second storage path, so as to play the video based on the first processed video data. It can be seen that in the present application, the obtained original video data can be stored first, and then the stored original video data can be post-processed according to the instruction for browsing the video and / or the real-time hardware situation, wherein the original video data and the processed video data are stored independently according to different storage paths, and the original video data is replaced with the processed video data through the memory mapping relationship to complete the video playback. In other words, the present application can solve the problem of resource conflict between processing and storage by peak-shifting scheduling of computing power and reconstruction of storage architecture, thereby ensuring the image quality while taking into account the stability and endurance of the system.

[0039] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application.

[0040] An embodiment of the present application provides a video processing method, which can be applied to a video processing device or electronic device, and can also be applied to any terminal including a video processing device or electronic device.

[0041] It can be understood that the video processing method proposed in the embodiment of the present application may include a video processing solution with an asynchronous processing architecture (video algorithm staggered post-processing) to solve the "three dilemmas" of image quality, smoothness, and heat generation in video recording.

[0042] Below, the video processing method proposed in the embodiment of the present application is exemplarily described by taking a video processing device as an example.

[0043] Furthermore, in the embodiments of the present application, Figure 1 This is a schematic diagram of the video processing method implementation process proposed in the embodiment of the present application, as shown in FIG. Figure 1 As shown, the video processing method may include the following steps:

[0044] Step 101: Acquire original video data and store the original video data according to a first storage path.

[0045] In an embodiment of the present application, the video processing device may first obtain original video data, and then may store the original video data according to a first storage path.

[0046] In some embodiments, the video processing device may be configured with a shooting module, and the video processing device may capture video image frames, ie, record the video, through the configured shooting module, thereby obtaining original video data.

[0047] For example, in some embodiments, the raw video data may include initial video data that has not been processed by any algorithm during the video recording process, wherein the raw video data retains the maximum dynamic range and detail information when the video was captured.

[0048] For example, in some embodiments, the original video data is usually stored in a RAW format, and the original video data can provide high-quality input materials for subsequent post-processing.

[0049] In some embodiments, the first storage path may be used to determine a first storage location for storing original video data, and the first storage path may be used to store original video data directly written during a video recording process.

[0050] For example, in some embodiments, based on the first storage path, the video processing device may store the acquired raw video data in a corresponding storage location, for example, in Universal Flash Storage 4.0 (UFS 4.0).

[0051] That is to say, in an embodiment of the present application, after obtaining the original video data, the video processing device can first store the original video data according to the first storage path, instead of directly processing the original video data, that is, delaying the video processing operation from the video recording stage for a certain period of time, thereby effectively alleviating the dependence of real-time processing on hardware computing power.

[0052] For example, in some embodiments, when recording 4K@60fps (resolution@frame rate), the original video data is written to the UFS 4.0 storage medium in RAW format, ensuring that the information of each frame is fully preserved. This design can avoid problems such as frame rate drops or screen tearing caused by insufficient hardware computing power during real-time processing.

[0053] For example, in some embodiments, the raw video data stored in the first storage path is typically located in a specific directory in the system file system, such as " / videos / raw / ", and indexed by file name or metadata. This approach allows for rapid access and recall of the raw video data after recording, providing a foundation for subsequent peak-shifting processing.

[0054] In the embodiments of the present application, Figure 2 This is a schematic diagram of the video processing method implementation process proposed in the embodiment of the present application, as shown in FIG. Figure 2 As shown, the video processing method may include the following steps:

[0055] Step 104: Obtain a preview frame corresponding to the original video data.

[0056] In an embodiment of the present application, the video processing device may further obtain a preview frame corresponding to the original video data, wherein the preview frame may be collected simultaneously with the original video data.

[0057] For example, in some embodiments, the preview frame corresponds to the original video data, and the preview frame and the original video data may be acquired simultaneously for the same shooting scene or shooting object.

[0058] For example, in some embodiments, the preview frame may be one or more image frames in the original video data; or, the preview frame may be one or more image frames different from the original video data, which is not specifically limited in this application.

[0059] Step 105: In response to the received real-time browsing instruction, play the video based on the preview frame.

[0060] In an embodiment of the present application, after obtaining the preview frame corresponding to the original video data, the video can be played based on the preview frame in response to the received real-time browsing instruction.

[0061] In an embodiment of the present application, the real-time browsing instruction may be a browsing instruction received during the process of acquiring the original video data and the corresponding preview frame, or may be a real-time browsing instruction received before completing the processing of the original video data. This application does not make any specific limitations.

[0062] For example, in some embodiments, the video processing device may receive real-time browsing instructions through physical buttons and / or touch operations and / or voice instructions during video recording.

[0063] In some embodiments, the video processing device may respond to the received real-time browsing instruction by playing the preview frame.

[0064] That is to say, in an embodiment of the present application, for real-time browsing instructions received during the recording process, or for real-time browsing instructions received before the processing of the original video data is completed, the video processing device can respond through the preview frame corresponding to the original video data to complete the video playback.

[0065] Step 102: Based on the received video browsing instruction and / or real-time hardware parameters, perform a first preset processing on the original video data to obtain first processed video data.

[0066] In an embodiment of the present application, after obtaining the original video data and storing the original video data according to the first storage path, the video processing device can further perform a first preset processing on the original video data based on the received video browsing instructions and / or real-time hardware parameters to obtain first processed video data.

[0067] In some embodiments, after the acquired original video data is stored in a corresponding storage location, if a video browsing instruction is received, the original video data may be further subjected to a first preset processing to obtain corresponding first processed video data.

[0068] For example, in some embodiments, when a request is made to view video content, the video processing device may immediately trigger a high-quality processing flow for the original video data, ensuring that the user can obtain clearer video content without having to wait for all processing to be completed.

[0069] In some embodiments, before storing the acquired original video data in a corresponding storage location, it is possible to first determine whether the hardware conditions for performing the first preset processing are met based on real-time hardware parameters. If so, the original video data can be further subjected to the first preset processing to obtain the corresponding first processed video data.

[0070] For example, in some embodiments, by setting a reasonable hardware condition threshold, the video processing device can start high-quality video processing when the device is in a good operating state, thereby improving video quality without interfering with normal use.

[0071] In some embodiments, after the acquired original video data is stored in the corresponding storage location, if a video browsing instruction is received, it is possible to first determine whether the hardware conditions for performing the first preset processing are met based on the real-time hardware parameters. If so, the original video data can be further subjected to the first preset processing to obtain the corresponding first processed video data.

[0072] For example, in some embodiments, when a request is made to view video content, the video processing device chooses to start high-quality video processing when the device is in a good operating state through a set hardware condition threshold, thereby improving video quality without interfering with normal use.

[0073] In an embodiment of the present application, the first preset processing may include a series of non-real-time processing operations performed on the original video data.

[0074] In an embodiment of the present application, the first time parameter corresponding to the first preset processing is greater than the frame rate parameter of the original video data. The first preset processing can be understood as the processing of the full video algorithm.

[0075] That is to say, in the embodiment of the present application, the processing time corresponding to the first preset processing is greater than the frame rate used when recording the original video data.

[0076] Exemplarily, in some embodiments, if the frame rate parameter corresponding to the original video data is 30 fps, the completion time (first time parameter) corresponding to the first preset processing is 50 ms, which is greater than the frame rate parameter corresponding to the original video data.

[0077] It can be understood that in the embodiments of the present application, the first preset processing that takes a long time to process can be considered unsuitable to be completed in real time during recording, but in order to improve the video quality, it can be chosen to execute the first preset processing after completing the recording of the video.

[0078] Of course, there may be no limitation on the magnitude relationship between the first time parameter corresponding to the first preset processing and the frame rate parameter of the original video data.

[0079] In some embodiments, the first preset processing may include at least one or more of the following: anti-shake; beautification; blur; Dolby Vision; HDR; AI night scene; special effects; textures; virtual images; video watermarking and other processing.

[0080] That is, in some embodiments, the first preset processing can be used to perform non-real-time processing operations on the original video data, including but not limited to anti-shake, beautification, blurring, HDR enhancement, AI night scene, Omoji, special effect maps, etc.

[0081] It can be seen that in the embodiments of the present application, by supporting the superposition of multiple high-quality video processing algorithms, the video processing device can provide ultimate video quality when equipment conditions permit, thereby meeting the user's demand for high-quality video creation.

[0082] In an embodiment of the present application, when the original video data is subjected to a first preset processing based on the received video browsing instruction and / or real-time hardware parameters to obtain the first processed video data, the original video data can be subjected to a first preset processing to obtain the first processed video data when the video browsing instruction is received.

[0083] In an embodiment of the present application, the video processing device may also obtain real-time hardware parameters.

[0084] For example, in some embodiments, real-time hardware parameters refer to hardware indicators that are continuously collected by the video processing device and reflect the current operating status of the device (video processing device) during video recording or playback.

[0085] For example, in some embodiments, real-time hardware parameters may be used to evaluate whether a device (video processing apparatus) has sufficient resources to perform a video processing task (first preset processing).

[0086] In some embodiments, the real-time hardware parameters may include at least one or more of the following: utilization parameters; temperature parameters; power parameters; storage parameters; computing power parameters, etc.

[0087] That is to say, in the embodiments of the present application, through multi-dimensional monitoring of the current operating status of the device, it is possible to dynamically determine whether there are sufficient resources to perform high-quality video processing, thereby avoiding performance degradation due to hardware overload.

[0088] Exemplarily, in some embodiments, the utilization parameters in the real-time hardware parameters may include but are not limited to CPU utilization, GPU utilization, NPU (neural network processor) utilization, etc.

[0089] For example, in some embodiments, the temperature parameter in the real-time hardware parameter may include the real-time temperature of the device.

[0090] For example, in some embodiments, the power parameter in the real-time hardware parameter may include battery power, such as the remaining power of the battery.

[0091] For example, in some embodiments, the storage parameters in the real-time hardware parameters may include a storage space occupancy rate, or may include a remaining size of the storage space.

[0092] For example, in some embodiments, the computing power parameters in the real-time hardware parameters may include available computing power, occupied computing power, etc.

[0093] For example, in some embodiments, real-time hardware parameters can be obtained in real time by the system monitoring module and used as an important basis for determining whether to start the video processing operation.

[0094] In an embodiment of the present application, when the original video data is subjected to a first preset processing based on the received video browsing instructions and / or real-time hardware parameters to obtain the first processed video data, and when the real-time hardware parameters meet the preset hardware conditions, the original video data is subjected to a first preset processing to obtain the first processed video data.

[0095] In some embodiments, the preset hardware conditions can be used to determine whether the real-time hardware parameters meet the hardware requirements of the first preset processing. The preset hardware conditions may include at least one or more of the following: a utilization parameter less than or equal to a utilization threshold; a temperature parameter less than or equal to a temperature threshold; a power parameter greater than or equal to a power threshold; a storage parameter greater than or equal to a storage threshold; and a computing power parameter greater than or equal to a computing power threshold.

[0096] For example, in some embodiments, the preset hardware conditions refer to a set of hardware resource usage restrictions set during the video processing process to ensure that the processing does not degrade device performance or affect the user experience. These conditions can be thresholds for a single indicator or a combination of multiple indicators.

[0097] That is to say, in an embodiment of the present application, it is possible to first determine whether the real-time hardware parameters meet the preset hardware conditions. If so, subsequent video processing, such as the first preset processing, is allowed to be executed. If not, subsequent video processing is not allowed to be executed.

[0098] For example, in some embodiments, the video processing device only allows the first preset video processing to be performed when the CPU utilization rate is less than 30%, the device temperature is less than 45°C, the battery charge is greater than 50%, the remaining storage space is greater than 64GB, and the computing power meets the requirements of the AI ​​algorithm. The purpose of the preset hardware conditions is to avoid problems such as device lag, heating, or reduced battery life due to excessive hardware load while ensuring video quality.

[0099] That is, in the embodiments of the present application, the video processing device can first obtain the original video data, then store the original video data according to the first storage path, and then delay the video processing task until the device is in an idle state (real-time hardware parameters meet preset hardware conditions). This approach not only fully utilizes the hardware resources of the device, but also effectively avoids video processing failures or performance degradation caused by hardware overload.

[0100] Step 103: Store the first processed video data according to the second storage path, and replace the memory mapping relationship corresponding to the first storage path with the memory mapping relationship corresponding to the second storage path, so as to play the video based on the first processed video data.

[0101] In an embodiment of the present application, after the original video data is subjected to a first preset processing based on the received video browsing instructions and / or real-time hardware parameters to obtain the first processed video data, the first processed video data can be further stored according to two storage paths, and the memory mapping relationship corresponding to the first storage path can be replaced with the memory mapping relationship corresponding to the second storage path. In this way, during the subsequent video playback process, the video can be played based on the first processed video data.

[0102] In some embodiments, the second storage path can be used to determine a second storage location for storing processed video data (first processed video data), and the second storage path can be used to store video data obtained after the video post-processing process is completed.

[0103] For example, in some embodiments, based on the second storage path, the video processing device may store the processed first video data to a corresponding storage location, for example, to a hard disk.

[0104] That is, in the embodiment of the present application, compared with the first storage path, the second storage path is used to store the post-processed video data. The first storage path and the second storage path can be associated through a memory mapping mechanism to support dynamic replacement of data.

[0105] Exemplarily, in some embodiments, based on the first storage path and the second storage path, the original video data and the first processed data are respectively stored in two different files in the hard disk, wherein the pointer positions indicated by the first storage path and the second storage path are different.

[0106] In an embodiment of the present application, the memory mapping relationship corresponding to the first storage path can be replaced by the memory mapping relationship corresponding to the second storage path, so that in the subsequent video playback process, video playback can be directly performed based on the first processed video data.

[0107] For example, in some embodiments, a symbolic link dynamic switching strategy can be used to implement the replacement of memory mapping relationships. In particular, during the replacement process of the memory mapping relationship, the symbolic link can be updated through atomic operations to avoid file lock conflicts and simultaneous reading and writing of files in the same directory.

[0108] For example, in some embodiments, the original video data is stored in " / videos / raw / 20250504_001.mp4", while the processed video data (first processed data) is stored in " / videos / processed / 20250504_001.mp4". After processing is completed, the video processing device can use a symbolic link to point " / videos / raw / 20250504_001.mp4" to " / videos / processed / 20250504_001.mp4", thereby seamlessly replacing the original data. This mechanism can effectively avoid read and write conflicts, improving system stability and processing efficiency.

[0109] That is to say, in the embodiment of the present application, seamless switching of different versions of video data is achieved through the symbolic link mechanism, avoiding the data loss or loading failure caused by file read and write conflicts in the traditional way.

[0110] In the embodiments of the present application, Figure 3 This is a schematic diagram of the video processing method implementation process proposed in the embodiment of the present application, as shown in FIG. Figure 3 As shown, the video processing method may include the following steps:

[0111] Step 106: Acquire original video data, and perform a second preset process on the original video data to obtain second processed video data.

[0112] In an embodiment of the present application, while acquiring the original video data, the video processing device may further perform a second preset processing on the original video data to obtain second processed video data.

[0113] In an embodiment of the present application, the second preset processing may include a series of real-time processing operations performed on the original video data.

[0114] That is to say, in the embodiment of the present application, the original video data can be lightweight processed and saved during the recording process for the user to preview instantly, thereby taking into account both real-time performance and image quality improvement.

[0115] In an embodiment of the present application, the second time parameter corresponding to the second preset processing is less than or equal to the frame rate parameter of the original video data. The second preset processing can be understood as a lightweight video algorithm processing.

[0116] That is to say, in the embodiment of the present application, the processing duration corresponding to the second preset processing is less than or equal to the frame rate used when recording the original video data.

[0117] For example, in some embodiments, if the frame rate parameter corresponding to the original video data is 30 fps, the completion time (second time parameter) corresponding to the second preset processing is 20 ms, which is less than the frame rate parameter corresponding to the original video data.

[0118] It can be understood that in the embodiment of the present application, the second preset processing with a shorter processing time can be considered to be able to be completed in real time during recording, so the second preset processing can be selected to be executed synchronously during the video recording process.

[0119] That is to say, in the embodiments of the present application, by reasonably arranging the time parameters of different processing stages, the video processing device can complete high-quality processing tasks without affecting the smoothness of video playback, thereby improving the overall user experience.

[0120] Of course, there may be no limitation on the magnitude relationship between the second time parameter corresponding to the second preset processing and the frame rate parameter of the original video data.

[0121] In some embodiments, the second preset processing may include at least one or more of the following: filter; brightness adjustment and other processing.

[0122] Step 107: Store the second processed video data according to the first storage path.

[0123] In an embodiment of the present application, after acquiring original video data and performing a second preset processing on the original video data to obtain second processed video data, the video processing device may further store the second processed video data according to the first storage path.

[0124] That is to say, in an embodiment of the present application, after obtaining the original video data and performing the second preset processing on the original video data, the video processing device can store the second processed video data according to the first storage path instead of directly processing the second processed video data, that is, delaying the video processing operation from the video recording stage for a certain period of time, thereby effectively alleviating the dependence of real-time processing on hardware computing power.

[0125] For example, in some embodiments, the second processed video data stored in the first storage path is typically located in a specific directory of the system file system, such as " / videos / raw / ", and indexed by file name or metadata. This approach allows the second processed video data to be quickly accessed and called after recording is complete, providing a foundation for subsequent off-peak processing.

[0126] Step 108: Based on the received video browsing instruction and / or real-time hardware parameters, perform a first preset processing on the second processed video data to obtain first processed video data.

[0127] In an embodiment of the present application, after storing the second processed video data according to the first storage path, the video processing device can further perform a first preset processing on the second processed video data based on the received video browsing instructions and / or real-time hardware parameters to obtain the first processed video data.

[0128] In some embodiments, after the acquired second processed video data is stored in a corresponding storage location, if a video browsing instruction is received, the second processed video data may be further subjected to a first preset processing to obtain corresponding first processed video data.

[0129] In some embodiments, before storing the acquired second processed video data in a corresponding storage location, it is possible to first determine whether the hardware conditions for performing the first preset processing are met based on real-time hardware parameters. If so, the second processed video data can be further subjected to the first preset processing to obtain the corresponding first processed video data.

[0130] In some embodiments, after the acquired second processed video data is stored in the corresponding storage location, if a video browsing instruction is received, it is possible to first determine whether the hardware conditions for executing the first preset processing are met based on the real-time hardware parameters. If so, the second processed video data can be further subjected to the first preset processing to obtain the corresponding first processed video data.

[0131] In an embodiment of the present application, the first preset processing may include a series of non-real-time processing operations performed on the second processed video data.

[0132] That is, in some embodiments, the first preset processing can be used to perform non-real-time processing operations on the second processed video data, including but not limited to anti-shake, beautification, blurring, HDR enhancement, AI night scene, Omoji, special effect maps, etc.

[0133] In an embodiment of the present application, when the first processed video data is obtained by performing the first preset processing on the second processed video data based on the received video browsing instruction and / or real-time hardware parameters, the first processed video data can be subjected to the first preset processing to obtain the first processed video data when the video browsing instruction is received.

[0134] In an embodiment of the present application, when the second processed video data is subjected to the first preset processing based on the received video browsing instruction and / or real-time hardware parameters to obtain the first processed video data, and when the real-time hardware parameters meet the preset hardware conditions, the second processed video data is subjected to the first preset processing to obtain the first processed video data.

[0135] In some embodiments, the preset hardware conditions can be used to determine whether the real-time hardware parameters meet the hardware requirements of the first preset processing. The preset hardware conditions may include at least one or more of the following: a utilization parameter less than or equal to a utilization threshold; a temperature parameter less than or equal to a temperature threshold; a power parameter greater than or equal to a power threshold; a storage parameter greater than or equal to a storage threshold; and a computing power parameter greater than or equal to a computing power threshold.

[0136] For example, in some embodiments, the preset hardware conditions refer to a set of hardware resource usage restrictions set during the video processing process to ensure that the processing does not degrade device performance or affect the user experience. These conditions can be thresholds for a single indicator or a combination of multiple indicators.

[0137] That is to say, in an embodiment of the present application, it is possible to first determine whether the real-time hardware parameters meet the preset hardware conditions. If so, subsequent video processing, such as the first preset processing, is allowed to be executed. If not, subsequent video processing is not allowed to be executed.

[0138] For example, in some embodiments, the video processing device only allows the first preset video processing to be performed when the CPU utilization rate is less than 30%, the device temperature is less than 45°C, the battery charge is greater than 50%, the remaining storage space is greater than 64GB, and the computing power meets the requirements of the AI ​​algorithm. The purpose of the preset hardware conditions is to avoid problems such as device lag, heating, or reduced battery life due to excessive hardware load while ensuring video quality.

[0139] That is, in an embodiment of the present application, the video processing device can first obtain the original video data, then perform the second preset processing on the original video data, and store the second processed video data according to the first storage path, and then delay the video processing task until the device is in an idle state (real-time hardware parameters meet the preset hardware conditions). This approach not only fully utilizes the hardware resources of the device, but also effectively avoids video processing failures or performance degradation caused by hardware overload.

[0140] In the embodiments of the present application, Figure 4 This is a schematic diagram of the video processing method implementation process proposed in the embodiment of the present application, as shown in FIG. Figure 4 As shown, the video processing method may include the following steps:

[0141] Step 109 : In response to the received video browsing instruction, obtain the first processed video data based on the memory mapping relationship corresponding to the second storage path.

[0142] Step 110: Play the video based on the first processed video data.

[0143] In an embodiment of the present application, after completing the post-processing process of the video, obtaining the corresponding first processed video data, and storing the first processed video data according to the second storage path, the first processed video data can be obtained based on the memory mapping relationship corresponding to the second storage path in response to the received video browsing instruction, and then the video can be further played based on the first processed video data.

[0144] In summary, the video processing method proposed in the embodiments of this application is a processing strategy that postpones video processing operations from the video recording stage to the device's idle period or when the user is viewing the video. Based on the dual-channel data management of original video data and processed video data, it dynamically judges the device's hardware status and user behavior to determine when to start the video post-processing process, thereby effectively alleviating the dependence of real-time processing on hardware computing power, improving video quality and smoothness, and reducing device heat and power consumption.

[0145] The video processing method proposed in the embodiments of this application simultaneously applies multiple image processing algorithms (such as anti-shake, beautification, HDR, AI night scene, etc.) in the video post-processing stage to achieve the best video enhancement effect. Because these algorithms are generally computationally complex and difficult to run in real time during recording, they need to be executed in the off-peak post-processing stage.

[0146] The video processing method proposed in the embodiment of the present application is that the video processing device dynamically loads video content of different quality versions according to the processing status of the current video (such as unprocessed, processing, processed), thereby achieving a smooth transition from low-quality preview to high-quality final output, that is, achieving progressive image quality enhancement and improving user experience.

[0147] The video processing method proposed in this application embodiment uses dynamic trigger conditions set based on the device's hardware status (such as CPU utilization, temperature, and battery level) and user behavior (such as video playback requests). When these conditions are met, the video processing device automatically initiates the video post-processing process. The dynamic trigger conditions are designed to maximize the use of idle device resources and achieve efficient video processing.

[0148] The video processing method proposed in the embodiment of the present application can also display the current status and progress of video processing in the user interface through corner marks, progress bars, etc., that is, realize the visualization of progressive processing progress, so that users can intuitively understand the progress of video processing and choose whether to wait for the processing to be completed or continue to use other functions as needed.

[0149] The video processing method proposed in this application embodiment stores original video data and processed video data in two different directories in the file system through symbolic links or other means, and achieves seamless switching between the two through a dynamic indexing mechanism. This dual-directory dynamic indexing management mechanism can effectively avoid read and write conflicts, improving system stability and processing efficiency.

[0150] It can be seen that the video processing method proposed in the embodiment of the present application solves the three dilemmas of image quality, smoothness and battery life in video processing technology, achieves the compatibility of high-specification video recording and multi-algorithm superposition processing, and significantly improves the user experience of video recording and processing.

[0151] For example, in some embodiments, Figure 5 As shown, the camera application layer APP can send preview and recording requests to the camera hardware layer; the camera hardware layer can obtain the preview frame and the corresponding video frame (original video data), and then return the preview frame and the video frame to the camera application layer APP; on the one hand, the video frame can be first subjected to lightweight algorithm processing (such as the second preset processing), and then the processed video data can be stored in the storage medium, for example, the lightweight processed video data can be stored according to the first storage path; on the other hand, the preview frame stored in the album database can respond to the received real-time browsing instruction for the user to view immediately after shooting; After receiving the browsing instruction viewed by the user, and / or when the mobile phone triggers the video algorithm post-processing when idle (that is, the real-time hardware parameters of the mobile phone meet the conditions of the first preset processing), the pre-stored lightweight processed video data can be further processed with one or more of the following: anti-shake, beauty, blur, HDR enhancement, AI night scene, Omoji, special effect maps, etc.; for the processed video data, it can be stored according to the second storage path, that is, the lightweight processed video data and the full-scale processed video data are physically isolated and stored, and hot switching is achieved through the file system symbolic link to avoid read-write conflicts. The video can be played later through the album database, wherein the video access mapping is used during playback to replace the lightweight processed video data with the full-scale processed video data.

[0152] For example, in some embodiments, Figure 6As shown, the camera application layer APP can send preview and recording requests to the camera hardware layer; the camera hardware layer can obtain the preview frame and the corresponding video frame (raw video data), and then return the preview frame and the video frame to the camera application layer APP; on the one hand, the video frame can be stored in a storage medium, for example, according to the first storage path to store the video frame, on the other hand, the preview frame stored in the album database can respond to the received real-time browsing instruction for the user to view immediately after shooting; after receiving the browsing instruction for user viewing, and / or, the mobile phone triggers the video algorithm post-processing when idle (that is, the real-time hardware parameters of the mobile phone meet the conditions of the first preset processing), then the pre-stored raw video data can be further processed by one or more of the following: anti-shake, beauty, blur, HDR enhancement, AI night scene, Omoji, special effect map, etc.; for the processed video data, it can be stored according to the second storage path, that is, the raw video data and the processed video data are physically isolated and stored, and hot switching is achieved through the file system symbolic link to avoid read and write conflicts. The video can be played later through the album database, wherein the processed video data replaces the original video data through the video access mapping during playback.

[0153] For example, in some embodiments, Figure 7 As shown, this application can trigger dynamic classification of conditions: Emergency processing level: When the user actively plays the video, the saved preview video is played immediately. Lightweight real-time level: Lightweight algorithms that can be completed within the video frame interval without causing frame loss and freezes can be processed in real time without writing to the disk to cause additional resource overhead (for example, the user 4k@30fps records the superimposed filter algorithm, and the filter algorithm can be processed within 1 / 30=33.3ms, then the filter algorithm can be processed in real time without going through the off-peak post-processing process). Idle time optimization level: When the user specifically views the current video or meets the CPU utilization ≤30% &&NPU temperature ≤45℃ &&battery ≥50% &&storage remaining space ≥64GB, the video algorithm is started for off-peak full post-processing.

[0154] The embodiment of the present application proposes a video processing method, which obtains original video data and stores the original video data according to a first storage path; based on the received video browsing instruction and / or real-time hardware parameters, performs a first preset processing on the original video data to obtain first processed video data; stores the first processed video data according to a second storage path, and replaces the memory mapping relationship corresponding to the first storage path with the memory mapping relationship corresponding to the second storage path, so as to play the video based on the first processed video data. It can be seen that in the present application, the obtained original video data can be stored first, and then the stored original video data can be post-processed according to the instruction for browsing the video and / or the real-time hardware situation, wherein the original video data and the processed video data are stored independently according to different storage paths, and the original video data is replaced with the processed video data through the memory mapping relationship to complete the video playback. In other words, the present application can solve the problem of resource conflict between processing and storage by peak-shifting scheduling of computing power and reconstruction of storage architecture, thereby taking into account the stability and endurance of the system while ensuring image quality.

[0155] Based on the above embodiments, another embodiment of the present application proposes a video processing method, which can solve the three dilemmas of image quality, fluency and battery life in video processing technology, achieve the compatibility of high-specification video recording and multi-algorithm superposition processing, and significantly improve the user experience of video recording and processing.

[0156] With the popularity of mobile phone imaging, more and more users choose to use their mobile phones to shoot videos for recording. Currently, there are some bottlenecks in mobile phone video recording processing and some poor user experience points that need to be optimized. The main issues are as follows:

[0157] 1. Hardware Performance Bottleneck

[0158] 1. Insufficient processor and computing power

[0159] As video specifications increase to 4K / 8K, 120fps, and above, coupled with algorithms like beauty enhancement, HDR, and AI ultra-clear video, mobile phone processors (CPU / GPU / NPU) face immense pressure. For example, real-time processing of 4K@120fps beauty enhancement videos can exceed the computing power limits of mid-range and low-end mobile phone processors, resulting in frame rate drops, lags, and even recording interruptions.

[0160] Impact: Users frequently experience frame drops and screen tearing when shooting high-definition videos, and severe loss of details in dynamic scenes (such as sports and dancing).

[0161] 2. Storage speed limit

[0162] The amount of data generated per second by high-frame-rate videos increases dramatically (for example, 4K@120fps videos require processing approximately 1.2GB of RAW data per second). However, the upper limit of the write speed of mobile phone storage media (such as UFS 4.0) is approximately 4GB / s. This can handle raw data, but it is difficult to cope with the real-time processing requirements of multiple algorithms.

[0163] Impact: Storage delays during recording result in frame drops, discontinuous video clips, and loss of material integrity during post-editing.

[0164] 3. Temperature control and power consumption limit

[0165] When processing high-specification videos in real time, the CPU / NPU continues to run at high load, causing the phone temperature to rise rapidly (the measured peak can reach over 48°C), triggering system frequency reduction protection.

[0166] Impact: When users shoot for a long time, their phones become hot and they are forced to interrupt the recording. In high temperature environments (such as outdoors), the performance of the device further degrades, causing video freezes and frame drops.

[0167] 2. Algorithm Processing Bottlenecks

[0168] 1. Conflict between real-time processing and frame interval

[0169] Traditional real-time processing requires algorithms to complete within each frame interval (e.g., 4K@120fps requires a frame processing time of ≤8.3ms), which limits algorithm complexity. For example, an HDR algorithm that synthesizes multiple frames may take 20ms per frame, failing to meet real-time requirements.

[0170] Impact: Users are forced to choose between "smoothness" and "image quality" and cannot enjoy high frame rate and high dynamic range at the same time.

[0171] 2. Multi-algorithm resource preemption

[0172] When superimposing algorithms such as HDR, AI noise reduction, and filters, memory bandwidth and NPU computing power are preempted by multiple tasks, resulting in reduced algorithm execution efficiency.

[0173] Impact: The image quality is not significantly improved after algorithm superposition, and may even produce noise or color distortion due to insufficient resources.

[0174] 3. User Experience Pain Points

[0175] 1. Conflict between performance and image quality

[0176] Even when users shoot high-quality videos, algorithmic processing can cause recording stuttering, while raw preview quality (such as un-noised night scenes) is rough, forcing users to choose between clarity, frame rate, and image quality. For example, when shooting a dance video, real-time filters can cause stuttering, forcing users to reduce the resolution to 1080p.

[0177] 2. Battery life anxiety

[0178] Power consumption increases dramatically when continuously recording high-specification videos (the measured battery life is shortened by more than 40%), and users need to carry a charging device at all times.

[0179] Data: User surveys show that 72% of short video creators need to carry large-capacity power banks and fans at all times to alleviate power consumption and temperature rise issues caused by video recording.

[0180] 4. Conflict between Technology Trends and User Demands

[0181] 1. The contradiction between specification upgrade and hardware lag

[0182] 5G is driving the popularity of 8K and 360fps video, but the long iteration cycle for mobile phone hardware (approximately 1-2 years) makes it difficult for user devices to keep up with technological developments. Furthermore, devices with better processors are more expensive. Even high-end phones cannot fully meet users' expectations for high-definition video capture, and the problem is even more severe and the experience is even worse on sub-flagship and mid-range models. For example, in 2025, mainstream mobile phones will still be promoting 4K 60fps, while user demand for 8K and HDR Dolby Vision high-definition, high-dynamic range content will increase by 35%. The video quality currently rendered by mobile phones is still significantly different from what the human eye sees, leaving significant room for improvement. How to maximize computing power within limited hardware resources to break through bottlenecks is a key consideration.

[0183] 2. The balance between algorithm complexity and energy efficiency

[0184] Users expect "cinema-level picture quality", but complex algorithms (such as neural network super-resolution) have low energy efficiency (1W power consumption / frame), which does not match the heat dissipation design of mobile phones.

[0185] Data: AI ultra-clear algorithms reduce mobile phone battery life by 28%, and shorten users' average single video creation time to 15 minutes.

[0186] In summary, the core bottleneck of current mobile phone video recording lies in the imbalance between hardware computing power, storage speed, temperature control design and the requirements of high-specification video processing, resulting in a "trilemma" in user experience:

[0187] Image quality is difficult to improve: the algorithm is limited by real-time requirements;

[0188] Smoothness is difficult to ensure: high frame rate and multiple algorithms conflict;

[0189] It is difficult to sustain creation: storage, battery life, and heat dissipation issues are intertwined.

[0190] For example, Figure 8AAs shown in the figure, when the algorithm is not superimposed, the platform's peak capacity is 4K@60fps. Once the algorithm optimization processing is turned on (for example, the super anti-shake algorithm is turned on), the frame interval cannot meet the real-time processing requirements of the algorithm, forcing the user to reduce the frame rate or resolution, as shown in the figure. Figure 8B As shown, for example, the current traditional solution is that super anti-shake video recording forces users to reduce it to 1080p@60fps.

[0191] For example, Figure 9A As shown in the figure, for example, special effect algorithms such as video beautification and video blur commonly used by users: Even if the user selects 4K@60fps for video blur recording, once the video blur is turned on, the video specification will be forced to be reduced to 1080p@30fps due to the limitation of real-time algorithm processing power. Figure 9B shown.

[0192] For example, Figure 10A As shown in the figure, even if the user selects 4K@60fps, once the beauty function is turned on, the video specification will be forced to be reduced to 1080p@30fps due to the limitation of real-time algorithm processing power. Figure 10B shown.

[0193] In scenarios where algorithms are overlaid in video mode, it is almost impossible to achieve the user's original settings and expected image quality. However, high-specification, clear video recording with superimposed special effects such as beauty has become a demand of more and more users. The current solution cannot meet this demand and can only forcibly reduce the video quality obtained by users based on the platform's computing power, resulting in a poor user experience.

[0194] Therefore, users strongly demand the ability to shoot videos with high image quality, high smoothness, and controllable heat.

[0195] This patent provides an asynchronous processing architecture (video algorithm staggered post-processing) to solve the "three dilemmas" of image quality, smoothness, and heat generation in such video recording.

[0196] In related technologies, there is a strong dependence on real-time processing, limitations in single algorithm scenarios, fragmented user experience, and single triggering conditions.

[0197] In contrast, the video processing method proposed in the embodiment of the present application has multi-algorithm staggered superposition processing and user experience closed loop; dynamic index management of dual directories of original data and processed data; multi-dimensional condition combination; support for preview of unprocessed version and seamless replacement of processed version.

[0198] The video processing method proposed in the embodiment of the present application mainly includes the following parts:

[0199] 1. Time-sharing storage architecture design

[0200] Dual-channel data management:

[0201] Raw data channel: uses RAW deep format storage (preserving dynamic range), written to storage media such as UFS 4.0, independent of the algorithm processing module.

[0202] Lightweight preview channel: Synchronously retains the H.264 low-bitrate preview stream (1080P@30fps, bitrate ≤8Mbps) and uses memory mapping technology to achieve zero-latency preview.

[0203] Dynamic grading of trigger conditions:

[0204] Emergency processing level: When the user actively plays the video, the preview video is played and saved immediately.

[0205] Lightweight real-time level: Lightweight algorithms that can be completed within the video frame interval without causing frame drops or freezes can be processed in real time without writing to disk and incurring additional resource overhead (for example, if a user records a 4k@30fps superimposed filter algorithm, the filter algorithm can be processed within 1 / 30 = 33.3ms, so the filter algorithm can be processed in real time without the need for off-peak post-processing).

[0206] Idle-time optimization: The video algorithm initiates off-peak full post-processing when the user is specifically viewing the current video or when the CPU utilization is ≤ 30%, the NPU temperature is ≤ 45°C, the battery level is ≥ 50%, and the remaining storage space is ≥ 64 GB.

[0207] 2. Key processing flow

[0208] Asynchronous algorithm superposition:

[0209] Post-processing can superimpose multiple algorithms based on the current mode, including but not limited to: super anti-shake, beauty, blur, Dolby Vision, AI HDR, AI night scene, special effect maps, Omoji, and video watermark (the processing time of a single frame is allowed to exceed the original frame interval of the video, and theoretically, it can be superimposed infinitely, breaking the image quality limit).

[0210] Develop data sharing interfaces between algorithms: For example, the intermediate results of the previous algorithm calculation can be passed to subsequent modules, such as face information, segmentation results, and local HDR brightening mask, reducing repeated calculations by 30%.

[0211] Index replacement mechanism:

[0212] Use symbolic link dynamic switching strategy:

[0213] / videos / raw / 20250504_001.mp4 → Raw data

[0214] / videos / processed / 20250504_001.mp4 → processed data

[0215] When replacing, symbolic links are updated through atomic operations to avoid file lock conflicts and simultaneous reading and writing of files in the same directory.

[0216] 3. Resource scheduling optimization

[0217] Dynamic balancing of hardware usage:

[0218] Monitor CPU, GPU, NPU, power, memory, and hard disk capacity data, adopt multi-computing power heterogeneous idle time scheduling strategy, and give full play to the advantages of each computing power for idle time processing.

[0219] Interrupt recovery mechanism:

[0220] Generate CRC32 checksum after processing every 5 seconds of video

[0221] After the interruption, the breakpoint is located by binary search method with an error of ≤ 2 frames.

[0222] 4. Enhanced user interaction

[0223] Multi-version management:

[0224] Generate three quality versions:

[0225] Preview version: View immediately after shooting, presenting preview stream data during recording, allowing users to access it without waiting for algorithm processing delays.

[0226] Lightweight algorithm version: The user only checks a small number of algorithms on the front end, which are relatively lightweight (such as filter algorithms). It can support real-time processing and overlay, so there is no need to write to the disk, and the real-time lightweight algorithm processing and presentation are performed.

[0227] Full algorithm version: Full algorithm processing enhanced version with ultimate image quality improvement and algorithm superposition.

[0228] Progress visualization:

[0229] The corner mark of the album thumbnail shows the processing status:

[0230] Unprocessed (only preview stream data is displayed)

[0231] Processing (progress bar percentage)

[0232] Completed (displaying the best quality full algorithm video data)

[0233] Comparative advantages of technical solutions

[0234] Regarding the processing method, this application can be processed based on the load peak, avoiding the limitation of the real-time frame interval on the algorithm processing;

[0235] For storage architecture, this application implements dynamic management of dual directories of raw data and processed data;

[0236] Regarding the triggering conditions, this application uses multi-dimensional state perception (hardware + user behavior) to trigger real-time processing or write to disk for post-peak processing.

[0237] The video processing method proposed in the embodiment of the present application can achieve RAW data compatibility and support direct output of RAW format from mainstream sensors; realize dynamic priority adjustment, and automatically increase the processing priority of the video when it is detected that the user frequently views a certain video; realize energy consumption control, and dynamically adjust the NPU voltage (1.1V-0.8V) during the processing process, reducing power consumption by 18%.

[0238] The video processing method proposed in the embodiments of this application includes the design of a video peak-shifting post-processing framework. This method addresses the "trilemma" of mobile image recording by collaborating three key technological innovations: peak-shifting computing power scheduling, storage architecture reconstruction, and temperature control strategies. This method achieves the following key breakthroughs:

[0239] 1. Breakthrough in image quality improvement: RAW domain asynchronous processing unleashes algorithmic potential

[0240] Dynamic Range Shift: Original RAW data retains a 14-16EV dynamic range, and post-processing uses a non-real-time super-resolution algorithm to reconstruct 24-megapixel-level details, reducing highlight blooming. Example: In backlit scenes, RAW data is synthesized using staggered HDR, improving the dark signal-to-noise ratio by over 3dB (compared to a real-time processing solution) and reducing color transitions by over 50%.

[0241] Multi-algorithm collaborative optimization: Adopting the dual-core architecture concept, only basic lightweight algorithms are run during video recording. Later, off-peak video post-processing can load multiple algorithms such as AI noise reduction, super-resolution, and stylized rendering to achieve a 50% increase in 4K video texture density.

[0242] 2. Fluency Guarantee Innovation: Time-Sharing Resource Isolation Mechanism

[0243] Frame rate-computing power decoupling control:

[0244] Before video beautification, only basic frame rate superposition algorithms could be used for recording (1080P@30fps). This solution supports staggered post-processing and can achieve 4k@60fps superposition algorithm output, avoiding frame jitter caused by real-time multi-algorithm superposition.

[0245] This application restructures the processing pipeline over time, distributing the previously conflicting high computing power requirements to different time periods (recording, standby, and charging), systematically solving the "impossible triangle" of "image quality, smoothness, and battery life." Compared to traditional solutions, this solution achieves a 100% increase in dynamic range and a 58% improvement in energy efficiency under equivalent hardware conditions, providing sustainable, high-quality output capabilities for mobile imaging creation.

[0246] The video processing method proposed in this application addresses the core contradiction in the mobile imaging field, namely the imbalance between high-specification video processing requirements and hardware performance. It proposes a video peak-shifting post-processing system based on spatiotemporal decoupling. Its innovation is reflected in the following five dimensions:

[0247] 1. Dynamic storage architecture

[0248] Asynchronous dual-channel design for video data

[0249] Raw data direct write channel, write directly to disk in RAW format during recording, avoiding frame interval limit issues caused by real-time processing;

[0250] Lightweight preview channel: Memory mapping technology enables zero-latency access, allowing users to instantly view the current content;

[0251] Cross-directory dynamic indexing technology:

[0252] The raw data ( / raw_video) and the post-processed data ( / processed_video) are stored in physical isolation, and hot switching is achieved through file system symbolic links to avoid read and write conflicts.

[0253] 2. Intelligent trigger mechanism

[0254] Multimodal idle time perception model:

[0255] Composite trigger conditions: CPU utilization ≤ 30% & NPU temperature ≤ 45°C & battery ≥ 50% & remaining storage space ≥ 64GB;

[0256] Dynamic priority queue: Combines user behavior to increase the processing priority of the video the user is currently viewing.

[0257] 3. Resource peak-shifting scheduling

[0258] Three-stage processing pipeline: During the recording phase, storage bandwidth is exclusively used (4GB / s), and algorithms such as direct write and basic filters are used. During idle periods and user viewing, the NPU (80%) and CPU (50%) utilize AI super-resolution, Dolby Vision rendering, and multi-algorithm batch processing.

[0259] It can be seen that this application breaks through the single-stage processing limitations of traditional solutions and utilizes the energy efficiency advantages of various resources for dynamic scheduling, which can greatly improve resource utilization and energy efficiency.

[0260] 4. User experience optimization, including but not limited to:

[0261] Progressive image quality enhancement:

[0262] When users view videos, the album automatically loads the best available version (original / processed), and visually displays the processing progress through a corner mark system (unprocessed, processing, completed).

[0263] Hot zone priority processing strategy: When the user views the current video, the video is triggered to be prioritized.

[0264] 5. Energy consumption collaborative control innovation

[0265] Temperature-power consumption joint control:

[0266] Dynamic voltage scaling: When the temperature is ≥45°C, the NPU voltage drops from 1.1V to 0.8V, and post-processing also reduces power consumption.

[0267] Energy efficiency ratio formula verification:

[0268] η = Real-time power consumption processing algorithm complexity × log (memory bandwidth)

[0269] Peak-shifting processing allows the video algorithm to run at the frequency and temperature where the mobile phone hardware has the best energy efficiency, rather than being limited to high-temperature, low-efficiency real-time processing during recording. The energy efficiency ratio can be increased by more than 2 times.

[0270] The video processing method proposed in the embodiment of the present application allows breaking through the processing time limit of a single frame interval, supports dual directory isolation + dynamic indexing, supports instant preview + progressive enhancement, and realizes dynamic regulation of temperature / power adaptation.

[0271] In summary, this application systematically solves the industry problem of "imbalance between high-specification video processing requirements and mobile hardware performance" through three core innovations: time-space decoupling (separation of recording and processing), flexible resource scheduling (computing power mining during idle / charging periods), and lossless transition of user experience.

[0272] The future technical evolution direction of the video peak-shifting post-processing framework proposed in this application can be developed around the construction of a terminal-cloud collaborative system. Based on the current technical complementarity between mobile terminals and the cloud, the following core expansion paths are proposed:

[0273] 1. Cloud-based elastic processing architecture

[0274] Dynamic computing power scheduling mechanism: Migrate heavy-loaded algorithms (such as 8K super-resolution and ray tracing rendering) to the cloud, utilize the elastic resource pool of cloud computing, and batch call GPU / FPGA resources to complete processing during low-peak hours at night or when users are not aware of the period.

[0275] Function encapsulation: Encapsulate algorithms such as HDR synthesis and AI noise reduction into stateless functions, and trigger cloud processing through an event-driven model (for example, automatically calling related services when a user clicks "Export HD Version").

[0276] 2. Edge-end collaborative processing mechanism

[0277] Preprocessing node sinking:

[0278] Lightweight processing modules are deployed on edge devices such as routers and NAS to perform low-latency tasks such as RAW data compression and basic anti-shake, and only sub-streams that require complex calculations are uploaded to the cloud.

[0279] 3. Distributed processing framework

[0280] Task sharding and parallelization: Split long videos into 30-second segments and process them in parallel on multiple nodes in the cloud using the MapReduce architecture, reducing processing time to 1 / 5 of that of real-time solutions.

[0281] Cross-device computing power aggregation:

[0282] Build a P2P computing network (such as idle PCs and smart TVs) and schedule idle devices to participate in post-processing tasks through a distributed computing framework.

[0283] 4. Evolution of intelligent processing

[0284] Dynamic optimization of processing strategies:

[0285] Based on the LSTM model (user behavior prediction), the user viewing probability is predicted, and cloud resources are prioritized for processing videos with high access rates.

[0286] Algorithm parameter adaptation:

[0287] Combined with deep learning optimization strategies, the cloud processing algorithm combination is automatically selected according to the original data characteristics (dynamic range, noise level) (for example, Dolby Vision rendering is prioritized for high-dynamic scenes).

[0288] 5. Multimodal Data Fusion

[0289] Sensor Data Collaboration:

[0290] Meta-information such as gyroscope trajectory and ambient light data is uploaded to the cloud synchronously for enhanced processing such as motion blur compensation and dynamic optimization of HDR parameters.

[0291] Enhanced audio and video collaboration: Spatial audio reconstruction is performed synchronously in the cloud to achieve an immersive experience with aligned sound and picture.

[0292] Key technology support and boundaries

[0293] Security and privacy protection: A dual-check mechanism (CRC32+SHA256) is used to ensure the integrity of RAW data transmission, and the TEE trusted execution environment is combined to isolate sensitive data processing processes.

[0294] Cost control strategies:

[0295] Through elastic scaling features and hybrid deployment solutions (tiered storage of hot and cold data), high-frequency processing data is stored in edge nodes, and low-frequency data is migrated to cloud archive storage areas.

[0296] This expansion direction leverages a combination of lightweight device-side and heavy-duty cloud-side solutions, preserving the immediacy of mobile while overcoming the limitations of local hardware computing power. Compared to purely device-side solutions, this device-cloud collaborative system can support extreme scenarios such as 8K / 120fps, HDR, and multiple algorithm stacking, providing the technical foundation for next-generation ultra-high-definition video creation.

[0297] The embodiment of the present application proposes a video processing method, which obtains original video data and stores the original video data according to a first storage path; based on the received video browsing instruction and / or real-time hardware parameters, performs a first preset processing on the original video data to obtain first processed video data; stores the first processed video data according to a second storage path, and replaces the memory mapping relationship corresponding to the first storage path with the memory mapping relationship corresponding to the second storage path, so as to play the video based on the first processed video data. It can be seen that in the present application, the obtained original video data can be stored first, and then the stored original video data can be post-processed according to the instruction for browsing the video and / or the real-time hardware situation, wherein the original video data and the processed video data are stored independently according to different storage paths, and the original video data is replaced with the processed video data through the memory mapping relationship to complete the video playback. In other words, the present application can solve the problem of resource conflict between processing and storage by peak-shifting scheduling of computing power and reconstruction of storage architecture, thereby taking into account the stability and endurance of the system while ensuring image quality.

[0298] Based on the above embodiment, in another embodiment of the present application, FIG10 is a schematic diagram of the composition structure of the video processing device proposed in the embodiment of the present application. As shown in FIG10 , the video processing device 110 proposed in the embodiment of the present application may include:

[0299] An acquisition unit 111 is configured to acquire original video data;

[0300] The storage unit 112 is configured to store the original video data according to a first storage path;

[0301] The acquiring unit 111 is further configured to perform a first preset processing on the original video data based on the received video browsing instruction and / or real-time hardware parameters to obtain first processed video data;

[0302] The storage unit 112 is further configured to store the first processed video data according to a second storage path;

[0303] The replacing unit 113 is configured to replace the memory mapping relationship corresponding to the first storage path with the memory mapping relationship corresponding to the second storage path, so as to play the video based on the first processed video data.

[0304] In the embodiments of the present application, further, Figure 11 This is a schematic diagram of the structure of the electronic device proposed in the embodiment of the present application, such as Figure 11 As shown, the electronic device 120 proposed in the embodiment of the present application may include a processor 1201, a memory 1202, a communication interface 1203, and a bus 1204 for connecting the processor 1201, the memory 1202 and the communication interface 1203.

[0305] In an embodiment of the present application, the processor 1201 may be at least one of an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a central processing unit (CPU), a controller, a microcontroller, and a microprocessor. It is understandable that for different devices, the electronic device used to implement the above-mentioned processor function may also be other, and the embodiment of the present application is not specifically limited. The electronic device 120 may further include a memory 1202, which may be connected to the processor 1201, wherein the memory 1202 is used to store executable program code, the program code including computer operating instructions, and the memory 1202 may include a high-speed RAM memory, and may also include a non-volatile memory, for example, at least two disk memories.

[0306] In the embodiment of the present application, the bus 1204 is used to connect the communication interface 1203, the processor 1201 and the memory 1202, as well as the mutual communication between these devices.

[0307] In actual applications, the above-mentioned memory 1202 can be a volatile memory (volatile memory), such as random-access memory (Random-Access Memory, RAM); or a non-volatile memory (non-volatile memory), such as read-only memory (Read-Only Memory, ROM), flash memory (flash memory), hard disk drive (Hard Disk Drive, HDD) or solid-state drive (SSD); or a combination of the above types of memory, and provide instructions and data to the processor 1201.

[0308] Furthermore, in an embodiment of the present application, the processor 1201 is used for: an acquisition unit for acquiring original video data; a storage unit for storing the original video data according to a first storage path; the acquisition unit is also used to perform a first preset processing on the original video data based on the received video browsing instructions and / or real-time hardware parameters to obtain first processed video data; the storage unit is also used to store the first processed video data according to a second storage path; and a replacement unit is used to replace the memory mapping relationship corresponding to the first storage path with the memory mapping relationship corresponding to the second storage path, so as to play the video based on the first processed video data.

[0309] In addition, the functional modules in this embodiment may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware or software functional modules.

[0310] If the integrated unit is implemented in the form of a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, or the part that contributes to the relevant technology, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method of this embodiment. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., various media that can store program code.

[0311] An embodiment of the present application provides a computer-readable storage medium having a program stored thereon, which implements the video processing method described above when executed by a processor.

[0312] Specifically, the program instructions corresponding to a video processing method in this embodiment can be stored on a storage medium such as an optical disk, a hard disk, or a USB flash drive. When the program instructions corresponding to a video processing method in the storage medium are read or executed by an electronic device, the following steps are included:

[0313] An acquisition unit, used for acquiring original video data;

[0314] a storage unit, configured to store the original video data according to a first storage path;

[0315] The acquiring unit is further configured to perform a first preset processing on the original video data based on the received video browsing instruction and / or real-time hardware parameters to obtain first processed video data;

[0316] The storage unit is further configured to store the first processed video data according to a second storage path;

[0317] A replacement unit is used to replace the memory mapping relationship corresponding to the first storage path with the memory mapping relationship corresponding to the second storage path, so as to play the video based on the first processed video data.

[0318] The embodiment of the present application also provides a computer program product.

[0319] In some embodiments, the computer program product may include a computer program or instructions.

[0320] In some embodiments, the computer program product can be applied to the computer device in the embodiments of the present application, and the computer program instructions enable the computer to execute the corresponding processes implemented by the computer device in the various methods of the embodiments of the present application. For the sake of brevity, they will not be repeated here.

[0321] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Furthermore, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage and optical storage, etc.) containing computer-usable program code.

[0322] The present application is described with reference to the implementation flow charts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flow charts and / or block diagrams, as well as the combination of processes and / or boxes in the flow charts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the implementation flow charts. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0323] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which is implemented in the implementation flow diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0324] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process described in the flowchart. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0325] The above description is merely a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application.

Claims

1. A video processing method, characterized in that: The method comprises: Acquire original video data, and store the original video data according to a first storage path; Based on the received video browsing instruction and / or real-time hardware parameters, performing a first preset processing on the original video data to obtain first processed video data; The first processed video data is stored according to a second storage path, and a memory mapping relationship corresponding to the first storage path is replaced by a memory mapping relationship corresponding to the second storage path, so as to play a video based on the first processed video data.

2. The method according to claim 1, characterized in that The method further comprises: Obtaining a preview frame corresponding to the original video data; In response to the received real-time browsing instruction, video playback is performed based on the preview frame.

3. The method according to claim 1 or 2, characterized in that The method further comprises: In response to the received video browsing instruction, acquiring the first processed video data based on a memory mapping relationship corresponding to the second storage path; Video playback is performed based on the first processed video data.

4. The method according to claim 3, characterized in that The step of performing a first preset processing on the original video data based on the received video browsing instruction and / or real-time hardware parameters to obtain first processed video data includes: When the video browsing instruction is received, the original video data is subjected to a first preset processing to obtain first processed video data.

5. The method according to claim 3, characterized in that The method further comprises: Obtaining the real-time hardware parameters; The real-time hardware parameters include at least one or more of the following: Utilization parameters; Temperature parameters; Power parameters; Storage parameters; Hashrate parameters.

6. The method according to claim 5, characterized in that The step of performing a first preset processing on the original video data based on the received video browsing instruction and / or real-time hardware parameters to obtain first processed video data includes: When the real-time hardware parameters meet the preset hardware conditions, performing a first preset processing on the original video data to obtain the first processed video data; The preset hardware conditions include at least one or more of the following: The utilization parameter is less than or equal to the utilization threshold; The temperature parameter is less than or equal to the temperature threshold; The power parameter is greater than or equal to the power threshold; The storage parameter is greater than or equal to the storage threshold; The hashrate parameter is greater than or equal to the hashrate threshold.

7. The method according to any one of claims 1, 2, 4 to 6, characterized in that The method further comprises: Acquiring the original video data, and performing a second preset processing on the original video data to obtain second processed video data; storing the second processed video data according to the first storage path; Based on the received video browsing instruction and / or real-time hardware parameters, the second processed video data is subjected to a first preset processing to obtain first processed video data.

8. The method according to any one of claims 1, 2, 4 to 6, characterized in that: The first preset process includes at least one or more of the following: Image stabilization; Beauty; virtualization; Dolby Vision; HDR; AI night scene; special effects; Textures; Avatar; Video watermark.

9. The method according to any one of claims 1, 2, 4 to 6, characterized in that: The first time parameter corresponding to the first preset processing is greater than the frame rate parameter of the original video data; and / or, The second time parameter corresponding to the second preset processing is smaller than the frame rate parameter of the original video data.

10. A video processing device, characterized in that: The video processing device comprises: An acquisition unit, used for acquiring original video data; a storage unit, configured to store the original video data according to a first storage path; The acquiring unit is further configured to perform a first preset processing on the original video data based on the received video browsing instruction and / or real-time hardware parameters to obtain first processed video data; The storage unit is further configured to store the first processed video data according to a second storage path; A replacement unit is used to replace the memory mapping relationship corresponding to the first storage path with the memory mapping relationship corresponding to the second storage path, so as to play the video based on the first processed video data.

11. An electronic device, characterized in that: The electronic device includes a processor and a memory storing instructions executable by the processor. When the instructions are executed by the processor, the method according to any one of claims 1 to 9 is implemented.

12. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.