[go: up one dir, main page]

CN114727110A - Method and system for data processing - Google Patents

Method and system for data processing Download PDF

Info

Publication number
CN114727110A
CN114727110A CN202110008566.9A CN202110008566A CN114727110A CN 114727110 A CN114727110 A CN 114727110A CN 202110008566 A CN202110008566 A CN 202110008566A CN 114727110 A CN114727110 A CN 114727110A
Authority
CN
China
Prior art keywords
frame
boundary
data
adjustment
initial
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110008566.9A
Other languages
Chinese (zh)
Other versions
CN114727110B (en
Inventor
于江鸿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN202110008566.9A priority Critical patent/CN114727110B/en
Priority to US17/525,900 priority patent/US12184844B2/en
Priority to US17/727,791 priority patent/US20220272325A1/en
Publication of CN114727110A publication Critical patent/CN114727110A/en
Priority to US18/945,467 priority patent/US20250071339A1/en
Application granted granted Critical
Publication of CN114727110B publication Critical patent/CN114727110B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本说明书提供的数据处理的方法和系统,可以对初始数据进行边界调节以及编码频谱调节,以对初始帧中预设范围内的边界进行增强,并使初始帧中选定区域的幅值平稳地降低,减少数据信息量,在提高数据压缩的效率的同时减少数据损失,避免细节丢失。对压缩数据进行解压时,使用与编码频谱调节相对应的参数对压缩数据进行解码频谱调节,并对预设范围内的边界信息进行边界校正以消除噪声,在恢复数据的同时对数据进行降噪,使解压后的数据更清晰。所述方法和系统可以提高数据的压缩效率,提升传输效率,减少数据损失,同时可以提升解压后的数据的清晰度。

Figure 202110008566

The data processing method and system provided in this specification can perform boundary adjustment and encoding spectrum adjustment on the initial data, so as to enhance the boundary within the preset range in the initial frame, and make the amplitude of the selected area in the initial frame smoothly Reduce, reduce the amount of data information, reduce data loss while improving the efficiency of data compression, and avoid loss of details. When decompressing the compressed data, use the parameters corresponding to the encoding spectrum adjustment to perform decoding spectrum adjustment on the compressed data, and perform boundary correction on the boundary information within the preset range to eliminate noise, and denoise the data while restoring the data. , to make the decompressed data clearer. The method and system can improve data compression efficiency, improve transmission efficiency, reduce data loss, and can improve the clarity of decompressed data.

Figure 202110008566

Description

数据处理的方法和系统Method and system for data processing

技术领域technical field

本说明书涉及数据处理领域,尤其涉及一种数据处理的方法和系统。This specification relates to the field of data processing, and in particular, to a method and system for data processing.

背景技术Background technique

随着互联网技术的日益普遍,特别是移动终端的普及,通信网络涌现出越来越多类型的数据,随着而计算机的普及化,越来越多的数据正在占用越来越多的网络和存储资源,例如,视频数据、音频数据,等等。数据中往往包含巨大的信息量,对储存和传输的要求往往很高,因此,为了便于储存和传输,往往需要对数据进行压缩,在需要时再对压缩后的数据进行解压还原。因此,数据压缩和解压技术得到越来越多的应用。With the increasing popularity of Internet technology, especially the popularization of mobile terminals, more and more types of data have emerged in communication networks. With the popularization of computers, more and more data are occupying more and more network and Store resources such as video data, audio data, and so on. Data often contains a huge amount of information, and the requirements for storage and transmission are often very high. Therefore, in order to facilitate storage and transmission, it is often necessary to compress the data, and then decompress and restore the compressed data when necessary. Therefore, data compression and decompression techniques are being used more and more.

比如,在过去的几十年中,视频和图像压缩技术得到越来越多的应用。视频中往往包含巨大的信息量。从传统的广播电影电视到现在大量的监控和互联网应用,压缩后的图像视频和图像正在占用越来越多的网络和存储资源。这使得如果将一段视频的原始数据从一个终端通过网络传输到另一个终端时会占用大量的网络资源。这就使得在有些实时视频传输的情况下难以实现画面的流畅传输。因此,视频数据传输前首先要在数据压缩设备处进行压缩处理,以便于传输。压缩后的视频在经过传输媒介传输到数据解压设备之后,数据解压设备再对所述视频进行解压,以至少部分地还原视频图像。For example, over the past few decades, video and image compression techniques have been increasingly used. Videos often contain a huge amount of information. From traditional radio, film and television to a large number of surveillance and Internet applications, compressed video and images are taking up more and more network and storage resources. This makes it occupy a lot of network resources if the original data of a piece of video is transmitted from one terminal to another terminal through the network. This makes it difficult to achieve smooth transmission of pictures in the case of some real-time video transmission. Therefore, video data must be compressed at the data compression device before being transmitted to facilitate transmission. After the compressed video is transmitted to the data decompression device through the transmission medium, the data decompression device decompresses the video to at least partially restore the video image.

现有技术中主要的视频压缩标准是H.264和H.265标准。在传输前,通常依据H.264和H.265标准使用编码器对视频进行整体压缩,传输后再依据H.264和H.265标准通过解码器对视频进行整体解压。但是,上述对视频进行整体压缩的处理方法在计算量和解压后视频清晰度之间的平衡上表现的仍不能令人满意。这是因为,H.264和H.265标准在处理所述原始视频的时候要通过各种复杂的算法生成原始帧的预测帧,然后记录所述原始帧与所述预测帧之间的残差。所述预测帧同所述原始帧越接近,则残差越小,对一段视频编码后的数据量就越小。为了使编码更加容易,常用的方法是通过对原始帧进行滤波来减少原始帧图像中的高频信息。由傅里叶变换可知,在图片中物体的边界部分频率信息往往是比较丰富的,边界部分的高频分量通常大于其他平缓区域的高频分量。因此减少高频信息的帧图像虽然在视觉上变得模糊了(也就是图像的清晰度降低了),却可以使得预测帧和滤波后的原始帧之间的残差更小。这样对视频编码时需要的计算量和编码后的数据流都减小了很多。然而,帧预测的技术非常复杂,会占用大量的计算资源。以视频编解码系统为例,平均每提高30%~40%的编码效率,便要增加约10倍的计算量。同时,传输后的数据经解压后清晰度降低,而且往往存在各种噪声,比如块效应或振铃效应。所述块效应是指在图像处理中,基于块的傅里叶变换使得图像边界处出现不连续现象。所述振铃效应是指在图像处理中,对一幅图像进行频谱调节处理时,若选用的频谱调节函数数值上具有较快的变化(也就是存在导数变化剧烈的区域),则会使输出图像在灰度剧烈变化处产生灰度震荡,就好像钟被敲击后产生的空气震荡。所述噪声多出现在图像边界处。如果一幅输出图像有很强的噪声,则无法满足人们对数据的清晰度日益增长的要求。因此,如何进一步提高数据的压缩效率,同时提高数据解压后的清晰度,消除噪声,一直都是数据压缩和解压技术领域追求的目标。The main video compression standards in the prior art are the H.264 and H.265 standards. Before transmission, an encoder is usually used to compress the video as a whole according to the H.264 and H.265 standards, and after transmission, the overall video is decompressed by a decoder according to the H.264 and H.265 standards. However, the above-mentioned processing method for overall video compression is still unsatisfactory in terms of the balance between the amount of calculation and the resolution of the video after decompression. This is because the H.264 and H.265 standards use various complex algorithms to generate the predicted frame of the original frame when processing the original video, and then record the residual between the original frame and the predicted frame . The closer the predicted frame is to the original frame, the smaller the residual, and the smaller the amount of data encoded for a piece of video. To make encoding easier, a common method is to reduce the high-frequency information in the original frame image by filtering the original frame. It can be known from the Fourier transform that the frequency information of the boundary part of the object in the picture is often rich, and the high frequency component of the boundary part is usually larger than the high frequency component of other flat areas. Therefore, although the frame image with reduced high-frequency information becomes visually blurred (that is, the definition of the image is reduced), it can make the residual between the predicted frame and the filtered original frame smaller. In this way, the amount of computation required for video encoding and the encoded data stream are greatly reduced. However, the techniques of frame prediction are very complex and consume a lot of computational resources. Taking a video encoding and decoding system as an example, the amount of computation increases by about 10 times for every 30% to 40% increase in encoding efficiency on average. At the same time, the transmitted data is decompressed and the definition is reduced, and there are often various noises, such as block effect or ringing effect. The block effect refers to that in image processing, the block-based Fourier transform causes discontinuity at the boundary of the image. The ringing effect means that in image processing, when performing spectrum adjustment processing on an image, if the selected spectrum adjustment function has a relatively rapid change in value (that is, there is an area where the derivative changes sharply), the output will be changed. The image produces grayscale oscillations where the grayscale changes sharply, just like the air oscillations produced by a clock being struck. The noise mostly occurs at the image boundary. If an output image has strong noise, it cannot meet people's increasing demands for data clarity. Therefore, how to further improve the compression efficiency of data, improve the clarity of data after decompression, and eliminate noise has always been the goal pursued in the field of data compression and decompression technology.

因此,为了提升数据的传输效率以及数据解压后的清晰度,需要一种压缩效率更高同时数据解压更清晰的数据处理的方法和系统。Therefore, in order to improve the transmission efficiency of data and the clarity after data decompression, a data processing method and system with higher compression efficiency and clearer data decompression are required.

发明内容SUMMARY OF THE INVENTION

本说明书提供一种压缩效率更高同时数据解压更清晰的数据处理的方法和系统。以视频数据为例,所述数据处理的方法和系统可以通过小范围的伽马算法对初始视频数据中的初始帧中的小范围内的边界进行调节,以避免图像中相邻像素点间差距较小的小范围内的边界信息在数据压缩(预测和求残差)过程中丢失,避免细节损失;同时所述方法和系统能够对所述初始帧进行编码频谱调节,使得所述初始帧在选定频域内的信号强度减小,使初始帧中选定频率区域的幅值平稳地降低,从而减少数据信息量。然后再对频谱调节后的数据进行编码(预测和求残差)得到压缩帧,提高数据压缩的效率。所述编码频谱调节可以使初始帧中的数据信息量减少,在进行预测和求残差时可以提高数据压缩的效率。在进行数据解压时,所述方法和系统可以对所述压缩帧进行解码频谱调节和边界校正。所述方法和系统可以先对压缩帧进行解码,然后使用与编码端相对应的参数对解码后的数据进行解码频谱调节,所述解码频谱调节可以使解码后的数据中的中频和高频区域的分量被过滤,即得到比解码后的数据更模糊的数据,将解码后的数据与经解码频谱调节后被过滤掉中频和高频区域的数据相减可以获取初始帧中的边界信息;然后所述方法和系统可以通过小范围内的伽马算法对所述边界信息中的小范围内的边界进行减弱,以进行所述边界校正消除边界信息中的噪声;最后,所述方法和系统将降噪后的边界信息与解码后的数据叠加便可以得到解压帧。所述解码频谱调节与所述编码频谱调节相对应,编码频谱调节函数与解码频谱调节函数之间存在对应的关系,可以使经所述编码频谱调节的压缩数据恢复至初始帧的清晰度甚至高于所述初始帧的清晰度。也就是说,在不显著增加编解码的计算量的情况下,解码端需要至少将解压数据在重要频率内的数据恢复至初始帧的清晰度,甚至可以获得超过初始帧的清晰度。由于初始帧在重要频率区域只经过了频域上的信号衰减而不是频域上的滤除,在重要频域内的信息并没有缺失,因此可以根据所述编码频谱调节函数和所述解码频谱调节函数的关系以及各自的特征,来设计编码频谱调节函数和解码频谱调节函数,对初始帧中重要频率上的信息进行恢复。所述方法和系统可以显著提高数据的压缩效率,提升数据的传输效率,减少数据丢失,避免细节损失,同时消除噪声,提高解压后数据的清晰度。This specification provides a method and system for data processing with higher compression efficiency and clearer data decompression. Taking video data as an example, the data processing method and system can adjust the boundaries within a small range in the initial frame in the initial video data through a small-scale gamma algorithm, so as to avoid the gap between adjacent pixels in the image. Boundary information in a small and small range is lost in the process of data compression (prediction and residual) to avoid loss of details; at the same time, the method and system can perform coding spectrum adjustment on the initial frame, so that the initial frame is The reduction of the signal strength in the selected frequency domain causes the amplitude of the selected frequency region in the initial frame to decrease smoothly, thereby reducing the amount of data information. Then, the data after spectrum adjustment is encoded (prediction and residual) to obtain compressed frames, which improves the efficiency of data compression. The encoding spectrum adjustment can reduce the amount of data information in the initial frame, and can improve the efficiency of data compression during prediction and residual error calculation. During data decompression, the method and system may perform decoded spectral adjustment and boundary correction on the compressed frame. The method and system can first decode the compressed frame, and then use the parameters corresponding to the encoding end to perform decoding spectrum adjustment on the decoded data, and the decoding spectrum adjustment can make the intermediate frequency and high frequency regions in the decoded data. The component is filtered, that is, the data that is more ambiguous than the decoded data is obtained, and the boundary information in the initial frame can be obtained by subtracting the decoded data and the data of the intermediate frequency and high frequency regions after adjustment of the decoded spectrum; then The method and system can weaken the boundary in the small range in the boundary information through the gamma algorithm in the small range, so as to perform the boundary correction to eliminate the noise in the boundary information; finally, the method and system will The decompressed frame can be obtained by superimposing the denoised boundary information and the decoded data. The decoding spectrum adjustment corresponds to the encoding spectrum adjustment, and there is a corresponding relationship between the encoding spectrum adjustment function and the decoding spectrum adjustment function, so that the compressed data adjusted by the encoding spectrum can be restored to the original frame definition or even higher. the sharpness of the initial frame. That is to say, without significantly increasing the computational complexity of encoding and decoding, the decoding end needs to at least restore the decompressed data within the important frequency to the definition of the original frame, or even obtain a definition that exceeds the original frame. Since the initial frame has only undergone signal attenuation in the frequency domain instead of filtering in the frequency domain in the important frequency region, the information in the important frequency domain is not missing, so it can be adjusted according to the encoding spectrum adjustment function and the decoding spectrum adjustment function. According to the relationship between the functions and their respective characteristics, the encoding spectrum adjustment function and the decoding spectrum adjustment function are designed to restore the information on the important frequencies in the initial frame. The method and system can significantly improve data compression efficiency, improve data transmission efficiency, reduce data loss, avoid detail loss, eliminate noise, and improve the clarity of decompressed data.

基于此,第一方面,本说明书提供一种数据处理的方法,包括:选择初始数据中的初始帧,所述初始帧包括预设字节数的初始数据;以及对所述初始帧进行数据压缩,得到压缩帧,其中,所述数据压缩包括对所述初始帧进行边界调节以及对在压帧进行编码频谱调节,所述在压帧包括所述初始帧和所述初始帧在所述数据压缩过程中成为所述压缩帧之前的任一数据状态,其中,所述编码频谱调节包括使用编码卷积核对所述在压帧做卷积,以便在频域内平稳地降低所述在压帧的中频区域的幅值。Based on this, in a first aspect, this specification provides a method for data processing, including: selecting an initial frame in initial data, where the initial frame includes initial data with a preset number of bytes; and performing data compression on the initial frame , to obtain a compressed frame, wherein the data compression includes performing boundary adjustment on the initial frame and performing encoding spectrum adjustment on the compressed frame, where the compressed frame includes the initial frame and the initial frame in the data compression During the process, it becomes any data state before the compressed frame, wherein the encoding spectrum adjustment includes convolving the under-compressed frame with an encoding convolution check, so as to smoothly reduce the intermediate frequency of the under-compressed frame in the frequency domain The magnitude of the area.

在一些实施例中,所述边界调节包括通过伽马值小于1的第一伽马算法对所述初始帧的边界中边界值在第一预设范围内的边界进行调节。In some embodiments, the boundary adjustment includes adjusting a boundary whose boundary value is within a first preset range in the boundary of the initial frame by a first gamma algorithm whose gamma value is less than 1.

在一些实施例中,所述对所述初始帧进行数据压缩,包括:先对所述初始帧进行所述边界调节,再进行所述编码频谱调节;或者先对所述初始帧进行所述编码频谱调节,再进行所述边界调节。In some embodiments, the performing data compression on the initial frame includes: first performing the boundary adjustment on the initial frame, and then performing the encoding spectrum adjustment; or performing the encoding on the initial frame first spectrum adjustment, and then perform the boundary adjustment.

在一些实施例中,所述先对所述初始帧进行所述边界调节,再进行所述编码频谱调节,包括:对所述初始帧进行所述边界调节,获取第一增强帧;以及对所述第一增强帧进行所述编码频谱调节和编码,包括以下方式中的一种:对所述第一增强帧先进行所述编码频谱调节,再对编码频谱调节后的第一增强帧进行预测和求残差,其中,所述在压帧包括所述第一增强帧;对所述第一增强帧先进行预测得到预测帧,再对所述第一增强帧和所述预测帧进行所述编码频谱调节和求残差,其中,所述在压帧包括所述第一增强帧和所述预测帧;以及对所述第一增强始帧先进行预测和求残差,再对所述残差进行所述编码频谱调节,其中,所述在压帧包括所述残差。In some embodiments, performing the boundary adjustment on the initial frame before performing the encoding spectrum adjustment includes: performing the boundary adjustment on the initial frame to obtain a first enhanced frame; and performing the boundary adjustment on the initial frame; Performing the encoding spectrum adjustment and encoding on the first enhanced frame, including one of the following methods: first performing the encoding spectrum adjustment on the first enhanced frame, and then predicting the first enhanced frame after the encoding spectrum adjustment and residuals, wherein the compressed frame includes the first enhanced frame; the first enhanced frame is first predicted to obtain a predicted frame, and then the first enhanced frame and the predicted frame are subjected to the Coded spectrum adjustment and residual error calculation, wherein the compressed frame includes the first enhanced frame and the predicted frame; and the first enhanced initial frame is first predicted and residual error calculated, and then the residual error is calculated. The encoding spectrum adjustment is performed on the difference, wherein the under-compression frame includes the residual.

在一些实施例中,所述对所述初始帧进行所述边界调节,获取第一增强帧,包括:通过第一调节函数对所述初始帧进行调节,得到第一帧,以使所述初始帧在频域内的低频区域的分量被保留而中频至高频区域的分量被衰减;对所述初始帧和所述第一帧求差,获取第一边界,所述第一边界包括所述初始帧的边界信息;通过所述第一伽马算法,对所述第一边界中边界值处于所述第一预设范围内的边界进行调节,得到增强边界;以及将所述第一帧与所述增强边界进行叠加,得到所述第一增强帧。In some embodiments, performing the boundary adjustment on the initial frame to obtain the first enhanced frame includes: adjusting the initial frame through a first adjustment function to obtain the first frame, so that the initial frame The components in the low frequency region of the frame in the frequency domain are preserved and the components in the intermediate frequency to the high frequency region are attenuated; the difference between the initial frame and the first frame is obtained to obtain a first boundary, and the first boundary includes the initial frame boundary information; through the first gamma algorithm, adjust the boundary of the first boundary whose boundary value is within the first preset range to obtain an enhanced boundary; and combine the first frame with the The enhanced boundaries are superimposed to obtain the first enhanced frame.

在一些实施例中,在所述得到增强边界之前,所述对所述初始帧进行所述边界调节,获取第一增强帧,还包括:通过第一系数对所述第一边界进行增强,其中,所述第一系数为大于1的任意数,所述第一边界包括通过所述第一系数增强的边界。In some embodiments, before obtaining the enhanced boundary, performing the boundary adjustment on the initial frame to obtain a first enhanced frame further includes: enhancing the first boundary by a first coefficient, wherein , the first coefficient is any number greater than 1, and the first boundary includes a boundary enhanced by the first coefficient.

在一些实施例中,所述对所述第一边界中边界值处于所述第一预设范围内的边界进行调节,得到增强边界,包括:通过第二调节函数对所述第一边界进行调节,得到第二边界,以使所述第一边界在频域内的低频区域的分量被保留而中频至高频区域的分量被衰减;以及通过所述第一伽马算法,对所述第二边界中边界值处于所述第一预设范围内的边界进行调节,得到所述增强边界。In some embodiments, the adjusting the boundary of the first boundary whose boundary value is within the first preset range to obtain an enhanced boundary includes: adjusting the first boundary by using a second adjustment function , obtain a second boundary, so that the components of the low frequency region of the first boundary in the frequency domain are preserved and the components of the intermediate frequency to the high frequency region are attenuated; and through the first gamma algorithm, the second boundary is The middle boundary value is adjusted to the boundary within the first preset range to obtain the enhanced boundary.

在一些实施例中,所述先对所述初始帧进行所述编码频谱调节,再进行所述边界调节,包括:对所述初始帧进行所述编码频谱调节,获取编码频谱调节帧;对所述编码频谱调节帧进行所述边界调节,得到第二增强帧;以及对所述第二增强帧进行预测和求残差。In some embodiments, the performing the encoding spectrum adjustment on the initial frame first, and then performing the boundary adjustment, includes: performing the encoding spectrum adjustment on the initial frame, and obtaining an encoded spectrum adjustment frame; performing the boundary adjustment on the encoded spectrum adjustment frame to obtain a second enhanced frame; and performing prediction and residual error calculation on the second enhanced frame.

在一些实施例中,所述对所述编码频谱调节帧进行所述边界调节,得到第二增强帧,包括:对所述初始帧和所述编码频谱调节帧求差,得到第一边界,所述第一边界包括所述初始帧的边界信息;通过所述第一伽马算法,对所述第一边界中边界值处于所述第一预设范围内的边界进行调节,得到增强边界;将所述增强边界与所述第一边界求差,得到调节值;以及将所述编码频谱调节帧与所述调节值进行叠加,得到所述第二增强帧。In some embodiments, performing the boundary adjustment on the encoded spectrum adjustment frame to obtain a second enhanced frame includes: taking a difference between the initial frame and the encoded spectrum adjustment frame to obtain a first boundary, and the The first boundary includes boundary information of the initial frame; the first gamma algorithm is used to adjust the boundary whose boundary value is within the first preset range in the first boundary to obtain an enhanced boundary; A difference between the enhancement boundary and the first boundary is obtained to obtain an adjustment value; and the second enhancement frame is obtained by superimposing the coded spectrum adjustment frame and the adjustment value.

在一些实施例中,在所述得到增强边界之前,所述对所述编码频谱调节帧进行所述边界调节,得到第二增强帧,还包括:通过第一系数对所述第一边界进行增强,其中,所述第一系数为大于1的任意数,所述第一边界包括通过所述第一系数增强的边界。In some embodiments, before the obtaining the enhanced boundary, performing the boundary adjustment on the encoded spectrum adjustment frame to obtain a second enhanced frame, further comprising: enhancing the first boundary by a first coefficient , wherein the first coefficient is any number greater than 1, and the first boundary includes a boundary enhanced by the first coefficient.

在一些实施例中,所述对所述第一边界中边界值处于所述第一预设范围内的边界进行调节,得到增强边界,包括:通过第二调节函数对所述第一边界进行调节,得到第二边界,以使所述第一边界在频域内的低频区域的分量被保留而中频至高频区域的分量被衰减;以及通过所述第一伽马算法,对所述第二边界中边界值处于所述第一预设范围内的边界进行调节,得到所述增强边界。In some embodiments, the adjusting the boundary of the first boundary whose boundary value is within the first preset range to obtain an enhanced boundary includes: adjusting the first boundary by using a second adjustment function , obtain a second boundary, so that the components of the low frequency region of the first boundary in the frequency domain are preserved and the components of the intermediate frequency to the high frequency region are attenuated; and through the first gamma algorithm, the second boundary is The middle boundary value is adjusted to the boundary within the first preset range to obtain the enhanced boundary.

在一些实施例中,所述对所述在压帧进行编码频谱调节,包括:确定所述初始帧的帧类型,所述帧类型包括帧内预测帧、前向预测帧以及双向预测帧中的至少一种;以及基于所述初始帧的帧类型,从编码卷积核组中选择一个卷积核作为所述编码卷积核对所述在压帧做卷积。In some embodiments, the performing encoding spectrum adjustment on the under-compressed frame includes: determining a frame type of the initial frame, where the frame type includes an intra-frame prediction frame, a forward-prediction frame, and a bidirectionally-predicted frame. at least one; and, based on the frame type of the initial frame, selecting a convolution kernel from the encoding convolution kernel group as the encoding convolution kernel to perform convolution on the compressed frame.

在一些实施例中,所述对所述在压帧做卷积,包括:对所述在压帧在垂直方向、水平方向和斜向中的至少一个方向上进行卷积。In some embodiments, performing the convolution on the on-press frame includes: performing convolution on the on-press frame in at least one of a vertical direction, a horizontal direction, and an oblique direction.

在一些实施例中,所述编码频谱调节使得在频域内平稳地降低所述在压帧高频区域的幅值。In some embodiments, the encoding spectral adjustment is such that the amplitude in the framed high frequency region is smoothly reduced in the frequency domain.

在一些实施例中,所述编码频谱调节使得在频域内平稳地降低所述在压帧低频区域的幅值,以及所述编码频谱调节对所述在压帧的所述低频区域的幅值降低幅度低于所述中频区域的幅值降低幅度。In some embodiments, the encoding spectral adjustment causes a smooth reduction in the amplitude of the low frequency region of the framed frame in the frequency domain, and the encoding spectral adjustment reduces the amplitude of the low frequency region of the framed frame. The magnitude is lower than the magnitude of the magnitude reduction in the mid-frequency region.

在一些实施例中,所述编码频谱调节对所述在压帧在频域内任意频率上的幅值调节增益都大于零。In some embodiments, the amplitude adjustment gain of the encoding spectrum adjustment at any frequency in the frequency domain of the frame is greater than zero.

第二方面,本说明书还提供一种数据处理的系统,包括:至少一个存储介质以及至少一个处理器,所述至少一个存储介质存储有至少一个指令集,用于数据处理;所述至少一个处理器同所述至少一个存储介质通讯连接,其中,当所述系统运行时,所述至少一个处理器读取所述至少一个指令集,并且根据所述至少一个指令集的指示执行本说明书第一方面所述的数据处理的方法。In a second aspect, this specification also provides a data processing system, comprising: at least one storage medium and at least one processor, wherein the at least one storage medium stores at least one instruction set for data processing; the at least one processing The processor is communicatively connected to the at least one storage medium, wherein, when the system is running, the at least one processor reads the at least one instruction set, and executes the first instruction set of the present specification according to the instructions of the at least one instruction set. The method of data processing described in the aspect.

第三方面,本说明书还提供一种数据处理的方法,包括:获取压缩数据,所述压缩数据包括对初始帧进行数据压缩得到的压缩帧;以及对所述压缩帧进行数据解压,得到解压帧,所述数据解压包括对在解帧进行解码频谱调节以及边界校正,所述在解帧包括所述压缩帧和所述压缩帧在所述数据解压过程中成为所述解压帧前的任一数据状态,其中,所述解码频谱调节包括使用解码卷积核对所述在解帧做卷积,以便所述在解帧在频域内的幅值平滑地降低以过滤中频至高频区域的分量,所述编码频谱调节与所述解码频谱调节存在预先设定的关联关系,所述边界校正包括通过第二伽马算法对所述在解帧的边界中边界值在第二预设范围内的边界进行校正,以进行降噪。In a third aspect, this specification also provides a data processing method, including: acquiring compressed data, the compressed data including a compressed frame obtained by data compression of an initial frame; and decompressing the compressed frame to obtain a decompressed frame , the data decompression includes performing decoding spectrum adjustment and boundary correction on the decompressed frame, where the deframe includes the compressed frame and the compressed frame becomes any data before the decompressed frame during the data decompression process state, wherein the decoded spectral adjustment includes convolving the deframed with a decoded convolution kernel so that the deframed amplitude in the frequency domain is smoothly reduced to filter components in the mid- to high-frequency region, so There is a preset correlation relationship between the encoding spectrum adjustment and the decoding spectrum adjustment, and the boundary correction includes performing a second gamma algorithm on the boundary where the boundary value is within the second preset range in the deframed boundary. Correction for noise reduction.

在一些实施例中,所述第二伽马算法包括伽马值大于1的伽马算法,以对所述在解帧的边界中边界值在所述第二预设范围内的边界进行减弱。In some embodiments, the second gamma algorithm includes a gamma algorithm with a gamma value greater than 1, so as to weaken the boundary of the de-framed boundary whose boundary value is within the second preset range.

在一些实施例中,所述对所述压缩帧进行数据解压,包括:对所述在解帧进行所述解码频谱调节,得到解码频谱调节帧;对所述在解帧和所述解码频谱调节帧求差,得到第三边界,所述第三边界为所述在解帧的边界,包括所述初始帧的边界信息;通过所述第二伽马算法,对所述第三边界中边界值处于所述第二预设范围内的边界进行减弱,以对所述第三边界进行降噪,得到降噪边界;以及将所述降噪边界和所述在解帧叠加得到所述解压帧。In some embodiments, the performing data decompression on the compressed frame includes: performing the decoding spectrum adjustment on the decompressed frame to obtain a decoded spectrum adjustment frame; adjusting the decompression frame and the decoded spectrum The frame difference is obtained to obtain a third boundary, and the third boundary is the boundary of the frame being decoded, including the boundary information of the initial frame; through the second gamma algorithm, the boundary value in the third boundary is calculated. The boundary within the second preset range is attenuated to denoise the third boundary to obtain a noise reduction boundary; and the decompressed frame is obtained by superimposing the noise reduction boundary and the decompressed frame.

在一些实施例中,在所述得到降噪边界之前,所述对所述压缩帧进行数据解压,包括:通过第二系数对所述第三边界进行增强,其中,所述第二系数为大于1的任意数,所述第三边界包括通过所述第二系数增强的边界。In some embodiments, before the denoising boundary is obtained, performing data decompression on the compressed frame includes: enhancing the third boundary by a second coefficient, wherein the second coefficient is greater than Any number of 1, the third boundary includes the boundary enhanced by the second coefficient.

在一些实施例中,所述通过所述第二伽马算法,对所述第三边界中边界值处于所述第二预设范围内的边界进行减弱,以对所述第三边界进行降噪,得到降噪边界,包括:通过第三调节函数对所述第三边界进行调节,得到第四边界,以使所述第三边界在频域内的低频区域的分量被保留而中频至高频区域的分量被过滤;以及通过所述第二伽马算法,对所述第四边界中边界值处于所述第二预设范围内的边界进行减弱。In some embodiments, the second gamma algorithm is used to attenuate the boundary whose boundary value is within the second preset range in the third boundary, so as to denoise the third boundary , to obtain a noise reduction boundary, including: adjusting the third boundary through a third adjustment function to obtain a fourth boundary, so that the component of the third boundary in the low frequency region in the frequency domain is retained and the intermediate frequency to high frequency region is The component of is filtered; and the boundary whose boundary value is within the second preset range of the fourth boundary is weakened by the second gamma algorithm.

在一些实施例中,在所述对所述在解帧进行所述解码频谱调节,得到解码频谱调节帧之前,所述对所述压缩帧进行数据解压,还包括:对所述压缩帧进行解码,得到解码帧,所述在解帧包括所述解码帧。In some embodiments, before performing the decoding spectrum adjustment on the decoded frame to obtain a decoded spectrum adjustment frame, performing data decompression on the compressed frame further includes: decoding the compressed frame , to obtain a decoded frame, and the decoded frame includes the decoded frame.

在一些实施例中,所述数据压缩包括编码频谱调节,包括使用编码卷积核对所述在压帧做卷积,以便在频域内平稳地降低在压帧在中频区域的幅值,所述在压帧包括所述初始帧和所述初始帧在所述数据压缩过程中成为所述压缩帧之前的任一数据状态,其中,所述解码卷积核和所述编码卷积核相对应。In some embodiments, the data compression includes coded spectral adjustment, including convolving the compressed frame with an coded convolution kernel to smoothly reduce the amplitude of the compressed frame in the intermediate frequency region in the frequency domain, the The compressed frame includes the initial frame and any data state before the initial frame becomes the compressed frame in the data compression process, wherein the decoding convolution kernel corresponds to the encoding convolution kernel.

第四方面,本说明书还提供一种数据处理的系统,包括至少一个存储介质和至少一个处理器,所述至少一个存储介质存储有至少一个指令集,用于数据处理;以及所述至少一个处理器同所述至少一个存储介质通讯连接,其中当所述系统运行时,所述至少一个处理器读取所述至少一个指令集,并且根据所述至少一个指令集的指示执行本说明书第三方面所述的数据处理的方法。In a fourth aspect, this specification also provides a data processing system, comprising at least one storage medium and at least one processor, the at least one storage medium stores at least one instruction set for data processing; and the at least one processing The processor is communicatively connected to the at least one storage medium, wherein when the system is running, the at least one processor reads the at least one instruction set and executes the third aspect of the present specification according to the instructions of the at least one instruction set The described data processing method.

本说明书提供的数据处理的方法和系统的其他功能将在以下说明中部分列出。根据描述,以下数字和示例介绍的内容将对那些本领域的普通技术人员显而易见。本说明书提供的数据处理的方法、系统和存储介质的创造性方面可以通过实践或使用下面详细示例中所述的方法、装置和组合得到充分解释。Other functions of the data processing method and system provided by this specification will be partially listed in the following description. From the description, what is presented in the following figures and examples will be apparent to those of ordinary skill in the art. The inventive aspects of the data processing methods, systems, and storage media provided by this specification can be fully explained by practice or use of the methods, apparatus, and combinations described in the detailed examples below.

附图说明Description of drawings

为了更清楚地说明本说明书实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本说明书的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present specification more clearly, the following briefly introduces the drawings that are used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present specification. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative effort.

图1示出了根据本说明书的实施例提供的一种数据处理的系统示意图;FIG. 1 shows a schematic diagram of a data processing system provided according to an embodiment of the present specification;

图2示出了根据本说明书的实施例提供的一种数据处理的数据压缩设备示意图;FIG. 2 shows a schematic diagram of a data compression device for data processing provided according to an embodiment of the present specification;

图3A示出了根据本说明书的实施例提供的一种数据压缩和数据解压的流程图;3A shows a flowchart of data compression and data decompression provided according to an embodiment of the present specification;

图3B示出了根据本说明书的实施例提供的一种数据压缩和数据解压的流程图;FIG. 3B shows a flow chart of data compression and data decompression provided according to an embodiment of the present specification;

图3C示出了根据本说明书的实施例提供的一种数据压缩和数据解压的流程图;3C shows a flow chart of data compression and data decompression provided according to an embodiment of the present specification;

图3D示出了根据本说明书的实施例提供的一种数据压缩和数据解压的流程图;FIG. 3D shows a flow chart of data compression and data decompression provided according to an embodiment of the present specification;

图4A示出了根据本说明书的实施例提供的一种对数据进行压缩的数据处理的方法的流程图;4A shows a flowchart of a data processing method for compressing data provided according to an embodiment of the present specification;

图4B示出了根据本说明书的实施例提供的一种对数据进行压缩的数据处理的方法的流程图;4B shows a flowchart of a data processing method for compressing data provided according to an embodiment of the present specification;

图4C示出了根据本说明书的实施例提供的一种对数据进行压缩的数据处理的方法的流程图;4C shows a flowchart of a data processing method for compressing data provided according to an embodiment of the present specification;

图4D示出了根据本说明书的实施例提供的一种对数据进行压缩的数据处理的方法的流程图;4D shows a flowchart of a data processing method for compressing data provided according to an embodiment of the present specification;

图5A示出了根据本说明书的实施例提供的一种获取第一增强帧的流程图;FIG. 5A shows a flowchart of acquiring a first enhanced frame according to an embodiment of the present specification;

图5B示出了根据本说明书的实施例提供的一种进行边界调节的流程图;FIG. 5B shows a flowchart of performing boundary adjustment according to an embodiment of the present specification;

图5C示出了根据本说明书的实施例提供的另一种进行边界调节的流程图;FIG. 5C shows another flowchart of boundary adjustment provided according to an embodiment of the present specification;

图6示出了根据本说明书的实施例提供的一种获取第二调节函数的曲线图;FIG. 6 shows a graph for obtaining a second adjustment function according to an embodiment of the present specification;

图7示出了根据本说明书的实施例提供的一种伽马算法的曲线图;FIG. 7 shows a graph of a gamma algorithm provided according to an embodiment of the present specification;

图8A示出了根据本说明书的实施例提供的一种编码频谱调节函数的曲线图;8A shows a graph of an encoding spectrum adjustment function provided according to an embodiment of the present specification;

图8B示出了根据本说明书的实施例提供的一种编码频谱调节函数的曲线图;FIG. 8B shows a graph of an encoding spectrum adjustment function provided according to an embodiment of the present specification;

图9示出了根据本说明书的实施例提供的一种获取第二增强帧的流程图;FIG. 9 shows a flowchart of acquiring a second enhanced frame according to an embodiment of the present specification;

图10示出了根据本说明书的实施例提供的一种对压缩帧进行解压的数据处理的方法的流程图;10 shows a flowchart of a method for data processing for decompressing a compressed frame provided according to an embodiment of the present specification;

图11A示出了根据本说明书的实施例提供的一种解码频谱调节和边界校正的流程图;11A shows a flowchart of decoding spectrum adjustment and boundary correction provided according to an embodiment of the present specification;

图11B示出了根据本说明书的实施例提供的一种进行边界校正的流程图;FIG. 11B shows a flowchart of boundary correction according to an embodiment of the present specification;

图11C示出了根据本说明书的实施例提供的另一种进行边界校正的流程图;FIG. 11C shows another flowchart of performing boundary correction according to an embodiment of the present specification;

图12A示出了根据本说明书的实施例提供的一种整体调节函数H0(f)的曲线图;FIG. 12A shows a graph of an overall adjustment function H 0 (f) provided according to an embodiment of the present specification;

图12B示出了根据本说明书的实施例提供的一种整体调节函数H0(f)的曲线图;12B shows a graph of an overall adjustment function H 0 (f) provided according to an embodiment of the present specification;

图12C示出了根据本说明书的实施例提供的一种整体调节函数H0(f)的曲线图;FIG. 12C shows a graph of an overall adjustment function H 0 (f) provided according to an embodiment of the present specification;

图12D示出了根据本说明书的实施例提供的一种整体调节函数H0(f)的曲线图;12D shows a graph of an overall adjustment function H 0 (f) provided according to an embodiment of the present specification;

图12E示出了根据本说明书的实施例提供的一种整体调节函数H0(f)的曲线图;FIG. 12E shows a graph of an overall adjustment function H 0 (f) provided according to an embodiment of the present specification;

图13A示出了根据本说明书的实施例提供的一种正常模式的整体调节函数H0(f)、编码频谱调节函数H1(f)和解码频谱调节函数H2(f)的曲线图;13A shows a graph of the overall adjustment function H 0 (f), the encoding spectrum adjustment function H 1 (f) and the decoding spectrum adjustment function H 2 (f) of a normal mode provided according to an embodiment of the present specification;

图13B示出了根据本说明书的实施例提供的一种增强模式的整体调节函数H0(f)、编码频谱调节函数H1(f)和解码频谱调节函数H2(f)的曲线图;13B shows a graph of the overall adjustment function H 0 (f), the encoding spectrum adjustment function H 1 (f) and the decoding spectrum adjustment function H 2 (f) of an enhancement mode provided according to an embodiment of the present specification;

图14A示出了根据本说明书的实施例提供的一种未进行边界校正的解压后的图像示例图;以及FIG. 14A shows an example diagram of a decompressed image without boundary correction provided according to an embodiment of the present specification; and

图14B示出了根据本说明书的实施例提供的一种进行边界校正的解压后的图像示例图。FIG. 14B shows an example diagram of a decompressed image with boundary correction according to an embodiment of the present specification.

具体实施方式Detailed ways

以下描述提供了本说明书的特定应用场景和要求,目的是使本领域技术人员能够制造和使用本说明书中的内容。对于本领域技术人员来说,对所公开的实施例的各种局部修改是显而易见的,并且在不脱离本说明书的精神和范围的情况下,可以将这里定义的一般原理应用于其他实施例和应用。因此,本说明书不限于所示的实施例,而是与权利要求一致的最宽范围。The following description provides specific application scenarios and requirements of this specification, and is intended to enable those skilled in the art to make and use the content of this specification. Various partial modifications to the disclosed embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments and without departing from the spirit and scope of the description. application. Thus, this specification is not to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the claims.

这里使用的术语仅用于描述特定示例实施例的目的,而不是限制性的。比如,除非上下文另有明确说明,这里所使用的,单数形式“一”,“一个”和“该”也可以包括复数形式。当在本说明书中使用时,术语“包括”、“包含”和/或“含有”意思是指所关联的整数,步骤、操作、元素和/或组件存在,但不排除一个或多个其他特征、整数、步骤、操作、元素、组件和/或组的存在或在该系统/方法中可以添加其他特征、整数、步骤、操作、元素、组件和/或组。The terminology used herein is for the purpose of describing particular example embodiments only and is not limiting. For example, as used herein, the singular forms "a," "an," and "the" can include the plural forms as well, unless the context clearly dictates otherwise. When used in this specification, the terms "comprising", "comprising" and/or "comprising" are meant to refer to the associated integer, step, operation, element and/or component being present, but not excluding one or more other features , integers, steps, operations, elements, components and/or groups exist or other features, integers, steps, operations, elements, components and/or groups may be added to the system/method.

考虑到以下描述,本说明书的这些特征和其他特征、以及结构的相关元件的操作和功能、以及部件的组合和制造的经济性可以得到明显提高。参考附图,所有这些形成本说明书的一部分。然而,应该清楚地理解,附图仅用于说明和描述的目的,并不旨在限制本说明书的范围。还应理解,附图未按比例绘制。These and other features of this specification, as well as the operation and function of related elements of structure, and the economics of assembly and manufacture of parts, may be significantly improved in view of the following description. Reference is made to the accompanying drawings, all of which form a part of this specification. However, it should be clearly understood that the drawings are for illustration and description purposes only and are not intended to limit the scope of the present specification. It should also be understood that the figures are not drawn to scale.

本说明书中使用的流程图示出了根据本说明书中的一些实施例的系统实现的操作。应该清楚地理解,流程图的操作可以不按顺序实现。相反,操作可以以反转顺序或同时实现。此外,可以向流程图添加一个或多个其他操作。可以从流程图中移除一个或多个操作。The flowcharts used in this specification illustrate the operation of a system implementation according to some embodiments in this specification. It should be clearly understood that the operations of the flowcharts may be implemented out of sequence. Instead, operations may be implemented in reverse order or simultaneously. Additionally, one or more other operations can be added to the flowchart. One or more operations can be removed from the flowchart.

本说明书一方面提供了一种数据处理的系统100(以下简称系统100)。第二方面,本说明书描述了一种对数据进行压缩的数据处理的方法P200,第三方面,本说明书描述了一种对压缩帧进行解压的数据处理的方法P300。数据处理方法P200、P300和系统100可以用于数据的压缩和解压,以提高所述数据的传输效率,节约资源和空间。所述数据可以是非实时数据,也可以是实时数据。从传统的广播电影电视到现在大量的监控和互联网应用都存在各种各样的数据。例如,所述数据可以是非实时的视频数据、音频数据或者图像数据,等等。所述数据还可以是实时地图数据、实时传感器数据、实时视频监控数据、网络监测数据、气象数据、航空航天数据,等等。比如说,所述数据可以是自动驾驶汽车在行驶过程中从基站接收到的地图数据。本说明书对所述数据的具体类别不作限定。本说明书所述的数据处理的方法P200、P300和系统100在对不同类别的数据进行处理时所采取的方法和步骤都是一致的,为了方便展示,本说明书将以视频数据的处理为例进行描述。In one aspect, the present specification provides a data processing system 100 (hereinafter referred to as the system 100). In the second aspect, this specification describes a data processing method P200 for compressing data, and in the third aspect, this specification describes a data processing method P300 for decompressing a compressed frame. The data processing methods P200, P300 and the system 100 can be used for data compression and decompression, so as to improve the transmission efficiency of the data and save resources and space. The data may be non-real-time data or real-time data. From traditional radio, film and television to a large number of surveillance and Internet applications, there are all kinds of data. For example, the data may be non-real-time video data, audio data, or image data, and the like. The data may also be real-time map data, real-time sensor data, real-time video surveillance data, network monitoring data, meteorological data, aerospace data, and the like. For example, the data may be map data received from a base station by an autonomous vehicle during driving. This specification does not limit the specific categories of the data. The data processing methods P200, P300 and the system 100 described in this specification are consistent in the methods and steps taken when processing different types of data. For the convenience of presentation, this specification will take the processing of video data as an example. describe.

在数据压缩和数据解压中,常常以帧为单位进行压缩和解压。帧是组成数据序列的一个处理单位。初始数据中可以包括一个或多个初始帧。每个初始帧包括预设字节数的初始数据。在视频压缩中,所述初始数据可以是初始视频数据,所述初始帧可以是初始视频数据中的帧图像。在传统的视频压缩技术中,通常使用H.264和H.265标准对初始视频数据进行编码,从而达到对所述视频数据进行压缩的目的。H.264和H.265标准对视频数据进行编码时主要采用的技术手段是预测编码,即对视频数据中的初始数据进行预测得到预测值,再将预测值与所述初始数据的初始值相减得到残差值,从而对所述视频数据进行压缩。在恢复和解压(即解码)时,用残差值和预测值相加即可恢复所述初始帧。In data compression and data decompression, compression and decompression are often performed in units of frames. A frame is a processing unit that makes up a sequence of data. One or more initial frames may be included in the initial data. Each initial frame includes a preset number of bytes of initial data. In video compression, the initial data may be initial video data, and the initial frame may be a frame image in the initial video data. In traditional video compression technologies, H.264 and H.265 standards are usually used to encode initial video data, so as to achieve the purpose of compressing the video data. The main technical means used to encode video data in the H.264 and H.265 standards is predictive encoding, that is, predicting the initial data in the video data to obtain a predicted value, and then comparing the predicted value with the initial value of the initial data. The residual value is subtracted to compress the video data. During recovery and decompression (ie, decoding), the initial frame can be recovered by adding the residual and predicted values.

本说明书提供的数据处理方法P200、P300和系统100,在进行数据压缩时可以将编码频谱调节和编码相结合,以降低编码时的数据量提高视频数据的压缩效率,提升视频的传输效率;在进行数据解压时可以将解码频谱调节与解码相结合对经过编码频谱调节和编码的压缩数据进行解压,以使解压后的数据恢复至初始数据。The data processing methods P200, P300 and system 100 provided in this specification can combine encoding spectrum adjustment and encoding during data compression, so as to reduce the amount of data during encoding, improve the compression efficiency of video data, and improve the transmission efficiency of video; During data decompression, decoding spectrum adjustment and decoding can be combined to decompress the compressed data after encoding spectrum adjustment and encoding, so that the decompressed data can be restored to the original data.

图1示出了一种数据处理的系统100的示意图。系统100可以包括数据压缩设备200、数据解压设备300以及传输媒介120。FIG. 1 shows a schematic diagram of a system 100 for data processing. System 100 may include data compression device 200 , data decompression device 300 , and transmission medium 120 .

数据压缩设备200可以接收待压缩的初始数据中的初始帧,并使用本说明书提出的数据处理方法P200压缩初始数据产生压缩帧。数据压缩设备200可以存储有执行本说明书描述的数据处理的方法P200的数据或指令,并且执行所述数据和/或指令。The data compression device 200 may receive an initial frame in the initial data to be compressed, and use the data processing method P200 proposed in this specification to compress the initial data to generate a compressed frame. The data compression apparatus 200 may store data or instructions for performing the data processing method P200 described in this specification, and execute the data and/or instructions.

数据处理方法P200可以对所述视频数据进行数据压缩。所述数据压缩可以是对所述视频数据中的初始帧进行边界调节以及对所述视频数据进行编码频谱调节和编码。具体地,数据处理方法P200可以通过伽马算法对所述视频数据中的小范围的边界进行所述边界调节以对小范围的边界进行调节,以避免相邻像素间像素值相差较小的边界在编码过程中丢失,避免细节损失;同时,数据处理方法P200还可以采用编码频谱调节和编码相结合的方法对所述视频数据进行数据压缩,得到压缩帧,以进一步提高视频数据的压缩比,提升视频传输的效率。具体地,数据处理方法P200可以使用伽马值小于1的伽马算法对所述视频数据进行所述边界调节。所述编码频谱调节是指对待处理数据的频谱图的幅值进行调节。比如,所述编码频谱调节可以对所述待处理数据在频域上进行幅值衰减,从而减小所述待处理数据中的信息量,比如衰减所述待处理数据在其频域内选定频率区域的幅值,比如中频区域的幅值,高频区域的幅值,比如低频至中频区域的幅值,又比如中频至高频区域的幅值,等等。本领域的普通技术人员可以理解的是,经过编码频谱调节的数据在选定频率区域内的频率分量变小,数据中的信息量减少了,因此,经过编码频谱调节的数据编码时的效率可以提高,提升压缩比。The data processing method P200 may perform data compression on the video data. The data compression may be boundary adjustment of initial frames in the video data and encoding spectrum adjustment and encoding of the video data. Specifically, the data processing method P200 may perform the boundary adjustment on the boundary of a small range in the video data by using a gamma algorithm to adjust the boundary of the small range, so as to avoid a boundary with a small difference in pixel values between adjacent pixels. is lost in the encoding process to avoid loss of details; at the same time, the data processing method P200 can also compress the video data by combining the encoding spectrum adjustment and encoding to obtain compressed frames, so as to further improve the compression ratio of the video data, Improve the efficiency of video transmission. Specifically, the data processing method P200 may use a gamma algorithm with a gamma value less than 1 to perform the boundary adjustment on the video data. The encoding spectrum adjustment refers to adjusting the amplitude of the spectrogram of the data to be processed. For example, the encoding spectrum adjustment may attenuate the amplitude of the data to be processed in the frequency domain, thereby reducing the amount of information in the data to be processed, such as attenuating the selected frequency of the data to be processed in the frequency domain The amplitude of the region, such as the amplitude of the medium frequency region, the amplitude of the high frequency region, such as the amplitude of the low frequency to the medium frequency region, and the amplitude of the medium frequency to the high frequency region, and so on. It can be understood by those skilled in the art that the frequency components in the selected frequency region of the coded spectrum adjusted data become smaller, and the amount of information in the data is reduced. Therefore, the coding efficiency of the coded spectrum adjusted data can be improved. Increase, increase the compression ratio.

数据解压设备300可以接收压缩帧,并使用本说明书提出的数据处理方法P300解压压缩帧,得到解压帧。数据解压设备300可以存储有执行本说明书描述的数据处理的方法P300的数据或指令,并且执行所述数据和/或指令。The data decompression device 300 may receive the compressed frame, and use the data processing method P300 proposed in this specification to decompress the compressed frame to obtain the decompressed frame. The data decompression device 300 may store data or instructions for performing the data processing method P300 described in this specification, and execute the data and/or instructions.

数据处理方法P300可以对经过数据处理方法P200进行所述数据压缩的所述压缩帧进行数据解压,以恢复所述视频数据。所述数据解压可以是对所述压缩帧进行解码频谱调节以及边界校正。数据处理方法P300可以采用解码(即根据残差值和预测值恢复在压帧)和解码频谱调节相结合的方法,对所述压缩帧进行数据解压,以恢复所述压缩帧中的数据。数据处理方法P300可以通过解码频谱调节函数对压缩数据进行解码频谱调节;将压缩数据与解码后的数据求差,获取所述初始帧的边界信息;并通过伽马算法对边界信息进行所述边界校正,以对小范围内的边界进行减弱,消除边界信息中的噪声信息;将消除噪声后的所述边界信息与所述解码后的数据叠加便可以得到所述解压帧,所述边界校正可以消除噪声信息,使得解压帧的清晰度更高。具体地,所述解码频谱调节通过使用平滑过渡的低通滤波器使解码后的数据中的中频和高频区域的分量被过滤,因此,解码后的数据可以有效避免振铃效应,从而使解压后的数据更清晰。所述解码频谱调节可以使经过所述编码频谱调节的数据在不考虑其他计算误差的情况下完全恢复或者近似恢复至编码频谱调节前的状态,甚至超越编码频谱调节前的状态。The data processing method P300 may perform data decompression on the compressed frame subjected to the data compression by the data processing method P200 to restore the video data. The data decompression may be a decoding spectral adjustment and boundary correction of the compressed frame. The data processing method P300 may use a combination of decoding (that is, restoring the compressed frame according to the residual value and the predicted value) and decoding spectrum adjustment to decompress the compressed frame to restore the data in the compressed frame. The data processing method P300 can perform decoding spectrum adjustment on the compressed data through the decoding spectrum adjustment function; difference between the compressed data and the decoded data to obtain the boundary information of the initial frame; and perform the boundary information on the boundary information through a gamma algorithm. The decompression frame can be obtained by superimposing the boundary information after noise removal and the decoded data, and the boundary correction can Noise information is removed to make the decompressed frame clearer. Specifically, the decoding spectrum adjustment uses a smooth transition low-pass filter to filter the components in the intermediate frequency and high frequency regions in the decoded data. Therefore, the decoded data can effectively avoid ringing effects, thereby enabling decompression The latter data is clearer. The decoding spectrum adjustment can make the data subjected to the encoding spectrum adjustment completely or approximately restored to the state before the encoding spectrum adjustment without considering other calculation errors, or even beyond the state before the encoding spectrum adjustment.

因此,数据处理方法P200、P300和系统100可以显著提高视频数据的压缩效率,减少视频数据压缩时的数据丢失,提升视频的传输效率、还原率以及解压视频的清晰度,减少解压后的视频中的噪声。关于所述编码频谱调节和所述边界校正以及所述解码频谱调节和所述边界校正的具体过程将在后面的描述中详细介绍。Therefore, the data processing methods P200, P300 and the system 100 can significantly improve the compression efficiency of video data, reduce the data loss during video data compression, improve the transmission efficiency of the video, the restoration rate and the clarity of the decompressed video, and reduce the content of the decompressed video. noise. The specific processes of the encoding spectrum adjustment and the boundary correction and the decoding spectrum adjustment and the boundary correction will be described in detail in the following description.

数据压缩设备200及数据解压设备300可包括广泛范围的装置。比如,数据压缩设备200及数据解压设备300可以包含台式计算机、移动计算装置、笔记本(例如,膝上型)计算机、平板计算机、机顶盒、智能电话等手持机、电视、相机、显示装置、数字媒体播放器、视频游戏控制台、车载计算机,或其类似者。Data compression apparatus 200 and data decompression apparatus 300 may include a wide range of devices. For example, data compression apparatus 200 and data decompression apparatus 300 may include desktop computers, mobile computing devices, notebook (eg, laptop) computers, tablet computers, set-top boxes, handsets such as smartphones, televisions, cameras, display devices, digital media Players, video game consoles, in-vehicle computers, or the like.

如图1所示,数据压缩设备200与数据解压设备300可以通过传输媒介120连接。传输媒介120可以促进信息和/或数据的传输。传输媒介120可以是任何可以将压缩帧从数据压缩设备200传输至数据解压设备300的数据载体。例如,传输媒介120可以是储存媒介(例如,光盘)、有线或无线通信媒介。所述通信媒介可以是网络。在一些实施例中,传输媒介120可以是任何类型的有线或无线网络,也可以是其组合。比如,传输媒介120可以包括电缆网络,有线网络、光纤网络、电信通信网络、内联网、互联网、局域网(LAN)、广域网(WAN)、无线局域网(WLAN)、大都市市区网(MAN)、广域网(WAN)、公用电话交换网(PSTN)、蓝牙网络、ZigBee网络、近场通信(NFC)网络或类似网络。数据解压设备300和数据压缩设备200中的一个或多个组件可以连接到传输媒介120以传输数据和/或信息。传输媒介120可以包括路由器、交换器、基站,或促进从数据压缩设备200到数据解压设备300的通信的其它设备。在另一些实施例中,传输媒介120可以是储存媒介,例如,大容量存储器、可移动存储器、易失性读写存储器、只读存储器(ROM)或类似内容,或其任意组合。示例性大容量存储可能包括磁盘、光盘、固态驱动器等非暂时性存储介质(non-transitory storage medium)。可移动存储可能包括闪存驱动器、软盘、光盘、存储卡、zip磁盘、磁带等。典型的易失性读写内存可能包括随机存取存储器(RAM)。RAM可能包括动态RAM(DRAM)、双日期速率同步动态RAM(DDRSDRAM)、静态RAM(SRAM)、晶闸管RAM(T-RAM)和零电容RAM(Z-RAM)等。ROM可能包括掩码ROM(MROM)、可编程ROM(PROM)、可虚拟可编程ROM(PEROM)、电子可编程ROM(EEPROM)、光盘(CD-ROM)和数字多功能磁盘ROM等。在一些实施例中,传输媒介120可以是云平台。仅仅作为例子,所述云平台可能包括私有云、公共云、混合云、社区云、分布式云、云间云等形式,或者同上述形式类似的形式,或这上述形式的任意组合。As shown in FIG. 1 , the data compression device 200 and the data decompression device 300 may be connected through the transmission medium 120 . Transmission medium 120 may facilitate the transfer of information and/or data. Transmission medium 120 may be any data carrier that can transmit compressed frames from data compression device 200 to data decompression device 300 . For example, transmission medium 120 may be a storage medium (eg, an optical disk), a wired or wireless communication medium. The communication medium may be a network. In some embodiments, the transmission medium 120 may be any type of wired or wireless network, or a combination thereof. For example, the transmission medium 120 may include a cable network, a wired network, a fiber optic network, a telecommunication network, an intranet, the Internet, a local area network (LAN), a wide area network (WAN), a wireless local area network (WLAN), a metropolitan area network (MAN), Wide Area Network (WAN), Public Switched Telephone Network (PSTN), Bluetooth network, ZigBee network, Near Field Communication (NFC) network or similar network. One or more components of data decompression device 300 and data compression device 200 may be connected to transmission medium 120 to transmit data and/or information. Transmission medium 120 may include routers, switches, base stations, or other devices that facilitate communication from data compression device 200 to data decompression device 300 . In other embodiments, the transmission medium 120 may be a storage medium such as mass storage, removable storage, volatile read-write memory, read-only memory (ROM), or the like, or any combination thereof. Exemplary mass storage may include non-transitory storage media such as magnetic disks, optical disks, solid state drives, and the like. Removable storage may include flash drives, floppy disks, optical disks, memory cards, zip disks, tapes, etc. Typical volatile read-write memory may include random access memory (RAM). RAM may include Dynamic RAM (DRAM), Double Date Rate Synchronous Dynamic RAM (DDRSDRAM), Static RAM (SRAM), Thyristor RAM (T-RAM), and Zero Capacitance RAM (Z-RAM), among others. ROM may include masked ROM (MROM), programmable ROM (PROM), virtual programmable ROM (PEROM), electronically programmable ROM (EEPROM), compact disk (CD-ROM), digital versatile disk ROM, and the like. In some embodiments, the transmission medium 120 may be a cloud platform. Just as an example, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an inter-cloud cloud, etc., or a form similar to the above-mentioned forms, or any combination of the above-mentioned forms.

如图1所示,数据压缩设备200接收初始数据,并执行本说明书描述的数据处理的方法P200的指令,对初始数据进行数据压缩,产生压缩帧;所述压缩帧通过传输媒介120传输给数据解压设备300;数据解压设备300执行本说明书描述的数据处理的方法P300的指令,对压缩帧进行数据解压,得到解压帧。As shown in FIG. 1, the data compression device 200 receives the initial data, and executes the instructions of the data processing method P200 described in this specification, compresses the initial data, and generates a compressed frame; the compressed frame is transmitted to the data through the transmission medium 120. Decompression device 300; the data decompression device 300 executes the instructions of the data processing method P300 described in this specification, and decompresses the data of the compressed frame to obtain the decompressed frame.

图2示出了一种数据处理的数据压缩设备200的示意图。数据压缩设备200可以执行本说明书描述的数据处理的方法P200。所述数据处理的方法P200在本说明书中的其他部分介绍。比如,在图4A至图9的描述中介绍了所述数据处理的方法P200。FIG. 2 shows a schematic diagram of a data compression device 200 for data processing. The data compression device 200 may perform the method P200 of data processing described in this specification. The data processing method P200 is described elsewhere in this specification. For example, the data processing method P200 is introduced in the description of FIGS. 4A to 9 .

如图2所示,数据压缩设备200包括至少一个存储介质230和至少一个压缩端处理器220。在一些实施例中,数据压缩设备200还可以包括通信端口250和内部通信总线210。同时,数据压缩设备200还可以包括I/O组件260。As shown in FIG. 2 , the data compression apparatus 200 includes at least one storage medium 230 and at least one compression end processor 220 . In some embodiments, the data compression device 200 may also include a communication port 250 and an internal communication bus 210 . Meanwhile, the data compression apparatus 200 may further include an I/O component 260 .

内部通信总线210可以连接不同的系统组件,包括存储介质230和压缩端处理器220。The internal communication bus 210 may connect various system components, including the storage medium 230 and the compressor side processor 220 .

I/O组件260支持数据压缩设备200和其他组件之间的输入/输出。I/O component 260 supports input/output between data compression device 200 and other components.

存储介质230可以包括数据存储装置。所述数据存储装置可以是非暂时性存储介质,也可以是暂时性存储介质。比如,所述数据存储装置可以包括磁盘232、只读存储介质(ROM)234或随机存取存储介质(RAM)236中的一种或多种。存储介质230还包括存储在所述数据存储装置中的至少一个指令集。所述指令是计算机程序代码,所述计算机程序代码可以包括执行本说明书提供的数据处理的方法的程序、例程、对象、组件、数据结构、过程、模块等等。The storage medium 230 may include data storage devices. The data storage device may be a non-transitory storage medium or a temporary storage medium. For example, the data storage device may include one or more of a magnetic disk 232 , a read only storage medium (ROM) 234 or a random access storage medium (RAM) 236 . Storage medium 230 also includes at least one set of instructions stored in the data storage device. The instructions are computer program code, which may include programs, routines, objects, components, data structures, procedures, modules, etc. that perform the methods of data processing provided by this specification.

通信端口250用于数据压缩设备200同外界的数据通讯。比如,数据压缩设备200可以通过通信端口250连接传输媒介120。The communication port 250 is used for data communication between the data compression device 200 and the outside world. For example, the data compression device 200 may be connected to the transmission medium 120 through the communication port 250 .

至少一个压缩端处理器220同至少一个存储介质230通过内部通信总线210通讯连接。至少一个压缩端处理器220用以执行上述至少一个指令集。当系统100运行时,至少一个压缩端处理器220读取所述至少一个指令集,并且根据所述至少一个指令集的指示执行数据处理方法P200。压缩端处理器220可以执行数据处理的方法P200包含的所有步骤。压缩端处理器220可以是一个或多个处理器的形式,在一些实施例中,压缩端处理器220可以包括一个或多个硬件处理器,例如微控制器,微处理器,精简指令集计算机(RISC),专用集成电路(ASIC),特定于应用的指令集处理器(ASIP),中央处理单元(CPU),图形处理单元(GPU),物理处理单元(PPU),微控制器单元,数字信号处理器(DSP),现场可编程门阵列(FPGA),高级RISC机器(ARM),可编程逻辑器件(PLD),能够执行一个或多个功能的任何电路或处理器等,或其任何组合。仅仅为了说明问题,在本说明书中数据压缩设备200中仅描述了一个压缩端处理器220。然而,应当注意,本说明书中数据压缩设备200还可以包括多个处理器,因此,本说明书中披露的操作和/或方法步骤可以如本说明书所述的由一个处理器执行,也可以由多个处理器联合执行。例如,如果在本说明书中数据压缩设备200的压缩端处理器220执行步骤A和步骤B,则应该理解,步骤A和步骤B也可以由两个不同压缩端处理器220联合或分开执行(例如,第一处理器执行步骤A,第二处理器执行步骤B,或者第一和第二处理器共同执行步骤A和B)。At least one compression end processor 220 is communicatively connected with at least one storage medium 230 through an internal communication bus 210 . At least one compressor side processor 220 is used for executing the above at least one instruction set. When the system 100 is running, the at least one compression end processor 220 reads the at least one instruction set, and executes the data processing method P200 according to the instructions of the at least one instruction set. The compressor end processor 220 may perform all steps included in the data processing method P200. Compressor side processor 220 may be in the form of one or more processors, and in some embodiments, compressor side processor 220 may comprise one or more hardware processors, such as microcontrollers, microprocessors, reduced instruction set computers (RISC), Application Specific Integrated Circuit (ASIC), Application Specific Instruction Set Processor (ASIP), Central Processing Unit (CPU), Graphics Processing Unit (GPU), Physical Processing Unit (PPU), Microcontroller Unit, Digital Signal Processor (DSP), Field Programmable Gate Array (FPGA), Advanced RISC Machine (ARM), Programmable Logic Device (PLD), any circuit or processor capable of performing one or more functions, etc., or any combination thereof . Just to illustrate the problem, only one compression end processor 220 is described in the data compression apparatus 200 in this specification. However, it should be noted that the data compression apparatus 200 in this specification may also include multiple processors, and thus, the operations and/or method steps disclosed in this specification may be performed by one processor as described in this specification, or may be performed by multiple processors. The processors are executed jointly. For example, if the compressor side processor 220 of the data compression device 200 performs step A and step B in this specification, it should be understood that step A and step B may also be performed jointly or separately by two different compressor side processors 220 (for example, , the first processor executes step A, the second processor executes step B, or the first and second processors jointly execute steps A and B).

虽然上述结构描述的是数据压缩设备200,此结构也适用于数据解压设备300。数据解压设备300可以执行本说明书描述的数据处理的方法P300。所述数据处理的方法P300在本说明书中的其他部分介绍。比如,在图10至图14B的描述中介绍了所述数据处理的方法P300。Although the above structure describes the data compression apparatus 200, this structure is also applicable to the data decompression apparatus 300. The data decompression device 300 may perform the data processing method P300 described in this specification. The data processing method P300 is described elsewhere in this specification. For example, the data processing method P300 is introduced in the description of FIGS. 10 to 14B .

系统100在对视频数据进行数据压缩时,所述编码频谱调节和所述编码的顺序是可以互换的,也可以是交叉进行的。所述边界调节可以是在所述编码频谱调节前也可以是在所述编码频谱调节后。同样,系统100在对压缩帧进行数据解压时,所述解码频谱调节和所述解码的顺序是可以互换的,也可以是交叉进行的。需要说明的是,为保证解压后的数据信息可以恢复初始数据中的信息,所述数据解压中所述解码频谱调节和所述解码的顺序与所述数据压缩中的所述编码频谱调节和所述编码的顺序应该是相对应的,即所述解码频谱调节和所述解码可以同所述编码频谱调节和所述编码呈对称反向操作。比如,如果所述压缩帧是先进行所述编码频谱调节再进行所述编码得到的,则所述压缩帧在数据解压时应先进行所述解码再进行所述解码频谱调节。为了方便描述我们将数据压缩处理前的所述初始帧中的数据定义为P0,将编码频谱调节所对应的编码频谱调节函数定义为H1(f),将经数据解压设备300解压得到的解压帧中的数据定义为P4,将解码频谱调节所对应的解码频谱调节函数定义为H2(f)。When the system 100 performs data compression on the video data, the encoding spectrum adjustment and the encoding sequence may be interchanged, or may be performed in an interleaved manner. The boundary adjustment may be performed before the encoding spectrum adjustment or after the encoding spectrum adjustment. Likewise, when the system 100 performs data decompression on the compressed frame, the decoding spectrum adjustment and the decoding sequence may be interchanged, or may be performed interleaved. It should be noted that, in order to ensure that the decompressed data information can restore the information in the original data, the decoding spectrum adjustment and the decoding sequence in the data decompression are the same as the encoding spectrum adjustment and the decoding sequence in the data compression. The encoding sequence should be corresponding, that is, the decoding spectrum adjustment and the decoding can be symmetrically reversed to the encoding spectrum adjustment and the encoding. For example, if the compressed frame is obtained by performing the encoding spectrum adjustment first and then performing the encoding, the compressed frame should be decoded first and then the decoded spectrum adjustment should be performed during data decompression. For the convenience of description, we define the data in the initial frame before data compression processing as P 0 , define the encoding spectrum adjustment function corresponding to encoding spectrum adjustment as H 1 (f), and decompress the data obtained by the data decompression device 300. The data in the decompressed frame is defined as P 4 , and the decoding spectrum adjustment function corresponding to the decoding spectrum adjustment is defined as H 2 (f).

数据处理方法P200中,数据压缩设备200在对所述初始帧进行数据压缩时,可以是先对所述初始帧进行所述边界调节,再进行所述编码频谱调节;也可以是先对所述初始帧进行所述编码频谱调节,再进行所述边界调节。图3A至图3D示出了根据本说明书的实施例提供的一些数据压缩和数据解压的流程图。其中,图3A至图3C所示出的数据压缩和数据解压的流程图中,数据压缩设备200是先对所述初始帧进行所述边界调节,再进行所述编码频谱调节。图3D所示出的数据压缩和数据解压的流程图中,数据压缩设备200是先对所述初始帧进行所述编码频谱调节,再进行所述边界调节。In the data processing method P200, when the data compression device 200 performs data compression on the initial frame, the boundary adjustment may be performed on the initial frame first, and then the encoding spectrum adjustment is performed; The encoding spectrum adjustment is performed on the initial frame, and then the boundary adjustment is performed. 3A to 3D illustrate some flowcharts of data compression and data decompression provided according to embodiments of the present specification. In the flowcharts of data compression and data decompression shown in FIGS. 3A to 3C , the data compression device 200 first performs the boundary adjustment on the initial frame, and then performs the encoding spectrum adjustment. In the flowchart of data compression and data decompression shown in FIG. 3D , the data compression device 200 first performs the encoding spectrum adjustment on the initial frame, and then performs the boundary adjustment.

图3A示出了根据本说明书的实施例提供的一种数据压缩和数据解压的流程图。如图3A所示,数据压缩设备200对初始数据进行数据压缩可以是:数据压缩设备200先对所述初始帧P0的边界进行所述边界调节,获取第一增强帧。为了方便描述我们将所述第一增强帧中的数据定义为P′0;再对所述第一增强帧P′0进行所述编码频谱调节和编码。其中,对所述第一增强帧P′0进行所述编码频谱调节和所述编码可以是:数据压缩设备200使用所述编码频谱调节函数H1(f)对所述第一增强帧P′0先进行所述编码频谱调节,再对编码频谱调节后的第一增强帧P′0行所述编码,即对编码频谱调节后的第一增强帧P′0进行预测和求残差,得到预测数据PI和残差数据R,将所述预测数据PI和所述残差数据R输入码流生成模块进行合成,得到所述压缩帧。为了方便展示,我们将经过所述编码频谱调节函数H1(f)进行所述编码频谱调节后得到的数据定义为P1。关于所述边界调节和所述编码频谱调节的内容将在后面的描述中详细介绍。图3A所示的数据压缩方法可以提高编码效率,使所述压缩帧中的数据量进一步减小,提高压缩比,同时可以减少数据丢失,避免细节损失。FIG. 3A shows a flow chart of data compression and data decompression provided according to an embodiment of the present specification. As shown in FIG. 3A , the data compression device 200 performs data compression on the initial data may be: the data compression device 200 first performs the boundary adjustment on the boundary of the initial frame P 0 to obtain the first enhanced frame. For the convenience of description, we define the data in the first enhanced frame as P′ 0 ; and then perform the encoding spectrum adjustment and encoding on the first enhanced frame P′ 0 . Wherein, performing the encoding spectrum adjustment and encoding on the first enhanced frame P′ 0 may be: the data compression device 200 uses the encoding spectrum adjustment function H 1 (f) to perform the encoding spectrum adjustment on the first enhanced frame P′ 0. Perform the encoding spectrum adjustment first, and then perform the encoding on the first enhanced frame P′ 0 after the encoding spectrum adjustment, that is, perform prediction and residual error on the first enhanced frame P′ 0 after the encoding spectrum adjustment, to obtain The predicted data PI and the residual data R are input into the code stream generation module for synthesis to obtain the compressed frame. For the convenience of presentation, we define the data obtained after the encoding spectrum adjustment is performed by the encoding spectrum adjustment function H 1 (f) as P 1 . The content of the boundary adjustment and the encoding spectrum adjustment will be introduced in detail in the following description. The data compression method shown in FIG. 3A can improve coding efficiency, further reduce the amount of data in the compressed frame, improve the compression ratio, reduce data loss, and avoid loss of details.

如图3A所示,数据解压设备300对所述压缩帧进行数据解压可以是:数据解压设备300对所述压缩帧先进行所述解码,即基于码流解析模块对所述压缩帧进行解析,生成所述预测数据PI和所述残差数据R;再根据所述预测数据PI进行预测得到预测帧,并和所述残差数据R叠加,得到解码帧。为了方便描述,我们将所述解码帧中的数据定义为P2。然后对解码帧P2使用所述解码频谱调节函数H2(f)进行所述解码频谱调节和所述边界校正,并将所述解码帧和经过所述边界校正后的数据进行叠加得到所述解压帧P4进行输出。关于所述解码频谱调节和所述边界校正的具体内容将在后面的描述中详细介绍。As shown in FIG. 3A , the data decompression device 300 performs data decompression on the compressed frame: the data decompression device 300 first performs the decoding on the compressed frame, that is, parses the compressed frame based on the code stream parsing module, Generate the predicted data PI and the residual data R; and then perform prediction according to the predicted data PI to obtain a predicted frame, which is superimposed with the residual data R to obtain a decoded frame. For the convenience of description, we define the data in the decoded frame as P 2 . Then use the decoded spectrum adjustment function H 2 (f) to perform the decoded spectrum adjustment and the boundary correction on the decoded frame P 2 , and superimpose the decoded frame and the boundary-corrected data to obtain the Decompress frame P4 for output. The specific content of the decoding spectrum adjustment and the boundary correction will be introduced in detail in the following description.

为了方便展示,我们将解压帧P4与初始数据P0之间的传递函数定义为整体频谱调节函数H0(f)。图3A所示的方式可以减少所述压缩帧中的数据量,从而提高所述初始数据的压缩比和编码效率,提升所述初始数据的传输效率,同时可以减少数据丢失,避免细节损失。For convenience of presentation, we define the transfer function between the decompressed frame P 4 and the original data P 0 as the overall spectral adjustment function H 0 (f). The method shown in FIG. 3A can reduce the amount of data in the compressed frame, thereby improving the compression ratio and coding efficiency of the initial data, improving the transmission efficiency of the initial data, and at the same time reducing data loss and avoiding detail loss.

数据压缩设备200对初始数据进行数据压缩也可以是:将所述编码频谱调节融入到所述编码过程中。所述编码频谱调节可以在所述编码过程中的任意阶段进行。相应地,所述解码频谱调节也可以在所述解码过程的对应阶段进行。The data compression device 200 performs data compression on the initial data may also include: incorporating the encoding spectrum adjustment into the encoding process. The encoding spectral adjustment can be performed at any stage in the encoding process. Correspondingly, the decoding spectrum adjustment can also be performed at a corresponding stage of the decoding process.

图3B示出了根据本说明书的实施例提供的一种数据压缩和数据解压的流程图。如图3B所示,数据压缩设备200对初始数据进行数据压缩可以是:数据压缩设备200先对所述初始帧P0的边界进行所述边界调节,获取第一增强帧P′0;再对所述第一增强帧P′0进行所述编码频谱调节和所述编码。其中,对所述第一增强帧P′0进行所述编码频谱调节和所述编码可以是:数据压缩设备200对所述第一增强帧P′0进行预测,得到预测帧和预测数据PI,再对所述预测帧和所述第一增强帧P′0分别使用所述编码频谱调节函数H1(f)进行所述编码频谱调节后求残差,得到残差数据R,将所述预测数据PI和所述残差数据R输入码流生成模块进行合成,生成所述压缩帧。图3B所示的数据压缩的具体的操作与图3A所示的方式相同,只是操作顺序不同。关于所述边界调节和所述编码频谱调节的内容将在后面的描述中详细介绍。FIG. 3B shows a flow chart of data compression and data decompression provided according to an embodiment of the present specification. As shown in FIG. 3B , the data compression device 200 performs data compression on the initial data: the data compression device 200 first performs the boundary adjustment on the boundary of the initial frame P 0 to obtain the first enhanced frame P′ 0 ; The first enhancement frame P' 0 performs the encoding spectral adjustment and the encoding. Wherein, performing the encoding spectrum adjustment and the encoding on the first enhanced frame P′ 0 may be: the data compression device 200 predicts the first enhanced frame P′ 0 to obtain a predicted frame and predicted data PI, Then use the encoding spectrum adjustment function H 1 (f) to adjust the encoding spectrum for the predicted frame and the first enhanced frame P′ 0 respectively, and then obtain the residual to obtain the residual data R, and then use the encoding spectrum adjustment function H 1 (f). The data PI and the residual data R are input to the code stream generation module for synthesis to generate the compressed frame. The specific operation of data compression shown in FIG. 3B is the same as that shown in FIG. 3A, but the operation sequence is different. The content of the boundary adjustment and the encoding spectrum adjustment will be introduced in detail in the following description.

如图3B所示,数据解压设备300对所述压缩帧进行数据解压可以是:数据解压设备300基于码流解析模块对所述压缩帧进行解析,生成所述预测数据PI和所述残差数据R1;对所述残差数据R1使用所述解码频谱调节函数H2(f)进行所述解码频谱调节,对所述残差数据R1和经过所述解码频谱调节的数据求差,得到所述残差数据R1的边界,将所述残差数据R1与求差后的数据(所述残差数据R1的边界)叠加,得到所述残差数据R;然后根据预测数据PI进行预测得到预测帧,并与所述残差数据R进行叠加得到叠加帧;然后对所述叠加帧中的边界进行所述边界校正,并将经过所述边界校正后的数据作为所述解压帧P4进行输出。为了方便描述,我们将所述叠加帧中的数据定义为P3。具体地,对所述叠加帧P3中的边界进行所述边界校正的具体过程将在后面的内容中具体描述。As shown in FIG. 3B , the data decompression device 300 performs data decompression on the compressed frame: the data decompression device 300 parses the compressed frame based on a code stream parsing module, and generates the prediction data PI and the residual data R 1 ; use the decoded spectrum adjustment function H 2 (f) to perform the decoded spectrum adjustment on the residual data R 1 , and calculate the difference between the residual data R 1 and the data subjected to the decoded spectrum adjustment, Obtain the boundary of the residual data R 1 , superimpose the residual data R 1 with the differenced data (the boundary of the residual data R 1 ) to obtain the residual data R; then according to the predicted data PI performs prediction to obtain a predicted frame, and superimposes it with the residual data R to obtain a superimposed frame; then perform the boundary correction on the boundary in the superimposed frame, and use the data after the boundary correction as the decompression Frame P4 is output. For the convenience of description, we define the data in the superimposed frame as P 3 . Specifically, the specific process of performing the boundary correction on the boundary in the superimposed frame P3 will be described in detail in the following content.

图3B所示的方式可以减少所述压缩帧中的数据量,从而提高所述初始数据的压缩比和编码效率,提升所述初始数据的传输效率,同时可以减少数据丢失,避免细节损失。The method shown in FIG. 3B can reduce the amount of data in the compressed frame, thereby improving the compression ratio and coding efficiency of the initial data, improving the transmission efficiency of the initial data, and at the same time reducing data loss and avoiding detail loss.

图3C示出了根据本说明书的实施例提供的一种数据压缩和数据解压的流程图。如图3C所示,数据压缩设备200对初始数据进行数据压缩可以是:数据压缩设备200先对所述初始帧P0的边界进行所述边界调节,获取第一增强帧P′0;再对所述第一增强帧P′0进行所述编码频谱调节和所述编码。其中,对所述第一增强帧P′0进行所述编码频谱调节和所述编码可以是:数据压缩设备200先对所述第一增强帧P′0进行所述编码,即预测和求残差,得到预测数据PI和残差数据R,再对所述残差数据R使用所述编码频谱调节函数H1(f)进行所述编码频谱调节;将经过所述编码频谱调节后的残差数据R1和预测数据PI输入码流生成模块进行合成,生成所述压缩帧。图3C所示的数据压缩方式具体的操作与图3A所示的方式相同,只是操作顺序不同。关于所述边界调节和所述编码频谱调节的内容将在后面的描述中详细介绍。FIG. 3C shows a flow chart of data compression and data decompression provided according to an embodiment of the present specification. As shown in FIG. 3C , the data compression device 200 performs data compression on the initial data: the data compression device 200 first performs the boundary adjustment on the boundary of the initial frame P 0 to obtain the first enhanced frame P′ 0 ; The first enhancement frame P' 0 performs the encoding spectral adjustment and the encoding. Wherein, performing the encoding spectrum adjustment and the encoding on the first enhanced frame P' 0 may be: the data compression device 200 first performs the encoding on the first enhanced frame P' 0 , that is, prediction and residual The predicted data PI and the residual data R are obtained, and then the encoded spectrum adjustment function H 1 (f) is used for the residual data R to perform the encoding spectrum adjustment; The data R1 and the predicted data PI are input into the code stream generation module for synthesis to generate the compressed frame. The specific operation of the data compression method shown in FIG. 3C is the same as that of the method shown in FIG. 3A, but the operation sequence is different. The content of the boundary adjustment and the encoding spectrum adjustment will be introduced in detail in the following description.

如图3C所示,数据解压设备300对所述压缩帧进行数据解压可以是:数据解压设备300基于码流解析模块对所述压缩帧进行解析,生成所述预测数据PI和所述残差数据R1;对所述残差数据R1使用所述解码频谱调节函数H2(f)进行所述解码频谱调节,并对所述残差数据R1和经过所述解码频谱调节的数据求差,得到所述残差数据R1的边界,将所述残差数据R1与求差后的数据(所述残差数据R1的边界)叠加,得到所述残差数据R;然后根据预测数据PI进行预测得到预测帧,并与所述残差数据R进行叠加得到叠加帧P3;然后对所述叠加帧中的边界进行所述边界校正,并将经过所述边界校正后的数据作为所述解压帧P4进行输出。具体地,对所述叠加帧P3中的边界进行所述边界校正的具体过程将在后面的内容中具体描述。As shown in FIG. 3C , the data decompression device 300 performs data decompression on the compressed frame: the data decompression device 300 parses the compressed frame based on a code stream parsing module, and generates the prediction data PI and the residual data R 1 ; use the decoded spectrum adjustment function H 2 (f) to perform the decoded spectrum adjustment on the residual data R 1 , and calculate the difference between the residual data R 1 and the data subjected to the decoded spectrum adjustment , obtain the boundary of the residual data R 1 , and superimpose the residual data R 1 with the differenced data (the boundary of the residual data R 1 ) to obtain the residual data R; then according to the prediction The data PI is predicted to obtain a predicted frame, and is superimposed with the residual data R to obtain a superimposed frame P 3 ; then the boundary correction is performed on the boundary in the superimposed frame, and the data after the boundary correction is used as The decompressed frame P4 is output. Specifically, the specific process of performing the boundary correction on the boundary in the superimposed frame P3 will be described in detail in the following content.

图3C所示的方式可以减少所述压缩帧中的数据量,从而提高所述初始数据的压缩比和编码效率,提升所述初始数据的传输效率,同时可以减少数据丢失,避免细节损失。The method shown in FIG. 3C can reduce the amount of data in the compressed frame, thereby improving the compression ratio and coding efficiency of the initial data, improving the transmission efficiency of the initial data, and at the same time reducing data loss and avoiding detail loss.

图3D示出了根据本说明书的实施例提供的一种数据压缩和数据解压的流程图。如图3D所示,数据压缩设备200对初始数据进行数据压缩可以是:数据压缩设备200先使用所述编码频谱调节函数H1(f)对所述初始帧P0进行所述编码频谱调节,再进行所述边界调节,得到数据P′1;然后再对数据P′1进行所述编码,即对数据P′1进行预测和求残差,得到预测数据PI和残差数据R,将所述预测数据PI和所述残差数据R输入码流生成模块进行合成,得到所述压缩帧。关于所述边界调节和所述编码频谱调节的内容将在后面的描述中详细介绍。图3D所示的数据压缩方法可以提高编码效率,使所述压缩帧中的数据量进一步减小,提高压缩比,同时可以减少数据丢失,避免细节损失。FIG. 3D shows a flow chart of data compression and data decompression provided according to an embodiment of the present specification. As shown in FIG. 3D , the data compression device 200 performs data compression on the initial data may be: the data compression device 200 first uses the encoding spectrum adjustment function H 1 (f) to perform the encoding spectrum adjustment on the initial frame P 0 , Then perform the boundary adjustment to obtain the data P'1; and then perform the encoding on the data P' 1 , that is, perform prediction on the data P' 1 and obtain the residual, to obtain the predicted data PI and the residual data R. The prediction data PI and the residual data R are input into the code stream generation module for synthesis to obtain the compressed frame. The content of the boundary adjustment and the encoding spectrum adjustment will be introduced in detail in the following description. The data compression method shown in FIG. 3D can improve coding efficiency, further reduce the amount of data in the compressed frame, improve the compression ratio, reduce data loss, and avoid loss of details.

如图3D所示,数据解压设备300对所述压缩帧进行数据解压可以是:数据解压设备300对所述压缩帧先进行所述解码,即基于码流解析模块对所述压缩帧进行解析,生成所述预测数据PI和所述残差数据R;再根据所述预测数据PI进行预测得到预测帧,并和所述残差数据R叠加,得到解码帧。为了方便描述,我们将所述解码帧中的数据定义为P2。然后对解码帧P2使用所述解码频谱调节函数H2(f)进行所述解码频谱调节和所述边界校正,并将所述解码帧和经过所述边界校正后的数据进行叠加得到所述解压帧P4进行输出。关于所述解码频谱调节和所述边界校正的具体内容将在后面的描述中详细介绍。As shown in FIG. 3D , the data decompression device 300 performs data decompression on the compressed frame: the data decompression device 300 first performs the decoding on the compressed frame, that is, parses the compressed frame based on the code stream parsing module, Generate the predicted data PI and the residual data R; and then perform prediction according to the predicted data PI to obtain a predicted frame, which is superimposed with the residual data R to obtain a decoded frame. For the convenience of description, we define the data in the decoded frame as P 2 . Then use the decoded spectrum adjustment function H 2 (f) to perform the decoded spectrum adjustment and the boundary correction on the decoded frame P 2 , and superimpose the decoded frame and the boundary-corrected data to obtain the Decompress frame P4 for output. The specific content of the decoding spectrum adjustment and the boundary correction will be introduced in detail in the following description.

图3D所示的方式可以减少所述压缩帧中的数据量,从而提高所述初始数据的压缩比和编码效率,提升所述初始数据的传输效率,同时可以减少数据丢失,避免细节损失。所述数据压缩和数据解压的具体过程将在后面的内容中具体描述。The method shown in FIG. 3D can reduce the amount of data in the compressed frame, thereby improving the compression ratio and coding efficiency of the initial data, improving the transmission efficiency of the initial data, and at the same time reducing data loss and avoiding detail loss. The specific process of the data compression and data decompression will be described in detail in the following content.

图4A至图4D示出了根据本说明书实施例提供的一些对数据进行压缩的数据处理的方法P200的流程图。如前所述,数据压缩设备200可以执行数据处理方法P200。具体地,数据压缩设备200中存储介质可以存储至少一组指令集。所述指令集被配置为可以指示数据压缩设备200中的压缩处理器220完成数据处理方法P200。当所述数据压缩设备200运行的时候,压缩处理器220可以读取所述指令集并执行数据处理方法P200。4A to 4D show flowcharts of some data processing methods P200 for compressing data provided according to embodiments of the present specification. As previously described, the data compression apparatus 200 may perform the data processing method P200. Specifically, the storage medium in the data compression device 200 may store at least one set of instruction sets. The instruction set is configured to instruct the compression processor 220 in the data compression apparatus 200 to complete the data processing method P200. When the data compression apparatus 200 is running, the compression processor 220 may read the instruction set and execute the data processing method P200.

所述数据处理的方法P200可以是图4A所示的数据处理方法PA200,也可以是图4B所示的数据处理方法PB200,还可以是图4C所示的数据处理方法PC200,还可以是图4D所示的数据处理方法PD200。其中,图4A所示的数据处理的方法PA200与图3A所示的流程图相对应。图4B所示的数据处理的方法PB200与图3B所示的流程图相对应。图4C所示的数据处理的方法PC200与图3C所示的流程图相对应。图4D所示的数据处理的方法PD200与图3D所示的流程图相对应。The data processing method P200 may be the data processing method PA200 shown in FIG. 4A, the data processing method PB200 shown in FIG. 4B, the data processing method PC200 shown in FIG. 4C, or the data processing method PC200 shown in FIG. 4D. Data processing method PD200 shown. The data processing method PA200 shown in FIG. 4A corresponds to the flowchart shown in FIG. 3A . The data processing method PB200 shown in FIG. 4B corresponds to the flowchart shown in FIG. 3B . The data processing method PC200 shown in FIG. 4C corresponds to the flowchart shown in FIG. 3C . The data processing method PD200 shown in FIG. 4D corresponds to the flowchart shown in FIG. 3D .

如图4A所示,所述方法PA200可以包括:As shown in FIG. 4A, the method PA200 may include:

SA220:选择初始数据中的初始帧。SA220: Select the initial frame in the initial data.

帧是组成数据序列的一个处理单位。在数据处理时,常常以帧为单位进行计算。所述初始数据可以包括一个或多个初始帧。所述初始帧包括预设字节数的初始数据。如前所述,在本说明书中以视频数据为例进行描述,因此,所述初始数据可以是初始视频数据,所述初始帧可以是初始视频数据中的帧图像。在步骤SA220中,数据压缩设备200可以从所述初始数据中选择一部分帧图像作为所述初始帧,也可以选择所述初始数据中的全部帧图像作为所述初始帧。数据压缩设备200可以根据所述初始数据应用场景选择所述初始帧。若所述初始数据应用在对精度和压缩质量要求不高的场景可以选择部分帧图像作为所述初始帧,比如,僻静处的监控图像在多数情况下画面中没有外来物,因此所述僻静处的监控图像多数帧图像是相同的,数据压缩设备200可以从中选择部分帧图像作为所述初始帧进行压缩和传输。又比如,对于高清的电视播放视频,为了保证观影效果,数据压缩设备200可以选择全部帧图像作为所述初始帧进行压缩和传输。A frame is a processing unit that makes up a sequence of data. In data processing, calculations are often performed in units of frames. The initial data may include one or more initial frames. The initial frame includes initial data of a preset number of bytes. As mentioned above, video data is used as an example for description in this specification. Therefore, the initial data may be initial video data, and the initial frame may be a frame image in the initial video data. In step SA220, the data compression device 200 may select a part of frame images from the initial data as the initial frame, or may select all frame images in the initial data as the initial frame. The data compression device 200 may select the initial frame according to the initial data application scenario. If the initial data is used in a scene that does not require high precision and compression quality, part of the frame image can be selected as the initial frame. Most of the frame images of the monitoring images are the same, and the data compression device 200 may select some frame images as the initial frame for compression and transmission. For another example, for a high-definition TV broadcast video, in order to ensure a movie viewing effect, the data compression device 200 may select all frame images as the initial frame for compression and transmission.

SA240:对所述初始帧进行所述数据压缩,得到压缩帧。SA240: Perform the data compression on the initial frame to obtain a compressed frame.

所述数据压缩可以包括对所述初始帧进行所述边界调节以及对在压帧进行所述编码频谱调节。所述对所述初始帧进行所述边界调节可以是通过第一伽马算法对所述初始帧的边界中边界值在第一预设范围内的边界进行调节。The data compression may include performing the boundary adjustment on the initial frame and performing the encoding spectrum adjustment on the compressed frame. The performing the boundary adjustment on the initial frame may be to adjust a boundary whose boundary value is within a first preset range in the boundary of the initial frame by using a first gamma algorithm.

所述对所述在压帧进行所述编码频谱调节可以是将所述在压帧输入编码频谱调节器进行编码频谱调节。所述编码频谱调节是指对所述在压帧的频谱图的幅值进行调节。比如,所述编码频谱调节可以由一个衰减器完成。所述衰减器可以对所述在压帧在频域上进行幅值衰减,从而降低所述在压帧中的数据信息量。The performing the encoding spectrum adjustment on the currently-compressed frame may be inputting the currently-compressed frame into an encoding spectrum adjuster to perform encoding spectrum adjustment. The encoding spectrum adjustment refers to adjusting the amplitude of the spectrogram in the frame being compressed. For example, the encoding spectrum adjustment can be done by an attenuator. The attenuator may attenuate the amplitude of the compressed frame in the frequency domain, thereby reducing the amount of data information in the compressed frame.

所述衰减器可以被配置为降低所述在压帧在其频域内的选定区域的幅值,比如中频区域的幅值,高频区域的幅值,又比如低频至中频区域的幅值,又比如,中频至高频区域的幅值,等等。对于不同形式的数据,接收者对于频率的敏感程度不同,因此所述数据压缩操作可以根据不同形式的数据在频域上选定不同的区域进行幅值衰减。如前所述,以视频数据为例,由于图片中物体的边缘部分中频和高频信息丰富,而中频和高频区域会携带更多的数据,因此降低中频至高频区域的幅值从视觉上会使所述在压帧的边界数据模糊化,同时也会使图像中的信息量大大减小。需要说明的是,降低低频区域的幅值,也会减小图像中的信息量。本领域的普通技术人员可以理解的是,比起没经过编码频谱调节处理的情况,经过编码频谱调节处理的中间状态帧中的低频至高频区域的频率分量减小了,数据信息量也减小了,因此经过编码频谱调节处理的中间状态帧在编码中会有更高的压缩比。不同类型的数据对于低频、中频和高频区域的定义可以不同。在一些实施例中,所述高频可以包括归一化的频域中(0.33,0.5]之间的频率。比如,所述高频可以包括所述归一化的频域中0.33、0.34、0.35、0.36、0.37、0.38、0.39、0.4、0.41、0.42、0.43、0.44、0.45、0.46、0.47、0.48、0.49、0.5中任何两个频率之间的区间,其中0.5为所述归一化的最大频率。The attenuator may be configured to reduce the amplitude of the selected region of the frame in its frequency domain, such as the amplitude of the mid-frequency region, the amplitude of the high-frequency region, and the amplitude of the low-to-medium frequency region, Another example, the amplitude of the mid-frequency to high-frequency region, and so on. For different forms of data, receivers have different degrees of sensitivity to frequency, so the data compression operation may select different regions in the frequency domain to perform amplitude attenuation according to different forms of data. As mentioned above, taking video data as an example, since the edge part of the object in the picture is rich in medium frequency and high frequency information, and the medium frequency and high frequency area will carry more data, so reduce the amplitude of the medium frequency to the high frequency area from the visual The above will blur the boundary data of the frame, and at the same time, the amount of information in the image will be greatly reduced. It should be noted that reducing the amplitude of the low frequency region will also reduce the amount of information in the image. Those of ordinary skill in the art can understand that, compared with the case without the encoding spectrum adjustment process, the frequency components in the low frequency to high frequency region in the intermediate state frame after the encoding spectrum adjustment process are reduced, and the amount of data information is also reduced. Therefore, the intermediate state frame processed by the encoding spectrum adjustment will have a higher compression ratio in the encoding. Different types of data can define the low, mid, and high frequency regions differently. In some embodiments, the high frequency may include frequencies between (0.33, 0.5] in the normalized frequency domain. For example, the high frequency may include 0.33, 0.34, The interval between any two frequencies of 0.35, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47, 0.48, 0.49, 0.5, where 0.5 is the normalized maximum frequency.

以视频数据压缩为例,数据处理方法P200可以采用编码频谱调节和编码相结合的方法对所述初始帧进行压缩,使中频区域的幅值平稳地降低,以减少数据信息量,进一步提高视频数据的压缩比,提升视频传输的效率。所述在压帧可以包括所述初始帧和所述初始帧在所述数据压缩过程中称为所述压缩帧之前的任一数据状态,比如所述初始帧在进行所述编码频谱调节和编码的过程中的任一种数据状态,例如,初始帧、预测帧、残差帧,等等。在图3A和图4A中,所述在压帧可以是所述初始帧。Taking video data compression as an example, the data processing method P200 can compress the initial frame by using a combination of coding spectrum adjustment and coding, so that the amplitude of the intermediate frequency region is steadily reduced, so as to reduce the amount of data information and further improve the video data. The compression ratio can improve the efficiency of video transmission. The compressed frame may include the initial frame and any data state of the initial frame before the compressed frame during the data compression process, for example, the initial frame is undergoing the encoding spectrum adjustment and encoding. Any data state in the process, for example, initial frame, predicted frame, residual frame, and so on. In FIGS. 3A and 4A , the under-pressing frame may be the initial frame.

步骤SA240可以是先对所述初始帧进行所述边界调节,再进行所述编码频谱调节。具体地,步骤SA240可以包括:Step SA240 may be to perform the boundary adjustment on the initial frame first, and then perform the encoding spectrum adjustment. Specifically, step SA240 may include:

SA242:对所述初始帧P0进行所述边界调节,获取第一增强帧P0 SA242: Perform the boundary adjustment on the initial frame P 0 to obtain the first enhanced frame P 0 .

对于一个图像数据或者视频数据,在经过所述编码频谱调节之后,图像或者视频可能变得模糊,所述图像或者视频数据中的数据信息量变小,使得相邻像素之间的差值变小。在对所述图像数据或视频数据使用标准H.264/H.265进行编码时,可能会在一定程度上造成某些图像和视频的细节损失。也就是说,那些相邻像素之间的差值较小的边界,经过所述编码处理后,他们之间的差值可能变得更小甚至消失,从而导致图像数据或视频数据中的细节损失。因此,为了避免相邻像素点之间差值较小的边界在编码和解码过程中丢失,需要对那些相邻像素点之间差值较小的边界进行所述边界调节以进行边界增强,使得经过编码和解码后,细节部分仍然可以保留。对于那些相邻像素之间的差值较大的边界,即便经过所述编码频谱调节处理,所保留的边界仍然足够大。经过编码和解码处理后也不会消失。因此,对于那些相邻像素之间的差值较大的边界可以不进行边界调节。For an image data or video data, after the encoding spectrum adjustment, the image or video may become blurred, and the amount of data information in the image or video data becomes smaller, so that the difference between adjacent pixels becomes smaller. When the image data or video data is encoded using the standard H.264/H.265, the details of some images and videos may be lost to a certain extent. That is to say, for those boundaries where the difference between adjacent pixels is small, after the encoding process, the difference between them may become smaller or even disappear, resulting in loss of details in image data or video data. . Therefore, in order to avoid the loss of borders with small differences between adjacent pixels in the encoding and decoding process, it is necessary to perform the border adjustment on those borders with small differences between adjacent pixels to perform border enhancement, so that the border is enhanced. After encoding and decoding, the details can still be preserved. For those boundaries with large differences between adjacent pixels, even after the encoding spectrum adjustment process, the remaining boundaries are still large enough. It will not disappear after encoding and decoding processing. Therefore, border adjustment may not be performed for those borders where the difference between adjacent pixels is large.

图5A示出了根据本说明书的实施例提供的一种获取第一增强帧的流程图。如图4A和图5A所示,步骤SA242可以包括:FIG. 5A shows a flowchart of acquiring a first enhanced frame according to an embodiment of the present specification. As shown in Figure 4A and Figure 5A, step SA242 may include:

SA242-2:通过第一调节函数HL1(f)对所述初始帧P0进行调节,得到第一帧。SA242-2: Adjust the initial frame P 0 through the first adjustment function H L1 (f) to obtain the first frame.

为了方便描述,我们将所述第一帧中的数据定义为PL1。第一调节函数HL1(f)在频域内可以是一个低通率波器,使所述初始帧P0的幅值在频域内平滑地降低,以使所述初始帧P0在频域内的低频区域的分量被保留而中频至高频区域的分量被衰减,从而得到第一帧PL1。第一帧PL1是一个模糊的图像。第一调节函数HL1(f)可以是任意形式的平滑过渡的低通滤波器,本说明书对此不做限定。For the convenience of description, we define the data in the first frame as P L1 . The first adjustment function H L1 (f) can be a low-pass frequency wave filter in the frequency domain, so that the amplitude of the initial frame P 0 is smoothly reduced in the frequency domain, so that the initial frame P 0 in the frequency domain is The components in the low frequency region are preserved and the components in the middle to high frequency region are attenuated, resulting in the first frame P L1 . The first frame P L1 is a blurred image. The first adjustment function H L1 (f) may be a low-pass filter with smooth transition in any form, which is not limited in this specification.

SA242-4:对所述初始帧P0和所述第一帧PL1求差,获取第一边界。SA242-4: Calculate the difference between the initial frame P 0 and the first frame P L1 to obtain the first boundary.

为了方便描述,我们将所述第一边界中的数据定义为PE1。所述第一边界PE1包括所述初始帧P0中的边界信息。所述第一边界PE1可以表示为以下公式:For the convenience of description, we define the data in the first boundary as P E1 . The first boundary PE1 includes boundary information in the initial frame P0 . The first boundary P E1 can be expressed as the following formula:

PE1=P0-PL1=P0-P0*HL1(f)公式(1)P E1 =P 0 -P L1 =P 0 -P 0 *H L1 (f) Formula (1)

每一帧数据频谱中的中频至高频分量主要集中在这一帧数据中数据变化剧烈的区域,也就是数据的边界数据。比如,对于一帧图像来说,所述中频至高频数据主要集中在所述图像中物体的边界,也就是这一帧图像的边界数据。所述第一调节函数HL1(f)使所述初始帧P0在频域内的幅值平滑地降低以衰减中频至高频区域的分量。因此,第一帧PL1可以理解成去除了初始帧P0中的边界信息的数据。接下来,对所述初始帧P0和所述第一帧PL1求差,可以得到初始帧P0的边界,即第一边界PE1The intermediate frequency to high frequency components in the data spectrum of each frame are mainly concentrated in the area where the data changes sharply in this frame of data, that is, the boundary data of the data. For example, for a frame of image, the intermediate frequency to high frequency data are mainly concentrated on the boundary of the object in the image, that is, the boundary data of this frame of image. The first adjustment function H L1 (f) smoothly reduces the amplitude of the initial frame P 0 in the frequency domain to attenuate the components in the mid-frequency to high-frequency region. Therefore, the first frame P L1 can be understood as data from which the boundary information in the initial frame P 0 is removed. Next, the difference between the initial frame P 0 and the first frame P L1 can be calculated to obtain the boundary of the initial frame P 0 , that is, the first boundary P E1 .

在一些实施例中,步骤SA242还可以包括:In some embodiments, step SA242 may further include:

SA242-6:通过第一系数a对所述第一边界PE1进行增强。 SA242-6 : Enhance the first boundary PE1 by the first coefficient a.

其中,所述第一系数a为大于1的任意数。在一些实施例中,所述第一边界PE1可以是对所述初始帧P0和所述第一帧PL1求差得到的数据。在另一些实施例中,所述第一边界PE1可以是通过所述第一系数a增强后的边界。此时,所述第一边界PE1还可以表示为以下公式:Wherein, the first coefficient a is any number greater than 1. In some embodiments, the first boundary P E1 may be data obtained by calculating the difference between the initial frame P 0 and the first frame P L1 . In other embodiments, the first boundary PE1 may be a boundary enhanced by the first coefficient a. At this time, the first boundary P E1 can also be expressed as the following formula:

PE1=a*(P0-PL1)=a*(P0-P0*HL1(f))公式(2)P E1 =a*(P 0 -P L1 )=a*(P 0 -P 0 *H L1 (f)) Formula (2)

如前所述,在对所述初始帧的边界进行所述边界调节以进行调节时,只对相邻像素间的差值较小的边界进行所述边界调节。为了避免所述边界调节对其他不需要进行调节的边界造成影响,数据压缩设备200可以先对所述第一边界PE1通过大于1的第一系数a进行信号放大。As described above, when the boundary adjustment is performed on the boundary of the initial frame for adjustment, the boundary adjustment is only performed on the boundary with a smaller difference between adjacent pixels. In order to prevent the boundary adjustment from affecting other boundaries that do not need to be adjusted, the data compression device 200 may first perform signal amplification on the first boundary PE1 by a first coefficient a greater than 1.

SA242-8:通过所述第一伽马算法,对所述第一边界中PE1边界值处于所述第一预设范围内的边界进行调节,得到增强边界。 SA242-8 : Through the first gamma algorithm, adjust the boundary of the first boundary whose PE1 boundary value is within the first preset range to obtain an enhanced boundary.

为了方便描述,我们将所述增强边界中的数据定义为PE。如前所述,在对所述初始帧的边界进行所述边界调节时,只对相邻像素间的差值较小的边界进行所述边界调节。所述第一预设范围可以是需要进行所述边界调节的边界值。所述边界值可以是第一边界中PE1中每个像素对应的值。具体地,所述第一预设范围可以是[-R1,R1]之间的范围。R1可以是边界阈值。比如,R1可以是30,40,50,等等。在一些实施例中,R1可以是5~30之间的任意数。For the convenience of description, we define the data in the enhanced boundary as PE . As mentioned above, when the boundary adjustment is performed on the boundary of the initial frame, the boundary adjustment is only performed on the boundary with a smaller difference between adjacent pixels. The first preset range may be a boundary value for which the boundary adjustment needs to be performed. The boundary value may be a value corresponding to each pixel in PE1 in the first boundary. Specifically, the first preset range may be a range between [-R1, R1]. R1 can be the boundary threshold. For example, R1 could be 30, 40, 50, etc. In some embodiments, R1 can be any number between 5-30.

图5B示出了根据本说明书的实施例提供的一种进行所述边界调节的流程图。如图5B所示,步骤SA242-8可以是:数据压缩设备200通过第二调节函数HL2(f)对所述第一边界PE1进行调节,得到第二边界PE2;通过所述第一伽马算法,对所述第二边界PE2中的边界值处于所述第一预设范围[-R1,R1]内的边界进行调节,得到所述增强边界PEFIG. 5B shows a flowchart of performing the boundary adjustment according to an embodiment of the present specification. As shown in FIG. 5B, step SA242-8 may be: the data compression device 200 adjusts the first boundary P E1 through the second adjustment function H L2 (f) to obtain a second boundary P E2 ; The gamma algorithm adjusts the boundary where the boundary value of the second boundary PE2 is within the first preset range [ -R1 , R1] to obtain the enhanced boundary PE .

所述初始帧的边界(第一边界PE1)中不需要进行所述边界增强的边界中包含的中频至高频区域的分量较多。因此,为了避免所述边界增强对其他不需要进行调节的边界造成影响,数据压缩设备200可以先对所述第一边界PE1进行过滤,以过滤中频至高频区域的分量。第二调节函数HL2(f)可以是一个直流分量DC等于1的低通滤波器,以使所述第一边界PE1在频域内的低频区域的分量被保留而中频至高频区域的分量被过滤。In the boundary of the initial frame (the first boundary P E1 ), the boundary that does not need to perform the boundary enhancement contains many components in the middle to high frequency region. Therefore, in order to prevent the boundary enhancement from affecting other boundaries that do not need to be adjusted, the data compression device 200 may first filter the first boundary PE1 to filter the components in the mid-frequency to high-frequency region. The second adjustment function H L2 (f) may be a low-pass filter with a DC component DC equal to 1, so that the components in the low frequency region of the first boundary P E1 in the frequency domain are retained and the components in the intermediate frequency to high frequency region is filtered.

图6示出了根据本说明实施例提供的一种第二调节函数HL2(f)的示意图。横轴为归一化频率f,纵轴为第二调节函数HL2(f)的幅值调节增益HL2。所述横轴的归一化频率f可以分成低频区域,中低频区域,中频区域,中高频区域和高频区域。如图6所示,横轴的归一化频率最大值为0.5。如前面所述,所述高频区域可以包括归一化的频域中(d,0.5]之间的频率。其中d为所述高频区域的频率下限。比如,d可以为所述归一化的频域中0.35、0.36、0.37、0.38、0.39、0.4、0.41、0.42、0.43、0.44、和0.45中的任意一个频率。所述中频区域可以包括(b,c]之间的频率,其中b为所述中频区域的频率下限,c为所述中频区域的频率上限。比如,所述中频区域的频率下限b可以是所述归一化的频域中的0.15、0.16、0.17、0.18、0.19、0.2、0.21、0.22、0.23、0.24、0.25、0.26、0.27和0.28之中的任意一个频率;所述中频区域的频率上限c可以是所述归一化的频域中0.35、0.34、0.33、0.32和0.31中的任意一个频率。所述低频区域可以包括归一化的频域中[0,a]之间的频率。其中a为所述低频区域的频率上限。所述低频区域的频率上限a可以是所述归一化的频域中0.01、0.02、0.03、0.04、0.05、0.06、0.07、0.08、0.09、0.10、0.12、0.13、0.14和0.15中的任意一个频率。当所述低频区域同所述中频区域不相连时,二者的之间频率区域被称为中低频区域。当所述中频区域同所述高频区域不相连时,二者之间的频率区域被称为中高频率区域。FIG. 6 shows a schematic diagram of a second adjustment function H L2 (f) provided according to an embodiment of the present description. The horizontal axis is the normalized frequency f, and the vertical axis is the amplitude adjustment gain H L2 of the second adjustment function H L2 (f). The normalized frequency f of the horizontal axis can be divided into a low frequency region, a middle and low frequency region, a middle frequency region, a middle and high frequency region and a high frequency region. As shown in Fig. 6, the normalized frequency maximum value of the horizontal axis is 0.5. As mentioned above, the high frequency region may include frequencies between (d, 0.5] in the normalized frequency domain. Where d is the lower frequency limit of the high frequency region. For example, d may be the normalized frequency range. The intermediate frequency region may include frequencies between (b, c], where b is the frequency lower limit of the intermediate frequency region, and c is the frequency upper limit of the intermediate frequency region. For example, the frequency lower limit b of the intermediate frequency region may be 0.15, 0.16, 0.17, 0.18, Any frequency among 0.19, 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27 and 0.28; the upper frequency limit c of the intermediate frequency region may be 0.35, 0.34, 0.33 in the normalized frequency domain , 0.32 and 0.31 in any frequency. The low frequency region may include frequencies between [0, a] in the normalized frequency domain. Where a is the upper frequency limit of the low frequency region. The frequency of the low frequency region The upper limit a may be any one of 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.10, 0.12, 0.13, 0.14 and 0.15 in the normalized frequency domain. When the low frequency When the intermediate frequency area is not connected with the mid-frequency area, the frequency area between the two is called the mid-low frequency area. When the intermediate frequency area is not connected with the high-frequency area, the frequency area between the two is called the mid-high frequency area. frequency area.

第二调节函数HL2(f)可以对中频至高频区域的分量进行过滤。第二调节函数HL2(f)中的阻带区间可以在频率0.25~0.50之间的任意区间。比如,第二调节函数HL2(f)中的阻带区间可以在0.25、0.27、0.29、0.31、0.33、0.35、0.37、0.39、0.41、0.43、0.45和0.50等数值中任意两个所规定的区间内。第二调节函数HL2(f)中的通带区间可以在频率0~0.35之间的任意区间。比如,第二调节函数HL2(f)中的通带区间可以在0、0.02、0.04、0.06、0.08、0.10、0.12、0.14、0.15、0.17、0.19、0.21、0.23、0.25、0.27、0.29、0.21、0.23和0.35等数值中任意两个所规定的区间内。The second adjustment function H L2 (f) can filter the components in the mid to high frequency region. The stop band interval in the second adjustment function H L2 (f) may be any interval between the frequencies of 0.25 and 0.50. For example, the stop band interval in the second adjustment function H L2 (f) can be specified by any two of the values 0.25, 0.27, 0.29, 0.31, 0.33, 0.35, 0.37, 0.39, 0.41, 0.43, 0.45 and 0.50. within the interval. The passband interval in the second adjustment function H L2 (f) can be any interval between the frequencies of 0 and 0.35. For example, the passband interval in the second adjustment function H L2 (f) may be 0, 0.02, 0.04, 0.06, 0.08, 0.10, 0.12, 0.14, 0.15, 0.17, 0.19, 0.21, 0.23, 0.25, 0.27, 0.29, Within the interval specified by any two of the values 0.21, 0.23 and 0.35.

图7示出了根据本说明书的实施例提供的一种伽马算法的曲线示意图。所述伽马算法是一个非线性图像和视频的亮度调整方法,其归一化的函数曲线如图7所示。所述伽马算法为对图像的像素值进行动态调整的算法。如图7所示,横轴为经伽马算法调整前的值,纵轴为经伽马算法调整后的值。其中,曲线7代表伽马值γ>1的曲线。曲线8代表伽马值γ=1的曲线。曲线9代表γ<1的曲线。当γ>1时,图像经伽马算法校正后,整体灰度值的绝对值变小。当γ<1时,图像经伽马算法校正后,整体灰度值的绝对值变大。图7所示的伽马算法为扩展伽马算法。即以原点(0,0)为对称点,将伽马算法进行中心对称扩展到第三象限。FIG. 7 shows a schematic diagram of a curve of a gamma algorithm provided according to an embodiment of the present specification. The gamma algorithm is a nonlinear image and video brightness adjustment method, and its normalized function curve is shown in FIG. 7 . The gamma algorithm is an algorithm for dynamically adjusting pixel values of an image. As shown in FIG. 7 , the horizontal axis is the value before being adjusted by the gamma algorithm, and the vertical axis is the value after being adjusted by the gamma algorithm. Among them, curve 7 represents a curve with gamma value γ>1. Curve 8 represents a curve with gamma value γ=1. Curve 9 represents a curve for γ<1. When γ>1, after the image is corrected by the gamma algorithm, the absolute value of the overall gray value becomes smaller. When γ<1, after the image is corrected by the gamma algorithm, the absolute value of the overall gray value becomes larger. The gamma algorithm shown in FIG. 7 is an extended gamma algorithm. That is, taking the origin (0, 0) as the symmetry point, the gamma algorithm is centrally symmetric and extended to the third quadrant.

在步骤SA242-8中,数据压缩设备200可以通过所述第一伽马算法对所述初始帧的边界进行边界校正。数据压缩设备200可以对第二边界PE2中的像素逐个进行边界调节。具体地,数据压缩设备200可以将第二边界PE2中的每个像素对应的边界值与边界阈值R1进行对比;当边界值处于[-R1,R1]之内时,则使用所述第一伽马算法对所述边界值进行调节;当边界值处于[-R1,R1]之外时,则不进行调节。In step SA242-8, the data compression apparatus 200 may perform boundary correction on the boundary of the initial frame through the first gamma algorithm. The data compression apparatus 200 may perform boundary adjustment on the pixels in the second boundary PE2 one by one. Specifically, the data compression device 200 may compare the boundary value corresponding to each pixel in the second boundary PE2 with the boundary threshold R1; when the boundary value is within [-R1, R1], the first boundary value is used The gamma algorithm adjusts the boundary value; when the boundary value is outside [-R1, R1], no adjustment is made.

在一些实施例中,数据压缩设备200可以使用所述第一伽马算法对所述第二边界PE2进行边界调节以进行边界增强。此时,所述第一伽马算法可以是伽马值γ<1的伽马算法。数据压缩设备200可以对第二边界PE2中的像素逐个进行边界增强。具体地,数据压缩设备200可以将第二边界PE2中的每个像素对应的边界值与边界阈值R1进行对比;当边界值处于[-R1,R1]之内时,则使用所述第一伽马算法对所述边界值进行增强,使所述边界值的绝对值变大;当边界值处于[-R1,R1]之外时,则不进行增强。数据压缩设备200可以使用查表的方法进行所述边界调节。数据压缩设备200中可以存储有表1。表1中存储有所述第一伽马算法中的输入边界值与输出边界值的对应关系,即调节前的边界值与调节后的边界值的对应关系。以R1=5为例,表1可以表示为:In some embodiments, the data compression apparatus 200 may perform boundary adjustment on the second boundary PE2 using the first gamma algorithm for boundary enhancement. At this time, the first gamma algorithm may be a gamma algorithm with a gamma value γ<1. The data compression apparatus 200 may perform boundary enhancement on the pixels in the second boundary PE2 one by one. Specifically, the data compression device 200 may compare the boundary value corresponding to each pixel in the second boundary PE2 with the boundary threshold R1; when the boundary value is within [-R1, R1], the first boundary value is used The gamma algorithm enhances the boundary value to increase the absolute value of the boundary value; when the boundary value is outside [-R1, R1], no enhancement is performed. The data compression apparatus 200 may perform the boundary adjustment using a table look-up method. Table 1 may be stored in the data compression apparatus 200 . Table 1 stores the correspondence between the input boundary value and the output boundary value in the first gamma algorithm, that is, the correspondence between the boundary value before adjustment and the boundary value after adjustment. Taking R1=5 as an example, Table 1 can be expressed as:

Figure BDA0002884076930000301
Figure BDA0002884076930000301

在一些实施例中,数据压缩设备200还可以通过所述第一伽马算法对所述第二边界PE2进行边界调节以进行边界减弱,以进行降噪。此时,所述第一伽马算法可以是伽马值γ>1的伽马算法。具体地,数据压缩设备200可以使用伽马值γ>1的伽马算法对所述第二边界PE2中在所述第一预设范围[-R1,R1]内的边界进行减弱,以降低边界值的绝对值,从而消除所述第二边界PE2中的噪声,增加初始数据的清晰度。图像中的噪声多存在于边界中的边界值较小的地方。对所述第一预设范围[-R1,R1]内的边界进行减弱,可以有效消除噪声。In some embodiments, the data compression device 200 may further perform boundary adjustment on the second boundary PE2 through the first gamma algorithm to reduce the boundary, so as to perform noise reduction. At this time, the first gamma algorithm may be a gamma algorithm with a gamma value γ>1. Specifically, the data compression device 200 may use a gamma algorithm with a gamma value γ>1 to weaken the boundary within the first preset range [ -R1 , R1] in the second boundary PE2 to reduce The absolute value of the boundary value, thereby eliminating noise in the second boundary PE2 and increasing the clarity of the initial data. The noise in the image mostly exists in the boundary where the boundary value is small. By weakening the boundary within the first preset range [-R1, R1], noise can be effectively eliminated.

在一些实施例中,数据压缩设备200可以通过所述第一伽马算法对所述第二边界PE2进行边界调节以同时对所述第二边界PE2进行所述边界增强和所述边界减弱,以获取一个增强并且降噪后的图像,可以用于图像压缩前的预处理,从而获得更好的图像质量。此时,所述第一伽马算法可以是在[-R1,-R2]和[R2,R1]内伽马值γ<1,在[-R2,R2]内伽马值γ>1的伽马算法。其中,R2<R1。数据压缩设备200可以对第二边界PE2中的像素逐个进行边界调节。具体地,数据压缩设备200可以将第二边界PE2中的每个像素对应的边界值与边界阈值R1和R2进行对比;当边界值处于[-R1,-R2]或[R2,R1]之内时,则使用伽马值γ<1的伽马算法对所述边界值进行增强,使所述边界值的绝对值变大;当边界值处于[-R2,R2]之内时,则使用伽马值γ>1的伽马算法对所述边界值进行减弱,以降低边界值的绝对值,从而消除所述第二边界PE2中的噪声;当边界值处于[-R1,R1]之外时,则不进行调节。数据压缩设备200可以通过表2对所述第二边界PE2进行所述边界增强和所述边界减弱。以R1=5,R2=1为例,表2可以表示为:In some embodiments, the data compression apparatus 200 may perform boundary adjustment on the second boundary PE2 through the first gamma algorithm to simultaneously perform the boundary enhancement and the boundary reduction on the second boundary PE2 , to obtain an enhanced and denoised image, which can be used for preprocessing before image compression to obtain better image quality. At this time, the first gamma algorithm may be a gamma with a gamma value γ<1 in [-R1, -R2] and [R2, R1], and a gamma value γ>1 in [-R2, R2] Horse Algorithm. Wherein, R2<R1. The data compression apparatus 200 may perform boundary adjustment on the pixels in the second boundary PE2 one by one. Specifically, the data compression device 200 may compare the boundary value corresponding to each pixel in the second boundary PE2 with the boundary thresholds R1 and R2; when the boundary value is between [-R1, -R2] or [R2, R1] When the boundary value is within, use the gamma algorithm with gamma value γ<1 to enhance the boundary value to make the absolute value of the boundary value larger; when the boundary value is within [-R2, R2], use The gamma algorithm with gamma value γ>1 weakens the boundary value to reduce the absolute value of the boundary value, thereby eliminating noise in the second boundary PE2; when the boundary value is between [ -R1 , R1] outside, no adjustment is made. The data compression apparatus 200 may perform the boundary enhancement and the boundary weakening on the second boundary PE2 according to Table 2. Taking R1=5 and R2=1 as an example, Table 2 can be expressed as:

Figure BDA0002884076930000311
Figure BDA0002884076930000311

如表2所示,当边界值在[-1,1]之内时伽马值γ>1进行所述边界减弱,以进行降噪。当边界值在[-5,-1]和[1,5]之内时伽马值γ<1进行所述边界增强。As shown in Table 2, when the boundary value is within [-1, 1], the boundary weakening is performed for the gamma value γ>1 for noise reduction. The boundary enhancement is performed when the boundary value is within [-5, -1] and [1, 5] with a gamma value γ<1.

图5C示出了根据本说明书的实施例提供的另一种进行边界调节的流程图。如图5C所示,步骤SA242-8还可以是:数据压缩设备200通过所述第一伽马算法,直接对所述第一边界PE1中的边界值处于所述第一预设范围[-R3,R3]内的边界进行调节,得到所述增强边界PE。其中R3可以与R1不同,也可以与R1相同。FIG. 5C shows another flowchart of performing boundary adjustment according to an embodiment of the present specification. As shown in FIG. 5C, step SA242-8 may also be: the data compression device 200 directly determines that the boundary value in the first boundary PE1 is in the first preset range [- The boundary within R3, R3] is adjusted to obtain the enhanced boundary PE . Wherein R3 can be different from R1 or can be the same as R1.

步骤SA242还可以包括:Step SA242 may also include:

SA242-9:将所述第一帧PL1与所述增强边界PE进行叠加,得到所述第一增强帧P′0 SA242-9 : Superimpose the first frame P L1 and the enhancement boundary PE to obtain the first enhancement frame P′ 0 .

步骤SA240还可以包括:Step SA240 may also include:

SA244:对所述第一增强帧P′0进行所述编码频谱调节和所述编码。SA244: Perform the encoding spectrum adjustment and the encoding on the first enhanced frame P' 0 .

在步骤SA244中,数据压缩设备200可以先对所述第一增强帧P′0进行所述编码频谱调节,使所述第一增强帧P′0在频域内的幅值平稳地降低,从而使所述第一增强帧P′0的边界信息模糊,得到编码频谱调节帧,以减少所述第一增强帧P′0中的信息量,从而降低所述第一增强帧P′0压缩后占用的空间资源。然后对所述编码频谱调节帧进行编码,即预测和求残差,对所述编码频谱调节帧进行预测得到所述编码频谱调节帧的预测帧和所述预测数据PI;再将所述编码频谱调节帧的预测帧与所述编码频谱调节帧的初始帧相减得到所述编码频谱调节帧的残差数据R,将残差数据R和所述预测数据PI输入码流生成模块进行合成,得到所述压缩帧。数据处理方法P200可以提高所述编码频谱调节帧的编码效率,使所述压缩帧中的数据量进一步减小,提高编码效率,提高压缩比。由于所述编码频谱调节的对象是所述第一增强帧P′0,因此所述在压帧便是所述第一增强帧P′0。以视频数据为例,步骤SA244可以包括:In step SA244, the data compression device 200 may first perform the encoding spectrum adjustment on the first enhanced frame P' 0 , so that the amplitude of the first enhanced frame P' 0 in the frequency domain is reduced smoothly, so that the The boundary information of the first enhanced frame P' 0 is blurred, and a coded spectrum adjustment frame is obtained to reduce the amount of information in the first enhanced frame P' 0 , thereby reducing the occupation of the first enhanced frame P' 0 after compression space resources. Then, encode the encoded spectrum adjustment frame, that is, predict and calculate the residual, and predict the encoded spectrum adjustment frame to obtain the predicted frame and the predicted data PI of the encoded spectrum adjustment frame; The predicted frame of the adjustment frame is subtracted from the initial frame of the encoded spectrum adjustment frame to obtain the residual data R of the encoded spectrum adjustment frame, and the residual data R and the predicted data PI are input into the code stream generation module to synthesize, to obtain the compressed frame. The data processing method P200 can improve the coding efficiency of the coded spectrum adjustment frame, further reduce the amount of data in the compressed frame, improve the coding efficiency, and improve the compression ratio. Since the object of the encoding spectrum adjustment is the first enhanced frame P′ 0 , the under-compressed frame is the first enhanced frame P′ 0 . Taking video data as an example, step SA244 may include:

SA244-2:确定所述初始帧的帧类型。SA244-2: Determine the frame type of the initial frame.

如前所述,在使用H.264或H.265的标准对视频数据进行编码时,常常根据帧图像将帧压缩成不同的帧类型。因此,数据压缩设备200在对所述在压帧(第一增强帧P′0)进行所述编码频谱调节前,需要先确定所述初始帧的帧类型,对于不同的帧类型选择的编码卷积核也不同。As mentioned above, when encoding video data using the H.264 or H.265 standard, frames are often compressed into different frame types according to frame images. Therefore, before performing the encoding spectrum adjustment on the compressed frame (the first enhanced frame P′ 0 ), the data compression device 200 needs to determine the frame type of the initial frame, and the encoding volume selected for different frame types The nuclei are also different.

对于视频帧序列而言,具体的帧类型可以包括帧内预测帧(Intra Picture,简称I帧),前向预测帧(Predictive Frame,简称P帧),以及双向预测帧(Bi-directionalPredictive Frame,简称B帧)。对于只有一个帧的帧序列,通常按照帧内预测帧(I帧)来处理。I帧是一个全帧内压缩的编码帧。解码时仅用I帧的数据不需要参考其他画面就可重构完整的数据,能够作为后续的若干帧的参考帧。P帧是通过充分降低与图像序列中前面已编码帧的时间冗余信息来压缩传输数据量的编码帧。P帧由在它前面的P帧或者I帧预测而来,它根据本帧与邻近的前一帧或几帧的不同点来压缩本帧。采取P帧和I帧联合压缩的方法可达到更高的压缩且无明显的压缩痕迹。它只参考前面靠近它的I帧或P帧。B帧根据邻近的前几帧、本帧以及后几帧的不同点来压缩本帧,也即仅记录本帧与前后帧的差值。一般地,I帧压缩效率最低,P帧较高,B帧最高。在视频数据的编码过程中,部分视频帧会被压缩成为I帧,部分会被压缩成P帧,还有部分会被压缩成B帧。所述初始帧的帧类型包括I帧、P帧以及B帧中的至少一种或者多种。For the video frame sequence, the specific frame types may include an intra-frame prediction frame (Intra Picture, referred to as an I frame), a forward prediction frame (Predictive Frame, referred to as a P frame), and a bi-directional predictive frame (Bi-directional Predictive Frame, referred to as frame) B frame). For a frame sequence with only one frame, it is usually processed as an intra-frame predicted frame (I-frame). An I-frame is a fully intra-compressed coded frame. During decoding, only the data of the I frame can be used to reconstruct the complete data without referring to other pictures, which can be used as the reference frame of several subsequent frames. P-frames are coded frames that compress the amount of transmitted data by substantially reducing temporal redundancy with previously coded frames in the image sequence. The P frame is predicted from the P frame or I frame before it, and it compresses the frame according to the difference between the frame and the adjacent previous frame or frames. The combined compression method of P frame and I frame can achieve higher compression without obvious compression traces. It only refers to the preceding I-frame or P-frame that is close to it. The B frame compresses the current frame according to the difference between the adjacent previous frames, the current frame and the subsequent frames, that is, only the difference between the current frame and the previous and subsequent frames is recorded. Generally, the compression efficiency of the I frame is the lowest, the P frame is higher, and the B frame is the highest. During the encoding process of video data, some video frames will be compressed into I frames, some will be compressed into P frames, and some will be compressed into B frames. The frame type of the initial frame includes at least one or more of an I frame, a P frame, and a B frame.

