Video processing method, electronic device, chip and storage medium
By recording two-way videos with filter effects and without filter effects in the camera of electronic devices, the problem of difficult and poor video recovery in the existing technology is solved, and the original video is quickly restored and the user experience is improved. .
Patent Information
- Application Number
- CN202311692675.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-12
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2041-08-12
AI Technical Summary
In the prior art, when the recorded video with filter effect is restored to video without filter effect, the technical difficulty is high and the recovery effect is not good.
When the electronic device's camera records video in filter mode, two videos are recorded: video with filter effect and video original film without filter effect. Users can quickly find the original video through operations to achieve rapid recovery.
By recording two-way videos, users can quickly restore original videos without filter effects to improve user experience.
Smart Images

Figure CN118138702B_ABST
Abstract
Description
[0001] This application is a divisional application of the Chinese patent application submitted to the State Intellectual Property Office on August 12, 2021, with application number 202110923590.5 and application name "Video processing method, device and electronic device". Technical Field
[0002] The present application relates to the field of communication technology, and in particular to a video processing method, electronic equipment, chip and storage medium. Background Art
[0003] Currently, the camera application of electronic devices can support video recording with multiple effects. For example, when recording a video, the user can first select a filter effect, then trigger the start of video recording, and after the recording is completed, a video file with the selected filter effect can be generated, and the video screen with the selected filter effect can be displayed on the screen of the electronic device for the user to view.
[0004] However, when it is necessary to restore the recorded video with the filter effect to a video without the filter effect, the technical difficulty is relatively high and the restoration effect is not good. Summary of the invention
[0005] The present application provides a video processing method, an electronic device, a chip and a storage medium, which solve the problem in the prior art that when restoring a recorded video with a filter effect to a video without a filter effect, the technical difficulty is high and the restoration effect is poor.
[0006] In order to achieve the above objectives, this application adopts the following technical solutions:
[0007] In a first aspect, the present application provides a video processing method, the method comprising:
[0008] Recording a video with a first filter effect enabled on the electronic device to generate a first video and a second video with the same video content, wherein the first video is a video with the first filter effect added, and the second video is a video without the filter effect added;
[0009] On the user interface of the electronic device, the first video is displayed and the second video is hidden.
[0010] Through the application scheme, when the camera of an electronic device records a video in the filter mode, the electronic device can record two videos, namely, a video with a filter effect and an original video without a filter effect, wherein the video with a filter effect is visible to the user, and the original video without a filter effect is invisible to the user. When the user needs to restore the original video without the filter effect, the electronic device can quickly find the original video, so that the original video can be quickly restored, thereby improving the user experience.
[0011] In some possible implementations, after displaying the first video and hiding the second video, the method further includes:
[0012] Receiving a first operation of the user on the first video;
[0013] In response to the first operation, the first video stored in the electronic device is deleted, and the second video is displayed on the user interface of the electronic device.
[0014] In some possible implementations, the first video is a LUT video, the second video is an original Log video, and the first operation is a deletion operation.
[0015] Through the above solution, when the camera of an electronic device records a video in filter mode, the electronic device can record two videos, namely, the LUT video with filter effect and the original Log video without filter effect, where the LUT video is visible to the user and the original Log video is invisible to the user. When the user needs to restore the LUT video to the original video, the user only needs to click the control to trigger it, and the electronic device can make the original Log video visible to the user and delete the LUT video. In this way, the original video can be quickly restored to improve the user experience.
[0016] In some possible implementations, after generating the first video and the second video, the method further includes:
[0017] storing the first video and the second video in a first storage path and a second storage path in the electronic device respectively;
[0018] The video content stored in the first storage path supports screen display, while the video content stored in the second storage path does not support screen display.
[0019] In actual implementation, when recording a video after selecting a filter effect, the camera can record two MP4 videos, namely the LUT video with the filter effect and the original Log video without the filter effect. The LUT video is visible to the user, while the original Log video is invisible to the user. In this way, since only one of the two video files with the same content but different display effects is visible to the user, user confusion is avoided.
[0020] In some possible implementations, the second storage path is a subdirectory under the first storage path. That is, the second storage path may be a hidden directory under the first storage path. For example, the first storage path corresponds to the Path directory, and the second storage path may correspond to a hidden directory under the Path directory, such as .log.
[0021] Through the above steps of the present application, when recording a video with a certain filter effect enabled on an electronic device, two video files with the same content but different display effects can be recorded, and the two files are stored in different paths of the electronic device, and only one of the two video files is visible to the user, which is convenient for the user to view and manage.
[0022] In some possible implementations, the method further includes:
[0023] Naming the storage file corresponding to the first video using a first file name;
[0024] Naming the storage file corresponding to the second video using a second file name;
[0025] The first file name and the second file name have a corresponding relationship.
[0026] Through the application scheme, the storage files of the two videos can be named respectively by two corresponding file names, and the two videos can be bound by the file names. In other words, the recorded LUT video and the original Log video can be stored in association for easy association search.
[0027] In some possible implementations, the method further includes:
[0028] After the video recording is completed, a hash calculation is performed on the content of the first video to obtain a first hash value;
[0029] The storage file corresponding to the second video is named by using the first hash value as the second file name.
[0030] In actual implementation, the video contents of the LUT video and the Log video original are the same. A hash value can be obtained by applying a hash algorithm to the video content. Since the hash value is unique, the LUT video and the Log video original can establish an association relationship based on the hash value.
[0031] Through the above solution, the content hash value of the LUT video is used to establish an association with the original Log video. Even if the storage location of the LUT video file changes, it can be accurately associated with the corresponding original Log video.
[0032] In some possible implementations, in response to the first operation, deleting the first video stored in the electronic device and displaying the second video on a user interface of the electronic device includes:
[0033] In response to the first operation, obtaining a corresponding first hash value according to content of the first video;
[0034] According to the first hash value, searching the electronic device for the second video with the first hash value as the file name;
[0035] Updating the second video from the second storage path to the first storage path for storage;
[0036] Displaying the second video on a user interface of the electronic device;
[0037] Delete the storage file corresponding to the first video in the electronic device.
[0038] In an embodiment of the present application, a hash calculation can be performed on the content of the first video to obtain a first hash value. The first hash value is used as the file name of the storage file corresponding to the second video. When restoring the original film for the first video, the hash value of the corresponding original film can be directly found according to the hash value of the first video, which can improve the user experience.
[0039] In some possible implementations, the method further includes:
[0040] When deleting the storage file corresponding to the first video in the electronic device, retaining the first file name of the first video;
[0041] When the second video is updated from the second storage path to the first storage path for storage, the storage file corresponding to the second video is renamed to the first file name.
[0042] Through the above solution, the video storage location is updated and renamed when the original video is restored, which is beneficial for users to manage and view videos and improve user experience.
[0043] Optionally, in the embodiment of the present application, three recording modes, namely, traditional recording mode, professional mode and movie mode, may be used for recording.
[0044] In some possible implementations, the video recording mode includes a traditional video recording mode; wherein the step of recording the video when the electronic device has enabled a first filter effect to generate the first video and the second video includes:
[0045] When the electronic device is in the video recording mode, receiving a second operation performed by a user in an interface corresponding to the video recording mode, where the second operation is used to select the first filter effect;
[0046] In response to the second operation, enabling the first filter effect;
[0047] Receiving a third operation of the user triggering recording;
[0048] In response to the third operation, video recording is started with the first filter effect enabled to generate the first video and the second video.
[0049] In the traditional video recording mode, when the filter function is turned on, the electronic device can present the video effect or style corresponding to the filter during the video recording process. The operation of turning on the filter recording is very convenient and can improve the user experience.
[0050] In some possible implementations, the video recording mode includes a professional mode or a movie mode, and a LUT control is displayed in an interface corresponding to the professional mode or the movie mode;
[0051] The step of recording a video with the first filter effect enabled on the electronic device to generate the first video and the second video includes:
[0052] When the electronic device is in the professional mode or the movie mode, receiving a fourth operation of the user on the LUT control;
[0053] In response to the fourth operation, enabling the first filter effect corresponding to the LUT control;
[0054] Receiving a fifth operation of the user triggering recording;
[0055] In response to the fifth operation, the first video and the second video are recorded, and the first video has the first filter effect.
[0056] In professional mode and / or movie mode, if the user selects the LUT function, the electronic device can present the video effects or styles corresponding to different LUTs during video recording. This makes it very convenient to turn on the filter recording and can enhance the user experience.
[0057] In a second aspect, the present application provides a video processing device, the device comprising a unit for executing the method in the first aspect. The device may correspond to executing the method described in the first aspect, and the relevant description of the unit in the device can refer to the description of the first aspect, which will not be repeated here for the sake of brevity.
[0058] The method described in the first aspect above can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions. For example, a processing module or unit, a display module or unit, etc.
[0059] In a third aspect, the present application provides an electronic device, comprising a processor, the processor being coupled to a memory, the memory being used to store computer programs or instructions, and the processor being used to execute the computer programs or instructions stored in the memory, so that the method in the first aspect is executed.
[0060] For example, the processor is used to execute the computer program or instructions stored in the memory, so that the device performs the method in the first aspect.
[0061] In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon a computer program (also referred to as instructions or codes) for implementing the method in the first aspect.
[0062] For example, when the computer program is executed by a computer, the computer can perform the method in the first aspect.
[0063] In a fifth aspect, the present application provides a chip, including a processor. The processor is used to read and execute a computer program stored in a memory to perform the method in the first aspect and any possible implementation thereof.
[0064] Optionally, the chip also includes a memory, and the memory is connected to the processor via a circuit or wire.
[0065] In a sixth aspect, the present application provides a chip system, including a processor. The processor is used to read and execute a computer program stored in a memory to perform the method in the first aspect and any possible implementation thereof.
[0066] Optionally, the chip system also includes a memory, and the memory is connected to the processor via a circuit or wire.
[0067] In a seventh aspect, the present application provides a computer program product, comprising a computer program (also referred to as instructions or codes), wherein when the computer program is executed by a computer, the computer implements the method in the first aspect.
[0068] It can be understood that the beneficial effects of the second to seventh aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] Figure 1 This is a schematic diagram of using LUT to process the same image to obtain different effect images when an electronic device records a video in an embodiment of the present application;
[0070] Figure 2 A schematic diagram of a video processing method provided in an embodiment of the present application;
[0071] Figure 3A possible implementation method of recording a video using a camera of an electronic device in an embodiment of the present application;
[0072] Figure 4 A schematic diagram of an operation interface for recording a video in a video processing method using a video recording mode provided in an embodiment of the present application;
[0073] Figure 5 A schematic diagram of an operation interface for recording a video in a professional mode using a video processing method provided in an embodiment of the present application;
[0074] Figure 6 A video processing method provided in an embodiment of the present application is a schematic diagram of an interface for displaying a LUT video and hiding a Log video original after generating a LUT video and a Log video original;
[0075] Figure 7 A schematic diagram of a video file storage path in a video processing method provided in an embodiment of the present application;
[0076] Figure 8 A schematic diagram of an interface for a video processing method provided in an embodiment of the present application showing how to restore the original Log video after generating a LUT video;
[0077] Fig. 9 A principle block diagram of generating two-channel videos in a video processing method provided in an embodiment of the present application;
[0078] Fig.10 A flowchart of establishing an association relationship between two videos by using content hash values in a video processing method provided in an embodiment of the present application;
[0079] Fig.11 A flowchart of searching and restoring the original video according to the content hash value in a video processing method provided in an embodiment of the present application;
[0080] Fig.12 A schematic diagram of the structure of a video processing device provided in an embodiment of the present application;
[0081] Fig.13 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0082] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0083] The term "and / or" in this article is a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The symbol " / " in this article indicates that the associated objects are in an or relationship, for example, A / B means A or B.
[0084] The terms "first" and "second" in the specification and claims herein are used to distinguish different objects rather than to describe a specific order of objects. For example, a first video and a second video are used to distinguish different videos rather than to describe a specific order of videos.
[0085] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0086] In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more than two. For example, multiple processing units refer to two or more processing units, etc.; multiple elements refer to two or more elements, etc.
[0087] For ease of understanding, the following terms are introduced in this application:
[0088] 1) User experience (UX): It can also be called UX features, which refers to the user’s feelings when using electronic devices during the shooting process.
[0089] 2) Movie mode: refers to a mode in which an electronic device records video. In the embodiment of the present application, the movie mode includes a 4K high-dynamic range image (HDR) function and a color lookup table (LUT) function. When a user selects the movie mode to record a video, the recorded video can have the texture of a movie and make the picture more three-dimensional.
[0090] 3) LUT: It can also be called LUT file or LUT parameter, which is a color conversion template, such as a red green blue (RGB) mapping table. LUT can transform the actual sampled pixel gray value into another corresponding gray value through certain transformations (such as threshold, inversion, contrast adjustment and linear transformation, etc.), which can highlight the useful information of the image and enhance the light contrast of the image.
[0091] An image consists of many pixels, each represented by an RGB value. The display screen of an electronic device can display the image based on the RGB value of each pixel in the image. In other words, these RGB values will instruct the display screen how to emit light to mix a variety of colors for the user.
[0092] LUT is a RGB mapping table used to characterize the correspondence between RGB values before and after adjustment. For example, please refer to Table 1, which shows an example of LUT.
[0093] Table 1
[0094]
[0095]
[0096] When the original RGB value is (14, 22, 24), after the mapping of the LUT shown in Table 1, the output RGB value is (6, 9, 4). When the original RGB value is (61, 34, 67), after the mapping of the LUT shown in Table 1, the output RGB value is (66, 17, 47). When the original RGB value is (94, 14, 171), after the mapping of the LUT shown in Table 1, the output RGB value is (117, 82, 187). When the original RGB value is (241, 216, 222), after the mapping of the LUT shown in Table 1, the output RGB value is (255, 247, 243).
[0097] It should be noted that when using different LUTs to process the same image, different styles of image effects can be obtained. For example, Figure 1 The LUT1, LUT2 and LUT3 shown are different color lookup tables. Using LUT1 to process the original image 10 captured by the camera, we can get Figure 1 The image 11 shown. Using LUT2 to process the original image 10 captured by the camera, we can get Figure 1 The image 12 shown. Using LUT3 to process the original image 10 captured by the camera, we can get Figure 1 Image 13 shown. Contrast Figure 1 It can be seen from the images 11, 12 and 13 shown that the image effects or styles of the images 11, 12 and 13 are different.
[0098] In conventional technology, when an electronic device records a video, the recording function of the electronic device does not include a LUT function; and the shooting mode of the electronic device does not include a movie mode, which results in the style or effect of the video recorded by the electronic device being single and unable to meet the diverse shooting needs of current users, thereby resulting in a poor user experience.
[0099] Specifically in the present application, LUT can be used for image processing to change the image color, that is, to add a filter effect to the original image. For ease of description, the video shot by LUT in the context of this application is referred to as LUT video.
[0100] (4) Log video original: In terms of the camera video shooting function, the Log format is a video recording format that uses a logarithmic function to apply to the exposure curve. Videos shot in this format can retain the details of highlights and shadows to the greatest extent possible. For ease of description, in the context of this application, videos shot in the Log format are referred to as Log video originals.
[0101] At present, the camera application of electronic devices can support multi-effect video recording. For example, when recording a video, the user can first select a filter effect, then trigger the start of video recording, and after the recording is completed, a video file with the selected filter effect can be generated, and the video screen with the selected filter effect can be displayed on the screen of the electronic device for the user to view. However, when it is necessary to restore the recorded video with the filter effect to a video without the filter effect, the technical difficulty is relatively large, and the restoration effect is not good.
[0102] In view of this, an embodiment of the present application provides a video processing method. Through the scheme of the present application, when the camera of an electronic device records a video in a filter mode, the electronic device can record two videos, namely, a LUT video with a filter effect and a Log video original without a filter effect, wherein the LUT video is visible to the user, and the Log video original is invisible to the user. The scheme of the present application can process the LUT video and the Log video original. When the electronic device receives a trigger operation from the user to restore the LUT video to the original, the electronic device can make the Log video original visible to the user and delete the LUT video. In this way, the original video can be quickly restored, improving the user UX experience.
[0103] Exemplarily, the video processing method provided in the embodiments of the present application can be applied to electronic devices such as tablet computers, personal computers (PCs), personal digital assistants (PDAs), smart watches, netbooks, wearable electronic devices, augmented reality (AR) devices, virtual reality (VR) devices, vehicle-mounted devices, smart cars, smart speakers, etc., and the embodiments of the present application do not impose any restrictions on this.
[0104] The execution subject of the video processing method provided in the embodiment of the present application can be the above-mentioned electronic device, or it can be a functional module and / or functional entity in the electronic device that can implement the video processing method, and the present application scheme can be implemented by hardware and / or software, which can be determined according to actual use requirements, and the embodiment of the present application is not limited. The following takes an electronic device as an example, and combines the accompanying drawings to exemplarily illustrate the video processing method provided in the embodiment of the present application.
[0105] Figure 2 is a flow chart of a video processing method provided in an embodiment of the present application. Figure 2 As shown, the method includes the following steps S101-S104.
[0106] S101, recording a video with a first filter effect enabled on an electronic device, generating a first video and a second video having the same video content, wherein the first video is a video with the first filter effect added, and the second video is a video without the filter effect added.
[0107] In an embodiment of the present application, when a user has a need to record a video through an electronic device and the recorded video has a certain filter effect, the user can select a first filter effect in the camera video preview interface of the electronic device according to actual use needs. For example, assuming that the electronic device displays multiple filter options in the camera video preview interface, the user can click to select any one of the filter options. After the electronic device receives this operation from the user, the electronic device can enable the first filter effect in response to the operation.
[0108] Furthermore, the user can trigger the activation of the recording function in the camera recording preview interface, for example, the user clicks the recording button in the camera recording preview interface. After the electronic device receives the user's operation, the electronic device can respond to the operation, start recording with the first filter effect activated, and generate a first video with the first filter effect added, and a second video without the filter effect added.
[0109] It should be noted that the embodiment of the present application does not limit the format of the video. For example, the recorded video format can be MP4, FLV, WMV, MOV, AVI or any other video format, which can be determined according to actual use requirements and is not limited in the embodiment of the present application. For the sake of convenience, the video format MP4 is used as an example for exemplary description below.
[0110] In the embodiment of the present application, the first video is exemplarily referred to as the LUT video, and the second video is referred to as the Log video original. The following describes the specific implementation method of recording a video after selecting a filter effect to obtain the LUT video and the Log video original, and how to store and display the LUT video and the Log video original.
[0111] Optionally, in the embodiment of the present application, three recording modes, namely, traditional recording mode, professional mode and movie mode, can be used for recording. It should be noted that the recording modes here are listed for example, and in actual implementation, they may not be limited to these modes, which can be determined according to actual use requirements, and the embodiment of the present application does not limit them.
[0112] Among them, in the traditional video recording mode, the camera of the electronic device may include a filter function. In the traditional video recording mode, when the filter function is turned on, the electronic device can present a video effect or style corresponding to the filter during the video recording process.
[0113] Optionally, in the professional mode and / or the movie mode, the camera of the electronic device may include a LUT function. If the user selects the LUT function, the electronic device may present video effects or styles corresponding to different LUTs during video recording.
[0114] Combine the following Figure 3 The process of recording a video in the filter mode in the present application scheme is exemplified.
[0115] For example, taking the above electronic device as a mobile phone as an example, in some embodiments, Figure 3 As shown in (1), the function of recording a video on a mobile phone can be implemented by using the video recording mode of the mobile phone camera. Figure 3 As shown in (2), the function of recording video by the mobile phone can be realized by using the professional mode of the mobile phone camera. Figure 3 As shown in (3), the function of recording video on a mobile phone can be realized by using the movie mode of the mobile phone camera.
[0116] Still Figure 3 As shown in (1), in some embodiments, the mobile phone displays an interface 21 in the video recording mode. In other embodiments, in the interface 21, the video recording mode includes a filter control 22 for turning on the filter function. The specific steps of adding filters will be described in detail below.
[0117] Still Figure 3As shown in (2), the mobile phone displays an interface 23 in professional mode. The interface 23 includes a LUT control 24 for starting the LUT function. When the user turns on the LUT control 24, the mobile phone starts the LUT function. In some embodiments, the interface 23 also includes a LOG control 25 for starting the LOG function. Since the video images taken by the mobile phone camera using the LOG function are original images, their colors are gray, while the video images taken using the LUT function are rich in color, the LOG control 25 and the LUT control 24 included in the interface 23 cannot be turned on at the same time. In other words, in the professional mode of the mobile phone camera, the LOG function and the LUT function cannot run at the same time. It should be noted that Figure 3 The LUT control 24 shown in (2) is in a closed state.
[0118] Still Figure 3 As shown in (3), the mobile phone displays an interface 26 in the movie mode. The interface 26 includes a LUT control 27 for starting the LUT function and a LOG control 28 for starting the LOG function. It should be noted that Figure 3 The LOG control 28 shown in (3) is in a closed state.
[0119] exist Figure 3 In the movie mode shown in (3), a LUT filter can be used for recording. The LUT filter is different from a traditional filter, and the recorded video has a movie effect. The first video generated in the solution S101 of the present application can be a video recorded under the filter.
[0120] It should be noted that in professional mode, the effect after the LUT control is turned on is the same as the shooting effect in movie mode.
[0121] Next, combine Figure 3 and Figure 4 The specific operation process of using any of the three video recording modes to record the video.
[0122] based on Figure 3 The video recording mode shown in (1) Figure 4 A schematic diagram of the interface for recording video with filters enabled in traditional video recording mode is shown.
[0123] like Figure 4 As shown in (a) of FIG. 1 , when the electronic device is in the camera recording mode, the electronic device displays the recording function interface 21 in the recording mode, and the interface 21 can be considered as the camera recording preview interface 21, and a filter control 22 is displayed in the recording preview interface 21. Accordingly, the user can click the filter control 22 to select a filter effect.
[0124] like Figure 4As shown in (b), in response to the user clicking the filter control 22, the electronic device will display multiple filter effect schematics 29, such as a filter selection box, in the camera video preview interface 21 for the user to select. Exemplarily, the filter effect may include no filter effect, filter A effect, filter B effect, filter C effect, and any other possible filter effect, which can be determined according to actual use requirements and is not limited in the embodiments of the present application. Accordingly, the user can select the filter effect to be added from the multiple filter effect schematics displayed by the electronic device. The following is an exemplary description of selecting to add filter A effect as an example.
[0125] like Figure 4 As shown in (c) in FIG. 1 , a video start control or button 30 is also displayed in the camera video preview interface 21. After the user selects a filter effect, the user clicks the video start control or button 30 to trigger the camera video function.
[0126] like Figure 4 As shown in (d) in FIG. 1 , in response to the user clicking the recording start control or button 30, the electronic device starts recording a video, and a recording interface 31 is displayed. In the recording interface 31, the filter control 22 can be used to indicate that the user has selected a filter effect, such as filter A. In addition, a recording stop control or button 32 is also displayed in the recording interface 31. Accordingly, the user can click the recording stop control or button 32 to end the recording.
[0127] During the video recording process, the electronic device will simultaneously record two video files in the background: the LUT video with filter A effect and the original Log video without the filter effect added.
[0128] It can be seen that through the above steps of the present application, when recording a video with a certain filter effect enabled on an electronic device, two video files with the same content but different display effects can be recorded.
[0129] based on Figure 3 The professional mode shown in (2) Figure 5 A schematic diagram of the interface for recording videos in professional mode is shown.
[0130] like Figure 5 As shown in (a), the electronic device is in the professional mode. In the interface 23 of the professional mode, the LUT control 24 is in a closed state, and the LOG control 25 is in an open state. In this state, the original Log video can be recorded.
[0131] If the user needs to record a LUT video, the user can click the LUT control 24 to trigger the LUT function. Figure 5As shown in (b), the electronic device starts the LUT function in response to the user operation, and in this case the LUT control 24 is in the turned-on state. In this state, the LUT video (i.e., the first video) and the Log video original film (i.e., the second video) can be recorded.
[0132] It should be noted that Figure 4 and Figure 5 This is a schematic diagram for simply describing an application scenario. The embodiments of the present application include but are not limited to Figure 4 and Figure 5 The user interface can be determined according to actual usage requirements and is not limited in the embodiments of the present application.
[0133] The process of recording LUT video and Log video original in Movie mode is similar to that in Professional mode, so it will not be described here.
[0134] The video shooting method provided in the embodiment of the present application can be applied to electronic devices including cameras and display screens. The method can enrich the shooting effects obtained by recording, can meet the diverse shooting needs of current users, and thus improve the user experience.
[0135] S102, displaying the first video and hiding the second video on the user interface of the electronic device.
[0136] In an embodiment of the present application, when a first video and a second video are generated, the first video and the second video can be stored in a first storage path and a second storage path of the electronic device, respectively. The video content stored in the first storage path supports screen display, and the video content stored in the second storage path does not support screen display. The second storage path is also called a hidden directory.
[0137] In this way, the first video supports screen display and is visible to the user; the second video does not support screen display and is invisible to the user. In this way, since only one of the two video files with the same content but different display effects is visible to the user, user confusion is avoided.
[0138] In actual implementation, when recording a video after selecting a filter effect, the camera can record two MP4 videos, namely, a LUT video with a filter effect and an original Log video without a filter effect. The LUT video is visible to the user, while the original Log video is invisible to the user.
[0139] Combined with the above Figure 4 The video recording process shown in the video mode, after the recording is completed, Figure 6As shown in (a) of FIG. 1 , the electronic device returns from the video recording interface to the camera video preview interface 21, and the thumbnail 33 displayed in the interface 21 is the thumbnail of the LUT video. When the electronic device receives the user's click operation on the thumbnail 33, combined with Figure 6 (a) in Figure 6 As shown in (b) in FIG. 1 , the electronic device can jump from the camera video preview interface 21 to the album management interface 34 , in which the LUT video 35 with the filter effect is displayed.
[0140] Therefore, users can view LUT videos with filter effects at any time in electronic devices.
[0141] Optionally, in an embodiment of the present application, the storage files of the two videos can be named respectively by two corresponding file names, and the two videos can be bound by the file name. That is, the recorded LUT video and the original Log video can be stored in association to facilitate associated search.
[0142] Exemplarily, assuming that the first file name and the second file name have a corresponding relationship, the first file name may be used to name the storage file corresponding to the first video, and the second file name may be used to name the storage file corresponding to the second video.
[0143] Optionally, in an embodiment of the present application, the second storage path may be a subdirectory under the first storage path. That is, the second storage path may be a hidden directory under the first storage path. For example, the first storage path corresponds to the Path directory, and the second storage path may correspond to a hidden directory under the Path directory, such as .log.
[0144] like Figure 7 As shown, for the recorded LUT video and Log video original film, the LUT video can be stored in a specific directory Path, and the file name of the LUT video can be named Name.mp4. For example, multiple video files Name1.mp4, Name2.mp4 and Name3.mp4 can be stored in the directory Path; and the Log video original film can be stored in a hidden directory under Path, such as .log, and the file name of the Log video original film can be named hashvalue1_log.mp4. For example, hashvalue1.mp4, hashvalue2.mp4 and hashvalue3.mp4 can be stored in the hidden directory .log. Among them, hashvalue1.mp4, hashvalue2.mp4 and hashvalue3.mp4 have a one-to-one correspondence with multiple video files name1_log.mp4, name2_log.mp4 and name3_log.mp4.
[0145] It should be noted that the file names of the above-mentioned LUT video and the original Log video are only illustrative examples. In actual implementation, they can be determined according to actual usage requirements, and the embodiments of the present application do not limit them.
[0146] It can be seen that through the above steps of the present application, when recording a video with a certain filter effect enabled on an electronic device, two video files with the same content but different display effects can be recorded, and these two files are stored in different paths of the electronic device, and only one of the two video files is visible to the user, which is convenient for the user to view and manage.
[0147] S103: Receive a first operation of the user on the first video.
[0148] Optionally, the first operation is used to trigger restoration of the original film of the first video, that is, restoration of the original film is desired.
[0149] S104, in response to the first operation, deleting the first video stored in the electronic device, and displaying the second video on the user interface of the electronic device.
[0150] Combination Figure 6 (b) in Figure 8 As shown in (a) in the figure, the user selects the LUT video 35 with the filter effect, and then clicks the restore original video control 36.
[0151] like Figure 8 As shown in (b) of FIG. 1 , in response to these operations of the user, the electronic device pops up a prompt box and displays a prompt message 37: The video with the filter effect will be deleted, and the video without the filter effect will be restored. Are you sure to perform this operation? "Yes" or "No". Accordingly, the user can click the "Yes" option 38 to confirm the execution of the operation.
[0152] In response to the user's confirmation operation, the electronic device deletes the LUT video 35, and Figure 8 As shown in (c) in FIG. 1 , the electronic device updates and displays the LUT video 35 with the filter effect as the original Log video 39 without the filter effect. The original Log video 39 without the filter effect has the same content as the LUT video 35 with the filter effect, but the display effect is different. In this way, the original video is restored, and the restored original Log video is visible to the user, and the corresponding LUT video is deleted.
[0153] Through the above steps, when the user wants to restore the LUT video to the original video, he can select Restore Original Video in Edit Mode, which will trigger the original Log video to be visible to the user and delete the LUT video. This can quickly restore the original video and improve the user UX experience.
[0154] Through the solution of this application, when recording a video after selecting a filter effect, the electronic device camera can record two MP4 videos, namely, the LUT video with the filter effect and the Log video original without the filter effect, wherein the LUT video is visible to the user, and the Log video original is invisible to the user. When the electronic device receives a trigger operation from the user to restore the LUT video to the original, the electronic device can make the Log video original visible to the user and delete the LUT video, so that the original video can be quickly restored.
[0155] Combine the following Fig. 9 A schematic block diagram illustrating the principle of how to record two MP4 videos when recording a video after selecting a filter effect in the present application.
[0156] like Fig. 9 As shown, the electronic device responds to the video recording trigger operation in the filter shooting mode, controls the camera to start, and continuously shoots video images through the camera to form a video stream. The video stream shot by the camera can be transmitted to the camera service layer (CameraService) 41 through the camera hardware abstraction layer (CameraHAL) 40.
[0157] On the one hand, the camera hardware abstraction layer (CameraHAL) 40 can transmit a video stream for preview (referred to as preview stream 42) to the camera service layer (CameraService) 41 when the camera is in video preview mode. Correspondingly, the camera service layer (CameraService) 41 can transmit the received preview stream to the application layer to realize video preview.
[0158] On the other hand, the camera hardware abstraction layer (CameraHAL) 40 can transmit the video stream to the camera service layer (CameraService) 41 when the camera is in the recording mode. Accordingly, the camera service layer (CameraService) 41 can transmit the received video stream in two paths to different video buffers to form two video streams.
[0159] One of them is the original video stream, which is transmitted to the original video stream buffer area (surface-LogC) 43 for buffering; the other one is the tone stream processed by filter rendering, which is transmitted to the filter video stream buffer area (Surface-Lut) 44 for buffering.
[0160] In addition, the audio and video framework layer 46 transmits the audio stream data collected during the video recording process to the audio buffer 45 .
[0161] Next, the media codec (MediaCodec) 47 obtains the video stream data cached in the original video stream buffer (Surface-LogC) 43, the video stream data cached in the filter video stream buffer (Surface-Lut) 44, and the audio stream data cached in the audio (Audio) buffer 45, encodes these data, and generates a LogC.mp4 video file 48 and a Lut.mp4 video file 49. Among them, the Lut.mp4 video file 49 is a video with a filter effect, and the LogC.mp4 video file 48 is the original video.
[0162] The solution provided in the embodiment of the present application has the following beneficial effects: two MP4 videos, namely the LUT video and the Log video original, can be recorded simultaneously. The LUT video is visible to the user, while the Log video original is invisible to the user, and is used to quickly restore the original video, thereby increasing the recovery speed and improving the user UX experience.
[0163] Optionally, in an embodiment of the present application, a hash calculation may be performed on the content of the first video to obtain a first hash value. The first hash value is used as the file name of the storage file corresponding to the second video. This facilitates the direct finding of the hash value of the corresponding original film based on the hash value of the first video when restoring the original film for the first video at a later stage.
[0164] Specifically, when the electronic device receives an operation triggered by the user to restore the original film for the first video, the electronic device can respond to the operation, obtain the first hash value of the first video, and find the second video with the first hash value as the file name in the electronic device according to the first hash value. Further, the second video is updated from the second storage path to the first storage path for storage, for example, the restored original film is updated from the / Path / .log directory to the / Path directory. And, the storage file corresponding to the first video in the electronic device is deleted. Accordingly, the video displayed on the user interface of the electronic device is updated from the first video to the second video.
[0165] When the storage file corresponding to the first video in the electronic device is deleted, the first file name of the first video is retained. When the second video is updated from the second storage path to the first storage path for storage, the storage file corresponding to the second video is renamed to the first file name.
[0166] In actual implementation, the video contents of the LUT video and the Log video original are the same. A hash value can be obtained by applying a hash algorithm to the video content. Since the hash value is unique, the LUT video and the Log video original can establish an association relationship based on the hash value.
[0167] Fig.10A flowchart is shown of how to use hash values to establish an association relationship between the LUT video and the Log video original recorded after selecting a filter in the present application solution. The flowchart includes the following steps S201-S206.
[0168] S201, enable filter effect.
[0169] The filter effect can be activated by user triggering, or it can be automatically activated by the system when preset conditions are met, for example, when the system is in filter recording mode, a preset filter effect is automatically activated.
[0170] S202, in response to a video recording start instruction, start recording a video.
[0171] The video recording start instruction may be triggered by the user clicking a start video recording button.
[0172] Exemplarily, two MP4 videos may be recorded, namely, a LUT video with a filter effect and an original Log video without a filter effect.
[0173] S203A, save the LUT video in the / Path directory with the file name name.mp4.
[0174] S203B, save the original Log video in the / Path / .log directory with the file name name_log.mp4.
[0175] S204, in response to the video recording stop instruction, stop recording the video.
[0176] The recording stop command may be triggered by the user clicking a stop recording button; or it may be automatically triggered by the system when preset conditions are met. For example, when the shooting time is greater than or equal to a preset time, the system automatically triggers the recording stop command to be enabled.
[0177] S205, using the LUT video to obtain a content hash value: hashvalue.
[0178] S206, rename the original Log video to hashvalue.mp4.
[0179] From the above steps, we can see that during the video recording process, the LUT video can be stored in a specific directory Path with the file name name.mp4; and the original Log video can be stored in a hidden directory (such as .log) under Path with the file name name_log.mp4.
[0180] Furthermore, after the recording is completed, the LUT video is content hashed to obtain a hash value (hashvalue) as the file name of the Log video original, and the Log video original file name name_log.mp4 is renamed to hashvalue.mp4, so that when the LUT video is restored to the Log video original later, the hash value of the corresponding Log video original can be directly found according to the hash value.
[0181] In order to uniquely associate the LUT video with the original Log video, this application uses a method to obtain a unique hash value based on the video file content as the file name of the original Log video. Currently, Android already has a ready-made interface that can be implemented, such as generating an MD5 hash value based on the file content.
[0182] Exemplarily, test.mp4 is a LUT video, and test.mp4 is used as input to obtain an MD5 hash value.
[0183] The key code examples for obtaining hash values are as follows:
[0184]
[0185] The specific implementation method of obtaining the hash value according to the content of test.mp4 may be: converting the obtained digest field content into a string, and the string may be used as the MD5 hash value.
[0186] For example, if the obtained digest field content is converted into the string 03eac71f842068581b830845c573dff9, then through this method, the hash value obtained according to the test.mp4 content is: 03eac71f842068581b830845c573dff9.
[0187] Furthermore, the original Log video may be named 03eac71f842068581b830845c573dff9.mp4 and saved in a hidden directory, so that when restoring the original Log video for the LUT video later, the corresponding original Log video may be directly found according to the hash value of the LUT video.
[0188] The embodiments of the present application have the following beneficial effects: by using the content hash value of the LUT video to establish an association with the original Log video, even if the storage location of the LUT video file changes, it can be accurately associated with the corresponding original Log video.
[0189] Fig.11A flowchart is shown of how to restore the original Log video for the LUT video and the original Log video recorded after selecting the filter in the solution of the present application, and the flowchart includes the following steps S301-S306.
[0190] S301, determining whether to restore the original film.
[0191] If the user's operation of restoring the original film is received, it is determined that the original film is restored, and the following step S302 is continued.
[0192] S302, using the LUT video to obtain a content hash value: hashvalue.
[0193] S303, find the original Log video according to the hash value hashvalue: / Path / .log / hashvalue.mp4.
[0194] Among them, the original file name of the Log video can be determined as hashvalue.mp4 according to the hash value hashvalue, and then the original Log video can be found according to the file name.
[0195] S304, save the LUT video file name name.mp4.
[0196] S305, deleting the LUT video file.
[0197] S306, move the original Log video hashvalue.mp4 from the hidden directory to the LUT video directory Path, and rename the original Log video to name.mp4.
[0198] The embodiments of the present application have the following beneficial effects: when a user wants to restore a LUT video to its original state, the user can perform corresponding operations, and the electronic device can respond to the user's operation, use the content hash value of the LUT video to find the original Log video, make the original Log video visible to the user, and delete the LUT video, thereby improving the recovery speed and enhancing the user UX experience.
[0199] It should also be noted that, in the embodiments of the present application, "greater than" can be replaced by "greater than or equal to", "less than or equal to" can be replaced by "less than", or "greater than or equal to" can be replaced by "greater than", and "less than" can be replaced by "less than or equal to".
[0200] The various embodiments described herein may be independent solutions or may be combined according to internal logic, and all of these solutions fall within the protection scope of this application.
[0201] It can be understood that the methods and operations implemented by electronic devices in the above-mentioned various method embodiments can also be implemented by components (such as chips or circuits) that can be used in electronic devices.
[0202] The above describes the method embodiment provided by the present application, and the following describes the device embodiment provided by the present application. It should be understood that the description of the device embodiment corresponds to the description of the method embodiment, so the content not described in detail can be referred to the method embodiment above, and for the sake of brevity, it will not be repeated here.
[0203] The above mainly describes the solution provided by the embodiment of the present application from the perspective of method steps. It is understandable that, in order to achieve the above functions, the electronic device implementing the method includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should be aware that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of protection of the present application.
[0204] The embodiment of the present application can divide the functional modules of the electronic device according to the above method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other feasible division methods in actual implementation. The following is an example of dividing each functional module corresponding to each function.
[0205] Fig.12 The schematic block diagram of the video processing device 800 provided in the embodiment of the present application. The device 800 can be used to execute the actions executed by the electronic device in the above method embodiment. The device 800 can include a video recording unit 810 and a display unit 820.
[0206] The video recording unit 810 is configured to record a video when the device has enabled the first filter effect, and generate a first video and a second video having the same video content, wherein the first video is a video with the first filter effect added, and the second video is a video without the filter effect added;
[0207] The display unit 820 is used to display the first video and hide the second video on the user interface of the device.
[0208] Through the application scheme, when the camera of an electronic device records a video in the filter mode, the electronic device can record two videos, namely, a video with a filter effect and an original video without a filter effect, wherein the video with a filter effect is visible to the user, and the original video without a filter effect is invisible to the user. When the user needs to restore the original video without the filter effect, the electronic device can quickly find the original video, which can facilitate the rapid restoration of the original video and improve the user UX experience.
[0209] In some embodiments, the apparatus may further include a receiving unit 830 and a processing unit 840:
[0210] The receiving unit 830 is configured to receive a first operation of a user on the first video;
[0211] The processing unit 840 is configured to delete the first video stored in the device in response to the first operation;
[0212] The display unit 820 is further configured to display the second video on a user interface of the device in response to the first operation.
[0213] In some embodiments, the first video is a LUT video, the second video is an original Log video, and the first operation is a deletion operation.
[0214] Through the above solution, when the camera of an electronic device records a video in filter mode, the electronic device can record two videos, namely, the LUT video with filter effect and the original Log video without filter effect, where the LUT video is visible to the user and the original Log video is invisible to the user. When the user needs to restore the LUT video to the original video, the user only needs to click the control to trigger it, and the electronic device can make the original Log video visible to the user and delete the LUT video. In this way, the original video can be quickly restored to improve the user UX experience.
[0215] In some embodiments, the apparatus may further include a storage unit 850;
[0216] The storage unit is used to store the first video and the second video in a first storage path and a second storage path in the device respectively;
[0217] The video content stored in the first storage path supports screen display, while the video content stored in the second storage path does not support screen display.
[0218] In actual implementation, when recording a video after selecting a filter effect, the camera can record two MP4 videos, namely the LUT video with the filter effect and the original Log video without the filter effect. The LUT video is visible to the user, while the original Log video is invisible to the user. In this way, since only one of the two video files with the same content but different display effects is visible to the user, user confusion is avoided.
[0219] In some embodiments, the second storage path is a subdirectory under the first storage path. That is, the second storage path may be a hidden directory under the first storage path. For example, the first storage path corresponds to the Path directory, and the second storage path may correspond to a hidden directory under the Path directory, such as .log.
[0220] Through the above steps of the present application, when recording a video with a certain filter effect enabled on an electronic device, two video files with the same content but different display effects can be recorded, and the two files are stored in different paths of the electronic device, and only one of the two video files is visible to the user, which is convenient for the user to view and manage.
[0221] In some embodiments, the processing unit 840 is further configured to name the storage file corresponding to the first video using a first file name; and to name the storage file corresponding to the second video using a second file name;
[0222] The first file name and the second file name have a corresponding relationship.
[0223] Through the application scheme, the storage files of the two videos can be named respectively by two corresponding file names, and the two videos can be bound by the file names. In other words, the recorded LUT video and the original Log video can be stored in association to facilitate associated search.
[0224] In some embodiments, the processing unit 840 is further used to perform a hash calculation on the content of the first video after the recording is completed to obtain a first hash value; and use the first hash value as the second file name to name the storage file corresponding to the second video.
[0225] In actual implementation, the video contents of the LUT video and the Log video original are the same. A hash value can be obtained by applying a hash algorithm to the video content. Since the hash value is unique, the LUT video and the Log video original can establish an association relationship based on the hash value.
[0226] Through the above solution, the content hash value of the LUT video is used to establish an association with the original Log video. Even if the storage location of the LUT video file changes, it can be accurately associated with the corresponding original Log video.
[0227] In some embodiments, the processing unit 840 is specifically configured to, in response to the first operation, obtain a corresponding first hash value according to the content of the first video; and according to the first hash value, find the second video with the first hash value as the file name in the device; and update the second video from the second storage path to the first storage path for storage; and delete the storage file corresponding to the first video in the device;
[0228] The display unit 820 is specifically configured to display the second video on a user interface of the device.
[0229] In an embodiment of the present application, a hash calculation can be performed on the content of the first video to obtain a first hash value. The first hash value is used as the file name of the storage file corresponding to the second video. When restoring the original film for the first video, the hash value of the corresponding original film can be directly found according to the hash value of the first video, which can improve the user UX experience.
[0230] In some embodiments, the processing unit 840 is also used to retain the first file name of the first video when the storage file corresponding to the first video in the device is deleted; and to rename the storage file corresponding to the second video to the first file name when the second video is updated from the second storage path to the first storage path for storage.
[0231] Through the above solution, the video storage location is updated and renamed when the original video is restored, which is beneficial for users to manage and view videos and improve the user UX experience.
[0232] Optionally, in the embodiment of the present application, three recording modes, namely, traditional recording mode, professional mode and movie mode, may be used for recording.
[0233] In some embodiments, the recording mode includes a traditional recording mode;
[0234] The receiving unit 830 is specifically configured to receive a second operation performed by a user in an interface corresponding to the recording mode when the device is in the recording mode, wherein the second operation is used to select the first filter effect;
[0235] The video recording unit 810 is specifically configured to enable the first filter effect in response to the second operation;
[0236] The receiving unit 830 is further configured to receive a third operation of the user triggering the recording;
[0237] The video recording unit 810 is further specifically configured to start video recording in response to the third operation with the first filter effect enabled, thereby generating the first video and the second video.
[0238] In the traditional video recording mode, when the filter function is turned on, the electronic device can present the video effect or style corresponding to the filter during the video recording process. The operation of turning on the filter recording is very convenient and can improve the user UX experience.
[0239] In some embodiments, the video recording mode includes a professional mode or a movie mode, and a LUT control is displayed in an interface corresponding to the professional mode or the movie mode;
[0240] The receiving unit 830 is specifically configured to receive a fourth operation of the user on the LUT control when the device is in the professional mode or the movie mode;
[0241] The video recording unit 810 is specifically configured to enable the first filter effect corresponding to the LUT control in response to the fourth operation;
[0242] The receiving unit 830 is further configured to receive a fifth operation of the user triggering recording;
[0243] The video recording unit 810 is further specifically configured to, in response to the fifth operation, record the first video and the second video, wherein the first video has the first filter effect.
[0244] In professional mode and / or movie mode, if the user selects the LUT function, the electronic device can present different video effects or styles corresponding to different LUTs during video recording. This makes it very convenient to turn on the filter recording and improves the user UX experience.
[0245] According to the embodiment of the present application, the device 800 may correspond to executing the method described in the embodiment of the present application, and the above and other operations and / or functions of the units in the device 800 are respectively for implementing the corresponding processes of the method, which will not be repeated here for the sake of brevity.
[0246] Fig.139 is a structural schematic diagram of an electronic device 900 provided in an embodiment of the present application. The electronic device 900 may include a processor 910, an external memory interface 920, an internal memory 921, a universal serial bus (USB) interface 930, a charging management module 940, a power management unit 941, a battery 942, an antenna 1, an antenna 2, a mobile communication module 950, a wireless communication module 960, an audio module 970, a speaker 970A, a receiver 970B, a microphone 970C, an earphone interface 970D, a sensor module 980, a button 990, a motor 991, an indicator 992, a camera 993, a display screen 994, and a subscriber identification module (SIM) card interface 995, etc. The sensor module 980 may include a pressure sensor 980A, a gyroscope sensor 980B, an air pressure sensor 980C, a magnetic sensor 980D, an acceleration sensor 980E, a distance sensor 980F, a proximity light sensor 980G, a fingerprint sensor 980H, a temperature sensor 980I, a touch sensor 980J, an ambient light sensor 980K and a bone conduction sensor 980L, etc.
[0247] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 900. In other embodiments of the present application, the electronic device 900 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0248] The processor 910 may include one or more processing units, for example: the processor 910 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural-network processing unit (neural-network processing unit, NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors. Among them, the controller can be the nerve center and command center of the electronic device 900. The controller can generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions.
[0249] The processor 910 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 910 is a cache memory. The memory may store instructions or data that the processor 910 has just used or cyclically used. If the processor 910 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 910, and thus improves the efficiency of the system.
[0250] In some embodiments, the processor 910 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc. It can be understood that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation of the electronic device 900. In other embodiments of the present application, the electronic device 900 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0251] The charging management module 940 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 940 may receive charging input from a wired charger through the USB interface 930. In some wireless charging embodiments, the charging management module 940 may receive wireless charging input through a wireless charging coil of the electronic device 900. While the charging management module 940 is charging the battery 942, it may also power the electronic device through the power management unit 941.
[0252] The power management unit 941 is used to connect the battery 942, the charging management module 940 and the processor 910. The power management unit 941 receives input from the battery 942 and / or the charging management module 940, and supplies power to the processor 910, the internal memory 921, the external memory, the display screen 994, the camera 993 and the wireless communication module 960. The power management unit 941 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management unit 941 can also be set in the processor 910. In other embodiments, the power management unit 941 and the charging management module 940 can also be set in the same device.
[0253] The wireless communication function of the electronic device 900 can be implemented through the antenna 1, the antenna 2, the mobile communication module 950, the wireless communication module 960, the modem processor, the baseband processor, etc.
[0254] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 900 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0255] The mobile communication module 950 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 900. The mobile communication module 950 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 950 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 950 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 950 may be arranged in the processor 910. In some embodiments, at least some of the functional modules of the mobile communication module 950 may be arranged in the same device as at least some of the modules of the processor 910.
[0256] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 970A, a receiver 970B, etc.), or displays an image or video through a display screen 994. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 910 and be set in the same device as the mobile communication module 950 or other functional modules.
[0257] The wireless communication module 960 can provide wireless communication solutions including WLAN (such as Wi-Fi), BT, global navigation satellite system (GNSS), FM, NFC, IR or general 2.4G / 5G wireless communication technology applied to the electronic device 900. The wireless communication module 960 can be one or more devices integrating at least one communication processing module. The wireless communication module 960 receives electromagnetic waves via the antenna 2, modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 910. The wireless communication module 960 can also receive the signal to be sent from the processor 910, modulate and amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0258] In some embodiments, the wireless communication module 960 may be a Wi-Fi and / or Bluetooth chip. The electronic device 900 may establish a connection with a chip of an electronic device such as a wireless headset through the chip, so as to realize wireless communication and business processing between the electronic device 900 and other electronic devices through the connection. Among them, the Bluetooth chip may generally support BR / EDR Bluetooth and BLE.
[0259] In some embodiments, the antenna 1 of the electronic device 900 is coupled to the mobile communication module 950, and the antenna 2 is coupled to the wireless communication module 960, so that the electronic device 900 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TDSCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. GNSS may include the global positioning system (GPS), the global navigation satellite system (GLONASS), the Beidou navigation satellite system (BDS), the quasi-zenith satellite system (QZSS) and / or the satellite based augmentation system (SBAS).
[0260] The electronic device 900 implements the display function through a GPU, a display screen 994, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 994 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 910 may include one or more GPUs, which execute program instructions to generate or change display information.
[0261] The display screen 994 is used to display images, videos, etc. The display screen 994 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 900 may include 1 or N display screens 994, where N is a positive integer greater than 1.
[0262] The electronic device 900 can realize the shooting function through the ISP, the camera 993, the video codec, the GPU, the display screen 994 and the application processor.
[0263] The ISP is used to process the data fed back by the camera 993. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera 993.
[0264] The camera 993 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 900 may include 1 or N cameras 993, where N is a positive integer greater than 1.
[0265] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 900 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0266] Video codecs are used to compress or decompress digital videos. The electronic device 900 may support one or more video codecs. Thus, the electronic device 900 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0267] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 900 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0268] The external memory interface 920 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 900. The external memory card communicates with the processor 910 through the external memory interface 920 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0269] The internal memory 921 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 910 executes various functional applications and data processing of the electronic device 900 by running the instructions stored in the internal memory 921. The internal memory 921 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 900 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 921 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0270] The processor 910 can be used to execute the above program code and call related modules to implement the functions of the electronic device in the embodiment of the present application. For example, multiple communication links are established with another electronic device; when there is a preset service (such as a file transfer service, etc.), data of the preset service is transmitted with another electronic device through multiple communication links.
[0271] The electronic device 900 can implement audio functions such as music playing and recording through the speaker 970A, the receiver 970B, the microphone 970C, the headphone jack 970D, and the application processor in the audio module 970 .
[0272] The audio module 970 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal. The audio module 970 can also be used to encode and decode audio signals. In some embodiments, the audio module 970 can be arranged in the processor 910, or some functional modules of the audio module 970 can be arranged in the processor 910.
[0273] The speaker 970A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 900 can listen to music or listen to a hands-free call through the speaker 970A.
[0274] The receiver 970B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 900 receives a call or voice message, the voice can be received by placing the receiver 970B close to the human ear.
[0275] Microphone 970C, also called "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting his mouth close to the microphone 970C to input the sound signal into the microphone 970C. The electronic device 900 can be provided with at least one microphone 970C. In other embodiments, the electronic device 900 can be provided with two microphones 970C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 900 can also be provided with three, four or more microphones 970C to realize the collection of sound signals, noise reduction, identification of sound sources, realization of directional recording function, etc.
[0276] The earphone interface 970D is used to connect a wired earphone and can be the USB interface 930 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0277] The pressure sensor 980A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 980A can be set on the display screen 994. There are many types of pressure sensors 980A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 980A, the capacitance between the electrodes changes. The electronic device 900 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 994, the electronic device 900 detects the touch operation intensity according to the pressure sensor 980A. The electronic device 900 can also calculate the touch position according to the detection signal of the pressure sensor 980A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
[0278] The gyroscope sensor 980B can be used to determine the motion posture of the electronic device 900. In some embodiments, the angular velocity of the electronic device 900 around three axes (e.g., x, y, and z axes) can be determined by the gyroscope sensor 980B. The gyroscope sensor 980B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 980B detects the angle of the electronic device 900 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 900 through reverse movement to achieve anti-shake. The gyroscope sensor 980B can also be used for navigation and somatosensory game scenes.
[0279] The acceleration sensor 980E can detect the magnitude of the acceleration of the electronic device 900 in all directions (generally three axes). When the electronic device 900 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
[0280] The distance sensor 980F is used to measure the distance. The electronic device 900 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 900 can use the distance sensor 980F to measure the distance to achieve fast focusing.
[0281] The proximity light sensor 980G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The light-emitting diode may be an infrared light-emitting diode. The electronic device 900 emits infrared light outward through the light-emitting diode. The electronic device 900 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 900. When insufficient reflected light is detected, the electronic device 900 can determine that there is no object near the electronic device 900. The electronic device 900 can use the proximity light sensor 980G to detect that the user holds the electronic device 900 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 980G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.
[0282] The ambient light sensor 980K is used to sense the ambient light brightness. The electronic device 900 can adaptively adjust the brightness of the display screen 994 according to the perceived ambient light brightness. The ambient light sensor 980K can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 980K can also cooperate with the proximity light sensor 980G to detect whether the electronic device 900 is in a pocket to prevent accidental touches.
[0283] The air pressure sensor 980C is used to measure air pressure. In some embodiments, the electronic device 900 calculates the altitude through the air pressure value measured by the air pressure sensor 980C to assist in positioning and navigation.
[0284] The magnetic sensor 980D includes a Hall sensor. The electronic device 900 can use the magnetic sensor 980D to detect the displacement of the electronic device 900. In some embodiments, the Hall sensor can use a magnet to form a linear trapezoidal magnetic field (or called a ramp magnetic field). The displacement change of the Hall plate in the linear magnetic field is consistent with the change in magnetic field strength. The Hall potential formed is proportional to the displacement. The electronic device 900 obtains the Hall potential and can measure the displacement.
[0285] The fingerprint sensor 980H is used to collect fingerprints. The electronic device 900 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint answering calls, etc.
[0286] The temperature sensor 980I is used to detect temperature. In some embodiments, the electronic device 900 uses the temperature detected by the temperature sensor 980I to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 980I exceeds a threshold, the electronic device 900 reduces the performance of the processor located near the temperature sensor 980I to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 900 heats the battery 942 to avoid abnormal shutdown of the electronic device 900 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 900 performs a boost on the output voltage of the battery 942 to avoid abnormal shutdown caused by low temperature.
[0287] The touch sensor 980J is also called a "touch panel". The touch sensor 980J can be set on the display screen 994, and the touch sensor 980J and the display screen 994 form a touch screen, also called a "touch screen". The touch sensor 980J is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 994. In other embodiments, the touch sensor 980J can also be set on the surface of the electronic device 900, which is different from the position of the display screen 994.
[0288] The bone conduction sensor 980L can obtain a vibration signal. In some embodiments, the bone conduction sensor 980L can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 980L can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 980L can also be set in an earphone and combined into a bone conduction earphone. The audio module 970 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 980L to realize the voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 980L to realize the heart rate detection function.
[0289] The key 990 includes a power key, a volume key, etc. The key 990 may be a mechanical key or a touch key. The electronic device 900 may receive key input and generate key signal input related to user settings and function control of the electronic device 900.
[0290] Motor 991 can generate vibration prompts. Motor 991 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 994, motor 991 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0291] Indicator 992 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0292] The SIM card interface 995 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 900 by inserting it into the SIM card interface 995 or pulling it out from the SIM card interface 995. The electronic device 900 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 995 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 995 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 995 can also be compatible with different types of SIM cards. The SIM card interface 995 can also be compatible with external memory cards. The electronic device 900 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 900 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 900 and cannot be separated from the electronic device 900.
[0293] Understandably, Fig.13 The components shown do not constitute a specific limitation on the electronic device 900 , and the electronic device 900 may also include more or fewer components than those shown in the figure, or combine or separate some components, or arrange the components differently.
[0294] The electronic device 900 may be a mobile terminal or a non-mobile terminal. Exemplarily, the electronic device 900 may be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted terminal, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), a wireless headset, a wireless bracelet, a wireless smart glasses, a wireless watch, an augmented reality (AR) / virtual reality (VR) device, a desktop computer, a smart home appliance (such as a TV, a speaker, a refrigerator, an air purifier, an air conditioner, an electric rice cooker), etc. Among them, the electronic device 900 may also be collectively referred to as an Internet of Things (IoT) device. The embodiment of the present application does not specifically limit the device type of the electronic device 900.
[0295] It should be understood that Fig.13 The electronic device 900 shown may correspond to Fig.12 The video processing device 800 shown. Fig.13 The processor 910, camera 993, display screen 994, pressure sensor 980A and internal memory 921 in the electronic device 900 shown in FIG. 1 may correspond to Fig.12 The processing unit 840, the recording unit 810, the display unit 820, the receiving unit 830, and the storage unit 850 in the video processing device 800.
[0296] In actual implementation, when the electronic device 900 is running, the processor 910 executes the computer execution instructions in the memory 921 to perform the operation steps of the above method through the electronic device 900.
[0297] Optionally, in some embodiments, the present application provides a chip, which is coupled to a memory, and the chip is used to read and execute computer programs or instructions stored in the memory to execute the methods in the above embodiments.
[0298] Optionally, in some embodiments, the present application provides an electronic device, which includes a chip, and the chip is used to read and execute a computer program or instruction stored in a memory, so that the method in each embodiment is executed.
[0299] Optionally, in some embodiments, the embodiments of the present application further provide a computer-readable storage medium, which stores program code. When the computer program code runs on a computer, the computer executes the methods in the above embodiments.
[0300] Optionally, in some embodiments, the embodiments of the present application further provide a computer program product, which includes a computer program code. When the computer program code runs on a computer, the computer executes the methods in the above embodiments.
[0301] In an embodiment of the present application, the electronic device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. Among them, the hardware layer may include hardware such as a central processing unit (CPU), a memory management unit (MMU), and a memory (also called main memory). The operating system of the operating system layer can be any one or more computer operating systems that implement business processing through processes, such as Linux operating system, Unix operating system, Android operating system, iOS operating system, or Windows operating system. The application layer may include applications such as browsers, address books, word processing software, and instant messaging software.
[0302] The embodiments of the present application do not specifically limit the specific structure of the execution subject of the method provided in the embodiments of the present application, as long as it is possible to communicate according to the method provided in the embodiments of the present application by running a program that records the code of the method provided in the embodiments of the present application. For example, the execution subject of the method provided in the embodiments of the present application may be an electronic device, or a functional module in the electronic device that can call and execute a program.
[0303] Various aspects or features of the present application may be implemented as a method, apparatus, or article of manufacture using standard programming and / or engineering techniques. The term "article of manufacture" as used herein may encompass a computer program accessible from any computer-readable device, carrier, or medium. For example, a computer-readable medium may include, but is not limited to, a magnetic storage device (e.g., a hard disk, a floppy disk, or a magnetic tape, etc.), an optical disk (e.g., a compact disc (CD), a digital versatile disc (DVD), etc.), a smart card, and a flash memory device (e.g., an erasable programmable read-only memory (EPROM), a card, a stick, or a key drive, etc.).
[0304] The various storage media described herein may represent one or more devices and / or other machine-readable media for storing information. The term "machine-readable medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing and / or carrying instructions and / or data.
[0305] It should be understood that the processor mentioned in the embodiments of the present application may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0306] It should also be understood that the memory mentioned in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM). For example, RAM can be used as an external cache. By way of example and not limitation, RAM may include the following forms: static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).
[0307] It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, the memory (storage module) can be integrated into the processor.
[0308] It should also be noted that the memory described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0309] Those of ordinary skill in the art will appreciate that the units and steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of protection of this application.
[0310] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0311] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0312] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0313] In addition, each functional unit in each embodiment of the present application may be integrated into one unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0314] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a computer software product, which is stored in a storage medium. The computer software product includes several instructions that enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium may include, but is not limited to: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0315] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.
[0316] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A video processing method, characterized in that: include: Recording a video with a first filter effect enabled on the electronic device, generating first video stream data and second video stream data, the first video stream data and the second video stream data are respectively transmitted to different video buffer areas, the first video stream data and audio stream data collected during the recording process are encoded to generate a first video, the second video stream and the audio stream data are encoded to generate a second video, the first video and the second video have the same video content, the first video is a video with the first filter effect added, and the second video is a video without the filter effect added; The first video is stored in a first storage path with a first file name, and the second video is stored in a second storage path with a second file name; After the video recording is completed, a hash calculation is performed based on the content of the first video to obtain a first hash value; Naming the second video by using the first hash value as the second file name; Based on the first storage path, displaying the first video on a user interface of the electronic device; In response to a first operation performed by a user on the first video, obtaining a corresponding first hash value according to content of the first video; According to the first hash value, searching the electronic device for the second video with the first hash value as the file name; The first operation is a delete operation; Deleting the first video stored in the first storage path in the electronic device; Updating the second video from the second storage path to the first storage path for storage, and renaming the second video according to the first file name; Based on the first storage path, the first video displayed on the user interface of the electronic device is updated to the second video.
2. The method according to claim 1, characterized in that The first video is a LUT video, and the second video is an original Log video.
3. The method according to claim 1, characterized in that The video content stored in the first storage path supports screen display, and the video content stored in the second storage path does not support screen display; The second storage path is a storage path generated based on the first storage path.
4. The method according to claim 3, characterized in that The second storage path is a subdirectory under the first storage path.
5. The method according to any one of claims 1 to 4, characterized in that The second file name is a file name generated based on the first file name.
6. The method according to any one of claims 1 to 4, characterized in that The method further comprises: In case that the storage file corresponding to the first video in the electronic device is deleted, a first file name of the first video is obtained.
7. The method according to any one of claims 1 to 4, characterized in that The step of renaming the second video according to the first file name includes: Rename the storage file corresponding to the second video to the first file name.
8. The method according to any one of claims 1 to 4, characterized in that The step of recording a video with the first filter effect enabled on the electronic device to generate first video stream data and second video stream data includes: When the electronic device is in a recording mode, receiving a second operation of a user in an interface corresponding to the recording mode, wherein the second operation is used to select the first filter effect; the recording mode includes a traditional recording mode; In response to the second operation, enabling the first filter effect; Receiving a third operation of the user triggering recording; In response to the third operation, video recording is started with the first filter effect enabled, and the first video stream data and the second video stream data are generated.
9. The method according to any one of claims 1 to 4, characterized in that The step of recording a video with the first filter effect enabled on the electronic device to generate the first video stream data and the second video stream data includes: When the electronic device is in the professional mode or the movie mode, displaying the LUT control, and receiving a fourth operation of the user on the LUT control; In response to the fourth operation, enabling the first filter effect corresponding to the LUT control; Receiving a fifth operation of the user triggering recording; In response to the fifth operation, the first video stream data and the second video stream data are recorded, and the first video stream data has the first filter effect.
10. An electronic device, characterized in that: The electronic device comprises a processor coupled to a memory, wherein the processor is configured to execute a computer program or instruction stored in the memory so that the electronic device implements the method according to any one of claims 1 to 9.
11. A chip, characterized in that: The chip is coupled to a memory, and the chip is used to read and execute a computer program stored in the memory to implement the method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Method and device for clustering video resource
CN101419614A
Matching system and method for video subtitles
CN103179093A