Video compression method and system, and storage medium

Through inter-frame motion vector compensation and semantic analysis, combined with vector matrix calculation, the problem of single-frame video quality enhancement that ignores inter-frame correlation in the existing technology is solved, and video details are effectively retained and quality improved.

CN115567719BActive Publication Date: 2024-09-24TIANJIN NAT CYBERNET SECURITY CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202211013861.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-23
Publication Date
2024-09-24
Estimated Expiration
2042-08-23

AI Technical Summary

Technical Problem

The existing technology ignores the temporal and spatial correlation between frames when enhancing the quality of single-frame video in video compression, resulting in the loss of video detail information.

Method used

Compensation is performed by extracting the inter-frame motion vectors between the current frame and the previous and subsequent frames, combined with semantic analysis and vector matrix calculation, to eliminate non-key frames to retain video details and perform compression encoding.

Benefits of technology

It effectively overcomes the limitations of single-frame video quality enhancement, improves the detail retention capability of video compression, and improves video quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115567719B
    Figure CN115567719B
Patent Text Reader

Abstract

The present invention provides a multi-level convolution video compression method and system, which can compensate the current frame through the inter-frame motion vector of the current frame and the previous and next frames, and can strengthen some feature vectors of the current frame, thereby performing difference estimation with the reference frame, semantic analysis to obtain the similarity calculation of word meanings, and calculating the correlation through the transposed matrix, and finally compressing after eliminating non-key frames, which can overcome the limitation of single-frame video quality enhancement in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network multimedia, and in particular to a video compression method and system, and a storage medium. Background Art

[0002] Traditional codec standards have improved the quality of compressed videos through deblocking filtering and sample point adaptation technology, but the actual effect is very limited, resulting in loss of detailed information generated by video frames. At the same time, existing video quality enhancement methods still have certain limitations. Some methods focus on single-frame video enhancement, but ignore the temporal and spatial correlation between frames.

[0003] Therefore, there is an urgent need for a targeted video compression method and system, and storage medium. Summary of the invention

[0004] The object of the present invention is to provide a video compression method and system, and a storage medium, which are used to solve the problem of limitations of single-frame video quality enhancement in the prior art.

[0005] In a first aspect, the present application provides a video compression method, the method comprising:

[0006] Acquire a video data stream, perform frame processing on the video data stream, and obtain first data in frames;

[0007] Extracting a first inter-frame motion vector between a current frame and a previous frame of the first data, and extracting a second inter-frame motion vector between the current frame and a subsequent frame, and compensating the current frame based on the first inter-frame motion vector and the second inter-frame motion vector, wherein the compensation is to use the inter-frame motion vector as input data for expanding video quality enhancement to strengthen a feature vector of the current frame;

[0008] Continuously perform motion vector compensation between previous and next frames on the time domain timeline to obtain second data;

[0009] Performing a difference operation between each frame of the second data and the reference frame, estimating the difference, and if the difference is within a preset range, it indicates that the frame is not much different from the reference frame and is not a key frame, and the frame is removed from the second data;

[0010] Input each frame of the second data after the difference operation into the semantic analysis model to obtain the word meaning, calculate the similarity between the word meaning of the current frame and the word meaning of the previous and next frames, and when the similarity result is higher than a first threshold, it indicates that there are artifacts between the current frame and the previous and next frames, and the current frame is removed to obtain the third data;

[0011] Input the third data into the vector matrix template to obtain the first vector matrix P1, and calculate the transposed matrix T1 of the first vector matrix P1; input the reference frame into the vector matrix template to obtain the reference matrix P2, calculate the transposed matrix T2 of the reference matrix P2, calculate the correlation between T1 and T2, and eliminate the frames with the correlation higher than the second threshold to obtain the fourth data, thereby retaining the details of the video;

[0012] compressing and encoding the fourth data to obtain a compressed data stream, and sending the compressed data stream to a next-level device;

[0013] Receive and decompress the compressed data stream sent by the other device.

[0014] In a second aspect, the present application provides a video compression system, the system comprising:

[0015] An acquisition unit, used for acquiring a video data stream, performing frame processing on the video data stream, and obtaining first data in frames;

[0016] a preprocessing unit, configured to extract a first inter-frame motion vector between a current frame and a previous frame of the first data, and extract a second inter-frame motion vector between the current frame and a subsequent frame, and compensate the current frame based on the first inter-frame motion vector and the second inter-frame motion vector, wherein the compensation is to use the inter-frame motion vector as input data for extending video quality enhancement to strengthen a feature vector of the current frame; and continuously perform inter-frame motion vector compensation on a temporal timeline to obtain second data;

[0017] a reprocessing unit, configured to perform a difference operation between each frame of the second data and a reference frame, and estimate the difference. If the difference is within a preset range, it indicates that the frame is not much different from the reference frame and is not a key frame, and the frame is removed from the second data; input each frame of the second data after the difference operation into a semantic analysis model to obtain word meanings, and calculate similarity between the word meanings of the current frame and the word meanings of the previous and next frames. When the similarity result is higher than a first threshold, it indicates that artifacts exist between the current frame and the previous and next frames, and the current frame is removed to obtain third data;

[0018] A correlation calculation unit is used to input the third data into a vector matrix template to obtain a first vector matrix P1, and calculate a transposed matrix T1 of the first vector matrix P1; input the reference frame into the vector matrix template to obtain a reference matrix P2, calculate a transposed matrix T2 of the reference matrix P2, calculate the correlation between T1 and T2, and eliminate the frames whose correlation is higher than a second threshold value to obtain fourth data, thereby retaining the details of the video;

[0019] A compression unit, used for compressing and encoding the fourth data to obtain a compressed data stream, and sending the compressed data stream to a next-level device;

[0020] The decompression unit is used to receive and decompress the compressed data stream sent by the other device.

[0021] In a third aspect, the present application provides a video compression system, the system comprising a processor and a memory:

[0022] The memory is used to store program code and transmit the program code to the processor;

[0023] The processor is configured to execute the method described in the first aspect according to instructions in the program code.

[0024] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program code, and the program code is used to execute the method described in the first aspect.

[0025] Beneficial Effects

[0026] The present invention provides a video compression method and system, and a storage medium. The current frame is compensated by the inter-frame motion vectors of the current frame and the previous and next frames, so that some feature vectors of the current frame can be strengthened, thereby performing difference estimation with a reference frame, obtaining similarity calculation of word meanings through semantic analysis, and calculating correlation through a transposed matrix. After eliminating non-key frames, compression is finally performed, which can overcome the limitation of single-frame video quality enhancement in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0028] Figure 1 A flowchart of a video compression method of the present invention;

[0029] Figure 2 The present invention is a structural diagram of a video compression system. DETAILED DESCRIPTION

[0030] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.

[0031] Figure 1 The flowchart of the video compression method provided for this application includes:

[0032] Acquire a video data stream, perform frame processing on the video data stream, and obtain first data in frames;

[0033] Extracting a first inter-frame motion vector between a current frame and a previous frame of the first data, and extracting a second inter-frame motion vector between the current frame and a subsequent frame, and compensating the current frame based on the first inter-frame motion vector and the second inter-frame motion vector, wherein the compensation is to use the inter-frame motion vector as input data for expanding video quality enhancement to strengthen a feature vector of the current frame;

[0034] Continuously perform motion vector compensation between previous and next frames on the time domain timeline to obtain second data;

[0035] Performing a difference operation between each frame of the second data and the reference frame, estimating the difference, and if the difference is within a preset range, it indicates that the frame is not much different from the reference frame and is not a key frame, and the frame is removed from the second data;

[0036] Input each frame of the second data after the difference operation into the semantic analysis model to obtain the word meaning, calculate the similarity between the word meaning of the current frame and the word meaning of the previous and next frames, and when the similarity result is higher than a first threshold, it indicates that there are artifacts between the current frame and the previous and next frames, and the current frame is removed to obtain the third data;