SA244-4:基于所述初始帧的帧类型,从编码卷积核组中选择一个卷积核作为所述编码卷积核,对所述在压帧做卷积,得到编码频谱调节帧。SA244-4: Based on the frame type of the initial frame, select a convolution kernel from the encoding convolution kernel group as the encoding convolution kernel, and perform convolution on the under-compression frame to obtain an encoded spectrum adjustment frame.

具体地,步骤SA244-4可以是对所述在压帧(第一增强帧P′0)进行所述编码频谱调节,得到所述编码频谱调节帧。其中,所述编码频谱调节包括使用编码卷积核对所述在压帧做卷积,以便在频域内平稳地降低所述在压帧在中频区域的幅值。Specifically, step SA244-4 may be to perform the encoding spectrum adjustment on the under compression frame (the first enhanced frame P' 0 ) to obtain the encoded spectrum adjustment frame. Wherein, the encoding spectrum adjustment includes using an encoding convolution check to perform convolution on the under-compressed frame, so as to smoothly reduce the amplitude of the under-compressed frame in the intermediate frequency region in the frequency domain.

对所述在压帧进行频谱调节可以表达为在所述在压帧在频域乘以传递函数H1(f)(即编码频谱调节函数)或者在时域做相应的卷积计算。如果所述在压帧为数字化的数据,则所述卷积运算可以是选取同所述编码频谱调节函数H1(f)相对应的编码卷积核进行卷积运算。为了方便描述,本说明书将以在时域进行卷积为例来描述所述频谱调节,但本领域技术人员应该明白通过在频域乘以编码频谱调节函数H1(f)进行频谱调节的方式也是本说明书要保护的范围。Performing spectral adjustment on the under-compressed frame may be expressed as multiplying the under-compressed frame by a transfer function H 1 (f) (ie, an encoding spectrum adjustment function) in the frequency domain or performing corresponding convolution calculation in the time domain. If the compressed frame is digitized data, the convolution operation may be to select an encoding convolution kernel corresponding to the encoding spectrum adjustment function H 1 (f) to perform the convolution operation. For the convenience of description, this specification will take convolution in the time domain as an example to describe the spectrum adjustment, but those skilled in the art should understand that the spectrum adjustment is performed by multiplying the encoded spectrum adjustment function H 1 (f) in the frequency domain. It is also the scope of protection in this manual.

如前所述,对所述在压帧进行所述编码频谱调节可以表现为在时域对所述在压帧进行卷积。数据压缩设备200的存储介质中可以存储有多个编码频谱调节器,即所述编码频谱调节器组。每个编码频谱调节器包括一个编码卷积核组。也就是说,数据压缩设备200的存储介质中可以包括所述编码卷积核组,所述编码卷积核组中可以包括至少一个卷积核。数据压缩设备200对所述在压帧做卷积时,可以基于所述初始帧对应的在压帧的帧类型,从所述编码卷积核组中选择一个卷积核作为所述编码卷积核,对所述在压帧做卷积。当所述初始帧对应的在压帧为I帧或P帧时,数据压缩设备200对所述I帧或P帧进行卷积包括从所述编码卷积核组中选择一个卷积核作为所述编码卷积核,对所述I帧或P帧做卷积。所述卷积核组中任意一个卷积核都可以使所述I帧或P帧在频域内的幅值降低,在中频区域的幅值平稳地降低。数据压缩设备200也可以根据对所述初始帧的编码质量要求从所述编码卷积核组中选择一个压缩效果最好的卷积核作为所述编码卷积核。当所述初始帧对应的在压帧(在本实施例中即所述第一增强帧)为B帧时,所述在压帧的所述编码卷积核同与所述在压帧最近的参考帧对应的编码卷积核相同,或者所述在压帧的所述编码卷积核同相邻的两个方向的最接近的参考帧中衰减程度最大的参考帧对应的编码卷积核相同,或者所述在压帧的所述编码卷积核取相邻的两个方向上的最近的参考帧对应的编码卷积核的平均值。当B帧和两个相邻的参考帧距离相同的时候,所述在压帧的所述编码卷积核可以取相邻的两个方向上的任一个参考帧对应的编码卷积核,例如当前B帧选择前向相邻的参考帧所对应的卷积核。这样可以使所述在压帧的幅值的降低效果更好,编码频谱调节的效果更好,使得视频数据的压缩比更高。As mentioned above, performing the encoding spectrum adjustment on the under-compressed frame may be represented by convolution of the under-compressed frame in the time domain. The storage medium of the data compression device 200 may store a plurality of coded spectrum adjusters, that is, the code spectrum adjuster group. Each coded spectral conditioner includes a set of coded convolution kernels. That is, the storage medium of the data compression device 200 may include the encoding convolution kernel group, and the encoding convolution kernel group may include at least one convolution kernel. When the data compression device 200 performs convolution on the compressed frame, it may select a convolution kernel from the encoding convolution kernel group as the encoding convolution based on the frame type of the compressed frame corresponding to the initial frame. Kernel, convolution on the pressed frame. When the compressed frame corresponding to the initial frame is an I frame or a P frame, the data compression device 200 convolving the I frame or the P frame includes selecting a convolution kernel from the encoding convolution kernel group as the The encoding convolution kernel is used to perform convolution on the I frame or the P frame. Any one of the convolution kernels in the convolution kernel group can reduce the amplitude of the I frame or the P frame in the frequency domain, and reduce the amplitude in the intermediate frequency region smoothly. The data compression device 200 may also select a convolution kernel with the best compression effect from the encoding convolution kernel group as the encoding convolution kernel according to the encoding quality requirement for the initial frame. When the compressed frame corresponding to the initial frame (that is, the first enhanced frame in this embodiment) is a B frame, the encoding convolution kernel of the compressed frame is the same as the one closest to the compressed frame. The coding convolution kernels corresponding to the reference frames are the same, or the coding convolution kernels in the frame compression are the same as the coding convolution kernels corresponding to the reference frames with the largest attenuation degree among the closest reference frames in the two adjacent directions. , or the coding convolution kernel of the frame compression takes the average value of the coding convolution kernels corresponding to the nearest reference frames in two adjacent directions. When the distance between the B frame and two adjacent reference frames is the same, the coding convolution kernel in the frame compression may take the coding convolution kernel corresponding to any one of the adjacent reference frames in the two directions, for example The current B frame selects the convolution kernel corresponding to the forward adjacent reference frame. In this way, the effect of reducing the amplitude of the compressed frame is better, and the effect of adjusting the encoding spectrum is better, so that the compression ratio of the video data is higher.

图8A示出了根据本说明书的实施例提供的一种编码频谱调节函数H1(f)的曲线图。如图8A所示,横轴为归一化频率f,纵轴为编码频谱调节函数H1(f)的幅值调节增益H1。图8A中的曲线1和曲线2表示不同的编码卷积核对应的不同的编码频谱调节函数H1(f)。以视频数据为例,由于人眼对于低频到中频的数据比对高频的数据更敏感,在对视频数据进行所述编码频谱调节时,要尽可能地保留初始帧中包含的低频到中频信息不丢失,保持中频和低频区域的幅值增益相对平稳,使低频到中频区域的信息尽可能相对稳定和完整,以便在解压时可以更好地恢复低频到中频区域的信息。因此,所述编码频谱调节所使用的编码频谱调节函数H1(f)对所述在压帧在频域内的低频至中频区域的任意频率f上的幅值调节增益H1都可以大于零,在经过所述编码频谱调节函数H1(f)处理后的低频至中频区域的所有频率的幅值也大于零,在低频至中频区域不会有任何频率的数据丢失。因此,在对压缩后的数据进行解压时便可以对低频至中频区域的所有频率范围内的数据进行恢复。否则,若所述编码频谱调节函数H1(f)中低频至中频区域存在零点,则零点对应的频率部分的数据可能丢失,在解压时解码端将无法恢复丢失的数据,因此无法恢复初始数据。如前所述,我们将所述第一增强帧P′0经过所述编码频谱调节函数H1(f)处理后得到的数据定义为P1,因此,所述编码频谱调节帧的数据被定义为P1。由于P′0只是对P0进行小范围内增强,在所述第一预设范围外的区域不进行增强,在所述第一预设范围外的区域P′0与P0一致。因此,P0与P1之间的关系看可以表示为以下公式:FIG. 8A shows a graph of an encoding spectrum adjustment function H 1 (f) provided according to an embodiment of the present specification. As shown in FIG. 8A , the horizontal axis is the normalized frequency f, and the vertical axis is the amplitude adjustment gain H 1 of the encoding spectrum adjustment function H 1 (f). Curve 1 and curve 2 in FIG. 8A represent different encoding spectral adjustment functions H 1 (f) corresponding to different encoding convolution kernels. Taking video data as an example, since the human eye is more sensitive to low-frequency to medium-frequency data than high-frequency data, when performing the encoding spectrum adjustment on video data, the low-frequency to medium-frequency information contained in the initial frame should be preserved as much as possible. Without loss, keep the amplitude gain in the mid-frequency and low-frequency regions relatively stable, and make the information in the low-frequency to mid-frequency region as relatively stable and complete as possible, so that the information in the low-frequency to mid-frequency region can be better recovered during decompression. Therefore, the encoding spectrum adjustment function H 1 (f) used in the encoding spectrum adjustment may be greater than zero for the amplitude adjustment gain H 1 at any frequency f in the low frequency to the intermediate frequency region of the frame compression in the frequency domain, The amplitudes of all frequencies in the low-frequency to medium-frequency region processed by the encoding spectrum adjustment function H 1 (f) are also greater than zero, and no data of any frequency is lost in the low-frequency to medium-frequency region. Therefore, when the compressed data is decompressed, the data in all frequency ranges from the low frequency to the intermediate frequency region can be recovered. Otherwise, if there is a zero point in the low frequency to intermediate frequency region in the encoding spectrum adjustment function H 1 (f), the data of the frequency part corresponding to the zero point may be lost, and the decoding end will not be able to recover the lost data during decompression, so the original data cannot be recovered. . As mentioned above, we define the data obtained after the first enhanced frame P′ 0 is processed by the encoded spectrum adjustment function H 1 (f) as P 1 , therefore, the data of the encoded spectrum adjustment frame is defined as is P 1 . Since P' 0 only enhances P 0 in a small range, the region outside the first preset range is not enhanced, and the region P' 0 outside the first preset range is consistent with P 0 . Therefore, the relationship between P 0 and P 1 can be expressed as the following formula:

P1=H1(f)·P′0≈H1(f)·P0公式(3)P 1 =H 1 (f)·P′ 0 ≈H 1 (f)·P 0 Formula (3)

由于人眼对于高频数据比较不敏感,因此,在对视频数据进行所述编码频谱调节时,可以对高频部分的幅值进行更大程度的衰减,更大程度地降低高频区域的幅值。这样,可以减少所述第一增强帧中包含的数据信息,提高压缩比和编码效率。Since the human eye is relatively insensitive to high-frequency data, when the encoding spectrum adjustment is performed on the video data, the amplitude of the high-frequency part can be attenuated to a greater degree, and the amplitude of the high-frequency region can be reduced to a greater degree. value. In this way, the data information contained in the first enhanced frame can be reduced, and the compression ratio and coding efficiency can be improved.

因此所述编码频谱调节所使用的所述编码频谱调节函数H1(f)可以在频域内平稳地降低所述在压帧的幅值。在一些实施例中,所述编码频谱调节所使用的所述编码频谱调节函数H1(f)可以平稳降低所述在压帧在其频域内的高频区域的幅值。所述幅值的平稳降低可以是所述幅值以所述高频区域的第一幅值调节增益值衰减,也可以是所述幅值在所述第一幅值调节增益值附近的一定误差范围内进行衰减。比如,所述第一幅值调节增益可以是0至1之间的任意数值。比如,所述第一幅值调节增益可以在0、0.04、0.08、0.12、0.16、0.20、0.24、0.28、0.32、0.36、0.40、0.44、0.48、0.52、0.56、0.60、0.64、0.68、0.72、0.76、0.80、0.84、0.88、0.92、0.96和1等数值中任意两个所规定的区间内。所述误差范围可以在0、±1%、±2%、±3%、±4%、±5%、±6%、±7%、±8%、±9%、±10%、±11%、±12%、±13%、±14%、±15%、±16%、±17%、±18%、±19%、±20%、±21%、±22%、±23%、±24%、±25%、±26%、±27%、±28%、±29%、±30%等数值中任意两个所规定的区间内。如图8A所示,所述编码频谱调节在高频区域(大概是0.4~0.5的区间)的第一幅值调节增益在0.2左右。Therefore, the encoding spectrum adjustment function H 1 (f) used for the encoding spectrum adjustment can smoothly reduce the amplitude of the frame under compression in the frequency domain. In some embodiments, the encoding spectrum adjustment function H 1 (f) used by the encoding spectrum adjustment can smoothly reduce the amplitude of the high frequency region of the frame in its frequency domain. The steady decrease of the amplitude value may be that the amplitude value is attenuated by the first amplitude value adjustment gain value in the high frequency region, or it may be a certain error of the amplitude value near the first amplitude value adjustment gain value. attenuation within the range. For example, the first amplitude adjustment gain may be any value between 0 and 1. For example, the first amplitude adjustment gain may be 0, 0.04, 0.08, 0.12, 0.16, 0.20, 0.24, 0.28, 0.32, 0.36, 0.40, 0.44, 0.48, 0.52, 0.56, 0.60, 0.64, 0.68, 0.72, Within the interval specified by any two of the values 0.76, 0.80, 0.84, 0.88, 0.92, 0.96 and 1. The error range can be 0, ±1%, ±2%, ±3%, ±4%, ±5%, ±6%, ±7%, ±8%, ±9%, ±10%, ±11 %, ±12%, ±13%, ±14%, ±15%, ±16%, ±17%, ±18%, ±19%, ±20%, ±21%, ±22%, ±23%, Within the interval specified by any two values of ±24%, ±25%, ±26%, ±27%, ±28%, ±29%, ±30%, etc. As shown in FIG. 8A , the first amplitude adjustment gain of the encoding spectrum adjustment in the high frequency region (approximately the interval of 0.4 to 0.5) is about 0.2.

在一些实施例中,所述编码频谱调节所使用的所述编码频谱调节函数H1(f)可以在频域内平稳地降低所述在压帧的中频区域的幅值。其中,所述编码频谱调节对所述在压帧的所述中频区域的幅值调节增益为第二幅值调节增益。在一些实施例中,所述第二幅值调节增益的值可以大于所述第一幅值调节增益,如图8A所示。当所述编码频谱调节为频率衰减的时候(也就是说所述编码频谱调节器为所述频率衰减器时),第一幅值调节增益和第二幅值调节增益均小于1。也就是说,所述编码频谱调节对所述在压帧的所述中频区域的幅值降低幅度可以低于所述高频区域的幅值降低幅度。In some embodiments, the encoding spectrum adjustment function H 1 (f) used in the encoding spectrum adjustment can smoothly reduce the amplitude in the intermediate frequency region of the frame in the frequency domain. Wherein, the amplitude adjustment gain of the encoding spectrum adjustment to the intermediate frequency region in the frame compression is the second amplitude adjustment gain. In some embodiments, the value of the second amplitude adjustment gain may be greater than the first amplitude adjustment gain, as shown in FIG. 8A . When the coded spectrum is adjusted to be frequency attenuated (that is, when the coded spectrum adjuster is the frequency attenuator), both the first amplitude adjustment gain and the second amplitude adjustment gain are less than 1. That is to say, the magnitude of the reduction of the amplitude of the intermediate frequency region of the compressed frame by the encoding spectrum adjustment may be lower than the magnitude of the reduction of the amplitude of the high frequency region.

此外,所述编码频谱调节函数H1(f)还可以在频域内平稳地降低所述在压帧的低频区域的幅值。其中,所述编码频谱调节对所述在压帧的所述低频区域的幅值调节增益为第三幅值调节增益。当所述编码频谱调节为频率衰减的时候(也就是说所述编码频谱调节器为所述频率衰减器时),第三幅值调节增益和第二幅值调节增益均小于1。所述第三幅值调节增益的值可以大于或等于所述第二幅值调节增益。也就是说,所述编码频谱调节对所述在压帧的所述低频区域的幅值降低幅度可以低于或等于所述中频区域的幅值降低幅度。In addition, the encoding spectrum adjustment function H 1 (f) can also smoothly reduce the amplitude in the low frequency region of the frame in the frequency domain. Wherein, the amplitude adjustment gain of the encoding spectrum adjustment to the low frequency region of the frame compression is a third amplitude adjustment gain. When the coded spectrum is adjusted to be frequency attenuated (that is, when the coded spectrum adjuster is the frequency attenuator), both the third amplitude adjustment gain and the second amplitude adjustment gain are less than 1. The value of the third amplitude adjustment gain may be greater than or equal to the second amplitude adjustment gain. That is to say, the magnitude of reduction of the amplitude of the low-frequency region in the compressed frame by the encoding spectrum adjustment may be lower than or equal to the magnitude of the reduction of the amplitude of the intermediate-frequency region.

进一步地,为了节省实现过程中需要的计算量和避免振铃效应的出现,所述编码频谱调节函数H1(f)应使所述第一增强帧P′0在频域内的幅值平滑地过渡。如前所述,当对一幅图像进行频谱调节处理时,若选用的频谱调节函数存在数值上剧烈变化的区域,在实现过程中需要阶数更高的卷积核或卷积核组合。这就意味着增加不必要的运算量。同时,高阶卷积核更有可能会使输出图像在灰度或者颜色剧烈变化处产生较强烈的颜色震荡,称作振铃效应。振铃效应多出现在图像边界处。通过使所述编码频谱调节函数H1(f)在频域内对所述第一增强帧P′0的幅值调节增益应平滑地过渡可以避免所述幅值调节增益的急剧变化。比如,当所述高频区域同所述中频区域不相连的时候,所述编码频谱调节函数H1(f)可以在频域对所述在压帧的中高频区域的幅值做出调节,使得所述幅值调节增益在中高频区域内的变化平滑而连续。当所述中频区域同所述低频区域不相连的时候,所述编码频谱调节函数H1(f)可以在频域对所述在压帧的中低频区域的幅值做出调节,使得所述幅值调节增益在中低频区域内的变化连续。Further, in order to save the amount of calculation required in the implementation process and avoid the occurrence of ringing effects, the encoding spectrum adjustment function H 1 (f) should make the amplitude of the first enhanced frame P′ 0 in the frequency domain smoothly. transition. As mentioned above, when performing spectrum adjustment processing on an image, if the selected spectrum adjustment function has a region with dramatic changes in value, a convolution kernel or a combination of convolution kernels with a higher order is required in the implementation process. This means adding unnecessary computation. At the same time, high-order convolution kernels are more likely to produce strong color oscillations in the output image where the grayscale or color changes sharply, which is called the ringing effect. The ringing effect mostly occurs at the image boundary. The sharp change of the amplitude adjustment gain can be avoided by making the coded spectral adjustment function H 1 (f) smoothly transition the amplitude adjustment gain of the first enhancement frame P′ 0 in the frequency domain. For example, when the high frequency region is not connected to the intermediate frequency region, the encoding spectrum adjustment function H 1 (f) can adjust the amplitude of the middle and high frequency region in the frame in the frequency domain, The variation of the amplitude adjustment gain in the middle and high frequency region is made smooth and continuous. When the intermediate frequency region is not connected to the low frequency region, the encoding spectrum adjustment function H 1 (f) can adjust the amplitude of the middle and low frequency regions in the frame in the frequency domain, so that the The amplitude adjustment gain changes continuously in the mid-low frequency region.

所述编码频谱调节函数H1(f)还可以保持直流部分,即在频率为0的部分的幅值调节增益为1,以保证可以保留第一增强帧P′0中的基础信息,在进行数据解压时可以得到平均值信息,以恢复原初始数据。因此,所述编码频谱调节所使用的所述编码频谱调节函数H1(f)对所述低频区域的幅值降低幅度低于所述中频区域的幅值降低幅度。但当直流部分(即频率为0的部分)的幅值增益不为1时,通过设计合适的解码频谱调节函数H2(f),也可以恢复初始数据。具体地关于H1(f)和H2(f)的具体关系将在后面的描述中详细介绍。The coding spectrum adjustment function H 1 (f) can also maintain the DC part, that is, the amplitude adjustment gain in the part where the frequency is 0 is 1, so as to ensure that the basic information in the first enhanced frame P′ 0 can be preserved. When the data is decompressed, the average information can be obtained to restore the original original data. Therefore, the amplitude reduction range of the coding spectrum adjustment function H 1 (f) used in the coding spectrum adjustment for the low frequency region is lower than that of the intermediate frequency region. However, when the amplitude gain of the DC part (ie, the part with a frequency of 0) is not 1, the original data can also be recovered by designing an appropriate decoding spectrum adjustment function H 2 (f). Specifically, the specific relationship between H 1 (f) and H 2 (f) will be introduced in detail in the following description.

如图8A所示的编码频谱调节函数H1(f)的曲线图中,(0,0.1]之间的频率属于低频;(0.1,0.15]之间的频率属于中低频;(0.15,0.33]之间的频率属于中频;(0.33,0.4]之间的频率属于中高频;(0.4,0.5]之间的频率属于高频。所述低频区域的第三幅值调节增益大于所述中频区域的第二幅值调节增益;所述中频区域的第二幅值调节增益大于所述高频区域的第一幅值调节增益。同时,所述中频区域的第二幅值调节增益相对平稳,曲线1在0.5左右,曲线2在0.6左右;所述高频区域的第一幅值调节增益H1也相对平稳,曲线1略低于0.2,曲线2略高于0.2。所述编码频谱调节函数H1(f)的曲线是平滑过渡的曲线。在工程实现上,在实现幅值降低的基础上可以允许所述编码频谱调节函数H1(f)的曲线存在小范围的波动,所述波动不影响压缩的效果。对于视频数据之外其他形式的数据来说,可以根据接收者对于数据的敏感程度,设置所述编码频谱调节函数H1(f)的参数。不同形式的数据,接收者对于频率的敏感程度不同。In the graph of the encoding spectrum adjustment function H 1 (f) shown in FIG. 8A , the frequencies between (0, 0.1] belong to the low frequency; the frequencies between (0.1, 0.15] belong to the middle and low frequencies; (0.15, 0.33] The frequency between (0.33, 0.4] belongs to the middle and high frequency; the frequency between (0.4, 0.5] belongs to the high frequency. The third amplitude adjustment gain in the low frequency region is greater than that in the intermediate frequency region. The second amplitude adjustment gain; the second amplitude adjustment gain in the intermediate frequency region is greater than the first amplitude adjustment gain in the high frequency region. At the same time, the second amplitude adjustment gain in the intermediate frequency region is relatively stable, curve 1 At around 0.5, curve 2 is around 0.6; the first amplitude adjustment gain H1 in the high frequency region is also relatively stable, curve 1 is slightly lower than 0.2, and curve 2 is slightly higher than 0.2. The encoding spectrum adjustment function H1 The curve of (f) is a curve of smooth transition.In engineering implementation, on the basis of reducing the amplitude, it is possible to allow the curve of the encoding spectrum adjustment function H 1 (f) to have a small range of fluctuations, and the fluctuation does not affect The effect of compression.For other forms of data other than video data, the parameters of the encoding spectrum adjustment function H 1 (f) can be set according to the sensitivity of the receiver to the data. For different forms of data, the receiver is sensitive to the frequency sensitivities vary.

图8B示了根据本说明书的实施例提供的一种编码频谱调节函数H1(f)的曲线图。图8B中的曲线3和曲线4表示不同的编码卷积核对应的不同的编码频谱调节函数H1(f)。就视频数据而言,在一些特殊的应用场景中,适当的保留更多的高频分量是需要的,比如侦察场景。因此,在一些实施例中,编码频谱调节函数H1(f)曲线中可以使得第一幅值调节增益大于第二幅值调节增益(曲线3),或者等于第二幅值调节增益(曲线4)。FIG. 8B shows a graph of an encoding spectrum adjustment function H 1 (f) provided according to an embodiment of the present specification. Curve 3 and curve 4 in FIG. 8B represent different encoding spectral adjustment functions H 1 (f) corresponding to different encoding convolution kernels. As far as video data is concerned, in some special application scenarios, it is necessary to properly retain more high-frequency components, such as reconnaissance scenes. Therefore, in some embodiments, the encoding spectrum adjustment function H 1 (f) curve can make the first amplitude adjustment gain greater than the second amplitude adjustment gain (curve 3), or equal to the second amplitude adjustment gain (curve 4 ).

就视频数据而言,在一些对图像质量要求不高的应用场景中,高频分量可以完全滤除,因此,所述编码频谱调节所使用的编码频谱调节函数H1(f)对所述在压帧在频域内的低频至中频区域上的任意频率的幅值调节增益H1都大于零,而对高频区域的幅值调节增益H1可以等于0(图8A和图8B中未示出)。As far as video data is concerned, in some application scenarios that do not require high image quality, high-frequency components can be completely filtered out. Therefore, the encoding spectrum adjustment function H 1 (f) used in the encoding spectrum adjustment The amplitude adjustment gain H1 of any frequency from the low frequency to the intermediate frequency region of the frame in the frequency domain is greater than zero, and the amplitude adjustment gain H1 for the high frequency region can be equal to 0 (not shown in FIG. 8A and FIG. 8B ). ).

