CN103856296B - Address data compression algorithm for low-voltage power line carrier communication - Google Patents
Address data compression algorithm for low-voltage power line carrier communication Download PDFInfo
- Publication number
- CN103856296B CN103856296B CN201310612240.2A CN201310612240A CN103856296B CN 103856296 B CN103856296 B CN 103856296B CN 201310612240 A CN201310612240 A CN 201310612240A CN 103856296 B CN103856296 B CN 103856296B
- Authority
- CN
- China
- Prior art keywords
- byte
- address
- bytes
- low
- compression algorithm
- 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.)
- Active
Links
Landscapes
- Communication Control (AREA)
Abstract
The invention discloses an address data compression algorithm for low-voltage power line carrier communication. The address data compression algorithm is mainly for the DL/T645 communication protocol, and compression of address data for power line carrier communication is achieved with an address byte matching and compressing method. The address data compression algorithm mainly converts address bytes of BCD codes into address bytes of HEX codes firstly, then performs the compression algorithm on the address bytes of the HEX codes and compresses the address data of which the high bytes are '00' in an address and address data of which the address bytes are repeated. According to the address data compression algorithm for low-voltage power line carrier communication, the length of the address data in low-voltage power line carrier communication can be effectively shortened, the communication success rate is improved, and the anti-interference capability is enhanced.
Description
【Technical field】
Address date compression algorithm the present invention relates to be used for low-voltage powerline carrier communication.
【Background technology】
Low-voltage powerline carrier communication is most basic a kind of communication mode in power communication system, and it is to utilize power line
As transmission channel, the independent construction of line and maintenance line are not required to, and power circuit is firm in structure, therefore power line carrier is logical
Letter is also distinctive communication mode in power system, and the neck such as centralized automatic meter-reading, smart home, intelligent building is widely used at present
Domain.But low-voltage power line network structure and load complexity, work under bad environment, signal attenuation are greatly, low voltage power line communication channel is made an uproar
Acoustic jamming and time-varying decay are its intrinsic defects, which results in power line transmission data rate is relatively low, reliability is also poor,
The serious popularization and application for constraining power-line carrier communication.Country is promoting the construction of intelligent grid energetically at present, and
Low-voltage carrier communication solves the important technical of " last one kilometer " problem present in intelligent grid as one kind, it will hair
Wave increasing effect.Therefore solve low-voltage powerline carrier communication reliability, improve traffic rate become development it is low
The key of Middle-voltage Power Carrier Communication technology.
Spread spectrum communication is a kind of widely used communication technology in current power line carrier communication field.Although the technology
With strong antijamming capability, good confidentiality, anti-fading, anti-multipath jamming ability is strong, and with multiple access capability, to be easily achieved code division more
The advantages of location, but also not fully up to expectations in actual application, having that communication success rate is not high, traffic rate is slower etc. asks
Topic.If taking certain algorithm, means, by communication message contraction in length, communication success rate, enhancing can be improved in the present case
Antijamming capability.
Communication protocol widely used in country's low-voltage power line automatic meter reading system is DL/T645 communication protocols at present,
Its mailing address is 6 byte binary-coded decimals, and address is arranged in order from low byte to high byte.In actual applications, it is contemplated that relaying road
By algorithm, mailing address will be the integral multiple of 6 bytes, and this proportion for causing mailing address shared in communication message is increased very
It is many, therefore, can for mailing address the characteristics of design corresponding compression algorithm.
【The content of the invention】
The purpose of the present invention shorten power line carrier communication message length, improve power line carrier communication success rate and can
By property.The object of the invention is realized by following technical scheme:
The address date compression algorithm of a kind of low-voltage powerline carrier communication, for DL/T645 communication protocols;Its feature exists
In comprising the following steps:(1)The address byte of binary-coded decimal is converted into HEX yards of address byte(2)Judge the weight of address byte
It is multiple whether to belong to following three kinds of situations:1. continuously repeat the data of same byte, and the byte for repeating three or three with
On, the data no more than 3 bytes are 2. continuously repeated, 3. interval is not more than the repetition of 6 bytes;It is to carry out the pressure of address byte
Contracting;(3)When being compressed to repetition byte, specific compaction algorithms, address compression format words are shown using compressed format word
A byte is accounted for, its each bit D7~D0 is defined as follows:
D7-D6:' 11 ' are fixed as, represent that the byte is address compression format words
D5:Repetition byte direction word:' 0 ' represents that byte to be copied is close to the format words, and ' 1 ' represents word to be copied
Section is since the 1st byte of previous address;
D4-D3:Byte number to be copied, is 3 bytes to the maximum, if D4D3 is ' 00 ', there is two kinds of implications:1. D5 is ' 0 '
When, represent that byte to be copied is ' 00 ';2. when D5 is ' 1 ', represent that byte length to be copied is determined by the value of D2-D0;
D2-D0:The byte number for reducing(Equal to D2D1D0+2), at most 9 bytes are reduce per format words.
Present invention is generally directed to DL/T645 communication protocols, the method that compression is matched by address byte is realized to power line
The compression of the address date of carrier communication.The present invention can effectively shorten the length of address date in low-voltage powerline carrier communication,
Improve communication success rate, enhancing antijamming capability.
【Brief description of the drawings】
Fig. 1 is DL/T645 communication protocol frame formats.
Fig. 2 is the code conversion compression algorithm example that embodiment one is provided.
Fig. 3 is compression algorithm example between the multiaddress that embodiment two is provided.
Fig. 4 is the address byte Matching Compression Algorithm example that embodiment three is provided.
【Specific embodiment】
As shown in figure 1, be DL/T645 communication protocol frame formats, as can be seen from Figure, in DL/T645 communication protocols, ground
Location domain accounts for 6 bytes, and message when transmitting low address byte in preceding, high address byte rear.
Embodiment one, code conversion compression algorithm example:As shown in Fig. 2 two binary-coded decimal mailing addresses are respectively
" 000000001234 " and " 000000220034 "(8bit, span is 0~99), high address byte is in preceding, low address word
Section is rear.But first pass low byte during communication transfer, thus BCD storages order for " 341200000000 " and
“34002200000000”.BCD code conversions are encoded into HEX(8bit, span is 0~255), address is just transformed to
" 220C00000000 " and " 220016000000 ".Then byte not for ' 00 ', then two are found from high byte to low byte
Address date is respectively " 0C " and " 16 ", and by the highest bit positions ' 1 ' of correspondence byte, and it is end mark to take highest bit
Will, even highest bit are ' 1 ', then it represents that the address of 6 bytes terminates, and take other low 7bits of the byte as having
Effect address.The address that high byte in address is for ' 00 ' is reduce, the address byte after two address dates compressions is transformed to
" 228C220096 ", compared with 12 original address bytes, shortens 7 bytes.
The above method by code conversion, for reducing the address that high byte in address is for ' 00 '.Wherein step(2)In
Can also be using 7bits high as effective address, lowest order so needs displacement as end mark.
Compression algorithm example between embodiment two, multiaddress:As shown in figure 3, three tactic binary-coded decimal mailing addresses point
Not Wei " 000023651234 ", " 000023650034 " and " 000023650036 ", preceding, low address byte exists high address byte
Afterwards.Equally, first pass low byte during communication transfer, thus BCD storages order be " 341265230000 ",
" 340065230000 " and " 320065230000 ", be converted into HEX yards of address byte respectively " 220C41170000 ",
" 220041170000 " and " 240041170000 ".Then, first mailing address is retained constant, and from first mailing address
Start, the corresponding byte of two neighboring address is carried out into XOR, respectively obtain " 220C41170000 ",
" 000C00000000 " and " 060000000000 ".Afterwards, non-' 00 ' byte is found in each address from high byte to low byte, point
Not Wei " 17 " and " 0C " and " 06 ", will correspondence byte highest bit positions ' 1 ', it is end mark to take highest bit, even
Highest bit is ' 1 ', then it represents that the address of 6 bytes terminates, and takes the byte other low 7bits as effective address.
The address that high byte in each address is for ' 00 ' is reduce, the byte after three address dates compressions is just transformed to
" 220C4197008C86 ", compared with 18 original address bytes, shortens 11 bytes.
The above method is more suitable for reducing high address byte identical part in multiple continuation addresses.Wherein the step of
(2)In XOR can also be substituted by subtraction.
Embodiment three, address byte Matching Compression Algorithm example:As shown in figure 4, three tactic binary-coded decimals are communicatedly
Location is respectively " 000023010101 ", " 650023650000 " and " 000023650023 ", and high address byte is in preceding, low address word
Section is rear.Equally, first pass low byte during communication transfer, thus BCD storages order be " 010101230000 ",
" 000065230065 " and " 230065230000 ", be converted into HEX yards of address byte respectively " 010101170000 ",
" 000041170041 " and " 170041170000 ".Compression process is as follows:
1st, three address dates are lined up, and three for most starting byte is " 01 ", meets contractive condition.Find out repetition
Byte " 01 ", first character section does not compress, two bytes after only compressing;Build compressed format word:The bit of format words highest two
(D7-D6)It is fixed as " 11 ", byte to be copied will be close to format words, therefore D5bit is " 0 ", and byte number to be copied is 1, therefore
The value of D4D3 be " 01 ", it is necessary to filling byte number 2, therefore D2-D0 be 2-2, i.e. " 000 ".It can thus be concluded that first compressed format
Word is " C8 ".
2nd, subsequent byte is " 17 ", in the absence of consecutive identical situation, is not compressed.
3rd, continuous 4 bytes " 00 " are followed by(Across two addresses), meet contractive condition, build compressed format word:Form
The bit of word highest two is fixed as " 11 ", and byte to be copied is " 00 ", therefore the value of D5D4D3 is " 000 ", it is necessary to the byte number of filling
4, therefore D2-D0 is 4-2, i.e. " 010 ".It can thus be concluded that second compressed format word is " C2 ".
4th, " 411700 " in the absence of the situation of repetition, do not compress three subsequent bytes.
, there are three bytes and repeat situation in 6 the 5th, subsequent bytes " 411700411700 ", need compression, build compressed format
Word:The bit of format words highest two is fixed as " 11 ", and byte to be copied is " 411700 ", and is close to format words, therefore D5D4D3
It is worth for " 011 ", it is necessary to the byte number 6 filled, therefore D2-D0 is 6-2, i.e. " 100 ".It can thus be concluded that the 3rd compressed format word is
“DC”
6th, last byte " 00 " is not compressed in the absence of situation is continuously repeated.
Address is " 01C817C2411700DC00 ", 18 ground original with three address dates after the compression for finally giving
Location byte is compared, and has reduce 9 bytes.
Claims (1)
1. the address date compression algorithm of a kind of low-voltage powerline carrier communication, for DL/T645 communication protocols;Its feature exists
In comprising the following steps:(1) address byte (2) that the address byte of binary-coded decimal is converted into HEX yards is judged the weight of address byte
Multiple any one whether belonged in following three kinds of situations:A. the data of same byte are continuously repeated, and the byte for repeating exists
Three or more than three, b. continuously repeats the data no more than 3 bytes, and c. intervals are not more than the repetition of 6 bytes;It is to carry out
The compression of address byte;(3) when being compressed to repetition byte, specific compaction algorithms, ground are shown using compressed format word
Location compressed format word accounts for a byte, and its each bit D7~D0 is defined as follows:
D7-D6:' 11 ' are fixed as, represent that the byte is address compression format words;
D5:Repetition byte direction word:' 0 ' represents that byte to be copied is close to the format words, ' 1 ' represent byte to be copied from
1st byte of previous address starts;
D4-D3:Byte number to be copied, is 3 bytes to the maximum, if D4D3 is ' 00 ', there is two kinds of implications:When i D5 are ' 0 ', table
Show that byte to be copied is ' 00 ';When ii D5 are ' 1 ', represent that byte length to be copied is determined by the value of D2-D0;
D2-D0:The byte number for reducing is equal to D2D1D0+2, and at most 9 bytes are reduce per format words.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310612240.2A CN103856296B (en) | 2010-07-16 | 2010-07-16 | Address data compression algorithm for low-voltage power line carrier communication |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010102290123A CN101908910A (en) | 2010-07-16 | 2010-07-16 | Compression algorithms for address data used for low-voltage power line carrier communication |
CN201310612240.2A CN103856296B (en) | 2010-07-16 | 2010-07-16 | Address data compression algorithm for low-voltage power line carrier communication |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2010102290123A Division CN101908910A (en) | 2010-07-16 | 2010-07-16 | Compression algorithms for address data used for low-voltage power line carrier communication |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103856296A CN103856296A (en) | 2014-06-11 |
CN103856296B true CN103856296B (en) | 2017-05-17 |
Family
ID=50863545
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310612240.2A Active CN103856296B (en) | 2010-07-16 | 2010-07-16 | Address data compression algorithm for low-voltage power line carrier communication |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103856296B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101241508A (en) * | 2007-08-01 | 2008-08-13 | 金立 | Structured data sequence compression method |
CN101667843A (en) * | 2009-09-22 | 2010-03-10 | 中兴通讯股份有限公司 | Methods and devices for compressing and uncompressing data of embedded system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05110448A (en) * | 1991-10-16 | 1993-04-30 | Matsushita Electric Ind Co Ltd | Digital data compression, expansion method and its reproduction device |
-
2010
- 2010-07-16 CN CN201310612240.2A patent/CN103856296B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101241508A (en) * | 2007-08-01 | 2008-08-13 | 金立 | Structured data sequence compression method |
CN101667843A (en) * | 2009-09-22 | 2010-03-10 | 中兴通讯股份有限公司 | Methods and devices for compressing and uncompressing data of embedded system |
Non-Patent Citations (1)
Title |
---|
Run Length 压缩算法的改进及C++的实现;全立新;《长沙电力学院学报(自然科学版)》;20040531;第19卷(第2期);第29-32页 * |
Also Published As
Publication number | Publication date |
---|---|
CN103856296A (en) | 2014-06-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CA2616319A1 (en) | A relay-to-relay direct communication system and method in an electric power system | |
CN103795421B (en) | Method for data compression and decompression i | |
AU2001277483B2 (en) | Header compression method for network protocols | |
CN101568144B (en) | Header compression method applicable to wireless ad hoc network | |
CN101908910A (en) | Compression algorithms for address data used for low-voltage power line carrier communication | |
CN100476797C (en) | Data lossless compression method for data transmission of remote monitoring system | |
CN101595645A (en) | The method and system of transmission/reception serial data and serial communication system thereof in the serial communication system | |
US20030141995A1 (en) | Wireless communication encoding and decoding techniques using variable length codes | |
CN103856296B (en) | Address data compression algorithm for low-voltage power line carrier communication | |
CN100438518C (en) | Radio communication coding and decoding method using variable length signal to express digital data | |
EP1631885A2 (en) | Two stage loss-less compressor for a clear channel over a packet network | |
CN104412514A (en) | Inverted spreading DSSS for smart utility networks | |
CN103731241B (en) | Encoding system and method for improving spectrum efficiency of communication system | |
CN1357189A (en) | Robust delta encoding with history information | |
CN107064621B (en) | Intelligent electric meter data compression method and system | |
CN101540754A (en) | Two-line self-powered bus communication method | |
CN105072066A (en) | Simultaneous wireless information and energy transfer method and system with protection interval signals | |
CN101282193B (en) | System and method for transmission of data | |
CN1120582C (en) | Integral power distribution power line carrier equipment | |
CN103763736A (en) | Wireless real-time high-quality voice transmission device and method based on ZigBee technology | |
CN103346863A (en) | Arithmetic domain bit interleaved code modulation method | |
CN102710263B (en) | Entropy decision optimal differential coding-based Lempel-Ziv-Welch (LZW) compression method | |
CN100456723C (en) | Wireless network converter | |
CN105553625A (en) | Remote channel message compression method and system for electricity consumption collection system | |
CN114827287A (en) | Data compression method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |