Video lossless compression method and system, computer equipment and storage medium

By using neural networks to extract video features in video compression and combining efficient encoding technology, the video quality loss problem caused by traditional video compression technology is solved, and the lossless compression of high-definition video is achieved, which is suitable for the storage and transmission of high-definition videos.

CN119211556AInactive Publication Date: 2024-12-27CHUANGYUN RONGDA INFORMATION TECH (TIANJIN) CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411719065.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2024-12-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional video compression technology will cause video quality loss during the compression process, which cannot meet the needs of lossless compression of high-definition videos.

Method used

By inputting videos into neural networks, the spatial and time-dependent features of video frames are extracted and weighted combinations are performed, combining efficient video encoding technologies such as HEVC and AV1, the code rate is allocated according to the complexity of the video content, and chunked processing is performed and grading is performed. Block encoding, optimize compression parameters for lossless compression.

Benefits of technology

It greatly reduces the video quality loss during the compression process, improves the compression efficiency of video files, and is suitable for the storage and transmission of high-definition videos.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211556A_ABST
    Figure CN119211556A_ABST
Patent Text Reader

Abstract

The invention discloses a video lossless compression method and system, computer equipment and a storage medium, and relates to the technical field of video processing, and the method comprises the steps: inputting a to-be-compressed video into a neural network, obtaining the spatial features of video frames and the time dependence features between the video frames, the method comprises the following steps: acquiring spatial characteristics and time dependence characteristics of a video, performing weighted combination on the spatial characteristics and the time dependence characteristics to obtain a compressed video, allocating code rates according to video content complexity, encoding the compressed video, performing block processing on each encoded video frame, and performing block-by-block encoding on the video frames after block processing to obtain optimal encoding parameters and strategies. And performing optimization compression processing on the compressed video through the optimal coding parameter and strategy to obtain a final lossless compressed video. According to the method, a global optimization strategy and a multi-target decision-making method are combined, efficient compression and lossless restoration of the video file are achieved, and remarkable benefits and convenience are brought to the fields of video storage, transmission, playing and the like.
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 in particular to a video lossless compression method, system, computer equipment and storage medium. Background Art

[0002] With the popularization of high-definition video technology, the size of video files is becoming increasingly large, and the demand for storage and transmission resources is increasing.

[0003] Traditional video compression technologies mainly use intra-frame compression (I frames) and inter-frame compression (P frames and B frames) to reduce the amount of data, and also use frame extraction technology to reduce the capacity occupied by the video. However, these traditional video compression technologies often cause loss of video quality during the compression process and cannot meet the needs of lossless compression of high-definition video. Summary of the invention

[0004] The purpose of the present invention is to provide a video lossless compression method, system, computer device and storage medium to address the deficiencies of the above-mentioned prior art, so as to solve the problem that traditional video compression technology in the prior art often causes loss of video quality during the compression process and cannot meet the requirements of high-definition video lossless compression.

[0005] The present invention specifically provides the following technical solution: a video lossless compression method, comprising the following steps: Get the video to be compressed; Inputting the video to be compressed into a neural network, obtaining spatial features of video frames and time-dependent features between video frames, and weightedly combining the spatial features and the time-dependent features to obtain a compressed video; Determining the complexity of compressed video content according to the video scene, allocating a bit rate according to the complexity of the video content, and encoding the compressed video; Each of the encoded video frames is processed in blocks, and the processed video frames are encoded block by block to obtain optimal encoding parameters and strategies; The compressed video is optimized and compressed using the optimal encoding parameters and strategies to obtain a final lossless compressed video.

[0006] Preferably, when the video to be compressed is input into a neural network, the neural network includes a convolutional neural network and a recurrent neural network; Among them, the spatial features of video frames in the video are extracted through convolutional neural networks; and the temporal dependency features between video frames are captured through recurrent neural networks.

[0007] Preferably, the extracting spatial features of video frames in the video by using a convolutional neural network and removing video frames containing redundant information comprises the following steps: Using multiple convolution kernels to perform convolution operations on video frames to extract spatial features in the video frames; wherein the spatial features include edges, corners and textures; The spatial features are input into a pooling layer, and the resolution of the spatial features is reduced by maximum pooling and average pooling; The spatial features with reduced resolution are classified or regressed in a fully connected manner to determine the video frames with redundant information, and the video frames with redundant information are removed to obtain the final spatial features of the video frames.

[0008] Preferably, the capturing of temporal dependency features between video frames by a recurrent neural network comprises the following steps: Use a recurrent neural network to process video frame sequences and capture the temporal dependencies between video frames; Perform state transfer on the state in the time step of the recurrent neural network and set up a bidirectional recurrent neural network to capture the bidirectional temporal dependency in the video; The outputs of two RNN layers are merged to obtain the optimal time-dependent features.

[0009] Preferably, the step of weighting and combining the spatial features and the time-dependent features to obtain the compressed video comprises the following steps: The final spatial features of the video frame are concatenated and weightedly combined with the optimal time-dependent features to obtain feature representation; Use end-to-end training of convolutional neural network parameters and recurrent neural network parameters, and use labeled video data to guide convolutional neural network and recurrent neural network to learn to identify redundant information during end-to-end training; The video with the feature representation and redundant information removed is used as the compressed video.

[0010] Preferably, allocating a bit rate according to the complexity of the video content and encoding the compressed video comprises the following steps: Use high-efficiency video coding HEVC and open video coding AV1 for lossless video compression; When compressing a video losslessly, the encoder selects a bit rate for video storage based on the complexity of the video content.

[0011] Preferably, each encoded video frame is processed into blocks, and the processed video frames are encoded block by block to obtain the optimal encoding parameters and strategy, including the following steps: Dividing the encoded video frame into blocks for prediction, transformation, quantization and entropy coding; Each block is encoded individually by the encoder, and encoding parameters and strategies are selected according to the content characteristics of the block.

[0012] The present invention provides a video lossless compression system, comprising: A data acquisition module, used for acquiring the video to be compressed; A compression module, used for inputting the video to be compressed into a neural network, obtaining spatial features of video frames and time-dependent features between video frames, and performing weighted combination of the spatial features and the time-dependent features to obtain a compressed video; The encoding module is used to determine the complexity of the compressed video content according to the video scene, allocate a bit rate according to the complexity of the video content, and encode the compressed video; A block module is used to process each encoded video frame into blocks, and encode the video frames after block processing block by block to obtain optimal encoding parameters and strategies; The optimization processing module is used to optimize the compression processing of the compressed video through the optimal encoding parameters and strategies to obtain the final lossless compressed video.

[0013] The present invention provides a computer device, comprising a memory and a processor, wherein a program is stored in the memory, and when the program is executed by the processor, the processor executes the steps of a video lossless compression method.

[0014] The present invention provides a storage medium on which a computer program is stored, characterized in that when the computer program is executed by a processor, the steps of the video lossless compression method are implemented.

[0015] Compared with the prior art, the present invention has the following significant advantages: The present invention inputs the video into a neural network respectively, extracts spatial features and time-dependent features, and performs weighted combination of the spatial features and the time-dependent features to obtain a compressed video, and allocates a bit rate according to the content complexity of the compressed video for encoding and block processing to obtain optimal encoding parameters and strategies. By adopting advanced encoding technology and refined quantization methods, combined with global optimization strategies and multi-objective decision-making methods, efficient compression of video files is achieved, which greatly reduces the loss of video quality during the compression process, and can bring significant benefits and convenience to the fields of video storage, transmission and playback. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 The present invention is a framework flow chart of a video lossless compression method in an embodiment of the present invention. DETAILED DESCRIPTION

[0017] The following is a clear and complete description of the technical solutions of the embodiments of the present invention in conjunction with the drawings in the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0018] Traditional redundancy identification methods rely on fixed algorithms and rules and are difficult to adapt to complex and changing video content. The present invention adopts an intelligent redundancy identification method based on deep learning. By training a deep learning model, the model can automatically learn the redundant information in the video and accurately remove the redundant information.

[0019] The present invention adopts a deep learning architecture for video redundancy recognition: this architecture combines the characteristics of convolutional neural networks (CNN) and recurrent neural networks (RNN), and can efficiently process video data and identify redundant information therein.

[0020] like Figure 1 As shown, the present invention aims at the deficiencies of the prior art and proposes a video lossless compression method, which specifically includes the following steps: Step S1: Obtain the video to be compressed, wherein the video is a high-definition video with a bit rate of 2M or above and no less than 720P.

[0021] Step S2: Input the video to be compressed into the neural network, obtain the spatial features of the video frames and the time-dependent features between the video frames, and perform weighted combination of the spatial features and the time-dependent features to obtain the compressed video.

