CN100476797C - Data lossless compression method for data transmission of remote monitoring system - Google Patents
Data lossless compression method for data transmission of remote monitoring system Download PDFInfo
- Publication number
- CN100476797C CN100476797C CNB2007101721515A CN200710172151A CN100476797C CN 100476797 C CN100476797 C CN 100476797C CN B2007101721515 A CNB2007101721515 A CN B2007101721515A CN 200710172151 A CN200710172151 A CN 200710172151A CN 100476797 C CN100476797 C CN 100476797C
- Authority
- CN
- China
- Prior art keywords
- data
- character
- coding
- strnew
- strold
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
The invention discloses a data lossless compression method for remote monitoring system data transmission, belonging to the remote monitoring technical field; the invention comprises a historical data resister with the length of 26 characters and a coding dictionary, wherein the real-time monitored status data are collected, coded and transmitted in periodic cycles, the new data are compared with the historical data character by character, the character statistical coding which is continuously unchanged is realized the redundancy removal compression. The invention has the advantages of high data compression ratio on slow acting monitoring status data, simple and quick coding and decoding algorism, small data buffer area needed and easy realization of hardware programming; moreover, the invention also has the advantages of greatly reducing the data volume and the data transmission cost of the remote data transmission and improving real time and reliability of the data transmission.
Description
Technical field is new
The present invention relates to the data compression method in a kind of remote control technology field, especially relate to a kind of data lossless compression method of long distance control system data transmission.
Background technology
Flourish along with mobile radio networks, remote control technology based on mobile communications network is also more and more used, monitor message comprises video, image, GPS longitude and latitude and the various state parameters of monitored object etc., wish The more the betterly, a lot of application scenarios are more wished and can be monitored in real time object.Be subjected to restrictions such as data transfer bandwidth, transmission cost, transfer rate, all wish to reduce data quantity transmitted as far as possible; In order to increase the monitor message amount, and reduce transmitted data amount again, must carry out data compression, and wish to obtain the big ratio of compression of trying one's best.Data compression method can be divided into lossless compress and lossy compression method two big classes.Lossless compress utilizes the statistical redundancy of data to compress, and can recover raw data fully and does not introduce any distortion; Lossy compression method is meant under the situation that allows the certain precision loss, reduces some inessential data, the data after the compression are analyzed, though different with original data, do not influence result to data analysis.The algorithm of text lossless compress commonly used has: Huffman encoding, Run-Length Coding, arithmetic coding etc.; They all are when the statistical property of information source has known, can reach or near the compression limit boundary, but for the unmeasured real-time monitor state data of probabilistic statistical characteristics, these statistical coding methods lose efficacy; General-purpose coding methods such as LZW do not rely on the probabilistic statistical characteristics of information source fully, be suitable for long character stream coding, and coding are complicated, and hardware is realized difficulty.Except vedio data, the monitor message of remote monitoring more is the status data by the setting cycle continuous acquisition, data transmission based on mobile communications network, as short message or data service (as GPRS or CDMA etc.) etc., data are sending continuously by certain transmission cycle with the text formatting transmission, packet of each transmission, each packet comprises 1 or many bar states supplemental characteristic.The object of data compression is this packet.Packet has following characteristics: 1. every bar state data are shorter, account for 4-8 byte; 2. the degree of correlation is very little or do not have a rule between the different conditions data; 3. status data is scale-of-two or the decimal system or hexadecimal numeric format, and each numerical value step-by-step is represented with the ASCII character character style; 4. every bar state data are generally gradual data, and very big similarity are arranged with redundant between its historical data.
In the existing long distance control system, data transmission for video, sound, image has all adopted data compression method, also there is industry standard directly to follow, and all be directly to send to remote monitoring center after gathering for the real-time monitoring transmission of above-mentioned status data, this makes the data of transmission that very big redundancy be arranged, and transfer efficiency is low and increased cost;
Find through literature search prior art, Chinese invention patent " remote radio data transmission system that engineering machinery is used and method ", application number 200510200195.5, publication number CN1716333, this patent disclosure a kind of engineering machinery remote radio data transmission system and the method used, be characterized in each subsystem supplemental characteristic of engineering machinery being carried out data-signal and meeting the transmission and the reception of the specific information signal of specific protocol from the communication interface of engineering machinery with microcontroller (MCU); And each subsystem supplemental characteristic of engineering machinery is transmitted and the receiving remote wireless monitor by wireless data transfer module; With 120 seconds be the cycle, gather and the engine data frame that sends the CAN bus, its method is after Frame is separated frame, to deposit internal memory in, directly is transferred to Surveillance center by the GPRS mode.There is following deficiency in this invention: a Frame of [1] CAN bus comprises parameter group data total length, engine speed, engine water temperature, fuel level, engine oil pressure and 5 parameters of car load supply voltage, account for 16 bytes, be converted into 10 systems after the parsing and transmit again, increased data bits on the contrary; [2] for water temperature, oil level, pressure, the so gradual status data of voltage, do not utilize its gradual characteristics compressing data transmission, but repeat transmission, increased data redundancy and transmission cost.
Summary of the invention
The present invention is directed to deficiency of the prior art, a kind of data lossless compression method of long distance control system data transmission is provided, in real-time monitor procedure, to monitor state circulate information cycle continuous acquisition, coding, transmission, under the situation that does not reduce quantity of information, compress data quantity transmitted, and the coding/decoding algorithm is simple, quick as far as possible, be easy to hardware programming and realize, can satisfy the needs of remote real-time monitoring.
The present invention is achieved by the following technical solutions, the method of the invention adopts historical data register and encoder dictionary, collection, coding, transmission to the status data loop cycle of real-time monitoring, new data and historical data compare character by character, and constant continuously character statistical coding is realized going redundant compression.
Described historical data register is the data storage area that can preserve 26 characters, and the historical data that is used to preserve a collection period is for the aftermentioned convenience, with its RNTO strOld;
Described encoder dictionary is a to z of standard A SCII character set, and promptly ASCII character 97 is represented integer 1 to 26 respectively to ASCII character 122; Cataloged procedure is for to be encoded to ascii character a to z with integer 1 to 26, and promptly the coding formula to Integer n is ASCII (n+96), and wherein ASCII (n+96) expression ASCII character is the ascii character of n+96; Because encoder dictionary can be tried to achieve by above-mentioned coding formula, so a transfer encoding character, and need not transmit dictionary; Encoder dictionary adopts a to z of standard A SCII character set, main because: status data is generally scale-of-two or the decimal system or sexadecimal number, and character is 0-9 or A-F, self-defining coding can not with uncoded data collision, and cause decoding error, adopt a-z can avoid above-mentioned mistake.
Data lossless compression method of the present invention may further comprise the steps:
Steps A: gather a new status data;
Step B: status data is converted into character string strNew;
Step C: if not article one data, skip this step, forward step D to, otherwise, to the strOld initialization, strNew is saved in strOld, and strNew is directly exported as coding result, forward step G to;
Step D: to strNew and strOld character comparison one by one, statistics is constant character number continuously;
Step e: according to statistics, coding formula with encoder dictionary is encoded to character number, replace a plurality of characters consecutive identical among the strNew with single encoded character, keep the character that has changed, coded character is merged with the character that has changed export in order as coding result with strOld;
Step F: strNew is saved in strOld, covers a historical data, as the reference historical data of next bar data;
Step G: the transfer encoding result is to remote monitoring center;
Step H: the collection period of delaying time, forward steps A to, circle collection, coding, transmission course finish up to monitoring continuously.
Wherein step B when the status data that collects was exactly character string originally, can be reduced to new status data is remained to strNew.
Wherein step e can with the step F exchange sequence.
The invention has the beneficial effects as follows: the inventive method has made full use of this characteristic as gradual numerical value of status data, under the situation that does not cause data distortion, by with the relatively coding of historical data, reduced data redundancy, data compression ratio with average about 70%-90%, it is more than half that corresponding data transmission cost is reduced, and data rate also improves nearly twice, at every turn multipotency is to reaching the individual data encoding compression of 26 characters, can satisfy very high-precision data acquisition data compression, and compile, decoding algorithm is simply quick, only need very little data buffer, codec that need not be special is easy to hardware programming and realizes, reduce the data volume and the data transmission cost of remote data transmission greatly, and improve real time of data transmission and reliability.
Description of drawings
Fig. 1 is the inventive method process flow diagram;
Embodiment
The present invention is described in further detail below in conjunction with accompanying drawing and specific embodiment: embodiment is being to implement under the prerequisite with the technical solution of the present invention; provided detailed embodiment and process, but protection scope of the present invention is not limited to following embodiment.
In to hydraulic pressure crawler crane remote real-time monitoring process, need with 20 seconds transmission cycles circulation continuous acquisition with send a plurality of ID numbers the CAN bus data of a plurality of state parameters to remote monitoring center, below in conjunction with accompanying drawing 1, each of certain ID being gathered 1 data continuous acquisition in cycle, encode, be transmitted as example explanation method of the present invention, be the combination arranged side by side of following method for the situation of a plurality of parameters of a plurality of ID.
As shown in Figure 1, suppose to certain ID continuous acquisition to 3 CAN bus datas be
data1=1E0700002A120000,
data2=1E1A00002C120000,
data3=1F0A00002C120000,
As follows to its data compression process step:
Step 1.101 collects 16 sexadecimal new datas of article one data1=1E0700002A120000;
Step 2.102 is converted into character string strNew=" 1E0700002A120000 " with 16 system numeric datas;
Is it article one data that step 3.103 is judged? be, so forward 104 to;
Step 4.104 pair strOld initialization is saved in strOld with strNew, and strNew is directly exported as coding result strCps, forwards 108 to, strOld=strNew=" 1E0700002A120000 "; StrCps=strNew=" 1E0700002A120000 ";
Step 5.108 transfer encoding as a result strCps to remote monitoring center;
1 collection period of step 6.109 time-delay 20 seconds forwards 101 to, gathers next bar data;
Step 7.101 collects second 16 system new data data2=1E1A00002C120000;
Step 8.102 is converted into character string strNew=" 1E1A00002C120000 " with 16 system numeric datas;
Is it article one data that step 9.103 is judged? not, so forward 105 to;
Step 10.105 couple strNew and strOld character one by one relatively add up constant character number continuously, get (2) 1A (5) C (6);
Step 11.106 is according to statistics, with the coding formula character number is encoded, (2)->ASCII (2+96)=' b ', (5)->ASCII (5+96)=' e ', (6)->ASCII (6+96)=f, keep the character that changes, merging obtains coding result strCps=" b1AeCf " in order;
Step 12.107 is saved in strOld with strNew, covers a historical data, as the reference historical data of next bar data, and strOId=strNew=" 1E1A00002C120000 ";
Step 13.108 transfer encoding as a result strCps to remote monitoring center;
1 collection period of step 14.109 time-delay 20 seconds forwards 101 to, gathers next bar data;
Step 15.101 collects the 3rd 16 system new data data3=1F0A00002C120000;
Step 16.102 is converted into character string strNew=" 1F0A00002C120000 " with new data;
Is it article one data that step 17.103 is judged? not, so forward 105 to;
Step 18.105 couple strNew and strOld character one by one relatively add up constant character number continuously, get (1) F0 (13);
Step 19.106 is encoded to character number with the coding formula according to statistics, and (1)->ASCII (1+96)=' a ', (13)->ASCII (13+96)=' m ', keeping the character that changes, merging obtains coding result strCps=" aF0m " in order;
Step 20.107 is saved in strOld with strNew, covers a historical data, as the reference historical data of next bar data, and strOld=strNew=" 1F0A00002C120000 ";
Step 21.108 transfer encoding as a result strCps to remote monitoring center;
1 collection period of step 22.109 time-delay 20 seconds forwards 101 to, gathers next bar data, and circulation 101-109 finishes up to monitoring.
As seen, because data are gradual, except article one data can not be compressed as the initial reference historical data, thereafter data have all obtained very big compression, wherein data2 is encoded to " b1AeCf " by " 1E1A00002C120000 ", from 16 character compression to 6 characters, compressibility is 10/16=62.5%; Data3 is encoded to " aF0m " by " 1F0A00002C120000 ", and from 16 character compression to 4 characters, compressibility is 12/16=75%.If continuous two data are just the same, then be encoded to ASCII (16+96)=" p ", reach the maximum compression rate, i.e. 15/16=93.75%.
For present embodiment, historical data register strOld only needs 16 character lengths to get final product, and because the coding formula is simple, the present invention only needs the little hardware resource to realize easily in embedded systems such as single-chip microcomputer, DSP, ARM, calculated amount is little, the real-time height has very big using value.
Claims (3)
1, a kind of data lossless compression method of long distance control system data transmission, it is characterized in that, adopt historical data register and encoder dictionary, collection, coding, transmission to the status data loop cycle of real-time monitoring, new data and historical data compare character by character, constant continuously character statistical coding is realized going redundant compression, wherein:
Described historical data register is the data storage area that can preserve 26 characters, and the historical data that is used to preserve a collection period is with its RNTO strOld;
Described encoder dictionary is a to z of standard A SCII character set, be that ASCII character 97 is to ASCII character 122, represent integer 1 to 26 respectively, cataloged procedure is for to be encoded to ascii character a to z with integer 1 to 26, promptly the coding formula to Integer n is ASCII (n+96), and wherein ASCII (n+96) expression ASCII character is the ascii character of n+96;
Described data lossless compression method specifically may further comprise the steps:
Steps A: gather a new status data;
Step B: status data is converted into character string strNew;
Step C: if not article one data, skip this step, forward step D to, otherwise, to the strOld initialization, strNew is saved in historical data register strOld, and strNew is directly exported as coding result, forward step G to;
Step D: to strNew and strOld character comparison one by one, statistics is constant character number continuously;
Step e: according to statistics, coding formula with encoder dictionary is encoded to character number, replace a plurality of characters consecutive identical among the strNew with single encoded character, keep the character that has changed, coded character is merged with the character that has changed export in order as coding result with strOld;
Step F: strNew is saved in strOld, covers a historical data, as the reference historical data of next bar data;
Step G: the transfer encoding result is to remote monitoring center;
Step H: the collection period of delaying time, forward steps A to, circle collection, coding, transmission course finish up to monitoring continuously.
2, the data lossless compression method of long distance control system data transmission according to claim 1 is characterized in that, first execution in step F, and then execution in step E.
3, the data lossless compression method of long distance control system data transmission according to claim 1 is characterized in that, described step B when the status data that collects was exactly character string originally, is reduced to new status data is remained to strNew.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2007101721515A CN100476797C (en) | 2007-12-13 | 2007-12-13 | Data lossless compression method for data transmission of remote monitoring system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2007101721515A CN100476797C (en) | 2007-12-13 | 2007-12-13 | Data lossless compression method for data transmission of remote monitoring system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101197071A CN101197071A (en) | 2008-06-11 |
CN100476797C true CN100476797C (en) | 2009-04-08 |
Family
ID=39547448
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2007101721515A Expired - Fee Related CN100476797C (en) | 2007-12-13 | 2007-12-13 | Data lossless compression method for data transmission of remote monitoring system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100476797C (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102882636B (en) * | 2012-09-07 | 2015-05-27 | 航天东方红卫星有限公司 | Lossless compression method for satellite packet telemetry data |
CN104833055B (en) * | 2015-05-07 | 2018-02-16 | 珠海格力电器股份有限公司 | Method and device for transmitting data of multi-split air conditioning system |
CN105258303B (en) * | 2015-11-20 | 2018-01-16 | 珠海格力电器股份有限公司 | Air conditioning unit operation data remote transmission control method and device and air conditioner |
CN111245891A (en) * | 2019-12-27 | 2020-06-05 | 特瓦特能源科技有限公司 | Real-time data display method and device |
CN111258857A (en) * | 2020-02-21 | 2020-06-09 | 山东超越数控电子股份有限公司 | Server state monitoring method and system |
CN113810174A (en) * | 2021-09-16 | 2021-12-17 | 金蝶软件(中国)有限公司 | Data processing method and related equipment |
CN115883670B (en) * | 2023-02-21 | 2023-05-12 | 湖南格尔智慧科技有限公司 | Medical data analysis and acquisition method and device |
-
2007
- 2007-12-13 CN CNB2007101721515A patent/CN100476797C/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN101197071A (en) | 2008-06-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100476797C (en) | Data lossless compression method for data transmission of remote monitoring system | |
CN101932002B (en) | Method for realizing matching between uplink transmission rate and downlink transmission rate as well as BBU and RRU | |
CN102752798B (en) | Method for losslessly compressing data of wireless sensor network | |
CN100517979C (en) | Data compression and decompression method | |
CN101706763A (en) | Method and device for serialization and deserialization | |
CN208905095U (en) | A kind of UAV Video acquisition communication system | |
CN112330456A (en) | Ultra-low-delay hardware accelerated market data stream analysis system | |
CN101674315A (en) | Method and device for compressing and decompressing timestamp | |
CN102130743A (en) | Data acquisition method in large-scale wireless sensor network | |
CN101667843A (en) | Methods and devices for compressing and uncompressing data of embedded system | |
Zeinali et al. | Impact of compression and aggregation in wireless networks on smart meter data | |
CN112131865A (en) | Digital compression processing method, device and storage medium for rail transit message | |
CN101832125B (en) | Remotely updating device of EDIB (Electronic Data Interchange Bus) based down-hole program | |
CN110913012A (en) | High-speed parallel data processing method based on agricultural Internet of things | |
CN101494461B (en) | Variable length symbol grade invertible encoding and decoding method for joint source and channel | |
CN104156990A (en) | Lossless compressed encoding method and system supporting oversize data window | |
CN106790550B (en) | A kind of system suitable for the compression of power distribution network monitoring data | |
CN101908910A (en) | Compression algorithms for address data used for low-voltage power line carrier communication | |
CN103731241B (en) | Encoding system and method for improving spectrum efficiency of communication system | |
CN1279697C (en) | Testing data compression code, decoding method and special decoding element of slice system | |
CN102628948A (en) | Compression method for transmitting longitude and latitude position data of general aircraft in batch | |
CN103050123B (en) | A kind of method and system of transmitting voice information | |
CN116723250A (en) | Compression method of DL/T645 frame and data transmission system | |
Hua et al. | Distributed source coding in wireless sensor networks | |
CN112328373B (en) | Distributed simulation-oriented automatic discovery method for data distribution service DDS |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20090408 Termination date: 20111213 |