需要说明的是,图8A和图8B所示的曲线,只是以视频数据为例进行说明,本领域的技术人员应该明白所述编码频谱调节函数H1(f)的曲线并不局限于图8A和图8B所示的形式,所有能够使所述第一增强帧在频域内的中频区域的幅值平稳地降低的编码频谱调节函数H1(f)以及编码频谱调节函数线性组合

Figure BDA0002884076930000381
或者编码频谱调节函数乘积组合
Figure BDA0002884076930000382
或者线性组合和乘积组合的组合都属于本说明书保护的范围。其中,i≥1,
Figure BDA0002884076930000383
代表n个函数的线性组合,H1i(f)代表第i个函数,ki代表第i个函数对应的权重。j≥1,
Figure BDA0002884076930000384
Figure BDA0002884076930000385
代表n个函数的乘积组合,kj代表第j个函数对应的权重,H1j(f)可以是任意函数。It should be noted that the curves shown in FIG. 8A and FIG. 8B are only illustrated by taking video data as an example, and those skilled in the art should understand that the curve of the encoding spectrum adjustment function H 1 (f) is not limited to FIG. 8A and the form shown in FIG. 8B , all the coding spectrum adjustment functions H 1 (f) and the linear combination of the coding spectrum adjustment functions that can make the amplitude of the intermediate frequency region of the first enhanced frame in the frequency domain smoothly decrease
Figure BDA0002884076930000381
Or code spectrum adjustment function product combination
Figure BDA0002884076930000382
Or the combination of linear combination and product combination all belong to the protection scope of this specification. Among them, i≥1,
Figure BDA0002884076930000383
Represents the linear combination of n functions, H 1i (f) represents the ith function, and ki represents the weight corresponding to the ith function. j≥1,
Figure BDA0002884076930000384
Figure BDA0002884076930000385
Represents the product combination of n functions, k j represents the weight corresponding to the jth function, and H 1j (f) can be any function.