[0022] S2 is specifically: When the video to be compressed is input into the neural network, the neural network includes a convolutional neural network and a recurrent neural network, wherein the spatial features of video frames in the video are extracted by the convolutional neural network; and the temporal dependency features between video frames are captured by the recurrent neural network.

[0023] The spatial features of video frames in the video are extracted through a convolutional neural network, where the convolutional neural network (CNN) includes: 1. Convolutional layer: CNN uses multiple convolution kernels to perform convolution operations on video frames to extract spatial features in video frames. These features may include edges, corners, textures, etc., which are crucial for identifying objects and scenes in videos.

[0024] 2. Pooling layer: The spatial features are input into the pooling layer, which is used to reduce the resolution of the input data, thereby reducing the number of parameters and computational complexity. Common pooling operations include maximum pooling and average pooling, which reduce the resolution of spatial features.

[0025] 3. Fully connected layer: The fully connected layer receives the output of the convolution and pooling layers, and classifies or regresses the reduced resolution spatial features through full connection. In video redundancy recognition, the fully connected layer can be used to determine whether a frame or region contains redundant information. The video frames with redundant information are determined and removed to obtain the final spatial features of the video frames.

[0026] The temporal dependency features between video frames are captured by a recurrent neural network, where the recurrent neural network (RNN) part includes the following features: 1. Temporal dependency: RNN is particularly suitable for processing sequence data, such as video frame sequences. Using recurrent neural networks to process video frame sequences captures the temporal dependency between frames, thereby more accurately identifying redundant information in the video.

[0027] 2. State transfer: Each time step in the RNN has a hidden state that contains all the information up to the current time step. This state transfer mechanism enables the RNN to remember the previous frame information and use it for the prediction of subsequent frames. The state in the time step of the recurrent neural network is transferred, and a bidirectional recurrent neural network is set to capture the bidirectional temporal dependency in the video.

[0028] 3. Bidirectional RNN: In order to better capture the bidirectional temporal dependencies (i.e., forward and backward) in the video, a bidirectional RNN can be used. The bidirectional RNN contains two independent RNN layers, one for processing the forward frame sequence and the other for processing the reverse frame sequence. The outputs of the two RNN layers are then merged to obtain the optimal temporal dependency features.

[0029] The spatial features and the time-dependent features are weightedly combined to obtain the compressed video, which specifically includes the following steps: 1. Feature fusion: In video redundancy recognition, the outputs of CNN and RNN can be fused. Specifically, CNN can be used to extract the spatial features of video frames, and then RNN can be used to capture the temporal dependencies between frames. The final spatial features of the video frame are concatenated or weightedly combined with the optimal temporal dependency features to obtain a richer feature representation.

[0030] 2. End-to-end training: The entire architecture can be trained end-to-end. Through the back-propagation algorithm and the gradient descent method, the network parameters can be optimized to minimize the prediction error. The parameters of the convolutional neural network and the parameters of the recurrent neural network are trained end-to-end, and during end-to-end training, labeled video data is used to guide the convolutional neural network and the recurrent neural network to learn to identify redundant information.

[0031] The video with feature representation and redundant information removed is used as the compressed video.

[0032] Step S3: Obtain the complexity of the compressed video content, allocate a bit rate according to the complexity of the video content, and encode the compressed video; the complexity of the video content refers to the level of details of the video scene.

[0033] S3 is specifically: In response to the demand for lossless video compression, the present invention adopts advanced coding technologies such as HEVC (High Efficiency Video Coding) and AV1 (Open Video Coding). During the coding process, the present invention introduces a content-adaptive coding strategy that can dynamically adjust coding parameters according to the characteristics of the video content to achieve efficient coding.

[0034] Specifically, when the video content complexity is high (such as motion scenes, high-detail scenes), the encoder will allocate more bit rate to ensure video quality; when the content complexity is low (such as static scenes, low-detail scenes), the encoder will reduce the bit rate to reduce the transmission bandwidth and storage space requirements.

[0035] After encoding the compressed video, the following steps are also included: The encoded video is quantized to map the continuous values ​​of the encoded video signal into multiple discrete amplitudes.

[0036] By adjusting the quantization parameters, the amplitude is adjusted in steps to obtain a video with the maximum compression ratio.

