Video encoding and decoding method, device, equipment and storage medium

By using the encoding network of key frames to encode and decode non-key frames, the video compression scheme is simplified, the problems of P frame compression network complexity and reduced recovery quality in the existing technology are solved, and efficient video compression and decoding is achieved.

CN114257818BActive Publication Date: 2024-09-24ALIBABA DAMO (HANGZHOU) TECH CO LTD
View PDF 13 Cites 0 Cited by

Patent Information

Application Number
CN202011004238.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-22
Publication Date
2024-09-24
Estimated Expiration
2040-09-22

AI Technical Summary

Technical Problem

In existing deep learning video compression solutions, the compression network structure of P frames is complex and the amount of data is large, resulting in low video compression efficiency and reduced recovery quality, making it impossible to achieve long GOP compression.

Method used

The encoding network of key frames is used to encode non-key frames. By obtaining the characteristic information of the target frame and reference frame, entropy coding is performed to obtain the compression information, simplifying the encoding and decoding network structure and improving the encoding efficiency.

Benefits of technology

It simplifies the video encoding and decoding network structure, improves coding efficiency, avoids inter-frame quality attenuation, and achieves higher compression rate and maintenance of recovery quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000
    Figure 00000000_0000
Patent Text Reader

Abstract

The embodiments of the present application provide a video encoding and decoding method, device, equipment and storage medium to simplify the network structure of encoding and decoding and improve the efficiency of encoding and decoding. The method includes: inputting a target frame into a coding network to obtain first feature information of the target frame, wherein the coding network is a coding network of a key frame; obtaining second feature information of a reference frame processed by the coding network, wherein the reference frame is N adjacent frames of the target frame; determining the target feature information to be compressed based on the first feature information and the second feature information; performing entropy encoding on the target feature information to obtain compressed information of the target frame. The coding network of the key frame can be reused to encode non-key frames to obtain compressed information, thereby improving coding efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a video encoding method and device, a video decoding method and device, a video transmission method and device, a video playback method and device, a video encoding training method and device, an electronic device and a storage medium. Background Art

[0002] In recent years, image / video compression based on deep learning has become a hot issue in the field of compression. At present, image compression based on deep learning has surpassed traditional image compression algorithms, and video compression algorithms based on deep learning are still developing rapidly.

[0003] Video compression includes intra-frame compression and inter-frame compression. Intra-frame compression uses spatial redundancy or repeated data in the frame space to define data that can be discarded. Intra-frame compression is equivalent to image compression, so the intra-frame compression of video compression standards is often used to evaluate image compression. Inter-frame compression uses the motion correlation between adjacent frames for compression.

[0004] In video compression, each frame represents a still image. In the actual transmission video stream, video frames are divided into I frames (Intracoded frames), P frames (Predicted pictures), and B frames (Bi-directional predictive pictures). Among them, I frames are key frames and use intra-frame compression, while P frames and B frames compress data based on I frames and use inter-frame compression. P stands for forward search and B stands for bidirectional search. Among them, I frames have the lowest compression rate, P frames have a higher compression rate, and B frames have the highest compression rate. Group Of Pictures (GOP) refers to the interval between two I frames. Taking P frames as an example, the compression of the first P frame during a GOP needs to refer to the recovery map of the I frame, and the second P frame refers to the recovery map of the first P frame or the recovery map of the I frame, and so on.

[0005] However, since P frames need to refer to previous frames, there will be a process in which the restoration quality continues to decrease cumulatively. Although the longer the GOP, the greater the compression efficiency, the restoration quality of the P frame will decrease accordingly, resulting in the inability to achieve very long GOP compression. The current mainstream deep learning video compression scheme refers to the above process, in which I frames and P frames are compressed using different compression networks, and the compression network of P frames includes a motion information compression network and a residual compression network. This method results in a total of 3 sets of encoding and decoding networks for I frames and P frames in video compression, with a complex network structure and a large amount of data. Summary of the invention

[0006] The embodiment of the present application provides a video encoding method to simplify the encoding and decoding network structure and improve the encoding and decoding efficiency.

[0007] Correspondingly, the embodiments of the present application also provide a video encoding device, a video decoding method and device, a video transmission method and device, a video playback method and device, a video encoding training method and device, a processing method and device based on video encoding and decoding, an electronic device and a storage medium, so as to ensure the implementation and application of the above methods.

[0008] In order to solve the above problems, an embodiment of the present application discloses a video encoding method, which includes: inputting a target frame into a coding network to obtain first feature information of the target frame, wherein the coding network is a coding network of a key frame; obtaining second feature information of a reference frame processed by the coding network, wherein the reference frame is N adjacent frames of the target frame; determining target feature information to be compressed based on the first feature information and the second feature information; and performing entropy encoding on the target feature information to obtain compressed information of the target frame.

[0009] An embodiment of the present application also discloses a video decoding method, including: obtaining first compressed information of a target frame; performing entropy decoding on the first compressed information to obtain target feature information; determining second feature information of a reference frame, wherein the reference frame is N adjacent frames of the target frame, and the first feature information is the second compressed information of the reference frame obtained by entropy decoding; using the target feature information and the second feature information to determine the first feature information of the target frame; inputting the first feature information into a decoding network to obtain a corresponding target frame, and the decoding network is a decoding network of a key frame.

[0010] An embodiment of the present application also discloses a video transmission method, which includes: obtaining video data; compressing image frames in the video data to determine compression information of each image frame; transmitting the compression information of the image frame; wherein the compression processing of the target frame in the image data includes the following steps: inputting the target frame into a coding network to obtain first feature information of the target frame, wherein the coding network is a coding network of a key frame; obtaining second feature information of a reference frame processed by the coding network, wherein the reference frame is N adjacent frames of the target frame; determining the target feature information to be compressed based on the first feature information and the second feature information; and entropy encoding the target feature information to obtain compression information of the target frame.

[0011] An embodiment of the present application also discloses a video playback method, which includes: obtaining compression information of each image frame in video data; decompressing the compression information of each image frame to obtain a restored image frame; combining each image frame into video data according to a timestamp; playing the video data; wherein the image frame includes a target frame, and decompressing the compression information of the image frame includes the following steps: obtaining first compression information of the target frame; entropy decoding the first compression information to obtain target feature information; determining second feature information of a reference frame, wherein the reference frame is N adjacent frames of the target frame, and the first feature information is the second compression information of the reference frame obtained by entropy decoding; using the target feature information and the second feature information to determine the first feature information of the target frame; inputting the first feature information into a decoding network to obtain a corresponding target frame, and the decoding network is a decoding network of a key frame.

[0012] An embodiment of the present application also discloses a video coding training method, which includes: inputting a reference frame and a target frame into a coding network respectively, obtaining second feature information of the reference frame and first feature information of the target frame, wherein the coding network is a key frame coding network, wherein the reference frame is N adjacent frames of the target frame; inputting the first feature information and the second feature information into a compression network for processing, to obtain compression information of the target frame, wherein the compression network determines the target feature information to be compressed based on the first feature information and the second feature information, and performs entropy encoding on the target feature information to obtain compression information of the target frame; determining a loss function based on the compression information of the target frame, and adjusting the compression network based on the loss function.

[0013] The embodiment of the present application also discloses a processing method based on video coding, which includes: deploying a video encoder and providing a first calling interface of the encoder; receiving coding calling parameters through the first calling interface, the coding calling parameters including coding parameters and video parameters; obtaining video data according to the video parameters, and determining the encoder according to the coding parameters; encoding the video data using the encoder to obtain compression information of the video data; feeding back the coding result through a second calling interface to obtain compression information of the video data according to the coding result; wherein, for a target frame in the video data, an encoder is used to perform the following coding processing steps: obtaining first feature information of the target frame through the coding network of the encoder, wherein the coding network is a coding network of a key frame; obtaining second feature information of a reference frame processed by the coding network, wherein the reference frame is N adjacent frames of the target frame; determining the target feature information to be compressed according to the first feature information and the second feature information; entropy encoding the target feature information to obtain compression information of the target frame.

[0014] The embodiment of the present application also discloses a processing method based on video decoding, the method comprising: deploying a video decoder and providing a third calling interface of the decoder; receiving decoding calling parameters through the third calling interface, the decoding calling parameters including video compression parameters and decoding parameters; obtaining video compression information through the video compression parameters, and determining the decoder according to the decoding parameters; using the decoder to decode the compressed information to obtain corresponding video data; feeding back the decoding result through a fourth calling interface to obtain the video data according to the decoding result; wherein, for a target frame in the video data, a decoder is used to perform the following decoding steps: entropy decoding is performed on the first compressed information of the target frame to obtain target feature information; second feature information of a reference frame is determined, wherein the reference frame is N adjacent frames of the target frame, and the first feature information is obtained by entropy decoding the second compressed information of the reference frame; the first feature information of the target frame is determined by using the target feature information and the second feature information; the first feature information is input into a decoding network to obtain a corresponding target frame, and the decoding network is a decoding network of a key frame.

[0015] An embodiment of the present application also discloses a video encoding device, which includes: an encoding module, used to input a target frame into a coding network to obtain first feature information of the target frame, wherein the coding network is a coding network of a key frame; obtain second feature information of a reference frame processed by the coding network, wherein the reference frame is N adjacent frames of the target frame; a motion estimation module, used to determine target feature information to be compressed based on the first feature information and the second feature information; and a compression module, used to perform entropy encoding on the target feature information to obtain compressed information of the target frame.

[0016] An embodiment of the present application also discloses a video encoding device, which includes: a decompression module, used to obtain first compressed information of a target frame; entropy decoding the first compressed information to obtain target feature information; determining second feature information of a reference frame, wherein the reference frame is N adjacent frames of the target frame, and the first feature information is obtained by entropy decoding the second compressed information of the reference frame; a motion recovery module, used to determine the first feature information of the target frame using the target feature information and the second feature information; and a decoding module, used to input the first feature information into a decoding network to obtain a corresponding target frame, wherein the decoding network is a decoding network of a key frame.

[0017] The embodiment of the present application also discloses a video transmission device, which includes: a video acquisition module, used to acquire video data; a video compression module, used to compress image frames in the video data and determine compression information of each image frame; a video transmission module, used to transmit the compression information of the image frame; wherein the video compression module is used to input the target frame into the encoding network and acquire first feature information of the target frame, wherein the encoding network is an encoding network of a key frame; acquire second feature information of a reference frame processed by the encoding network, wherein the reference frame is N adjacent frames of the target frame; determine the target feature information to be compressed based on the first feature information and the second feature information; and perform entropy encoding on the target feature information to obtain compression information of the target frame.

[0018] The embodiment of the present application also discloses a video playback device, which includes: a video receiving module, used to obtain compression information of each image frame in the video data; a video decompression module, used to decompress the compression information of each image frame to obtain a restored image frame; combine each image frame into video data according to a timestamp; a video playback module, used to play the video data; wherein the image frame includes a target frame, and the video decompression module is used to obtain first compression information of the target frame; entropy decoding is performed on the first compression information to obtain target feature information; second feature information of a reference frame is determined, wherein the reference frame is N adjacent frames of the target frame, and the first feature information is obtained by entropy decoding the second compression information of the reference frame; the first feature information of the target frame is determined using the target feature information and the second feature information; the first feature information is input into a decoding network to obtain a corresponding target frame, and the decoding network is a decoding network of a key frame.

[0019] An embodiment of the present application also discloses a video coding training device, which includes: an encoding module, used to input a reference frame and a target frame into a coding network respectively, and obtain the second feature information of the reference frame and the first feature information of the target frame, wherein the coding network is a key frame coding network, wherein the reference frame is N adjacent frames of the target frame; a compression processing module, used to input the first feature information and the second feature information into a compression network for processing, and obtain compression information of the target frame, wherein the compression network determines the target feature information to be compressed based on the first feature information and the second feature information, and performs entropy encoding on the target feature information to obtain compression information of the target frame; a training module, used to determine a loss function based on the compression information of the target frame, and adjust the compression network based on the loss function.

[0020] The embodiment of the present application also discloses a processing device based on video coding, the device comprising: an encoder deployment module, used to deploy a video encoder and provide a first calling interface of the encoder; an encoder calling module, used to receive encoding calling parameters through the first calling interface, the encoding calling parameters including encoding parameters and video parameters; an encoder compression module, used to obtain video data according to the video parameters, and determine the encoder according to the encoding parameters; use the encoder to encode the video data to obtain compression information of the video data; a feedback module, used to feedback the encoding result through a second calling interface, so as to obtain compression information of the video data according to the encoding result; wherein the encoding compression module is used to use the encoder to perform the following encoding processing for a target frame in the video data: obtain first feature information of the target frame through the encoding network of the encoder, wherein the encoding network is the encoding network of the key frame; obtain second feature information of the reference frame processed by the encoding network, wherein the reference frame is the adjacent N frames of the target frame; determine the target feature information to be compressed according to the first feature information and the second feature information; perform entropy encoding on the target feature information to obtain compression information of the target frame.

[0021] The embodiment of the present application also discloses a processing device based on video decoding, the device comprising: a decoder deployment module, used to deploy a decoder of a video and provide a third calling interface of the decoder; a decoder calling module, used to receive decoding calling parameters through the third calling interface, the decoding calling parameters including video compression parameters and decoding parameters; a decoder processing module, used to obtain compression information of the video through the video compression parameters, and determine the decoder according to the decoding parameters; use the decoder to decode the compression information to obtain corresponding video data; a decoding feedback module, used to feedback the decoding result through a fourth calling interface, and obtain the video data according to the decoding result; wherein the decoder processing module is used to use the decoder to perform the following decoding steps for a target frame in the video data: entropy decoding the first compression information of the target frame to obtain target feature information; determining the second feature information of the reference frame, wherein the reference frame is the adjacent N frames of the target frame, and the first feature information is the second compression information of the reference frame obtained by entropy decoding; using the target feature information and the second feature information to determine the first feature information of the target frame; inputting the first feature information into a decoding network to obtain the corresponding target frame, the decoding network is a decoding network of a key frame.

[0022] An embodiment of the present application further discloses an electronic device, including: a processor; and a memory, on which executable code is stored. When the executable code is executed, the processor executes one or more methods described in the embodiments of the present application.

[0023] The embodiments of the present application also disclose one or more machine-readable media on which executable codes are stored. When the executable codes are executed, the processor executes one or more methods described in the embodiments of the present application.

[0024] Compared with the prior art, the embodiments of the present application have the following advantages:

[0025] In an embodiment of the present application, the encoding network of the key frame can be reused to encode the non-key frame to determine the first feature information, and then combined with the second feature information of the reference frame of the non-key frame, the target feature information to be compressed can be determined, and then the target feature information is entropy encoded to obtain compressed information, thereby improving the encoding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 is a schematic diagram of an example of video encoding processing in an embodiment of the present application;

[0027] Figure 2 is a schematic diagram of an example of video decoding processing in an embodiment of the present application;

[0028] Figure 3 It is a flowchart of a video encoding method embodiment of the present application;

[0029] Figure 4 This is a flowchart of a video decoding method embodiment of the present application;

[0030] Figure 5 is a schematic diagram of an example of encoding and decoding processing in an embodiment of the present application;

[0031] Figure 6 is a flowchart of a video coding training method embodiment of the present application;

[0032] Figure 7 is a flowchart of a video transmission method embodiment of the present application;

[0033] Figure 8 This is a flowchart of a video playback method embodiment of the present application;

[0034] Fig. 9 It is a flowchart of a processing method embodiment based on video coding of the present application;

[0035] Fig.10 It is a flowchart of a processing method embodiment based on video decoding of the present application;

[0036] Fig.11 It is a structural block diagram of an embodiment of a video encoding device of the present application;

[0037] Fig.12 It is a structural block diagram of an embodiment of a video decoding device of the present application;

[0038] Fig.13 is a structural block diagram of an embodiment of a video transmission device of the present application;

[0039] Fig.14 It is a structural block diagram of an embodiment of a video playback device of the present application;

[0040] Fig.15 It is a structural block diagram of an embodiment of a video coding training device of the present application;

[0041] Fig.16 It is a schematic diagram of the structure of a device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0042] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0043] The embodiments of the present application can be applied to video compression scenarios. Video is composed of multiple frames of continuous images. Frames are the basic units that make up video images, and each frame represents a still image. Normally, the video viewed normally is not less than 25 frames per second. In video transmission, image frames are divided into I frames and P frames, where I frames are also called key frames. They are full-frame compressed coded frames, and usually use intra-frame compression. When decoding, only the data of I frames can be used to reconstruct the complete image; P frames are forward search frames, and B frames are bidirectional search frames. P frames and B frames can also be called non-key frames. Taking P frames as an example, P frames compress the data of this frame based on the differences between this frame and the adjacent previous N frames (I frames or P frames), and B frames compress the data of this frame based on the differences between this frame and the adjacent previous and next N frames, that is, P frames and B frames use inter-frame compression.

[0044] A video can be divided into multiple groups of pictures (GOPs). GOPs consist of a sequence of image frames in the video, which can be understood as the interval between two I frames. Taking P frames as an example, GOP starts with an I frame and ends with the P frame before the next I frame. During a GOP, the compression of the first P frame needs to refer to the recovery image of the I frame, and the second P frame refers to the recovery image of the first P frame or the I frame, and so on. Taking B frames as an example, B frames need to refer to the recovery images of the previous and next M frames.

[0045] After being compressed, the video can be transmitted. After being received by the receiving end, it can be decompressed and reconstructed into a video, and then other video processing can be performed, such as playback, etc. Therefore, the video compression and decompression method of the present application can be applied to a variety of video-related scenarios, such as video on demand, live broadcast, and various network video playback scenarios, and can also be applied to other scenarios that require video transmission, such as network transmission of surveillance videos, etc.

[0046] Among them, video encoding and decoding refers to the process of video compression and decompression. Encoding refers to compressing the video into a smaller bit stream through an encoding algorithm, and decoding refers to restoring the original video from the bit stream. Commonly used video codecs include H.264 and H.265, of which H.264 is the most commonly used.

[0047] In an embodiment of the present application, in order to simplify the network structure of encoding and decoding and improve the encoding and decoding efficiency, a key frame encoding and decoding network is adopted for non-key frames such as P frames and B frames, and then motion analysis is performed based on adjacent frames of the P frames, B frames and other non-key frames to determine the corresponding compression information.

[0048] Reference Figure 1 , showing a schematic diagram of an example of video encoding processing in an embodiment of the present application.

[0049] Step 102: input the target frame into the encoding network to obtain first feature information of the target frame.

[0050] In the embodiment of the present application, key frames of video data, such as I frames, and non-key frames, such as P frames and B frames, multiplex the same encoding and decoding network. Therefore, key frames and non-key frames can be input into the same encoding network. During the encoding process of a video, image frames of a GOP of the video can be input into the encoding network in sequence.

[0051] This embodiment is described by taking the encoding and decoding of P frames as an example, and the P frame currently required to be encoded and decoded is called the target frame, and the previous N frames of the target frame are called reference frames; taking the encoding and decoding of B frames as an example, the P frame currently required to be encoded and decoded is called the target frame, and the previous N frames and the next N frames of the target frame are called reference frames. The target frame is input into the encoding network to obtain the first feature information of the target frame. Among them, both key frames and non-key frames generate feature distribution through the encoding network of key frames, and motion prediction is performed at the feature layer to reduce the entropy of the image frame.

[0052] Assuming that the target frame is called t, the target frame t is input into the encoding network (ecoder) to obtain the first feature information y_hat.

[0053] Step 104: Obtain second feature information of the reference frame processed by the encoding network.

[0054] The compression of the target frame needs to refer to its adjacent N frames, that is, the reference frame, where N is a positive integer. If the reference frame is recorded as tn, the value of n is determined based on N. Therefore, the second feature information obtained after the reference frame of the target frame is processed by the encoding network can also be obtained. For example, if the reference frame is the previous frame of the target frame, the corresponding second feature information can be recorded as yt-1_hat, and if the reference frame is the next frame, the corresponding second feature information can be recorded as y-t+1_hat. Among them, taking the B frame as an example, the reference frame is the adjacent N frames of the target frame. Since the B frame needs to refer to the previous and next frames, N can be a multiple of 2 in this case. In the embodiment of the present application, the value of N can be determined according to the actual scene requirements, and the embodiment of the present application does not limit this.

[0055] Step 106: Determine target feature information to be compressed based on the first feature information and the second feature information.

[0056] Since the target frame and its reference frame are highly similar, motion analysis will be performed on these image frames to remove similar partial features. Therefore, the target feature information to be compressed can be determined based on the first feature information and the second feature information, which can be recorded as y_hat_res. For example, the difference between the current frame and the previous frame can be calculated for the P frame, and the difference between the current frame and the previous and next frames can be calculated for the B frame.

[0057] In an optional embodiment, the target feature information to be compressed may be determined based on the first feature information and the second feature information, including: performing motion analysis on the first feature information and the second feature information to determine the target feature information to be compressed. Motion analysis may be performed on the first feature information and the second feature information to determine the difference between the two image frames to obtain the target feature information to be compressed. Motion analysis between images may be performed in a variety of ways, such as through subtraction operations, optical flow, feature alignment, and the like.

[0058] In a further optional embodiment, the motion analysis of the first feature information and the second feature information to determine the target feature information to be compressed includes at least one of the following steps: subtracting the first feature information and the second feature information to determine the target feature information to be compressed; calculating the optical flow motion information of the first feature information and the second feature information as the target feature information to be compressed; and performing feature alignment on the first feature information and the second feature information to determine the target feature information to be compressed.

[0059] The first feature information and the second feature information may be subtracted to determine the corresponding difference as the target feature information to be compressed. For example, a P frame may calculate the difference by subtracting the current frame from the previous frame, and a B frame may calculate the difference by subtracting the current frame from the previous and next frames.

[0060] The optical flow motion information of the first feature information and the second feature information can also be calculated based on the optical flow motion method as the target feature information to be compressed. The optical flow method is a method for motion image analysis, which refers to the speed of pattern motion in a time-varying image, because when an object is moving, the brightness pattern of its corresponding point on the image is also moving. The optical flow motion information of the first feature information and the second feature information can be determined through an optical flow calculation network to obtain the target feature information to be compressed.

[0061] The first feature information and the second feature information may also be aligned to determine features with differences as target feature information to be compressed.

[0062] In the embodiment of the present application, the motion analysis between the target frame and the reference frame can be performed in various ways to determine the target feature information to be compressed. The specific method can be determined based on the needs, and this embodiment does not impose any restrictions on this.

[0063] Step 108: performing entropy coding on the target feature information to obtain compressed information of the target frame.

[0064] Entropy coding is a coding process that does not lose information according to the entropy principle. Entropy coding can be performed on target feature information to compress and obtain compressed information of the target frame. Entropy coding can be implemented based on various entropy coding algorithms, such as arithmetic coding, Huffman coding, etc. The embodiment of the present application does not limit this and can be selected based on demand.

[0065] In an entropy coding method, an estimated parameter of entropy coding may be determined first, and then the target feature information may be entropy coded according to the estimated parameter to obtain compressed information of the target frame. The estimated parameter may be determined according to the first feature information, the second feature information and the target feature information.

[0066] Among them, the relationship between image frames at the feature level can be mined based on the first feature information, the second feature information and the target feature information, so as to determine the estimation parameters.

[0067] In an optional embodiment, the estimated parameters are calculated based on the first feature information, the second feature information and the target feature information, including: determining the corresponding third feature information based on the first feature information and the second feature information; and calculating the estimated parameters based on the target feature information and the third feature information. The first feature parameter and the second feature parameter can be superimposed, and then processed through a parameter encoding network and a parameter decoding network to obtain the third feature parameter, thereby mining the relationship between the frame feature sides, and subsequently reducing the compression rate of the image frame.

[0068] In a further optional embodiment, determining the corresponding third feature information based on the first feature information and the second feature information includes: superimposing the first feature information and the second feature information to determine the corresponding fourth feature information; passing the fourth feature information through a parameter coding network to determine the corresponding fifth feature information; entropy encoding the fifth feature information to determine the corresponding parameter compression information; entropy decoding the parameter compression information to determine the corresponding sixth feature information; passing the sixth feature information through a parameter decoding network to determine the corresponding third feature information.

[0069] A parameter encoding network and a parameter decoding network can be set. Relative to the encoding and decoding network of the I frame, the parameter encoding and decoding network can also be called a super-parameter encoding and decoding network. The super-parameter encoding and decoding network is applied to the encoding and decoding process of non-key frames such as P frames and B frames, so it can be called a non-key frame mode super-parameter encoding and decoding network. The first feature information and the second feature information can be superimposed to determine the corresponding fourth feature information, and then the fourth feature information is passed through the parameter encoding network to determine the corresponding fifth feature information, which can also be called a super-parameter feature z. Then, the fifth feature information is entropy encoded to obtain the corresponding parameter compression information bpp_z, where bpp refers to the pixel depth (bit per pixel), which is used to represent the number of bits required for each pixel value of the image. Based on the entropy coding, the pixel depth bpp_z of the super-parameter feature z is determined, and then the parameter compression information is entropy decoded, and the sixth feature parameter can be losslessly restored, and then the sixth feature information is passed through the parameter decoding network to determine the corresponding third feature information.

[0070] Then, the estimated parameters can be calculated based on the target feature information and the third feature information, including: performing convolution processing on the second feature information to obtain a first convolution result; performing convolution processing on the target feature information to obtain a second convolution result; superimposing the first convolution result, the second convolution result and the third feature information to obtain seventh feature information; performing convolution processing on the seventh feature information to obtain corresponding estimated parameters.

[0071] The second feature parameter can be convolved, wherein the convolution kernel and the number of convolutions can be set according to the requirements, for example, two 5*5 convolutions can be used to obtain the corresponding first convolution result. The target feature parameter can also be convolved, for example, the context can be convolved through pixel convolutional neural networks (CNN) to obtain the corresponding second convolution result, and then the first convolution result, the second convolution result and the third feature information are superimposed to obtain the seventh feature information, and then the seventh feature information is convolved. Similar to the above situation, the convolution kernel and the number of convolutions can be set according to the requirements, for example, three 1*1 convolutions can be used to obtain the corresponding Laplace estimation parameters Mu / Sigma.

[0072] In an optional embodiment, the entropy encoding the target feature information to obtain the compressed information of the target frame includes: entropy encoding the target feature information according to the estimated parameters to obtain the compressed information of the target frame. The target feature information can be entropy encoded according to the estimated parameters, for example, entropy encoding the target feature information through Laplace estimation to obtain the compressed information bpp_y of the target frame. Thus, during the video transmission process, the compressed information of the target frame can be transmitted.

[0073] In this way, the encoding network of the key frame can be reused to encode the non-key frame to determine the first feature information, and then combined with the second feature information of the reference frame of the non-key frame, the target feature information to be compressed can be determined, and then the target feature information is entropy encoded to obtain compressed information, thereby improving the encoding efficiency.

[0074] The above describes the compression method for the target frame, and based on this compression method, the decompression method for the target frame is further described. Corresponding to the compression encoding network using the I frame during compression, the decompression of the target frame can also use the decoding network of the I frame decompression, and the specific process is as follows:

[0075] Reference Figure 2 , showing a schematic diagram of an example of video decoding processing in an embodiment of the present application.

[0076] Step 202: Acquire first compression information of a target frame, wherein the reference frame is a frame preceding the target frame.

[0077] Step 204: perform entropy decoding on the first compressed information to obtain target feature information.

[0078] After each image frame of the video is compressed to obtain compressed information, the compressed information can be transmitted, and then decompressed at the decoding end and reassembled into video data. For I frames, decoding and recovery can be performed directly to obtain the corresponding image frames, while for non-key frames, it is necessary to refer to its adjacent frames for decoding and recovery. For example, P frames need to refer to the previous N frames for decoding and recovery, and B frames need to refer to the previous M frames, etc., where 2M=N. Therefore, after obtaining the first compressed information of the target frame, entropy decoding can be performed first, and the corresponding target feature information can be obtained losslessly.

[0079] Step 206: determine second characteristic information of the reference frame, where the first characteristic information is obtained by entropy decoding second compressed information of the reference frame.

[0080] Since it is necessary to refer to the characteristic information of the reference frame, the second characteristic information of the reference frame can be obtained. The second characteristic information is obtained by losslessly restoring the second compressed information of the reference frame through entropy decoding.

[0081] Step 208: Use the target feature information and the second feature information to determine the first feature information of the target frame.

[0082] The target feature information of the target frame and the second feature information of its reference frame can be used to obtain the first feature information of the target frame. Since the target frame and the reference frame have a high degree of similarity, the target feature information is obtained by removing the similar parts from the first feature information of the target frame and the second feature information of the reference frame. Based on the inverse process of the encoding process, the first feature information of the target frame can be obtained.

[0083] In an optional embodiment, the target feature information and the second feature information are used to determine the first feature information of the target frame, including: performing motion analysis on the target frame according to the target feature information and the second feature information to determine the first feature information of the target frame. In contrast to the compression process, in the decompression process, for the motion analysis of the target frame, the target feature information can be superimposed on the second feature information of the reference frame to obtain the first feature information of the target frame.

[0084] In a further optional embodiment, the motion analysis of the target frame is performed based on the target feature information and the second feature information to determine the first feature information of the target frame, including at least one of the following steps: adding the target feature information and the second feature information to determine the first feature information of the target frame; analyzing the optical flow characteristics of the target frame based on the second feature information and the target feature information to determine the first feature information of the target frame; and feature shifting the second feature information based on the target feature information to determine the first feature information of the target frame.

[0085] In view of the subtraction method used in the compression process, the target feature information and the second feature information may be added during the decompression process to determine the first feature information of the target frame.

[0086] In view of the use of optical flow in the compression process, the optical flow features of the second feature information and the target feature information can also be analyzed in the decompression process to obtain the first feature information of the target frame.

[0087] For the method of using feature alignment in the compression process, feature offset can be performed in the decompression process, and the second feature information is feature offset based on the target feature information to determine the first feature information of the target frame.

[0088] Step 210: input the first feature information into a decoding network to obtain a corresponding target frame, and the decoding network is a decoding network of a key frame.

[0089] The first feature information that can be restored is input into the decoding network of the I frame to obtain the output target frame. Then, the image frames can be synthesized into a video according to the time sequence such as the timestamp, thereby completing the transmission of the video.

[0090] In summary, for the compressed information of non-key frames, the corresponding target feature information can be losslessly restored based on entropy decoding. The decoding of non-key frames needs to refer to the reference frame, so the second feature information of the reference frame can be obtained, and then based on the target feature information and the second feature information, the corresponding first feature information is obtained, and then the decoding network of the key frame is reused to decode the non-key frame to obtain the non-key frame, which can quickly restore the image and improve the decoding efficiency.

[0091] Based on the above embodiments, the embodiments of the present application also provide a video encoding method, which can reuse the encoding network of key frames to encode non-key frames, and then entropy encode the features of the non-key frames based on estimated parameters to obtain compressed information of the non-key frames.

[0092] Reference Figure 3 , shows a step flow chart of an embodiment of a video encoding method of the present application.

[0093] Step 302: input the target frame into the encoding network to obtain first feature information of the target frame.

[0094] Step 304: Obtain second feature information of the reference frame processed by the encoding network.

[0095] Step 306: Perform motion analysis on the first feature information and the second feature information to determine target feature information to be compressed.

[0096] Among them, the motion analysis of the first feature information and the second feature information to determine the target feature information to be compressed includes at least one of the following steps: subtracting the first feature information and the second feature information to determine the target feature information to be compressed; calculating the optical flow motion information of the first feature information and the second feature information as the target feature information to be compressed; and feature aligning the first feature information and the second feature information to determine the target feature information to be compressed.

[0097] Step 308: Calculate estimation parameters based on the first feature information, the second feature information and the target feature information.

[0098] Step 310: entropy encoding the target feature information according to the estimated parameters to obtain compressed information of the target frame.