表3示出了根据本说明书的实施例提供的一种编码卷积核的参数表。表3示例性地列举出一个编码卷积核的参数,其中,表3中每一行代表一个编码卷积核。对于8比特视频图像来说,需要保证编码卷积后得到的所述编码频谱调节帧中像素点的灰度值在0~255以内,因此,在本实施例中,需要将卷积后的结果除以256。所述编码卷积核是基于所述编码频谱调节函数H1(f)通过傅里叶变换得到的。表3中只是示例性的举例说明,本领域技术人员应该知道所述编码卷积核不止局限于表3所示的参数,所有能够使所述在压帧在频域内的中频区域的幅值平稳地降低的编码卷积核都属于本说明书保护的范围。Table 3 shows a parameter table of a coding convolution kernel provided according to an embodiment of the present specification. Table 3 exemplarily lists the parameters of an encoding convolution kernel, wherein each row in Table 3 represents an encoding convolution kernel. For an 8-bit video image, it is necessary to ensure that the gray value of the pixel points in the encoded spectrum adjustment frame obtained after encoding convolution is within 0 to 255. Therefore, in this embodiment, the convolution result needs to be Divide by 256. The encoding convolution kernel is obtained by Fourier transform based on the encoding spectral adjustment function H 1 (f). Table 3 is only an exemplary illustration. Those skilled in the art should know that the coding convolution kernel is not limited to the parameters shown in Table 3, all the parameters that can make the amplitude of the intermediate frequency region of the frame in the frequency domain stabilize The coding convolution kernels with low level reduction all belong to the protection scope of this specification.