[0037] Input the third data into the vector matrix template to obtain the first vector matrix P1, and calculate the transposed matrix T1 of the first vector matrix P1; input the reference frame into the vector matrix template to obtain the reference matrix P2, calculate the transposed matrix T2 of the reference matrix P2, calculate the correlation between T1 and T2, and eliminate the frames with the correlation higher than the second threshold to obtain the fourth data, thereby retaining the details of the video;

[0038] compressing and encoding the fourth data to obtain a compressed data stream, and sending the compressed data stream to a next-level device;

[0039] Receive and decompress the compressed data stream sent by the other device.

[0040] In some preferred embodiments, the acquiring of the video data stream includes presetting different acquisition strategies according to different platforms to acquire video data streams of multiple different platforms.

[0041] In some preferred embodiments, the acquiring of video data streams of multiple different platforms includes encrypting and decoding the video data streams.

[0042] In some preferred embodiments, the compression encoding includes quantization encoding.

[0043] Figure 2 The architecture diagram of the video compression system provided in this application includes:

[0044] An acquisition unit, used for acquiring a video data stream, performing frame processing on the video data stream, and obtaining first data in frames;

[0045] a preprocessing unit, configured to extract a first inter-frame motion vector between a current frame and a previous frame of the first data, and extract a second inter-frame motion vector between the current frame and a subsequent frame, and compensate the current frame based on the first inter-frame motion vector and the second inter-frame motion vector, wherein the compensation is to use the inter-frame motion vector as input data for extending video quality enhancement to strengthen a feature vector of the current frame; and continuously perform inter-frame motion vector compensation on a temporal timeline to obtain second data;

[0046] a reprocessing unit, configured to perform a difference operation between each frame of the second data and a reference frame, and estimate the difference. If the difference is within a preset range, it indicates that the frame is not much different from the reference frame and is not a key frame, and the frame is removed from the second data; input each frame of the second data after the difference operation into a semantic analysis model to obtain word meanings, and calculate similarity between the word meanings of the current frame and the word meanings of the previous and next frames. When the similarity result is higher than a first threshold, it indicates that artifacts exist between the current frame and the previous and next frames, and the current frame is removed to obtain third data;

[0047] A correlation calculation unit is used to input the third data into a vector matrix template to obtain a first vector matrix P1, and calculate a transposed matrix T1 of the first vector matrix P1; input the reference frame into the vector matrix template to obtain a reference matrix P2, calculate a transposed matrix T2 of the reference matrix P2, calculate the correlation between T1 and T2, and eliminate the frames whose correlation is higher than a second threshold value to obtain fourth data, thereby retaining the details of the video;

[0048] A compression unit, used for compressing and encoding the fourth data to obtain a compressed data stream, and sending the compressed data stream to a next-level device;

[0049] The decompression unit is used to receive and decompress the compressed data stream sent by the other device.

[0050] The present application provides a video compression system, the system comprising: the system comprising a processor and a memory:

[0051] The memory is used to store program code and transmit the program code to the processor;

[0052] The processor is used to execute the method described in any one of all embodiments of the first aspect according to the instructions in the program code.

[0053] The present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program code, and the program code is used to execute the method described in any one of the embodiments of the first aspect.

[0054] In a specific implementation, the present invention further provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment of the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only storage memory (abbreviated as: ROM) or a random access memory (abbreviated as: RAM), etc.

[0055] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention or certain parts of the embodiments.

[0056] The same and similar parts between the various embodiments of this specification can be referred to each other. In particular, for the embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.

[0057] The above-described embodiments of the present invention do not limit the protection scope of the present invention.

Claims

1. A video compression method, It is characterized in that The method comprises: Acquire a video data stream, perform frame processing on the video data stream, and obtain first data in frames; Extracting a first inter-frame motion vector between a current frame and a previous frame of the first data, and extracting a second inter-frame motion vector between the current frame and a subsequent frame, and compensating the current frame based on the first inter-frame motion vector and the second inter-frame motion vector, wherein the compensation is to use the inter-frame motion vector as input data for expanding video quality enhancement to strengthen a feature vector of the current frame; Continuously perform motion vector compensation between previous and next frames on the time domain timeline to obtain second data; Performing a difference operation between each frame of the second data and the reference frame, estimating the difference, and if the difference is within a preset range, it indicates that the frame is not much different from the reference frame and is not a key frame, and the frame is removed from the second data; Input each frame of the second data after the difference operation into the semantic analysis model to obtain the word meaning, calculate the similarity between the word meaning of the current frame and the word meaning of the previous and next frames, and when the similarity result is higher than a first threshold, it indicates that there are artifacts between the current frame and the previous and next frames, and the current frame is removed to obtain the third data; Input the third data into the vector matrix template to obtain the first vector matrix P1, and calculate the transposed matrix T1 of the first vector matrix P1; input the reference frame into the vector matrix template to obtain the reference matrix P2, calculate the transposed matrix T2 of the reference matrix P2, calculate the correlation between T1 and T2, and eliminate the frames with the correlation higher than the second threshold to obtain the fourth data, thereby retaining the details of the video; compressing and encoding the fourth data to obtain a compressed data stream, and sending the compressed data stream to a next-level device; Receive and decompress the compressed data stream sent by the other device; The obtaining of the video data stream includes presetting different obtaining strategies according to different platforms to obtain video data streams of multiple different platforms; The acquiring of the video data streams of the multiple different platforms includes encrypting and decoding the video data streams; The compression coding includes quantization coding.

2. A video compression system, It is characterized in that The system comprises: An acquisition unit, used for acquiring a video data stream, performing frame processing on the video data stream, and obtaining first data in frames; a preprocessing unit, configured to extract a first inter-frame motion vector between a current frame and a previous frame of the first data, and extract a second inter-frame motion vector between the current frame and a subsequent frame, and compensate the current frame based on the first inter-frame motion vector and the second inter-frame motion vector, wherein the compensation is to use the inter-frame motion vector as input data for extending video quality enhancement to strengthen a feature vector of the current frame; and continuously perform inter-frame motion vector compensation on a temporal timeline to obtain second data; a reprocessing unit, configured to perform a difference operation between each frame of the second data and a reference frame, and estimate the difference. If the difference is within a preset range, it indicates that the frame is not much different from the reference frame and is not a key frame, and the frame is removed from the second data; input each frame of the second data after the difference operation into a semantic analysis model to obtain word meanings, and calculate similarity between the word meanings of the current frame and the word meanings of the previous and next frames. When the similarity result is higher than a first threshold, it indicates that artifacts exist between the current frame and the previous and next frames, and the current frame is removed to obtain third data; A correlation calculation unit is used to input the third data into a vector matrix template to obtain a first vector matrix P1, and calculate a transposed matrix T1 of the first vector matrix P1; input the reference frame into the vector matrix template to obtain a reference matrix P2, calculate a transposed matrix T2 of the reference matrix P2, calculate the correlation between T1 and T2, and eliminate the frames whose correlation is higher than a second threshold value to obtain fourth data, thereby retaining the details of the video; A compression unit, used for compressing and encoding the fourth data to obtain a compressed data stream, and sending the compressed data stream to a next-level device; A decompression unit, used for receiving and decompressing a compressed data stream sent by a counterpart device; The obtaining of the video data stream includes presetting different obtaining strategies according to different platforms to obtain video data streams of multiple different platforms; The acquiring of the video data streams of the multiple different platforms includes encrypting and decoding the video data streams; The compression coding includes quantization coding.

3. A video compression system, It is characterized in that The system comprises a processor and a memory: The memory is used to store program codes and transmit the program codes to the processor; The processor is configured to implement the method of claim 1 according to instructions in the program code.

4. A computer-readable storage medium, It is characterized in that The computer-readable storage medium is used to store program codes, and the program codes are used to be executed by a processor to implement the method according to claim 1.

Citation Information

Patent Citations

  • Video image compression artifact removing method combining motion compensation and generative adversarial network

    CN111866521A

  • Method and device for determining repeated video frames

    CN111935506A

  • Training data cleaning method and device

    CN112446361A

  • Video character recognition method and device based on key frame extraction

    CN112507842A

  • Image processing method and device

    CN114339260A