CN111918062A - High-compression-rate high-reducibility present frame data compression and decompression method - Google Patents

High-compression-rate high-reducibility present frame data compression and decompression method Download PDF

Info

Publication number
CN111918062A
CN111918062A CN202010724132.4A CN202010724132A CN111918062A CN 111918062 A CN111918062 A CN 111918062A CN 202010724132 A CN202010724132 A CN 202010724132A CN 111918062 A CN111918062 A CN 111918062A
Authority
CN
China
Prior art keywords
data
quantization
compression
bits
bit stream
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
CN202010724132.4A
Other languages
Chinese (zh)
Other versions
CN111918062B (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.)
Shanghai Dingjiukang Technology Co ltd
Original Assignee
Shanghai Dingjiukang Technology Co ltd
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 Shanghai Dingjiukang Technology Co ltd filed Critical Shanghai Dingjiukang Technology Co ltd
Priority to CN202010724132.4A priority Critical patent/CN111918062B/en
Publication of CN111918062A publication Critical patent/CN111918062A/en
Application granted granted Critical
Publication of CN111918062B publication Critical patent/CN111918062B/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/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • 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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • 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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • 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/184Methods 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 bits, e.g. of the compressed video stream

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The invention discloses a method for compressing and decompressing the data of the frame with high compression rate and high reducibility, which comprises a compression method and a decompression method; the compression method comprises the steps of receiving a data frame to be processed, carrying out differential processing, carrying out WHT conversion on a differential result, carrying out coefficient interception on data subjected to WHT conversion, carrying out stepped quantization on data reserved after interception, carrying out bit stream recombination on a quantization result, obtaining byte stream data subjected to bit stream recombination, compressing the byte stream data by using a compression code, obtaining final compressed data and outputting the final compressed data. The decompression method is reverse operation and obtains decompressed data. The compression and decompression method of the frame data has the characteristics of high compression rate and high reduction rate, improves the compression rate and the reduction performance by simplifying the data processing unit, thereby reducing the occupied capacity in the storage and transmission processes, improving the transmission rate, shortening the transmission time and ensuring the real-time performance and the stability of the data.

Description