[0099] In this way, the encoding network of the key frame can be reused to encode non-key frames such as the target frame, determine the first feature information, and then combine the second feature information of the reference frame of the target frame to determine the target feature information to be compressed, and also determine the estimated parameters of the target frame, and then perform entropy encoding on the target feature information to obtain compressed information, thereby improving the coding rate.

[0100] In an embodiment of the present application, the target frame may refer to an adjacent frame, or may refer to the probability estimation of motion information of N adjacent frames to perform a stronger estimation, thereby further reducing the pixel depth bpp value.

[0101] Based on the above embodiments, a video decoding method is also provided, which can losslessly restore the target feature information of non-key frames based on entropy decoding, and then obtain the first feature information of non-key frames by combining the second feature information of reference frames, and then reuse the decoding network of key frames to decode non-key frames.

[0102] Reference Figure 4 , showing a step flow chart of an embodiment of a video decoding method of the present application.

[0103] Step 402: Acquire first compression information of a target frame, wherein the reference frame is N adjacent frames of the target frame.

[0104] Step 404: perform entropy decoding on the first compressed information according to the estimated parameters to obtain target feature information.

[0105] Step 406: determine second characteristic information of the reference frame, where the first characteristic information is obtained by entropy decoding second compressed information of the reference frame.

[0106] Step 408: Perform motion analysis on the target frame based on the target feature information and the second feature information to determine the first feature information of the target frame.

[0107] Step 410: input the first feature information into a decoding network to obtain a corresponding target frame, and the decoding network is a decoding network of a key frame.

[0108] In the embodiment of the present application, since the non-key frame reuses the same encoding (encoder) network and decoding (decoder) network as the key frame, the target frame and the reference frame have high image similarity, and the quality of the restored image is similar, and the inter-frame quality attenuation phenomenon of the scheme of decoding with reference to the reference frame restoration image in the existing video compression method will not occur. The present application can perform lossless recovery through entropy decoding and entropy encoding, and can mine the relationship between the feature levels of each other, so that the pixel depth value of the compressed non-key frame is lower than the pixel depth value of the key frame, thereby realizing the compression of the non-key frame.

[0109] On the basis of the above embodiments, in order to more clearly describe the encoding and decoding processes, they are combined for description. In actual processing, the two processes can be processed at different ends. For example, the encoding process is specified at the video acquisition end, and the decoding process is executed at the video processing end such as the playback end. The specific settings can be made according to the requirements. Take the encoding and decoding process for P frames as an example:

[0110] Reference Figure 5 , showing a schematic diagram of an example of encoding and decoding processing in an embodiment of the present application.

[0111] The following is the encoding process of the target frame:

[0112] Step 502: input the target frame t into the encoding network to obtain the first feature information y_hat of the target frame.

[0113] The coding network is a coding network of a key frame I frame.

[0114] Step 504: Obtain second feature information yt-1_hat of the reference frame t-1 processed by the encoding network.

[0115] In this example, the previous frame of the target frame is used as a reference frame for discussion. In actual processing, the reference frame is the previous N frames of the target frame.

[0116] Step 506: Subtract the first feature information y_hat from the second feature information yt-1_hat to determine the target feature information y_hat_res to be compressed.

[0117] This embodiment uses the subtraction method to perform motion estimation as an example. In actual processing, other methods such as optical flow, feature alignment, etc. may be selected according to needs.

[0118] Step 508: Concat the first feature information y_hat and the second feature information yt-1_hat to determine corresponding fourth feature information.

[0119] Step 510, the fourth feature information is passed through a parameter coding network PmodHE (P frame mode hyper-parameter coding network) to determine the corresponding fifth feature information z.

[0120] Step 512: perform entropy coding on the fifth characteristic information z to determine corresponding parameter compression information bpp_z.

[0121] Step 514: perform entropy decoding on the parameter compression information bpp_z to determine the corresponding sixth feature information z_hat.

[0122] Step 516: Determine the corresponding third feature information by passing the sixth feature information through a parameter decoding network.

[0123] Step 518: Perform convolution processing on the second feature information yt-1_hat to obtain a first convolution result. For example, perform two 5*5 convolution processing to obtain the first convolution result.

[0124] Step 520: Perform convolution processing on the target feature information y_hat_res to obtain a second convolution result, such as by performing convolution processing of a context CNN to obtain the second convolution result.

[0125] Step 522: Superimpose the first convolution result, the second convolution result and the third feature information to obtain seventh feature information.

[0126] Step 524: Perform convolution processing on the seventh feature information to obtain corresponding estimation parameters. For example, by performing three 1*1 convolutions, the corresponding Laplace estimation parameters Mu / Sigma are obtained.

[0127] Step 526: perform entropy coding on the target feature information according to the estimated parameters to obtain compression information bpp_y of the target frame.

[0128] After the target frame is encoded, subsequent processing can be performed. For example, after the key frames and non-key frames in the video are compressed, they can be transmitted.

[0129] After the compressed information of key frames and non-key frames reaches the processing end, the processing end can decode and combine them into a video according to the sequence information such as timestamps for subsequent playback and other processing.

[0130] The following is the decoding process of non-key frames.

[0131] Step 528: Obtain the first compression information bpp_y of the target frame t.

[0132] Step 530, obtaining the estimated parameter Mu / Sigma of the target frame t.

[0133] Step 532: Perform entropy decoding on the first compressed information bpp_y according to the estimated parameter Mu / Sigma to obtain target feature information y_hat_res.

[0134] Step 534, determining the second feature information yt-1_hat of the reference frame t-1.

[0135] Corresponding to the above compression process, in this example, the reference frame is the previous frame of the target frame, and the first characteristic information is the second compressed information bpp_y-t-1 of the reference frame obtained through entropy decoding.

[0136] Step 536: Add the target feature information y_hat_res and the second feature information yt-1_hat to determine the first feature information y_hat of the target frame.

[0137] Corresponding to the subtraction method used in the encoding process for motion estimation, this example uses the addition method. Specifically, the motion estimation in the encoding method can be mainly used, and the corresponding inverse process is used in the decoding process.

[0138] Step 538: input the first feature information into the decoding network of the I frame to obtain the corresponding target frame t.

[0139] In the embodiment of the present application, since the P frame reuses the same encoding (encoder) network and decoding (decoder) network as the I frame, the target frame and the reference frame have high image similarity, and the quality of the restored image is similar, and the inter-frame quality attenuation phenomenon that occurs in the existing video compression method when decoding with reference to the reference frame restored image will not occur. In addition, the hyperparameters of the P frame mode can be used to mine the relationship between the feature levels of each other, so that the bpp value of the P frame is lower than that of the I frame directly compressed, thereby achieving the compression of the P frame.

[0140] The above embodiment is discussed using the previous frame as an example. In actual processing, in order to mine the relationship between frames, the target frame can refer to more than one frame. The motion information of the previous N frames can be referred to to make a stronger estimate of the probability of the target frame, which can further reduce the bpp value.

[0141] The encoding and decoding process of the above-mentioned embodiments of the present application can be the actual processing process of the video, and can also be applied to the training process. Among them, after the above-mentioned encoding network of the key frame outputs the second feature information of the reference frame and the first feature information of the target frame, the process of determining the compression information of the target frame based on the first feature information and the second feature information can be determined as the execution process of the compression network, so the compression network can be trained, and after the training is passed, it can be combined with the encoding network of the key frame to perform encoding processing on the non-key frames in the video.

[0142] Reference Figure 6 , shows a step flow chart of an embodiment of a video encoding training method of the present application.

[0143] Step 602: Input the reference frame and the target frame into the coding network respectively to obtain the second feature information of the reference frame and the first feature information of the target frame. The coding network is a key frame coding network, and the reference frame is the adjacent N frames of the target frame.

[0144] Step 604: input the first feature information and the second feature information into a compression network for processing to obtain compression information of the target frame.

[0145] The compression network determines the target feature information to be compressed based on the first feature information and the second feature information, and performs entropy coding on the target feature information to obtain compression information of the target frame.

[0146] The processing process of the compression network can refer to the description in the above embodiments, which will not be repeated here.

[0147] Step 606: determine a loss function based on the compression information of the target frame, and adjust the compression network based on the loss function.

[0148] The compression network also includes a parameter encoding and decoding network, wherein the first feature information and the second feature information are superimposed to determine the corresponding fourth feature information; the fourth feature information is passed through a parameter encoding network to determine the corresponding fifth feature information; the fifth feature information is entropy encoded to determine the corresponding parameter compression information. A corresponding parameter loss function can also be determined for the parameter compression information, and the parameter encoding network is adjusted based on the parameter loss function.

[0149] The loss function of the network can also be determined based on the above loss function and the parameter loss function. When the gradient is updated, the compression network is updated with gradients and iterated until convergence. The training process can be completed and used in the encoding process of non-key frames. A certain number of iterations can be set, and convergence is achieved when the number of iterations is reached.

[0150] For example, when training P frames, the two frames of images are input, and the corresponding first feature information y_hat and second feature information yt-1_hat are obtained through the encoding network of the I frame. The compression information bpp_y of the corresponding target frame and the parameter compression information bpp_z in the processing process are obtained after processing.

[0151] The loss function bpp=bpp_y+bpp_z of the training process can then be determined.

[0152] in: μ_z, are all randomly initialized learnable variables.

[0153] The video encoding and decoding method of the present application can be applied to various video processing scenarios, taking video transmission as an example:

[0154] Reference Figure 7 , shows a step flow chart of an embodiment of a video transmission method of the present application.

[0155] Step 702, obtaining video data.

[0156] Step 704: compress the image frames in the video data to determine compression information of each image frame.

[0157] Step 706: Transmit the compression information of the image frame, so that the compressed video code stream can be transmitted.

[0158] Wherein, step 704, compression processing of the target frame in the image data includes the following steps:

[0159] Step 7042: input the target frame into a coding network to obtain first feature information of the target frame, wherein the coding network is a coding network of a key frame.

[0160] Step 7044, obtaining second feature information of a reference frame processed by a coding network, wherein the reference frame is N adjacent frames of the target frame.

[0161] Step 7046: Determine the target feature information to be compressed based on the first feature information and the second feature information.

[0162] Step 7048, entropy encoding is performed on the target feature information to obtain compression information of the target frame.

[0163] Therefore, before the video is captured or needs to be transmitted in the storage end, each video frame can be encoded first, so that the video is compressed into a smaller bit stream. Non-key frames in the video can be compressed by the methods of the above-mentioned embodiments, and the encoding network of I frames can be reused, simplifying the encoding network structure and improving the encoding and decoding efficiency.

[0164] Based on the above embodiments, after receiving the compressed video code stream, the processing end can decode and perform subsequent processing. Taking playback as an example, it can be applied in various video playback scenarios such as live broadcast, on-demand, and online playback.