Figure BDA0002884076930000391
Figure BDA0002884076930000391

需要说明的是,为了避免振铃效应,所述编码频谱调节函数H1(f)是平滑过渡的曲线,避免曲线中的所述幅值调节增益急剧变化。如前所述,所述振铃效应是指在图像处理中,对一幅图像进行频谱调节处理时,若选用的频谱调节函数具有较快的变化,则会使图像产生“振铃”。所谓“振铃”就是指输出图像的灰度剧烈变化处产生的震荡,就好像钟被敲击后产生的空气震荡。振铃效应多出现在图像边界处。It should be noted that, in order to avoid the ringing effect, the encoding spectrum adjustment function H 1 (f) is a smooth transition curve, so as to avoid the sharp change of the amplitude adjustment gain in the curve. As mentioned above, the ringing effect refers to that in image processing, when a spectrum adjustment process is performed on an image, if the selected spectrum adjustment function has a rapid change, the image will cause "ringing". The so-called "ringing" refers to the vibration generated by the sharp change of the grayscale of the output image, just like the air vibration generated by a clock being struck. The ringing effect mostly occurs at the image boundary.

与所述编码频谱调节函数H1(f)对应的编码卷积核中负系数的和的绝对值与非负系数的和的比值应小于0.1。比如在一些实施例中,所述编码卷积核中的卷积核系数可以均为非负数。以视频数据为例,当所述编码卷积核中有较多负系数出现时,在图像边界处的像素值相差很大,一个大的像素值乘以一个负系数,会使得卷积的最终结果变小,反映在图像上则是像素较暗。如果卷积结果出现负数,并且负数的绝对值较大时,在使用无符号整数计算计算卷积结果时,可能造成无符号整数计算结果反转,取值为负数的无符号补码值,则会导致出卷积结果变大,反映在图像上则是像素较亮。因此,在设计所述编码卷积核时,可以使所述编码卷积核的系数可以均为非负数,或者使所述编码卷积核中的负系数的和的绝对值与非负系数的和的比值应小于0.1,即允许所述编码卷积核中出现少量绝对值较小的负系数。The ratio of the absolute value of the sum of the negative coefficients to the sum of the non-negative coefficients in the coding convolution kernel corresponding to the coding spectrum adjustment function H 1 (f) should be less than 0.1. For example, in some embodiments, the coefficients of the convolution kernel in the encoding convolution kernel may all be non-negative numbers. Taking video data as an example, when there are many negative coefficients in the encoding convolution kernel, the pixel values at the image boundaries are very different. A large pixel value multiplied by a negative coefficient will make the final convolution result. The result is smaller, which is reflected in the image as darker pixels. If the convolution result has a negative number and the absolute value of the negative number is large, when the unsigned integer calculation is used to calculate the convolution result, the unsigned integer calculation result may be reversed, and the value is the unsigned complement value of the negative number, then It will cause the convolution result to become larger, which is reflected in the image as brighter pixels. Therefore, when designing the encoding convolution kernel, the coefficients of the encoding convolution kernel may be all non-negative numbers, or the absolute value of the sum of the negative coefficients in the encoding convolution kernel may be the same as the sum of the non-negative coefficients. The ratio of the sum should be less than 0.1, that is, a small number of negative coefficients with small absolute values are allowed to appear in the encoding convolution kernel.

数据压缩设备200在使用所述编码卷积核对所述在压帧做卷积时,可以在垂直方向、水平方向和斜向中的至少一个方向上对所述在压帧(初始帧)做卷积。When the data compression device 200 uses the encoding convolution check to perform convolution on the pressed frame, the data compression device 200 may perform the convolution on the pressed frame (initial frame) in at least one of a vertical direction, a horizontal direction, and an oblique direction. product.

需要指出的是在进行所述在压帧做卷积时,其处理的数据处理单元可以是一帧数据,也可以是一帧数据的一部分。以视频数据为例,该单元可以是一帧或者一场图像,或者一帧/场图像的一部分,例如在视频编码中把图像进一步分割为条带(slice),片(tile),编码单元(coding unit,CU),宏块(macroblock),或者块(block)。卷积对象包括但不限于上述名词所描述的一部分图像分割单元。在不同的处理单元,可以选择相同的编码卷积核,也可以选择不同的编码卷积核。It should be pointed out that when performing the above-mentioned convolution in frame compression, the data processing unit processed may be a frame of data, or may be a part of a frame of data. Taking video data as an example, the unit can be a frame or field image, or a part of a frame/field image. For example, in video coding, the image is further divided into slices, tiles, and coding units ( coding unit, CU), macroblock, or block. The convolution object includes but is not limited to a part of the image segmentation unit described by the above terms. In different processing units, the same encoding convolution kernel can be selected, or different encoding convolution kernels can be selected.

步骤SA244还可以包括:Step SA244 may also include:

SA244-6:对所述编码频谱调节帧进行所述编码(预测和求残差),得到所述预测数据PI和所述残差数据R。SA244-6: Perform the encoding (prediction and residual error calculation) on the encoded spectrum adjustment frame to obtain the predicted data PI and the residual data R.

SA244-8:将所述预测数据PI和所述残差数据R输入所述码流生成模块进行合成,得到所述压缩帧。SA244-8: Input the prediction data PI and the residual data R into the code stream generation module for synthesis to obtain the compressed frame.

在数据压缩设备200对所述第一增强帧进行所述编码频谱调节后,得到所述编码频谱调节帧,所述编码频谱调节帧中的低频到高频的频率分量小于所述第一增强帧中的低频到高频的频率分量。因此,数据压缩设备200通过对所述在压帧(第一增强帧)进行所述编码频谱调节后进行编码和码流生成计算,可以提高所述编码频谱调节帧的编码效率,从而提高所述初始帧的压缩比,提升所述初始数据的传输效率;同时所述边界增强又可以避免细节丢失。After the data compression device 200 performs the encoding spectrum adjustment on the first enhanced frame, the encoded spectrum adjustment frame is obtained, and the frequency components from low frequency to high frequency in the encoded spectrum adjustment frame are smaller than the first enhanced frame low to high frequency components in the middle. Therefore, the data compression device 200 can improve the encoding efficiency of the encoded spectrum adjustment frame by performing encoding and code stream generation calculation on the compressed frame (first enhanced frame) after performing the encoding spectrum adjustment, thereby improving the The compression ratio of the initial frame improves the transmission efficiency of the initial data; at the same time, the boundary enhancement can avoid loss of details.

图4B所示的数据处理的方法PB200与图3B所示的流程图相对应。如图4B所示的所述方法PB200可以包括:The data processing method PB200 shown in FIG. 4B corresponds to the flowchart shown in FIG. 3B . The method PB200 shown in FIG. 4B may include:

SB220:选择初始数据中的初始帧。与步骤SA220一致,在此不再赘述。SB220: Select the initial frame in the initial data. It is the same as step SA220, and will not be repeated here.

SB240:对所述初始帧进行所述数据压缩,得到压缩帧。步骤SB240可以包括:SB240: Perform the data compression on the initial frame to obtain a compressed frame. Step SB240 may include:

SB242:对所述初始帧P0进行所述边界调节,获取第一增强帧P′0。与步骤SA242一致,在此不再赘述。SB242: Perform the boundary adjustment on the initial frame P 0 to obtain the first enhanced frame P′ 0 . It is the same as step SA242, and will not be repeated here.

SB244:对所述第一增强帧P′0进行所述编码频谱调节和所述编码。步骤SB244可以包括:SB244: Perform the encoding spectrum adjustment and the encoding on the first enhanced frame P' 0 . Step SB244 may include:

SB244-2:确定所述初始帧的帧类型。与步骤SA244-2一致,在此不再赘述。SB244-2: Determine the frame type of the initial frame. It is the same as step SA244-2, and will not be repeated here.

SB244-4:对所述第一增强帧P′0先进行预测得到预测帧和预测数据PI。SB244-4: Predict the first enhanced frame P′ 0 to obtain a predicted frame and predicted data PI.

SB244-6:基于所述初始帧的帧类型,从编码卷积核组中选择一个卷积核作为所述编码卷积核,对所述在压帧做卷积,得到编码频谱调节帧。其中,所述在压帧包括所述第一增强帧P′0和所述预测帧。步骤SB244-6可以等效为使用所述编码频谱调节函数H1(f)对所述第一增强帧P′0和所述预测帧进行所述编码频谱调节。所述编码频谱调节帧包括对所述第一增强帧P′0进行所述编码频谱调节后的第一编码频谱调节帧和对所述预测帧进行所述编码频谱调节后的第二编码频谱调节帧。SB244-6: Based on the frame type of the initial frame, select a convolution kernel from the encoding convolution kernel group as the encoding convolution kernel, and perform convolution on the under-compression frame to obtain an encoded spectrum adjustment frame. Wherein, the under-compressed frame includes the first enhanced frame P′ 0 and the predicted frame. Step SB244-6 may be equivalent to performing the encoding spectrum adjustment on the first enhanced frame P' 0 and the prediction frame using the encoding spectrum adjustment function H 1 (f). The encoded spectrum adjustment frame includes a first encoded spectrum adjustment frame obtained by performing the encoding spectrum adjustment on the first enhanced frame P′ 0 and a second encoded spectrum adjustment frame obtained by performing the encoding spectrum adjustment on the predicted frame. frame.

SB244-8:对所述第一编码频谱调节帧和所述第二编码频谱调节帧求残差,得到所述残差数据R。SB244-8: Obtain a residual difference between the first coded spectrum adjustment frame and the second coded spectrum adjustment frame to obtain the residual data R.

SB244-9:将所述预测数据PI和所述残差数据R输入所述码流生成模块进行合成,得到所述压缩帧。SB244-9: Input the prediction data PI and the residual data R into the code stream generation module for synthesis to obtain the compressed frame.

图4C所示的数据处理的方法PC200与图3C所示的流程图相对应。如图4C所示的所述方法PC200可以包括:The data processing method PC200 shown in FIG. 4C corresponds to the flowchart shown in FIG. 3C . The method PC200 shown in FIG. 4C may include:

SC220:选择初始数据中的初始帧。与步骤SA220一致,在此不再赘述。SC220: Select the initial frame in the initial data. It is the same as step SA220, and will not be repeated here.

SC240:对所述初始帧进行所述数据压缩,得到压缩帧。步骤SC240可以包括:SC240: Perform the data compression on the initial frame to obtain a compressed frame. Step SC240 may include:

SC242:对所述初始帧P0进行所述边界调节,获取第一增强帧P′0。与步骤SA242一致,在此不再赘述。SC242: Perform the boundary adjustment on the initial frame P 0 to obtain the first enhanced frame P′ 0 . It is the same as step SA242, and will not be repeated here.

SC244:对所述第一增强帧P′0进行所述编码频谱调节和所述编码。步骤SC244可以包括:SC244: Perform the encoding spectrum adjustment and the encoding on the first enhanced frame P' 0 . Step SC244 may include:

SC244-2:确定所述初始帧的帧类型。与步骤SA244-2一致,在此不再赘述。SC244-2: Determine the frame type of the initial frame. It is the same as step SA244-2, and will not be repeated here.

SC244-4:对所述第一增强帧P′0先进行所述编码,即预测和求残差,得到预测数据PI和残差数据R1SC244-4: First perform the encoding on the first enhanced frame P′ 0 , that is, predict and calculate the residual to obtain the predicted data PI and the residual data R 1 .

SC244-6:基于所述初始帧的帧类型,从编码卷积核组中选择一个卷积核作为所述编码卷积核,对所述在压帧做卷积,得到所述残差数据R。其中,所述在压帧包括所述残差数据R1。步骤SC244-6可以等效为使用所述编码频谱调节函数H1(f)对所述残差数据R1进行所述编码频谱调节。SC244-6: Based on the frame type of the initial frame, select a convolution kernel from the encoding convolution kernel group as the encoding convolution kernel, perform convolution on the compressed frame, and obtain the residual data R . Wherein, the in-pressing frame includes the residual data R 1 . Step SC244-6 may be equivalent to performing the encoding spectrum adjustment on the residual data R 1 by using the encoding spectrum adjustment function H 1 (f).

SC244-8:将所述预测数据PI和所述残差数据R输入所述码流生成模块进行合成,得到所述压缩帧。SC244-8: Input the prediction data PI and the residual data R into the code stream generation module for synthesis to obtain the compressed frame.

图4D所示的数据处理的方法PD200与图3D所示的流程图相对应。如图4D所示的所述方法PD200可以包括:The data processing method PD200 shown in FIG. 4D corresponds to the flowchart shown in FIG. 3D . The method PD200 shown in FIG. 4D may include:

SD220:选择初始数据中的初始帧。与步骤SA220一致,在此不再赘述。SD220: Select the initial frame in the initial data. It is the same as step SA220, and will not be repeated here.

SD240:对所述初始帧进行所述数据压缩,得到压缩帧。其中,步骤SD240可以是先对所述初始帧进行所述编码频谱调节,再进行所述边界调节。具体地,步骤SD240可以包括:SD240: Perform the data compression on the initial frame to obtain a compressed frame. Wherein, step SD240 may be to perform the encoding spectrum adjustment on the initial frame first, and then perform the boundary adjustment. Specifically, step SD240 may include:

SD242:对所述初始帧进行所述编码频谱调节,获取编码频谱调节帧。SD242: Perform the encoding spectrum adjustment on the initial frame to obtain an encoded spectrum adjustment frame.

为了方便描述,我们将步骤SD242中的得到的所述编码频谱调节帧中的数据定义为P01。具体地,步骤SD242可以包括:For the convenience of description, we define the data in the encoded spectrum adjustment frame obtained in step SD242 as P 01 . Specifically, step SD242 may include:

SD242-2:确定所述初始帧的帧类型。与步骤SA244-2一致,在此不再赘述。SD242-2: Determine the frame type of the initial frame. It is the same as step SA244-2, and will not be repeated here.

SD242-4:基于所述初始帧的帧类型,从编码卷积核组中选择一个卷积核作为所述编码卷积核,对所述在压帧做卷积,得到所述编码频谱调节帧P01。其中,所述在压帧包括所述初始帧P0。步骤SD242-4可以等效为使用所述编码频谱调节函数H1(f)对所述初始帧P0进行所述编码频谱调节。SD242-4: Based on the frame type of the initial frame, select a convolution kernel from the encoding convolution kernel group as the encoding convolution kernel, perform convolution on the pressing frame, and obtain the encoded spectrum adjustment frame P 01 . Wherein, the under-pressing frame includes the initial frame P 0 . Step SD242-4 may be equivalent to performing the encoding spectrum adjustment on the initial frame P 0 by using the encoding spectrum adjustment function H 1 (f).

SD244:对所述编码频谱调节帧P01进行所述边界调节,得到第二增强帧。SD244: Perform the boundary adjustment on the encoded spectrum adjustment frame P 01 to obtain a second enhanced frame.

为了方便描述,我们将步骤SD244中的得到的所述第二增强帧中的数据定义为P′1。图9示出了根据本说明书的实施例提供的一种获取第二增强帧P′1的流程图。如图9和图4D所示,步骤SD244可以包括:For the convenience of description, we define the data in the second enhanced frame obtained in step SD244 as P' 1 . Fig. 9 shows a flow chart of acquiring the second enhanced frame P' 1 according to an embodiment of the present specification. As shown in Figure 9 and Figure 4D, step SD244 may include:

SD244-2:对所述初始帧P0和所述编码频谱调节帧P01求差,得到第一边界PE1SD244-2: Calculate the difference between the initial frame P 0 and the coded spectrum adjustment frame P 01 to obtain a first boundary P E1 .

如前所述,所述编码频谱调节可以使所述初始帧P0在频域内的幅值平稳地降低,从而使所述初始帧P0的边界信息模糊,得到编码频谱调节帧P01,以减少所述初始帧P0中的信息量,从而降低所述初始帧P0压缩后占用的空间资源。因此,编码频谱调节帧P01可以理解成衰减了初始帧P0中的边界信息的数据。接下来,对所述初始帧P0和所述编码频谱调节帧P01求差,可以得到初始帧P0的边界衰减值,即第一边界PE1。所述第一边界PE1包括所述初始帧P0的边界信息。As mentioned above, the coded spectrum adjustment can make the amplitude of the initial frame P 0 in the frequency domain decrease smoothly, so that the boundary information of the initial frame P 0 is blurred, and the coded spectrum adjustment frame P 01 is obtained to The amount of information in the initial frame P 0 is reduced, thereby reducing the space resources occupied by the initial frame P 0 after being compressed. Therefore, the encoded spectrum adjustment frame P 01 can be understood as data with attenuated boundary information in the initial frame P 0 . Next, the difference between the initial frame P 0 and the coded spectrum adjustment frame P 01 can be calculated to obtain the boundary attenuation value of the initial frame P 0 , that is, the first boundary P E1 . The first boundary PE1 includes boundary information of the initial frame P0 .

在一些实施例中,步骤SD244还可以包括:In some embodiments, step SD244 may further include:

SD244-4:通过第一系数a对所述第一边界PE1进行增强。此步骤与步骤SA242-6基本一致,在此不再赘述。 SD244-4 : The first boundary PE1 is enhanced by the first coefficient a. This step is basically the same as step SA242-6, and will not be repeated here.

SD244-6:通过所述第一伽马算法,对所述第一边界PE1中边界值处于所述第一预设范围内[-R1,R1]的边界进行调节,得到所述增强边界PE。此步骤与步骤SA242-8基本一致,在此不再赘述。 SD244-6 : Through the first gamma algorithm, adjust the boundary of the first boundary PE1 whose boundary value is within the first preset range [-R1, R1] to obtain the enhanced boundary P E. This step is basically the same as step SA242-8, and will not be repeated here.

SD244-8:将所述增强边界PE与所述第一边界PE1求差,得到调节值。 SD244-8 : Calculate the difference between the enhancement boundary PE and the first boundary PE1 to obtain an adjustment value.

为了方便描述,我们将所述调节值中的数据定义为Ed。调节值Ed中包含有对第一边界PE1进行调节时的调节值。For the convenience of description, we define the data in the adjustment value as E d . The adjustment value Ed includes the adjustment value when the first boundary PE1 is adjusted.

在一些实施例中,步骤SD244-6和步骤SD244-8可以合并。数据压缩设备200中可以存储有表4。表4中存储有所述第一边界PE1的输入边界值与调节值Ed的对应关系。以R1=6例,表4可以表示为:In some embodiments, step SD244-6 and step SD244-8 may be combined. Table 4 may be stored in the data compression device 200 . Table 4 stores the correspondence between the input boundary value of the first boundary PE1 and the adjustment value Ed . Taking R1=6 as an example, Table 4 can be expressed as:

Figure BDA0002884076930000441
Figure BDA0002884076930000441

数据压缩设备200可以直接根据表4获取所述调节值EdThe data compression device 200 can directly obtain the adjustment value Ed according to Table 4.

SD244-9:将所述编码频谱调节帧P01与所述调节值Ed进行叠加,得到所述第二增强帧P′1 SD244-9 : Superimpose the coded spectrum adjustment frame P 01 and the adjustment value Ed to obtain the second enhanced frame P′ 1 .

如前所述,所述编码频谱调节可以使所述编码频谱调节帧P01的边界模糊。所述编码频谱调节帧P01中的相邻像素间的差值变小。为了避免细节丢失,将所述编码频谱调节帧P01和所述调节值Ed进行叠加,使编码频谱调节帧P01中那些相邻像素间差值较小的边界得到增强,从而减少数据在编码过程中丢失,避免细节损失。As previously described, the encoding spectrum adjustment may blur the boundary of the encoding spectrum adjustment frame P 01 . The difference between adjacent pixels in the encoded spectrum adjustment frame P 01 becomes smaller. In order to avoid the loss of details, the coded spectrum adjustment frame P 01 and the adjustment value Ed are superimposed, so that the boundaries with small differences between adjacent pixels in the coded spectrum adjustment frame P 01 are enhanced, thereby reducing the data in the Lost during encoding to avoid loss of details.

步骤SD240还可以包括:Step SD240 may also include:

SD246:对所述第二增强帧P′1进行预测和求残差。 SD246 : Perform prediction and residual error calculation on the second enhanced frame P'1.

对所述第二增强帧P′1进行所述编码(预测和求残差),得到所述预测数据PI和所述残差数据R,并将所述预测数据PI和所述残差数据R输入所述码流生成模块进行合成,得到所述压缩帧。Perform the encoding (prediction and residual) on the second enhanced frame P' 1 to obtain the predicted data PI and the residual data R, and combine the predicted data PI and the residual data R Input the code stream generation module for synthesis to obtain the compressed frame.

综上所述,数据处理的方法P200可以同时对所述初始帧进行所述边界调节和所述编码频谱调节,在提升所述初始帧的压缩比,提高编码效率和所述初始数据的传输效率的同时,又可以减少数据损失,避免细节丢失。To sum up, the data processing method P200 can perform the boundary adjustment and the encoding spectrum adjustment on the initial frame at the same time, so as to improve the compression ratio of the initial frame, improve the encoding efficiency and the transmission efficiency of the initial data At the same time, it can reduce data loss and avoid loss of details.

图10示出了一种对压缩帧进行解压的数据处理的方法P300的流程图。如前所述,数据解压设备300可以执行数据处理方法P300。具体地,数据解压设备300中存储介质可以存储至少一组指令集。所述指令集被配置为可以指示数据解压设备300中的解压处理器完成数据处理方法P300。当所述数据解压设备300运行的时候,解压端处理器可以读取所述指令集并执行数据处理方法P300。FIG. 10 shows a flow chart of a method P300 of data processing for decompressing a compressed frame. As described above, the data decompression apparatus 300 may perform the data processing method P300. Specifically, the storage medium in the data decompression device 300 may store at least one set of instruction sets. The instruction set is configured to instruct the decompression processor in the data decompression apparatus 300 to complete the data processing method P300. When the data decompression device 300 is running, the decompression end processor can read the instruction set and execute the data processing method P300.

为了方便描述,我们将以图3A和图3D中所示的方法描述所述数据处理的方法P300。所述方法P300可以包括:For the convenience of description, we will describe the method P300 of the data processing in the method shown in FIG. 3A and FIG. 3D . The method P300 may include:

S320:获取压缩数据。所述压缩数据包括所述压缩帧。S320: Obtain compressed data. The compressed data includes the compressed frame.

所述压缩数据可以包括通过数据处理方法P200对所述初始数据中的所述初始帧进行数据压缩得到的所述压缩帧。所述压缩帧包括压缩的预测数据PI和残差数据R。如图3A和图3D所示,步骤S320可以包括:将所述压缩帧输入所述码流解析模块进行分析计算,得到所述预测数据PI和所述残差数据R。如前所述,在本申请中,帧是组成数据序列的一个常用处理单位。在数据处理时,常常以帧为单位进行计算。在数据压缩设备200对数据进行压缩的数据处理的方法P200中,可以以帧为单位对所述初始数据进行压缩。在数据解压设备300对压缩帧进行解压时也可以以帧作为单位进行数据解压。The compressed data may include the compressed frame obtained by performing data compression on the initial frame in the initial data by the data processing method P200. The compressed frame includes compressed prediction data PI and residual data R. As shown in FIG. 3A and FIG. 3D , step S320 may include: inputting the compressed frame into the code stream parsing module for analysis and calculation, to obtain the prediction data PI and the residual data R. As mentioned earlier, in this application, a frame is a common processing unit that composes a data sequence. In data processing, calculations are often performed in units of frames. In the data processing method P200 in which the data compression device 200 compresses data, the initial data may be compressed in units of frames. When the data decompression device 300 decompresses a compressed frame, data decompression may also be performed in units of frames.

