Video processing method, device and equipment
The video frame set is processed through the target model to generate video frame sets of different resolutions, which solves the problem of high computational cost in the existing technology and achieves resource saving and video quality improvement.
Patent Information
- Application Number
- CN202110112334.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-27
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2041-01-27
AI Technical Summary
Existing video processing technology has high computational costs when transcoding source videos, resulting in waste of resources and poor video quality.
By processing the video frame set to be processed based on the target model, a first video frame set and at least one second video frame set are generated. The resolution of the first video frame set is the first resolution, and the resolution of the second video frame set is The second resolution is smaller than and different from the first resolution. The target model is used to enhance image quality and reduce the amount of data, and realize multiplexing of video frame sets to reduce computing costs.
It effectively reduces computing costs, saves computing resources, improves video quality, and avoids video quality loss caused by downsampling.
Smart Images

Figure CN114827666B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a video processing method, device and equipment. Background Art
[0002] With the continuous development of Internet technology, more and more video playback platforms have emerged. In order to provide users with videos of different picture qualities, video playback platforms usually need to transcode the source video to generate multiple videos with different resolutions and different bit rates.
[0003] Typically, during the process of transcoding a source video, the source video is downsampled to obtain multiple videos of different resolutions, and then a pre-trained model is used to process the frame images of the source video and the multiple videos obtained by downsampling, respectively, so as to enhance the image quality while reducing the video bit rate. This technology is called narrowband high definition.
[0004] However, the above processing method has the problem of high computational cost. Summary of the invention
[0005] The embodiments of the present application provide a video processing method, apparatus and device to solve the problem of high computing cost in the prior art.
[0006] In a first aspect, an embodiment of the present application provides a video processing method, including:
[0007] Acquire a set of videos to be processed, where the resolution of the set of videos to be processed is a first resolution;
[0008] The set of video frames to be processed is processed based on a target model to obtain a first set of video frames and at least one second set of video frames; the resolution of the first set of video frames is the first resolution, the resolution of the second set of video frames is the second resolution, the second resolution is smaller than the first resolution and the resolutions of different second sets of video frames are different; the target model is used to enhance the image quality of the input image and reduce the amount of data.
[0009] In a second aspect, an embodiment of the present application provides a video processing method, including:
[0010] Obtaining a video frame to be played, wherein the video frame to be played is obtained by processing a set of video frames to be processed having a first resolution in the following manner: processing the set of video frames to be processed based on a target model to obtain a first set of video frames and at least one second set of video frames; the resolution of the first set of video frames is the first resolution, the resolution of the second set of video frames is a second resolution, the second resolution is smaller than the first resolution and the resolutions of different second sets of video frames are different; the target model is used to enhance the image quality of the input image and reduce the amount of data;
[0011] Play the video frame to be played.
[0012] In a third aspect, an embodiment of the present application provides a video processing device, including:
[0013] An acquisition module, used for acquiring a set of video frames to be processed, wherein the resolution of the set of video frames to be processed is a first resolution;
[0014] A processing module is used to process the set of video frames to be processed based on a target model to obtain a first set of video frames and at least one second set of video frames; the resolution of the first set of video frames is the first resolution, the resolution of the second set of video frames is the second resolution, the second resolution is smaller than the first resolution and the resolutions of different second sets of video frames are different; the target model is used to enhance the image quality of the input image and reduce the amount of data.
[0015] In a fourth aspect, an embodiment of the present application provides a video processing device, including:
[0016] An acquisition module is used to acquire a video frame to be played, wherein the video frame to be played is obtained by processing a set of video frames to be processed having a first resolution in the following manner: the set of video frames to be processed is processed based on a target model to obtain a first set of video frames and at least one second set of video frames; the resolution of the first set of video frames is the first resolution, the resolution of the second set of video frames is a second resolution, the second resolution is smaller than the first resolution and the resolutions of different second sets of video frames are different; the target model is used to enhance the image quality of the input image and reduce the amount of data;
[0017] The playing module is used to play the video frame to be played.
[0018] In a fifth aspect, an embodiment of the present application provides a server, comprising: a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the method described in any one of the first aspects.
[0019] In a sixth aspect, an embodiment of the present application provides a terminal, comprising: a memory, a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the method as described in any one of the second aspects.
[0020] In a seventh aspect, an embodiment of the present application provides a computer program product, comprising computer instructions, wherein when the computer instructions are executed by a processor, the steps of any method described in the first aspect are implemented.
[0021] In an eighth aspect, an embodiment of the present application provides a computer program product, comprising computer instructions, wherein the computer instructions, when executed by a processor, implement the steps of any method described in the second aspect.
[0022] An embodiment of the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes at least one section of code, and the at least one section of code can be executed by a computer to control the computer to execute the method as described in any one of the first aspects.
[0023] An embodiment of the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes at least one section of code, and the at least one section of code can be executed by a computer to control the computer to execute a method as described in any one of the second aspects.
[0024] The video processing method, apparatus and device provided in the embodiments of the present application processes a set of video frames to be processed based on a target model to obtain a first video frame set and at least one second video frame set, wherein the resolution of the first video frame set is a first resolution, the resolution of the second video frame set is a second resolution, the second resolution is smaller than the first resolution and the resolutions of different second video frame sets are different, and the target model is used to enhance the image quality of the input image and reduce the amount of data, so that the generation of the video frame set of the second resolution can reuse the front part calculation performed by the target model on the set of video frames to be processed of the first resolution, thereby reducing the computing cost and saving computing resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0026] Figure 1A schematic diagram of an application scenario of an embodiment of the present application;
[0027] Figure 2A is a schematic diagram of a video processing method in traditional technology;
[0028] Figure 2B is a schematic diagram of another video processing method in the traditional technology;
[0029] Figure 3 A schematic diagram of a video processing method according to an embodiment of the present invention;
[0030] Figure 4 A schematic diagram of the structure of a target model provided in one embodiment of the present application;
[0031] Figure 5 A schematic diagram of processing a video frame set based on a target model provided in an embodiment of the present application;
[0032] Figure 6 A schematic diagram of processing a set of video frames based on a target model provided by another embodiment of the present application;
[0033] Figure 7 A schematic diagram of processing a video frame set based on a target model provided by another embodiment of the present application;
[0034] Figure 8 A schematic diagram of processing a video frame set based on a target model provided by another embodiment of the present application;
[0035] Fig.9A A schematic diagram of a comparison of computing costs provided in an embodiment of the present application;
[0036] Fig. 9B A schematic diagram of video quality comparison provided in an embodiment of the present application;
[0037] Fig.10 A schematic diagram of a flow chart of a video processing method provided by another embodiment of the present application;
[0038] Fig.11 A schematic diagram of the structure of a video processing device provided in one embodiment of the present application;
[0039] Fig.12 A schematic diagram of the structure of a server provided in an embodiment of the present application;
[0040] Fig.13 A schematic diagram of the structure of a video processing device provided by another embodiment of the present application;
[0041] Fig.14 A schematic diagram of the structure of a terminal provided in one embodiment of the present application. DETAILED DESCRIPTION
[0042] 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.
[0043] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms of "a", "said", and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings, and "multiple" generally includes at least two, but does not exclude the inclusion of at least one.
[0044] It should be understood that the term "and / or" used in this article is only 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. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0045] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0046] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a product or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such a product or system. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the product or system including the elements.
[0047] In addition, the step sequence in the following method embodiments is only an example and not a strict limitation.
[0048] In order to facilitate those skilled in the art to understand the technical solution provided by the embodiments of the present application, the technical environment in which the technical solution is implemented is described below.
[0049] In the process of transcoding a source video in the related art, it is necessary to downsample the source video to obtain multiple videos of different resolutions, and use a certain model (hereinafter referred to as model X) to process them respectively to enhance the image quality while reducing the video bit rate. The method of processing multiple videos using model X separately has a high computational cost. Therefore, a video processing method that can reduce the computational cost is urgently needed in the related art.
[0050] Based on actual technical requirements similar to those described above, the video processing method provided in this application can use technical means to reduce the computational cost of video processing.
[0051] The video processing methods provided by various embodiments of the present application are described in detail below through an exemplary application scenario.
[0052] like Figure 1 As shown, the application scenario may include a terminal 11 and a server 12. The terminal 11 may encode a certain video (hereinafter referred to as a source video for the sake of distinction) according to the input of the video uploader, and send the encoded data obtained by encoding to the server 12. The terminal 11 may be, for example, a user device capable of uploading video data, such as a mobile phone, a tablet computer, a laptop computer, a desktop computer, a wearable device, etc. The server 12 may be, for example, a data processing server such as a cloud server and a distributed server.
[0053] After receiving the coded data of the source video, the server 12 can decode the coded data to obtain the source video. After obtaining the source video, the server 12 can process the source video to enhance the image quality and reduce the data volume to obtain multiple videos with different resolutions (hereinafter referred to as processed videos for the sake of distinction), wherein the resolution of the source video can be, for example, 1080P, and after processing the source video, multiple processed videos with resolutions of, for example, 1080P, 720P, 540P, and 360P can be obtained. After obtaining multiple processed videos of the source video with different resolutions, the server 12 can encode the processed videos with different resolutions respectively to obtain corresponding encoded data. For example, the server 12 can obtain encoded data of a processed video with a resolution of 1080P of the source video (hereinafter referred to as 1080P processed video), encoded data of a processed video with a resolution of 720P (hereinafter referred to as 720P processed video), encoded data of a processed video with a resolution of 540P (hereinafter referred to as 540P processed video), and encoded data of a processed video with a resolution of 360P (hereinafter referred to as 360P processed video).
[0054] It should be noted that the server 12 first performs decoding processing on the source data, then performs processing to enhance the image quality and reduce the data volume, and finally performs encoding processing, which can be understood as the server 12 performing transcoding processing on the source data.
[0055] like Figure 1 As shown, the application scenario may also include terminals 13 used by video viewers who watch the source video, such as terminal 13A, terminal 13B, and terminal 13C. The server 12 may determine that the terminal 13 needs to download a processed video of a certain resolution of the source video according to the playback mode used by the terminal 13 to play the video, and send the encoded data of the processed video of the resolution to the terminal 13.
[0056] Assuming that the playback modes include ultra-high definition, high definition, standard definition and ultra-speed, ultra-high definition corresponds to 1080P, high definition corresponds to 720P, standard definition corresponds to 540P, and ultra-speed corresponds to 360P, and the playback mode of terminal 13A is ultra-high definition, the playback mode of terminal 13B is high definition, and the playback mode of terminal 13C is standard definition, then the server 12 can send the encoded data of the 1080P processed video to terminal 13A, send the encoded data of the 720P processed video to terminal 13B, and send the encoded data of the 540P processed video to terminal 13C.
[0057] In the conventional technology, the server 12 is used as follows Figure 2A or Figure 2B The method shown is used to enhance the image quality of the source video and reduce the data volume. Figure 2A and Figure 2B It is taken as an example that the resolution of the source video is 1080P and multiple processed videos with resolutions of 1080P, 720P, 540P and 360P need to be obtained.
[0058] refer to Figure 2A First, the source video is processed using model X to enhance the image quality and reduce the data volume to obtain a processed video with a resolution of 1080P. Then, the 1080P processed video is downsampled to obtain a 720P processed video, a 540P processed video, and a 360P processed video. Thus, multiple processed videos with resolutions of 1080P, 720P, 540P, and 360P are obtained. Figure 2A The processing shown in the figure enhances the image quality and reduces the data volume and then downsamples. Since the 720P processed video, the 540P processed video and the 360P processed video are all obtained by downsampling the 1080P processed video, there is a problem of poor video quality and poor user subjective experience.
[0059] refer to Figure 2BFirst, the source video is downsampled to obtain videos with resolutions of 720P, 540P, and 360P, respectively. Then, the source video with a resolution of 1080P is processed using model X to enhance the image quality and reduce the data volume to obtain a processed video with a resolution of 1080P; the video with a resolution of 720P is processed using model X to enhance the image quality and reduce the data volume to obtain a processed video with a resolution of 720P; the video with a resolution of 540P is processed using model X to enhance the image quality and reduce the data volume to obtain a processed video with a resolution of 540P; the video with a resolution of 360P is processed using model X to enhance the image quality and reduce the data volume to obtain a processed video with a resolution of 360P. Thus, multiple processed videos with resolutions of 1080P, 720P, 540P, and 360P are obtained. Figure 2B As shown, downsampling is performed first and then the image quality is enhanced and the amount of data is reduced. Since videos with resolutions of 1080P, 720P, 540P and 360P all need to be processed using model X, there is a problem of high computational cost.
[0060] It should be noted that Figure 1 In the example, the server 12 processes the video uploaded by the video uploader. It can be understood that in other embodiments, the server 12 can also obtain the video to be processed in other ways.
[0061] It should be noted that Figure 1 In the example, the server 12 encodes the processed video and sends the encoded data to the terminal. It can be understood that in other embodiments, other servers other than the server 12 can also encode the processed video and send the encoded data to the terminal.
[0062] The method provided in the embodiments of the present application can be applied to various application scenarios such as live video, video on demand, video restoration, real-time audio and video, and media processing.
[0063] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0064] Figure 3 This is a flow chart of a video processing method provided by an embodiment of the present application. The execution subject of this embodiment may be Figure 1 Server 12 in. Figure 3 As shown, the method of this embodiment may include:
[0065] Step 31, obtaining a set of video frames to be processed, wherein the resolution of the set of video frames to be processed is a first resolution;
[0066] Step 32, processing the set of video frames to be processed based on the target model to obtain a first video frame set and at least one second video frame set; the resolution of the first video frame set is the first resolution, the resolution of the second video frame set is the second resolution, the second resolution is smaller than the first resolution and the resolutions of different second video frame sets are different; the target model is used to enhance the image quality of the input image and reduce the amount of data.
[0067] In the embodiment of the present application, the set of video frames to be processed may include a single video frame or multiple video frames. The single video frame or multiple video frames may be understood as a video that needs to be processed to enhance image quality and reduce data volume (e.g. Figure 1 The set of to-be-processed video frames may be obtained from a terminal, or from another server, etc. The resolution of each video frame in the set of to-be-processed video frames is the first resolution.
[0068] In an embodiment of the present application, after obtaining a set of video frames to be processed, the set of video frames to be processed can be processed based on a target model. The input and output of the target model are both images, and the target model is used to process the input image to enhance the image quality and reduce the amount of data. An input image is input to the target model for processing, and the target model can output at least two output images, one of the at least two output images has the same resolution as the input image, and the resolution of at least one of the at least two output images is less than the resolution of the input image, and the resolutions of the at least one output image are different.
[0069] In one embodiment, the target model may be a convolutional neural network model. Taking the number of the second video frame set as 1, and the resolution of the second video frame set as 1 / 2 of the resolution of the to-be-processed video frame set as an example, the structure of the target model may be as follows: Figure 4 Reference Figure 4 , the target model can include 5 convolutional layers and 1 deconvolutional layer, the stride of the first convolutional layer and the deconvolutional layer can be 2, and the stride of the remaining convolutional layers can be 1. The input image can be H×W×N, where H represents the height of the input image, W represents the width of the input image, and N represents the number of channels of the input image. It should be noted that Figure 4 The model structure shown is for example only.
[0070] In one embodiment, the video frames in the set of video frames to be processed may be used as the input of the target model. For example, assuming that the video frames in the set of video frames to be processed include three-channel YUV images, then when the set of video frames to be processed is used as Figure 4When the target model is input, Figure 4 N in can be equal to 3. Specifically, after the to-be-processed video frame set is processed by the target model, a video frame set (i.e., a first video frame set) having the same resolution as the to-be-processed video frame set (i.e., a first resolution) and at least one video frame set (i.e., at least one second video frame set) having a resolution less than the first resolution can be obtained, and the resolutions of different second video frame sets are different. It should be noted that the resolution of each video frame in the first video frame set is the first resolution, and the resolution of each video frame in the same second video frame set is the same second resolution.
[0071] In another embodiment, the channel images of one or more channels of the video frames in the set of video frames to be processed can be used as the input of the target model to reduce the amount of calculation of the target model for a single video frame in the set of video frames to be processed, thereby reducing the calculation cost required for processing a single video frame, which is conducive to further saving calculation resources. Figure 4 When the target model is input, Figure 4 The N in can be equal to 1.
[0072] Exemplarily, considering that the human eye is more sensitive to Y in the YUV color space, when the video frames in the to-be-processed video frame set are three-channel YUV images, the Y channel images of the video frames in the to-be-processed video frame set can be used as the input of the target model. It should be noted that when the color space of the video frames in the to-be-processed video frame set is non-YUV, the to-be-processed video frame set can be first converted into a color space. Specifically, after the Y channel images of the video frames in the to-be-processed video frame set are processed by the target model, a first Y channel image set having a resolution equal to the first resolution and at least one second Y channel image set having a resolution less than the first resolution can be obtained, and the resolutions of different second Y channel image sets are different. Furthermore, based on the first Y channel image set, a first video frame set having a resolution of the first resolution can be obtained, and based on at least one second Y channel image set, at least one second video frame set having a resolution less than the first resolution can be obtained. It should be noted that the resolution of each Y-channel image in the first Y-channel image set is the first resolution, the resolution of the second Y-channel image set is the second resolution, the resolutions of different second Y-channel image sets are different, and the resolutions of each Y-channel image in the same second Y-channel image set are the same second resolution.
[0073] In an embodiment of the present application, the target model can be trained using a sample image sequence. The sample image sequence can be obtained based on a sample video. In one embodiment, the sample image sequence can be a video frame sequence of the sample video. In another embodiment, the sample image sequence can be a Y channel image sequence of a video frame in the sample video.
[0074] The target model can be trained in the following manner: 1) constructing a target model, in which training parameters are set; 2) inputting sample images in a sample image sequence into the target model in sequence for processing to generate processing results; 3) determining the video quality corresponding to the processing results, and based on the difference between the video quality and the expected quality, iteratively adjusting the training parameters until the difference meets the preset requirements.
[0075] It can be understood that when the sample image is a video frame of a sample video, the processing result of the target model for one sample image includes at least two video frames, and when the sample image is a Y channel image in a video frame of a sample video, the processing result of the target model for one sample image includes at least two Y channel images. The video quality of the processing result can be obtained, for example, by using Visual Multimethod Assessment Fusion (VMAF).
[0076] When the video frames in the set of video frames to be processed are used as the input of the target model, processing the set of video frames to be processed based on the target model to obtain a first set of video frames and at least one second set of video frames may specifically include: inputting the set of video frames to be processed into the target model for processing to obtain a first set of video frames and at least one second set of video frames.
[0077] For example, Figure 5 As shown, the video frames in the to-be-processed video set are respectively input into the target model for processing, and the first video frame in the first video frame set and the second video frame in the second video frame set can be obtained. Specifically, the to-be-processed video frame n-1 in the to-be-processed video frame set is input into the target model for processing, and the first video frame n-1 in the first video frame set and the second video frame n-1 in the second video frame set can be obtained; the to-be-processed video frame n in the to-be-processed video frame set is input into the target model for processing, and the first video frame n in the first video frame set and the second video frame n in the second video frame set can be obtained; the to-be-processed video frame n+1 in the to-be-processed video frame set is input into the target model for processing, and the first video frame n+1 in the first video frame set and the second video frame n+1 in the second video frame set can be obtained; ….
[0078] It should be noted that Figure 5 The example in which the number of the second video frame set is 1 is taken.
[0079] It should be noted that, in an embodiment of the present application, after processing the video frame set to be processed based on the target model, the obtained first video frame set is a set of video frames in the processed video whose resolution is equal to the resolution of the video to be processed, and the obtained at least one second video frame set is a set of video frames in at least one processed video whose resolution is smaller than the resolution of the video to be processed.
[0080] When the Y channel image of the video frame in the to-be-processed video frame set is used as the input of the target model, the processing of the to-be-processed video frame set based on the target model to obtain the first video frame set and at least one second video frame set can specifically include: inputting the Y channel image set of the to-be-processed video frame set into the target model for processing to obtain the first Y channel image set and at least one second Y channel image set; performing YUV splicing on the first Y channel image set and the UV channel image set of the to-be-processed video frame set to obtain the first video frame set; and, according to the second resolution, downsampling the UV channel image set of the to-be-processed video frame set to obtain at least one UV channel image set, and correspondingly splicing the at least one second Y channel image set and at least one UV channel image set to obtain at least one second video frame set. The algorithm for downsampling the image can be, for example, bicubic interpolation.
[0081] For example, Figure 6 As shown, first, the Y channel image set of the video frame set to be processed can be input into the target model for processing, so as to obtain the first Y channel image set and the second Y channel image set. Specifically, the Y channel image n-1 in the Y channel image set is input into the target model for processing, so as to obtain the first Y channel image n-1 in the first Y channel image set and the second Y channel image n-1 in the second Y channel image; the Y channel image n in the Y channel image set is input into the target model for processing, so as to obtain the first Y channel image n in the first Y channel image set and the second Y channel image n in the second Y channel image; the Y channel image n+1 in the Y channel image set is input into the target model for processing, so as to obtain the first Y channel image n+1 in the first Y channel image set and the second Y channel image n+1 in the second Y channel image; ...
[0082] Afterwards, the first Y channel image set and the UV channel image set of the video frame set to be processed may be spliced to obtain a first video frame set, and the UV channel image set obtained by downsampling the UV channel image set and the second Y channel image set may be spliced to obtain a second video frame set. Specifically, the first Y channel image n-1 in the first Y channel image set may be spliced with the UV channel image n-1 in the UV channel image set to obtain the first video frame n-1 in the first video set, and the second UV channel image n-1 in the UV channel image set obtained by downsampling may be spliced with the second Y channel image n-1 in the second Y channel image set to obtain the second video frame n-1 in the second video frame set; the first Y channel image n in the first Y channel image set may be spliced with the UV channel image n in the UV channel image set to obtain the first video frame n in the first video frame set, and the downsampling may be performed on the first Y channel image n. The second UV channel image n in the sampled UV channel image set and the second Y channel image n in the second Y channel image set are spliced to obtain the second video frame n in the second video frame set; the first Y channel image n+1 in the first Y channel image set can be spliced with the UV channel image n+1 in the UV channel image set to obtain the first video frame n+1 in the first video frame set, and the second UV channel image n+1 in the downsampled UV channel image set and the second Y channel image n+1 in the second Y channel image set are spliced to obtain the second video frame n+1 in the second video frame set; …
[0083] It should be noted that Figure 6 The Y channel image n-1 in the Y channel image set is the Y channel image of the video frame n-1 to be processed in the video frame set to be processed, the Y channel image n in the Y channel image set is the Y channel image of the video frame n to be processed in the video frame set to be processed, and the Y channel image n+1 in the Y channel image set is the Y channel image of the video frame n+1 to be processed in the video frame set to be processed. Figure 6 UV channel image n-1 in the UV channel image set is the UV channel image of the video frame n-1 to be processed in the video frame set to be processed, UV channel image n in the UV channel image set is the UV channel image of the video frame n to be processed in the video frame set to be processed, and UV channel image n+1 in the UV channel image set is the UV channel image of the video frame n+1 to be processed in the video frame set to be processed.
[0084] It should be noted that Figure 6 The example in which the number of the second video frame set is 1 is taken.
[0085] In an embodiment of the present application, the number of the second video frame sets may be less than or equal to the target number, and the target number is the number of resolution types that need to be provided that are smaller than the first resolution. Taking the case where the resolutions that need to be provided include 1080P, 720P, 540P and 360P, and the first resolution is 1080P as an example, the target number is three, namely 720P, 540P and 360P, and the number of the second video frame sets may be one, two or three. By having the number of the second video frame sets equal to the target number, it is possible to obtain any resolution video that needs to be provided that is smaller than the first resolution without downsampling, thereby avoiding the loss of video quality due to downsampling. By having the number of the second video frame sets less than the target number, the number of output channels of the target model can be reduced, which is conducive to simplifying the model structure of the target model.
[0086] For example, the first resolution is 1080P, the number of the second video frame sets is 3, and the second resolutions of the three second video frame sets are 720P, 540P and 360P respectively. Figure 7 As shown, the video set to be processed with a resolution of 1080P can be input into the target model for processing, and a video frame set with a resolution of 1080P, a video frame set with a resolution of 720P, a video frame set with a resolution of 540P, and a video frame set with a resolution of 360P can be obtained. Figure 7 In the example, the video frames in the set of video frames to be processed are directly input into the target model for processing.
[0087] By comparison Figure 7 and Figure 2B It can be seen that Figure 2B As shown, the videos with resolutions of 1080P, 720P, 540P and 360P all need to be processed using model X to obtain 1080P processed video, 720P processed video, 540P processed video and 360P processed video. In the embodiment of the present application, by using the target model to process the to-be-processed video frame set with a resolution of 1080P, a first video frame set of 1080P, a second video frame set of 720P, a second video frame set of 540P and a second video frame set of 360P can be obtained, so that the generation of the 720P processed video, the 540P processed video and the 360P processed video can reuse the front part calculation (for example, Figure 4 The convolution calculation of the first four convolutional layers in the network is reduced, thereby reducing the computational cost and saving computing resources.
[0088] In addition, since 1080P videos have richer features than 720P videos, 540P videos, and 360P videos obtained by downsampling 1080P videos, the generation of 720P processed videos, 540P processed videos, and 360P processed videos reuses the previous calculations performed by the target model on 1080P videos. Figure 2B The method shown can also improve the video quality of the generated 720P processed video, 540P processed video and 360P processed video.
[0089] When the number of the second video frame sets is less than the target number, the method provided in the embodiment of the present application may further include: downsampling the video frame sets with a resolution of the first target resolution in the first video frame set and the at least one second video frame set to obtain at least one third video frame set, wherein the resolution of the third video frame set is a third resolution, the third resolution is less than the first target resolution and the resolutions of different third video frame sets are different, so that other resolutions that need to be provided can be obtained.
[0090] Optionally, the first target resolution may include a resolution between the first resolution and the second resolution that is greater than the third resolution and closest to the third resolution, so as to obtain a video with a lower resolution by downsampling the video frame with the closest resolution, thereby minimizing the impact of downsampling on video quality.
[0091] For example, the first resolution is 1080P, the number of the second video frame set is 1, and the second resolution of the second video frame set is 540P. Figure 8 As shown, the videos to be processed with a resolution of 1080P can be input into the target model for processing, and a video frame set with a resolution of 1080P and a video frame set with a resolution of 540P can be obtained. Further, downsampling the video frame set with a resolution of 1080P can obtain a video frame set with a resolution of 720P, and downsampling the video frame set with a resolution of 540P can obtain a video frame set with a resolution of 360P. It should be noted that Figure 8 In the example, the video frames in the set of video frames to be processed are directly input into the target model for processing.
[0092] By comparison Figure 8 and Figure 2B It can be seen that Figure 2BAs shown in the figure, the videos with resolutions of 1080P, 720P, 540P and 360P all need to be processed using model X to obtain 1080P processed video, 720P processed video, 540P processed video and 360P processed video. In the embodiment of the present application, by using the target model to process the set of to-be-processed video frames with a resolution of 1080P, a first set of video frames of 1080P and a second set of video frames of 540P can be obtained, so that the generation of the 540P processed video can reuse the previous part of the calculation performed by the target model on the 1080P video (for example, Figure 4 The convolution calculation of the first four convolutional layers in the network is reduced, thereby reducing the computational cost and saving computing resources.
[0093] In addition, since the 540P video obtained by downsampling the 1080P video has richer features than the 1080P video, the generation of the 540P processed video reuses the previous calculation of the target model on the 1080P video, so compared with Figure 2B The method shown can also improve the video quality of the generated 540P processed video. In addition, since the 360P video is obtained by downsampling the 540P processed video generated based on the target model, the generation of the 360P processed video also reuses the previous part of the calculation performed by the target model on the 1080P video, and the video quality loss of 540P to 360P downsampling is small, so compared with Figure 2B The method shown also improves the video quality of the generated 360P processed video.
[0094] Figure 2A The method shown is to first enhance the image quality and reduce the amount of data before downsampling 1. Figure 2B Method 2 of downsampling first and then enhancing the image quality and reducing the amount of data, and Figure 8 The generation of the 540P processed video shown in FIG3 uses the method 3 of the previous calculation of the 1080P video by the multiplexing target model. The comparison of the calculation costs of the three can be shown as follows: Fig.9A As shown, the comparison of the three video qualities can be as follows Fig. 9B shown.
[0095] like Fig.9A As shown, Figure 8 The computational cost of the method 3 shown is higher than that of the method 1 of first enhancing the image quality and reducing the data amount and then downsampling, but lower than that of the method 2 of first downsampling and then enhancing the image quality and reducing the data amount.
[0096] like Fig. 9B As shown, Figure 8The video quality of the 540P and 360P processed videos obtained by the method 3 shown is not only higher than the method 1 of first enhancing the image quality and reducing the data amount and then downsampling, but also higher than the method 2 of first downsampling and then enhancing the image quality and reducing the data amount.
[0097] In the embodiment of the present application, after obtaining the first video frame set and the at least one second video frame set, the method may further include: encoding the first video frame set to obtain a first coded data set; and encoding the at least one second video frame set respectively to obtain at least one second coded data set. Thus, it is possible to respectively encode the obtained multiple processed videos with different resolutions.
[0098] In the embodiment of the present application, after obtaining the coded data, the method may further include: storing the first coded data set in a corresponding first video file; and storing the at least one second coded data set in a corresponding at least one second video file, so that the coded data of multiple processed videos with different resolutions can be stored separately.
[0099] In the embodiment of the present application, after obtaining the coded data, the method may further include: determining that the terminal needs to download the video resource corresponding to the to-be-processed video frame set of the second target resolution; and sending at least part of the coded data with the resolution of the second target resolution in the first coded data set and the at least one second coded data set to the terminal, so that the terminal can obtain the video coded data of the corresponding resolution from the server 12.
[0100] Exemplarily, resolution indication information sent by a terminal can be received, and based on the resolution indication information, it can be determined that the terminal needs to download video resources corresponding to the set of processed video frames with a second target resolution. The resolution indication information can be, for example, playback mode information. Of course, in other embodiments, the resolution used by the terminal to download the video can also be determined by other means, and this application does not limit this.
[0101] The video processing method provided in the embodiment of the present application processes a set of video frames to be processed based on a target model to obtain a first video frame set and at least one second video frame set, wherein the resolution of the first video frame set is a first resolution, and the resolution of the second video frame set is a second resolution, the second resolution is smaller than the first resolution and the resolutions of different second video frame sets are different, and the target model is used to enhance the image quality of the input image and reduce the amount of data, so that the generation of the video frame set of the second resolution can reuse the front part calculation performed by the target model on the set of video frames to be processed of the first resolution, thereby reducing the computing cost and saving computing resources.
[0102] Fig.10This is a flow chart of a video processing method provided by another embodiment of the present application. The execution subject of this embodiment may be Figure 1 Terminal 13 in. Fig.10 As shown, the method of this embodiment may include:
[0103] Step 101, obtaining a to-be-played video frame, wherein the to-be-played video frame is obtained by processing a to-be-processed video frame set having a first resolution in the following manner: processing the to-be-processed video frame set based on a target model to obtain a first video frame set and at least one second video frame set; the resolution of the first video frame set is the first resolution, the resolution of the second video frame set is a second resolution, the second resolution is smaller than the first resolution and the resolutions of different second video frame sets are different; the target model is used to enhance the image quality of the input image and reduce the data volume;
[0104] Step 102: play the video frame to be played.
[0105] In an embodiment of the present application, when the number of the second video frame sets is equal to the target number, and the target number is the number of resolution types that can be provided that is smaller than the first resolution, the video frames to be played can be video frames in the first video frame set and the at least one second video frame set.
[0106] In the case where the number of the second video frame sets is less than the target number, the video frames to be played are video frames in the first video frame set, the at least one second video frame set and at least one third video frame set; wherein the at least one third video frame set is obtained by downsampling the video frame sets with a resolution of the first target resolution in the first video frame set and the at least one second video frame set; the resolution of the third video frame set is a third resolution, the third resolution is less than the first target resolution and the resolutions of different third video frame sets are different.
[0107] Optionally, the first target resolution includes a resolution between the first resolution and the second resolution that is greater than the third resolution and closest to the third resolution.
[0108] It should be noted that for details on how to process the video frame set to be processed, please refer to Figure 3 The relevant description of the illustrated embodiment will not be repeated here.
[0109] It should be noted that the video frame to be played in the embodiment of the present application is the video frame received by the terminal, which can be Figure 3 The video frame corresponding to the encoded data sent by the server 12 to the terminal in the illustrated embodiment.
[0110] The video processing method provided by the embodiment of the present application obtains a video frame to be played and plays the video frame to be played, wherein the video frame to be played is obtained by processing a set of video frames to be processed having a first resolution in the following manner: the video frame set is processed based on a target model to obtain a first video frame set and at least one second video frame set, wherein the resolution of the first video frame set is a first resolution, the resolution of the second video frame set is a second resolution, the second resolution is smaller than the first resolution and the resolutions of different second video frame sets are different, and the target model is used to enhance the image quality of the input image and reduce the data volume; thereby realizing that the video frame to be played by the terminal can be a set of video frames to be played by Figure 3 The method shown meets the playback requirements of the terminal.
[0111] Fig.11 A schematic diagram of the structure of a video processing device provided in an embodiment of the present application; Fig.11 As shown, this embodiment provides a video processing device, which can perform the above Figure 3 The video processing method shown, specifically, the video processing device may include:
[0112] An acquisition module 111 is used to acquire a set of video frames to be processed, wherein the resolution of the set of video frames to be processed is a first resolution;
[0113] The processing module 112 is used to process the set of video frames to be processed based on the target model to obtain a first video frame set and at least one second video frame set; the resolution of the first video frame set is the first resolution, the resolution of the second video frame set is the second resolution, the second resolution is smaller than the first resolution and the resolutions of different second video frame sets are different; the target model is used to enhance the image quality of the input image and reduce the amount of data.
[0114] Optionally, the number of the second video frame sets is equal to a target number, where the target number is the number of resolution types that need to be provided and are smaller than the first resolution.
[0115] Optionally, the number of the second video frame sets is smaller than a target number, where the target number is the number of resolution types that need to be provided and are smaller than the first resolution; the processing module 112 is further configured to:
[0116] Downsample the video frame sets with a resolution of the first target resolution in the first video frame set and the at least one second video frame set to obtain at least one third video frame set, wherein the resolution of the third video frame set is a third resolution, the third resolution is smaller than the first target resolution and the resolutions of different third video frame sets are different.
[0117] Optionally, the first target resolution includes a resolution between the first resolution and the second resolution that is greater than the third resolution and closest to the third resolution.
[0118] Optionally, the video frames in the set of video frames to be processed include three-channel YUV images;
[0119] The processing module 112 is used to process the to-be-processed video frame set based on the target model to obtain a first video frame set and at least one second video frame set, specifically including:
[0120] Inputting the Y channel images of the video frames in the to-be-processed video frame set into the target model for processing to obtain a first Y channel image set and at least one second Y channel image set;
[0121] Perform YUV splicing on the first Y channel image set and the UV channel image set of the to-be-processed video frame set to obtain a first video frame set;
[0122] According to the second resolution, the UV channel image set of the to-be-processed video frame set is downsampled to obtain at least one UV channel image set, and the at least one second Y channel image set and the at least one UV channel image set are correspondingly spliced to obtain at least one second video frame set.
[0123] Optionally, the processing module 112 is used to process the to-be-processed video frame set based on the target model to obtain a first video frame set and at least one second video frame set, specifically including:
[0124] The video frames in the to-be-processed video frame set are input into the target model for processing to obtain a first video frame set and at least one second video frame set.
[0125] Optionally, the device further includes a coding module, configured to:
[0126] Encoding the first video frame set to obtain a first encoded data set;
[0127] The at least one second video frame set is encoded respectively to obtain at least one second encoded data set.
[0128] Optionally, the encoding module is further used to:
[0129] storing the first encoded data set in a corresponding first video file;
[0130] The at least one second encoded data set is respectively stored in at least one second video file.
[0131] Optionally, the device further includes a sending module, configured to:
[0132] Determining that the terminal needs to download video resources corresponding to the set of to-be-processed video frames of the second target resolution;
[0133] Sending at least part of the encoded data with a resolution of the second target resolution in the first encoded data set and the at least one second encoded data set to the terminal.
[0134] Optionally, the target model is trained in the following manner:
[0135] Constructing a target model, wherein the target model is provided with training parameters;
[0136] Inputting sample images in the sample image sequence into the target model in sequence for processing to generate processing results;
[0137] The video quality corresponding to the processing result is determined, and based on the difference between the video quality and the expected quality, the training parameters are iteratively adjusted until the difference meets the preset requirement.
[0138] Optionally, the target model includes a convolutional neural network model.
[0139] Fig.11 The device shown can perform Figure 3 For the method of the embodiment shown in the figure, the part not described in detail in this embodiment can be referred to Figure 3 The implementation process and technical effects of this technical solution refer to Figure 3 The description in the illustrated embodiment will not be repeated here.
[0140] In one possible implementation, Fig.11 The structure of the video processing device shown can be implemented as a server. Fig.12 As shown, the server may include: a processor 121 and a memory 122. The memory 122 is used to store the information that supports the server to execute the above Figure 3 The program of the video processing method provided in the illustrated embodiment, the processor 121 is configured to execute the program stored in the memory 122 .
[0141] The program includes one or more computer instructions, wherein when the one or more computer instructions are executed by the processor 121, the following steps can be implemented:
[0142] Acquire a set of video frames to be processed, where the resolution of the set of video frames to be processed is a first resolution;
[0143] The set of video frames to be processed is processed based on a target model to obtain a first set of video frames and at least one second set of video frames; the resolution of the first set of video frames is the first resolution, the resolution of the second set of video frames is the second resolution, the second resolution is smaller than the first resolution and the resolutions of different second sets of video frames are different; the target model is used to enhance the image quality of the input image and reduce the amount of data.
[0144] Optionally, the processor 121 is further configured to execute the aforementioned Figure 3 All or part of the steps in the illustrated embodiments.
[0145] The server structure may also include a communication interface 123 for the server to communicate with other devices or communication networks.
[0146] Fig.13 FIG. 1 is a schematic diagram of a video processing device according to another embodiment of the present invention; Fig.13 As shown, this embodiment provides a video processing device, which can perform the above Fig.10 The video processing method shown, specifically, the video processing device may include:
[0147] The acquisition module 131 is used to acquire a video frame to be played, wherein the video frame to be played is obtained by processing a set of video frames to be processed having a first resolution in the following manner: the set of video frames to be processed is processed based on a target model to obtain a first set of video frames and at least one set of second video frames; the resolution of the first set of video frames is the first resolution, the resolution of the second set of video frames is a second resolution, the second resolution is smaller than the first resolution and the resolutions of different second sets of video frames are different; the target model is used to enhance the image quality of the input image and reduce the data volume;
[0148] The playing module 132 is used to play the video frame to be played.
[0149] Optionally, the number of the second video frame sets is equal to the target number, which is the number of resolution types that need to be provided and are smaller than the first resolution; the video frames to be played are video frames in the first video frame set and the at least one second video frame set.
[0150] Optionally, the number of the second video frame sets is smaller than a target number, where the target number is the number of resolution types that need to be provided and are smaller than the first resolution; the video frames to be played are video frames in the first video frame set, the at least one second video frame set, and the at least one third video frame set;
[0151] Among them, the at least one third video frame set is obtained by downsampling the video frame set with a resolution of the first target resolution in the first video frame set and the at least one second video frame set; the resolution of the third video frame set is a third resolution, the third resolution is smaller than the first target resolution and the resolutions of different third video frame sets are different.
[0152] Optionally, the first target resolution includes a resolution between the first resolution and the second resolution that is greater than the third resolution and closest to the third resolution.
[0153] Fig.13 The device shown can perform Fig.10 For the method of the embodiment shown in the figure, the part not described in detail in this embodiment can be referred to Fig.10 The implementation process and technical effects of this technical solution refer to Fig.10 The description in the illustrated embodiment will not be repeated here.
[0154] In one possible implementation, Fig.13 The structure of the video processing device shown can be implemented as a terminal. Fig.14 As shown, the terminal may include: a processor 141 and a memory 142. The memory 142 is used to store the support terminal to execute the above Fig.10 The program of the video processing method provided in the illustrated embodiment, the processor 141 is configured to execute the program stored in the memory 142 .
[0155] The program includes one or more computer instructions, wherein when the one or more computer instructions are executed by the processor 141, the following steps can be implemented:
[0156] Obtaining a video frame to be played, wherein the video frame to be played is obtained by processing a set of video frames to be processed having a first resolution in the following manner: processing the set of video frames to be processed based on a target model to obtain a first set of video frames and at least one second set of video frames; the resolution of the first set of video frames is the first resolution, the resolution of the second set of video frames is a second resolution, the second resolution is smaller than the first resolution and the resolutions of different second sets of video frames are different; the target model is used to enhance the image quality of the input image and reduce the amount of data;
[0157] Play the video frame to be played.
[0158] Optionally, the processor 141 is further configured to execute the aforementioned Fig.10 All or part of the steps in the illustrated embodiments.
[0159] The structure of the terminal may also include a communication interface 143 for the terminal to communicate with other devices or a communication network.
[0160] In addition, the present application embodiment provides a computer storage medium for storing computer software instructions used by the server, which includes instructions for executing the above Figure 3 The procedures involved in the video processing method in the method embodiment are shown.
[0161] The present application embodiment provides a computer storage medium for storing computer software instructions used by a terminal, which includes instructions for executing the above Fig.10 The procedures involved in the video processing method in the method embodiment are shown.
[0162] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0163] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course can also be implemented by combining hardware and software. Based on such an understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a computer product, and the present application can be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0164] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable device to generate a machine, so that the instructions executed by the processor of the computer or other programmable device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0165] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable device to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0166] These computer program instructions may also be loaded onto a computer or other programmable device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0167] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0168] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0169] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0170] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A video processing method, characterized in that: include: Acquire a set of video frames to be processed, where the resolution of the set of video frames to be processed is a first resolution; The set of video frames to be processed is processed based on a target model to obtain a first set of video frames and at least one second set of video frames; the resolution of the first set of video frames is the first resolution, the resolution of the second set of video frames is the second resolution, the second resolution is smaller than the first resolution and the resolutions of different second sets of video frames are different; the target model is used to enhance the image quality of the input image and reduce the amount of data, and the first set of video frames and the second set of video frames are obtained by reusing the target model to process the front part of the calculation performed on the set of video frames to be processed; the target model is trained in the following manner: constructing a target model, in which training parameters are set; inputting sample images in a sample image sequence into the target model in sequence for processing to generate a processing result; determining the video quality corresponding to the processing result, and iteratively adjusting the training parameters based on the difference between the video quality and the expected quality until the difference meets the preset requirements.
2. The method according to claim 1, characterized in that The number of the second video frame sets is equal to a target number, where the target number is the number of resolution types that need to be provided and are smaller than the first resolution.
3. The method according to claim 1, characterized in that The number of the second video frame sets is less than the target number, where the target number is the number of resolution types that need to be provided that are less than the first resolution; the method further includes: Downsample the video frame sets with a resolution of the first target resolution in the first video frame set and the at least one second video frame set to obtain at least one third video frame set, wherein the resolution of the third video frame set is a third resolution, the third resolution is smaller than the first target resolution and the resolutions of different third video frame sets are different.
4. The method according to claim 3, characterized in that The first target resolution includes a resolution between the first resolution and the second resolution that is greater than the third resolution and closest to the third resolution.
5. The method according to any one of claims 1 to 4, characterized in that: The video frames in the set of video frames to be processed include three-channel YUV images; The processing of the to-be-processed video frame set based on the target model to obtain a first video frame set and at least one second video frame set includes: Inputting the Y channel image set of the to-be-processed video frame set into the target model for processing to obtain a first Y channel image set and at least one second Y channel image set; Perform YUV splicing on the first Y channel image set and the UV channel image set of the to-be-processed video frame set to obtain a first video frame set; According to the second resolution, the UV channel image set of the to-be-processed video frame set is downsampled to obtain at least one UV channel image set, and the at least one second Y channel image set and the at least one UV channel image set are correspondingly spliced to obtain at least one second video frame set.
6. The method according to any one of claims 1 to 4, characterized in that: The processing of the to-be-processed video frame set based on the target model to obtain a first video frame set and at least one second video frame set includes: The to-be-processed video frame set is input into the target model for processing to obtain a first video frame set and at least one second video frame set.
7. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Encoding the first video frame set to obtain a first encoded data set; The at least one second video frame set is encoded respectively to obtain at least one second encoded data set.
8. The method according to claim 7, characterized in that The method further comprises: storing the first encoded data set in a corresponding first video file; The at least one second encoded data set is respectively stored in at least one second video file.
9. The method according to claim 7, characterized in that: The method further comprises: Determining that the terminal needs to download video resources corresponding to the set of to-be-processed video frames of the second target resolution; Sending at least part of the encoded data with a resolution of the second target resolution in the first encoded data set and the at least one second encoded data set to the terminal.
10. The method according to any one of claims 1 to 4, characterized in that: The target model includes a convolutional neural network model.
11. A video processing method, characterized in that: include: Obtain a video frame to be played, wherein the video frame to be played is obtained by processing a set of video frames to be processed having a first resolution in the following manner: processing the set of video frames to be processed based on a target model to obtain a first video frame set and at least one second video frame set; the resolution of the first video frame set is the first resolution, the resolution of the second video frame set is the second resolution, the second resolution is smaller than the first resolution and the resolutions of different second video frame sets are different; the target model is used to enhance the image quality of the input image and reduce the amount of data, and the first video frame set and the second video frame set are obtained by reusing the target model to process the front part of the video frame set to be processed; the target model is trained in the following manner: constructing a target model, wherein training parameters are set in the target model; inputting sample images in a sample image sequence into the target model in sequence for processing to generate a processing result; determining the video quality corresponding to the processing result, and iteratively adjusting the training parameters based on the difference between the video quality and the expected quality until the difference meets the preset requirements; Play the video frame to be played.
12. The method according to claim 11, characterized in that The number of the second video frame sets is equal to the target number, which is the number of resolution types that need to be provided and are smaller than the first resolution; the video frames to be played are video frames in the first video frame set and the at least one second video frame set.
13. The method according to claim 11, characterized in that The number of the second video frame sets is less than the target number, where the target number is the number of resolution types that need to be provided and are less than the first resolution; the video frames to be played are video frames in the first video frame set, the at least one second video frame set, and the at least one third video frame set; Among them, the at least one third video frame set is obtained by downsampling the video frame set with a resolution of the first target resolution in the first video frame set and the at least one second video frame set; the resolution of the third video frame set is a third resolution, the third resolution is smaller than the first target resolution and the resolutions of different third video frame sets are different.
14. The method according to claim 13, characterized in that The first target resolution includes a resolution between the first resolution and the second resolution that is greater than the third resolution and closest to the third resolution.
15. A video processing device, characterized in that: include: An acquisition module, used for acquiring a set of video frames to be processed, wherein the resolution of the set of video frames to be processed is a first resolution; A processing module is used to process the set of video frames to be processed based on a target model to obtain a first set of video frames and at least one second set of video frames; the resolution of the first set of video frames is the first resolution, the resolution of the second set of video frames is the second resolution, the second resolution is smaller than the first resolution and the resolutions of different second sets of video frames are different; the target model is used to enhance the image quality of the input image and reduce the amount of data, the first set of video frames and the second set of video frames are obtained by reusing the target model to process the front part of the calculation performed on the set of video frames to be processed; the target model is trained in the following manner: constructing a target model, in which training parameters are set; inputting sample images in a sample image sequence into the target model in sequence for processing to generate a processing result; determining the video quality corresponding to the processing result, and iteratively adjusting the training parameters based on the difference between the video quality and the expected quality until the difference meets the preset requirements.
16. A video processing device, characterized in that: include: An acquisition module is used to acquire a video frame to be played, wherein the video frame to be played is obtained by processing a set of video frames to be processed having a first resolution in the following manner: processing the set of video frames to be processed based on a target model to obtain a first set of video frames and at least one second set of video frames; the resolution of the first set of video frames is the first resolution, the resolution of the second set of video frames is the second resolution, the second resolution is smaller than the first resolution and the resolutions of different second sets of video frames are different; the target model is used to enhance the image quality of the input image and reduce the amount of data, wherein the first set of video frames and the second set of video frames are obtained by reusing the target model to process the front part of the set of video frames to be processed; the target model is trained in the following manner: constructing a target model, wherein training parameters are set in the target model; inputting sample images in a sample image sequence into the target model in sequence for processing to generate a processing result; determining the video quality corresponding to the processing result, and iteratively adjusting the training parameters based on the difference between the video quality and the expected quality until the difference meets the preset requirements; The playing module is used to play the video frame to be played.
17. A server, comprising: Memory, processor; characterized in that the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the method as described in any one of claims 1 to 10.
18. A terminal, comprising: Memory, processor; characterized in that the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the method as described in any one of claims 11 to 14.
19. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.
20. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the steps of the method described in any one of claims 11 to 14 are implemented.
