CN102595496A - Context-adaptive quotient and remainder encoding method used for sensing data of wireless sensing nodes - Google Patents

Context-adaptive quotient and remainder encoding method used for sensing data of wireless sensing nodes Download PDF

Info

Publication number
CN102595496A
CN102595496A CN2012100600815A CN201210060081A CN102595496A CN 102595496 A CN102595496 A CN 102595496A CN 2012100600815 A CN2012100600815 A CN 2012100600815A CN 201210060081 A CN201210060081 A CN 201210060081A CN 102595496 A CN102595496 A CN 102595496A
Authority
CN
China
Prior art keywords
data
coding
remainder
quotient
merchant
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.)
Pending
Application number
CN2012100600815A
Other languages
Chinese (zh)
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.)
Northwest University
Original Assignee
Northwest University
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 Northwest University filed Critical Northwest University
Priority to CN2012100600815A priority Critical patent/CN102595496A/en
Publication of CN102595496A publication Critical patent/CN102595496A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The invention discloses a context- adaptive quotient and remainder encoding method used for sensing data of wireless sensing nodes. The method comprises the following steps of orderly calculating differences of N sensing data to be encoded to obtain original difference values; respectively converting the original difference values to obtain the difference data, wherein the initial data digit D is 1, and i is equal to 1; using 2D as a divisor to obtain a quotient Q and a remainder R when the present difference data is used as a dividend; carrying out fixed-length encoding to the quotient, and carrying out length-variable encoding to the remainder; enabling the data digit D to be equal to the digit of the present difference data; and judging whether the next uncoded different data exists or not, if so, i is equal to i plus one, and executing the step 3, and if not, accomplishing the encoding to obtain the quotient and remainder codes of the difference data. The context- adaptive quotient and remainder encoding method used for sensing data of wireless sensing node has high compression ratio on both slowly changed data and non-slowly changed data, and can be smoothly operated among sensing nodes to realize lossless data compression. The context-adaptive quotient and remainder encoding algorithm used for sensing data of wireless sensing nodes has the advantages of low operation complexity and small occupied storage space.

Description

Be used for the surplus coding method of context-adaptive merchant of wireless sensing node perception data
Technical field
The invention belongs to the data compression technique field, be specifically related to a kind of surplus coding method of context-adaptive merchant that is used for the wireless sensing node perception data.
Background technology
The application of wireless sensor network (WSN) more and more widely, yet the energy consumption problem of wireless sensor node but is one of bottleneck of its application of restriction.Research shows that the energy of sensing node mainly consumes in the process of wireless data transmission, and therefore the research of various data compression algorithms becomes the new focus in the wireless sensor network rapidly.
At present, the data compression research of diminishing in the sensor network has had a lot, but has only limited several based on the lossless data compression algorithms of sensing node.Sadler C.M. in 2006 and Martonosi M. propose a kind of lossless data compression algorithms based on dictionary; Be called the S-LZW algorithm; It is based on an improvement version to wireless sensor network of famous lzw algorithm, also is first lossless compression algorithm in the wireless sensor network.2008; Marcelloni F. proposes a kind of simple Huffman (S-Huffman) encryption algorithm that is exclusively used in the sensing node data compression, and its coding method is: at first the sensing data that collects is asked poor, then difference is carried out entropy coding; More little data; Short more, the big more data of encoding, it is long more to encode.This algorithm can reach the compression ratio more than 60% to the humiture data, compares S-LZW (27.25%) algorithm, has remarkable advantages.Because this algorithm is realized simple, fast operation, compression ratio is high, becomes the classical lossless compression algorithm in the sensor node very soon.2009 and 2010, the auspicious brightness five equilibrium of Tharini C. and model you can well imagine out the improvement to the S-Huffman algorithm, realized a kind of adaptive H uffman coding through the structure binary tree.Adaptive H uffman coding is compiled with short coding the many data of occurrence number, and the data that occurrence number is few are compiled with long coding.For the data of the middle degree of correlation, adaptive H uffman coding can reach than S-Huffman better compression ratio is arranged.
But all there are following tangible problems in above-mentioned these algorithms:
The S-LZW algorithm is the reduction to the lzw algorithm in the PC, and lzw algorithm is a kind of lossless compression algorithm based on dictionary, and it is more suitable in the text compression, rather than digital compression.Therefore, the S-LZW algorithm is not high to the compression ratio of sensing data.Simultaneously, lzw algorithm needs a very big dictionary table to store existing string, though the S-LZW algorithm is reduced table space, with respect to the memory capacity of sensing node, its needed memory space is still too big.Exactly because the S-LZW algorithm need take bigger memory space, algorithm realizes also more complicated and compression ratio is not high enough, and therefore, follow-up continuation to the research of this algorithm seldom.
The S-Huffman algorithm only needs a prefix table that takies 15 bytes, and therefore compression ratio becomes the classical lossless compression algorithm in the sensing node very soon also than higher simultaneously.But because S-Huffman directly encodes to the difference of front and back data; Therefore; Only data have reasonable compression effectiveness to changing more slowly for it; When data conversion was violent, its compression effectiveness can sharply descend even also can appearance of negative compression (promptly the data after the compression are also longer than the data before compressing).Simultaneously, because the S-Huffman algorithm has used Log 2 MSuch sensing node CPU and unsupported function, the algorithm more complicated after it is realized will be come concrete the realization according to the size of input data.According to the description of Marcelloni F. oneself, this operation on average needs 355 instruction cycles to accomplish, and just says with respect to the disposal ability that sensing node is limited, and it is too complicated that this operation still seems.
And improve algorithms to two of the S-Huffman algorithm; Though centering degree of correlation data have higher compression ratio; But for the data of the high degree of correlation, the lifting of its compression ratio and not obvious (because adaptation mechanism needs certain adaptation time, compression ratio is on the contrary not as the S-Huffman algorithm sometimes).Because two are improved algorithm is to the difference direct coding equally, therefore, be not suitable for the compression of the data (the sharply low often related data of the data of conversion) of the low degree of correlation equally.These two algorithms need bigger operand and memory space to accomplish renewal and the maintenance of self adaptation tree simultaneously, and these expenses are compared with the lifting of compression ratio, seem also unbecoming.
Can find out that from above analysis the lossless compression algorithm research in the sensing node also rests on the more original stage at present.Main performance is still not have special-purpose algorithm to occur, and also rests on the stage among the node is transformed and made it to run on to classic algorithm on the PC.Lossless compression algorithm in the sensing node all is that its performance still can not satisfy demands of applications to the cutting of conventional P C machine lossless compression algorithm at present.
From the practical application angle, research often more has realistic meaning based on the lossless compression algorithm of sensing node, and reason is following:
(1) the lossless data transmission is the inevitable requirement of a lot of ADVANCED APPLICATIONS
Though lossy compression can improve compression ratio significantly, often with abandon a large amount of initial data also/or the precision of loss initial data be cost.The main application of wireless sensor network is the various environmental parameters of monitoring, and a lot of parameter need keep its original precision, and the lossy compression method algorithm can't reach this requirement.For example: in a lot of military applications of wireless sensor network, need the contingent unknown variations in the tested zone of monitoring.Owing to be not sure of tested zone in advance which variation can take place, sensing node just should keep the original precision of image data as much as possible, and passes it back control centre and analyse in depth.For another example: in a lot of remote sensing and medical application, the original precision of the high spectrum image that needs maintenance imageing sensor collects.In these were used, the lossless data transmission obviously was very important.
(2) the lossless data transmission from sensing node is the prerequisite of data fusion
Plurality of applications employing data anastomosing algorithm reduces the data of transmission over networks, but data anastomosing algorithm runs in the aggregation node usually.For guaranteeing the accuracy of data fusion, the data before requiring to merge must keep original precision.Employing can reduce the transfer of data from sensing node toward aggregation node based on the lossless compression algorithm of sensing node, thus the life cycle of further improving node.
(3) lossless compress based on sensing node is the basis of most lossy compression method and distributed compression algorithm
Most lossless compression algorithms can convert the lossy compression method algorithm into through simple reduction, and this reduction can reduce operand usually when improving compression ratio.For example: preamble is mentioned the S-Huffman algorithm; If after obtaining the difference of sensing data, a threshold value is set, will be 0 less than the data reduction of threshold value; And only encode greater than the data of threshold value; This algorithm just can be changed to and diminish algorithm, and it can reduce operand when improving compression ratio greatly.Other lossless compression algorithm great majority can transform the lossy compression method algorithm through similar method.Equally, much the compression algorithm based on local node can transform distributed algorithm through simple variation.For example: in based on the intensive sensor network of broadcasting (this assumed condition is identical with the distributed Wavelet Transformation Algorithm that SERVETTO S.D. is proposed); Can move the spatial coherence of S-Huffman algorithm between node, thereby realize a kind of distributed lossless compress effect with minimizing adjacent node data.Therefore, the lossless compress based on sensing node is the basis of a lot of lossy compression method and distributed compression algorithm.
Summary of the invention
To defective that exists in the above-mentioned prior art or deficiency; The objective of the invention is to; A kind of surplus coding method of context-adaptive merchant (Context-based Adaptive Quotient Remainder encoding algorithm is called for short the CAQR algorithm) that is used for the sensor node perception data is provided.The present invention can run among the sensing node smoothly, and realize lossless data compression, and computational complexity of the present invention is low high according to equal compression ratio to slow parameter certificate and non-slow parameter, and memory space takies little.
In order to achieve the above object, the present invention adopts following technical solution:
A kind of surplus coding method of context-adaptive merchant that is used for the wireless sensing node perception data, specifically carry out according to the following steps:
Step 0: to N the sensing data Gandata [1] of needs coding, Gandata [2], Gandata [3] ... Gandata [N] asks poor successively according to d [i]=Gandata [i+1]-Gandata [i], obtains N-1 original difference data d [1], d [2]; D [3] ... D [i] ... D [N-1], wherein, N is a natural number; I=1,2,3 ... N-1;
Step 1: N-1 the original difference data d [i] that step 0 is obtained carries out conversion according to following formula respectively, obtains N-1 difference data Data [i], and transformation for mula does Data [ i ] = 2 * d [ i ] , d [ i ] &GreaterEqual; 0 Data [ i ] = - 2 * d [ i ] - 1 , d [ i ] < 0 , Wherein, N is a natural number, i=1,2,3 ... N-1;
Step 2: initialization data figure place D is 1, makes i=1;
Step 3: with current difference data Data [i] as dividend, with 2 DAs divisor, obtain merchant Q and the remainder R of current difference data Data [i];
Step 4: remainder R is carried out block code, merchant Q is carried out variable-length encoding, obtain the surplus coding of merchant of current difference data Data [i];
Step 5: make data bits D equal the figure place of current difference data Data [i], promptly use the figure place of the figure place of current difference data Data [i] as next difference data Data [i+1];
Step 6: judge whether to also have next uncoded difference data, if having, then make i=i+1, jump procedure 3 continues coding, otherwise coding is accomplished, and obtains the surplus coding of merchant of N-1 difference data.
Further, in the said step 4 merchant Q is carried out variable-length encoding and adopt the Huffman coding method.
Description of drawings
Fig. 1 is the difference probability distribution of wireless sensing data, and wherein, abscissa is represented the difference of wireless sensing data, and ordinate is represented the data number of corresponding difference.
Fig. 2 is a workflow diagram of the present invention.
Fig. 3 is the regularity of distribution of three groups of test datas in the confirmatory experiment.
Fig. 4 is the present invention and other two kinds of encryption algorithms compression ratio comparative result to dissimilar sensing datas, and wherein, abscissa is represented three kinds of algorithms respectively to the compression result of 3 groups of data, and ordinate is represented compression ratio.
The practical implementation method
The present invention is divided into slow parameter certificate and non-slow parameter according to two types with the wireless sensing node perception data.Wherein, smaller or equal to 3 data, the degree of fluctuation of slow parameter certificate is less according to the standard deviation of the sequence of differences that is meant the sensing node perception data for slow parameter; Other sensing node perception datas outside the slow parameter certificate are non-slow parameter certificate, and the degree of fluctuation of non-slow parameter certificate is very big.
The probability distribution characteristic analysis of sensing node perception data is following:
The data that sensing node will be gathered are functions of a time to time change.To each concrete moment because the influence of factors such as various interference and node acquisition precision, actual acquisition to data and actual value between small error is arranged.Obviously, the data d that arrives of sensor acquisition iWith real by collection capacity m iD is arranged i=m i+ ε i, ε i~N (0, σ i 2) relation, ε wherein iBe error, σ i 2Be variance.
For certain concrete moment, the data of node collection are stochastic variable X, and it obeys average is m i, variance is σ 2Normal distribution, i.e. X~N (m i, σ 2), m wherein iBe exactly t iConstantly by collection capacity.
For the different moment, the equal Normal Distribution of the data of being gathered.Obviously, the probability distribution that influences the various disturbing factors of image data precision is separate.
If t 1And t 2Be two continuous moment, then for certain concrete sensing node, two data X that sensing node collects T1And X T2Equal Normal Distribution.That is: X T1~N (m T1, σ T1 2), X T2~N (m T2, σ T2 2).
Because the probability distribution of disturbing factor is separate, according to the character of normal distribution, can know: X T2-X T1~N (m T2-m T1, σ T2 2T1 2), establish m T2=m T1+ Δ t, σ Tt 2T2 2T1 2, then ask the data X after the poor conversion T2-X T1~N (Δ t, σ Tt 2).
Obviously, ask data Normal Distribution still after the poor conversion.Especially, when sensing data meets the definition of slow parameter certificate, Δ t ≈ 0, then X T2-X T1~N (0, σ Tt 2).The difference obedience that is former and later two data in the slow parameter certificate is the normal distribution at center with 0.
For verifying above conclusion, the sensor network experimental result data (download address: http://db.csail.mit.edu/labdata/data.txt.gz) verify that the inventor gathers between February 28 to April 5 in 2004 with Intel Berkeley laboratory (http://www.intel-research.net/berkeley).The present invention has selected No. 1 node from the temperature data of 1 day 19 March in 2004 up to 7 o'clock on the 2nd March; Carried out probability analysis after data before and after it are asked difference successively; The result shows as shown in Figure 1; Obviously, the difference between this section temperature data has more ideally been obeyed 0 to be the normal distribution at center, has verified applicant's analysis.
To sum up, theoretical foundation of the present invention is following:
According to Chebyshev inequality P (/X-μ/<3 σ)=99.7%, wherein μ refers to average, and σ refers to standard deviation.Can know, sensor acquisition to the data overwhelming majority be distributed near the average.So X T2-X T1Value the overwhelming majority is distributed in ± 3 σ TtWithin.Because σ TtOnly relevant with the node acquisition precision, be a smaller amount, this provides convenience for adopting differential coding realization data compression.
Can know by Fig. 1; As long as character according to normal distribution; To compiling with short more coding the closer to the data of 0 value; The data that depart from 0 value are more compiled with long more coding, just can well be realized lossless compress, this just the S-Huffman encryption algorithm can obtain the reason of better compression ratio to slow parameter certificate.And when initial data no longer meets the hypothesis of slow parameter certificate, ask the result of poor conversion will no longer meet 0 to be the normal distribution at center, the compression effectiveness of S-Huffman algorithm will descend rapidly.But when input data when certain degree of correlation is still arranged, asking the result of poor conversion still to meet basically with the difference is the normal distribution at center, at this moment adopts adaptive H uffman conversion will obtain compression effectiveness preferably.
The basic ideas that the inventor studies the coding method that is used for the sensing node perception data are following:
At first; The significance bit of will encoding among the present invention is defined as: be provided with a N position block code; With its high K position (after K<N) removes; It is digital constant that remaining N-K position block code is represented, claims that then the high K position of this coding is an invalid bit, and claim that all invalid bits are removed remaining L (L=N-K) position, back is the significance bit of N position block code.
Characteristics through analyzing binary data find that if only calculate significance bit, block code is compacter than variable-length encoding.Because no matter which kind of variable length encoding method, all be to guarantee that some codings shorten in (being generally the probability of occurrence higher data), must be to be cost with other codings elongated (being generally the lower data of probability of occurrence).
For example: binary number 0,1,2,3, if use block code, need represent with two bits 00,01,10,11.But, for data 0 and 1, just can represent its value with 1 bit, data 0 and 1 be encoded to 00 and 01, their significance bit has only 1 of end position.Obviously, if only write out the significance bit of block code, then above 4 numerals can be expressed as 0,1,10,11.And if use variable-length encoding, be unique decodable code for guaranteeing it, be similar 0,10,110,111 such forms as using the Huffman coding just need compile.Obviously, if only consider significance bit, block code is compacter than variable-length encoding.
Yet above-mentioned the block code of considering significance bit can't correctly be decoded, because it is not a unique decodable code not providing in advance under the situation of code length.If know code length conversely speaking, in advance, then can correctly decode.Because ask the equal Normal Distribution of result of poor conversion, according to Chebyshev inequality (P (/X-μ/<3 σ)=99.7%), most data will be distributed near the average.Therefore, the figure place deviation of the front and back data in one group of data, most within 3 σ, so, we just can use the figure place of previous data to infer the figure place of current data, and according to the figure place of inferring current data are carried out block code.
For example: suppose one section data to be encoded by 2,1,0; 1 four data constitute, and according to first data 2, we know that the significance bit of its binary data is 2; The significance bit of then inferring next data also is 2, and we just can adopt binary number " 01 " to come coded data 1 so; Be 1 according to 1 significance bit then, infer that then the significance bit of next data also is 1, just can adopt the 3rd data 0 of binary number " 0 " coding; In like manner, the significance bit according to 0 is that 1 significance bit of inferring next data also is 1, can adopt binary number " 1 " to come coded data 1; Just can obtain be encoded to " 100101 " of these four numerals.Obviously, the result behind the coding is more brief based on the Huffman coding " 11010010 " of unique decodable code than employing like this.
Yet according to inferring that figure place carries out the method for block code, when the significance bit of back data during greater than the significance bit of earlier data, the deduction figure place of current data will be less than the figure place of its significance bit for above-mentioned, and at this moment coding will have problems.
For example: if the 4th of the data of a last example are 7 rather than 1, because 7 significance bit is at least 3, and only 1 of the deduction figure place that obtains according to previous data 0, obviously can not represent 7 with 1 bit, above-mentioned coding method is just inapplicable.To this situation, we have proposed merchant-surplus representation and have solved this problem.
Merchant of the present invention-surplus representation is meant former data is treated as dividend, representes the method for former data with divisor, quotient and the remainder.
Merchant-surplus representation has been arranged, and we can be with above-mentioned according to inferring that figure place carries out the method for block code and do some improvement and solve the problems referred to above.In one group of data of needs compressions, with current data as dividend, with the figure place of previous data deduction figure place D, with 2 as these data DAs divisor, calculate merchant Q and remainder R.The figure place of the last number of current data calculates because divisor is based on, and therefore do not need transmission, only just can represent this number with quotient and the remainder.Because remainder can not be greater than divisor, so therefore its figure place also can not can represent remainder with the block code identical with the divisor figure place greater than the figure place of divisor.And the merchant might be greater than divisor, so its figure place is indefinite, just can only represent with variable-length encoding.Adopt merchant-surplus representation and based on after the contextual divisor deduction method, the length behind its coding will be than direct shorter to the length of former digital coding, and become unique decodable code, and Here it is based on the principle of the surplus coding of context-adaptive merchant.
For example: the figure place of its previous data 0 of data 7 usefulness is inferred figure place D=1 position as it, with 2 D=2 as divisor, and then data 7 can be expressed as (2,1,3), and wherein 2 is divisor, and remainder is 1, and the merchant is 3.Because divisor (promptly 2 D) be that figure place D according to the last number of current data calculates, so divisor (promptly 2 D=2) do not need transmission, only just can represent this number with quotient and the remainder, it is (1,3) that data 7 adopt merchant-surplus representation.Binary system block code of remainder 1 usefulness is expressed as " 1 ", will discuss 3 and adopt Huffman coding (variable length encoding method) to be expressed as " 111 ", then lumps together to be " 1111 ", totally 4.And former data 7 are " 111001 " with the result behind the Huffman coding directly, totally 6, adopt the S-Huffman coding that similar result is also arranged.Obviously, adopt merchant-surplus representation to combine based on after the contextual divisor deduction, the coding figure place becomes shorter.
With reference to Fig. 2, the surplus coding method of context-adaptive merchant that is used for the wireless sensing node perception data of the present invention specifically may further comprise the steps:
Step 0: to N the sensing data Gandata [1] of needs coding, Gandata [2], Gandata [3] ... Gandata [N] asks poor successively according to d [i]=Gandata [i+1]-Gandata [i], obtains N-1 original difference data d [1], d [2]; D [3] ... D [i] ... D [N-1], wherein, N is a natural number; I=1,2,3 ... N-1;
Step 1: N-1 the original difference data d [i] that step 0 is obtained carries out conversion according to following formula respectively, obtains N-1 difference data Data [i], and transformation for mula does Data [ i ] = 2 * d [ i ] , d [ i ] &GreaterEqual; 0 Data [ i ] = - 2 * d [ i ] - 1 , d [ i ] < 0 , Wherein, N is a natural number, i=1,2,3 ... N-1;
Step 2: initialization data figure place D is 1, makes i=1;
Step 3: with current difference data Data [i] as dividend, with 2 DAs divisor, obtain merchant Q and the remainder R of current difference data Data [i];
Step 4: remainder R is carried out block code, merchant Q is carried out variable-length encoding, obtain the surplus coding of merchant of current difference data Data [i];
Step 5: make data bits D equal the figure place of current difference data Data [i], promptly use the figure place of the figure place of current difference data Data [i] as next difference data Data [i+1];
Step 6: judge whether to also have next uncoded difference data, if having, then make i=i+1, jump procedure 3 continues coding, otherwise coding is accomplished, and obtains the surplus coding of merchant of N-1 difference data.
Below in conjunction with subordinate list related content of the present invention is done further labor.
The class C pseudo-code of algorithm is described as shown in table 1.
Table 1: the pseudo-code of the surplus coding of context-adaptive merchant (CAQR) is described
Figure BDA0000141621380000072
Figure BDA0000141621380000081
For step 1 of the present invention, original difference data d [i] is transformed to difference data Data [i], be for fear of asking the code error that negative causes in the quotient and the remainder process, transformation for mula does Data [ i ] = 2 * d [ i ] , d [ i ] &GreaterEqual; 0 Data [ i ] = - 2 * d [ i ] - 1 , d [ i ] < 0 , Negative becomes odd number after the conversion, and positive number becomes even number, just can solve original positive negative according to odd even during decoding.
For step 3, current difference data Data [i] calculates merchant Q and remainder R through shifting function.In the table 1,>>the D D position of representing to move to right, be equivalent to divided by 2 DAfter only keep integer part;<<D D the position of representing to move to left is equivalent to multiply by 2 DOwing to move to left with right-shift operation is basic operation, can guarantee to calculate the computing of quotient and the remainder can be in sensing node smoothness run, therefore realize the required instruction number of this method seldom.
For step 4, calculate after the quotient and the remainder, just get into cataloged procedure.Remainder R is adopted block code; Merchant Q is adopted variable-length encoding, can select the Huffman coding method that merchant Q is encoded.
As shown in table 2, the inventor uses the present invention the breadboard one group of sensing data of Intel Berkeley is encoded, and obtains the surplus coding result of merchant of this group sensing data:
The breadboard one group of sensing data coding result of table 2 Intel Berkeley
Sensing data Difference data Discuss surplus coding output
1 2187 2187 1111111110111111111111
2 2179 -8 1011111
3 2184 5 100111
4 2189 5 100111
5 2197 8 1011111
6 2203 6 100111
7 2218 15 1011111
8 2221 3 01111
9 2225 4 100111
10 2225 0 00
11 2227 2 01111
12 2235 8 1011111
13 2241 6 100111
14 2247 6 100111
15 2257 10 1011111
16 2260 3 01111
For verifying the validity of coding method of the present invention, below adopt three groups of real data to the coding method of the present invention checking that experimentizes, and combine this embodiment that performance of the present invention is made a concrete analysis of explanation, need to prove that the present invention does not limit this embodiment.
For verifying validity of the present invention, we adopt real data that the present invention and other two kinds of conventional methods have been carried out contrast test.Test data 1 and test data 2 are from the sensor network experimental result of Intel Berkeley Research lab between February 28 to April 5 in 2004; Test data 3 is from the vibration data of NWU-NISL lab in containing optical gate soil ruins protection project; Fig. 3 is the regularity of distribution of these three groups of test datas, and the standard deviation of the difference of these three groups of test datas is respectively: σ 1=1.61; σ 2=11.06; σ 3=247.53.Can find out that in three groups of data of test usefulness, test data 1 meets the definition of slow parameter certificate; Test data 2 meets the definition of slow parameter certificate basically, and test data 3 does not then meet the definition of slow parameter certificate fully.
The algorithm of participating in contrast test comprises CAQR algorithm of the present invention, S-Huffman algorithm and ND-Encoding algorithm.For guaranteeing the accuracy of contrast test; This experiment has only carried out asking poor conversion to the sensing node perception data before coding; Do equally with S-Huffman and ND-Encoding algorithm, the computing formula of compression ratio is the same with the S-Huffman algorithm also, is shown below:
comp _ ratio = 100 &CenterDot; ( 1 - comp _ size orig _ size )
Wherein, comp_ratio representes compression ratio, and comp_size representes the data total length behind the compressed encoding, and orig_size representes the total length of initial data.
Test result is as shown in Figure 4, and abscissa is represented the compression result of three kinds of algorithms to 3 groups of data, and ordinate is represented compression ratio.Can draw to draw a conclusion from Fig. 4:
(1) along with the input data fluctuations strengthens, the compression ratio of three kinds of coding methods is all descending;
(2) when the input data be slow parameter according to the time, the compression effectiveness of three kinds of coding methods is more or less the same, wherein the ND-Encoding algorithm has best compression effectiveness, CAQR algorithm of the present invention is a little bit poorer slightly than the ND-Encoding algorithm.
(3) no longer meet when becoming rule slowly when the input data, the compression effectiveness of ND-Encoding algorithm sharply descends, but CAQR algorithm of the present invention still has performance preferably, and best compression effectiveness is arranged.
CAQR algorithm of the present invention all has good compression effectiveness under various situation.Below in conjunction with this embodiment performance of the present invention is made a concrete analysis of explanation:
(1) the compression ratio analysis of algorithm
Because coding of the present invention is the method for context-adaptive, so the final coding of each data can receive the influence of input data probability distributions.If the words that the input data are all arranged by optimum; Promptly ideally obeying with 0 is the normal distribution of the symmetry at center; Method of the present invention can access optimum code, and the forced coding length contrast of CAQR algorithm of the present invention and S-Huffman, ND-Encoding algorithm is as shown in table 3.
The forced coding length contrast of three kinds of encryption algorithms of table 3
Data CAQR ND-Encoding S-Huffman
0 2 2 2
-1 2 3 4
1 3 3 4
-2 3 4 5
2 4 4 5
-3 4 4 5
3 4 4 5
-4 4 5 6
4 5 5 6
... ... ... ...
127 8 16 12
... ... ... ...
16383 15 30 26
Can find out that from table 3 iff is forced coding relatively, CAQR algorithm of the present invention is almost all more excellent than other two kinds of algorithms under various data, and especially when the data of importing data were bigger, the advantage of CAQR algorithm was very obvious.Therefore, the present invention just possibly obtain good effect in above-mentioned actual test.
But, because can not guaranteeing encryption algorithm, the arrangement of real data can obtain optimum code, therefore the encoding compression effect for real data descends possibly to some extent.But from the test result of Fig. 4, this decline also is smaller, and to various data, it still can keep compression effectiveness preferably.
(2) the computational complexity analysis of algorithm
Can find out that from table 1 main program of CAQR algorithm needs 1 judgements, 2 displacements, 1 addition, 2 assignment, 1 insertion statement and 1 step-by-step negate or shifting function, about 11 statements of need altogether to each input data.
To the required renewal statement of the deduction figure place D of next data is to be made up of a series of judgement statements equally, is 12 at most and judges that statement adds an assignment statement, needs about 13 statements altogether.
In the above statement,, need 2 to 4 elementary instructions could realize that all the other statements are basic statement, can in an instruction cycle, accomplish except inserting the statement more complicated.
Therefore, accomplishing the required basic statement number of coding method of the present invention is about: 11+26+13=50.Because these statements all are basic statements that sensor node CPU is supported, so coding method of the present invention can run among the sensing node fully smoothly, required instruction number seldom.
(3) the space hold analysis of algorithm
Can find out that from table 1 the present invention only needs indivedual temporary variables to be used to store intermediate data, need not expend very big memory space, therefore, meets the space hold requirement of wireless sensing node.

Claims (2)

1. the surplus coding method of context-adaptive merchant that is used for the wireless sensing node perception data is characterized in that, specifically carries out according to the following steps:
Step 0: to N the sensing data Gandata [1] of needs coding, Gandata [2], Gandata [3] ... Gandata [N] asks poor successively according to d [i]=Gandata [i+1]-Gandata [i], obtains N-1 original difference data d [1], d [2]; D [3] ... D [i] ... D [N-1], wherein, N is a natural number; I=1,2,3 ... N-1;
Step 1: N-1 the original difference data d [i] that step 0 is obtained carries out conversion according to following formula respectively, obtains N-1 difference data Data [i], and transformation for mula does Data [ i ] = 2 * d [ i ] , d [ i ] &GreaterEqual; 0 Data [ i ] = - 2 * d [ i ] - 1 , d [ i ] < 0 , Wherein, N is a natural number, i=1,2,3 ... N-1;
Step 2: initialization data figure place D is 1, makes i=1;
Step 3: with current difference data Data [i] as dividend, with 2 DAs divisor, obtain merchant Q and the remainder R of current difference data Data [i];
Step 4: remainder R is carried out block code, merchant Q is carried out variable-length encoding, obtain the surplus coding of merchant of current difference data Data [i];
Step 5: make data bits D equal the figure place of current difference data Data [i], promptly use the figure place of the figure place of current difference data Data [i] as next difference data Data [i+1];
Step 6: judge whether to also have next uncoded difference data, if having, then make i=i+1, jump procedure 3 continues coding, otherwise coding is accomplished, and obtains the surplus coding of merchant of N-1 difference data.
2. the method for claim 1 is characterized in that, in the said step 4 merchant Q is carried out variable-length encoding and adopts the Huffman coding method.
CN2012100600815A 2012-03-08 2012-03-08 Context-adaptive quotient and remainder encoding method used for sensing data of wireless sensing nodes Pending CN102595496A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012100600815A CN102595496A (en) 2012-03-08 2012-03-08 Context-adaptive quotient and remainder encoding method used for sensing data of wireless sensing nodes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012100600815A CN102595496A (en) 2012-03-08 2012-03-08 Context-adaptive quotient and remainder encoding method used for sensing data of wireless sensing nodes

Publications (1)

Publication Number Publication Date
CN102595496A true CN102595496A (en) 2012-07-18

Family

ID=46483596

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012100600815A Pending CN102595496A (en) 2012-03-08 2012-03-08 Context-adaptive quotient and remainder encoding method used for sensing data of wireless sensing nodes

Country Status (1)

Country Link
CN (1) CN102595496A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103457610A (en) * 2013-08-30 2013-12-18 百度在线网络技术(北京)有限公司 Space data coding method and system
CN104202117A (en) * 2014-08-25 2014-12-10 哈尔滨工业大学 Uniquely decodable code encoding method based on traversal mode
CN104349165A (en) * 2014-09-16 2015-02-11 上海通途半导体科技有限公司 High-performance length-variable coding and decoding methods and devices
CN111031511A (en) * 2019-12-26 2020-04-17 北京工业大学 Variable-granularity real-time environment data acquisition method for Internet of things
CN117560718A (en) * 2024-01-11 2024-02-13 广东广宇科技发展有限公司 Fire control Internet of things remote monitoring method based on crowd sensing

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001063772A1 (en) * 2000-02-25 2001-08-30 Physical Optics Corporation Method and apparatus for optimized lossless compression using a plurality of coders
CN101299611A (en) * 2008-06-30 2008-11-05 中国电子科技集团公司第二十八研究所 Data compression method based on set run
CN102006626A (en) * 2010-11-19 2011-04-06 杭州电子科技大学 Compression method for sensor network data based on Huffman encoding and random optimization policy

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001063772A1 (en) * 2000-02-25 2001-08-30 Physical Optics Corporation Method and apparatus for optimized lossless compression using a plurality of coders
CN101299611A (en) * 2008-06-30 2008-11-05 中国电子科技集团公司第二十八研究所 Data compression method based on set run
CN102006626A (en) * 2010-11-19 2011-04-06 杭州电子科技大学 Compression method for sensor network data based on Huffman encoding and random optimization policy

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
任学军: "《中国博士学位论文全文数据库》", 31 December 2011 *
任学军等: "一种适合无线传感器网络的混合编码数据压缩算法", 《小型微型计算机系统》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103457610A (en) * 2013-08-30 2013-12-18 百度在线网络技术(北京)有限公司 Space data coding method and system
CN104202117A (en) * 2014-08-25 2014-12-10 哈尔滨工业大学 Uniquely decodable code encoding method based on traversal mode
CN104202117B (en) * 2014-08-25 2017-07-28 哈尔滨工业大学 A kind of structure code method of unique decodable code based on traversal mode
CN104349165A (en) * 2014-09-16 2015-02-11 上海通途半导体科技有限公司 High-performance length-variable coding and decoding methods and devices
CN104349165B (en) * 2014-09-16 2017-06-16 上海通途半导体科技有限公司 The elongated decoding method of high-performance and device
CN111031511A (en) * 2019-12-26 2020-04-17 北京工业大学 Variable-granularity real-time environment data acquisition method for Internet of things
CN117560718A (en) * 2024-01-11 2024-02-13 广东广宇科技发展有限公司 Fire control Internet of things remote monitoring method based on crowd sensing
CN117560718B (en) * 2024-01-11 2024-04-09 广东广宇科技发展有限公司 Fire control Internet of things remote monitoring method based on crowd sensing

Similar Documents

Publication Publication Date Title
Ratanaworabhan et al. Fast lossless compression of scientific floating-point data
Patel et al. Parallel lossless data compression on the GPU
CN102595496A (en) Context-adaptive quotient and remainder encoding method used for sensing data of wireless sensing nodes
CN101241508B (en) Structured data sequence compression method
CN104168085A (en) Data compression method based on redundant entropy conversion
CN114697672B (en) Neural network quantization compression method and system based on run Cheng Quanling coding
CN114697654B (en) Neural network quantization compression method and system
Kim et al. SBH: Super byte-aligned hybrid bitmap compression
WO2023202149A1 (en) State selection method and system for finite state entropy encoding, and storage medium and device
WO2019080670A1 (en) Gene sequencing data compression method and decompression method, system, and computer readable medium
CN104156990B (en) A kind of lossless compression-encoding method and system for supporting super-huge data window
CN104125475A (en) Multi-dimensional quantum data compressing and uncompressing method and apparatus
CN110825323A (en) Storage and reading method of floating point number data and computer readable storage medium
Albers et al. Average case analyses of list update algorithms, with applications to data compression
CN105302915A (en) High-performance data processing system based on memory calculation
CN1426629A (en) Method and apparatus for optimized lossless compression using plurality of coders
Sheikh et al. Data compression techniques for wireless sensor network
CN106790550A (en) A kind of system suitable for the compression of power distribution network Monitoring Data
CN108829930B (en) Lightweight method for designing MBD model by three-dimensional digital process
CN116737716A (en) Time sequence data compression method and device
Yuan et al. Parallel implementation of lossy data compression for temporal data sets
Almeida et al. Two high-performance alternatives to ZLIB scientific-data compression
CN106559085A (en) A kind of normal form Hafman decoding method and its device
CN109698703A (en) Gene sequencing data decompression method, system and computer-readable medium
Balevic et al. Using arithmetic coding for reduction of resulting simulation data size on massively parallel GPGPUs

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB03 Change of inventor or designer information

Inventor after: Chen Xiaojiang

Inventor after: Wang Ju

Inventor after: Yin Xiaoyan

Inventor after: Ren Xuejun

Inventor after: Fang Dingyi

Inventor after: Chen Shaofeng

Inventor after: Zhao Kang

Inventor after: Wang Wei

Inventor after: Xing Tianzhang

Inventor after: Zhang Yuan

Inventor after: Liu Chen

Inventor before: Fang Dingyi

Inventor before: Wang Ju

Inventor before: Yin Xiaoyan

Inventor before: Ren Xuejun

Inventor before: Chen Xiaojiang

Inventor before: Chen Shaofeng

Inventor before: Zhao Kang

Inventor before: Wang Wei

Inventor before: Xing Tianzhang

Inventor before: Zhang Yuan

Inventor before: Liu Chen

COR Change of bibliographic data

Free format text: CORRECT: INVENTOR; FROM: FANG DINGYI REN XUEJUN CHEN XIAOJIANG CHEN SHAOFENG ZHAO KANG WANG WEI XING TIANZHANG ZHANG YUAN LIU CHEN WANG JU YIN XIAOYAN TO: CHEN XIAOJIANG REN XUEJUN FANG DINGYI CHEN SHAOFENG ZHAO KANG WANG WEI XING TIANZHANG ZHANG YUAN LIU CHEN WANG JU YIN XIAOYAN

C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20120718