High-compression-rate high-reducibility present frame data compression and decompression method
Technical Field
The invention relates to the field of data compression, in particular to a method for compressing and decompressing data of a frame with high compression rate and high reducibility.
Background
Data compression is a technique for reducing the amount of data by re-encoding redundant information in a signal or by performing a component trade-off on a signal.
In the fields of computer science and information science, compression algorithms are used in large quantities to reduce the storage cost and the transmission cost of data, so that the aims of improving the transmission efficiency and saving the cost are fulfilled. Particularly in applications of long-distance wireless signal transmission, high-efficiency data compression enables many applications to perform transmission tasks at low bandwidth. Since the data compression technology can help reduce operation costs such as storage space or connection bandwidth, the data compression technology is a hot spot for research and technology implementation.
Data compression techniques can be divided into lossless compression and lossy compression. Lossless compression means that original data can be completely decompressed and restored through compressed data, an original data frame is completely the same as a decompressed signal, and no information is lost; lossy compression refers to the compression algorithm discarding some information during the algorithm process, so that the decompression algorithm cannot completely recover the original data from the compressed data.
In a conventional data signal compression algorithm, the compression rate is further improved by using the correlation between data frames, for example, in the h.264 encoding and decoding method, a video frame is divided into an I frame (initial frame) and a P frame (predicted frame). However, this technique has a disadvantage that when packet loss occurs during data transmission, all frames from the latest I frame to the current time need to be retransmitted for decoding, otherwise, the original signal cannot be recovered only by the P frame, thereby reducing the real-time performance of signal decompression.
In the application of medical monitoring, taking electrocardio signals as an example, if multi-lead signals are continuously collected, lead signal data generated every day can reach nearly 1 GB. Without data compression, application systems would be a great challenge for reliability of data signal transmission and management of storage consumption. Meanwhile, the huge communication traffic also increases the power consumption of the system and shortens the endurance time of the portable equipment. In addition, for the application scenario of medical monitoring, the real-time performance of data is highly required. For example, when an electrocardiographic signal of a patient is diseased, the electrocardiographic signal needs to be found in time and reported quickly, and if a non-frame compression and decompression method is adopted, once a data packet is lost, extra time delay is caused, so that the timeliness of diagnosis and discovery of the disease cannot be guaranteed. Therefore, in such application scenarios, the compression of the present frame of data is crucial to guarantee the real-time performance of the data.
Disclosure of Invention
In order to overcome the technical defects of the prior art, the application provides a method for compressing and decompressing the frame data with high compression rate and high reducibility, which is used for solving the problem that the reliability, the real-time performance and the reducibility cannot be ensured during data compression and transmission in the prior art.
The embodiment of the application provides a compression and decompression method of the frame data, which comprises a compression method and a decompression method; the compression method comprises the following steps:
s110: receiving a pending data frame X0={x1,...,xi,...,xmH, the length of m;
s120: processing the data frame by using a first-order backward difference method to obtain an initial value x of the data1And difference result X1={0,x2-x1,...,xi-xi-1,...,xm-xm-1};
S130: for difference result X1Performing WHT conversion to obtain Y1=WHT(X1)={y1,y2,...,ym-1,ym}; wherein WHT transform represents Y1=HmX1
S140: for WHT transform coefficient Y1Intercepting is carried out, and when the ratio of the intercepted WHT retention coefficient energy to the original coefficient energy is not lower than a preset threshold value alpha, an intercepted retention coefficient set Y is obtained2,Y2={y1,y2,...,yk-1,yk};Wherein the threshold value alpha is one of the input parameters,
Figure BDA0002601063510000021
s150: collecting the truncated retention coefficient set Y2Dividing the coefficient into multiple sections, performing stepwise quantization to obtain quantization result Y3
S160: for the quantization result Y in step S1503Respectively carrying out bit stream recombination on the data of the multiple sections of intervals to ensure that the length of the recombined bit stream is multiple of 8, and acquiring byte stream data Y after the bit stream recombination4
S170: using LZ77 encoding and huffman encoding algorithm to reconstruct byte stream data Y in step S1604Performing compression coding to obtain final compressed data Y5
S180: outputting the final compressed data Y5
The decompression method comprises the following steps:
s190: receiving the final compressed data Y in step S1805For the final compressed data Y5Performing reverse decompression operation and outputting decompressed data frame X'0
Further, in the step S130, the WHT transform transforms the differential signal by using a set of orthogonal bases from the Hadamard matrix.
Further, the step S150 further includes: will Y2Dividing the data into n sections for step quantization; when n is 3, Y2The result after segmentation is
Figure BDA0002601063510000031
Namely, it is
Figure BDA0002601063510000032
Wherein the content of the first and second substances,
will be provided with
Figure BDA0002601063510000033
Quantized to 16 bits length;
will be provided with
Figure BDA0002601063510000034
Quantized to 12 bits length;
will be provided with
Figure BDA0002601063510000035
Quantized to 8 bits length;
a=round(k×β),b=round(k×γ),0<β<γ<1, round is a rounded rounding function; using a quantization formula:
Figure BDA0002601063510000036
obtaining Y3
Wherein B is the target digit of quantization, namely according to different segment numbers, B is respectively 16, 12 and 8, and the quantization result Y is obtained3
Figure BDA0002601063510000037
Further, the step S160 further includes:
after the quantization result is obtained, bit stream recombination is respectively carried out on the data of the quantization result, after the data is split by taking 4bit as a unit, the data is sequentially arranged, recombined and complemented from high order to low order, the length of the recombined bit stream is multiple of 8, and byte stream data after the bit stream recombination is obtained.
Further, the step S160 further includes:
obtaining a quantization result
Figure BDA0002601063510000038
I.e. Y3Comprises that
Figure BDA0002601063510000039
And
Figure BDA00026010635100000310
to pair
Figure BDA00026010635100000311
And
Figure BDA00026010635100000312
respectively performing bit stream recombination on the data in (1), wherein Y is obtained4In (1)
Figure BDA00026010635100000313
The method for bit stream reorganization comprises the following steps:
s161: splitting each 12-bit data y into: high 4bit yhMiddle 4bit ymLow 4 bits yl
S162: recombining bit streams to make the high 4 bits of all data arranged together, and then arranging the middle 4 bits and low 4 bits of data in sequence;
s163: recombining the bit stream obtained in the step S162 into a data unit according to 8 bits to obtain a series of data z with the length of 8 bits; when the last bit is less than 8 bits, the Y is obtained by utilizing bit0 for complement4In (1)
Figure BDA0002601063510000041
According to steps S161-S163, respectively reacquires
Figure BDA0002601063510000042
And
Figure BDA0002601063510000043
then, the byte stream data after bit stream recombination is respectively recorded as:
Figure BDA0002601063510000044
and
Figure BDA0002601063510000045
obtaining byte stream data Y after bit stream recombination4
Figure BDA0002601063510000046
Further, the compression method further comprises:
saving the length m of original data; saving numbers obtained during differential processingAccording to an initial value x1(ii) a Saving the offset value of each interval in the step quantization process during quantization
Figure BDA0002601063510000047
Scaling values
Figure BDA0002601063510000048
Figure BDA0002601063510000049
Target quantization bit number B.
Further, the step S190 further includes:
s191: receiving the final compressed data Y5
S192: final compressed data Y using LZ77 decoding algorithm5Decoding to obtain decoded data stream
Figure BDA00026010635100000410
S193: for decoded data stream
Figure BDA00026010635100000411
And
Figure BDA00026010635100000412
carrying out data stream inverse recombination to obtain quantized original data
Figure BDA00026010635100000413
And
Figure BDA00026010635100000414
s194: according to the offset value, the scaling value and the target quantization digit of each quantization interval stored in the received compression process, the recovery quantization formula is used as follows:
Figure BDA00026010635100000415
restoring data values prior to quantization
Figure BDA00026010635100000416
And
Figure BDA00026010635100000417
to obtain
Figure BDA00026010635100000418
S195: according to the length m of the original data stored in the received compression process, in Y2To obtain Y 'by supplementing 0 at the end of'1So that Y'1The data length of (1) is m;
s196: to Y'1Performing WHT inverse transformation to obtain
Figure BDA00026010635100000419
S197: to X'1Integration, initial value x saved in post-receiving compression process1To give X'0,X′0=cumsum(X′1)+x1Wherein cumsum is a cumulative sum function;
s198: outputting decompressed data frame X'0
The present frame data compression and decompression method with high compression rate and high reducibility provided in the embodiment of the present application has at least one of the following technical effects:
1. the data frame to be processed is subjected to differential processing by adopting a first-order backward difference method, so that the distribution concentration of data values is improved, the method is favorably applied to signal data processing such as electrocardiosignals, motion acceleration signals, respiratory signals and the like, the data which embody time sequences has certain continuity between adjacent data, the difference data is more concentrated in a small value range, and the integrity of the data is ensured.
2. As the WHT conversion is adopted, only addition and subtraction are involved, the operation rate is improved, the operation unit is simplified, the WHT conversion is compatible with integer signals, and compared with floating point operation, the speed of the WHT conversion operation is improved by 2 times to 4 times by integer calculation of an embedded operation unit; and, the WHT transform has a butterfly acceleration algorithm similar to FFT, i.e., fast WHT (fwht); in addition, the WHT transformation reduces the amplitude of the transformed signal, has the effect similar to difference, and has the characteristic of concentrated energy of frequency domain signals.
3. Due to the adoption of the step-type quantized data, the data resolution precision is reduced.
4. As the bit stream recombination technology is adopted, more data correlation is caused, so that the entropy value of data is reduced, for most data, adjacent data have the same amplitude value and are reflected on bit data, namely, the high-order data are the same, but the low-order data are different, therefore, the high-order data are gathered together by the bit stream recombination method, and finally, the generated byte stream data have a plurality of data with the same value in a high-order area, so that the efficiency of subsequent compression coding is improved.
5. Because the adopted compression and decompression technology falls the data value on the binary bit, the compression rate is flexibly controlled to improve the compression rate and the high recovery rate, all data are processed into the binary bit, and the method is irrelevant to the original data format, thereby expanding the data processing range and improving the applicability of data processing.
Drawings
Fig. 1 is a schematic flow chart of a present frame data compression and decompression method in the embodiment of the present application;
FIG. 2 shows an example of the present application in which 12 bits are long
Figure BDA0002601063510000051
A schematic diagram of bit stream recombination;
FIG. 3 is a flowchart of an exemplary decompression process
Figure BDA0002601063510000061
The schematic diagram of the bit stream arrangement of (a);
FIG. 4 shows an exemplary decompression process
Figure BDA0002601063510000062
The permutation schematic of the reordering recovery of (1);
fig. 5 is a schematic diagram illustrating comparison between original electrocardiographic data and decompressed electrocardiographic data according to an embodiment of the present application.
Detailed Description
In order to better understand the technical solution of the present invention, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
Example one
Referring to fig. 1, the present embodiment provides a present frame data compression and decompression method with high compression rate and high reducibility, which includes a compression method and a decompression method. The compression method comprises the following steps:
step S110: receiving a pending data frame X0={x1,...,xi,...,xmH, the length of m. In this step, an input data frame of a specified length m is received.
Step S120: processing the data frame by using a first-order backward difference method to obtain an initial value x of the data1And a differential signal X1={0,x2-x1,...,xi-xi-1,...,xm-xm-1}。
In this step, the initial value x of the data is calculated1Stored in the header data of the packet.
In this step, the data frame is processed by a first-order backward difference method, so as to improve the distribution concentration in the data value. In some application scenarios, for example, electrocardio signals, motion acceleration signals, respiration signals, etc., the data stored in time series have certain continuity between adjacent data, and the difference data is more concentrated in a small value range, so that the first-order backward difference method is adopted in the step to improve the distribution concentration of the data values.
Step S130: for difference result X1Performing WHT conversion to obtain Y1=WHT(X1)={y1,y2,...,ym-1,ym}; wherein WHT transform represents Y1=HmX1
In this step, WHT transform is denoted as Walsh-Hadamard transform (WHT). The WHT transform transforms the differential signal using a set of orthogonal bases from a Hadamard matrix. Further, the Hadamard matrix is at + -1A square matrix which is an element and any two lines of which are orthogonal to each other, and is defined by a recursive method as follows: h1=1,
Figure BDA0002601063510000063
The size of rows and columns of the Hadamard matrix must be a power of 2, and when the input length is not a power of 2, the input length is converted into a power of 2 by complementing 0; and is
Figure BDA0002601063510000071
Where I is a unit matrix of NxN and the inverse of WHT is
Figure BDA0002601063510000072
Deriving the WHT transform can be expressed as: y is1=HmX1
For example,
Figure BDA0002601063510000073
obviously, the size of the rows and columns of the Hadamard matrix must be a power of 2, which can be solved by complementing 0 if the input signal length is not a power of 2. And the number of the first and second electrodes,
Figure BDA0002601063510000074
where I is an NxN unit matrix, the inverse transformation matrix of WHT is thus
Figure BDA0002601063510000075
It follows that the WHT transform can be expressed as: y is1=HmX1
The WHT transform is adopted in this step, instead of the conventional DCT transform, and is mainly based on the following reasons. Firstly, the WHT only involves addition and subtraction, and the DCT involves trigonometric function and multiplication and addition of floating point, so compared with the DCT, the operation rate of the WHT is faster on a general CPU or an embedded operation unit, and the operation unit required by calculation is much simpler; secondly, the WHT conversion is compatible with integer signals, and the integer calculation of an embedded operation unit can be as fast as 2 times to 4 times compared with floating point operation; again, the WHT transform has a butterfly acceleration algorithm similar to FFT, i.e., Fast WHT (FWHT). On the other hand, the WHT transform is also used to further reduce the amplitude of the transformed signal, because ± 1 in the WHT transform matrix actually performs a differential-like effect and has a characteristic of energy concentration of the frequency domain signal.
Step S140: for WHT transform coefficient Y1Intercepting is carried out, and when the ratio of the intercepted WHT retention coefficient energy to the original coefficient energy is not lower than a preset threshold value alpha, the intercepted retention coefficient Y is obtained2={y1,y2,...,yk-1,yk}; wherein the threshold value alpha is one of the input parameters,
Figure BDA0002601063510000076
step S150: collecting the truncated retention coefficient set Y2Dividing the coefficient into multiple sections, performing stepwise quantization to obtain quantization result Y3
In this step, for data processed in time series, after WHT conversion, energy thereof is concentrated on a medium-low frequency portion, that is, Y2The coefficients in (a) will show a decreasing trend with increasing frequency. In order to quantize the WHT transform coefficient more effectively, the present embodiment adopts a step quantization method by utilizing the characteristic that the WHT coefficient decreases in amplitude with the increase in frequency.
The method further comprises the following steps: will Y2The step quantization is performed in n segments, preferably n is 3, i.e. when n is 3, Y is selected2The result after segmentation is
Figure BDA0002601063510000081
Then
Figure BDA0002601063510000082
Wherein, will
Figure BDA0002601063510000083
Quantized to 16 bits length; will be provided with
Figure BDA0002601063510000084
Quantized to 12 bits length; will be provided with
Figure BDA0002601063510000085
Quantized to 8 bits length; where a is round (k × β), b is round (k × γ), 0<β<γ<1, round is a rounded rounding function.
In this step, a quantization formula is used:
Figure BDA0002601063510000086
and Y is obtained. Wherein B is the quantization target digit, namely according to different segment numbers, B is respectively 16, 12 and 8, and the quantization result is obtained: y is3
Figure BDA0002601063510000087
In this step, the obtained offset value, scaling value, and quantization target bit number are stored in header data of the packet, and decompression is performed using information stored in the header data.
Step S160: for the quantization result Y in step S1503Respectively carrying out bit stream recombination on the data of the multiple sections of intervals to ensure that the length of the recombined bit stream is a multiple of 8, and acquiring byte stream data Y after the bit stream recombination4
Step S160 further includes: after the quantization result is obtained, bit stream recombination is respectively carried out on the data of the quantization result, after the data is split by taking 4 bits as a unit, the data is sequentially arranged, recombined and complemented from high bits to low bits, the length of the recombined bit stream is made to be multiple of 8, and byte stream data after the bit stream recombination is obtained. Wherein the length of the recombined bit stream is made to be a multiple of 8, so that the subsequent access can be performed according to bytes.
In this embodiment, step S160 further includes:
obtaining a quantization result
Figure BDA0002601063510000088
I.e. Y3Comprises that
Figure BDA0002601063510000089
And
Figure BDA00026010635100000810
to pair
Figure BDA00026010635100000811
And
Figure BDA00026010635100000812
wherein the data in (1) is subjected to bit stream reconstruction respectively, wherein the data has a length of 12 bits
Figure BDA00026010635100000813
For example, referring to FIG. 2, Y is obtained4In
Figure BDA00026010635100000814
The method for reconstructing a bitstream of (1) comprises the following steps.
Step S161: splitting each 12-bit data y into: high 4bit yhMiddle 4bit ym Low 4 bits yl
Step S162: the bit stream is recombined so that the upper 4 bits of all data are arranged together, and then the middle 4 bits and the lower 4 bits of data are arranged in sequence.
Step S163: recombining the bit streams obtained in the step S162 by taking 8 bits as a data unit to obtain a series of data z with the length of 8 bits; when the last bit is less than 8 bits, the process of using bit0 to fill up is understood by using FIG. 2, and Y is obtained4In (1)
Figure BDA0002601063510000091
In this step, the purpose of bit stream reorganization is mainly to create more data dependencies to reduce the entropy of the data. For most data, the adjacent data have the same amplitude, which is reflected in the bit data, that is, the high-order data are the same, but the low-order data are different, so that the high-order data are gathered together by the bit stream recombination means in the step, and finally, the generated byte stream data has many data with the same value in the high-order area, which is beneficial to improving the efficiency of subsequent compression coding.
According to steps S161-S163, respectively reacquires
Figure BDA0002601063510000092
And
Figure BDA0002601063510000093
specifically, according to step S161, the method comprises
Figure BDA0002601063510000094
And
Figure BDA0002601063510000095
carrying out a resolution wherein
Figure BDA0002601063510000096
Is split into high 4 bits yhMiddle 4bit ym1、ym2Low 4 bits yl(ii) a Will be provided with
Figure BDA0002601063510000097
Is split into high 4 bits yhLow 4 bits yl
Further according to step S162: recombining bit streams to make the high 4 bits of all data arranged together, and then arranging the middle 4 bits and low 4 bits of data in sequence; or all the upper 4 bits of data are arranged together and then the lower 4 bits of data are arranged in sequence.
Still further, according to step S163: recombining the bit stream obtained in the step S162 into a data unit according to 8 bits to obtain a series of data z with the length of 8 bits; when the last bit is less than 8 bits, using bit0 to complete the process; respectively obtain Y4In (1)
Figure BDA0002601063510000098
And
Figure BDA0002601063510000099
therefore, in this embodiment, according to steps S161 to S163, the above-mentioned steps are respectively retrievedGet
Figure BDA00026010635100000910
And
Figure BDA00026010635100000911
then, the byte stream data after bit stream recombination is respectively recorded as:
Figure BDA00026010635100000912
and
Figure BDA00026010635100000913
obtaining byte stream data Y after bit stream recombination4Memory for recording
Figure BDA00026010635100000914
Step S170: the byte stream data Y reconstructed in step S160 is subjected to LZ77 (adaptive dictionary model) encoding and huffman encoding algorithm4Performing compression coding to obtain final compressed data Y5
In this embodiment, in the whole compression process, the main objective of the WHT transformation in steps S120-S130 is to increase the concentration of data distribution, so that the data amplitude in the time domain is concentrated toward 0 value, and the data in the frequency domain is concentrated toward the middle and low frequencies. Steps 140 and 150 are the main sources of lossy compression, step 140 truncates the data in the frequency domain, and step 150 actually reduces the data resolution accuracy. Step 160 and step 170 are compression encoding parts, and step 160 recombines the code stream to reduce the entropy value, which can be regarded as the preparation work of step 160.
S180: outputting the final compressed data Y5
In this step, the final compressed data Y is outputted5Instead of just transmitting and storing the data packets, the data packets in this embodiment comprise at least two parts, the final compressed data Y5And header data formed by storing and combining in the compression process.
Therefore, the compression method in this step further includes: saving the length m of original data; saving data obtained during differential processingValue x1(ii) a Saving the offset value of each interval in the step quantization process during quantization
Figure BDA0002601063510000101
Scaling values
Figure BDA0002601063510000102
Target quantization bit number B. Further using the stored original data length m and the data initial value x1Target quantization bit number B, offset value offsetBAnd scale value scaleBThe header data of the data packet is composed. Further, the scaling values scale of the three quantization intervals in the present embodimentBIncluding scale16,scale12,scale8(ii) a Offset value offsetBIncluding offset16,offset12,offset8
Based on the compression algorithm described above, the present embodiment also provides a decompression method corresponding thereto. The decompression method in this embodiment includes the following steps:
step S190: receiving the final compressed data Y in step S1805For the final compressed data Y5Carries out backward decompression and outputs decompressed data frame X'0
In this step, the final compressed data Y is received5The method also comprises receiving data packet, splitting data packet, respectively receiving header data and final compressed data Y5. Wherein, the receiving head data further comprises the length m of the original data and the initial value x of the data stored in the receiving and compressing process1Target quantization bit number B, offset value offsetBAnd scale value scaleB
Step S190 further includes:
step S191: receiving the final compressed data Y5
Step S192: final compressed data Y using LZ77 decoding algorithm5Decoding to obtain decoded data stream
Figure BDA0002601063510000103
Step S193: for decoded data stream
Figure BDA0002601063510000104
And
Figure BDA0002601063510000105
carrying out data stream inverse recombination to obtain quantized original data
Figure BDA0002601063510000106
And
Figure BDA0002601063510000107
wherein, in order
Figure BDA0002601063510000108
For example, by rearranging the bit streams shown in fig. 3, the procedure returns to fig. 4, and three sets of quantized data are obtained by this step 193:
Figure BDA0002601063510000111
and
Figure BDA0002601063510000112
step S194: according to the offset value, the scaling value and the target quantization digit of each quantization interval stored in the received compression process, the recovery quantization formula is used as follows:
Figure BDA0002601063510000113
restoring data values prior to quantization
Figure BDA0002601063510000114
And
Figure BDA0002601063510000115
to obtain
Figure BDA0002601063510000116
Step S195: in a compression process according to receptionLength m of stored original data at Y2To obtain Y 'by supplementing 0 at the end of'1So that Y'1Has a data length of m.
Step S196: to Y'1Performing WHT inverse transformation to obtain
Figure BDA0002601063510000117
Step S197: to X'1Integrating and then receiving the initial value x stored in the compression process1Obtaining decompressed data frame X'0,X′0=cumsum(X′1)+x1Where cumsum is the cumulative sum function.
Step S198: outputting decompressed data frame X'0. And ending the decompression.
Referring to fig. 5, it is a comparison chart of the present embodiment for compression and decompression, where the received data frame is the collected electrocardiographic data, and the electrocardiographic data is compressed. The bit width of the electrocardiographic data is 24 bits, and the selected data window frame size m is 2048. After differential processing is performed by using a first-order backward difference method, WHT transformation is performed, in this application example, a system interception threshold α of WHT transformation is 0.67, and the coefficient length after interception is 900. The truncated reserved coefficients are quantized in a stepwise manner, with a quantization range coefficient β of 0.05 and γ of 0.1, thereby obtaining a of 50 and b of 100. The data compression ratio in this embodiment is 14% to 15%. After decompression, the error value of the original data and the decompressed data is about 1%, and the error calculation formula is as follows:
Figure BDA0002601063510000118
wherein x isiAs raw data, yiIs decompressed data.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (7)

1. A high compression rate high reducing performance frame data compression decompression method, characterized by, including compression method and decompression method; the compression method comprises the following steps:
s110: receiving a pending data frame X0={x1,...,xi,...,xmH, the length of m;
s120: processing the data frame by using a first-order backward difference method to obtain an initial value x of the data1And difference result X1={0,x2-x1,...,xi-xi-1,...,xm-xm-1};
S130: for difference result X1Performing WHT conversion to obtain Y1=WHT(X1)={y1,y2,...,ym-1,ym}; wherein WHT transform represents Y1=HmX1
S140: for WHT transform coefficient Y1Intercepting is carried out, and when the ratio of the intercepted WHT retention coefficient energy to the original coefficient energy is not lower than a preset threshold value alpha, an intercepted retention coefficient set is obtained
Y2,Y2={y1,y2,...,yk-1,yk}; wherein the threshold value alpha is one of the input parameters,
Figure FDA0002601063500000011
s150: collecting the truncated retention coefficient set Y2Dividing the coefficient into multiple sections, performing stepwise quantization to obtain quantization result Y3
S160: for the quantization result Y in step S1503Respectively carrying out bit stream recombination on the data of the multiple sections of intervals to enable the length of the recombined bit stream to be multiple of 8, and acquiring byte stream data Y after the bit stream recombination4
S170: using LZ77 encoding and huffman encoding algorithm to reconstruct byte stream data Y in step S1604Performing compression coding to obtain final compressed data Y5
S180: outputting the final compressed data Y5
The decompression method comprises the following steps:
s190: receiving the final compressed data Y in step S1805For the final compressed data Y5Performing reverse decompression operation and outputting decompressed data frame X'0
2. The method of claim 1, wherein the WHT transform transforms the differential signal using a set of orthogonal bases from a Hadamard matrix in step S130.
3. The method of claim 1, wherein the step S150 further comprises: will Y2Dividing the data into n sections to carry out step-type quantization; when n is 3, Y2The result after segmentation is
Figure FDA0002601063500000021
Namely, it is
Figure FDA0002601063500000022
Wherein the content of the first and second substances,
will be provided with
Figure FDA0002601063500000023
Quantized to 16 bits length;
will be provided with
Figure FDA0002601063500000024
Quantized to 12 bits length;
will be provided with
Figure FDA0002601063500000025
Quantized to 8 bits length;
a ═ round (k × β), b ═ round (k × γ), 0 < β < γ < 1, round is a rounded function; using a quantization formula:
Figure FDA0002601063500000026
obtaining Y3
B is a quantization target digit, and B is 16, 12 and 8 respectively according to different segment numbers to obtain a quantization result Y3
Figure FDA0002601063500000027
4. The method of claim 3, wherein the step S160 further comprises:
after the quantization result is obtained, bit stream recombination is respectively carried out on the data of the quantization result, after the data is split by taking 4 bits as a unit, the data is sequentially arranged, recombined and complemented from high bits to low bits, the length of the recombined bit stream is made to be multiple of 8, and byte stream data after the bit stream recombination is obtained.
5. The method of claim 4, wherein the step S160 further comprises:
obtaining a quantization result
Figure FDA0002601063500000028
I.e. Y3Comprises that
Figure FDA0002601063500000029
And
Figure FDA00026010635000000210
to pair
Figure FDA00026010635000000211
And
Figure FDA00026010635000000212
respectively performing bit stream recombination on the data in (1), wherein Y is obtained4In
Figure FDA00026010635000000213
The method for bit stream reorganization comprises the following steps:
s161: splitting each 12-bit data y into: high 4-position yh, middle 4-position ymLow 4 bits y1
S162: recombining the bit streams so that the upper 4 bits of all data are arranged together, and then arranging the 4 bits of the middle and lower 4 bits of data in sequence:
s163: recombining the bit stream obtained in the step S162 into a data unit according to 8 bits to obtain a series of data z with the length of 8 bits; when the last bit is less than 8 bits, the Y is obtained by utilizing bit0 for complement4In (1)
Figure FDA00026010635000000214
According to steps S161-S163, respectively reacquires
Figure FDA00026010635000000215
And
Figure FDA00026010635000000216
then, the byte stream data after bit stream recombination is respectively recorded as:
Figure FDA00026010635000000217
and
Figure FDA00026010635000000218
obtaining byte stream data Y after bit stream recombination4
Figure FDA0002601063500000031
6. The method of claim 3, wherein the compression method further comprises: saving the length m of original data; saving initial value x of data obtained during differential processing1(ii) a Saving the offset value of each interval in the step quantization process during quantization
Figure FDA0002601063500000032
Scaling values
Figure FDA0002601063500000033
Figure FDA0002601063500000034
Target quantization bit number B.
7. The method of claim 6, wherein the step S190 further comprises:
s191: receiving the final compressed data Y5
S192: final compressed data Y using LZ77 decoding algorithm5Decoding to obtain decoded data stream
Figure FDA0002601063500000035
S193: for decoded data stream
Figure FDA0002601063500000036
And
Figure FDA0002601063500000037
carrying out data stream inverse recombination to obtain quantized original data
Figure FDA0002601063500000038
And
Figure FDA0002601063500000039
s194: in a compression process according to receptionThe stored offset value, scaling value and target quantization bit number of each quantization interval are represented by the following recovery quantization formula:
Figure FDA00026010635000000310
restoring data values prior to quantization
Figure FDA00026010635000000311
And
Figure FDA00026010635000000312
to obtain
Figure FDA00026010635000000313
S195: according to the length m of the original data stored in the received compression process, in Y2To obtain Y 'by supplementing 0 at the end of'1So that Y'1The data length of (1) is m;
s196: to Y'1Performing WHT inverse transformation to obtain
Figure FDA00026010635000000314
S197: to X'1Integration, and initial value x saved in post-receiving compression process1To give X'0,X′0=cumsum(X′1)+x1Wherein cumsum is a cumulative sum function;
s198: outputting decompressed data frame X'0
CN202010724132.4A 2020-07-24 2020-07-24 High-compression-rate high-reducibility present frame data compression and decompression method Active CN111918062B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010724132.4A CN111918062B (en) 2020-07-24 2020-07-24 High-compression-rate high-reducibility present frame data compression and decompression method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010724132.4A CN111918062B (en) 2020-07-24 2020-07-24 High-compression-rate high-reducibility present frame data compression and decompression method

Publications (2)

Publication Number Publication Date
CN111918062A true CN111918062A (en) 2020-11-10
CN111918062B CN111918062B (en) 2022-08-05

Family

ID=73280436

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010724132.4A Active CN111918062B (en) 2020-07-24 2020-07-24 High-compression-rate high-reducibility present frame data compression and decompression method

Country Status (1)

Country Link
CN (1) CN111918062B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105100810A (en) * 2014-05-16 2015-11-25 中国科学院声学研究所 Image compression decompression method and system in imaging sonar real-time processing system
CN106331719A (en) * 2016-09-28 2017-01-11 武汉大学 K-L transformation error space dividing based image data compression method
CN106791858A (en) * 2017-01-09 2017-05-31 国家新闻出版广电总局电影数字节目管理中心 A kind of high sampling rate rgb video data lossless compression method
US20190132586A1 (en) * 2016-04-19 2019-05-02 Sony Corporation Data processing apparatus, data processing method, and program
CN110149514A (en) * 2019-05-31 2019-08-20 上海联影医疗科技有限公司 Compression method, device, acquisition system and the medical image system of scan data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105100810A (en) * 2014-05-16 2015-11-25 中国科学院声学研究所 Image compression decompression method and system in imaging sonar real-time processing system
US20190132586A1 (en) * 2016-04-19 2019-05-02 Sony Corporation Data processing apparatus, data processing method, and program
CN106331719A (en) * 2016-09-28 2017-01-11 武汉大学 K-L transformation error space dividing based image data compression method
CN106791858A (en) * 2017-01-09 2017-05-31 国家新闻出版广电总局电影数字节目管理中心 A kind of high sampling rate rgb video data lossless compression method
CN110149514A (en) * 2019-05-31 2019-08-20 上海联影医疗科技有限公司 Compression method, device, acquisition system and the medical image system of scan data

Also Published As

Publication number Publication date
CN111918062B (en) 2022-08-05

Similar Documents

Publication Publication Date Title
CN107832837B (en) Convolutional neural network compression method and decompression method based on compressed sensing principle
KR101176691B1 (en) Efficient coding and decoding of transform blocks
US11074723B2 (en) Lossless compression of fragmented image data
CN107481295B (en) Image compression system of convolutional neural network based on dynamic byte length distribution
CN110021369B (en) Gene sequencing data compression and decompression method, system and computer readable medium
CN111669588B (en) Ultra-high definition video compression coding and decoding method with ultra-low time delay
CN114520659A (en) Method for lossless compression and decoding of data by combining rANS and LZ4 encoding
TW201415418A (en) Method and apparatus for data compression using error plane coding
CN113873094B (en) Chaotic compressed sensing image encryption method
CN105163130B (en) A kind of Lossless Image Compression Algorithm method based on discrete Tchebichef orthogonal polynomial
CN111918062B (en) High-compression-rate high-reducibility present frame data compression and decompression method
Al-Hashemi et al. A new lossless image compression technique based on Bose, Chandhuri and Hocquengham (BCH) codes
CN105163122A (en) Image compression and decompression method based on similarity of image blocks
Solís-Rosas et al. An enhanced run length encoding using an elegant pairing function for medical image compression
CN104682966A (en) Non-destructive compressing method for list data
Kadhim et al. An improved image compression technique using ezw and sphit algorithms
Ibrahim et al. A Chinese Remainder Theorem based enhancements of Lempel-Ziv-Welch and Huffman coding image compression
KR100462789B1 (en) method and apparatus for multi-symbol data compression using a binary arithmetic coder
Elaskary et al. Hybrid DCT/Quantized Huffman compression for electroencephalography data
Asolkar et al. Review of data compression and different techniques of data compression
Ashraf et al. A low-power area-efficient design and comparative analysis for high-resolution neural data compression
Yu et al. Lossless compression of multi-dimensional medical image data using binary-decomposed high-order entropy coding
Al-Busaidi et al. Packet-size-controlled ECG compression algorithm based on discrete wavelet transform and running length encoding
WO2024007843A9 (en) Encoding method and apparatus, decoding method and apparatus, and computer device
SAWANEH Application of Discrete Wavelet Transform for

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