CN110069583B - GPS data lossless compression and decompression method, terminal equipment and storage medium - Google Patents

GPS data lossless compression and decompression method, terminal equipment and storage medium Download PDF

Info

Publication number
CN110069583B
CN110069583B CN201711157070.8A CN201711157070A CN110069583B CN 110069583 B CN110069583 B CN 110069583B CN 201711157070 A CN201711157070 A CN 201711157070A CN 110069583 B CN110069583 B CN 110069583B
Authority
CN
China
Prior art keywords
prediction residual
lat
value
lng
gps
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
Application number
CN201711157070.8A
Other languages
Chinese (zh)
Other versions
CN110069583A (en
Inventor
涂岩恺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen Yaxon Networks Co Ltd
Original Assignee
Xiamen Yaxon Networks Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamen Yaxon Networks Co Ltd filed Critical Xiamen Yaxon Networks Co Ltd
Priority to CN201711157070.8A priority Critical patent/CN110069583B/en
Publication of CN110069583A publication Critical patent/CN110069583A/en
Application granted granted Critical
Publication of CN110069583B publication Critical patent/CN110069583B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/3068Precoding preceding compression, e.g. Burrows-Wheeler transformation
    • H03M7/3071Prediction
    • H03M7/3075Space

Abstract

The invention relates to a lossless compression and decompression method for GPS data, which comprises the following steps: s1, using a smoothing functionNumber and the first four points P of a track i‑4 ,P i‑3 ,P i‑2 ,P i‑1 To iterate to obtain a predicted value P 'of the next track point' i (ii) a S2, calculating the actual value P of the next track point i And its predicted value P' i Subtracting to obtain the predicted residual epsilon i =P i ‑P′ i =(α ii ) Wherein α is i Representing latitude prediction residual, beta i Represents the longitude prediction residual; s3, compressing and storing the GPS data: the first four points P 1 、P 2 、P 3 、P 4 The original value is directly saved without compression, and then the latitude prediction residual alpha obtained in the step S2 is used i And longitude prediction residual beta i And storing according to the ABC format respectively to realize compressed storage, wherein A is a one-bit binary number, represents the sign bit of the prediction residual error, is less than zero and is 1, otherwise, is 0, B is a three-bit binary number, represents the number of the prediction residual error which is 0 continuously from the 1 st decimal point, and C is a binary number of 1 to 17 bits, and represents the numerical value of the decimal point part of the prediction residual error which is not 0.

Description

GPS data lossless compression and decompression method, terminal equipment and storage medium
Technical Field
The invention relates to the field of GPS data compression and decompression, in particular to a GPS data lossless compression method based on track prediction, terminal equipment and a storage medium.
Background
The GPS data is the most important data in the Internet of vehicles system, the vehicle-mounted terminal uploads the GPS data to the Internet of vehicles center, and the Internet of vehicles center carries out vehicle track monitoring and big data analysis application according to the GPS data. With the increase of vehicles, the data storage of the internet of vehicles center is greatly burdened by more and more vehicle-uploaded GPS data. At present, in a vehicle network platform for networking hundreds of thousands of vehicles, the daily increase of GPS position data in GB unit brings great pressure to the storage of data. In the big data era, the data has great value for big data analysis of vehicles and vehicle owners and cannot be discarded at will, so that some methods need to be found for effectively compressing and storing the GPS data.
Lossless compression means that the original data can be completely restored from the compressed data. An online GPS track data compression algorithm using offset calculations is proposed in patent 201510454703.6. However, the algorithm uses an offset threshold value to select data, and deletes some close GPS points to achieve the purpose of reducing data storage, so that the algorithm is a lossy compression for GPS data. In patent 200610114585.5, a compression method is proposed to store the difference between adjacent points to reduce the storage amount, and the method is lossless compression, but the method of simply storing the difference has limited compression performance and does not take into account the characteristics of GPS data, so that the most effective compressed data is not available.
Disclosure of Invention
The invention aims to provide a GPS data lossless compression and decompression method based on track prediction, a terminal device and a storage medium, so as to solve the problems of the existing GPS data compression method. Therefore, the invention adopts the following specific technical scheme:
a GPS data lossless compression and decompression method comprises the following steps:
s1, using a smooth function and the first four points of a track to iterate to obtain the predicted value P of the next track point i ': assuming that a GPS point is represented by P (lat, lng), where P includes two elements, longitude lng and latitude lat, and lng and lat retain only six digits after the decimal point, the first four points are represented by P i-4 (lat i-4 ,lng i-4 ),P i-3 (lat i-3 ,lng i-3 ),P i-2 (lat i-2 ,lng i-2 ),P i-1 (lat i-1 ,lng i-1 ) Predicted value P i ' calculated according to equation (1) of the smoothing function,
P i '=(0.641×lat i-4 +0.1499×lat i-3 -0.0088×lat i-2 +0.2179×lat i-1 ,0.641×lng i-4 +0.1499×lng i-3 -0.0088×lng i-2 +0.2179×lng i-1 )
(1)
wherein i is 5,6, 7.
S2, solving prediction residual errors: the actual value P of the next track point i And its predicted value P i ' subtract to obtain the predicted residual epsilon i =P i -P i '=(α ii ) Wherein α is i Representing the latitude prediction residual, beta i Represents the longitude prediction residual;
s3, compressing and storing the GPS data: the first fourPoint P 1 、P 2 、P 3 、P 4 The original value is directly saved without compression, and then the latitude prediction residual alpha obtained in the step S2 is used i And longitude prediction residual beta i And storing according to the ABC format respectively to realize compressed storage, wherein A is a one-bit binary number, represents the sign bit of the prediction residual error, is less than zero and is 1, otherwise, is 0, B is a three-bit binary number, represents the number of the prediction residual error which is continuously 0 from the 1 st decimal point, and C is a binary number of 1 to 17 bits and represents the numerical value of the decimal point part of the prediction residual error which is not 0.
Further, the method also includes step S4: decompressing the compressed GPS data, specifically as follows:
first, the first 4 points P of a track are taken 1 、P 2 、P 3 、P 4 The predicted value P is obtained by using the formula (1) i ' the prediction residual value epsilon of the ith GPS position is extracted and restored according to the ABC format described in the step S3 i When i is 5; then, the predicted value is added to the residual value to obtain the original value P of the position i =P i '+ε i (ii) a In the formation of P i Then, i is i +1, and P is obtained by continuing to use the formula (1) i Predicted value P of next position i ' +1 And extracting and restoring the prediction residual value epsilon of the position i+1 Obtaining the original value P of the next position i+1 =P i ' +1i+1 (ii) a And repeating iterative processing continuously until all compressed GPS data are restored.
The invention also provides a terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method as described above when executing the computer program.
Further, the terminal device comprises a vehicle-mounted terminal and a vehicle management platform.
Furthermore, the present invention also provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program, when being executed by a processor, realizes the steps of the method as described above.
In addition, the technical scheme has the beneficial effects that the lossless and efficient compression of the GPS data can be realized, and the compression rate can reach 67.19% at the minimum and 92.18% at the maximum.
Drawings
FIG. 1 is a flow chart of a method for lossless compression of GPS data based on trajectory prediction according to an embodiment of the present invention.
Detailed Description
To further illustrate the various embodiments, the invention provides the accompanying drawings. The accompanying drawings, which are incorporated in and constitute a part of this disclosure, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the embodiments. Those skilled in the art will appreciate still other possible embodiments and advantages of the present invention with reference to these figures. The components in the drawings are not necessarily to scale, and similar reference numerals are generally used to identify similar components.
The invention will now be further described with reference to the accompanying drawings and detailed description. As shown in fig. 1, a method for lossless compression of GPS data based on trajectory prediction includes the following steps:
s1, trajectory prediction: and (4) iteratively predicting the next track point by using a smoothing function and the first four points (the first 4 points are not compressed and directly store the original values) of a section of track. Suppose a GPS point is represented by P (lat, long), wherein P comprises two elements, namely longitude long and latitude lat, and only the six digits after the decimal point are reserved for long and long respectively. The first 4 GPS points of a track are marked with P 1 (lat 1 ,lng 1 ),P 2 (lat 2 ,lng 2 ),P 3 (lat 3 ,lng 3 ),P 4 (lat 4 ,lng 4 ) And (4) showing. Since the driving track of the vehicle has strong front-back correlation, the fifth position value P can be predicted by the smooth function of the formula (1) as long as the original values of the front four positions are known i ':
P i '=(0.641×lat i-4 +0.1499×lat i-3 -0.0088×lat i-2 +0.2179×lat i-1 ,0.641×lng i-4 +0.1499×lng i-3 -0.0088×lng i-2 +0.2179×lng i-1 ) (1)
S2, obtaining a prediction residual error: obtained P i ' is the predicted value of the first four positions to the next position. The actual value P of the next position is calculated i Subtracting the predicted value (longitude and longitude subtraction, latitude and latitude subtraction) to obtain the predicted residual error epsilon i =P i -P i '=(α ii ),α i Representing latitude prediction residual, beta i Representing the longitude prediction residual. Because the prediction has certain accuracy, the prediction residual epsilon is obviously smaller than the current actual position P directly used i And the previous position P i-1 The difference value of (b), that is to say, the data value to be compressed is smaller, and a higher compression rate can be achieved.
S3, compression storage: and compressing and storing the prediction residual error epsilon. And compressing and storing the prediction residual according to the following table format.
TABLE 1 ε storage Format
Figure BDA0001474575380000041
Here, a latitude residual α among the residuals is taken as an example to describe a compression processing and storage method, and a longitude residual is obtained in the same manner.
If alpha is more than or equal to 0, the residual error sign bit A is 0; if α <0 the residual sign bit a is 1.
Let n denote the number of 0 consecutive latitude prediction residuals α from the 1 st decimal point. Since the decimal point has 6 bits at most, the 3-bit binary system can represent 7 at most, so n can be represented by 3-bit data and stored into the even 0 digital section B.
Let m denote the value of the fraction of the latitude prediction residual α not being 0. For example 0.000036, then m is 36 and if the prediction is completely accurate, i.e. α is 0, then m is 0. M is represented by a binary number and is stored in the residual value field C. Due to the continuity of the trajectory, the latitude prediction residual α cannot be larger than 0.099999 (converted to a distance of 11 km) in general, so m is not larger than 99999 in general, i.e., C is 17 bits at the maximum and 1bit at the minimum.
Thus, the longitude or latitude originally required to be stored by a 64-bit double-precision floating point is represented by a binary number of at most 21 bits and at least 5 bits through the calculation of the prediction residual error and the storage according to the format of the table 1. The compression ratio is 67.19% at minimum and 92.18% at maximum.
S4, decompressing the compressed GPS data: the specific process is as follows:
first, the first 4 points P of a track are taken 1 、P 2 、P 3 、P 4 The predicted value P is obtained by using the formula (1) i ' the prediction residual value epsilon of the ith GPS position is extracted and restored according to the ABC format described in the step S3 i When i is 5; then, the predicted value and the residual value are added to obtain an original value P of the position i =P i '+ε i (ii) a In the formation of P i Then, i is i +1, and P is obtained by continuing to use the formula (1) i Predicted value P of next position i ' +1 And extracting and restoring the prediction residual value epsilon of the position i+1 Obtaining the original value P of the one position i+1 =P i ' +1i+1 (ii) a And repeating iterative processing continuously in the same way until all the track data are restored.
Example verification
For convenience of description, the following 7-point ultra-short GPS track segment is taken as an example to illustrate the steps and the using method of the present invention.
P 1 =(42.212391,118.918054),
P 2 =(42.211595,118.919942),
P 3 =(42.210753,118.922260),
P 4 =(42.210149,118.924277),
P 5 =(42.211791,118.919659),
P 6 =(42.211411,118.920163),
P 7 =(42.210796,118.922129)。
Firstly, the compression storage step is as follows:
the method comprises the following steps: four original coordinates P for the beginning of the track 1 ,P 2 ,P 3 ,P 4 And directly storing the sequence points as the initial sequence points of the prediction without compression processing.
Step two: the predicted value of the 5 th GPS point is calculated using equation (1):
P 5 '=(0.641*42.212391+0.1499*42.211595-0.0088*42.210753+0.2179*42.210149,0.641*118.918054+0.1499*118.919942-0.0088*118.922260+0.2179*118.924277)
=(42.211797,118.919655)。
step three: according to the actual position P5, the prediction residual error epsilon is calculated 5 =P 5 -P 5 ' (42.211791-42.211797, 118.919659-118.919655) (-0.000006, 0.000004). It can be seen that, compared with the method of directly using the position phase difference of the adjacent GPS, the numerical value of the prediction residual is much smaller, which is beneficial to obtaining higher compression rate subsequently.
Step four: the prediction residuals are compressed and stored as in table 1. Latitude residual error alpha 5 -0.000006. Due to alpha 5 <0, so the residual sign bit a is 1; since there are 5 zero-connected data starting from the 1 st decimal place, B is 101; after removing the sign and the 0 bits, the residual value is 6, so C is 110. Alpha is alpha 5 The storage table of (1) is:
residual sign To 0 number Residual value
Latitude residual error alpha 5 1 101 110
Therefore, the latitude information of the 5 th GPS point is only stored by 7 bits, and a relatively large compression rate is obtained compared with the direct storage of the latitude by 64 bits with double precision, and the compression rate reaches 89.06%.
Similarly, longitude residual β 5 0.000004. Due to beta 5 >0, so the residual sign bit a is 0; since there are 5 zero-connected data bits starting from the 1 st decimal place, the 3bit zero-connected data bit is a binary representation of 5, i.e. a is 101; after removing the sign and the consecutive 0 bits, the residual value is 4, so B is represented as 100. Beta is a 5 The storage table of (1) is:
residual sign To 0 number Residual value
Longitude residual beta 5 0 101 100
It can be seen that the longitude information of the 5 th GPS point is stored only with 7 bits, and a relatively large compression rate, which is 89.06%, is obtained compared with the case of directly storing the longitude with 64-bit double precision. Thus, it isFinish the pair P 5 Compressed storage of point data.
Step five: continue to P 6 And the points are compressed and stored. By P 2 ,P 3 ,P 4 ,P 5 The point substitution formula (1) calculates the position predicted value of the 6 th GPS point:
P 6 '=(0.641*42.211595+0.1499*42.210753-0.0088*42.210149+0.2179*42.211791,0.641*118.919942+0.1499*118.922260-0.0088*118.924277+0.2179*118.919659)
=(42.211524,118.920189)。
step six: according to the actual position P 6 Calculating the prediction residual epsilon 6 =P 6 -P 6 '=(42.211411-42.211524,118.920163-118.920189)=(-0.000113,-0.000026)。
Step seven: the prediction residuals are compressed and stored as in table 1. Latitude residual error alpha 6 -0.000113. Due to alpha 6 <0, so the residual sign bit a is 1; b is 011 since there are 3 consecutive zero data starting from the 1 st decimal place; after removal of the sign sum and the 0-bit, the residue was 113, so C was 1110001. Alpha (alpha) ("alpha") 6 The storage table of (1) is:
residual sign To 0 number Residual value
Latitude residual error alpha 6 1 011 1110001
Therefore, the latitude information of the 6 th GPS point is stored by 11 bits, and a relatively large compression rate is obtained compared with the direct 64-bit double-precision storage of the latitude, and the compression rate reaches 82.81%.
Longitude residual beta in the same way 6 -0.000026. Due to beta 6 <0, so the residual sign bit a is 1; since there are 4 zero-padding data starting from the 1 st decimal place, B is 100; after removal of the sign and the 0-bit, the residue was 26, so C was 11010. Beta is a beta 6 The storage table of (1) is:
residual sign To 0 number Residual value
Longitude residual beta 6 1 100 11010
It can be seen that the longitude information of the 6 th GPS point is stored with 9 bits, and a relatively large compression rate, up to 85.94%, is obtained compared with the case of directly storing the longitude with 64-bit double precision. Thus completing the pair P 6 Compressed storage of point data.
Step eight, continuing to pair P 7 The points are compressed for storage. By P 3 ,P 4 ,P 5 ,P 6 The point substitution formula (1) calculates the position predicted value of the 7 th GPS point:
P 7 '=(0.641*42.210753+0.1499*42.210149-0.0088*42.211791+0.2179*42.211411,0.641*118.922260+0.1499*118.924277-0.0088*118.919659+0.2179*118.920163)
=(42.210797,118.922128)。
step nine: according to the actual position P 7 Calculating the prediction residual epsilon 7 =P 7 -P 7 '=(42.210796-42.210797,118.922129-118.922128)=(-0.000001,0.000001)。
Step ten: and compressing the prediction residual error and storing the prediction residual error according to the following table format. Epsilon 7 The storage table is:
residual sign To 0 number Residual value
Latitude residual error alpha 7 1 101 1
Latitude residual error beta 7 0 101 1
Latitude andthe compression ratio of the longitude reaches 92.18%. Thus completing the pair P 7 Compressed storage of point data. Secondly, the decompression steps are as follows:
the method comprises the following steps: taking out the four original coordinates P without compression processing at the beginning of the track 1 =(42.212391,118.918054),P 2 =(42.211595,118.919942),P 3 =(42.210753,118.922260),P 4 =(42.210149,118.924277)。
Step two: the predicted value of the 5 th GPS point can be calculated by the formula (1):
P 5 '=(0.641*42.212391+0.1499*42.211595-0.0088*42.210753+0.2179*42.210149,0.641*118.918054+0.1499*118.919942-0.0088*118.922260+0.2179*118.924277)
=(42.211797,118.919655)。
step three: the predicted residual error epsilon of the 5 th GPS point is obtained by reduction from the compressed storage table 5 =(-0.000006,0.000004)。
Step four: the 5 th GPS position point is calculated,
P 5 =P 5 '+ε 5 =(42.211797-0.000006,118.919655+0.000004)=(42.211791,118.919659),
thus decompressing and restoring the 5 th GPS position point to obtain P 5 (42.211791,118.919659)。
Step five, continuing to pair P 6 The dots are decompressed. By P 2 ,P 3 ,P 4 And P decompressed from the previous step 5 Calculating the position predicted value of the 6 th GPS point by using a point substitution formula (1):
P 6 '=(0.641*42.211595+0.1499*42.210753-0.0088*42.210149+0.2179*42.211791,0.641*118.919942+0.1499*118.922260-0.0088*118.924277+0.2179*118.919659)
=(42.211524,118.920189)。
step six: the predicted residual epsilon of the 6 th GPS point is obtained by reduction from the compressed storage table 6 =(-0.000113,-0.000026)。
Step seven: the 6 th GPS position point is calculated,
P 6 =P 6 '+ε 6 =(42.211524-0.000113,118.920189-0.000026)=(42.211411,118.920163),
thus decompressing and restoring the 6 th GPS position point to obtain P 6 (42.211411,118.920163)。
Step eight, continuing to pair P 7 The dots are decompressed. By P 3 ,P 4 ,P 5 And substituting the P6 point decompressed in the last step for equation (1) to calculate the position predicted value of the 7 th GPS point:
P 7 '=(0.641*42.210753+0.1499*42.210149-0.0088*42.211791+0.2179*42.211411,0.641*118.922260+0.1499*118.924277-0.0088*118.919659+0.2179*118.920163)
=(42.210797,118.922128),
step nine: the predicted residual epsilon of the 7 th GPS point is obtained by reduction from the compressed storage table 7 =(-0.000001,0.000001),
Step ten: the 7 th GPS position point is calculated,
P 7 =P 7 '+ε 7 =(42.210797-0.000001,118.922128+0.000001)=(42.210796,118.922129),
thus decompressing and restoring the 7 th GPS position point P 7 (42.210796,118.922129)。
In an embodiment of the present invention, there is also provided a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method as described above when executing the computer program. Preferably, the terminal device may include an in-vehicle terminal and/or a vehicle management platform, and the like. That is, the method can be used for GPS data compression and decompression of the vehicle-mounted terminal and/or the vehicle management platform and the like.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps of the above method according to the embodiment of the present invention.
The terminal device integrated module/unit such as the in-vehicle terminal and the in-vehicle management platform, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer-readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments described above may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U.S. disk, removable hard disk, magnetic diskette, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signal, telecommunications signal, and software distribution medium, etc. It should be noted that the computer-readable medium may contain suitable additions or subtractions depending on the requirements of legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer-readable media may not include electrical carrier signals or telecommunication signals in accordance with legislation and patent practice.
In summary, the invention is a lossless compression and decompression method for vehicle-mounted terminal GPS data. Because the vehicle-mounted terminal has a high moving speed and the position difference between adjacent GPS points is large, the difference value between the adjacent points is large, and the compression effect is limited by directly utilizing the difference value. According to the method, the next GPS position is predicted by utilizing a smooth function and the previous section of GPS data according to the characteristic that the vehicle-mounted terminal runs on a road, and the road is mostly a long straight line or a smooth curve, and then the GPS track data is compressed in a lossless mode according to the residual error of the predicted point and the actual point. Meanwhile, in practical application, the GPS data only needs to keep the characteristic of six decimal places (the 6 th decimal place represents that the position precision is 0.1 meter and far exceeds the precision of a GPS system, and the precision of the civil GPS can only reach 2-5 meters generally at present) to design a unique residual error amount compression storage format. According to the invention, the continuous 0 data in the residual data can be increased to the maximum extent by predicting the track and then solving the residual, and the continuous 0 data is compressed and stored by using a 3-bit offset. The residual data with the 0-bit removed is compressed and stored by a maximum of 17 bits. Therefore, compared with the method of directly storing the GPS coordinates by using the double-precision floating point, the minimum compression ratio can reach 67.19%, and the maximum compression ratio can reach 92.18%.
While the invention has been particularly shown and described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (4)

1. A GPS data lossless compression and decompression method is characterized by comprising the following steps:
s1, using a smooth function and the first four points of a section of track to iterate to obtain the predicted value P of the next track point i ': assuming that a GPS point is represented by P (lat, lng), and P includes two elements, i.e. longitude lng and latitude lat, and long and lat only reserve six digits after decimal point, the first four points are represented as P i-4 (lat i-4 ,lng i-4 ),P i-3 (lat i-3 ,lng i-3 ),P i-2 (lat i-2 ,lng i-2 ),P i-1 (lat i-1 ,lng i-1 ) Predicted value P i ' calculated according to equation (1) of the smoothing function,
P i '=(0.641×lat i-4 +0.1499×lat i-3 -0.0088×lat i-2 +0.2179×lat i-1 ,0.641×lng i-4 +0.1499×lng i-3 -0.0088×lng i-2 +0.2179×lng i-1 ) (1)
wherein i is 5,6, 7.
S2, solving prediction residual errors: the actual value P of the next track point is calculated i And its predicted value P i ' subtract to obtain the predicted residual epsilon i =P i -P i '=(α ii ) Wherein α is i Representing latitude prediction residual, beta i Represents the longitude prediction residual;
s3, compressing and storing the GPS data: the first four points P 1 、P 2 、P 3 、P 4 The original value is directly saved without compression, and then the latitude prediction residual alpha obtained in the step S2 is used i And longitude prediction residual beta i Storing according to the format of ABC respectively to realize compressed storage, wherein A is a one-bit binary number, represents the sign bit of the prediction residual error, is 1 when being smaller than zero, otherwise is 0, B is a three-bit binary number, represents the number of the prediction residual error which is 0 continuously from the 1 st decimal point, C is a binary number of 1 to 17 bits, and represents the numerical value of the decimal point part of the prediction residual error which is not 0;
s4, decompressing the compressed GPS data, which includes the following steps:
first, the first 4 points P of a track are taken 1 、P 2 、P 3 、P 4 Using the formula (1) to obtain the predicted value P i ' the prediction residual value epsilon of the ith GPS position is extracted and restored according to the ABC format described in the step S3 i When i is 5; then, the predicted value and the residual value are added to obtain an original value P of the position i =P i '+ε i (ii) a In the presence of a compound which is to obtain P i Then, i is i +1, and P is obtained by continuing to use the formula (1) i Predicted value P 'of next position' i+1 And extracting and restoring the prediction residual value epsilon of the position i+1 Obtaining the original value P of the next position i+1 =P’ i+1i+1 (ii) a And repeating iterative processing continuously until all compressed GPS data are restored.
2. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method as claimed in claim 1 when executing the computer program.
3. The terminal device of claim 2, wherein the terminal device comprises an in-vehicle terminal and/or a vehicle management platform.
4. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method as set forth in claim 1.
CN201711157070.8A 2017-11-20 2017-11-20 GPS data lossless compression and decompression method, terminal equipment and storage medium Active CN110069583B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711157070.8A CN110069583B (en) 2017-11-20 2017-11-20 GPS data lossless compression and decompression method, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711157070.8A CN110069583B (en) 2017-11-20 2017-11-20 GPS data lossless compression and decompression method, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110069583A CN110069583A (en) 2019-07-30
CN110069583B true CN110069583B (en) 2022-08-19

Family

ID=67364598

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711157070.8A Active CN110069583B (en) 2017-11-20 2017-11-20 GPS data lossless compression and decompression method, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110069583B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7701366B2 (en) * 2008-07-25 2010-04-20 Seiko Epson Corporation Data compression by multi-order differencing
JP5051087B2 (en) * 2008-09-30 2012-10-17 ヤマハ株式会社 Lossless compression coding apparatus and lossless decoding apparatus
CN102299718A (en) * 2010-06-25 2011-12-28 汉王科技股份有限公司 Compression and decompression methods for locus at hand-written terminal
CN103795418B (en) * 2014-01-22 2016-09-28 复旦大学 A kind of lossless compression method of road network track
US9209833B1 (en) * 2015-06-25 2015-12-08 Emc Corporation Methods and apparatus for rational compression and decompression of numbers

Also Published As

Publication number Publication date
CN110069583A (en) 2019-07-30

Similar Documents

Publication Publication Date Title
EP3723048A1 (en) Method and apparatus for coding and decoding using a convolutional neural network
CN112218079B (en) Point cloud layering method based on spatial sequence, point cloud prediction method and point cloud prediction equipment
US8880734B2 (en) Block floating point compression with exponent token codes
CN107016708B (en) Image hash coding method based on deep learning
EP3467825B1 (en) Pyramid vector quantizer shape search
CN113132723B (en) Image compression method and device
CN112953550A (en) Data compression method, electronic device and storage medium
Pan et al. Image processing in DNA
CN110069583B (en) GPS data lossless compression and decompression method, terminal equipment and storage medium
CN114424568A (en) Prediction method, encoder, decoder, and computer storage medium
CN113873094A (en) Chaotic compressed sensing image encryption method
CN116594572B (en) Floating point number stream data compression method, device, computer equipment and medium
CN104077272A (en) Method and device for compressing dictionary
Li et al. Elf: Erasing-based lossless floating-point compression
US10271051B2 (en) Method of coding a real signal into a quantized signal
CN102982007B (en) The quick calculating of the product of dyadic fraction and the symmetrical round-off error of symbol
CN111755018A (en) Audio hiding method and device based on wavelet transformation and quantized embedded key
CN113449062B (en) Track processing method, track processing device, electronic equipment and storage medium
CN112712164B (en) Non-uniform quantization method of neural network
CN110175185B (en) Self-adaptive lossless compression method based on time sequence data distribution characteristics
CN101398486A (en) Azimuth flow processing method and device of spaceborne SAR raw data compression
CN113298892A (en) Image coding method and device, and storage medium
CN114207609A (en) Information processing apparatus, information processing system, and information processing method
Tai et al. Tsptq-vit: Two-scaled post-training quantization for vision transformer
CN112262578A (en) Point cloud attribute encoding method and device and point cloud attribute decoding 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
GR01 Patent grant
GR01 Patent grant