Video processing method and device, computer readable storage medium and electronic device
By selecting the target super-resolution model based on the video resolution for processing, the problem of poor video display effect in super-resolution technology is solved, and clarity and fluency are improved, improving the user experience.
Patent Information
- Application Number
- CN202110256816.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-09
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2041-03-09
AI Technical Summary
After the existing super-resolution technology improves the video resolution, it may lead to poor video display effect, insufficient clarity or causing video lag.
By determining the resolution of the video and selecting the corresponding super-resolution model, super-resolution processing of the video frames is avoided by using a fixed resolution magnification, and the target super-resolution model is used for processing.
It achieves improved the clarity and smooth playback of videos, improves the user's visual experience, and avoids the video effect problems caused by insufficient or excessive improvement in resolution.
Smart Images

Figure CN113038267B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of video processing technology, and in particular to a video processing method, a video processing device, a computer-readable storage medium, and an electronic device. Background Art
[0002] As people's demand for high-quality, high-definition video continues to increase, video processing technology has developed rapidly both in hardware and software.
[0003] For low-resolution videos, super-resolution technology can be used to improve the resolution of video frames. However, after using super-resolution technology to improve the resolution, the problem of poor video display effect may still occur. Summary of the invention
[0004] The present disclosure provides a video processing method, a video processing device, a computer-readable storage medium and an electronic device, thereby overcoming, at least to a certain extent, the problem of poor video display effect that may still occur when using super-resolution technology.
[0005] According to a first aspect of the present disclosure, a video processing method is provided, comprising: determining the resolution of a video; if a target super-resolution model corresponding to the resolution of the video is determined from multiple super-resolution models, super-resolution processing is performed on each video frame of the video through the target super-resolution model.
[0006] According to a second aspect of the present disclosure, a video processing device is provided, comprising: a resolution determination module for determining the resolution of a video; and a super-resolution processing module for, if a target super-resolution model corresponding to the resolution of the video is determined from multiple super-resolution models, performing super-resolution processing on each video frame of the video through the target super-resolution model.
[0007] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned video processing method is implemented.
[0008] According to a fourth aspect of the present disclosure, an electronic device is provided, including a processor; and a memory for storing one or more programs, wherein when the one or more programs are executed by the processor, the processor implements the above-mentioned video processing method.
[0009] In the technical solutions provided in some embodiments of the present disclosure, the resolution of the video is associated with a super-resolution model, and each video frame of the video is super-resolution processed by the super-resolution model corresponding to the resolution. This can effectively avoid the problem that some technologies use a super-resolution model to improve the resolution regardless of the resolution of the video, which may cause the resolution to be insufficient, resulting in insufficient clarity, or the resolution to be too large after the improvement, resulting in video freezes. This solution helps to obtain clear and smooth videos, improves the video display effect, and thus enhances the user's viewing experience.
[0010] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0012] Figure 1 A schematic diagram showing an exemplary system architecture for applying the video processing solution of an embodiment of the present disclosure;
[0013] Figure 2 A schematic diagram of the structure of an electronic device suitable for implementing an embodiment of the present disclosure is shown;
[0014] Figure 3 A flowchart of a video processing method according to an exemplary embodiment of the present disclosure is schematically shown;
[0015] Figure 4 A flowchart of an algorithm for implementing a video processing process according to an embodiment of the present disclosure is shown;
[0016] Figure 5 A schematic diagram showing a super-resolution algorithm is shown taking a video frame as an example;
[0017] Figure 6 A flowchart schematically shows a video processing process according to an embodiment of the present disclosure;
[0018] Figure 7 A block diagram schematically shows a video processing device according to an exemplary embodiment of the present disclosure;
[0019] Figure 8 A block diagram schematically shows a video processing device according to another exemplary embodiment of the present disclosure;
[0020] Fig. 9 A block diagram schematically shows a video processing device according to another exemplary embodiment of the present disclosure;
[0021] Fig.10 A block diagram of a video processing device according to another exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0022] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0023] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0024] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the steps. For example, some steps may be decomposed, while some steps may be combined or partially combined, so the actual execution order may change according to the actual situation.
[0025] In order to facilitate a better understanding of the solutions of the embodiments of the present disclosure, some concepts involved in the present disclosure are briefly introduced below.
[0026] Video encoding generally refers to the processing to form a video or a sequence of video frames. In the video processing field of the present disclosure, the terms "picture", "video frame", "frame", "image", "video image", and "video frame image" may be synonymous. Video encoding is performed on the source side and generally includes processing (e.g., by compression) the original video image to reduce the amount of data required to represent the video image, thereby more efficiently storing and / or transmitting. Video decoding is performed on the destination side and generally includes inverse processing relative to the encoder to reconstruct the video image. In the disclosed scheme, the decoding process is mainly involved.
[0027] Super-resolution, also known as super-resolution, refers to the process of transforming low-resolution video frames to obtain high-resolution video frames. For example, a video frame with a resolution of 2K is subjected to 2 times super-resolution to obtain a video image with a resolution of 4K. The present disclosure can use a machine learning model to construct a super-resolution model to achieve the super-resolution processing process. The machine learning model here can be a convolutional neural network (CNN), a deep neural network (DNN), etc. The present disclosure does not limit the specific model structure, training process, etc. of the model used in the super-resolution algorithm.
[0028] In addition, it should be understood that the "high" and "low" resolutions mentioned in the present disclosure are merely relative concepts. For example, in some embodiments, 720P may be a high resolution compared to 270P, while in other embodiments, 720P may be a low resolution compared to 1080P.
[0029] At present, some technologies achieve super-resolution through a fixed resolution magnification, that is, the same super-resolution algorithm is used for videos of all sizes. For example, for a scenario where a super-resolution model with a small resolution magnification is used, if the model is applied to the super-resolution process of a low-resolution video, the resolution will still be small after the super-resolution process, and the user will still feel that the video is blurry. For another example, for a scenario where a super-resolution model with a large resolution magnification is used, if the model is applied to the super-resolution process of a higher-resolution video, the input and output data volume and the model calculation amount are both very large, the super-resolution speed is slow, and in a scenario where processing and playback are performed simultaneously, video freezes are likely to occur.
[0030] In order to solve these problems, the present disclosure provides a solution for selecting a super-resolution model according to the resolution of a video, so as to adopt different super-resolution algorithms according to different video resolution conditions.
[0031] Figure 1 A schematic diagram showing an exemplary system architecture for applying the video processing solution of an embodiment of the present disclosure.
[0032] like Figure 1 As shown, the system architecture may include a terminal device 11 and a server 12. The terminal device 11 and the server 12 may be connected via a network, and the connection type of the network may include, for example, wired or wireless communication links or optical fiber cables.
[0033] It should be understood that the number of terminal devices 11 and servers 12 is only illustrative. According to the implementation requirements, there can be any number of terminal devices and servers. For example, the server 12 can be a server cluster composed of multiple servers. The server 12 can also be called a cloud or cloud server.
[0034] The terminal device 11 can interact with the server 12 through the network to receive or send messages, etc. Figure 1 In the figure, a smart phone is used as an example, however, the terminal device 11 also includes a tablet computer, a smart wearable device, a personal computer and other devices with a shooting function. Among them, the terminal device 11 can also be called a terminal, a mobile terminal, a mobile terminal, a smart terminal and the like.
[0035] In the case where the video processing process of the exemplary embodiment of the present disclosure is performed by the terminal device 11, first, the terminal device 11 can determine the resolution of the video. Among them, the video can be a video that is being opened on the terminal device 11. In this case, the scenario of the video processing solution of the present disclosure can be a video super-resolution processing process triggered by opening any video after the user opens the video app. In addition, the video can also be a video stored in the terminal device 11, which can be a video downloaded from other devices or servers, or a video shot by the camera of the terminal device 11.
[0036] Next, when a target super-resolution model corresponding to the resolution of the video is determined from multiple super-resolution models, the terminal device 11 can call the target super-resolution model to perform super-resolution processing on each video frame of the video through the target super-resolution model to obtain video frames after super-resolution processing.
[0037] It should be noted that, according to some embodiments of the present disclosure, the terminal device 11 can save and / or upload the video frames processed by super resolution to the server 12 for storage, which can be saved as another video with an improved resolution corresponding to the video. According to other embodiments of the present disclosure, the terminal device 11 can play the video frames processed by super resolution based on the video frame sequence (i.e., in the order of the video frames).
[0038] When the video processing process of the exemplary embodiment of the present disclosure is performed by the server 12, first, the server 12 can obtain the video from the terminal device 11 and determine the resolution of the video. In addition, the video can also be a video obtained by the server 12 from other servers or devices, and the present disclosure does not limit this.
[0039] Next, the server 12 can determine the resolution of the video. When a target super-resolution model corresponding to the resolution of the video is determined from multiple super-resolution models, the server 12 calls the target super-resolution model to perform super-resolution processing on each video frame of the video to obtain video frames after super-resolution processing.
[0040] It should be noted that, according to some embodiments of the present disclosure, the server 12 may save the video frame after super-resolution processing, and may save it as another video with an improved resolution corresponding to the video. According to other embodiments of the present disclosure, the server 12 may send the video frame after super-resolution processing to the terminal device 11, and the terminal device 11 may display and / or save it.
[0041] In addition, any step of video processing in the present disclosure can be executed by the terminal device 11 or the server 12, and the present disclosure does not impose any restrictions on this.
[0042] Figure 2 Schematic diagram of an electronic device suitable for implementing the exemplary embodiment of the present disclosure is shown. The terminal device of the exemplary embodiment of the present disclosure may be configured as follows Figure 2 It should be noted that Figure 2 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0043] The electronic device of the present disclosure includes at least a processor and a memory, wherein the memory is used to store one or more programs. When the one or more programs are executed by the processor, the processor can implement the video processing method of the exemplary embodiment of the present disclosure.
[0044] Specifically, Figure 2As shown, the electronic device 200 may include: a processor 210, an internal memory 221, an external memory interface 222, a Universal Serial Bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 271, a receiver 272, a microphone 273, an earphone interface 274, a sensor module 280, a display screen 290, a camera module 291, an indicator 292, a motor 293, a button 294, and a Subscriber Identification Module (SIM) card interface 295, etc. The sensor module 280 may include a depth sensor, a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, and a bone conduction sensor, etc.
[0045] It is to be understood that the structure illustrated in the embodiment of the present disclosure does not constitute a specific limitation on the electronic device 200. In other embodiments of the present disclosure, the electronic device 200 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.
[0046] The processor 210 may include one or more processing units, for example, the processor 210 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor and / or a neural network processor (NPU). Different processing units may be independent devices or integrated into one or more processors. In addition, a memory may be provided in the processor 210 for storing instructions and data.
[0047] It should be noted that the super-resolution processing process of the present disclosure can be deployed on a DSP or an NPU, that is, the super-resolution process of the present disclosure is implemented by a DSP or an NPU. Based on the performance advantages of these processors, the video processing efficiency can be improved. In addition, when the processor executes the super-resolution algorithm, the performance of the super-resolution algorithm can be further improved by optimizing the local operator.
[0048] The electronic device 200 can realize the shooting function through the ISP, the camera module 291, the video codec, the GPU, the display screen 290 and the application processor. In some embodiments, the electronic device 200 may include 1 or N camera modules 291, N is a positive integer greater than 1, and if the electronic device 200 includes N cameras, one of the N cameras is a main camera. For example, the video mentioned in the disclosed solution may be a video captured by the electronic device 200 through the camera module 291.
[0049] The internal memory 221 can be used to store computer executable program codes, which include instructions. The internal memory 221 can include a program storage area and a data storage area. The external memory interface 222 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 200.
[0050] The present disclosure also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or may exist independently without being assembled into the electronic device.
[0051] The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0052] Computer-readable storage media can send, propagate or transmit programs for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0053] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by an electronic device, the electronic device implements the method described in the following embodiments.
[0054] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0055] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, and the units described may also be arranged in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0056] The video processing method of the present invention will be described below by taking the process of the terminal device executing the video processing of the present invention as an example. In this case, the following video processing device can be configured in the terminal device.
[0057] Figure 3 The flowchart of the video processing method according to the exemplary embodiment of the present disclosure is schematically shown. Figure 3 , the video processing method may include the following steps:
[0058] S32. Determine the resolution of the video.
[0059] According to some embodiments of the present disclosure, the video may be a video captured by a terminal device through its camera module, or a video acquired by the terminal device from another device or server. In these embodiments, the video may be a video saved offline by the terminal device. The present disclosure does not restrict the content, source, or even resolution of the video.
[0060] Since the video is a video stored in the terminal device, the video resolution can be directly extracted from the stored video information. The video information mentioned here includes but is not limited to the video storage size, video source, video acquisition time, video format, video resolution, etc.
[0061] In addition to extracting resolution directly from video information, the terminal device can also decode the video to extract the resolution from the decoded data to meet the needs of scenarios where the resolution is not included in the video information.
[0062] According to other embodiments of the present disclosure, the video may be any video included in a video App on a terminal device, and the video is stored in a server corresponding to the video App. Specifically, on the video App interface, in response to an operation of opening the video, the video may be decoded to obtain the resolution of the video.
[0063] For decoding, hardware decoding may be used in the embodiments of the present disclosure to obtain a faster decoding speed than a software interface.
[0064] S34. If a target super-resolution model corresponding to the resolution of the video is determined from multiple super-resolution models, super-resolution processing is performed on each video frame of the video using the target super-resolution model.
[0065] After determining the resolution of the video, it can be determined whether the resolution of the video is within the resolution adjustment range. For example, the resolution adjustment range is all resolutions less than 1080P, and the present disclosure does not limit the specific range of the resolution adjustment range.
[0066] If the resolution of the video is within the resolution adjustment range, for example, the resolution is 270P, which is less than 1080P, the terminal device can determine a target super-resolution model corresponding to the resolution of the video from multiple super-resolution models. Specifically, the terminal device can determine a target super-resolution model corresponding to the resolution of the video from multiple super-resolution models according to a mapping relationship between resolution and super-resolution model.
[0067] It should be understood that in the embodiments of the present disclosure, the resolutions within the resolution adjustment range all correspond to pre-trained super-resolution models. In other words, there is a mapping relationship between the resolutions within the resolution adjustment range and the super-resolution model, and this mapping relationship can be pre-configured, for example, as a mapping table between the resolutions and the identifiers of the super-resolution model.
[0068] In addition, the multiple super-resolution models mentioned in the present disclosure can be pre-configured in the terminal device for the algorithm to be called. All or some of the multiple super-resolution models can also be stored in a server or other device other than the terminal device, and when needed, the terminal device can perform the call operation.
[0069] Specifically, a negative correlation between the resolution of the video and the resolution magnification of the super-resolution model can be pre-constructed to obtain a mapping relationship between the resolution and the super-resolution model. In other words, the larger the resolution, the smaller the resolution magnification of the corresponding super-resolution model; the smaller the resolution, the larger the resolution magnification of the corresponding super-resolution model. For example, the resolution magnification of the super-resolution model corresponding to 140P is 4 times, and the resolution magnification of the super-resolution model corresponding to 270P is 2 times.
[0070] In addition, multiple resolution ranges can be determined in advance based on the size of the resolution. That is to say, the resolution is divided into different ranges, for example, from small to large, it can be divided into a first resolution range, a second resolution range, a third resolution range, and the like. Next, a one-to-one correspondence between each resolution range and the super-resolution model is constructed to obtain a mapping relationship between the resolution and the super-resolution model. For example, for 140P and 270P video sources, the resolution magnification of the super-resolution model is 4 times; for 540P video, the resolution magnification of the super-resolution model is 2 times.
[0071] It should be noted that the endpoint values of the resolution range (or the average value, median value, etc., which represent the resolution size of the range compared to other ranges) are negatively correlated with the resolution magnification of the super-resolution model. For example, for the first resolution range, the second resolution range, and the third resolution range divided in order from small to large resolution, the resolution magnifications of the corresponding three super-resolution models decrease in sequence.
[0072] The present disclosure can construct a super-resolution model by means of a machine learning model, and the present disclosure does not limit the specific structure, training process, etc. of the machine learning model. In addition, the algorithm of the super-resolution model can be combined with local operator optimization to further improve the performance of the super-resolution algorithm.
[0073] If a target super-resolution model corresponding to the resolution of the video is determined from multiple super-resolution models based on the above mapping relationship, the terminal device can perform super-resolution processing on each video frame of the video through the target super-resolution model. It can be understood that the super-resolution processing process is a frame-by-frame processing process.
[0074] In addition, the present disclosure does not limit the format of the decoded video frame. For example, the format of the video frame is YUV, UBWC, etc.
[0075] When a video is opened, the video frames processed by super resolution can be played in the order of video frames, so that a high-definition video is presented to the user, improving the user's viewing experience.
[0076] In some embodiments of the present disclosure, when a target video frame is obtained by super-resolution processing on a video frame (any frame) of a video through a target super-resolution model, the terminal device may delete the target video frame after playing the target video frame. Thus, while ensuring that the user can watch high-definition video, the storage pressure of the terminal device will not be increased.
[0077] In addition, when the terminal device obtains the video from the server, after super-resolution processing is performed on each video frame of the video through the super-resolution model, the terminal device can use the video frames after super-resolution processing to obtain the target video, which is the video mentioned in step S32 after the resolution is enhanced.
[0078] Next, the terminal device can upload the target video to the server. In one embodiment, the server can replace the original low-resolution video with the high-resolution target video; in another embodiment, the server can simultaneously save the original low-resolution video and the video with improved resolution obtained after super-resolution.
[0079] To some extent, the terminal device can be regarded as a distributed node for video processing by the server, and the terminal device helps the server to improve the resolution of the video. In this case, the video processing process of the present disclosure can be understood as a processing task assigned by the server. Therefore, after the terminal device uploads the target video to the server, the server can issue a corresponding reward to the terminal device. The present disclosure does not restrict the reward, which can be the account experience value of the video app, various welfare push, etc.
[0080] Regarding the result of the video resolution determined in step S32, if there is no corresponding super-resolution model, it usually means that the resolution of the video is already a relatively high resolution. In this case, the super-resolution processing process in step S34 may not be performed.
[0081] By using the video processing method disclosed in the present invention, for example, for a 140P video, a 4-fold super-resolution model can be called to obtain a 540P video; for a 270P video, a 2-fold super-resolution model can be called to obtain a 1080P video. At least compared to the original video, the clarity after adjustment is improved.
[0082] In this way, it can be ensured that users can have a better viewing experience when watching certain ultra-low resolution videos. For non-ultra-low resolution videos, due to the use of a lower (for example, 2x) multiple solution, it can ensure the user's viewing experience while not causing any lag during viewing.
[0083] Figure 4 FIG. 1 is a flowchart of an algorithm for implementing a video processing process according to an embodiment of the present disclosure. Figure 4 In step S42, the terminal device can decode the video source to obtain the resolution of the video source and each video frame; in step S44, if there is a super-resolution model corresponding to the resolution, the super-resolution model is used to perform super-resolution processing on each video frame, referring to Figure 5 , the input video frame enters the super-resolution module to obtain the output video frame; in step S46, the terminal device renders the video frame after super-resolution processing; in step S48, the terminal device can display the rendered video frame.
[0084] The following will refer to Figure 6 The video processing process of one embodiment of the present disclosure is described.
[0085] In step S602, the user may open the video App.
[0086] In step S604, the terminal device may respond to the user's opening operation on a video and identify the resolution of the video, specifically, by decoding the video to obtain the resolution.
[0087] In step S606, the terminal device can determine whether the resolution of the video needs to be adjusted. If the resolution of the video is already high (outside the resolution adjustment range), that is, no adjustment is required, then return to step S604; if the resolution of the video needs to be adjusted (within the resolution adjustment range), then execute step S608.
[0088] In step S608, the terminal device may call a super-resolution model corresponding to the resolution.
[0089] In step S610, the terminal device may perform super-resolution processing on each video frame of the video using the super-resolution model.
[0090] In step S612, the terminal device may display the video frames after super-resolution processing in the order in which the video frames are processed (ie, the order corresponding to the video frames in the original video).
[0091] It should be noted that although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0092] Furthermore, this example implementation also provides a video processing device.
[0093] Figure 7 FIG. 1 schematically shows a block diagram of a video processing device according to an exemplary embodiment of the present disclosure. Figure 7 According to an exemplary embodiment of the present disclosure, the video processing device 7 may include a resolution determination module 71 and a super-resolution processing module 73 .
[0094] Specifically, the resolution determination module 71 can be used to determine the resolution of the video; the super-resolution processing module 73 is used to perform super-resolution processing on each video frame of the video through the target super-resolution model if a target super-resolution model corresponding to the resolution of the video is determined from multiple super-resolution models.
[0095] According to an exemplary embodiment of the present disclosure, the resolution determination module 71 may be configured to perform: in response to an opening operation of a video, decoding the video to obtain a resolution of the video.
[0096] According to an exemplary embodiment of the present disclosure, referring to Figure 8 Compared with the video processing device 7 , the video processing device 8 may further include a video frame playing module 81 .
[0097] Specifically, the video frame playing module 81 may be configured to execute: playing the video frames after super-resolution processing in the order of the video frames.
[0098] According to an exemplary embodiment of the present disclosure, the video frame playback module 81 may also be configured to execute: when a target video frame is obtained by super-resolution processing on a video frame of a video through a target super-resolution model, after playing the target video frame, the target video frame is deleted.
[0099] According to an exemplary embodiment of the present disclosure, referring to Fig. 9 Compared with the video processing device 7 , the video processing device 9 may further include an interaction module 91 .
[0100] Specifically, the interaction module 91 can be configured to execute: obtaining a video from a server; after super-resolution processing of each video frame of the video through a target super-resolution model, obtaining a target video using the video frames processed by super-resolution; uploading the target video to the server so that the server replaces the video with the target video.
[0101] According to an exemplary embodiment of the present disclosure, the interaction module 91 may also be configured to execute: after uploading the target video to the server, receiving a reward issued by the server.
[0102] According to an exemplary embodiment of the present disclosure, the super-resolution processing module 73 can also be configured to perform: after determining the resolution of the video, determine whether the resolution of the video is within the resolution adjustment range; if the resolution of the video is within the resolution adjustment range, determine the target super-resolution model from multiple super-resolution models.
[0103] According to an exemplary embodiment of the present disclosure, the process of the super-resolution processing module 73 determining a target super-resolution model from multiple super-resolution models can be configured to execute: determining a target super-resolution model from multiple super-resolution models based on a mapping relationship between resolution and super-resolution model.
[0104] According to an exemplary embodiment of the present disclosure, referring to Fig.10 Compared with the video processing device 7 , the video processing device 10 may further include a mapping construction module 101 .
[0105] Specifically, the mapping construction module 101 can be configured to perform: determining multiple resolution ranges in advance based on the size of the resolution; constructing a one-to-one correspondence between each resolution range and the super-resolution model to obtain a mapping relationship; wherein the endpoint value size of the resolution range is negatively correlated with the resolution magnification factor of the super-resolution model.
[0106] According to an exemplary embodiment of the present disclosure, the mapping construction module 101 may also be configured to execute: pre-constructing a negative correlation between the resolution size and the resolution magnification factor of the super-resolution model to obtain a mapping relationship.
[0107] Since the functional modules of the video processing device in the embodiment of the present disclosure are the same as those in the above method embodiment, they will not be described in detail here.
[0108] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0109] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0110] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0111] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing what is disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and embodiments are to be considered merely as exemplary, and the true scope and spirit of the present disclosure are indicated by the claims.
[0112] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A video processing method, characterized in that: include: Obtain a video from a server and determine a resolution of the video; If a target super-resolution model corresponding to the resolution of the video is determined from multiple super-resolution models according to the mapping relationship between the resolution and the super-resolution model, super-resolution processing is performed on each video frame of the video by using the target super-resolution model, and a target video is obtained by using the video frames after the super-resolution processing; Uploading the target video to the server so as to receive a reward issued by the server; The video processing method further includes: Determine multiple resolution ranges in advance according to the resolution; establish a one-to-one correspondence between each resolution range and the super-resolution model to obtain the mapping relationship; wherein the endpoint value of the resolution range is negatively correlated with the resolution magnification of the super-resolution model; or A negative correlation between the resolution size and the resolution magnification of the super-resolution model is pre-constructed to obtain the mapping relationship.
2. The video processing method according to claim 1, characterized in that: Determining the resolution of a video involves: In response to the opening operation of the video, the video is decoded to obtain the resolution of the video.
3. The video processing method according to claim 2, characterized in that: The video processing method further includes: Play the super-resolution processed video frames in video frame order.
4. The video processing method according to claim 3, characterized in that: The video processing method further includes: In the case where a target video frame is obtained by performing super-resolution processing on a video frame of the video through the target super-resolution model, the target video frame is deleted after the target video frame is played.
5. The video processing method according to claim 1, characterized in that: The video processing method further includes: After determining the resolution of the video, determining whether the resolution of the video is within a resolution adjustment range; If the resolution of the video is within the resolution adjustment range, the target super-resolution model is determined from the multiple super-resolution models.
6. A video processing device, characterized in that: include: A resolution determination module, used to determine the resolution of the video; a super-resolution processing module, configured to, if a target super-resolution model corresponding to the resolution of the video is determined from a plurality of super-resolution models according to a mapping relationship between resolutions and super-resolution models, perform super-resolution processing on each video frame of the video through the target super-resolution model; An interactive module, configured to obtain the video from the server, perform super-resolution processing on each video frame of the video using the target super-resolution model, obtain a target video using the video frames after super-resolution processing, and upload the target video to the server so as to receive a reward issued by the server; A mapping construction module is used to determine multiple resolution ranges in advance based on the size of the resolution; construct a one-to-one correspondence between each resolution range and a super-resolution model to obtain the mapping relationship; wherein the endpoint value size of the resolution range is negatively correlated with the resolution magnification factor of the super-resolution model; or pre-construct a negative correlation between the size of the resolution and the resolution magnification factor of the super-resolution model to obtain the mapping relationship.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the video processing method according to any one of claims 1 to 5 is implemented.
8. An electronic device, characterized in that: include: processor; A memory, used to store one or more programs, when the one or more programs are executed by the processor, enables the processor to implement the video processing method according to any one of claims 1 to 5.