[0165] Reference Figure 8 , shows a step flow chart of an embodiment of a video playback method of the present application.

[0166] Step 802: Obtain compression information of each image frame in the video data.

[0167] Step 804: decompress the compressed information of each image frame to obtain a restored image frame.

[0168] Step 806: combine the image frames into video data according to the timestamps.

[0169] Step 808: play the video data.

[0170] The image frame includes a target frame, and decompressing the compressed information of the image frame includes the following steps:

[0171] Step 80402, obtaining first compression information of the target frame;

[0172] Step 80404, performing entropy decoding on the first compressed information to obtain target feature information;

[0173] Step 80406, determining second characteristic information of a reference frame, wherein the reference frame is N adjacent frames of the target frame, and the first characteristic information is second compressed information of the reference frame obtained by entropy decoding;

[0174] Step 80408, using the target feature information and the second feature information, determining the first feature information of the target frame;

[0175] Step 80410: input the first feature information into a decoding network to obtain a corresponding target frame, and the decoding network is a decoding network of a key frame.

[0176] On the basis of the above-mentioned embodiments, the encoding and decoding methods of each embodiment of the present application can also be integrated into corresponding encoders and decoders, and provide encoding and decoding services based on the integrated encoders and decoders in a Software-as-a-Service (SaaS) manner. SaaS can be understood as providing software services through the network.

[0177] The service provider can deploy the above encoders and decoders on the SaaS server (cluster) to provide encoding and decoding services, and service users, such as video producers, video players, video processors and other third-party users, can apply to use the encoding and decoding services. After the encoders and decoders are deployed on the server, corresponding calling interfaces can be provided so that when the encoding and decoding services are used, the encoders and decoders can be called based on the above calling interfaces to perform video encoding and decoding processing.

[0178] Take the encoding service as an example:

[0179] Reference Fig. 9 , showing a step flow chart of an embodiment of a processing method based on video encoding of the present application.

[0180] Step 902: deploy a video encoder and provide a first calling interface of the encoder.

[0181] Step 904: Receive encoding calling parameters through the first calling interface.

[0182] A service user using the video encoding and decoding service can call the encoder to perform video compression through the first calling interface. The encoding calling parameters can be sent through the first calling interface to call the corresponding encoder. The encoding calling parameters may include user parameters, encoding parameters and video parameters.

[0183] User parameters are various parameters related to the user, such as user identification, etc. to identify the user, and may also include permission information, etc. to verify whether the user has the authority to use the encoder, etc.

[0184] The encoding parameters are various parameters related to encoding, such as identification information of the required encoder, so as to determine the required encoder, and may also include other parameters corresponding to the encoding, such as compression rate, etc. The parameters of the encoding network in the encoder, as well as convolution parameters, etc., can be adjusted based on the different compression rates.

[0185] The video parameters are parameters corresponding to the video, such as the name and identifier of the video data, and the video address such as the storage address of the video data, so as to obtain the video data based on the video address. They may also include other parameters such as the format information of the video data, which can be set according to the needs.

[0186] Step 906: Acquire video data according to the video parameters, and determine an encoder according to the encoding parameters.

[0187] Step 908: Encode the video data using the encoder to obtain compression information of the video data.

[0188] Among them, for the target frame in the video data, an encoder is used to perform the following encoding processing steps: step 90802, obtaining the first feature information of the target frame through the encoding network of the encoder, wherein the encoding network is the encoding network of the key frame; step 90804, obtaining the second feature information of the reference frame processed by the encoding network, wherein the reference frame is the adjacent N frames of the target frame; step 90806, determining the target feature information to be compressed based on the first feature information and the second feature information; step 90808, entropy encoding the target feature information to obtain the compression information of the target frame.

[0189] Step 910: Feedback the encoding result through the second calling interface to obtain compression information of the video data according to the encoding result.

[0190] Based on the relationship between the image frames in the video data, the compression information of the video data can also constitute a compressed code stream for transmission.

[0191] Based on the above encoding method, an encoder can be integrated, so the encoding method of the encoder can refer to the description of the above embodiment. Based on SaaS technology, the encoder is deployed on the server, thereby providing encoding services to service users through the network, thereby conveniently using software service resources.

[0192] Take the decoding service as an example, which corresponds to the above encoding service:

[0193] Reference Fig.10 , showing a step flow chart of an embodiment of a processing method based on video decoding of the present application.

[0194] Step 1002: deploy a video decoder and provide a third calling interface of the decoder.

[0195] Step 1004: Receive decoding calling parameters through the third calling interface, where the decoding calling parameters include video parameters and decoding parameters.

[0196] The service user using the video encoding and decoding service can call the decoder through the third calling interface to decode the video compression information to obtain the video data. The calling parameters can be sent through the third calling interface to call the corresponding encoder. The decoding calling parameters may include user parameters, decoding parameters and video compression parameters.

[0197] User parameters are various parameters related to the user, such as user identification, etc. to identify the user, and may also include permission information, etc. to verify whether the user has the authority to use the decoder, etc.

[0198] The decoding parameters are various parameters related to decoding, such as identification information of the required decoder, so that the required decoder can be determined, and the decoder corresponds to the encoder used, and can also include other parameters corresponding to decoding, such as compression rate of encoding, etc. The parameters of the decoding network in the decoder, as well as convolution parameters, etc. can be adjusted based on different compression rates. The decoding process corresponds to the encoding process.

[0199] The video compression parameters are parameters corresponding to the compressed video, such as the name and identifier of the video data, and the storage address of the compression information of the video, so as to obtain the video data based on the storage address. They may also include other parameters such as the format information and frame rate of the video data, which can be set according to the needs.

[0200] Step 1006: Obtain compression information of the video through the video parameters, and determine a decoder according to the decoding parameters.

[0201] Step 1008: Use the decoder to decode the compressed information to obtain corresponding video data.

[0202] Among them, for the target frame in the video data, a decoder is used to perform the following decoding steps: step 100802, entropy decoding is performed on the first compressed information of the target frame to obtain target feature information; step 100804, second feature information of a reference frame is determined, wherein the reference frame is N adjacent frames of the target frame, and the first feature information is obtained by entropy decoding the second compressed information of the reference frame; step 100806, the target feature information and the second feature information are used to determine the first feature information of the target frame; step 100808, the first feature information is input into a decoding network to obtain a corresponding target frame, and the decoding network is a decoding network of a key frame.

[0203] After each image frame (including key frames and non-key frames) is obtained through decoding, it can be synthesized into corresponding video data.

[0204] Step 1010: Feedback the decoding result through the fourth calling interface to obtain the video data according to the decoding result.

[0205] Based on the above decoding method, a decoder can be integrated, so the decoding method of the decoder can refer to the description of the above embodiment. Based on SaaS technology, a decoder corresponding to the encoder is deployed on the server, thereby providing decoding services to service users through the network, thereby conveniently using software service resources.

[0206] The embodiment of the present application does not perform motion prediction coding at the pixel level of the image, but instead passes both key frames and non-key frames through the key frame encoding and decoding network to generate feature distribution, and performs motion prediction at the feature distribution level to reduce the entropy of non-key frames. Performing non-key frame coding at the feature distribution level has at least the following advantages: (1) Key frames and non-key frames share the same encoding and decoding network, which greatly simplifies the network structure. Through one set of encoding and decoding networks, the mining of motion information is placed at the feature level, which can provide more room for entropy optimization; (2) Since there is no need to refer to the recovery map, the encoding and decoding are separated, and there is no need to perform complex decoding operations during the encoding process, thereby improving the encoding and decoding efficiency; (3) If the key frames and non-key frames are in the same scene, the quality of the recovery map remains constant and there is no attenuation. Without considering the loss of frames during the transmission process, the GOP length can theoretically be designed to be infinitely long; (4) Combined with the interpolation multi-rate key frame model, one model can solve the compression of key frames, non-key frames and different fine rate controls, and the compression quality is controllable.

[0207] It should be noted that, for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the described order of actions, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.

[0208] On the basis of the above embodiments, this embodiment further provides a video encoding device, which is applied to electronic devices such as terminal devices and servers.

[0209] Reference Fig.11 , shows a structural block diagram of an embodiment of a video encoding device of the present application, which may specifically include the following modules:

[0210] The encoding module 1102 is used to input the target frame into the encoding network to obtain the first feature information of the target frame, wherein the encoding network is the encoding network of the key frame; and obtain the second feature information of the reference frame processed by the encoding network, wherein the reference frame is the adjacent N frames of the target frame.

[0211] The motion estimation module 1104 is used to determine the target feature information to be compressed according to the first feature information and the second feature information.

[0212] The compression module 1106 is used to perform entropy coding on the target feature information to obtain compression information of the target frame.

[0213] The motion estimation module 1104 is used to perform motion analysis on the first feature information and the second feature information to determine the target feature information to be compressed.

[0214] The motion estimation module 1104 is used to subtract the first feature information from the second feature information to determine the target feature information to be compressed; and / or calculate the optical flow motion information of the first feature information and the second feature information as the target feature information to be compressed; and / or perform feature alignment on the first feature information and the second feature information to determine the target feature information to be compressed.

[0215] The compression module 1106 is further used to calculate estimation parameters based on the first feature information, the second feature information and the target feature information.

[0216] The compression module 1106 is used to perform entropy coding on the target feature information according to the estimated parameters to obtain compressed information of the target frame.

[0217] The compression module 1106 is used to determine the corresponding third feature information based on the first feature information and the second feature information; and calculate the estimation parameter based on the target feature information and the third feature information.

[0218] The compression module 1106 is used to superimpose the first feature information and the second feature information to determine the corresponding fourth feature information; pass the fourth feature information through a parameter coding network to determine the corresponding fifth feature information; entropy encode the fifth feature information to determine the corresponding parameter compression information; entropy decode the parameter compression information to determine the corresponding sixth feature information; pass the sixth feature information through a parameter decoding network to determine the corresponding third feature information.

[0219] Compression module 1106 is used to perform convolution processing on the second feature information to obtain a first convolution result; perform convolution processing on the target feature information to obtain a second convolution result; superimpose the first convolution result, the second convolution result and the third feature information to obtain seventh feature information; and perform convolution processing on the seventh feature information to obtain corresponding estimation parameters.

[0220] In summary, the encoding network that can reuse key frames is used to encode non-key frames to determine the first feature information. Combined with the second feature information of the reference frame of the non-key frame, the target feature information to be compressed can be determined, and then the target feature information is entropy encoded to obtain compressed information, thereby improving the encoding efficiency.

[0221] On the basis of the above embodiments, this embodiment further provides a video decoding device, which is applied to electronic devices such as terminal devices and servers.

[0222] Reference Fig.12 , shows a structural block diagram of an embodiment of a video decoding device of the present application, which may specifically include the following modules:

[0223] The decompression module 1202 is used to obtain first compressed information of a target frame; perform entropy decoding on the first compressed information to obtain target feature information; determine second feature information of a reference frame, wherein the reference frame is N adjacent frames of the target frame, and the first feature information is obtained by entropy decoding the second compressed information of the reference frame;

[0224] A motion recovery module 1204 is used to determine first feature information of the target frame using the target feature information and the second feature information;

[0225] The decoding module 1206 is used to input the first feature information into a decoding network to obtain a corresponding target frame, and the decoding network is a decoding network of a key frame.

[0226] The motion recovery module 1204 is used to perform motion analysis on the target frame according to the target feature information and the second feature information to determine the first feature information of the target frame.

[0227] The motion recovery module 1204 is used to add the target feature information and the second feature information to determine the first feature information of the target frame; and / or, analyze the optical flow features of the target frame based on the second feature information and the target feature information to determine the first feature information of the target frame; and / or, perform feature shift on the second feature information based on the target feature information to determine the first feature information of the target frame.

[0228] The decompression module 1202 is used to obtain estimated parameters of the target frame; and to perform entropy decoding on the first compressed information according to the estimated parameters to obtain target feature information.

[0229] In summary, for the compressed information of non-key frames, the corresponding target feature information can be losslessly restored based on entropy decoding. The decoding of non-key frames needs to refer to the reference frame, so the second feature information of the reference frame can be obtained, and then based on the target feature information and the second feature information, the corresponding first feature information is obtained, and then the decoding network of the key frame is reused to decode the non-key frame to obtain the non-key frame, which can quickly restore the image and improve the decoding efficiency.

[0230] Since the P frame reuses the same encoding (encoder) network and decoding (decoder) network as the I frame, the target frame and the reference frame have high image similarity, and the quality of the restored image is similar. The existing video compression method does not have the problem of inter-frame quality attenuation in the scheme of decoding with reference to the reference frame restoration image. The present application can perform lossless recovery through entropy decoding and entropy encoding, and can mine the relationship between the feature levels of each other, so that the pixel depth value of the compressed P frame is lower than the pixel depth value of the I frame, thereby achieving compression of the P frame.

[0231] On the basis of the above embodiments, this embodiment further provides a video transmission device, which is applied to electronic devices such as terminal devices and servers.

[0232] Reference Fig.13 , shows a structural block diagram of an embodiment of a video transmission device of the present application, which may specifically include the following modules:

[0233] The video acquisition module 1302 is used to acquire video data.

[0234] The video compression module 1304 is used to compress the image frames in the video data and determine the compression information of each image frame.

[0235] The video transmission module 1306 is used to transmit the compression information of the image frame.

[0236] Among them, the video compression module 1304 is used to input the target frame into the encoding network to obtain the first feature information of the target frame, wherein the encoding network is the encoding network of the key frame; obtain the second feature information of the reference frame processed by the encoding network, wherein the reference frame is the adjacent N frames of the target frame; determine the target feature information to be compressed based on the first feature information and the second feature information; and perform entropy encoding on the target feature information to obtain the compression information of the target frame.

[0237] On the basis of the above embodiments, this embodiment further provides a video playback device, which is applied to electronic devices such as terminal devices and servers.

[0238] Reference Fig.14 , shows a structural block diagram of an embodiment of a video playback device of the present application, which may specifically include the following modules:

[0239] The video receiving module 1402 is used to obtain compression information of each image frame in the video data.

[0240] The video decompression module 1404 is used to decompress the compressed information of each image frame to obtain a restored image frame; and combine each image frame into video data according to a timestamp.

[0241] The video playing module 1406 is used to play the video data.

[0242] Among them, the image frame includes a target frame, and a video decompression module is used to obtain first compression information of the target frame; entropy decoding is performed on the first compression information to obtain target feature information; second feature information of a reference frame is determined, wherein the reference frame is N adjacent frames of the target frame, and the first feature information is obtained by entropy decoding the second compression information of the reference frame; the first feature information of the target frame is determined using the target feature information and the second feature information; the first feature information is input into a decoding network to obtain a corresponding target frame, and the decoding network is a decoding network of a key frame.

[0243] On the basis of the above embodiments, this embodiment further provides a video coding training device, which is applied to electronic devices such as terminal devices and servers.

[0244] Reference Fig.15 , shows a structural block diagram of an embodiment of a video coding training device of the present application, which may specifically include the following modules:

[0245] The pre-coding module 1502 is used to input the reference frame and the target frame into the coding network respectively to obtain the second feature information of the reference frame and the first feature information of the target frame, wherein the coding network is a key frame coding network, wherein the reference frame is the adjacent N frames of the target frame.

[0246] The compression processing module 1504 is used to input the first feature information and the second feature information into the compression network for processing to obtain the compression information of the target frame, wherein the compression network determines the target feature information to be compressed based on the first feature information and the second feature information, and performs entropy encoding on the target feature information to obtain the compression information of the target frame.

[0247] The training module 1506 is used to determine a loss function according to the compression information of the target frame, and adjust the compression network according to the loss function.

[0248] On the basis of the above-mentioned embodiment, this embodiment further provides a processing device based on video coding, which is applied to electronic devices such as servers (clusters).

[0249] The encoder deployment module is used to deploy the video encoder and provide a first calling interface of the encoder.

[0250] The encoder calling module is used to receive encoding calling parameters through the first calling interface, and the encoding calling parameters include encoding parameters and video parameters.

[0251] The encoder compression module is used to obtain video data according to the video parameters and determine the encoder according to the encoding parameters; the encoder is used to encode the video data to obtain compression information of the video data.

[0252] The feedback module is used to feed back the encoding result through the second calling interface to obtain the compression information of the video data according to the encoding result.

[0253] Among them, the encoding compression module is used to use an encoder to perform the following encoding processing on the target frame in the video data: obtain the first feature information of the target frame through the encoding network of the encoder, wherein the encoding network is the encoding network of the key frame; obtain the second feature information of the reference frame processed by the encoding network, wherein the reference frame is the adjacent N frames of the target frame; determine the target feature information to be compressed based on the first feature information and the second feature information; perform entropy encoding on the target feature information to obtain compression information of the target frame.

[0254] On the basis of the above-mentioned embodiment, this embodiment further provides a processing device based on decoding and encoding, which is applied to electronic devices such as servers (clusters).

[0255] A decoder deployment module, used to deploy a video decoder and provide a third calling interface of the decoder;

[0256] A decoder calling module, used for receiving decoding calling parameters through the third calling interface, wherein the decoding calling parameters include video compression parameters and decoding parameters;

[0257] A decoder processing module, used to obtain compression information of the video through the video compression parameters, and determine the decoder according to the decoding parameters; use the decoder to decode the compression information to obtain corresponding video data;

[0258] A decoding feedback module, used to feed back a decoding result through a fourth calling interface, and obtain the video data according to the decoding result;

[0259] Among them, the decoder processing module is used to use a decoder to perform the following decoding steps for the target frame in the video data: entropy decoding the first compressed information of the target frame to obtain target feature information; determining the second feature information of the reference frame, wherein the reference frame is N adjacent frames of the target frame, and the first feature information is the second compressed information of the reference frame obtained by entropy decoding; using the target feature information and the second feature information to determine the first feature information of the target frame; inputting the first feature information into a decoding network to obtain a corresponding target frame, and the decoding network is a decoding network of a key frame.

[0260] The embodiment of the present application does not perform motion prediction coding at the pixel level of the image, but instead passes both I frames and P frames through the encoding and decoding network of the I frame to generate feature distribution, and performs motion prediction at the feature distribution level to reduce the entropy of the P frame. Encoding the P frame at the feature distribution level has at least the following advantages: (1) I frames and P frames share the encoding and decoding network, which greatly simplifies the network structure. Through one set of encoding and decoding networks, the mining of motion information is placed at the feature level, which can have more room for entropy optimization; (2) Since there is no need to refer to the recovery map, the encoding and decoding are separated, and there is no need to perform complex decoding operations during the encoding process, thereby improving the encoding and decoding efficiency; (3) If the I frame and the P frame are in the same scene, the quality of the recovery map remains constant and there is no attenuation. Without considering the loss of frames during the transmission process, the GOP length can theoretically be designed to be infinitely long; (4) Combined with the interpolation multi-rate I frame model, one model can solve the compression of I frames, P frames and different fine rate controls, and the compression quality is controllable.

[0261] The embodiment of the present application also provides a non-volatile readable storage medium, which stores one or more modules (programs). When the one or more modules are applied to a device, the device can execute instructions (instructions) of each method step in the embodiment of the present application.

[0262] The present application embodiment provides one or more machine-readable media on which instructions are stored, and when executed by one or more processors, an electronic device executes one or more of the methods described in the above embodiments. In the present application embodiment, the electronic device includes various types of devices such as terminal devices and servers (clusters).

[0263] The embodiments of the present disclosure may be implemented as a device configured as desired using any appropriate hardware, firmware, software, or any combination thereof, and the device may include electronic devices such as terminal devices and servers (clusters). Fig.16 An exemplary apparatus 1600 that can be used to implement various embodiments described in this application is schematically illustrated.

[0264] For one embodiment, Fig.16 An exemplary apparatus 1600 is shown having one or more processors 1602, a control module (chip set) 1604 coupled to at least one of the (one or more) processors 1602, a memory 1606 coupled to the control module 1604, a non-volatile memory (NVM) / storage device 1608 coupled to the control module 1604, one or more input / output devices 1610 coupled to the control module 1604, and a network interface 1612 coupled to the control module 1604.

[0265] The processor 1602 may include one or more single-core or multi-core processors, and the processor 1602 may include any combination of general-purpose processors or special-purpose processors (such as graphics processors, application processors, baseband processors, etc.). In some embodiments, the device 1600 can be used as a terminal device, server (cluster), etc. described in the embodiments of the present application.

[0266] In some embodiments, the device 1600 may include one or more computer-readable media (e.g., memory 1606 or NVM / storage device 1608) having instructions 1614 and one or more processors 1602 configured to execute the instructions 1614 in combination with the one or more computer-readable media to implement a module to perform the actions described in the present disclosure.

[0267] For one embodiment, the control module 1604 may include any suitable interface controller to provide any suitable interface to at least one of the processor(s) 1602 and / or any suitable device or component in communication with the control module 1604 .

[0268] The control module 1604 may include a memory controller module to provide an interface to the memory 1606. The memory controller module may be a hardware module, a software module, and / or a firmware module.

[0269] The memory 1606 may be used, for example, to load and store data and / or instructions 1614 for the device 1600. For one embodiment, the memory 1606 may include any suitable volatile memory, such as a suitable DRAM. In some embodiments, the memory 1606 may include double data rate type four synchronous dynamic random access memory (DDR4 SDRAM).

