Video encoding method, device and electronic equipment

By adopting a hybrid encoding method of key frame superimposed feature flow in video encoding, the balance problem between efficient transmission and intelligent analysis tasks of video encoding technology is solved, bandwidth saving and video quality improvement are achieved, and it is suitable for 4K/8K ultra-high definition. and application scenarios of virtual reality video content.

CN114501001BActive Publication Date: 2024-08-30ACADEMY OF BROADCASTING SCI STATE ADMINISTATION OF PRESS PUBLICATION RADIO FILM & TELEVISION
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011156113.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-26
Publication Date
2024-08-30
Estimated Expiration
2040-10-26

AI Technical Summary

Technical Problem

Existing video encoding technology is difficult to meet the needs of efficient video transmission and intelligent analysis tasks while saving bandwidth, especially in the application scenarios of 4K/8K ultra-high definition and virtual reality video content. How to design a new video encoding method to Adapting image reconstruction and intelligent analysis requirements has become a key issue.

Method used

A video coding method is proposed. By obtaining the current frame image, it is judged whether there is a key frame image, and if a key frame image exists, it is processed and feature stream encoded, using a hybrid coding method of key frame superimposed feature stream. , improve the expression efficiency of encoding streams, save bandwidth, and support adaptive display quality improvement and intelligent analysis tasks of video content.

Benefits of technology

It significantly improves the expression efficiency of the encoding stream, saves bandwidth, and can adaptively improve the video display quality on the terminal side. After the feature stream is decoded, the image can be reconstructed independently or used for intelligent analysis tasks without the need to reconstruct the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114501001B
    Figure CN114501001B
Patent Text Reader

Abstract

The present invention discloses a video encoding method, device and electronic device, the method comprising: obtaining a current group of frame images of the video; judging whether there is a key frame image in the current group of frame images; in the case of a key frame image, performing a first processing on the first key frame image to obtain a first processing result, and performing a second processing on each of the frame images in the current group of frame images to obtain a second processing result; encoding the first processing result and the second processing result to obtain an encoded code stream.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of video processing technology, and more specifically, to a video encoding method, a video encoding device, an electronic device and a computer-readable storage medium. Background Art

[0002] Due to the development of high-tech video content such as 4K / 8K ultra-high definition and virtual reality (VR), the amount of video data has exploded. During the transmission process, it will be limited by external conditions such as network transmission bandwidth. Therefore, efficient video encoding technology is needed to save bandwidth while ensuring the reconstruction quality or intelligent analysis tasks on the decoding end.

[0003] With the extensive exploration, research and application of artificial intelligence technology in image enhancement, self-encoder / decoder, object recognition, object segmentation, face recognition and other tasks, for application scenarios where video content scenes are not frequently switched, the encoding method of using the encoded feature stream to completely or partially replace the video bitstream can effectively reduce the transmission bandwidth, and before reconstructing the image at the decoding end, the relevant intelligent tasks are implemented with the help of the feature stream analysis results. Considering the market status of the coexistence of standard definition, high definition, and ultra-high definition video content and display terminals, how to design a new video encoding method to flexibly adapt to the image reconstruction and intelligent analysis needs in related application scenarios while saving bandwidth has become a key issue. Summary of the invention

[0004] An object of an embodiment of the present invention is to provide a new technical solution for video encoding.

[0005] According to a first aspect of the present invention, there is provided a video encoding method, comprising:

[0006] Obtaining a current frame image of the video;

[0007] Determine whether there is a key frame image in the current set of frame images;

[0008] In the case where a key frame image exists, performing a first process on the key frame image to obtain a first process result, and performing a second process on each of the frame images in the current frame image group to obtain a second process result;

[0009] The first processing result and the second processing result are encoded to obtain an encoded code stream.

[0010] Optionally, the determining whether there is a key frame image in the current set of frame images includes:

[0011] Determining whether the current set of frame images is the first set of frame images of the video;

[0012] In the case of the first group of frame images of the video, it is determined that there are key frame images in the current group of frame images.

[0013] Optionally, the method further comprises:

[0014] In the case of the first set of frame images of the video, the first frame image in the current set of frame images is the key frame image.

[0015] Optionally, the determining whether there is a key frame image in the current set of frame images further includes:

[0016] If the current frame image is not the first frame image of the video, determining whether the current frame image has a scene switch;

[0017] In the case of scene switching, it is determined that there is a key frame image in the current set of frame images.

[0018] Optionally, the method further comprises:

[0019] In the case of scene switching, obtaining a frame image for the scene switching in the current set of frame images;

[0020] The frame image for performing the scene switching is determined to be the key frame image.

[0021] Optionally, performing a first processing on the key frame image to obtain a first processing result includes:

[0022] The key frame image is encoded to obtain a first processing result.

[0023] Optionally, performing the second processing on each of the frame images in the current set of frame images to obtain the first processing result includes:

[0024] Extracting features from the frame image to generate a first feature stream corresponding to the frame image;

[0025] Feature encoding is performed on the feature stream to generate a second feature stream corresponding to the first feature stream as a second processing result.

[0026] Optionally, the method further comprises:

[0027] performing feature de-redundancy processing on the first feature stream, and performing feature encoding on the first feature stream obtained after the feature de-redundancy processing; or,

[0028] The feature de-redundancy processing is performed on the second feature stream, and a second feature stream obtained after the feature de-redundancy processing is performed is used as the second processing result.

[0029] According to a second aspect of the present invention, there is further provided a video encoding apparatus, comprising:

[0030] An acquisition module, used for acquiring a current frame image of the video;

[0031] A judging module, used for judging whether there is a key frame image in the current set of frame images;

[0032] A processing module, configured to, when a key frame image exists, perform a first process on the key frame image to obtain a first process result, and perform a second process on each of the frame images in the current set of frame images to obtain a second process result;

[0033] The encoding module is used to encode the first processing result and the second processing result to obtain an encoded code stream.

[0034] According to the third aspect of the present invention, an electronic device is also provided, which includes the video encoding device described in the second aspect of the present invention; or, includes a memory and a processor, the memory is used to store executable instructions; the processor is used to operate according to the control of the instructions to execute the method described in the first aspect of the present invention.

[0035] One beneficial effect of the present invention is that according to the method, device and electronic device of this embodiment, when there is a key frame image in the current group of frame images, the key frame image and each frame image in the current group of frame images will be encoded, that is, it proposes a hybrid encoding method of superimposing a key frame with a feature stream. For application scenarios where video content scene switching is not frequent, this hybrid encoding method of superimposing a key frame with a feature stream can significantly improve the expression efficiency of the encoded code stream and save bandwidth. At the same time, after decoding the feature stream, the image can be independently reconstructed to obtain the video content or combined with the key frame to reconstruct the image to obtain the video content, which can adaptively improve the video display quality on the terminal side. Moreover, after decoding the feature stream, it can also be directly used for other intelligent analysis tasks without reconstructing the image. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.

[0037] Figure 1 is a schematic diagram of the hardware structure of a video encoding system according to an embodiment of the present invention;

[0038] Figure 2 is a schematic flow chart of a video encoding method according to an embodiment of the present invention;

[0039] Figure 3 is a flowchart of a video encoding method according to another embodiment of the present invention;

[0040] Figure 4a-4c is a schematic flow chart of a video encoding method according to an example of an embodiment of the present invention;

[0041] Figure 5 is a principle block diagram of a video encoding device according to an embodiment of the present invention;

[0042] Figure 6 is a flow chart of a video encoding method according to another example of the present invention;

[0043] Figure 7 is a principle block diagram of an electronic device according to an embodiment of the present invention;

[0044] Figure 8 Schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0045] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present invention unless otherwise specifically stated.

[0046] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.

[0047] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.

[0048] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0049] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0050] <Hardware Configuration>

[0051] Figure 1 It is a principle block diagram of the hardware configuration of a video encoding system that can be used to implement a video encoding method provided by an embodiment of the present invention.

[0052] like Figure 1 As shown, the video encoding system 1000 includes a server 1100 , a terminal device 1200 , and a network 1300 .

[0053] The server 1100 may be, for example, a blade server, a rack-mounted server, etc. The server 1100 may also be a server cluster deployed in the cloud, which is not limited here.

[0054] like Figure 1 As shown, the server 1100 may include a processor 1110, a memory 1120, an interface device 1130, a communication device 1140, a display device 1150, and an input device 1160. The processor 1110 may be, for example, a central processing unit CPU, etc. The memory 1120 may include, for example, a ROM (read-only memory), a RAM (random access memory), a non-volatile memory such as a hard disk, etc. The interface device 1130 may include, for example, a USB interface, a serial interface, etc. The communication device 1140 may be capable of wired or wireless communication, for example. The display device 1150 may be, for example, a liquid crystal display screen. The input device 1160 may include, for example, a touch screen, a keyboard, etc.

[0055] In this embodiment, the server 1100 may be used to participate in implementing the method according to any embodiment of the present disclosure.

[0056] As used in the embodiments of the present disclosure, the memory 1120 of the server 1100 is used to store instructions, and the instructions are used to control the processor 1110 to operate to support the implementation of the method according to any embodiment of the present disclosure. A technician can design instructions according to the scheme disclosed in the present disclosure. How instructions control the processor to operate is well known in the art, so it will not be described in detail here.

[0057] It should be understood by those skilled in the art that although Figure 1 , multiple devices of the server 1100 are shown; however, the server 1100 of the embodiment of the present disclosure may only involve some of the devices, for example, only the processor 1110 and the memory 1120.