[0037] Specifically: In the process of video compression, a variety of technologies are used to finely control parameters such as quantization parameters and encoding modes, as well as to process and encode video frames block by block, so as to achieve precise control and processing of video information. The implementation process of precise control and processing is as follows: 1. Quantization parameter control: Quantization is a key step in video compression, which involves mapping the continuous values ​​of the signal into multiple discrete amplitudes. The quantization parameter (such as QP in HEVC) directly determines the fineness of quantization, which in turn affects the compression efficiency and video quality. By finely adjusting the quantization parameter, a higher compression ratio can be achieved while maintaining video quality.

[0038] 2. Coding mode selection: Different coding modes are suitable for different video content and scenes. For example, when the picture changes slightly, the intra-frame coding mode can be used; when the picture changes greatly, the inter-frame coding mode needs to be used. The encoder will automatically select the best coding mode according to the video content to achieve efficient compression.

[0039] Amplitude adjustment uses an adaptive quantization method to dynamically adjust the quantization step size according to the complexity of the video content. Complex areas use small quantization steps to ensure that more details are retained, and simple areas use large quantization steps to improve compression efficiency. Quantization parameter allocation is based on nonlinear mapping, and optimization of quantization parameters is determined by training neural networks or using optimization algorithms to determine the optimal quantization parameters, so that a higher compression ratio can be achieved while ensuring visual quality.

[0040] Step S4: each encoded video frame is processed into blocks, and the processed video frames are encoded block by block to obtain optimal encoding parameters and strategies.

[0041] S4 is specifically: Video frame block processing: Dividing the encoded video frame into small blocks (such as macroblocks) for independent processing is a common method in video compression. This can reduce computational complexity and improve coding efficiency. Each small block can be independently processed through prediction, transformation, quantization, and entropy coding, thereby achieving precise control of video information.

[0042] Block-by-block encoding: Based on block processing, block-by-block encoding can further improve encoding efficiency. The encoder encodes each small block separately and selects appropriate encoding parameters and strategies based on the content characteristics of the block. This ensures that each small block gets the best encoding effect, thereby improving the overall video quality.

[0043] The adjusted block-by-block coding relationship can reduce the amount of data and improve the video compression ratio at the same perceived quality by optimizing the quantization amplitude. Block-by-block coding uses the optimized quantization amplitude to further compress each block of data. At the same time, the adjusted quantization amplitude ensures that the encoder can select the optimal coding strategy to process each block during block-by-block coding through intra-block optimization, thereby achieving a higher compression ratio. In block-by-block coding, different blocks may have different content complexities. By adjusting the quantization amplitude, more flexible bitrate allocation can be achieved between blocks. Complex blocks use higher bitrates to retain details, and simple blocks use lower bitrates to save space.

[0044] By finely controlling parameters such as quantization parameters and encoding modes, as well as methods such as block processing and block encoding of video frames, precise control and processing of video information can be achieved, thereby achieving efficient compression while maintaining video quality.

[0045] Step S5: Optimize the compression process on the compressed video through the optimal encoding parameters and strategies to obtain the final lossless compressed video.

[0046] Based on the above method, the present invention provides a video lossless compression system, including: a data acquisition module, a compression module, an encoding module, a block module and an optimization processing module.

[0047] Among them, the data acquisition module is used to obtain the video to be compressed; the compression module is used to input the video to be compressed into the neural network, obtain the spatial features of the video frames and the time-dependent features between the video frames, and weightedly combine the spatial features and the time-dependent features to obtain the compressed video; the encoding module is used to determine the complexity of the compressed video content according to the video scene, and allocate the bit rate according to the complexity of the video content, and encode the compressed video; the blocking module is used to block each encoded video frame, and encode the blocked video frames block by block to obtain the optimal encoding parameters and strategies; the optimization processing module is used to optimize the compression processing of the compressed video through the optimal encoding parameters and strategies to obtain the final lossless compressed video.

[0048] The present invention also provides a computer device, including a memory and a processor, wherein a program is stored in the memory, and when the program is executed by the processor, the processor executes the steps of a video lossless compression method.

[0049] According to the disclosed embodiments, a computing device may communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth communications, etc.), or with any device (e.g., routers, modems, etc.) that enables a computing device to communicate with one or more other computing devices.

[0050] The present invention also provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of a video lossless compression method are implemented.

[0051] According to the disclosed embodiments, the storage medium may be a non-volatile computer-readable storage medium, such as but not limited to: 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 portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, the storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0052] The above content is a further detailed description of the present invention in combination with a specific preferred embodiment. For technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as belonging to the protection scope of the present invention.

Claims

1. A video lossless compression method, characterized in that: The steps include: Get the video to be compressed; Inputting the video to be compressed into a neural network, obtaining spatial features of video frames and time-dependent features between video frames, and weightedly combining the spatial features and the time-dependent features to obtain a compressed video; Determining the complexity of compressed video content according to the video scene, allocating a bit rate according to the complexity of the video content, and encoding the compressed video; Each of the encoded video frames is processed in blocks, and the processed video frames are encoded block by block to obtain optimal encoding parameters and strategies; The compressed video is optimized and compressed using the optimal encoding parameters and strategies to obtain a final lossless compressed video.

2. A video lossless compression method as claimed in claim 1, characterized in that: When the video to be compressed is input into a neural network, the neural network includes a convolutional neural network and a recurrent neural network; Among them, the spatial features of video frames in the video are extracted through convolutional neural networks; and the temporal dependency features between video frames are captured through recurrent neural networks.

3. A video lossless compression method as claimed in claim 2, characterized in that: The method of extracting spatial features of video frames in a video by using a convolutional neural network comprises the following steps: Using multiple convolution kernels to perform convolution operations on video frames to extract spatial features in the video frames; wherein the spatial features include edges, corners and textures; The spatial features are input into a pooling layer, and the resolution of the spatial features is reduced by maximum pooling and average pooling; The spatial features with reduced resolution are classified or regressed in a fully connected manner to determine the video frames with redundant information, and the video frames with redundant information are removed to obtain the final spatial features of the video frames.

4. A video lossless compression method as claimed in claim 3, characterized in that: The method of capturing the temporal dependency features between video frames by using a recurrent neural network comprises the following steps: Use a recurrent neural network to process video frame sequences and capture the temporal dependencies between video frames; Perform state transfer on the state in the time step of the recurrent neural network and set up a bidirectional recurrent neural network to capture the bidirectional temporal dependency in the video; The outputs of two RNN layers are merged to obtain the optimal time-dependent features.

5. A video lossless compression method as claimed in claim 4, characterized in that: The weighted combination of spatial features and time-dependent features to obtain a compressed video includes the following steps: The final spatial features of the video frame are concatenated and weightedly combined with the optimal time-dependent features to obtain feature representation; Use end-to-end training of convolutional neural network parameters and recurrent neural network parameters, and use labeled video data to guide convolutional neural network and recurrent neural network to learn to identify redundant information during end-to-end training; The video with the feature representation and redundant information removed is used as the compressed video.

6. A video lossless compression method as claimed in claim 1, characterized in that: The method allocates a bit rate according to the complexity of the video content and encodes the compressed video, including the following steps: Use high-efficiency video coding HEVC and open video coding AV1 for lossless video compression; When compressing a video losslessly, the encoder selects a bit rate for video storage based on the complexity of the video content.

7. A video lossless compression method as claimed in claim 1, characterized in that: Each encoded video frame is processed into blocks, and the processed video frames are encoded block by block to obtain optimal encoding parameters and strategies, including the following steps: Dividing the encoded video frame into blocks for prediction, transformation, quantization and entropy coding; Each block is encoded individually by the encoder, and encoding parameters and strategies are selected according to the content characteristics of the block.

8. A video lossless compression system, characterized in that: include: A data acquisition module, used for acquiring the video to be compressed; A compression module, used for inputting the video to be compressed into a neural network, obtaining spatial features of video frames and time-dependent features between video frames, and performing weighted combination of the spatial features and the time-dependent features to obtain a compressed video; The encoding module is used to determine the complexity of the compressed video content according to the video scene, allocate a bit rate according to the complexity of the video content, and encode the compressed video; A block module is used to process each encoded video frame into blocks, and encode the video frames after block processing block by block to obtain optimal encoding parameters and strategies; The optimization processing module is used to optimize the compression processing of the compressed video through the optimal encoding parameters and strategies to obtain the final lossless compressed video.

9. A computer device, characterized in that: It comprises a memory and a processor, wherein a program is stored in the memory, and when the program is executed by the processor, the processor executes the steps of a video lossless compression method as claimed in any one of claims 1 to 7.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of a video lossless compression method described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Bite rate control method and apparatus thereof

    CN102231825A

  • Rate control method for intra-frame coding

    CN104038769A

  • Adaptive video coding method based on deep learning

    CN110401834A

  • Video denoising method, device and equipment and storage medium

    CN112686828A

  • Video compression method and device, electronic equipment and computer readable storage medium

    CN117596415A