[0270] For one embodiment, control module 1604 may include one or more input / output controllers to provide an interface to NVM / storage device 1608 and input / output device(s) 1610 .

[0271] For example, NVM / storage 1608 may be used to store data and / or instructions 1614. NVM / storage 1608 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable non-volatile storage device(s) (e.g., one or more hard disk drives (HDDs), one or more compact disk (CD) drives, and / or one or more digital versatile disk (DVD) drives).

[0272] NVM / storage device 1608 may include storage resources that are physically part of the device on which apparatus 1600 is installed, or it may be accessible to the device without being part of the device. For example, NVM / storage device 1608 may be accessed via input / output device(s) 1610 over a network.

[0273] (One or more) input / output devices 1610 may provide an interface for the apparatus 1600 to communicate with any other appropriate device, and the input / output device 1610 may include a communication component, an audio component, a sensor component, etc. The network interface 1612 may provide an interface for the apparatus 1600 to communicate through one or more networks, and the apparatus 1600 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, for example, accessing a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, etc., or a combination thereof for wireless communication.

[0274] For one embodiment, at least one of the processor(s) 1602 may be packaged together with the logic of one or more controllers (e.g., a memory controller module) of the control module 1604. For one embodiment, at least one of the processor(s) 1602 may be packaged together with the logic of one or more controllers of the control module 1604 to form a system-in-package (SiP). For one embodiment, at least one of the processor(s) 1602 may be integrated on the same die with the logic of one or more controllers of the control module 1604. For one embodiment, at least one of the processor(s) 1602 may be integrated on the same die with the logic of one or more controllers of the control module 1604 to form a system-on-chip (SoC).

[0275] In various embodiments, the device 1600 may be, but is not limited to, a terminal device such as a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.). In various embodiments, the device 1600 may have more or fewer components and / or a different architecture. For example, in some embodiments, the device 1600 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touch screen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.

[0276] Among them, the main control chip can be used as a processor or control module in the detection device, sensor data, location information, etc. are stored in a memory or NVM / storage device, the sensor group can be used as an input / output device, and the communication interface may include a network interface.

[0277] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0278] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0279] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal 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 data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal 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.

[0280] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product 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.

[0281] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal 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.

[0282] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0283] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0284] The above provides a detailed introduction to a video encoding method and device, a video decoding method and device, a video transmission method and device, a video playback method and device, a video encoding training method and device, a processing method and device based on video encoding and decoding, an electronic device and a storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A video encoding method, characterized in that: The method comprises: Inputting a target frame into a coding network to obtain first feature information of the target frame, wherein the coding network is a coding network of a key frame; Acquire second feature information of a reference frame processed by an encoding network, wherein the reference frame is N adjacent frames of the target frame, and compression of the target frame refers to the reference frame; Performing motion analysis on the first feature information and the second feature information to determine target feature information to be compressed; Calculating an estimation parameter based on the first feature information, the second feature information and the target feature information; Performing entropy coding on the target feature information according to the estimated parameters to obtain compressed information of the target frame; The step of performing motion analysis on the first feature information and the second feature information to determine the target feature information to be compressed includes any one of the following steps: Subtracting the first feature information from the second feature information to determine target feature information to be compressed; Calculate the optical flow motion information of the first feature information and the second feature information as the target feature information to be compressed; Feature alignment is performed on the first feature information and the second feature information to determine target feature information to be compressed.

2. The method according to claim 1, characterized in that Calculating an estimation parameter based on the first feature information, the second feature information, and the target feature information includes: Determine corresponding third feature information according to the first feature information and the second feature information; An estimation parameter is calculated based on the target feature information and the third feature information.

3. The method according to claim 2, characterized in that The determining corresponding third feature information according to the first feature information and the second feature information includes: Superimposing the first characteristic information and the second characteristic information to determine corresponding fourth characteristic information; Passing the fourth feature information through a parameter coding network to determine corresponding fifth feature information; Performing entropy coding on the fifth characteristic information to determine corresponding parameter compression information; Performing entropy decoding on the parameter compression information to determine corresponding sixth feature information; The sixth characteristic information is passed through a parameter decoding network to determine the corresponding third characteristic information.

4. The method according to claim 2, characterized in that: The calculating the estimated parameter according to the target feature information and the third feature information includes: Performing convolution processing on the second feature information to obtain a first convolution result; Performing convolution processing on the target feature information to obtain a second convolution result; Superimposing the first convolution result, the second convolution result and the third feature information to obtain seventh feature information; Convolution processing is performed on the seventh feature information to obtain corresponding estimation parameters.

5. A video decoding method, characterized in that: include: Acquire first compression information of a target frame; Get the estimated parameters of the target frame; Performing entropy decoding on the first compressed information according to the estimated parameters to obtain target feature information; Determine second characteristic information of a reference frame, wherein the reference frame is N adjacent frames of a target frame, compression of the target frame refers to the reference frame, and the second characteristic information is second compression information of the reference frame obtained by entropy decoding; Performing motion analysis on the target frame according to the target feature information and the second feature information to determine the first feature information of the target frame; Inputting the first feature information into a decoding network to obtain a corresponding target frame, wherein the decoding network is a decoding network of a key frame; The step of performing motion analysis on the target frame according to the target feature information and the second feature information to determine the first feature information of the target frame comprises any one of the following steps: Adding the target feature information and the second feature information to determine the first feature information of the target frame; Analyze the optical flow characteristics of the target frame according to the second characteristic information and the target characteristic information to determine the first characteristic information of the target frame; The second characteristic information is characteristically offset according to the target characteristic information to determine the first characteristic information of the target frame.

6. A video transmission method, characterized in that: The method comprises: Get video data; Performing compression processing on the image frames in the video data to determine compression information of each image frame; Transmitting compression information of the image frame; The compression process for the target frame in the image data includes the following steps: Inputting a target frame into a coding network to obtain first feature information of the target frame, wherein the coding network is a coding network of a key frame; Acquire second feature information of a reference frame processed by an encoding network, wherein the reference frame is N adjacent frames of the target frame, and compression of the target frame refers to the reference frame; Performing motion analysis on the first feature information and the second feature information to determine target feature information to be compressed; Calculating an estimation parameter based on the first feature information, the second feature information and the target feature information; Performing entropy coding on the target feature information according to the estimated parameters to obtain compressed information of the target frame; The step of performing motion analysis on the first feature information and the second feature information to determine the target feature information to be compressed includes any one of the following steps: Subtracting the first feature information from the second feature information to determine target feature information to be compressed; Calculate the optical flow motion information of the first feature information and the second feature information as the target feature information to be compressed; Feature alignment is performed on the first feature information and the second feature information to determine target feature information to be compressed.

7. A video playback method, characterized in that: The method comprises: Obtaining compression information of each image frame in the video data; Decompressing the compressed information of each image frame to obtain a restored image frame; Combining the image frames into video data according to the timestamps; Playing the video data; The image frame includes a target frame, and decompressing the compressed information of the image frame includes the following steps: Acquire first compression information of a target frame; Get the estimated parameters of the target frame; Performing entropy decoding on the first compressed information according to the estimated parameters to obtain target feature information; Determine second characteristic information of a reference frame, wherein the reference frame is N adjacent frames of a target frame, compression of the target frame refers to the reference frame, and the second characteristic information is second compression information of the reference frame obtained by entropy decoding; Performing motion analysis on the target frame according to the target feature information and the second feature information to determine the first feature information of the target frame; Inputting the first feature information into a decoding network to obtain a corresponding target frame, wherein the decoding network is a decoding network of a key frame; The step of performing motion analysis on the target frame according to the target feature information and the second feature information to determine the first feature information of the target frame comprises any one of the following steps: Adding the target feature information and the second feature information to determine the first feature information of the target frame; Analyze the optical flow characteristics of the target frame according to the second characteristic information and the target characteristic information to determine the first characteristic information of the target frame; The second characteristic information is characteristically offset according to the target characteristic information to determine the first characteristic information of the target frame.

8. A video coding training method, characterized in that: The method comprises: Inputting a reference frame and a target frame into a coding network respectively, obtaining second feature information of the reference frame and first feature information of the target frame, wherein the coding network is a key frame coding network, wherein the reference frame is N adjacent frames of the target frame, and compression of the target frame refers to the reference frame; Inputting the first feature information and the second feature information into a compression network for processing to obtain compressed information of a target frame, wherein the compression network performs motion analysis on the first feature information and the second feature information to determine the target feature information to be compressed, and calculates an estimated parameter based on the first feature information, the second feature information and the target feature information, and performs entropy coding on the target feature information based on the estimated parameter to obtain compressed information of the target frame; Determining a loss function according to the compression information of the target frame, and adjusting the compression network according to the loss function; The step of performing motion analysis on the first feature information and the second feature information to determine the target feature information to be compressed includes any one of the following steps: Adding the target feature information and the second feature information to determine the first feature information of the target frame; Analyze the optical flow characteristics of the target frame according to the second characteristic information and the target characteristic information to determine the first characteristic information of the target frame; The second characteristic information is characteristically offset according to the target characteristic information to determine the first characteristic information of the target frame.

9. A processing method based on video coding, characterized in that: The method comprises: Deploy a video encoder and provide a first calling interface of the encoder; Receiving encoding calling parameters through the first calling interface, the encoding calling parameters including encoding parameters and video parameters; Acquire video data according to the video parameters, and determine an encoder according to the encoding parameters; Encoding the video data using the encoder to obtain compression information of the video data; Feedback the encoding result through the second calling interface to obtain compression information of the video data according to the encoding result; Wherein, for the target frame in the video data, an encoder is used to perform the following encoding processing steps: Obtaining first feature information of the target frame through an encoding network of an encoder, wherein the encoding network is an encoding network of a key frame; Acquire second feature information of a reference frame processed by an encoding network, wherein the reference frame is N adjacent frames of the target frame, and compression of the target frame refers to the reference frame; Performing motion analysis on the first feature information and the second feature information to determine target feature information to be compressed; Calculating an estimation parameter based on the first feature information, the second feature information and the target feature information; Performing entropy coding on the target feature information according to the estimated parameters to obtain compressed information of the target frame; The step of performing motion analysis on the first feature information and the second feature information to determine the target feature information to be compressed includes any one of the following steps: Subtracting the first feature information from the second feature information to determine target feature information to be compressed; Calculate the optical flow motion information of the first feature information and the second feature information as the target feature information to be compressed; Feature alignment is performed on the first feature information and the second feature information to determine target feature information to be compressed.

10. A processing method based on video decoding, characterized in that: The method comprises: Deploy a video decoder and provide a third calling interface of the decoder; Receiving decoding calling parameters through the third calling interface, the decoding calling parameters including video compression parameters and decoding parameters; Obtaining compression information of the video through the video compression parameters, and determining a decoder according to the decoding parameters; Decoding the compressed information using the decoder to obtain corresponding video data; Feedback the decoding result through the fourth calling interface to obtain the video data according to the decoding result; Wherein, for the target frame in the video data, a decoder is used to perform the following decoding steps: Get the estimated parameters of the target frame; Performing entropy decoding on the first compressed information according to the estimated parameters to obtain target feature information; Determine second characteristic information of a reference frame, wherein the reference frame is N adjacent frames of a target frame, compression of the target frame refers to the reference frame, and the second characteristic information is second compression information of the reference frame obtained by entropy decoding; Performing motion analysis on the target frame according to the target feature information and the second feature information to determine the first feature information of the target frame; Inputting the first feature information into a decoding network to obtain a corresponding target frame, wherein the decoding network is a decoding network of a key frame; The step of performing motion analysis on the target frame according to the target feature information and the second feature information to determine the first feature information of the target frame comprises any one of the following steps: Adding the target feature information and the second feature information to determine the first feature information of the target frame; Analyze the optical flow characteristics of the target frame according to the second characteristic information and the target characteristic information to determine the first characteristic information of the target frame; The second characteristic information is characteristically offset according to the target characteristic information to determine the first characteristic information of the target frame.

11. A video encoding device, characterized in that: The device comprises: The encoding module is used to input the target frame into the encoding network to obtain the first feature information of the target frame, wherein the encoding network is the encoding network of the key frame; and obtain the second feature information of the reference frame processed by the encoding network, wherein the reference frame is the adjacent N frames of the target frame, and the compression of the target frame refers to the reference frame; A motion estimation module, used for performing motion analysis on the first feature information and the second feature information to determine target feature information to be compressed; A compression module, used to calculate an estimated parameter according to the first feature information, the second feature information and the target feature information, and perform entropy coding on the target feature information according to the estimated parameter to obtain compressed information of the target frame; Among them, the motion estimation module is used to subtract the first feature information from the second feature information to determine the target feature information to be compressed; or, calculate the optical flow motion information of the first feature information and the second feature information as the target feature information to be compressed; or, perform feature alignment on the first feature information and the second feature information to determine the target feature information to be compressed.

12. A video decoding device, characterized in that: The device comprises: A decompression module is used to obtain first compressed information of a target frame; obtain estimated parameters of the target frame; perform entropy decoding on the first compressed information according to the estimated parameters to obtain target feature information; determine second feature information of a reference frame, wherein the reference frame is N adjacent frames of the target frame, the compression of the target frame refers to the reference frame, and the second feature information is obtained by entropy decoding the second compressed information of the reference frame; A motion recovery module, used for performing motion analysis on a target frame according to the target feature information and the second feature information, and determining the first feature information of the target frame; A decoding module, used for inputting the first feature information into a decoding network to obtain a corresponding target frame, wherein the decoding network is a decoding network of a key frame; The motion recovery module is used to add the target feature information and the second feature information to determine the first feature information of the target frame; or, to analyze the optical flow features of the target frame based on the second feature information and the target feature information to determine the first feature information of the target frame; or, to perform feature offset on the second feature information based on the target feature information to determine the first feature information of the target frame.

13. A video transmission device, characterized in that: The device comprises: A video acquisition module, used to acquire video data; A video compression module, used to compress the image frames in the video data and determine the compression information of each image frame; A video transmission module, used for transmitting the compressed information of the image frame; Among them, the video compression module is used to input the target frame into the encoding network to obtain the first feature information of the target frame, wherein the encoding network is the encoding network of the key frame; obtain the second feature information of the reference frame processed by the encoding network, wherein the reference frame is the adjacent N frames of the target frame, and the compression of the target frame refers to the reference frame; perform motion analysis on the first feature information and the second feature information to determine the target feature information to be compressed; calculate the estimation parameters based on the first feature information, the second feature information and the target feature information; perform entropy encoding on the target feature information based on the estimated parameters to obtain the compression information of the target frame; wherein the motion analysis of the first feature information and the second feature information to determine the target feature information to be compressed includes any one of the following steps: subtracting the first feature information and the second feature information to determine the target feature information to be compressed; calculating the optical flow motion information of the first feature information and the second feature information as the target feature information to be compressed; feature alignment of the first feature information and the second feature information to determine the target feature information to be compressed.

14. A video playback device, characterized in that: The device comprises: A video receiving module, used to obtain compression information of each image frame in the video data; A video decompression module, used for decompressing the compressed information of each image frame to obtain a restored image frame; and combining each image frame into video data according to a timestamp; A video playback module, used for playing the video data; The image frame includes a target frame, a video decompression module, and is used to obtain first compression information of the target frame; obtain estimated parameters of the target frame; perform entropy decoding on the first compression information according to the estimated parameters to obtain target feature information; determine second feature information of a reference frame, wherein the reference frame is N adjacent frames of the target frame, the compression of the target frame refers to the reference frame, and the second feature information is obtained by entropy decoding the second compression information of the reference frame; perform motion analysis on the target frame according to the target feature information and the second feature information to determine the first feature information of the target frame; input the first feature information into a decoding network to obtain a corresponding target frame, and the decoding network is a decoding network of a key frame, wherein the performing motion analysis on the target frame according to the target feature information and the second feature information to determine the first feature information of the target frame includes any one of the following steps: adding the target feature information and the second feature information to determine the first feature information of the target frame; analyzing the optical flow features of the target frame according to the second feature information and the target feature information to determine the first feature information of the target frame; and feature shifting the second feature information according to the target feature information to determine the first feature information of the target frame.

15. A video coding training device, characterized in that: The device comprises: A pre-coding module, used for inputting a reference frame and a target frame into a coding network respectively, and obtaining second feature information of the reference frame and first feature information of the target frame, wherein the coding network is a key frame coding network, wherein the reference frame is N adjacent frames of the target frame, and compression of the target frame refers to the reference frame; A compression processing module, used for inputting the first feature information and the second feature information into a compression network for processing to obtain compressed information of a target frame, wherein the compression network performs motion analysis on the first feature information and the second feature information to determine the target feature information to be compressed, and calculates an estimated parameter based on the first feature information, the second feature information and the target feature information, and performs entropy coding on the target feature information based on the estimated parameter to obtain compressed information of the target frame; A training module, used to determine a loss function according to the compression information of the target frame, and adjust the compression network according to the loss function; Among them, the motion analysis of the first feature information and the second feature information to determine the target feature information to be compressed includes any one of the following steps: adding the target feature information and the second feature information to determine the first feature information of the target frame; analyzing the optical flow characteristics of the target frame based on the second feature information and the target feature information to determine the first feature information of the target frame; performing feature shifting on the second feature information based on the target feature information to determine the first feature information of the target frame.

16. A processing device based on video coding, characterized in that: The device comprises: An encoder deployment module, used to deploy a video encoder and provide a first calling interface of the encoder; An encoder calling module, used for receiving encoding calling parameters through the first calling interface, wherein the encoding calling parameters include encoding parameters and video parameters; An encoder compression module, used to obtain video data according to the video parameters, and determine an encoder according to the encoding parameters; use the encoder to encode the video data to obtain compression information of the video data; A feedback module, used to feed back the encoding result through the second calling interface, so as to obtain the compression information of the video data according to the encoding result; The encoding compression module is used to perform the following encoding processing on the target frame in the video data using an encoder: obtaining the first feature information of the target frame through the encoding network of the encoder, wherein the encoding network is the encoding network of the key frame; obtaining the second feature information of the reference frame processed by the encoding network, wherein the reference frame is the adjacent N frames of the target frame, and the compression of the target frame refers to the reference frame; performing motion analysis on the first feature information and the second feature information to determine the target feature information to be compressed, and calculating the estimated parameters based on the first feature information, the second feature information and the target feature information; performing entropy encoding on the target feature information based on the estimated parameters to obtain the compressed information of the target frame; wherein the performing motion analysis on the first feature information and the second feature information to determine the target feature information to be compressed includes any one of the following steps: subtracting the first feature information and the second feature information to determine the target feature information to be compressed; calculating the optical flow motion information of the first feature information and the second feature information as the target feature information to be compressed; and performing feature alignment on the first feature information and the second feature information to determine the target feature information to be compressed.

17. A processing device based on video decoding, characterized in that: The device comprises: A decoder deployment module, used to deploy a video decoder and provide a third calling interface of the decoder; A decoder calling module, used for receiving decoding calling parameters through the third calling interface, wherein the decoding calling parameters include video compression parameters and decoding parameters; A decoder processing module, used to obtain compression information of the video through the video compression parameters, and determine the decoder according to the decoding parameters; use the decoder to decode the compression information to obtain corresponding video data; A decoding feedback module, used to feed back a decoding result through a fourth calling interface, and obtain the video data according to the decoding result; Wherein, the decoder processing module is used to perform the following decoding steps for the target frame in the video data using a decoder: obtaining estimated parameters of the target frame; entropy decoding the first compressed information according to the estimated parameters to obtain target feature information; determining the second feature information of the reference frame, wherein the reference frame is the adjacent N frames of the target frame, the compression of the target frame refers to the reference frame, and the second feature information is the second compressed information of the reference frame obtained by entropy decoding; performing motion analysis on the target frame according to the target feature information and the second feature information to determine the first feature information of the target frame; inputting the first feature information into a decoding network to obtain a corresponding target frame, and the decoding network is a decoding network of a key frame; performing motion analysis on the target frame according to the target feature information and the second feature information to determine the first feature information of the target frame, including any one of the following steps: adding the target feature information and the second feature information to determine the first feature information of the target frame; analyzing the optical flow features of the target frame according to the second feature information and the target feature information to determine the first feature information of the target frame; performing feature offset on the second feature information according to the target feature information to determine the first feature information of the target frame.

18. An electronic device, characterized in that: include: processor; and A memory having executable codes stored thereon, which, when executed, causes the processor to execute the method according to any one of claims 1-4, 6, 8, and 9.

19. One or more machine-readable media having executable codes stored thereon, which, when executed, cause a processor to perform the method according to any one of claims 1-4, 6, 8, and 9.

20. An electronic device, characterized in that: include: processor; and A memory having executable codes stored thereon, which, when executed, causes the processor to execute the method according to any one of claims 5, 7, and 10.

21. One or more machine-readable media having executable codes stored thereon, which, when executed, cause a processor to perform the method according to any one of claims 5, 7, and 10.

Citation Information

Patent Citations

  • Multi-viewpoint distributed type video encoding and frame arranging device and method based on compressed sensing

    CN103618907A

  • Video encoding method, video decoding method and related device

    CN108632625A

  • Methods and devices of video encoding and video decoding

    CN109547786A

  • Image coding method and system based on neural network, terminal and storage medium

    CN109874018A

  • Salient feature detection method and device

    CN110163196A