S340:对所述压缩帧进行数据解压,得到解压帧。S340: Perform data decompression on the compressed frame to obtain a decompressed frame.

所述数据解压是指对所述压缩帧进行解压计算,得到解压帧,使所述解压帧恢复或基本上恢复至所述初始数据,或者使所述解压帧比所述初始数据更清晰。以视频数据为例,当所述解压帧在低频至中频区域的任意频率上的幅值恢复至所述初始帧的阈值或者阈值以上时,人眼便很难察觉出所述解压帧与所述初始帧的区别。所述阈值可以是80%-90%之间的任意值。比如,所述阈值可以是80%、81%、82%、83%、84%、85%、86%、87%、88%、89%、90%中任意两个数值所定义的闭区间中的任意值。比如,所述数据解压应使所述解压帧在低频至中频区域的任意频率上的幅值不小于所述初始帧的85%±3%。The data decompression refers to performing decompression calculation on the compressed frame to obtain a decompressed frame, and restoring or substantially restoring the decompressed frame to the original data, or making the decompressed frame clearer than the original data. Taking video data as an example, when the amplitude of the decompressed frame at any frequency in the low frequency to medium frequency region is restored to the threshold value of the initial frame or above the threshold value, it is difficult for the human eye to detect that the decompressed frame is different from the decompressed frame. The difference in the initial frame. The threshold can be any value between 80%-90%. For example, the threshold may be in a closed interval defined by any two values of 80%, 81%, 82%, 83%, 84%, 85%, 86%, 87%, 88%, 89%, and 90% any value of . For example, the data decompression should make the amplitude of the decompressed frame at any frequency in the low frequency to medium frequency region not less than 85%±3% of the initial frame.

所述数据解压包括对在解帧进行解码频谱调节,并对经过所述解码频谱调节后的数据做进一步的边界校正,从而得到所需的解压帧。所述在解帧即正在被解压的一帧数据,包括所述压缩帧和所述压缩帧在所述解压过程中成为所述解压帧之前的任一数据状态。The data decompression includes performing decoding spectrum adjustment on the decompressed frame, and performing further boundary correction on the data after the decoding spectrum adjustment, so as to obtain the desired decompressed frame. The deframed data, that is, a frame of data being decompressed, includes the compressed frame and any data state before the compressed frame becomes the decompressed frame during the decompression process.

以视频数据为例,所述数据处理的方法P200采用编码频谱调节和编码相结合的方法对所述初始帧进行压缩,以进一步提高视频数据的压缩比,提升视频传输的效率。在视频解压技术中,数据处理方法P300可以采用解码(即根据残差数据R和预测数据PI恢复在压帧)和解码频谱调节相结合的方法对所述压缩帧进行解压,得到所需的解压帧,以恢复所述压缩帧中的数据。所述在解帧可以包括所述压缩帧和所述压缩帧在根据所述预测数据PI和残差数据R解码过程中的任一数据状态。例如,所述在解帧可以是所述压缩帧、也可以是经过解码得到的解码帧,或者经过预测得到的预测帧,等等。Taking video data as an example, the data processing method P200 uses a combination of encoding spectrum adjustment and encoding to compress the initial frame, so as to further improve the compression ratio of video data and improve the efficiency of video transmission. In the video decompression technology, the data processing method P300 can decompress the compressed frame by a combination of decoding (that is, restoring the compressed frame according to the residual data R and the prediction data PI) and decoding spectrum adjustment to obtain the required decompression frame to recover the data in the compressed frame. The de-framing may include the compressed frame and any data state of the compressed frame in the decoding process according to the prediction data PI and the residual data R. For example, the decomposing frame may be the compressed frame, a decoded frame obtained through decoding, or a predicted frame obtained through prediction, and so on.

在对所述压缩帧进行所述数据解压所应用的所述解码频谱调节,是指将所述在解帧输入解码频谱调节器中进行解码频谱调节。所述解码频谱调节可以与所述编码频谱调节相对应,也就是说解码频谱调节函数H2(f)同编码频谱调节函数H1(f)应存在预先设定的关联关系。通过仔细地设定解码频谱调节函数H2(f)同编码频谱调节函数H1(f)的关联关系,所述编码频谱调节的压缩帧在经过所述解码频谱调节以及所述数据处理后,在不考虑其他计算误差的情况下完全恢复或基本恢复至编码频谱调节前的数据指标(比如图像数据的图像清晰度),甚至在一些指标上超过编码调节前的数据(比如解码后的图像的清晰度超过原始图像)。解码频谱调节函数H2(f)同编码频谱调节函数H1(f)之间具体的关联关系与对所述解码频谱调节后的数据所做的数据处理的方式有关。所述数据处理的方式不同,频谱调节函数H2(f)同编码频谱调节函数H1(f)之间的关联关系也不同。所述数据处理的具体方式以及频谱调节函数H2(f)同编码频谱调节函数H1(f)之间的关联关系,将在后面的描述中具体介绍。The decoding spectrum adjustment applied to the data decompression on the compressed frame refers to inputting the deframed input into a decoding spectrum adjuster to perform decoding spectrum adjustment. The decoding spectrum adjustment may correspond to the encoding spectrum adjustment, that is to say, there should be a preset correlation between the decoding spectrum adjustment function H 2 (f) and the encoding spectrum adjustment function H 1 (f). By carefully setting the correlation between the decoded spectrum adjustment function H 2 (f) and the encoded spectrum adjustment function H 1 (f), after the encoded spectrum adjusted compressed frame undergoes the decoded spectrum adjustment and the data processing, Without considering other calculation errors, it can completely restore or basically restore the data indicators before the encoding spectrum adjustment (such as the image clarity of the image data), and even exceed the data before the encoding adjustment in some indicators (such as the decoded image sharper than the original image). The specific correlation between the decoded spectrum adjustment function H 2 (f) and the encoded spectrum adjustment function H 1 (f) is related to the data processing manner of the decoded spectrum adjusted data. The data processing methods are different, and the correlation between the spectrum adjustment function H 2 (f) and the encoded spectrum adjustment function H 1 (f) is also different. The specific manner of the data processing and the correlation between the spectrum adjustment function H 2 (f) and the encoded spectrum adjustment function H 1 (f) will be specifically introduced in the following description.

同所述编码频谱调节一样,所述解码频谱调节也可以通过在时域进行卷积,从而在频域以解码频谱调节函数H2(f)(即解码传递函数)调整所述在解帧的频谱。因此所述解码频谱调节所使用的解码卷积核同所述编码频谱调节所用的编码卷积核也应存在对应的关联关系。通过选取与编码频谱调节函数H1(f)和所述编码卷积核相对应的解码频谱调节函数H2(f)和解码卷积核,两种方式可以达到相同的效果。为了方便描述,本说明书将以在时域进行卷积为例来描述所述解码频谱调节,但本领域技术人员应该明白通过在频域乘以解码频谱调节函数H2(f)进行频谱调节的方式也是本说明书要保护的范围。Like the encoding spectrum adjustment, the decoding spectrum adjustment can also be performed by convolution in the time domain, so that the decoding spectrum adjustment function H 2 (f) (that is, the decoding transfer function) in the frequency domain is used to adjust the deframed frame. spectrum. Therefore, there should also be a corresponding relationship between the decoding convolution kernel used in the decoding spectrum adjustment and the encoding convolution kernel used in the encoding spectrum adjustment. By selecting the decoding spectrum adjustment function H 2 (f) and the decoding convolution kernel corresponding to the encoding spectrum adjustment function H 1 (f) and the encoding convolution kernel, the two methods can achieve the same effect. For the convenience of description, this specification will take convolution in the time domain as an example to describe the decoding spectrum adjustment, but those skilled in the art should understand that the spectrum adjustment is performed by multiplying the decoding spectrum adjustment function H 2 (f) in the frequency domain. The method is also the scope of protection of this specification.

如前所述,所述编码频谱调节可以使所述在压帧在其频域中的中频区域的幅值做衰减,使所述在压帧的边界数据模糊化,从而减小编码产生的数据量。所述解码频谱调节以及所述数据处理可以使经过所述编码频谱调节以及数据处理后的数据恢复甚至增强。也就是说,所述解码频谱调节以及所述数据处理可以使所述在解帧中敏感频率的幅值完全恢复或基本恢复至衰减前的状态甚至相对所述衰减前的状态有所增强。以视频数据为例,由于人眼对图像中的低频至中频信息比较敏感,因此所述解码频谱调节以及所述数据处理可以对所述视频数据中的低频至中频区域的幅值进行恢复甚至增强。因此,所述解压帧在低频至中频区域的幅值应至少恢复或基本恢复至所述初始帧在低频至中频区域的幅值。在视频数据中,由于人眼对高频的数据比较不敏感,因此所述解码频谱调节以及所述数据处理可以不对高频区域的幅值进行恢复,使所述高频区域的幅值保持衰减。As mentioned above, the encoding spectrum adjustment can attenuate the amplitude of the intermediate frequency region of the compressed frame in its frequency domain, and blur the boundary data of the compressed frame, thereby reducing the data generated by encoding. quantity. The decoding spectrum adjustment and the data processing can restore or even enhance the data after the encoding spectrum adjustment and data processing. That is, the decoding spectrum adjustment and the data processing can completely restore or substantially restore the amplitude of the sensitive frequency in the de-framing to the state before attenuation or even enhance it relative to the state before attenuation. Taking video data as an example, since human eyes are sensitive to low-frequency to intermediate-frequency information in images, the decoding spectrum adjustment and the data processing can restore or even enhance the amplitude of the low-frequency to intermediate-frequency regions in the video data. . Therefore, the amplitude of the decompressed frame in the low to medium frequency region should be at least restored or substantially restored to the amplitude of the initial frame in the low to medium frequency region. In video data, since human eyes are relatively insensitive to high-frequency data, the decoding spectrum adjustment and the data processing may not restore the amplitude of the high-frequency region, so that the amplitude of the high-frequency region remains attenuated .

如前所述,所述数据压缩操作通过所述编码频谱调节,使所述初始帧在中频区域或中频至高频区域的幅值衰减,从而降低所述初始帧中的数据信息量。以视频数据为例,由于图像中物体的边缘部分中频和高频信息丰富,而中频和高频区域会携带更多的数据,因此降低中频至高频区域的幅值从视觉上会使所述在压帧的边界数据模糊化,同时也会使图像中的信息量大大减小。因此,所述数据解压可以从所述压缩帧中提取出边界信息,并对边界信息进行边界增强使其恢复至所述初始帧中的状态,或者使其相对于所述初始帧中的状态有所增强。As described above, the data compression operation attenuates the amplitude of the initial frame in the mid-frequency region or the mid-frequency to high-frequency region through the encoding spectrum adjustment, thereby reducing the amount of data information in the initial frame. Taking video data as an example, since the edge part of the object in the image is rich in medium frequency and high frequency information, and the medium frequency and high frequency area will carry more data, so reducing the amplitude of the medium frequency to high frequency area will visually make the At the same time, the information content in the image will be greatly reduced by blurring the data at the boundary of the pressed frame. Therefore, the data decompression can extract boundary information from the compressed frame, and perform boundary enhancement on the boundary information to restore it to the state in the original frame, or to make it different from the state in the original frame. enhanced.

所述边界增强处理的方式有很多,传统的技术有时候直接对压缩帧使用高通滤波器或者带通滤波器进行滤波,过滤掉所述压缩帧中的低频区域的分量,提取处所述压缩帧中的中频至高频区域的分量,从而提取出边界信息。但是所述高通滤波器和带通滤波器对应的卷积核的系数中会出现较多的负系数。如前所述,当卷积核中出现较多的负系数时,通过所述卷积核进行卷积得到的图像中可能会出现很强的振铃效应。因此,为了避免振铃效应,本说明书所述的数据解压使用平滑过渡的解码频谱调节函数H2(f)对所述压缩帧进行频谱调节,过滤所述压缩帧中的中频至高频区域的分量,然后对所述压缩帧和经过所述解码频谱调节的压缩帧求差,便可以得到所述边界信息,对所述边界信息使用调整系数进行调整,使其恢复至初始状态或相对于所述初始状态有所增强。当使用上述方案获取边界信息时,可以设计出一个解码卷积核,使其所有系数都是非负数,或者负系数的和的绝对值与非负系数的和的比值小于0.1,就可以避免振铃效应的出现。There are many ways of processing the boundary enhancement. In the traditional technology, a high-pass filter or a band-pass filter is directly used to filter the compressed frame, and the components of the low-frequency region in the compressed frame are filtered out, and the compressed frame is extracted. The components in the mid-frequency to high-frequency region in the extraction of boundary information. However, many negative coefficients may appear in the coefficients of the convolution kernels corresponding to the high-pass filter and the band-pass filter. As mentioned above, when there are many negative coefficients in the convolution kernel, a strong ringing effect may appear in the image obtained by convolution with the convolution kernel. Therefore, in order to avoid the ringing effect, the data decompression described in this specification uses a smooth transition decoded spectrum adjustment function H 2 (f) to perform spectral adjustment on the compressed frame, filtering the intermediate frequency to high frequency region in the compressed frame. Then, the difference between the compressed frame and the compressed frame adjusted by the decoded spectrum can be obtained to obtain the boundary information, and the boundary information can be adjusted using the adjustment coefficient to restore it to the original state or relative to the original state. The initial state described above has been enhanced. When using the above scheme to obtain boundary information, a decoding convolution kernel can be designed so that all coefficients are non-negative, or the ratio of the absolute value of the sum of the negative coefficients to the sum of the non-negative coefficients is less than 0.1, which can avoid ringing emergence of the effect.

具体地,步骤S340可以包括:Specifically, step S340 may include:

S342:对所述压缩帧进行解码,得到解码帧。在所述方法P300中,所述在解帧可以是所述解码帧。S342: Decode the compressed frame to obtain a decoded frame. In the method P300, the under-decoding frame may be the decoded frame.

所述压缩帧可以是数据压缩设备200对所述频谱调节帧进行编码得到的。数据解压设备300可以对所述压缩帧进行解码以得到所述解码帧。即根据所述预测数据PI进行预测得到预测帧,并和所述残差数据R叠加,得到解码数据P2,所述解码数据P2就是所述解码帧的数据P2。编码和解码过程中可能存在一定的误差,假设编解码过程带来的偏差很小的话,所述解码帧中的数据P2与所述编码频谱调节帧中的数据P1基本一致,因此,P1与P2之间的关系看可以表示为以下公式:The compressed frame may be obtained by encoding the spectrum adjustment frame by the data compression device 200 . The data decompression apparatus 300 may decode the compressed frame to obtain the decoded frame. That is, prediction is performed according to the prediction data PI to obtain a prediction frame, which is superimposed with the residual data R to obtain decoded data P 2 , and the decoded data P 2 is the data P 2 of the decoded frame. There may be certain errors in the encoding and decoding process. Assuming that the deviation caused by the encoding and decoding process is small, the data P 2 in the decoding frame is basically the same as the data P 1 in the encoding spectrum adjustment frame. Therefore, P The relationship between 1 and P2 can be expressed as the following formula:

P2≈P1公式(4)P 2 ≈P 1 Formula (4)

数据解压设备300可以对所述解码帧进行所述解码频谱调节和所述边界校正。图11A示出了根据本说明书的实施例提供的一种所述解码频谱调节和所述边界校正的流程图。图11A和图10对应。如图11A和图10所示,步骤S340还可以包括:The data decompression apparatus 300 may perform the decoded spectrum adjustment and the boundary correction on the decoded frame. FIG. 11A shows a flowchart of the decoding spectrum adjustment and the boundary correction provided according to an embodiment of the present specification. FIG. 11A corresponds to FIG. 10 . As shown in FIG. 11A and FIG. 10 , step S340 may further include:

S344:对所述在解帧(即所述解码帧P2)进行所述解码频谱调节,得到解码频谱调节帧。S344: Perform the decoded spectrum adjustment on the frame being decoded (ie, the decoded frame P 2 ) to obtain a decoded spectrum adjustment frame.

为了方便描述,我们将所述解码频谱调节帧中的数据定义为PC。所述解码频谱调节使所述解码帧避免出现振铃效应。所述解码频谱调节包括使用所述解码频谱调节函数H2(f)对所述在解帧进行所述解码频谱调节,使所述在解帧在频域内的幅值平滑地降低以过滤所述在解帧的中频至高频区域的分量,得到所述解码频谱调节帧。每一帧数据频谱中的中频至高频分量主要集中在这一帧数据中数据变化剧烈的区域,也就是数据的边界数据。比如,对于一帧图像来说,所述中频至高频数据主要集中在所述图像中物体的边界,也就是这一帧图像的边界数据。因此,解码频谱调节帧中的数据PC可以理解成去除了解码帧P2中的边界信息的数据。所述解码频谱调节帧中的数据PC可以表示为以下公式:For the convenience of description, we define the data in the decoded spectrum adjustment frame as PC . The decoded spectral adjustment prevents ringing of the decoded frame. The decoding spectrum adjustment includes using the decoding spectrum adjustment function H 2 (f) to perform the decoding spectrum adjustment on the de-framing, so that the amplitude of the de-framing in the frequency domain is smoothly reduced to filter the de-framing. The decoded spectrally adjusted frame is obtained from the deframed components in the mid-frequency to high-frequency region. The intermediate frequency to high frequency components in the data spectrum of each frame are mainly concentrated in the area where the data changes sharply in this frame of data, that is, the boundary data of the data. For example, for a frame of image, the intermediate frequency to high frequency data are mainly concentrated on the boundary of the object in the image, that is, the boundary data of this frame of image. Therefore, the data PC in the decoded spectrum adjustment frame can be understood as the data from which the boundary information in the decoded frame P2 is removed . The data PC in the decoded spectrum adjustment frame can be expressed as the following formula :

PC=H2(f)·P2=H1(f)·H2(f)·P′0≈H1(f)·H2(f)·P0公式(5)P C =H 2 (f)·P 2 =H 1 (f)·H 2 (f)·P′ 0 ≈ H 1 (f)·H 2 (f)·P 0 Formula (5)

所述解码频谱调节包括基于所述编码卷积核,使用相应的解码卷积核对所述在解帧(解码帧)做卷积。为了避免振铃效应,所述解码卷积核中负系数的和的绝对值与非负系数的和的比值小于阈值。比如所述阈值可以是0.01、0.02、0.03、0.04、0.05、0.06、0.07、0.08、0.09、0.1、0.2、0.3、0.4中的任意一个值或者任意两个数所定义的区间中的任意值。比如,所述解码卷积核中的卷积核系数可以均选为为非负数。解码频谱调节函数H2(f)中对于中频至高频区域的幅值调节增益等于0,并可以在一定误差范围内波动。所述误差范围可以在0、±1%、±2%、±3%、±4%、±5%、±6%、±7%、±8%、±9%、±10%、±11%、±12%、±13%、±14%、±15%、±16%、±17%、±18%、±19%、±20%、±21%、±22%、±23%、±24%、±25%、±26%、±27%、±28%、±29%、±30%、±31%、±32%、±33%、±34%、±35%等数值中任意两个所规定的区间内。The decoding spectrum adjustment includes convolving the currently de-framed (decoded frame) with a corresponding decoding convolution kernel based on the encoding convolution kernel. In order to avoid ringing effect, the ratio of the absolute value of the sum of negative coefficients to the sum of non-negative coefficients in the decoding convolution kernel is smaller than a threshold. For example, the threshold may be any one of 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.2, 0.3, and 0.4, or any value in an interval defined by any two numbers. For example, the coefficients of the convolution kernel in the decoding convolution kernel may all be selected as non-negative numbers. The amplitude adjustment gain for the mid-frequency to high-frequency region in the decoding spectrum adjustment function H 2 (f) is equal to 0, and can fluctuate within a certain error range. The error range can be 0, ±1%, ±2%, ±3%, ±4%, ±5%, ±6%, ±7%, ±8%, ±9%, ±10%, ±11 %, ±12%, ±13%, ±14%, ±15%, ±16%, ±17%, ±18%, ±19%, ±20%, ±21%, ±22%, ±23%, ±24%, ±25%, ±26%, ±27%, ±28%, ±29%, ±30%, ±31%, ±32%, ±33%, ±34%, ±35%, etc. within any two specified intervals.

所述通过解码频谱调节函数H2(f)可以保持直流部分,即在频率为0的部分的幅值调节增益为1,以保证可以保留初始帧中的基础信息。因此,所述解码频谱调节所使用的所述解码频谱调节函数H2(f)对所述低频区域的幅值调节增益从频率为0的位置的幅值调节增益1平滑过渡到中频区域的幅值调节增益接近0。By decoding the spectrum adjustment function H 2 (f), the DC part can be maintained, that is, the amplitude adjustment gain in the part where the frequency is 0 is 1, so as to ensure that the basic information in the initial frame can be preserved. Therefore, the decoding spectrum adjustment function H 2 (f) used in the decoding spectrum adjustment has a smooth transition to the amplitude adjustment gain of the low frequency region from the amplitude adjustment gain 1 at the position of frequency 0 to the amplitude adjustment gain of the intermediate frequency region. The value adjustment gain is close to 0.

步骤S344可以包括:确定所述解码帧的帧类型;基于所述解码帧的帧类型,从解码卷积核组中选择一个卷积核作为所述解码卷积核,对所述解码帧做卷积。Step S344 may include: determining the frame type of the decoded frame; based on the frame type of the decoded frame, selecting a convolution kernel from the decoding convolution kernel group as the decoding convolution kernel, and convoluting the decoded frame product.

如前所述,数据压缩设备200在压缩初始帧的过程中,会将所述初始帧或者编码频谱调节帧编码成不同的类型。因此,数据解压设备300在对所述解码帧进行所述解码频谱调节前,需要先确定所述解码帧的帧类型,对于不同的帧类型选择的解码卷积核也不同。所述解码帧的帧类型可以包括I帧、P帧以及B帧中的至少一种。所述解码帧的帧类型可以只包括一种帧类型,也可以同时包括多种帧类型。关于确定所述解码帧的帧类型的方法已经相对成熟,不是本说明书要保护的重点,因此,在此不再赘述。As mentioned above, in the process of compressing the initial frame, the data compression apparatus 200 may encode the initial frame or the encoded spectrum adjustment frame into different types. Therefore, before performing the decoding spectrum adjustment on the decoded frame, the data decompression device 300 needs to determine the frame type of the decoded frame, and the decoding convolution kernels selected for different frame types are also different. The frame type of the decoded frame may include at least one of an I frame, a P frame, and a B frame. The frame type of the decoded frame may include only one frame type, or may include multiple frame types at the same time. The method for determining the frame type of the decoded frame is relatively mature, and is not the focus of the present specification, so it will not be repeated here.

如前所述,对所述解码帧进行所述解码频谱调节可以表现为在时域对所述解码帧进行卷积。数据解压设备300的存储介质中可以储存有多个不同的解码卷积核,称作解码卷积核组。每个编码卷积核都在所述解码卷积核组中有至少一个解码卷积核相对应。数据解压设备300对所述解码帧做卷积时,可以基于所述解码帧的帧类型,从所述解码卷积核组中选择一个卷积核作为所述解码卷积核,对所述解码帧做卷积。所述使用解码卷积核对在解帧进行卷积的操作可以被称作解码频谱调节器。当所述解码帧为I帧或P帧时,数据解压设备300对所述I帧或P帧进行卷积包括从所述解码卷积核组中选择一个卷积核作为所述解码卷积核,对所述I帧或P帧做卷积。数据解压设备300也可以根据对所述解码帧的解码质量要求从所述解码卷积核组中选择一个解压效果最好的卷积核作为所述解码卷积核。当所述解码帧为B帧时,所述解码帧的所述解码卷积核同与所述解码帧最近的参考帧的解码卷积核相同,或者所述解码帧的所述解码卷积核同相邻的两个方向的最接近的参考帧中衰减程度最大的参考帧对应的解码卷积核相同,或者所述解码帧的所述解码卷积核取相邻的两个方向上的最近的参考帧对应的解码卷积核的平均值。当所述解码帧与前后两个最近的参考帧距离相同的时候,所述解码帧的所述解码卷积核取前向或者后向的最近参考帧的解码卷积核。当所述解码帧为B帧时,所述解码帧选取的解码卷积核所对应的参考帧应与所述在压帧在进行所述编码频谱调节时选取的编码卷积核所对应的参考帧相同。As previously described, performing the decoded spectral adjustment on the decoded frame may appear as convolution of the decoded frame in the time domain. The storage medium of the data decompression device 300 may store a plurality of different decoding convolution kernels, which are called decoding convolution kernel groups. Each encoding convolution kernel corresponds to at least one decoding convolution kernel in the decoding convolution kernel group. When the data decompression device 300 performs convolution on the decoded frame, it may select a convolution kernel from the decoded convolution kernel group as the decoded convolution kernel based on the frame type of the decoded frame, and perform the decoding on the decoded convolution kernel. Frame do convolution. The operation of convolving on deframes using a decoded convolution kernel may be referred to as a decoded spectrum conditioner. When the decoded frame is an I frame or a P frame, the data decompression apparatus 300 convolving the I frame or the P frame includes selecting a convolution kernel from the decoding convolution kernel group as the decoding convolution kernel , and perform convolution on the I frame or P frame. The data decompression device 300 may also select a convolution kernel with the best decompression effect from the decoding convolution kernel group as the decoding convolution kernel according to the decoding quality requirement for the decoded frame. When the decoded frame is a B frame, the decoded convolution kernel of the decoded frame is the same as the decoded convolution kernel of the reference frame closest to the decoded frame, or the decoded convolution kernel of the decoded frame The decoding convolution kernel corresponding to the reference frame with the largest attenuation degree among the closest reference frames in the adjacent two directions is the same, or the decoding convolution kernel of the decoding frame takes the closest reference frame in the adjacent two directions. The average value of the decoded convolution kernel corresponding to the reference frame. When the distance between the decoded frame and the two nearest reference frames is the same, the decoded convolution kernel of the decoded frame takes the decoded convolution kernel of the nearest forward or backward reference frame. When the decoded frame is a B frame, the reference frame corresponding to the decoded convolution kernel selected by the decoded frame should be the reference frame corresponding to the encoded convolution kernel selected during the encoding spectrum adjustment of the compressed frame Frames are the same.

数据解压设备300在使用所述解码卷积核对所述在解帧做卷积时,可以在垂直方向、水平方向和斜向中的至少一个方向上对所述在解帧做卷积。所述在解帧的卷积方向与所述在压帧相同,所述在解帧的卷积顺序与所述在压帧相反。如果所述在压帧只经过垂直方向的卷积,则所述在解帧也只进行垂直方向的卷积。同样,如果所述在压帧只经过水平方向或斜向的卷积,则所述在解帧也只进行水平方向或斜向的卷积。如果所述在压帧经过多个方向的卷积时,则所述在解帧也进行多个方向的卷积,且所述在解帧在卷积时方向和顺序与所述在压帧在卷积时的方向和顺序相反。即所述在压帧先进行垂直方向的卷积再进行水平方向的卷积,则所述在解帧先进行水平方向的卷积再进行垂直方向的卷积。When the data decompression device 300 uses the decoding convolution check to perform convolution on the deframed frame, it may perform convolution on the deframed frame in at least one of a vertical direction, a horizontal direction, and an oblique direction. The convolution direction of the de-framing is the same as that of the pressing frame, and the convolution order of the de-framing is opposite to that of the pressing frame. If the frame-pressing only undergoes convolution in the vertical direction, the de-framing also only performs convolution in the vertical direction. Likewise, if the frame-pressing only undergoes convolution in the horizontal direction or oblique direction, the de-framing also only performs convolution in the horizontal direction or oblique direction. If the compressed frame undergoes convolution in multiple directions, the deframed convolution is also performed in multiple directions, and the direction and order of the deframed convolution are the same as those of the compressed frame. The direction and order of convolution are reversed. That is, the convolution in the vertical direction is performed first and then the convolution in the horizontal direction is performed in the frame pressing, and the convolution in the horizontal direction is performed first in the de-framing process, and then the convolution in the vertical direction is performed.

步骤S340还可以包括:Step S340 may also include:

S346:对所述在解帧(即所述解码帧P2)和所述解码频谱调节帧PC求差,得到第三边界。S346: Calculate the difference between the frame being decoded (that is, the decoded frame P 2 ) and the decoded spectrum adjustment frame PC to obtain a third boundary.

为了方便描述,我们将所述第三边界中的数据定义为PE3。所述第三边界PE3为所述在解帧的边界,其中包括所述初始帧P0的边界信息。For the convenience of description, we define the data in the third boundary as P E3 . The third boundary P E3 is the boundary of the de-framing, which includes boundary information of the initial frame P 0 .

在一些实施例中,步骤S340还可以包括:In some embodiments, step S340 may further include:

S347:通过第二系数b对所述第三边界PE3进行增强。 S347 : Enhance the third boundary PE3 by the second coefficient b.

其中,所述第二系数b为大于1的任意数。在一些实施例中,所述第三边界PE3可以是对所述解码帧P2和所述解码频谱调节帧PC求差得到的数据。在另一些实施例中,所述第三边界PE3可以是通过所述第二系数b增强后的边界。此时,所述第三边界PE3还可以表示为以下公式:Wherein, the second coefficient b is any number greater than 1. In some embodiments, the third boundary PE3 may be data obtained by calculating the difference between the decoded frame P2 and the decoded spectrum adjustment frame PC . In other embodiments, the third boundary P E3 may be a boundary enhanced by the second coefficient b. At this time, the third boundary P E3 can also be expressed as the following formula:

PE3=P2-PC=P2-P2*H2(f)公式(6)P E3 =P 2 -P C =P 2 -P 2 *H 2 (f) Formula (6)

PE3=b*(P2-PC)=b*(P2-P2*H2(f))公式(7)P E3 =b*(P 2 -P C )=b*(P 2 -P 2 *H 2 (f)) Formula (7)

如前所述,所述解码频谱调节帧中的中频至高频区域的分量被过滤,对所述解码帧和所述解码频谱调节帧求差,便可以得到所述解码帧中的中频至高频区域的分量,也就是所述在解帧的边界。所述在解帧的边界中包括所述初始帧的边界信息。如前所述,所述在解帧的边界中的数据被定义为第三边界PE3。其中,b为增强系数,表示对所述边界信息的增强程度,b越大,对所述边界信息的增强程度越强。所述调整系数b可以依据经验值进行取值,也可以通过机器学习训练得到。As mentioned above, the components in the intermediate frequency to high frequency region in the decoded spectrum adjustment frame are filtered, and the difference between the decoded frame and the decoded spectrum adjustment frame can be obtained to obtain the intermediate frequency to high frequency in the decoded frame. component of the frequency region, that is, the boundary of the deframe. The deframing boundary includes boundary information of the initial frame. As before, the data in the deframed boundary is defined as the third boundary P E3 . Wherein, b is an enhancement coefficient, which represents the enhancement degree of the boundary information, and the larger b is, the stronger the enhancement degree of the boundary information is. The adjustment coefficient b can be valued according to an empirical value, or can be obtained through machine learning training.

步骤S340还可以包括:Step S340 may also include:

S348:通过第二伽马算法,对所述第三边界PE3中边界值处于所述第二预设范围内的边界进行减弱,以对所述第三边界PE3进行降噪,得到降噪边界。S348: Using the second gamma algorithm, weaken the boundary whose boundary value is within the second preset range in the third boundary P E3 , so as to perform noise reduction on the third boundary P E3 to obtain noise reduction boundary.

为了方便描述,我们将所述降噪边界中的数据定义为PE0。所述边界校正包括通过第二伽马算法对所述在解帧的边界中边界值在第二预设范围内的边界进行减弱,以进行降噪。在一般情况下,在对视频或图像进行编码和解码时所产生的图像噪声通常都在一个小范围之内。所以,在进行所述数据解压的时候,可以对编码和解码所产生的这个小范围内的图像噪声进行降噪处理。在进行降噪处理的时候,可以使用一个大于1的伽马值γ对边界值在第二预设范围[-R4,R4]内的边界进行边界减弱,以达到降噪的效果。所述第二预设范围[-R4,R4]可以是需要进行所述边界校正的边界值。所述边界值可以是第三边界PE3中每个像素对应的值。R4可以是边界阈值。比如,R4可以是30,40,50,等等。在一些实施例中,R4可以是5~30之间的任意数。For the convenience of description, we define the data in the noise reduction boundary as P E0 . The boundary correction includes attenuating the boundary whose boundary value is within the second preset range in the de-framed boundary through the second gamma algorithm, so as to perform noise reduction. In general, the image noise generated when encoding and decoding a video or image is usually within a small range. Therefore, when the data is decompressed, noise reduction processing can be performed on the image noise in this small range generated by encoding and decoding. When performing noise reduction processing, a gamma value γ greater than 1 may be used to weaken the boundary of the boundary value within the second preset range [-R4, R4], so as to achieve the effect of noise reduction. The second preset range [-R4, R4] may be a boundary value for which the boundary correction needs to be performed. The boundary value may be a value corresponding to each pixel in the third boundary PE3 . R4 can be the boundary threshold. For example, R4 can be 30, 40, 50, etc. In some embodiments, R4 can be any number between 5-30.

图11B示出了根据本说明书的实施例提供的一种进行所述边界校正的流程图。如图11B所示,步骤S348可以是:数据解压设备300通过第三调节函数HL3(f)对所述第三边界PE3进行调节,得到第四边界PE4;通过所述第二伽马算法,对所述第四边界PE4中的边界值处于所述第二预设范围[-R4,R4]内的边界进行减弱,得到所述降噪边界PE0FIG. 11B shows a flowchart of performing the boundary correction according to an embodiment of the present specification. As shown in FIG. 11B , step S348 may be: the data decompression device 300 adjusts the third boundary P E3 through the third adjustment function H L3 (f) to obtain a fourth boundary P E4 ; The algorithm is to weaken the boundary in the fourth boundary P E4 whose boundary value is within the second preset range [-R4, R4] to obtain the noise reduction boundary P E0 .

所述第三边界PE3中不需要进行所述边界校正的边界中包含的中频至高频区域的分量较多。因此,为了避免所述边界校正对其他不需要进行校正的边界造成影响,数据解压设备300可以先对所述第三边界PE3进行过滤,以过滤中频至高频区域的分量。第三调节函数HL3(f)可以是一个直流分量DC等于1的低通滤波器,以使所述第三边界PE3在频域内的低频区域的分量被保留而中频至高频区域的分量被过滤。第三调节函数HL3(f)可以与第二调节函数HL2(f)相同。In the third boundary PE3 , the boundary that does not need to perform the boundary correction contains many components in the middle frequency to high frequency region. Therefore, in order to prevent the boundary correction from affecting other boundaries that do not need to be corrected, the data decompression device 300 may first filter the third boundary PE3 to filter the components in the mid-frequency to high-frequency region. The third adjustment function H L3 (f) may be a low-pass filter with a DC component DC equal to 1, so that the components in the low frequency region of the third boundary P E3 in the frequency domain are preserved and the components in the intermediate frequency to high frequency region is filtered. The third adjustment function H L3 (f) may be the same as the second adjustment function H L2 (f).

所述第二伽马算法可以是伽马值γ>1的伽马算法。在步骤S348中,数据解压设备300可以对第四边界PE4中的像素逐个进行边界校正。具体地,数据解压设备300可以将第四边界PE4中的每个像素对应的边界值与边界阈值R4进行对比;当边界值处于[-R4,R4]之内时,则使用所述第二伽马算法对所述边界值进行校正,使所述边界值的绝对值变小,以进行边界降噪;当边界值处于[-R4,R4]之外时,则不进行校正。The second gamma algorithm may be a gamma algorithm with a gamma value γ>1. In step S348, the data decompression apparatus 300 may perform boundary correction on the pixels in the fourth boundary PE4 one by one. Specifically, the data decompression device 300 may compare the boundary value corresponding to each pixel in the fourth boundary PE4 with the boundary threshold R4; when the boundary value is within [ -R4 , R4], the second boundary value is used. The gamma algorithm corrects the boundary value to make the absolute value of the boundary value smaller, so as to perform boundary noise reduction; when the boundary value is outside [-R4, R4], no correction is performed.