[0058] like Figure 1As shown, the terminal device 1200 may include a processor 1210, a memory 1220, an interface device 1230, a communication device 1240, a display device 1250, an input device 1260, an audio output device 1270, an audio input device 1280, and the like. Among them, the processor 1210 may be a central processing unit CPU, a microprocessor MCU, and the like. The memory 1220 may include, for example, a ROM (read-only memory), a RAM (random access memory), a non-volatile memory such as a hard disk, and the like. The interface device 1230 may include, for example, a USB interface, an earphone interface, and the like. The communication device 1240 may, for example, be capable of wired or wireless communication. The display device 1250 may, for example, be a liquid crystal display screen, a touch display screen, and the like. The input device 1260 may, for example, include a touch screen, a keyboard, and the like. The terminal device 1200 may output audio information through an audio output device 1270, and the audio output device 1270 may, for example, include a speaker. The terminal device 1200 may pick up voice information input by a user through an audio pickup device 1280, and the audio pickup device 1280 may, for example, include a microphone.

[0059] The terminal device 1200 may be a smart phone, a portable computer, a desktop computer, a tablet computer, etc., and is not particularly limited here.

[0060] It should be understood by those skilled in the art that although Figure 1 Multiple devices of the terminal device 1200 are shown in the figure, but the terminal device 1200 of the embodiment of the present disclosure may only involve some of the devices, for example, only the processor 1210, the memory 1220, etc.

[0061] The communication network 1300 may be a wireless network or a wired network, a local area network or a wide area network. The terminal device 1200 may communicate with the server 1100 via the communication network 1300 .

[0062] It should be noted that Figure 1 The video encoding system 1000 shown is illustrative only and is in no way intended to limit the present disclosure, its applications, or uses. Figure 1 Only one server 1100 and one terminal device 1200 are shown, but this does not mean to limit the respective numbers. The system 1000 may include multiple servers 1100 and / or multiple terminal devices 1200.

[0063] <Method Example>

[0064] Figure 2 is a schematic flowchart of a video encoding method according to an embodiment.

[0065] according to Figure 2 As shown, the video encoding method of this embodiment is implemented by a video encoding device 5000 .

[0066] Step S2100, obtaining the current frame image of the video.

[0067] The video may be a video played through any video application in a display terminal, or may be a monitoring video played through a monitoring terminal.

[0068] In this embodiment, video encoding is performed in groups, wherein N+1 frames may be a group of frames, and N may be a constant set according to actual application scenarios and actual application requirements, and N may be 16 or 32. Of course, it may also be other values, which are not limited in this embodiment. Here, the i-th group of frames X in the video i It can be expressed as {x t ,x t+1 ,x t+2 ,x t+3 ,x t+4 ,...,x t+N}, where x t Represents the t-th frame image of the video, where i and t are both integers greater than 0.

[0069] For example, if N is 16, then every 17 frames of images in the video may be a group of frame images, for example {x1,x2,x3,x4,x5,x6,x7,x8,x9,x 10 ,x 11 ,x 12 ,x 13 ,x 14 ,x 15 ,x 16 ,x 17} is the first set of frame images, {x 18 ,x 19 ,x 20 ,x 21 ,x 22 ,x 23 ,x 24 ,x 25 ,x 26 ,x 27 ,x 28 ,x 29 ,x 30 ,x 31 ,x 32 ,x 33 ,x 34} is the second set of frame images, where the i-th set of frame images is X i It can be expressed as {x t ,x t+1 ,x t+2 ,x t+3 ,x t+4 ,...,xt+16}, where the i-th frame image group X i The image contains 17 frames.

[0070] Step S2200, determining whether there is a key frame image in the current set of frame images.

[0071] A key frame image may be an initial frame image in a video, or a frame image for scene switching in a video. It is understandable that for application scenarios in which video content scene switching is not frequent, there are relatively few key frame images.

[0072] In this embodiment, the step S2200 of determining whether there is a key frame image in the current set of frame images may further include the following steps S2210 to S2220:

[0073] Step S2210, determining whether the current set of frame images is the first set of frame images of the video.

[0074] In this step S2210, after obtaining the current frame image of the video, it can be determined whether the current frame image is the first frame image of the video. If it is the first frame image of the video, step S2220 is executed, otherwise, step S2230 is executed.

[0075] With the current frame image X1 = {x1,x2,x3,x4,x5,x6,x7,x8,x9,x 10 ,x 11 ,x 12 ,x 13 ,x 14 ,x 15 ,x 16 ,x 17} as an example (where N=16), that is, the current set of frame images is the first set of frame images of the video, which includes 17 frames of images.

[0076] With the current frame image X2 = {x 18 ,x 19 ,x 20 ,x 21 ,x 22 ,x 23 ,x 24 ,x 25 ,x 26 ,x 27 ,x 28 ,x 29 ,x 30 ,x 31 ,x 32 ,x 33 ,x 34} as an example (where N=16), that is, the current set of frame images is the second set of frame images of the video, which includes 17 frames of images.

[0077] Take the current frame image X i ={x t ,x t+1 ,x t+2 ,x t+3 ,x t+4 ,...,x t+N} as an example, that is, the current group of frame images is the i-th group of frame images of the video, which includes N+1 frame images.

[0078] Step S2220: In the case of the first set of frame images of the video, determining whether there is a key frame image in the current set of frame images.

[0079] In this step S2220, when it is determined in step S2210 that the current set of frame images is the first set of frame images of the video, it can be directly determined that the current set of image frames has a key frame image.

[0080] In this step S2220, when it is determined in step S2210 that the current set of frame images is the first set of frame images of the video, the first frame image in the current set of frame images may be directly determined as a key frame image.

[0081] With the current frame image X1 = {x1,x2,x3,x4,x5,x6,x7,x8,x9,x 10 ,x 11 ,x 12 ,x 13 ,x 14 ,x 15 ,x 16 ,x 17 Taking} as an example, since it is the first set of frame images X1 of the video, it can be directly determined that the first set of frame images X1 has a key frame image, and the first frame image x1 in the first set of frame images X1 is a key frame image.

[0082] Step S2230: If the current set of frame images is not the first set of frame images of the video, it is determined whether the current set of frame images has a scene switch.

[0083] In this step S2230, when the current frame image is not the first frame image of the video, it will continue to determine whether there is a scene switch in the current frame image, and if there is a scene switch, execute step S2240, otherwise, execute step S2250.

[0084] With the current frame image X2 = {x 18 ,x 19 ,x 20 ,x21 ,x 22 ,x 23 ,x 24 ,x 25 ,x 26 ,x 27 ,x 28 ,x 29 ,x 30 ,x 31 ,x 32 ,x 33 ,x 34} as an example, since it is the second set of frame images X2 of the video, here, continue to determine whether there is a scene switch in the second set of frame images X2.

[0085] Take the current frame image X i ={x t ,x t+1 ,x t+2 ,x t+3 ,x t+4 ,...,x t+N} as an example, since it is the i-th group of frame images X i Here, continue to judge the i-th group of frame images X i Whether there is a scene switch in the

[0086] Step S2240: When there is a scene switch, determine whether there is a key frame image in the current set of frame images.

[0087] In this step S2240, when it is determined according to step S2230 that the current set of image frames has a scene switch, it can be directly determined that the current set of image frames has a key frame image.

[0088] In this step S2240, when it is determined according to step S2230 that the current group of frame images has a scene switch, the frame image for scene switch in the current group of frame images can also be directly determined as a key frame image. Here, the frame image for scene switch can be first obtained, and the frame image for scene switch can be determined as a key frame image.

[0089] Continuing with the example in step S2230, if it is determined according to step S2230 that the current set of frame images X2 has a scene switch, it can be directly determined that the second set of frame images X2 has a key frame image, and the acquired frame image for scene switching is the 20th frame image x in the video. 20 and the 28th frame image x 28 , we can determine the frame image x 20 and frame image x 28 is the key frame image.

[0090] Continuing with the example in step S2230 above, if the current frame image X is determined according to step S2230 above i There is a scene switch, where the i-th group of frame images X can be directly determined i There is a key frame image, and the frame image obtained for scene switching is the t-th frame image x in the video. t , we can determine the frame image x t is the key frame image.

[0091] According to the above steps S2210 to S2240, when there are key frame images, a hybrid encoding method of superimposing the key frame images with the feature stream in the subsequent steps can be used, which not only significantly improves the expression efficiency of the encoded code stream, but also saves bandwidth.

[0092] Step S2250: When there is no scene switching, it is determined that there is no key frame image in the current set of frame images.

[0093] In this step S2250, when there is no scene switching in the current set of frame images, it can be directly determined that there is no key frame image in the current set of frame images.

[0094] Step S2300: if there is a key frame image, perform a first process on the key frame image to obtain a first process result, and perform a second process on each frame image in the current set of frame images to obtain a second process result.

[0095] In an example, when it is determined according to the above step S2200 that there is a key frame image in the current group of frame images, a first processing can be performed on the key frame image according to this step S2300 to obtain a first processing result, and a second processing can be performed on each frame image in the current group of frame images to obtain a second processing result, and then the first processing result and the second processing result are encoded in combination with subsequent steps to obtain an encoded code stream, that is, when there is a key frame image, a hybrid encoding method of superimposing a feature stream on the key frame image in subsequent steps can be combined, which not only significantly improves the expression efficiency of the encoded code stream, but also saves bandwidth.

[0096] In one example, when it is determined according to the above step S2200 that there is no key frame image in the current group of frame images, a second processing result can be obtained by performing a second processing only on each frame image in the current group of frame images, and then the second processing result is encoded in combination with subsequent steps to obtain an encoded code stream, that is, when there is no key frame image, only the feature stream is encoded.

[0097] In this embodiment, performing the first processing on the key frame image to obtain the first processing result in step S2300 may further include the following step S2310:

[0098] Step S2310: if a key frame image exists, encode the key frame image to obtain a first processing result.

[0099] like Figure 4a As shown, the current frame image X i ={x t ,x t+1 ,x t+2 ,x t+3 ,x t+4 ,...,x t+N} as an example, since its key frame image is frame image x t , here, the frame image x can be t Encode to obtain Encoder{x t} as the first processing result.

[0100] In this embodiment, performing the second processing on each frame image in the current set of frame images to obtain the second processing result in step S2300 may further include the following steps S2320 to S2330:

[0101] Step S2320, extract features from each frame of image and generate a first feature stream corresponding to each frame of image.

[0102] like Figure 4a As shown, the current frame image X i ={x t ,x t+1 ,x t+2 ,x t+3 ,x t+4 ,...,x t+N} as an example, according to step S2320, from the i-th group of frame images X i Extract effective information from each frame image in and generate feature streams corresponding to each frame image. For example, the generated frame image x t The first characteristic flow is F t , the generated frame image x t+1 The first characteristic flow is F t+1 , the generated frame image x t+2 The first characteristic flow is F t+2 , and the generated frame image x t+N The first characteristic flow is F t+N In order to distinguish the feature stream obtained by directly extracting features from the frame image here and the feature stream obtained by further feature encoding the feature stream later, the feature stream here is called the first feature stream.

[0103] Step S2330, feature encoding is performed on each first feature stream, and a second feature stream corresponding to each first feature stream is generated as a second processing result.

[0104] In one example, in step S2330, feature encoding may be directly performed on the first feature streams to generate second feature streams corresponding to each first feature stream as the second processing result.

[0105] like Figure 4a As shown, the current frame image X i ={x t ,x t+1 ,x t+2 ,x t+3 ,x t+4 ,...,x t+N} as an example, the current frame image X can be directly i The first feature stream corresponding to each frame image in the image is feature encoded. For example, the first feature stream F t Perform feature encoding to obtain the second feature stream C(F t ), for the first characteristic flow F t+1 Perform feature encoding to obtain the second feature stream C(F t+1 ), for the first characteristic flow F t+2 Perform feature encoding to obtain the second feature stream C(F t+2 ), for the first characteristic flow F t+N Perform feature encoding to obtain the second feature stream C(F t+N )wait.

[0106] In one example, before executing step S2330, feature de-redundancy processing may be performed on the first feature stream corresponding to each frame image to remove redundant information between two adjacent frames of image, and then feature encoding may be performed on the first feature stream obtained after feature de-redundancy processing according to step S2330.

[0107] In this example, for the current frame image X i ={x t ,x t+1 ,x t+2 ,x t+3 ,x t+4 ,...,x t+N}, the frame image x can be calculated using the following formula t+j The first characteristic flow F t+j Perform feature redundancy removal:

[0108] ΔF t+j =f(F t+j , F t+j-1 ) (1)

[0109] Where, ΔFt+j Indicates the removal of the first characteristic flow F t+j and the previous frame image x t+j-1 The first characteristic flow F t+j-1 The first feature flow F after the redundant information between t+j , the f function represents an arbitrary function that can remove redundant information between two frames of images, and this embodiment does not limit this.

[0110] like Figure 4b As shown, the current frame image X i ={x t ,x t+1 ,x t+2 ,x t+3 ,x t+4 ,...,x t+N} as an example, where F t is the frame image x t The first feature stream (because it is the current frame image X i The first frame of the image, so there is no step of feature redundancy removal), ΔF t+1 For the frame image x t+1 The first characteristic flow F t+1 Feature flow after feature redundancy removal, ΔF t+2 For the frame image x t+2 The first characteristic flow F t+2 Feature flow after feature redundancy removal, ΔF t+3 For the frame image x t+3 The first characteristic flow F t+3 Feature flow after feature redundancy removal, ΔF t+N For the frame image x t+N The first characteristic flow F t+N After the feature stream undergoes feature region redundancy processing, feature encoding is performed on the first feature stream undergoing feature redundancy processing, thereby generating a second feature stream corresponding to each frame image. Figure 4b In, C(F t ) is the first characteristic flow F t The second feature flow after feature encoding, C(ΔF t+1 ) is the first feature flow ΔF after feature redundancy removal t+1 The second feature flow after feature encoding, C(ΔF t+2 ) is the first feature flow ΔF after feature redundancy removal t+2 The second feature flow after feature encoding, C(ΔF t+N ) is the first feature flow ΔF after feature redundancy removal t+N The second feature stream after feature encoding.

[0111] In one example, after executing step S2330, feature de-redundancy processing may be performed on the second feature stream corresponding to each first feature stream to remove redundant information between two adjacent frames of images, and the second feature stream obtained after the feature de-redundancy processing may be used as the second processing result.

[0112] In this example, for the current frame image group X i ={x t ,x t+1 ,x t+2 ,x t+3 ,x t+4 ,...,x t+N}, the frame image x can be calculated using the following formula t+j The second characteristic flow C(F t+i ) to perform feature redundancy removal:

[0113] ΔC(F t+j )=g(C(F t+j ),C(F t+j-1 )) (2)

[0114] Among them, ΔC(F t+j ) represents the removal of the second characteristic flow C(F t+j ) and the adjacent previous second characteristic flow C(F t+j-1 ) after the redundant information between the second feature stream C(F t+j ), the g function represents an arbitrary function that can remove redundant information between two frames of images, which is not limited in this embodiment.

[0115] like Figure 4c As shown, the current frame image X i ={x t ,x t+1 ,x t+2 ,x t+3 ,x t+4 ,...,x t+N} as an example, where C(F t ) is the first characteristic flow F t The second feature stream after feature encoding, C(F t+1 ) is the first characteristic flow F t+1 The second feature stream after feature encoding, C(F t+2 ) is the first characteristic flow F t+2 The second feature stream after feature encoding, C(F t+3 ) is the first characteristic flow F t+N The second feature flow after feature encoding, ΔC(F t+1 ) is the second characteristic flow C(F t+1) after feature redundancy removal, ΔC(F t+2 ) is the second characteristic flow C(F t+2 ) after feature redundancy removal, ΔC(F t+N ) is the second characteristic flow C(F t+N ) performs feature de-redundancy processing on the feature stream, and uses each feature stream after the feature de-redundancy processing as the second processing result.

[0116] Step S2400: encode the first processing result and the second processing result to obtain an encoded code stream.

[0117] In this embodiment, after the first processing result and the second processing result are processed according to the above step S2300, the first processing result and the second processing result may be entropy encoded according to this step S2400 to obtain an encoded code stream.

[0118] like Figure 4a As shown, it can be used to process the first processing result Encoder{x t} and the second processing result C(F t )、C(F t+1 )、C(F t+2 )…C(F t+N ) is entropy encoded to obtain the encoded bit stream.

[0119] like Figure 4b As shown, it can also be used for the first processing result Encoder{x t} and the second processing result C(F t )、C(ΔF t+1 )、C(ΔF t+2 )…C(ΔF t+N ) is entropy encoded to obtain the encoded bit stream.

[0120] like Figure 4c As shown, it can also process the first processing result Encoder{x t} and the second processing result C(F t )、ΔC(F t+1 )、ΔC(F t+2 )…ΔC(F t+N ) is entropy encoded to obtain the encoded bit stream.

[0121] It can be understood that when there is no key frame image in the current group of frame images, the second processing is performed only on each frame image in the current group of frame images to obtain the second processing result. Here, only the second processing result can be entropy encoded to obtain the encoded code stream.

[0122] For example, it can only Figure 4a The second processing result C(F t )、C(F t+1 )、C(F t+2 )…C(F t+N ) is entropy encoded to obtain the encoded bit stream.

[0123] For example, it can also only Figure 4b The second processing result C(F t )、C(ΔF t+1 )、C(ΔF t+2 )…C(ΔF t+N ) is entropy encoded to obtain the encoded bit stream.

[0124] For another example, it can also only Figure 4c The second processing result C(F t )、ΔC(F t+1 )、ΔC(F t+2 )…ΔC(F t+N ) is entropy encoded to obtain the encoded bit stream.

[0125] According to the method of this embodiment, when there is a key frame image in the current group of frame images, the key frame image and each frame image in the current group of frame images will be encoded, that is, it proposes a hybrid encoding method of superimposing a key frame with a feature stream. For application scenarios where video content scenes are not frequently switched, this hybrid encoding method of superimposing a key frame with a feature stream can significantly improve the expression efficiency of the encoded code stream and save bandwidth. At the same time, after decoding the feature stream, the image can be reconstructed independently to obtain the video content or combined with the key frame to reconstruct the image to obtain the video content, which can adaptively improve the video display quality on the terminal side. Moreover, after decoding the feature stream, it can also be directly used for other intelligent analysis tasks without reconstructing the image.

[0126] <Device Example>

[0127] In this embodiment, a video encoding device 5000 is also provided. Figure 5 As shown, the video encoding device 5000 includes an acquisition module 5100, a judgment module 5200, a processing module 5300 and an encoding module 5400, which are used to implement the video encoding method provided in this embodiment. The modules of the video encoding device 5000 can be implemented by software or by hardware, which is not limited here.

[0128] The acquisition module 5100 is used to acquire the current frame image of the video.

[0129] The judgment module 5200 is used to judge whether there is a key frame image in the current set of frame images.

[0130] The processing module 5300 is used to, when there is a key frame image, perform a first process on the key frame image to obtain a first process result, and perform a second process on each of the frame images in the current set of frame images to obtain a second process result.

[0131] The encoding module 5400 is used to encode the first processing result and the second processing result to obtain an encoded code stream.

[0132] In one embodiment, the judgment module 5200 is further used to judge whether the current set of frame images is the first set of frame images of the video; if it is the first set of frame images of the video, determine whether there is a key frame image in the current set of frame images.

[0133] In one embodiment, the judgment module 5200 is further configured to, when the first set of frame images of the video is in the case of the first set of frame images, determine that the first frame image in the current set of frame images is the key frame image.

[0134] In one embodiment, the determination module 5200 is further configured to, when the current set of frame images is not the first set of frame images of the video, determine whether the current set of frame images has a scene switch; and, when a scene switch exists, determine whether a key frame image exists in the current set of frame images.

[0135] In one embodiment, the judgment module 5200 is further configured to, when there is a scene switch, obtain a frame image for performing the scene switch in the current set of frame images; and determine that the frame image for performing the scene switch is the key frame image.

[0136] In one embodiment, the processing module 5300 is further used to encode the key frame image to obtain a first processing result.

[0137] In one embodiment, the processing module 5300 is further used to perform feature extraction on the frame image to generate a first feature stream corresponding to the frame image; perform feature encoding on the first feature stream to generate a second feature stream corresponding to the first feature stream as a second processing result.

[0138] In one embodiment, the processing module 5300 is also used to perform feature de-redundancy processing on the first feature stream, and perform feature encoding on the first feature stream obtained after the feature de-redundancy processing; or, perform feature de-redundancy processing on the second feature stream, and use the second feature stream obtained after the feature de-redundancy processing as the second processing result.

[0139] <Example>

[0140] Figure 6 by Figure 4b As an example, a schematic diagram of a video encoding method of an example is shown.

[0141] In this case, you can use Figure 4b The key frame judgment module shown in the figure realizes the corresponding functions of the acquisition module 5100 and the judgment module 5200 in the video encoding device 5000, realizes the corresponding functions of the processing module 5300 in the video encoding device 5000 through the encoder, the feature extraction module, the inter-frame feature de-redundancy module and the feature encoding module, and realizes the corresponding functions of the encoding module 5400 in the video encoding device 5000 through the entropy encoding module, Figure 4b and Figure 6 As shown, the video encoding method may include the following steps:

[0142] Step S6010, {x t ,x t+1 ,x t+2 ,x t+3 ,x t+4 ,...,x t+N} is a set of frame images, which are input into the key frame judgment module.

[0143] In this step S6010, the group of frame images includes N+1 frame images.

[0144] Step S6020: The key frame determination module determines {x t ,x t+1 ,x t+2 ,x t+3 ,x t+4 ,...,x t+N}Is it the first set of frame images of the video? If so, execute step S6030; otherwise, execute step S6040.

[0145] Step S6030, in the case of the first set of frame images of the video, determining the first frame image in the first set of frame images as a key frame image, and inputting the key frame image to the encoder, that is, executing step S6070; and converting the current set of frame images {x t ,x t+1 ,x t+2 ,x t+3 ,x t+4 ,...,x t+N} is input into the feature extraction module, that is, step S6080 is executed.

[0146] Step S6040: if it is not the first set of video frame images, determine {x t ,x t+1 ,x t+2 ,x t+3 ,x t+4,...,x t+N}Whether there is a scene switch, if there is a scene switch, execute step S6050, otherwise, execute step S6060.

[0147] Step S6050: if there is a scene switch, determine {x t ,x t+1 ,x t+2 ,x t+3 ,x t+4 ,...,x t+N} to switch scenes in the frame image x t is the key frame image, and the key frame image x t Input to the encoder, that is, execute step S6070; and convert the current frame image {x t ,x t+1 ,x t+2 ,x t+3 ,x t+4 ,...,x t+N} is input into the feature extraction module, that is, step S6080 is executed.

[0148] In this step S6050, the current frame image {x t ,x t+1 ,x t+2 ,x t+3 ,x t+4 ,...,x t+N} is not the first frame image of the video, but there is a scene switch, and the current frame image {x t ,x t+1 ,x t+2 ,x t+3 ,x t+4 ,...,x t+N The frame image for scene switching in} is x t , then x t is the key frame image.

[0149] Step S6060: if there is no scene switching, it is determined that there is no key frame image in the current frame image, then the current frame image {x t ,x t+1 ,x t+2 ,x t+3 ,x t+4 ,...,x t+N} is input into the feature extraction module, that is, step S6080 is executed.

[0150] In step S6070, the encoder encodes the key frame image to obtain a first processing result, and inputs the first processing result into an entropy coding module, that is, executing step S6200.

[0151] like Figure 4b As shown, the encoder processes the key frame image x t Encode and obtain the encoding result Encoder(x t ).

[0152] Step S6080: The feature extraction module extracts {x t ,x t+1 ,x t+2 ,x t+3 ,x t+4 ,...,x t+N}, generates the first feature stream corresponding to each frame image, and inputs it into the inter-frame feature de-redundancy module.

[0153] Step S6090: the inter-frame feature de-redundancy module removes redundant information between adjacent frames, and outputs the de-redundant feature stream to the feature encoding module.

[0154] In step S6100, the feature encoding module encodes the feature stream after redundancy processing to obtain a second processing result and inputs it into the entropy encoding module, that is, executing step S6200 or step S6300.

[0155] Step S6200: The entropy coding module performs entropy coding on the first processing result and the second processing result to obtain a coded bit stream, and the process ends.

[0156] Step S6300: the entropy coding module performs entropy coding on the second processing result to obtain a coded bit stream, and the process ends.

[0157] It is understandable that when there is a key frame image in the current group of framing images, the key frame image and each frame image in the current group of framing images will be encoded, that is, it proposes a hybrid encoding method of key frame superimposed feature stream. For application scenarios where video content scene switching is not frequent, this hybrid encoding method of key frame superimposed feature stream can significantly improve the expression efficiency of the encoded code stream and save bandwidth. At the same time, after the feature stream is decoded, the image can be reconstructed independently to obtain the video content or combined with the key frame to reconstruct the image to obtain the video content, which can adaptively improve the video display quality on the terminal side. Moreover, after the feature stream is decoded, it can also be directly used for other intelligent analysis tasks without reconstructing the image.

