CN107040525A - One kind uses gps data compression and its data transmission method - Google Patents
One kind uses gps data compression and its data transmission method Download PDFInfo
- Publication number
- CN107040525A CN107040525A CN201710178837.9A CN201710178837A CN107040525A CN 107040525 A CN107040525 A CN 107040525A CN 201710178837 A CN201710178837 A CN 201710178837A CN 107040525 A CN107040525 A CN 107040525A
- Authority
- CN
- China
- Prior art keywords
- data
- packet
- gps data
- gps
- compression
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/04—Protocols for data compression, e.g. ROHC
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/565—Conversion or adaptation of application format or content
- H04L67/5651—Reducing the amount or size of exchanged application data
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W28/00—Network traffic management; Network resource management
- H04W28/02—Traffic management, e.g. flow control or congestion control
- H04W28/06—Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Position Fixing By Use Of Radio Waves (AREA)
Abstract
The invention discloses using gps data compression and its data transmission method, comprise the following steps:(1) first gps data is read from data source and is used as reference data;(2) data of floating type all in above-mentioned gps data are converted into integer data;(3) GPS reference data is saved into packet in binary form;(4) judge whether gps data has all been handled;(5) packet partial data is done into CRC32, for server verification data bag whether complete transmission;(6) data are compressed using GZIP compression algorithms;(7) packet compressed is sent by network;(8) gps data sent is deleted from data source;(9) judge whether data have been compressed completely, inquiry needs whether gps data to be processed is empty in data source, if it is, compression is completed, terminates this second compression;If it is not, then return to step (1) restarts.The present invention is compressed gps data by algorithm, and the space that can save storage is used.
Description
Technical field
It is more particularly to a kind of to use gps data compression and its data transmission method the present invention relates to data processing field.
Background technology
The storage volume of existing gps data storage and transmission plan is excessive, takes excessive storage area, and passing through
Network, can consume substantial amounts of flow when particularly 3G/4G networks are transmitted.
The content of the invention
Do not need extra hardware to put into the technical problem to be solved in the present invention is to provide a kind of, data storage can be reduced
When required space and a kind of the of flow of transmission consumption use gps data compression and its data transmission method.
To reach above-mentioned purpose, technical scheme is as follows:
One kind is comprised the following steps using gps data compression and its data transmission method:
(1) first gps data is read from data source and is used as reference data;
(2) data of floating type all in the above-mentioned gps data read are converted into integer data, to save storage
Space;
(3) GPS reference data is saved into packet in binary form;
(4) judge whether gps data has all been handled, inquiry needs gps data to be processed in data source, such as
Fruit Query Result is sky, then shows not needing data to be processed, into next program;If for sky, into (a) from
Next gps data is read in data source;All real-coded GAs turn in the gps data for reading this subsequently into (b)
It is changed to integer data;The longitude and latitude and altitude information that have been converted into integer are subtracted by having turned for a upper gps data by (c) again
The longitude and latitude and altitude information of integer are changed to, difference is obtained;Then judge whether the difference that (c) is obtained is less than maximum by (d)
Deviation range if it is, be saved in packet in binary form into (e) by difference, if it is not, then into next journey
Sequence;Difference is preserved to packet, need to judge whether packet reaches optimal size by (f), if it is, into next
Individual program, if it is not, then return to step (4) restarts to be judged;
(5) packet partial data is done into CRC32, obtains the check code of 32 bytes, and be added in packet afterbody;For service
Device verification data bag whether complete transmission;
(6) data are compressed using GZIP compression algorithms;
(7) packet compressed is sent by network;
(8) to prevent from repeating transmitting, the gps data sent is deleted from data source;
(9) judge whether data have been compressed completely, inquiry needs whether gps data to be processed is sky in data source, such as
Fruit is that then compression is completed, and terminates this second compression;If it is not, then return to step (1) restarts.
In one embodiment of the invention, by floating type all in the above-mentioned gps data read in step (2)
The concrete operation method that data are converted to integer data is:The longitude and latitude of the gps data read are respectively multiplied by
10000, height above sea level is multiplied by 100, and direction is multiplied by 10 and round numbers part, and speed is multiplied by into 100 and round numbers part, then will
The data of acceleration and Eulerian angles are multiplied by 10000 round numbers again, the rejection of data more than 10,000,000, with one after obtaining standard deviation
Necessarily substitute.
In one embodiment of the invention, the number of all floating types in the gps data read this in step (4)
It is according to the concrete operation method for being converted to integer data:The longitude and latitude of the gps data read are respectively multiplied by 10000,
Height above sea level is multiplied by 100, and direction is multiplied by 10 and round numbers part, speed is multiplied by into 100 and round numbers part, then by acceleration
Obtained with the data of Eulerian angles and 10000 round numbers again be multiplied by after standard deviation, the rejection of data more than 10,000,000, with 10,000,000 come
Substitute.
In one embodiment of the invention, judge whether difference is less than the specific behaviour of maximum deviation scope in step (4)
It is as method:If the longitude and latitude deviation range of difference is less than 128, height tolerance scope and is less than 32768 in (d), into (e)
Difference is saved in packet in binary form;If the longitude and latitude deviation range of difference is not less than 128, height partially in (d)
Poor scope is not less than 32768, then into next program.
In one embodiment of the invention, judge whether packet reaches the concrete operations of optimal size in step (4)
Method is:Judge whether packet currently reaches the optimal byte of size 22000, if reaching the optimal byte of size 22000, enter
Enter next program, if the not up to optimal byte of size 22000, return to step (4) restarts to be judged.
In one embodiment of the invention, packet partial data is done to CRC32 concrete operation method in step (5)
For:Server end is obtained after packet, takes last 32 byte, and data of the packet in addition to last 32 byte are done
CRC32, and made comparisons with last 32 byte, verify and pass through if equal.
By above-mentioned technical proposal, the beneficial effects of the invention are as follows:
First, the mode of this data compression does not need extra hardware to put into, and can reduce required during data storage
Space.
2nd, only need to by algorithm, you can so that the storage area of data is at most saved into 90%.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is workflow diagram of the present invention.
Embodiment
In order that the technical means, the inventive features, the objects and the advantages of the present invention are easy to understand, tie below
Conjunction is specifically illustrating, and the present invention is expanded on further.
It is shown in Figure 1, compressed the invention discloses one kind using gps data and its data transmission method, including it is as follows
Step:
(1) first gps data is read from data source (or file or other storage modes) and is used as reference data (GPS
Data are obtained by cellphone GPS sensor, and are existed in data source).
(2) data of floating type all in the above-mentioned gps data read are converted into integer data, to save storage
Space;The concrete operation method that the data of floating type all in the above-mentioned gps data read are converted into integer data is:
The longitude and latitude of the gps data read are respectively multiplied by 10000, height above sea level is multiplied by 100, and direction is multiplied by 10 and round numbers
Part, 100 and round numbers part are multiplied by by speed, are multiplied by after the data of acceleration and Eulerian angles then are obtained into standard deviation
10000 round numbers again, the rejection of data more than 10,000,000 is substituted with 10,000,000.
(3) GPS reference data is saved into packet in binary form.
(4) judge whether gps data has all been handled, looked into data source (or file or other storage modes)
Asking needs gps data to be processed, if Query Result is sky, shows not need data to be processed, into next program;
If being not sky, next gps data is read from data source into (a).
All real-coded GAs are converted to integer data in the gps data for reading this subsequently into (b), and this is read
The concrete operation method that the data of all floating types are converted to integer data in the gps data got is:By what is read
The longitude and latitude of gps data are respectively multiplied by 10000, and height above sea level is multiplied by 100, and direction is multiplied by 10 and round numbers part, by speed
100 and round numbers part are multiplied by, then will be multiplied by 10000 after the data acquirement standard deviation of acceleration and Eulerian angles rounds again
Number, the rejection of data more than 10,000,000 is substituted with 10,000,000;The longitude and latitude and height of integer will be had been converted into by (c) again
Data subtract the longitude and latitude and altitude information that have been converted into integer of a gps data, obtain difference;Then sentenced by (d)
Whether the difference that disconnected (c) is obtained is less than maximum deviation scope if it is, difference is saved in into number in binary form into (e)
According to bag, if it is not, then into next program;Judge that the concrete operation method whether difference is less than maximum deviation scope is:Such as
Really in (d) difference longitude and latitude deviation range be less than 128, height tolerance scope be less than 32768, then into (e) by difference with two
Binary form is saved in packet;If the longitude and latitude deviation range of difference is not small not less than 128, height tolerance scope in (d)
In 32768, then into next program.
Difference is preserved to packet, need to judge whether packet reaches optimal size by (f), if it is, entering
Enter next program, if it is not, then return to step (4) restarts to be judged;Judge whether packet reaches optimal size
Concrete operation method be:Judge whether packet currently reaches the optimal byte of size 22000, if reaching optimal size
22000 bytes, then into next program, if the not up to optimal byte of size 22000, return to step (4) restarts
Judged.
(5) packet partial data is done into CRC32, obtains the check code of 32 bytes, and be added in packet afterbody;For service
Device verification data bag whether complete transmission;The concrete operation method that packet partial data is done into CRC32 is:Server end is obtained
After packet, last 32 byte is taken, and data of the packet in addition to last 32 byte are done into CRC32, and with last 32 word
Section is made comparisons, and is verified and is passed through if equal.
(6) data are compressed using GZIP compression algorithms.
(7) packet compressed is sent by network.
(8) to prevent from repeating transmitting, the gps data sent is deleted from data source (or file or other storage modes)
Remove.
(9) judge whether data have been compressed completely, inquiry needs place in data source (or file or other storage modes)
Whether the gps data of reason is empty, if it is, compression is completed, terminates this second compression;If it is not, then return to step (1) is opened again
Begin.
The general principle and principal character and advantages of the present invention of the present invention has been shown and described above.The technology of the industry
Personnel are it should be appreciated that the present invention is not limited to the above embodiments, and the simply explanation described in above-described embodiment and specification is originally
The principle of invention, without departing from the spirit and scope of the present invention, various changes and modifications of the present invention are possible, these changes
Change and improvement all fall within the protetion scope of the claimed invention.The claimed scope of the invention by appended claims and its
Equivalent thereof.
Claims (6)
1. one kind uses gps data compression and its data transmission method, it is characterised in that comprise the following steps:
(1) first gps data is read from data source and is used as reference data;
(2) data of floating type all in the above-mentioned gps data read are converted into integer data, it is empty to save storage
Between;
(3) GPS reference data is saved into packet in binary form;
(4) judge whether gps data has all been handled, inquiry needs gps data to be processed in data source, if looked into
It is sky to ask result, then shows not needing data to be processed, into next program;If being not sky, into (a) from data
Next gps data is read in source;All real-coded GAs are converted in the gps data for reading this subsequently into (b)
Integer data;The longitude and latitude and altitude information that have been converted into integer are subtracted by having been converted into for a upper gps data by (c) again
The longitude and latitude and altitude information of integer, obtain difference;Then judge whether the difference that (c) is obtained is less than maximum deviation by (d)
Scope, if it is, difference is saved in into packet in binary form into (e), if it is not, then into next program;
Difference is preserved to packet, need to judge whether packet reaches optimal size by (f), if it is, into next
Program, if it is not, then return to step (4) restarts to be judged;
(5) packet partial data is done into CRC32, obtains the check code of 32 bytes, and be added in packet afterbody;For server school
Test packet whether complete transmission;
(6) data are compressed using GZIP compression algorithms;
(7) packet compressed is sent by network;
(8) to prevent from repeating transmitting, the gps data sent is deleted from data source;
(9) judge whether data have been compressed completely, inquiry needs whether gps data to be processed is empty in data source, if it is,
Then compression is completed, and terminates this second compression;If it is not, then return to step (1) restarts.
2. one kind according to claim 1 uses gps data compression and its data transmission method, it is characterised in that step
(2) concrete operation method that the data of floating type all in the above-mentioned gps data read are converted into integer data in is:
The longitude and latitude of the gps data read are respectively multiplied by 10000, height above sea level is multiplied by 100, and direction is multiplied by 10 and round numbers
Part, 100 and round numbers part are multiplied by by speed, are multiplied by after the data of acceleration and Eulerian angles then are obtained into standard deviation
10000 round numbers again, the rejection of data more than 10,000,000 is substituted with 10,000,000.
3. one kind according to claim 1 uses gps data compression and its data transmission method, it is characterised in that step
(4) concrete operation method that the data of all floating types are converted to integer data in the gps data for reading this in is:Will
The longitude and latitude of the gps data read are respectively multiplied by 10000, and height above sea level is multiplied by 100, and direction is multiplied by 10 and round numbers portion
Point, speed is multiplied by 100 and round numbers part, is multiplied by after the data of acceleration and Eulerian angles then are obtained into standard deviation
10000 round numbers again, the rejection of data more than 10,000,000 is substituted with 10,000,000.
4. one kind according to claim 1 uses gps data compression and its data transmission method, it is characterised in that step
(4) judge that the concrete operation method whether difference is less than maximum deviation scope is in:If the longitude and latitude deviation model of difference in (d)
Enclose and be less than 32768 less than 128, height tolerance scope, then difference is saved in packet in binary form into (e);If
(d) the longitude and latitude deviation range of difference is not less than 32768 not less than 128, height tolerance scope in, then into next program.
5. one kind according to claim 1 uses gps data compression and its data transmission method, it is characterised in that step
(4) judge whether packet reaches that the concrete operation method of optimal size is in:Judge whether packet currently reaches optimal big
Small 22000 byte, if reaching the optimal byte of size 22000, into next program, if not up to optimal size
22000 bytes, then return to step (4) restart to be judged.
6. one kind according to claim 1 uses gps data compression and its data transmission method, it is characterised in that step
(5) concrete operation method that packet partial data is done into CRC32 in is:Server end is obtained after packet, takes last 32
Byte, and data of the packet in addition to last 32 byte are done into CRC32, and made comparisons with last 32 byte, if equal
Verification passes through.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710178837.9A CN107040525A (en) | 2017-03-23 | 2017-03-23 | One kind uses gps data compression and its data transmission method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710178837.9A CN107040525A (en) | 2017-03-23 | 2017-03-23 | One kind uses gps data compression and its data transmission method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107040525A true CN107040525A (en) | 2017-08-11 |
Family
ID=59533796
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710178837.9A Pending CN107040525A (en) | 2017-03-23 | 2017-03-23 | One kind uses gps data compression and its data transmission method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107040525A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104852783A (en) * | 2015-04-01 | 2015-08-19 | 矽通瑞达科技(北京)有限责任公司 | GPS data transmission method and system |
US20150373137A1 (en) * | 2014-01-13 | 2015-12-24 | Ewha University-Industry Collabolation Foundation | Ad-hoc network system using selective data compression algorithm, and data transmission method in ad-hoc network |
CN105530013A (en) * | 2015-12-03 | 2016-04-27 | 四川中光防雷科技股份有限公司 | Waveform data compression method and system |
CN105992154A (en) * | 2015-02-02 | 2016-10-05 | 酷派软件技术(深圳)有限公司 | Position data transmission method and device and positioning system |
CN106101085A (en) * | 2016-06-01 | 2016-11-09 | 北京车网互联科技有限公司 | A kind of gps data Compress softwares method of high compression rate low distortion rate |
-
2017
- 2017-03-23 CN CN201710178837.9A patent/CN107040525A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150373137A1 (en) * | 2014-01-13 | 2015-12-24 | Ewha University-Industry Collabolation Foundation | Ad-hoc network system using selective data compression algorithm, and data transmission method in ad-hoc network |
CN105992154A (en) * | 2015-02-02 | 2016-10-05 | 酷派软件技术(深圳)有限公司 | Position data transmission method and device and positioning system |
CN104852783A (en) * | 2015-04-01 | 2015-08-19 | 矽通瑞达科技(北京)有限责任公司 | GPS data transmission method and system |
CN105530013A (en) * | 2015-12-03 | 2016-04-27 | 四川中光防雷科技股份有限公司 | Waveform data compression method and system |
CN106101085A (en) * | 2016-06-01 | 2016-11-09 | 北京车网互联科技有限公司 | A kind of gps data Compress softwares method of high compression rate low distortion rate |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104410692B (en) | A kind of method and system uploaded for duplicate file | |
CN105025106B (en) | A kind of method of the breakpoint transmission based on piecemeal and metamessage | |
CN102571966B (en) | Network transmission method for large extensible markup language (XML) document | |
CN103346800B (en) | A kind of data compression method and device | |
CN103916483A (en) | Self-adaptation data storage and reconstruction method for coding redundancy storage system | |
CN111262876A (en) | Data processing method, device and equipment based on block chain and storage medium | |
US11023412B2 (en) | RDMA data sending and receiving methods, electronic device, and readable storage medium | |
CN103220352A (en) | Terminal, server, file storage system and file storage method | |
CN105446975A (en) | File packing method and device | |
CN104008134B (en) | Efficient storage method and system based on Hbase | |
CN107241417A (en) | A kind of method, system, transmitting terminal and the receiving terminal of file transmission | |
CN106405577B (en) | A kind of RTCM text conversion method and device | |
CN105868194A (en) | Methods and devices for text data compression and decompression | |
CN105912622A (en) | Data de-duplication method for lossless compressed files | |
CN112784112B (en) | Message verification method and device | |
CN106202213A (en) | A kind of FPGA binary file compression, decompressing method and compression, decompression device | |
CN110413711A (en) | A kind of variance data acquisition methods and its storage medium | |
WO2013097812A1 (en) | Method and system for downloading font file | |
CN109412999B (en) | Mapping method and device for probability modeling | |
CN110825706B (en) | Data compression method and related equipment | |
CN113079219A (en) | Large file fragment uploading method and system | |
CN107040525A (en) | One kind uses gps data compression and its data transmission method | |
CN108228763A (en) | It is a kind of based on intelligent terminal from the method for Media Redundancy data processing | |
CN112969198A (en) | Data transmission method, terminal and storage medium | |
CN109597566A (en) | A kind of reading data, storage method and device |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20170811 |