数据解压设备300可以使用查表的方法进行所述边界校正。数据解压设备300中可以存储有表5。表5中存储有所述第二伽马算法中的输入边界值与输出边界值的对应关系,即校正前的边界值与校正后的边界值的对应关系。以R4=5为例,表5可以表示为:The data decompression device 300 may perform the boundary correction using a table look-up method. Table 5 may be stored in the data decompression device 300 . Table 5 stores the correspondence between the input boundary value and the output boundary value in the second gamma algorithm, that is, the correspondence between the boundary value before correction and the boundary value after correction. Taking R4=5 as an example, Table 5 can be expressed as:

Figure BDA0002884076930000541
Figure BDA0002884076930000541

图11C示出了根据本说明书的实施例提供的另一种进行边界校正的流程图。如图11C所示,步骤S348还可以是:数据解压设备300通过所述第二伽马算法,直接对所述第三边界PE3中的边界值处于所述第二预设范围[-R5,R5]内的边界进行校正,得到所述降噪边界PE0。其中R5可以与R4不同,也可以与R4相同。FIG. 11C shows another flowchart of performing boundary correction according to an embodiment of the present specification. As shown in FIG. 11C , in step S348, the data decompression device 300 directly determines that the boundary value in the third boundary PE3 is in the second preset range [−R5, The boundary within R5] is corrected to obtain the noise reduction boundary P E0 . Wherein R5 can be different from R4 or can be the same as R4.

在一些实施例中,数据解压设备300还可以通过偏差值ΔE对所述第三边界PE3中的边界值处于所述第二预设范围[-R5,R5]内的边界进行校正,得到所述降噪边界PE0。其中,所述降噪边界PE0为所述第三边界PE3和偏差值ΔE的和。数据解压设备300中可以存储有表6。表6中存储有所述第三边界PE3的输入边界值与偏差值ΔE以及输入边界值输出边界值的对应关系。以R1=5例,表6可以表示为:In some embodiments, the data decompression device 300 may further correct the boundary in the third boundary PE3 within the second preset range [-R5, R5] by using the deviation value ΔE to obtain the obtained The noise reduction boundary P E0 is described. Wherein, the noise reduction boundary PE0 is the sum of the third boundary PE3 and the deviation value ΔE. Table 6 may be stored in the data decompression device 300 . Table 6 stores the correspondence between the input boundary value of the third boundary PE3 , the deviation value ΔE, and the input boundary value and the output boundary value. Taking R1=5 as an example, Table 6 can be expressed as:

Figure BDA0002884076930000542
Figure BDA0002884076930000542

数据解压设备300可以直接根据表6获取所述降噪边界0E0The data decompression device 300 can directly obtain the noise reduction boundary 0 E0 according to Table 6 .

S349:将所述降噪边界PE0和所述在解帧(即所述解码帧P2)叠加得到所述解压帧P4S349: Superimpose the noise reduction boundary P E0 and the decompressed frame (ie, the decoded frame P 2 ) to obtain the decompressed frame P 4 .

由于所述边界校正只是针对小范围内的边界进行的,在所述第二预设范围外的边界以及非边界区域不进行校正。因此,所述解压帧P4可以表示为以下公式:Since the boundary correction is only performed for the boundaries within a small range, the boundaries and non-boundary areas outside the second preset range are not corrected. Therefore, the decompressed frame P4 can be expressed as the following formula :

P4=P2+PE0 P 4 =P 2 +P E0

=P2+PE3+ΔE=P 2 +P E3 +ΔE

≈P′0·H1(f)·(1+b(1-H2(f)))≈P′ 0 ·H 1 (f)·(1+b(1-H 2 (f)))

≈P0·H1(f)·(1+b(1-H2(f)))公式(8)≈P 0 ·H 1 (f)·(1+b(1-H 2 (f))) Equation (8)

以视频数据为例,由于人眼对于低频至中频区域的信息比较敏感,而H1(f)的设计只是对初始帧中的低频至中频区域的幅值进行了衰减,而使编码频谱调节帧中保留了初始帧中低频至中频全部频率的频率信息;所述解码帧中的数据P2与所述编码频谱调节帧中的数据P1基本一致,因此,解码帧中也保留了低频至中频区域的频率信息;而解码频谱调帧中的中频至高频区域的分量被过滤,因此保留了低频区域的频率信息;因此,通过解码帧和解码频谱调节帧的差值得到的在解帧的边界中保留了初始帧中的中频区域的频率信息;而所述降噪边界只是对所述在解帧的边界中的小范围内的噪声进行消除,在所述第二预设范围外的边界不做处理;因此从理论上讲在不考虑由于其他算法带来的偏差的情况下,由解码帧和降噪边界叠加得到的解压帧是可以完全恢复或基本恢复初始帧中低频至中频全部频率信息的。也就是说所述数据解压可以使经过所述数据压缩的数据在低频至中频中任意频率下得到恢复甚至增强。因此,经过数据解压后,所述解压帧在低频至中频区域的任意频率上的幅值应约等于或者大于所述初始帧。所述约等于是指所述解压帧的幅值等于所述初始帧的幅值,并在一定的误差范围内波动。以视频数据为例,当所述解压帧在低频至中频区域的任意频率上的幅值恢复至所述初始帧的85%或85%以上时,人眼便很难察觉出所述解压帧与所述初始帧的区别。因此,经过数据解压后,所述解压帧在低频至中频区域的任意频率上的幅值应不小于所述初始帧的85%。即所述误差范围不应使所述解压帧在低频至中频区域的任意频率上的幅值低于所述初始帧的85%。而人眼对于高频区域的信息比较不敏感,因此,所述解压帧中对于高频区域的信息可以保留以适应高质量要求的场景,也可以衰减以抑制不必要的高频噪声。P0与P4之间的关系看可以表示为以下公式:Taking video data as an example, since the human eye is sensitive to the information in the low-frequency to mid-frequency region, the design of H 1 (f) only attenuates the amplitude of the low-frequency to medium-frequency region in the initial frame, and makes the coding spectrum adjust the frame. The frequency information of all frequencies from the low frequency to the intermediate frequency in the initial frame is retained; the data P 2 in the decoded frame is basically the same as the data P 1 in the encoded spectrum adjustment frame, so the low frequency to the intermediate frequency are also reserved in the decoded frame. the frequency information of the region; and the components from the intermediate frequency to the high frequency region in the decoded spectrum modulation frame are filtered, so the frequency information of the low frequency region is retained; therefore, the difference between the decoded frame and the decoded spectrum modulation frame is obtained in the decoded frame. The frequency information of the intermediate frequency region in the initial frame is retained in the boundary; and the noise reduction boundary only removes the noise in a small range in the boundary of the de-framed, and the boundary outside the second preset range No processing is performed; therefore, theoretically, without considering the deviation caused by other algorithms, the decompressed frame obtained by the superposition of the decoded frame and the noise reduction boundary can completely restore or basically restore all frequencies from the low frequency to the intermediate frequency in the initial frame. informational. That is to say, the data decompression can restore or even enhance the data compressed at any frequency from low frequency to intermediate frequency. Therefore, after data decompression, the amplitude of the decompressed frame at any frequency in the low frequency to medium frequency region should be approximately equal to or greater than that of the initial frame. The approximately equal means that the amplitude of the decompressed frame is equal to the amplitude of the initial frame, and fluctuates within a certain error range. Taking video data as an example, when the amplitude of the decompressed frame at any frequency in the low-frequency to mid-frequency region is restored to 85% or more of the initial frame, it is difficult for the human eye to perceive the difference between the decompressed frame and the original frame. the difference of the initial frame. Therefore, after data decompression, the amplitude of the decompressed frame at any frequency in the low-frequency to medium-frequency region should not be less than 85% of the initial frame. That is, the error range should not make the amplitude of the decompressed frame at any frequency in the low frequency to medium frequency region lower than 85% of the initial frame. The human eye is relatively insensitive to the information in the high frequency region, therefore, the information in the high frequency region in the decompressed frame can be retained to adapt to high-quality scenes, and can also be attenuated to suppress unnecessary high-frequency noise. The relationship between P 0 and P 4 can be expressed as the following formula:

Figure BDA0002884076930000561
或者
Figure BDA0002884076930000561
or

Figure BDA0002884076930000562
Figure BDA0002884076930000562

需要说明的是,在公式中可以允许存在一定范围的误差。例如,P4≥P0可以是P4的基本值在大于等于P0的情况下,允许P4在一定误差范围内波动。也就是说,在P4=P0时,P4在负误差的情况下可以允许P4略小于P0。这里的公式仅仅列出了P4与P0的基础关系公式,没有将误差写入公式中,本领域技术人员应当明白在误差范围内的波动使得解压帧在低频至中频区域的幅值略小于所述初始帧的情况同样属于本说明书保护的范围。以下的公式中,同样允许存在一定范围的误差。在下文中也仅仅给出P4的幅值大于等于所述初始帧P0的基础关系的说明。对于误差范围内的波动,本领域技术人员可自行推导。It should be noted that a certain range of errors can be allowed in the formula. For example, P 4 ≥ P 0 may be the basic value of P 4. In the case that P 4 is greater than or equal to P 0 , P 4 is allowed to fluctuate within a certain error range. That is, when P 4 =P 0 , P 4 can allow P 4 to be slightly smaller than P 0 in the case of a negative error. The formula here only lists the basic relationship between P 4 and P 0 , and the error is not written into the formula. Those skilled in the art should understand that the fluctuation within the error range makes the amplitude of the decompressed frame in the low-frequency to medium-frequency region slightly smaller than The situation of the initial frame also falls within the protection scope of this specification. In the following formula, a certain range of error is also allowed. In the following, only a description is given of the basic relationship that the magnitude of P 4 is greater than or equal to the initial frame P 0 . The fluctuation within the error range can be deduced by those skilled in the art.

为了方便描述,我们将P0与P4之间的整体频谱调节函数定义为H0(f),则P0与P4之间的关系看可以表示为以下公式:For the convenience of description, we define the overall spectrum adjustment function between P 0 and P 4 as H 0 (f), then the relationship between P 0 and P 4 can be expressed as the following formula:

P4=H0(f)·P0公式(11)P 4 =H 0 (f)·P 0 Formula (11)

则,整体频谱调节函数H0(f)可以表示为以下公式:Then, the overall spectrum adjustment function H 0 (f) can be expressed as the following formula:

Figure BDA0002884076930000571
或者
Figure BDA0002884076930000571
or

Figure BDA0002884076930000572
Figure BDA0002884076930000572

其中,f0为人眼敏感频率的分界值,对于视频数据来说,f0可以是0.33,也可以是比0.33大或者小的其他数值。对于不同类型的数据,f0的值不同。Among them, f 0 is the threshold value of the sensitive frequency of the human eye. For video data, f 0 may be 0.33, or may be other values larger or smaller than 0.33. The value of f0 is different for different types of data.

在上述公式(12)~(13)中的H0(f),当在选定的频域区间H0(f)≈1时,则可以将所述解压帧在选定的频域区间内的数据恢复至所述初始帧;当在选定的频域区间H0(f)>1时,则可以将所述解压帧在选定的频域区间内的数据进行增强,即所述解压帧在选定区域的幅值高于所述初始帧。比如,如果初始帧是视频中的一帧的话,只要使得在选定的频域区间内H0(f)大于1,则可以实现清晰度增强。为了方便描述,我们将H0(f)≈1定义为正常模式,将H0(f)>1定义为增强模式。下面我们将以视频数据为例,对整体频谱调节函数H0(f)进行详细说明。In H 0 (f) in the above formulas (12) to (13), when H 0 (f)≈1 in the selected frequency domain interval, the decompressed frame can be in the selected frequency domain interval The data of the decompressed frame is restored to the initial frame; when H 0 (f)>1 in the selected frequency domain interval, the data of the decompressed frame in the selected frequency domain interval can be enhanced, that is, the decompression The magnitude of the frame in the selected area is higher than the initial frame. For example, if the initial frame is a frame in the video, as long as H 0 (f) is greater than 1 in the selected frequency domain interval, sharpness enhancement can be achieved. For the convenience of description, we define H 0 (f)≈1 as the normal mode and H 0 (f)>1 as the enhanced mode. In the following, we will take video data as an example to describe the overall spectrum adjustment function H 0 (f) in detail.

图12A示出了根据本说明书的实施例提供的一种整体调节函数H0(f)的曲线图。图12B示出了根据本说明书的实施例提供的一种整体调节函数H0(f)的曲线图。图12C示出了根据本说明书的实施例提供的一种整体调节函数H0(f)的曲线图。图12D示出了根据本说明书的实施例提供的一种整体调节函数H0(f)的曲线图。图12E示出了根据本说明书的实施例提供的一种整体调节函数H0(f)的曲线图。如图12A至12E所示,横轴为归一化频率f,纵轴为整体频谱调节函数H0(f)的幅值调节增益H0。图12A至12E中的曲线表示不同的整体频谱调节函数H0(f)。横轴的归一化频率最大值为0.5。所述横轴的归一化频率f可以分成低频区域,中低频区域,中频区域,中高频区域和高频区域。(0,a]之间的频率属于低频;(a,b]之间的频率属于中低频;(b,c]之间的频率属于中频;(c,d]之间的频率属于中高频;(d,0.5]之间的频率属于高频。其中,a,b,c,d,e的取值参考图8A所述,在此不再赘述。FIG. 12A shows a graph of an overall adjustment function H 0 (f) provided according to an embodiment of the present specification. FIG. 12B shows a graph of an overall adjustment function H 0 (f) provided according to an embodiment of the present specification. FIG. 12C shows a graph of an overall adjustment function H 0 (f) provided according to an embodiment of the present specification. FIG. 12D shows a graph of an overall adjustment function H 0 (f) provided according to an embodiment of the present specification. FIG. 12E shows a graph of an overall adjustment function H 0 (f) provided according to an embodiment of the present specification. As shown in FIGS. 12A to 12E , the horizontal axis is the normalized frequency f, and the vertical axis is the amplitude adjustment gain H 0 of the overall spectrum adjustment function H 0 (f). The curves in Figures 12A to 12E represent different overall spectral adjustment functions H 0 (f). The normalized frequency maximum value of the horizontal axis is 0.5. The normalized frequency f of the horizontal axis can be divided into a low frequency region, a middle and low frequency region, a middle frequency region, a middle and high frequency region and a high frequency region. The frequencies between (0, a] belong to low frequencies; the frequencies between (a, b] belong to the middle and low frequencies; the frequencies between (b, c] belong to the middle frequencies; the frequencies between (c, d) belong to the middle and high frequencies; The frequencies between (d, 0.5] belong to high frequencies. The values of a, b, c, d, and e are described with reference to FIG. 8A , which will not be repeated here.

由于人眼对于视频数据中的低频到中频的数据比对高频的数据更敏感,因此,在数据解压后,应尽量保持所述解压帧相对于所述初始帧低频到中频区域的信息不丢失,也就是说,整体频谱调节函数H0(f)应使所述解压帧在低频到中频区域的幅值不小于所述初始帧的85%,甚至可以大于所述初始帧。由于人眼对于高频区域的信息不敏感,因此,所述解压帧在高频区域的幅值可以根据不同的应用场景选择,比如,在低清晰度要求的场景下,所述解压帧在高频区域的幅值可以小于所述初始帧。在对清晰度要求很高的侦察场景下,所述解压帧在高频区域的幅值可以约等于所述初始帧或大于所述初始帧。如图12A至12E所示,整体调节函数H0(f)在低频至中频区域(包括低频和中频区域)的任意频率f上的幅值调节增益H0大于1或约等于1,使得解压后的解压帧的幅值不小于所述初始帧的85%,使得清晰度恢复或增强,提升视觉观察效果。所述约等于1在这里可以是在等于1的一定的误差范围内波动。所述误差范围可以在0、±1%、±2%、±3%、±4%、±5%、±6%、±7%、±8%、±9%、±10%、±11%、±12%、±13%、±14%、±15%等数值中任意两个所规定的区间内。为方便描述,我们将整体调节函数H0(f)在高频区域的幅值调节增益定义为第一幅值调节增益,在中频区域的幅值调节增益定义为第二幅值调节增益,在低频区域的幅值调节增益定义为第三幅值调节增益。所述第三幅值调节增益值、第二幅值调节增益值和第一幅值调节增益值可以在所述误差范围内波动。Since the human eye is more sensitive to the low-frequency to medium-frequency data in the video data than to the high-frequency data, after the data is decompressed, try to keep the information in the low-frequency to medium-frequency region of the decompressed frame relative to the initial frame not lost. , that is to say, the overall spectrum adjustment function H 0 (f) should make the amplitude of the decompressed frame in the low-frequency to mid-frequency region not less than 85% of the initial frame, and may even be larger than the initial frame. Since the human eye is not sensitive to the information in the high-frequency region, the amplitude of the decompressed frame in the high-frequency region can be selected according to different application scenarios. The amplitude of the frequency region may be smaller than the initial frame. In a reconnaissance scenario that requires high definition, the amplitude of the decompressed frame in the high frequency region may be approximately equal to or greater than the initial frame. As shown in FIGS. 12A to 12E , the amplitude adjustment gain H 0 of the overall adjustment function H 0 (f) at any frequency f in the low-frequency to intermediate-frequency region (including the low-frequency and intermediate-frequency regions) is greater than 1 or approximately equal to 1, so that after decompression The amplitude of the decompressed frame is not less than 85% of the initial frame, so that the definition can be restored or enhanced, and the visual observation effect can be improved. Said approximately equal to 1 may be fluctuated within a certain error range of equal to 1 here. The error range can be 0, ±1%, ±2%, ±3%, ±4%, ±5%, ±6%, ±7%, ±8%, ±9%, ±10%, ±11 %, ±12%, ±13%, ±14%, ±15%, etc., within the interval specified by any two values. For the convenience of description, we define the amplitude adjustment gain of the overall adjustment function H 0 (f) in the high frequency region as the first amplitude adjustment gain, and the amplitude adjustment gain in the intermediate frequency region as the second amplitude adjustment gain. The amplitude adjustment gain in the low frequency region is defined as the third amplitude adjustment gain. The third amplitude adjustment gain value, the second amplitude adjustment gain value and the first amplitude adjustment gain value may fluctuate within the error range.

如图12A所示,整体调节函数H0(f)在低频至高频区域的第三幅值调节增益值、第二幅值调节增益值和第一幅值调节增益值均约等于1,使所述解压帧在低频至高频区域的幅值都不小于所述初始帧的85%,使所述解压帧在低频至高频区域的数据可以平稳地恢复或基本恢复至初始帧的状态。As shown in FIG. 12A , the third amplitude adjustment gain value, the second amplitude adjustment gain value and the first amplitude adjustment gain value of the overall adjustment function H 0 (f) in the low frequency to high frequency region are all approximately equal to 1, so that The amplitude of the decompressed frame in the low frequency to high frequency region is not less than 85% of the initial frame, so that the data of the decompressed frame in the low frequency to high frequency region can be restored smoothly or basically to the state of the initial frame.

如图12B所示,整体调节函数H0(f)在低频至中频区域的第三幅值调节增益值和第二幅值调节增益值约等于1,使所述解压帧在低频至中频区域的数据可以平稳地恢复或基本恢复至初始帧的状态。整体调节函数H0(f)在高频区域的第一幅值调节增益值小于1,使所述解压帧在高频区域的幅值相对于所述初始帧平稳地降低,以抑制高频噪声。所述幅值的平稳降低可以是所述幅值以第一幅值调节增益值衰减,也可以是所述幅值在所述第一幅值调节增益值附近的一定误差范围内进行衰减。比如,所述第一幅值调节增益可以是0至1之间的任意数值。比如,所述第一幅值调节增益值可以在0、0.04、0.08、0.12、0.16、0.20、0.24、0.28、0.32、0.36、0.40、0.44、0.48、0.52、0.56、0.60、0.64、0.68、0.72、0.76、0.80、0.84、0.88、0.92、0.96和1等数值中任意两个所规定的区间内。如图12B所示,所述整体调节函数H0(f)在高频区域(大概是0.4~0.5的区间)的第一幅值调节增益在0.6左右。第二和第三幅值调节增益值都在1附近。第二和第三幅值调节增益值可以在一定的误差范围内波动,比如,第二和第三幅值调节增益值可以在0.85、0.90、0.95、1、1.05、1.10、和1.15等数值中任意两个所规定的区间内。As shown in FIG. 12B , the third amplitude adjustment gain value and the second amplitude adjustment gain value of the overall adjustment function H 0 (f) in the low frequency to medium frequency region are approximately equal to 1, so that the decompression frame is in the low frequency to medium frequency region. The data can be restored smoothly or basically to the state of the original frame. The first amplitude adjustment gain value of the overall adjustment function H 0 (f) in the high-frequency region is less than 1, so that the amplitude of the decompressed frame in the high-frequency region is smoothly reduced relative to the initial frame, so as to suppress high-frequency noise . The steady decrease of the amplitude value may be that the amplitude value is attenuated at the first amplitude value adjustment gain value, or the amplitude value may be attenuated within a certain error range near the first amplitude value adjustment gain value. For example, the first amplitude adjustment gain may be any value between 0 and 1. For example, the first amplitude adjustment gain value may be 0, 0.04, 0.08, 0.12, 0.16, 0.20, 0.24, 0.28, 0.32, 0.36, 0.40, 0.44, 0.48, 0.52, 0.56, 0.60, 0.64, 0.68, 0.72 , 0.76, 0.80, 0.84, 0.88, 0.92, 0.96 and 1 within the interval specified by any two values. As shown in FIG. 12B , the first amplitude adjustment gain of the overall adjustment function H 0 (f) in the high frequency region (approximately the interval of 0.4 to 0.5) is about 0.6. Both the second and third amplitude adjustment gain values are around 1. The second and third amplitude adjustment gain values may fluctuate within a certain error range, for example, the second and third amplitude adjustment gain values may be in values such as 0.85, 0.90, 0.95, 1, 1.05, 1.10, and 1.15 within any two specified intervals.

如图12C所示,整体调节函数H0(f)在低频区域的第三幅值调节增益值约等于1,使所述解压帧在低频区域的数据可以平稳地恢复或基本恢复至初始帧的状态。整体调节函数H0(f)在中频区域的第二幅值调节增益值和在高频区域的第一幅值调节增益值均大于1,使所述解压帧在中频至高频区域的幅值相对于所述初始帧平稳地增加,从而使中频至高频区域的数据清晰度增强。所述幅值的平稳增加可以是所述幅值以第二幅值调节增益值和第一幅值调节增益值增强,也可以是所述幅值在所述第二幅值调节增益值和所述第一幅值调节增益值附近的一定误差范围内进行增强。所述第二幅值调节增益值和所述第一幅值调节增益值大小可以大体一致,也可以是所述第二幅值调节增益值大于所述第一幅值调节增益值,或者所述第二幅值调节增益值小于所述第一幅值调节增益值。图12C所示的曲线中,所述第二幅值调节增益值和所述第一幅值调节增益值大小大体一致。所述第二幅值调节增益值和所述第一幅值调节增益值可以是大于1的任意数值。比如,所述第二幅值调节增益值和所述第一幅值调节增益值可以在1、1.1、1.2、1.3、1.4、1.5、1.6、1.7、1.8、1.9、2、2.1、2.2和2.4等数值中任意两个所规定的区间内。如图12C所示,所述整体调节函数H0(f)在中频至高频区域的第二幅值调节增益和第一幅值调节增益在1.2左右。As shown in FIG. 12C , the third amplitude adjustment gain value of the overall adjustment function H 0 (f) in the low frequency region is approximately equal to 1, so that the data of the decompressed frame in the low frequency region can be restored smoothly or basically restored to the original frame. state. The second amplitude adjustment gain value of the overall adjustment function H 0 (f) in the intermediate frequency region and the first amplitude adjustment gain value in the high frequency region are both greater than 1, so that the amplitude of the decompressed frame in the intermediate frequency to high frequency region is Increases smoothly relative to the initial frame, resulting in enhanced data clarity in the mid to high frequency region. The steady increase of the amplitude value may be that the amplitude value is enhanced by the second amplitude value adjustment gain value and the first amplitude value adjustment gain value, or the amplitude value may be increased between the second amplitude value adjustment gain value and the other amplitude value adjustment gain value. The enhancement is performed within a certain error range near the first amplitude adjustment gain value. The second amplitude adjustment gain value and the first amplitude adjustment gain value may be substantially the same, or the second amplitude adjustment gain value may be greater than the first amplitude adjustment gain value, or the The second amplitude adjustment gain value is smaller than the first amplitude adjustment gain value. In the curve shown in FIG. 12C , the second amplitude adjustment gain value and the first amplitude adjustment gain value are substantially the same. The second amplitude adjustment gain value and the first amplitude adjustment gain value may be any value greater than 1. For example, the second amplitude adjustment gain value and the first amplitude adjustment gain value may be at 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2, 2.1, 2.2 and 2.4 Within the interval specified by any two of the equivalent values. As shown in FIG. 12C , the second amplitude adjustment gain and the first amplitude adjustment gain of the overall adjustment function H 0 (f) in the mid-frequency to high-frequency region are around 1.2.

如图12D所示,整体调节函数H0(f)在低频区域的第三幅值调节增益值约等于1,使所述解压帧在低频区域的数据可以平稳地恢复或基本恢复至初始帧的状态。整体调节函数H0(f)在中频区域的第二幅值调节增益值大于1,使所述解压帧在中频的幅值相对于所述初始帧平稳地增加,从而使中频区域的数据清晰度增强。整体调节函数H0(f)在高频区域的第一幅值调节增益值小于1,使所述解压帧在高频区域的幅值相对于所述初始帧平稳地降低,从而使不敏感的高频区域的数据量下降,以抑制高频噪声。图12D所示的曲线在减少数据量的同时又能增强清晰度。所述第二幅值调节增益值可以是大于1的任意数值。所述第一幅值调节增益可以是0至1之间的任意数值。如图12D所示,所述整体调节函数H0(f)在中频区域的第二幅值调节增益在1.2左右,在高频区域的第一幅值调节增益在0.6左右。As shown in FIG. 12D , the third amplitude adjustment gain value of the overall adjustment function H 0 (f) in the low frequency region is approximately equal to 1, so that the data of the decompressed frame in the low frequency region can be restored smoothly or basically to the original frame. state. The second amplitude adjustment gain value of the overall adjustment function H 0 (f) in the intermediate frequency region is greater than 1, so that the amplitude of the decompressed frame in the intermediate frequency increases smoothly relative to the initial frame, so that the data clarity in the intermediate frequency region is improved. enhanced. The first amplitude adjustment gain value of the overall adjustment function H 0 (f) in the high frequency region is less than 1, so that the amplitude of the decompressed frame in the high frequency region is smoothly reduced relative to the initial frame, so that the insensitive The amount of data in the high frequency region is reduced to suppress high frequency noise. The curve shown in Figure 12D enhances clarity while reducing the amount of data. The second amplitude adjustment gain value may be any value greater than 1. The first amplitude adjustment gain may be any value between 0 and 1. As shown in FIG. 12D , the second amplitude adjustment gain of the overall adjustment function H 0 (f) in the intermediate frequency region is about 1.2, and the first amplitude adjustment gain in the high frequency region is about 0.6.

如图12E所示,整体调节函数H0(f)在低频区域的第三幅值调节增益值大于1,使所述解压帧在低频区域的的幅值相对于所述初始帧平稳地增加。整体调节函数H0(f)在中频区域的第二幅值调节增益值大于1,使所述解压帧在中频区域的幅值相对于所述初始帧平稳地增加,从而使低频至中频区域的数据清晰度增强。其中,所述第二幅值调节增益值可以等于所述第三幅值调节增益值,也可以大于所述第三幅值调节增益值。图12E所示的曲线中,所述第二幅值调节增益值大于所述第三幅值调节增益值,使所述解压帧在中频区域的幅值增加的幅度大于低频区域幅值增加的幅度,从而使人眼最敏感的中频区域的清晰度增强,提升视觉观察效果。整体调节函数H0(f)在高频区域的第一幅值调节增益值小于1,使所述解压帧在高频区域的幅值相对于所述初始帧平稳地降低,从而使不敏感的高频区域的数据量下降,以抑制高频噪声。图12E所示的曲线,在减少数据量的同时又能增强清晰度。所述第三幅值调节增益值可以是略大于1的数值。比如,第三幅值调节增益值可以在1、1.04、1.08、1.12、1.16和1.2等数值中任意两个所规定的区间内。所述第二幅值调节增益值可以是大于所述第三幅值调节增益的任意数值。比如,所述第二幅值调节增益值和所述第一幅值调节增益值可以在1、1.1、1.2、1.3、1.4、1.5、1.6、1.7、1.8、1.9、2、2.1、2.2和2.4等数值中任意两个所规定的区间内。所述第一幅值调节增益可以是0至1之间的任意数值。比如,所述第一幅值调节增益值可以在0、0.04、0.08、0.12、0.16、0.20、0.24、0.28、0.32、0.36、0.40、0.44、0.48、0.52、0.56、0.60、0.64、0.68、0.72、0.76、0.80、0.84、0.88、0.92、0.96和1等数值中任意两个所规定的区间内。如图12E所示,所述整体调节函数H0(f)在低频区域的第三幅值调节增益在1.1左右,在中频区域的第二幅值调节增益在1.2左右,在高频区域的第一幅值调节增益在0.6左右。As shown in FIG. 12E , the third amplitude adjustment gain value of the overall adjustment function H 0 (f) in the low frequency region is greater than 1, so that the amplitude of the decompressed frame in the low frequency region increases smoothly relative to the initial frame. The second amplitude adjustment gain value of the overall adjustment function H 0 (f) in the intermediate frequency region is greater than 1, so that the amplitude of the decompressed frame in the intermediate frequency region is steadily increased relative to the initial frame, so as to make the low frequency to the intermediate frequency region. Data clarity is enhanced. Wherein, the second amplitude adjustment gain value may be equal to the third amplitude adjustment gain value, or may be greater than the third amplitude adjustment gain value. In the curve shown in FIG. 12E , the second amplitude adjustment gain value is greater than the third amplitude adjustment gain value, so that the amplitude of the decompressed frame in the intermediate frequency region is increased by a larger amplitude than that in the low frequency region. , so as to enhance the clarity of the intermediate frequency region where the human eye is most sensitive and improve the visual observation effect. The first amplitude adjustment gain value of the overall adjustment function H 0 (f) in the high frequency region is less than 1, so that the amplitude of the decompressed frame in the high frequency region is smoothly reduced relative to the initial frame, so that the insensitive The amount of data in the high frequency region is reduced to suppress high frequency noise. The curve shown in Figure 12E enhances clarity while reducing the amount of data. The third amplitude adjustment gain value may be a value slightly greater than 1. For example, the third amplitude adjustment gain value may be within an interval specified by any two values of 1, 1.04, 1.08, 1.12, 1.16, and 1.2. The second amplitude adjustment gain value may be any value greater than the third amplitude adjustment gain. For example, the second amplitude adjustment gain value and the first amplitude adjustment gain value may be at 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2, 2.1, 2.2 and 2.4 Within the interval specified by any two of the equivalent values. The first amplitude adjustment gain may be any value between 0 and 1. For example, the first amplitude adjustment gain value may be 0, 0.04, 0.08, 0.12, 0.16, 0.20, 0.24, 0.28, 0.32, 0.36, 0.40, 0.44, 0.48, 0.52, 0.56, 0.60, 0.64, 0.68, 0.72 , 0.76, 0.80, 0.84, 0.88, 0.92, 0.96 and 1 within the interval specified by any two of the values. As shown in FIG. 12E , the third amplitude adjustment gain of the overall adjustment function H 0 (f) in the low frequency region is about 1.1, the second amplitude adjustment gain in the intermediate frequency region is about 1.2, and the third amplitude adjustment gain in the high frequency region is about 1.2. A value adjustment gain is around 0.6.

进一步地,当所述高频区域同所述中频区域不相连的时候,所述整体频谱调节函数H0(f)还可以在高频区域的幅值做出调节,使得所述幅值调节增益在中高频区域内的变化平滑而连续。Further, when the high frequency region is not connected with the intermediate frequency region, the overall spectrum adjustment function H 0 (f) can also be adjusted in the amplitude of the high frequency region, so that the amplitude adjustment gain Changes in the mid-high frequency region are smooth and continuous.

进一步地,当所述中频区域同所述低频区域不相连的时候,所述整体频谱调节函数H0(f)还可以在中低频区域的幅值做出调节,使得所述幅值调节增益在中低频区域内的变化连续。Further, when the intermediate frequency region is not connected with the low frequency region, the overall spectrum adjustment function H 0 (f) can also be adjusted in the amplitude of the intermediate and low frequency region, so that the amplitude adjustment gain is at Changes in the mid-low frequency region are continuous.

所述整体调节函数H0(f)的曲线是平滑过渡的曲线。在工程实现上,在实现所述解压帧在低频至中频区域幅值约等于或大于所述初始帧的基础上可以允许所述整体调节函数H0(f)的曲线存在小范围的波动,所述波动不影响解压的效果。对于视频数据之外其他形式的数据来说,可以根据接收者对于数据的敏感程度,设置所述整体调节函数H0(f)的参数。不同形式的数据,接收者对于频率的敏感程度不同。The curve of the overall adjustment function H 0 (f) is a smooth transition curve. In terms of engineering implementation, on the basis of realizing that the amplitude of the decompressed frame in the low frequency to medium frequency region is approximately equal to or greater than that of the initial frame, a small range of fluctuations in the curve of the overall adjustment function H 0 (f) can be allowed, so The above fluctuation does not affect the effect of decompression. For data in other forms than video data, the parameters of the overall adjustment function H 0 (f) can be set according to the sensitivity of the receiver to the data. Different forms of data have different degrees of frequency sensitivity of receivers.

为了方便描述,我们将以公式(13)所示的情况为例进行描述。结合公式(8)和公式(13),则所述解压帧P4可以表示为以下公式:For the convenience of description, we will take the case shown in formula (13) as an example for description. Combining formula (8) and formula (13), the decompressed frame P 4 can be expressed as the following formula:

Figure BDA0002884076930000621
Figure BDA0002884076930000621

此时,所述编码卷积核对应的编码频谱调节函数H1(f)与所述解码卷积核对应的解码频谱调节函数H2(f)之间的关系可以表示为以下公式:At this time, the relationship between the encoding spectrum adjustment function H 1 (f) corresponding to the encoding convolution kernel and the decoding spectrum adjustment function H 2 (f) corresponding to the decoding convolution kernel can be expressed as the following formula:

Figure BDA0002884076930000622
Figure BDA0002884076930000622

因此,H1(f)与H2(f)的关系可以表示为以下公式:Therefore, the relationship between H 1 (f) and H 2 (f) can be expressed as the following formula:

Figure BDA0002884076930000623
Figure BDA0002884076930000623

其中,由于解码频谱调节函数H2(f)中,除了频率为0的部分的幅值调节增益为1之外,其他频率的幅值调节增益均小于1,因此1/(1+b(1-H2(f)))在除频率为0外的其他频率上的值均小于1,因此,公式(16)可以保证编码频谱调节函数H1(f)中频率为0的部分的幅值调节增益为1,而其他频率对应的幅值调节增益小于1。Among them, in the decoding spectrum adjustment function H 2 (f), except that the amplitude adjustment gain of the part whose frequency is 0 is 1, the amplitude adjustment gain of other frequencies is less than 1, so 1/(1+b(1 -H 2 (f))) is less than 1 at other frequencies except frequency 0, so formula (16) can guarantee the amplitude of the part of frequency 0 in the encoding spectrum adjustment function H 1 (f) The adjustment gain is 1, while the amplitude adjustment gain corresponding to other frequencies is less than 1.