[0158] <Equipment Embodiment>

[0159] Corresponding to the above method embodiment, in this embodiment, an electronic device is also provided, such as Figure 7 As shown, it may include a video encoding device 5000 according to any embodiment of the present invention, used to implement a video encoding method according to any embodiment of the present invention.

[0160] like Figure 8 As shown, the electronic device 8000 may also include a processor 8200 and a memory 8000, wherein the memory 8100 is used to store executable instructions; the processor 8200 is used to operate the electronic device according to the control of the instructions to execute the video encoding method according to any embodiment of the present disclosure.

[0161] The various modules of the above device 5000 can be implemented by the processor 8200 running the instructions to execute the method according to any embodiment of the present disclosure.

[0162] The present invention may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.

[0163] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0164] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0165] The computer program instructions for performing the operation of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present invention.

[0166] Various aspects of the present invention are described herein with reference to the flow charts and / or block diagrams of the methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each box of the flow chart and / or block diagram and the combination of each box in the flow chart and / or block diagram can be implemented by computer-readable program instructions.

[0167] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0168] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0169] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a part of a module, a program segment or an instruction, and a part of the module, a program segment or an instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.

[0170] Embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the marketplace, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present invention is defined by the appended claims.

Claims

1. A video encoding method, characterized in that: include: Obtaining a current frame image of the video; Determine whether there is a key frame image in the current set of frame images; wherein, determining whether there is a key frame image in the current set of frame images includes: determining whether the current set of frame images is the first set of frame images of the video; if it is the first set of frame images of the video, determine whether there is a key frame image in the current set of frame images, and the first frame image in the current set of frame images is the key frame image; if it is not the first set of frame images of the video, if the current set of frame images has a scene switch, determine whether there is a key frame image in the current set of frame images, obtain a frame image for the scene switch in the current set of frame images, and determine that the frame image for the scene switch is the key frame image; In the case where a key frame image exists, performing a first process on the key frame image to obtain a first process result, and performing a second process on each of the frame images in the current set of frame images to obtain a second process result; Encoding the first processing result and the second processing result to obtain an encoded code stream; Wherein, performing a first process on the key frame image to obtain a first processing result includes: encoding the key frame image to obtain a first processing result; The performing the second processing on each of the frame images in the current set of frame images to obtain the second processing result comprises: performing feature extraction on the frame images to generate a first feature stream corresponding to the frame images; Performing feature encoding on the first feature stream to generate a second feature stream corresponding to the first feature stream as a second processing result; or, performing feature de-redundancy processing on the first feature stream, and performing feature encoding on the first feature stream obtained after the feature de-redundancy processing, to generate a second feature stream corresponding to the first feature stream as a second processing result; or, Feature encoding is performed on the first feature stream to generate a second feature stream corresponding to the first feature stream, feature de-redundancy processing is performed on the second feature stream, and the second feature stream obtained after the feature de-redundancy processing is performed as the second processing result.

2. A video encoding device, characterized in that: include: An acquisition module, used for acquiring a current frame image of the video; A judgment module, used to judge whether there is a key frame image in the current set of frame images; wherein the judgment module is specifically used to judge whether the current set of frame images is the first set of frame images of the video; if it is the first set of frame images of the video, it is determined that there is a key frame image in the current set of frame images, and the first frame image in the current set of frame images is the key frame image; if it is not the first set of frame images of the video, if there is a scene switch in the current set of frame images, it is determined that there is a key frame image in the current set of frame images, and a frame image for the scene switch in the current set of frame images is obtained, and it is determined that the frame image for the scene switch is the key frame image; A processing module, configured to, when a key frame image exists, perform a first process on the key frame image to obtain a first process result, and perform a second process on each of the frame images in the current set of frame images to obtain a second process result; An encoding module, used for encoding the first processing result and the second processing result to obtain an encoded code stream; Wherein, the processing module is specifically used to encode the key frame image to obtain a first processing result; and Extracting features from the frame image to generate a first feature stream corresponding to the frame image; Performing feature encoding on the first feature stream to generate a second feature stream corresponding to the first feature stream as a second processing result; or, performing feature de-redundancy processing on the first feature stream, and performing feature encoding on the first feature stream obtained after the feature de-redundancy processing, to generate a second feature stream corresponding to the first feature stream as a second processing result; or, Feature encoding is performed on the first feature stream to generate a second feature stream corresponding to the first feature stream, feature de-redundancy processing is performed on the second feature stream, and the second feature stream obtained after the feature de-redundancy processing is performed as the second processing result.

3. An electronic device, characterized in that: include: The video encoding device as claimed in claim 2; or, A processor and a memory, wherein the memory is used to store instructions, and the instructions are used to control the processor to execute the method according to claim 1.

Citation Information

Patent Citations

  • Video processing method and device and computer readable storage medium

    CN110636332A

  • video coding apparatus and method for inserting keyframe adaptively

    KR1020050078099A