如前所述,如果所述初始帧经过多个方向的卷积时,则所述解码帧也进行多个方向的卷积,且所述解码帧在卷积时方向和顺序与所述初始帧在卷积时的方向和顺序相反。即所述初始帧先进行垂直方向的卷积再进行水平方向的卷积,则所述解码帧先进行水平方向的卷积再进行垂直方向的卷积。需要说明的是,所述解码帧需先进行水平方向的卷积得到水平方向的补偿信息,将所述解码帧水平方向的补偿信息与所述解码帧叠加后,再进行垂直方向的卷积得到垂直方向的补偿信息,并将所述解码帧垂直方向的补偿信息与所述解码帧进行叠加。As mentioned above, if the initial frame undergoes convolution in multiple directions, the decoded frame also undergoes convolution in multiple directions, and the decoded frame is convolved in direction and order with the initial frame The direction and order are reversed during convolution. That is, the initial frame first performs convolution in the vertical direction and then performs convolution in the horizontal direction, and the decoded frame performs convolution in the horizontal direction first and then performs convolution in the vertical direction. It should be noted that the decoded frame needs to perform horizontal convolution to obtain the compensation information in the horizontal direction, and after superimposing the compensation information in the horizontal direction of the decoded frame with the decoded frame, then perform convolution in the vertical direction to obtain the compensation information. compensation information in the vertical direction, and superimpose the compensation information in the vertical direction of the decoded frame with the decoded frame.

图13A示出了根据本说明书的实施例提供的正常模式一种整体调节函数H0(f)、编码频谱调节函数H1(f)和解码频谱调节函数H2(f)的曲线图。图13B示出了根据本说明书的实施例提供的一种增强模式的整体调节函数H0(f)、编码频谱调节函数H1(f)和解码频谱调节函数H2(f)的曲线图。图13A与图13B中所使用的编码卷积核与解码卷积核相同,调整系数b相同。在图13A和图13B中以b=1.5为例进行说明。如图13A和图13B所示,横轴为归一化频率f,纵轴为幅值调节增益H。如图13A所示,在任意频率区域的整体频谱调节函数H0(f)≈1,整体频谱调节函数H0(f)对所述叠加解压帧进行正常模式的频谱调节,即整体频谱调节函数H0(f)中对于所有频率的信息完整保留,所述解压帧中的数据可以基本恢复至所述初始帧中的数据。如图13B所示,在低频区域的整体频谱调节函数H0(f)≈1,在中频至高频区域的整体频谱调节函数H0(f)>1。整体频谱调节函数H0(f)对所述解压帧的中频至高频区域进行增强模式的频谱调节,即整体频谱调节函数H0(f)中对于中频至高频区域的信息进行增强,所述解压帧中的中频至高频区域的数据相较于所述初始帧中的中频至高频区域的数据有所增强。需要说明的是,图13A和图13B所示的曲线,只是示例性说明,本领域的技术人员应该明白H0(f)、H1(f)、H2(f)的曲线并不局限于图13A和图13B所示的形式,所有符合公式(15)的H0(f)、H1(f)、H2(f)曲线都属于本说明书保护的范围。需要指出的是,所有符合公式(15)的解码频谱调节函数线性组合

Figure BDA0002884076930000631
或者编码频谱调节函数乘积组合
Figure BDA0002884076930000632
或者线性组合和乘积组合的组合都属于本说明书保护的范围。其中,i≥1,
Figure BDA0002884076930000633
代表n个函数的线性组合,H2i(f)代表第i个函数,ki代表第i个函数对应的权重。j≥1,
Figure BDA0002884076930000634
Figure BDA0002884076930000635
代表n个函数的乘积组合,kj代表第j个函数对应的权重,H2j(f)可以是任意函数。13A shows a graph of an overall adjustment function H 0 (f), an encoding spectrum adjustment function H 1 (f), and a decoded spectrum adjustment function H 2 (f) in the normal mode provided according to an embodiment of the present specification. FIG. 13B shows graphs of the overall adjustment function H 0 (f), the encoding spectrum adjustment function H 1 (f) and the decoded spectrum adjustment function H 2 (f) of an enhancement mode provided according to an embodiment of the present specification. The encoding convolution kernel and the decoding convolution kernel used in FIG. 13A and FIG. 13B are the same, and the adjustment coefficient b is the same. In FIGS. 13A and 13B, b=1.5 is taken as an example for description. As shown in FIGS. 13A and 13B , the horizontal axis is the normalized frequency f, and the vertical axis is the amplitude adjustment gain H. As shown in FIG. 13A , the overall spectrum adjustment function H 0 (f)≈1 in any frequency region, the overall spectrum adjustment function H 0 (f) performs the normal mode spectrum adjustment on the superimposed decompression frame, that is, the overall spectrum adjustment function The information for all frequencies in H 0 (f) is completely preserved, and the data in the decompressed frame can be basically restored to the data in the initial frame. As shown in FIG. 13B , the overall spectral adjustment function H 0 (f)≈1 in the low frequency region, and the overall spectral adjustment function H 0 (f)>1 in the middle frequency to high frequency region. The overall spectrum adjustment function H 0 (f) performs spectrum adjustment in the enhancement mode on the intermediate frequency to high frequency region of the decompressed frame, that is, the information in the intermediate frequency to high frequency region in the overall spectrum adjustment function H 0 (f) is enhanced, so The data in the intermediate frequency to high frequency region in the decompressed frame is enhanced compared to the data in the intermediate frequency to high frequency region in the initial frame. It should be noted that the curves shown in FIG. 13A and FIG. 13B are only illustrative, and those skilled in the art should understand that the curves of H 0 (f), H 1 (f) and H 2 (f) are not limited to In the forms shown in FIGS. 13A and 13B , all H 0 (f), H 1 (f), and H 2 (f) curves conforming to formula (15) fall within the protection scope of this specification. It should be pointed out that all the decoding spectrum adjustment functions conforming to formula (15) are linearly combined
Figure BDA0002884076930000631
Or code spectrum adjustment function product combination
Figure BDA0002884076930000632
Or the combination of linear combination and product combination all belong to the protection scope of this specification. Among them, i≥1,
Figure BDA0002884076930000633
Represents the linear combination of n functions, H 2i (f) represents the ith function, and ki represents the weight corresponding to the ith function. j≥1,
Figure BDA0002884076930000634
Figure BDA0002884076930000635
Represents the product combination of n functions, k j represents the weight corresponding to the jth function, and H 2j (f) can be any function.

表7示出了根据本说明书的实施例提供的一种解码卷积核的参数表。表7示例性地列举出一个解码卷积核的参数。所述解码卷积核的参数均为非负数,使得经过所述解码卷积核卷积的数据避免振铃效应。表7中只是示例性的举例说明,本领域技术人员应该知道所述解码卷积核不止局限于表7所示的参数,所有满足前述要求的解码卷积核都属于本说明书保护的范围。Table 7 shows a parameter table of a decoding convolution kernel provided according to an embodiment of the present specification. Table 7 exemplarily lists the parameters of a decoding convolution kernel. The parameters of the decoding convolution kernel are all non-negative numbers, so that the data convolved by the decoding convolution kernel avoids the ringing effect. Table 7 is only an exemplary illustration, and those skilled in the art should know that the decoding convolution kernel is not limited to the parameters shown in Table 7, and all decoding convolution kernels that meet the foregoing requirements belong to the protection scope of this specification.

Figure BDA0002884076930000641
Figure BDA0002884076930000641

表8示出了根据本说明书的实施例提供的一种正常模式的编码卷积核的参数表。表8示例性地列举出一个正常模式的编码卷积核的参数。所述正常模式的编码卷积核是基于所述正常模式的整体频谱调节函数H0(f),以及表7中示出的解码卷积核的参数表对应的解码频谱调节函数H2(f),得到的编码频谱调节函数H1(f)通过傅里叶变换得到的。即所述编码频谱调节函数H1(f)是对应于H0(f)=1得到的。数据压缩设备200和数据解压设备300使用表8中示出的所述正常模式的编码卷积核和表7中示出的所述解码卷积核可以使所述叠加帧的数据与所述初始帧的数据基本一致。表8中只是示例性的举例说明,本领域技术人员应该知道所述正常模式的编码卷积核不止局限于表8所示的参数,所有满足前述要求的编码卷积核都属于本说明书保护的范围。Table 8 shows a parameter table of a normal mode encoding convolution kernel provided according to an embodiment of the present specification. Table 8 exemplarily lists the parameters of a normal mode encoding convolution kernel. The encoding convolution kernel of the normal mode is based on the overall spectrum adjustment function H 0 (f) of the normal mode, and the decoding spectrum adjustment function H 2 (f) corresponding to the parameter table of the decoding convolution kernel shown in Table 7. ), the obtained coded spectrum adjustment function H 1 (f) is obtained by Fourier transform. That is, the encoding spectrum adjustment function H 1 (f) is obtained corresponding to H 0 (f)=1. The data compression apparatus 200 and the data decompression apparatus 300 can use the normal mode encoding convolution kernel shown in Table 8 and the decoding convolution kernel shown in Table 7 to make the data of the superimposed frame and the initial The data of the frame is basically the same. Table 8 is only an exemplary illustration. Those skilled in the art should know that the encoding convolution kernel of the normal mode is not limited to the parameters shown in Table 8, and all encoding convolution kernels that meet the aforementioned requirements belong to the protection of this specification. scope.

Figure BDA0002884076930000642
Figure BDA0002884076930000642

表9示出了根据本说明书的实施例提供的一种增强模式的编码卷积核的参数表。所述增强模式的编码卷积核是基于所述增强模式的整体频谱调节函数H0(f),以及表7中示出的解码卷积核的参数表对应的解码频谱调节函数H2(f),得到的编码频谱调节函数H1(f)通过傅里叶变换得到的。即所述编码频谱调节函数H1(f)是对应于H0(f)>1得到的。数据压缩设备200使用表9中示出的所述增强模式的编码卷积核和表7中示出的所述解码卷积核可以使所述叠加帧的数据增强。表9中只是示例性的举例说明,本领域技术人员应该知道所述增强模式的编码卷积核不止局限于表9所示的参数,所有满足前述要求的编码卷积核都属于本说明书保护的范围。Table 9 shows a parameter table of a coding convolution kernel of an enhancement mode provided according to an embodiment of the present specification. The encoding convolution kernel of the enhancement mode is based on the overall spectrum adjustment function H 0 (f) of the enhancement mode, and the decoding spectrum adjustment function H 2 (f) corresponding to the parameter table of the decoding convolution kernel shown in Table 7. ), the obtained coded spectrum adjustment function H 1 (f) is obtained by Fourier transform. That is, the encoding spectrum adjustment function H 1 (f) is obtained corresponding to H 0 (f)>1. The data compression apparatus 200 can enhance the data of the superimposed frame using the encoding convolution kernel of the enhancement mode shown in Table 9 and the decoding convolution kernel shown in Table 7. Table 9 is only an exemplary illustration. Those skilled in the art should know that the encoding convolution kernel of the enhanced mode is not limited to the parameters shown in Table 9, and all encoding convolution kernels that meet the aforementioned requirements belong to the protection of this specification. scope.

Figure BDA0002884076930000651
Figure BDA0002884076930000651

需要说明的是,卷积运算后,需要进行归一化处理,使卷积运算后的图像的灰度值在0~255之间。It should be noted that, after the convolution operation, a normalization process needs to be performed, so that the grayscale value of the image after the convolution operation is between 0 and 255.

需要说明的是,在码率很高的情况下,所述解压帧中噪声很小,可以不进行上述边界校正。在码率较低的情况下,或者在增强模式下,即H0(f)>1的模式下,过度增强可能会使所述解压帧中出现噪声,影响视觉观察的效果。我们可以对所述在解帧的边界进行所述边界校正,得到所述解压帧,以有效消除噪声。It should be noted that, when the code rate is high, the noise in the decompressed frame is very small, and the above boundary correction may not be performed. In the case of a low bit rate, or in the enhancement mode, that is, the mode in which H 0 (f)>1, excessive enhancement may cause noise in the decompressed frame, affecting the effect of visual observation. We can perform the boundary correction on the boundary of the decompressed frame to obtain the decompressed frame, so as to effectively eliminate noise.

图14A示出了根据本说明书的实施例提供的一种未进行边界校正的解压后的图像示例图;图14B示出了根据本说明书的实施例提供的一种进行边界校正的解压后的图像示例图。对比图14A和图14B发现,本说明所述的边界校正的方法可以有效消除噪声。Fig. 14A shows an example diagram of a decompressed image without boundary correction provided according to an embodiment of this specification; Fig. 14B shows a decompressed image with boundary correction provided according to an embodiment of this specification sample graph. Comparing FIG. 14A and FIG. 14B , it is found that the boundary correction method described in this specification can effectively eliminate noise.

综上所述,本说明书提供的数据处理的系统100,在对所述初始数据进行压缩时,通过数据压缩设备200执行方法P200,对所述初始数据中的所述初始帧中的小范围内的边界通过所述第一伽马算法进行调节,避免相邻像素值差值较小的边界信息在数据压缩过程中丢失,避免细节损失,同时所述方法P200对所述初始帧使用编码卷积核进行编码频谱调节,使所述初始帧在频域内的低频至高频区域的幅值平稳地降低,从而减少所述初始帧中的数据信息,提高编码效率,使得压缩后的数据容量减小,提高数据的压缩效率以及数据传输效率。本说明书提供的数据处理的系统100,在对所述压缩帧进行解压时,通过数据解压设备300执行方法P300,对所述压缩帧使用解码卷积核进行解码频谱调节,使用平滑过渡的解码频谱调节函数H2(f)对所述压缩帧进行频谱调节,过滤所述压缩帧中的中频至高频区域的分量,然后对所述压缩帧和经过所述解码频谱调节的压缩帧求差,得到初始帧的边界信息,对所述初始帧的边界信息中的小范围内的边界通过所述第二伽马算法进行减弱,以消除边界中的噪声;将所述解码帧与降噪后的所述边界信息叠加,以得到所述解压帧。其中,所述解码频谱调节函数H2(f)对应的解码卷积核与编码卷积核相对应,所有系数都是非负数,或者负系数的和的绝对值与非负系数的和的比值小于0.1,从而有效避免噪声的出现,使所述解压帧更清晰。所述方法和系统可以提高数据的压缩效率,提升传输效率,避免细节丢失,同时可以提升解压后的数据的清晰度,有效消除噪声。To sum up, the data processing system 100 provided in this specification, when compressing the initial data, executes the method P200 by the data compression device 200 to compress the initial data in the small range of the initial frame The boundary is adjusted by the first gamma algorithm to avoid the loss of boundary information with a small difference between adjacent pixel values during the data compression process and the loss of details, while the method P200 uses coding convolution for the initial frame. The kernel performs encoding spectrum adjustment, so that the amplitude of the initial frame in the low-frequency to high-frequency region in the frequency domain is steadily reduced, thereby reducing the data information in the initial frame, improving the encoding efficiency, and reducing the compressed data capacity. , improve data compression efficiency and data transmission efficiency. The data processing system 100 provided in this specification, when decompressing the compressed frame, executes the method P300 through the data decompression device 300, uses a decoding convolution kernel to perform decoding spectrum adjustment on the compressed frame, and uses a smooth transition decoding spectrum The adjustment function H 2 (f) performs spectrum adjustment on the compressed frame, filters the components in the intermediate frequency to high frequency region in the compressed frame, and then calculates the difference between the compressed frame and the compressed frame adjusted by the decoded spectrum, The boundary information of the initial frame is obtained, and the boundary within a small range in the boundary information of the initial frame is weakened by the second gamma algorithm to eliminate the noise in the boundary; The boundary information is superimposed to obtain the decompressed frame. Wherein, the decoding convolution kernel corresponding to the decoding spectrum adjustment function H 2 (f) corresponds to the encoding convolution kernel, and all coefficients are non-negative numbers, or the ratio of the absolute value of the sum of the negative coefficients to the sum of the non-negative coefficients is less than 0.1, thereby effectively avoiding the appearance of noise and making the decompressed frame clearer. The method and system can improve data compression efficiency, improve transmission efficiency, avoid loss of details, and at the same time can improve the clarity of decompressed data and effectively eliminate noise.

本说明书另外提供一种非暂时性存储介质,存储有至少一组用来进行数据处理的可执行指令,当所述可执行指令被处理器执行时,所述可执行指令指导所述处理器实施数据处理方法P200的步骤。在一些可能的实施方式中,本说明书的各个方面还可以实现为一种程序产品的形式,其包括程序代码。当所述程序产品在数据压缩设备200上运行时,所述程序代码用于使数据压缩设备200执行本说明书描述的数据处理的步骤。用于实现上述方法的程序产品可以采用便携式紧凑盘只读存储器(CD-ROM)并包括程序代码,并可以在数据压缩设备200,例如个人电脑上运行。然而,本说明书的程序产品不限于此,在本说明书中,可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统(例如压缩端处理器220)使用或者与其结合使用。所述程序产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以为但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。所述计算机可读存储介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读存储介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。可读存储介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。可以以一种或多种程序设计语言的任意组合来编写用于执行本说明书操作的程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在数据压缩设备200上执行、部分地在数据压缩设备200上执行、作为一个独立的软件包执行、部分在数据压缩设备200上部分在远程计算设备上执行、或者完全在远程计算设备上执行。在涉及远程计算设备的情形中,远程计算设备可以通过传输媒介120连接到数据压缩设备200,或者,可以连接到外部计算设备。This specification further provides a non-transitory storage medium storing at least one set of executable instructions for data processing, and when the executable instructions are executed by a processor, the executable instructions instruct the processor to implement The steps of data processing method P200. In some possible implementations, various aspects of this specification may also be implemented in the form of a program product, which includes program code. When the program product is run on the data compression device 200, the program code is used to cause the data compression device 200 to perform the data processing steps described in this specification. A program product for implementing the above-described method may employ a portable compact disc read only memory (CD-ROM) and include program code, and may run on a data compression device 200, such as a personal computer. However, the program product of this specification is not limited thereto, and in this specification, a readable storage medium may be any tangible medium that contains or stores a program that can be used by or combined with an instruction execution system (eg, the compressor side processor 220 ). use. The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples of readable storage media include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory ( EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing. The computer-readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, carrying readable program code therein. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A readable storage medium can also be any readable medium other than a readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing. Program code for carrying out the operations of this specification may be written in any combination of one or more programming languages, including object-oriented programming languages—such as Java, C++, etc., as well as conventional procedural Programming Language - such as the "C" language or similar programming language. The program code may execute entirely on data compression device 200, partly on data compression device 200, as a stand-alone software package, partly on data compression device 200 and partly on a remote computing device, or entirely remotely Execute on the computing device. In cases involving a remote computing device, the remote computing device may be connected to data compression device 200 through transmission medium 120, or, alternatively, may be connected to an external computing device.

上述对本说明书特定实施例进行了描述。其他实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者是可能有利的。The foregoing describes specific embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that in the embodiments and still achieve desirable results. Additionally, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

综上所述,在阅读本详细公开内容之后,本领域技术人员可以明白,前述详细公开内容可以仅以示例的方式呈现,并且可以不是限制性的。尽管这里没有明确说明,本领域技术人员可以理解本说明书需求囊括对实施例的各种合理改变,改进和修改。这些改变,改进和修改旨在由本说明书提出,并且在本说明书的示例性实施例的精神和范围内。In conclusion, after reading this detailed disclosure, those skilled in the art will appreciate that the foregoing detailed disclosure may be presented by way of example only, and may not be limiting. Although not explicitly described herein, it will be understood by those skilled in the art that this description needs to encompass various reasonable changes, improvements and modifications to the embodiments. Such changes, improvements and modifications are intended to be suggested by this specification and are within the spirit and scope of the exemplary embodiments of this specification.

此外,本说明书中的某些术语已被用于描述本说明书的实施例。例如,“一个实施例”,“实施例”和/或“一些实施例”意味着结合该实施例描述的特定特征,结构或特性可以包括在本说明书的至少一个实施例中。因此,可以强调并且应当理解,在本说明书的各个部分中对“实施例”或“一个实施例”或“替代实施例”的两个或更多个引用不一定都指代相同的实施例。此外,特定特征,结构或特性可以在本说明书的一个或多个实施例中适当地组合。Furthermore, certain terms in this specification have been used to describe embodiments of this specification. For example, "one embodiment," "an embodiment," and/or "some embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of this specification. Thus, it is emphasized and should be understood that two or more references to "an embodiment" or "one embodiment" or "an alternative embodiment" in various parts of this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures or characteristics may be combined as appropriate in one or more embodiments of this specification.

应当理解,在本说明书的实施例的前述描述中,为了帮助理解一个特征,出于简化本说明书的目的,本说明书将各种特征组合在单个实施例、附图或其描述中。然而,这并不是说这些特征的组合是必须的,本领域技术人员在阅读本说明书的时候完全有可能将其中一部分特征提取出来作为单独的实施例来理解。也就是说,本说明书中的实施例也可以理解为多个次级实施例的整合。而每个次级实施例的内容在于少于单个前述公开实施例的所有特征的时候也是成立的。It will be appreciated that, in the foregoing description of embodiments of this specification, in order to aid in the understanding of one feature, the specification, for the purpose of simplifying the specification, groups various features in a single embodiment, drawings, or description thereof. However, this does not mean that the combination of these features is necessary, and it is entirely possible for those skilled in the art to extract some of the features as a separate embodiment to understand when reading this specification. That is to say, the embodiments in this specification can also be understood as the integration of multiple sub-embodiments. It is also true that each sub-embodiment contains less than all features of a single foregoing disclosed embodiment.

本文引用的每个专利,专利申请,专利申请的出版物和其他材料,例如文章,书籍,说明书,出版物,文件,物品等,可以通过引用结合于此。用于所有目的的全部内容,除了与其相关的任何起诉文件历史,可能与本文件不一致或相冲突的任何相同的,或者任何可能对权利要求的最宽范围具有限制性影响的任何相同的起诉文件历史。现在或以后与本文件相关联。举例来说,如果在与任何所包含的材料相关联的术语的描述、定义和/或使用与本文档相关的术语、描述、定义和/或之间存在任何不一致或冲突时,使用本文件中的术语为准。Each patent, patent application, publication of a patent application, and other materials, such as articles, books, specifications, publications, documents, articles, etc., cited herein, may be incorporated herein by reference. For all purposes in its entirety, except any filing history with which it relates, any identical filing that may be inconsistent or conflicting with this document, or any identical filing that may have a restrictive effect on the broadest scope of the claims history. associated with this document now or in the future. For example, in the event of any inconsistency or conflict between the descriptions, definitions, and/or use of terms, descriptions, definitions, and/or terms associated with any of the included materials, use The term shall prevail.

最后,应理解,本文公开的申请的实施方案是对本说明书的实施方案的原理的说明。其他修改后的实施例也在本说明书的范围内。因此,本说明书披露的实施例仅仅作为示例而非限制。本领域技术人员可以根据本说明书中的实施例采取替代配置来实现本说明书中的申请。因此,本说明书的实施例不限于申请中被精确地描述过的实施例。Finally, it should be understood that the embodiments of the application disclosed herein are illustrative of the principles of the embodiments of the present specification. Other modified embodiments are also within the scope of this specification. Therefore, the embodiments disclosed in this specification are merely illustrative and not limiting. Those skilled in the art may adopt alternative configurations according to the embodiments in this specification to implement the applications in this specification. Accordingly, the embodiments of this specification are not limited to those precisely described in the application.

Claims (25)

1. A method of data processing, comprising:
selecting an initial frame in the initial data, wherein the initial frame comprises initial data with preset byte number; and
performing data compression on the initial frame to obtain a compressed frame, wherein the data compression includes performing boundary adjustment on the initial frame and performing coding spectrum adjustment on a compressed frame, the compressed frame includes the initial frame and any data state before the initial frame becomes the compressed frame in the data compression process,
wherein the encoded spectral conditioning includes convolving the intra-compressed frame with an encoded convolution kernel to smoothly reduce the amplitude of the intermediate frequency region of the intra-compressed frame in the frequency domain.
2. The method of data processing as claimed in claim 1, wherein the boundary adjustment includes adjusting a boundary having a boundary value within a first preset range among the boundaries of the initial frame by a first gamma algorithm having a gamma value less than 1.
3. The method of data processing according to claim 2, wherein said data compressing said initial frame comprises:
firstly, the boundary adjustment is carried out on the initial frame, and then the coding spectrum adjustment is carried out; or alternatively
And firstly, carrying out the coding spectrum adjustment on the initial frame, and then carrying out the boundary adjustment.
4. The method of data processing according to claim 3, wherein said boundary adjustment prior to said code spectrum adjustment for said initial frame comprises:
performing the boundary adjustment on the initial frame to obtain a first enhanced frame; and
performing the coded spectral modification and coding on the first enhancement frame, including one of:
performing the coding spectrum adjustment on the first enhancement frame, and then performing prediction and residual calculation on the first enhancement frame after the coding spectrum adjustment, wherein the compressed frame comprises the first enhancement frame;
predicting the first enhancement frame to obtain a prediction frame, and then performing the coding spectrum adjustment and residual calculation on the first enhancement frame and the prediction frame, wherein the on-press frame comprises the first enhancement frame and the prediction frame; and
and predicting and solving a residual error of the first enhanced initial frame, and then performing the coded spectrum regulation on the residual error, wherein the compressed frame comprises the residual error.
5. The method of data processing according to claim 4, wherein said performing said boundary adjustment on said initial frame to obtain a first enhanced frame comprises:
adjusting the initial frame through a first adjusting function to obtain a first frame, so that the component of the initial frame in a low-frequency region in a frequency domain is reserved and the component of a middle-frequency region to a high-frequency region is attenuated;
obtaining a first boundary by subtracting the initial frame and the first frame, wherein the first boundary comprises boundary information of the initial frame;
adjusting the boundary of which the boundary value is within the first preset range in the first boundary through the first gamma algorithm to obtain an enhanced boundary; and
and superposing the first frame and the enhanced boundary to obtain the first enhanced frame.
6. The method of data processing according to claim 5, wherein said performing said boundary adjustment on said initial frame to obtain a first enhanced frame prior to said obtaining an enhanced boundary, further comprises:
and enhancing the first boundary by a first coefficient, wherein the first coefficient is an arbitrary number greater than 1, and the first boundary comprises the boundary enhanced by the first coefficient.
7. The data processing method of claim 5, wherein the adjusting the boundary of the first boundary whose boundary value is within the first preset range to obtain an enhanced boundary comprises:
adjusting the first boundary through a second adjusting function to obtain a second boundary, so that the component of the first boundary in a low-frequency region in a frequency domain is reserved and the component of a medium-frequency region to a high-frequency region is attenuated; and
and adjusting the boundary of which the boundary value is within the first preset range in the second boundary through the first gamma algorithm to obtain the enhanced boundary.
8. The method of data processing according to claim 3, wherein said performing said code spectrum adjustment prior to said boundary adjustment for said initial frame comprises:
performing the coding spectrum adjustment on the initial frame to obtain a coding spectrum adjustment frame;
performing the boundary adjustment on the coding frequency spectrum adjustment frame to obtain a second enhancement frame; and
and predicting and residual solving are carried out on the second enhanced frame.
9. The data processing method of claim 8, wherein said performing said boundary adjustment on said encoded spectrally adjusted frame to obtain a second enhancement frame comprises:
obtaining a first boundary by subtracting the initial frame and the coding spectrum adjustment frame, wherein the first boundary comprises boundary information of the initial frame;
adjusting the boundary of which the boundary value is within the first preset range in the first boundary through the first gamma algorithm to obtain an enhanced boundary;
obtaining a first boundary of the first image, and obtaining an enhanced boundary; and
and superposing the coding frequency spectrum adjusting frame and the adjusting value to obtain the second enhancement frame.
10. The data processing method of claim 9, wherein said boundary adjusting said coded spectral adjustment frame prior to said deriving an enhancement boundary, resulting in a second enhancement frame, further comprising:
and enhancing the first boundary by a first coefficient, wherein the first coefficient is an arbitrary number greater than 1, and the first boundary comprises the boundary enhanced by the first coefficient.
11. The data processing method of claim 9, wherein the adjusting the boundary of the first boundary whose boundary value is within the first predetermined range to obtain an enhanced boundary comprises:
adjusting the first boundary through a second adjusting function to obtain a second boundary, so that the component of the first boundary in a low-frequency area in a frequency domain is reserved, and the component of a medium-frequency area to a high-frequency area is attenuated; and
and adjusting the boundary of which the boundary value is within the first preset range in the second boundary through the first gamma algorithm to obtain the enhanced boundary.
12. The method of data processing according to claim 1, wherein said code spectrum adjustment of said on-press frame comprises:
determining a frame type of the initial frame, the frame type comprising at least one of an intra-predicted frame, a forward-predicted frame, and a bi-directionally predicted frame; and
and selecting one convolution kernel from the coding convolution kernel group as the coding convolution kernel to convolute the compressed frame based on the frame type of the initial frame.
13. The method of data processing according to claim 12, wherein said convolving the compressed frame comprises:
and performing convolution on the compressed frame in at least one direction of a vertical direction, a horizontal direction and an oblique direction.
14. The method of data processing according to claim 1, wherein said encoded spectral modification is such that the amplitude of said at-compressed-frame high-frequency region is reduced smoothly in the frequency domain.
15. The method of data processing according to claim 1, wherein said encoding spectral adjustment is such that the amplitude of the low frequency region of the compressed frame is reduced smoothly in the frequency domain, and
the encoded spectral modification reduces the amplitude of the low frequency region of the compressed frame by a lower amplitude than the amplitude of the mid frequency region.
16. The method of data processing according to claim 1, wherein said encoded spectral modification provides a gain greater than zero for amplitude modification of said compressed frame at any frequency in the frequency domain.
17. A system for data processing, comprising:
at least one storage medium storing at least one set of instructions for data processing; and
at least one processor communicatively coupled to the at least one storage medium,
wherein when the system is running, the at least one processor reads the at least one instruction set and performs the method of data processing of any of claims 1-16 in accordance with the instructions of the at least one instruction set.
18. A method of data processing, comprising:
obtaining compressed data, wherein the compressed data comprises a compressed frame obtained by performing data compression on an initial frame; and
decompressing the compressed frame to obtain a decompressed frame, the decompressing includes performing decoding spectral adjustment and boundary correction on a decoded frame, the decoded frame includes the compressed frame and the compressed frame becomes any data state before the decompressed frame in the data decompressing process, wherein,
said decoding spectral modification includes convolving said decoded spectral modification with a decoding convolution kernel so that said decoded spectral modification is reduced smoothly in frequency domain in order to filter components from the intermediate frequency to the high frequency region, said encoded spectral modification having a predetermined relationship with said decoded spectral modification,
the boundary correction includes correcting, by a second gamma algorithm, a boundary of which a boundary value is within a second preset range among the boundaries of the decoded frame to perform noise reduction.
19. The data processing method of claim 18, wherein the second gamma algorithm includes a gamma algorithm having a gamma value greater than 1 to attenuate a boundary of the boundary value within the second preset range among the boundaries of the solution frame.
20. The method of data processing according to claim 18, wherein said data decompressing the compressed frame comprises:
performing the decoding frequency spectrum adjustment on the decoding frame to obtain a decoding frequency spectrum adjustment frame;
obtaining a third boundary by subtracting the decoding spectrum adjustment frame from the decoding frame, wherein the third boundary is the boundary of the decoding frame and comprises the boundary information of the initial frame;
weakening the boundary of which the boundary value is within the second preset range in the third boundary through the second gamma algorithm so as to reduce noise of the third boundary to obtain a noise reduction boundary; and
and superposing the denoising boundary and the decoding frame to obtain the decompression frame.
21. The method of data processing according to claim 20, wherein said decompressing said compressed frame prior to said deriving said de-noised boundary comprises:
and enhancing the third boundary by a second coefficient, wherein the second coefficient is an arbitrary number greater than 1, and the third boundary comprises a boundary enhanced by the second coefficient.
22. The data processing method of claim 20, wherein the attenuating, by the second gamma algorithm, the boundary of the third boundary whose boundary value is within the second preset range to denoise the third boundary to obtain a denoised boundary comprises:
adjusting the third boundary through a third adjusting function to obtain a fourth boundary, so that the component of the third boundary in a low-frequency region in a frequency domain is reserved, and the component from a medium-frequency region to a high-frequency region is filtered; and
and weakening the boundary of which the boundary value is within the second preset range in the fourth boundary through the second gamma algorithm.
23. The method of data processing according to claim 20, wherein said decompressing said compressed frame prior to said performing said decoded spectral conditioning on said frame under decoding to obtain a decoded spectral conditioned frame, further comprises:
and decoding the compressed frame to obtain a decoded frame, wherein the decoded frame comprises the decoded frame.
24. The method of data processing according to claim 18, wherein said data compression includes code spectrum adjustment, including convolving said compressed frame with a code convolution kernel to smoothly reduce in a frequency domain an amplitude in an intermediate frequency region of the compressed frame, said compressed frame including said initial frame and any data state of said initial frame prior to said compressed frame being said compressed frame in said data compression process,
wherein the decoding convolution kernel corresponds to the encoding convolution kernel.
25. A system for data processing, comprising:
at least one storage medium storing at least one set of instructions for data processing; and
at least one processor communicatively coupled to the at least one storage medium,
wherein when the system is running, the at least one processor reads the at least one instruction set and performs the method of data processing according to the instructions of the at least one instruction set.
CN202110008566.9A 2020-04-09 2021-01-05 Data processing method and system Active CN114727110B (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN202110008566.9A CN114727110B (en) 2021-01-05 2021-01-05 Data processing method and system
US17/525,900 US12184844B2 (en) 2020-04-09 2021-11-13 Image and video data processing method and system
US17/727,791 US20220272325A1 (en) 2020-04-09 2022-04-24 Image and video data processing method and system
US18/945,467 US20250071339A1 (en) 2020-04-09 2024-11-12 Image and video data processing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110008566.9A CN114727110B (en) 2021-01-05 2021-01-05 Data processing method and system

Publications (2)

Publication Number Publication Date
CN114727110A true CN114727110A (en) 2022-07-08
CN114727110B CN114727110B (en) 2025-04-18

Family

ID=82234563

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110008566.9A Active CN114727110B (en) 2020-04-09 2021-01-05 Data processing method and system

Country Status (1)

Country Link
CN (1) CN114727110B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1922887A (en) * 2004-06-25 2007-02-28 松下电器产业株式会社 Image encoding method and image decoding method
CN103685937A (en) * 2012-09-26 2014-03-26 奥林巴斯映像株式会社 Image editing device and image editing method
US20150131748A1 (en) * 2013-11-12 2015-05-14 Kabushiki Kaisha Toshiba Encoding device and encoding method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1922887A (en) * 2004-06-25 2007-02-28 松下电器产业株式会社 Image encoding method and image decoding method
CN103685937A (en) * 2012-09-26 2014-03-26 奥林巴斯映像株式会社 Image editing device and image editing method
US20150131748A1 (en) * 2013-11-12 2015-05-14 Kabushiki Kaisha Toshiba Encoding device and encoding method

Also Published As

Publication number Publication date
CN114727110B (en) 2025-04-18

Similar Documents

Publication Publication Date Title
US12058382B2 (en) Systems and methods for reducing blocking artifacts
US20100315558A1 (en) Content adaptive noise reduction filtering for image signals
WO1997040627A1 (en) Method and apparatus for blocking effect reduction in images by post-processing in the spatial domain
US20090080517A1 (en) Method and Related Device for Reducing Blocking Artifacts in Video Streams
WO2021204015A1 (en) Data processing method and system
JP2020522175A (en) Application-specific filters for high quality video playback
US11528488B2 (en) Image and video data processing method and system
JP5146388B2 (en) Video compression coded data decoding apparatus
US12184844B2 (en) Image and video data processing method and system
US11503306B2 (en) Image and video data processing method and system
CN113766239B (en) Method and system for data processing
CN114727110A (en) Method and system for data processing
JP3800435B2 (en) Video signal processing device
WO2022247735A1 (en) Data processing method and system
US8526506B1 (en) System and method for transcoding with quality enhancement
WO2022037498A1 (en) Data processing method and system
US20250071339A1 (en) Image and video data processing method and system
CN114079472B (en) Method and system for data processing
JP2844619B2 (en) Digital filter for image signal
CN114079472A (en) Data processing method and system
JPH0993580A (en) Image decoder
JP2007538451A (en) Algorithms to reduce artifacts in decoded video
JP2014082603A (en) Image processor
JP2005094591A (en) GOP cycle detection method, GOP cycle detection device, video processing method, video processing device, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant