A method, system and terminal device for storing vehicle location data
By converting vehicle location data into 2-bit binary and embedding decimal numbers of other location data, the problems of high storage cost and sensitivity to data loss in vehicle location data are solved, achieving efficient storage and robustness, and making it suitable for in-vehicle systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-04
- Publication Date
- 2026-03-10
AI Technical Summary
Existing technologies for vehicle location data storage suffer from high storage costs and sensitivity to data loss. In particular, in vehicle systems, the insufficient accuracy of ordinary civilian satellite positioning leads to large location data errors, and existing compression algorithms may result in data loss or irrecoverability.
Vehicle location data is converted into 2-bit binary numbers and embedded into the last two decimal digits of other location data. The binary numbers are then converted into two decimal digits for storage using a modulo-4 operation, reducing the total amount of location data stored and improving data robustness.
It effectively reduces the amount of location data stored, improves storage efficiency, and when data is lost, it only causes a slight shift in another data, without affecting the system accuracy, making it suitable for use in vehicle environments.
Smart Images

Figure CN114443785B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data storage technology, and in particular to a method, system and terminal device for storing vehicle location data. Background Technology
[0002] Location data, such as vehicle trajectory, is generally represented by latitude and longitude coordinates, stored with a precision of six decimal places. The sixth decimal place of latitude and longitude corresponds to a location resolution of 0.11 meters in reality. Currently, the positioning accuracy of most ordinary civilian satellite positioning systems cannot reach this value (the accuracy of ordinary civilian satellite positioning is generally 1-5 meters). Therefore, for general civilian satellite positioning applications, there is a relatively high tolerance for errors to the sixth decimal place of the location data.
[0003] The storage or interaction of location data between vehicle terminals and central control systems places significant pressure on storage and bandwidth costs. Therefore, compressing location data is a crucial issue for reducing the overall cost of vehicle systems. Patent 201510454703.6 proposes an online GPS location data compression algorithm based on offset calculations. However, this algorithm uses an offset threshold to select data, deleting some close points, thus resulting in data loss. Patents 200610114585.5 and 201711157070.8 propose methods for compressing and storing data using direct location difference or location prediction difference, achieving relatively high compression ratios. However, these methods have a drawback: the loss of individual data points can lead to the irrecoverability of large amounts of related data. Since vehicle systems are often used in environments with high vibration and harsh temperatures, this potential risk exists. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of the prior art and to propose a vehicle location data storage method, system and terminal device that can reduce the amount of location data storage and is not sensitive to data loss.
[0005] The technical solution adopted by this invention to solve its technical problem is:
[0006] On the one hand, a method for storing vehicle location data includes:
[0007] Acquire a location data of the vehicle and convert the location data into multiple 2-bit binary numbers;
[0008] The multiple 2-bit binary numbers are respectively embedded into the last two decimal digits of other location data of the vehicle;
[0009] Store the data from the other locations.
[0010] Preferably, the method for embedding a 2-bit binary number into the last two decimal digits of data in another location includes:
[0011] Take the remainder by performing a modulo operation on the last two decimal digits of one of the other positional data, and obtain the remainder.
[0012] The 2-bit binary number is converted into a two-digit decimal number based on the value of the remainder;
[0013] The two decimal digits are embedded into the last two decimal digits of another data position.
[0014] Preferably, the step of converting the 2-bit binary number into a two-digit decimal number based on the remainder includes:
[0015] If the remainder is equal to 0 and the binary number of the 2-bit is 00, then the binary number of the 2-bit is converted into the first number;
[0016] If the remainder is 0 and the binary number of the 2-bit is 01, then the binary number of the 2-bit is converted into a second number;
[0017] If the remainder is 0 and the binary number of the 2-bit is 10, then the binary number of the 2-bit is converted into a third number;
[0018] If the remainder is 0 and the binary number of the 2-bit is 11, then the binary number of the 2-bit is converted into a fourth number;
[0019] If the remainder is equal to 1 and the binary number of the 2-bit is 00, then the binary number of the 2-bit is converted into a fourth number;
[0020] If the remainder is equal to 1 and the binary number of the 2-bit is 01, then the binary number of the 2-bit is converted into the first number;
[0021] If the remainder is equal to 1 and the binary number of the 2-bit is 10, then the binary number of the 2-bit is converted into a second number;
[0022] If the remainder is equal to 1 and the binary number of the 2-bit is 11, then the binary number of the 2-bit is converted into a third number;
[0023] If the remainder is equal to 2 and the binary number of the 2-bit is 00, then the binary number of the 2-bit is converted into a third number;
[0024] If the remainder is equal to 2 and the binary number of the 2-bit is 01, then the binary number of the 2-bit is converted into a fourth number;
[0025] If the remainder is equal to 2 and the binary number of the 2-bit is 10, then the binary number of the 2-bit is converted into the first number;
[0026] If the remainder is equal to 2 and the binary number of the 2-bit is 11, then the binary number of the 2-bit is converted into a second number;
[0027] If the remainder is 3 and the binary number of the 2-bit is 00, then the binary number of the 2-bit is converted into a second number;
[0028] If the remainder is equal to 3 and the binary number of the 2-bit is 01, then the binary number of the 2-bit is converted into a third number;
[0029] If the remainder is equal to 3 and the binary number of the 2-bit is 10, then the binary number of the 2-bit is converted into a fourth number;
[0030] If the remainder is 3 and the binary number of the 2-bit is 11, then the binary number of the 2-bit is converted into the first number.
[0031] Preferably, the first number is equal to the last two decimal digits of the other positional data.
[0032] Preferably, if the sum of the last two decimal digits of the other position data and 1 is less than or equal to 99, then the second number is equal to the last two decimal digits of the other position data plus 1; otherwise, the second number is equal to the last two decimal digits of the other position data minus 3.
[0033] Preferably, if the difference between the last two decimal digits of the other position data and 2 is greater than or equal to 0, then the third number is equal to the last two decimal digits of the other position data minus 2; otherwise, the third number is equal to the last two decimal digits of the other position data plus 2.
[0034] Preferably, if the difference between the last two decimal digits of the other position data and 1 is greater than or equal to 0, then the fourth number is equal to the last two decimal digits of the other position data minus 1; otherwise, the fourth number is equal to the last two decimal digits of the other position data plus 3.
[0035] Secondly, a vehicle location data storage system includes:
[0036] The location data conversion module acquires the vehicle's location data and converts the location data into multiple 2-bit binary numbers;
[0037] The location data embedding module embeds the multiple 2-bit binary numbers into the last two decimal digits of other location data of the vehicle.
[0038] The location data storage module stores the other location data.
[0039] Preferably, the location data embedding module is specifically used for:
[0040] Take the remainder by performing a modulo operation on the last two decimal digits of one of the other positional data, and obtain the remainder.
[0041] The 2-bit binary number is converted into a two-digit decimal number based on the value of the remainder.
[0042] Thirdly, a terminal device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method;
[0043] The terminal equipment includes an in-vehicle terminal or a vehicle management platform.
[0044] According to embodiments of the present invention, the present invention has the following beneficial effects:
[0045] This invention utilizes the fact that the location resolution represented by the 6th decimal place of latitude and longitude data is much lower than the positioning accuracy of general civilian systems, and has a relatively strong error tolerance. By making limited modifications to the 6th decimal place, a vehicle's location data can be converted into multiple 2-bit binary numbers and then embedded into the last two decimal digits of other location data for storage, thereby reducing the total amount of location data stored. At the same time, this invention is not sensitive to data loss; the loss of one data point will at most render another data point unusable, making it suitable for applications in vehicle environments.
[0046] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments, but the vehicle location data storage method, system and terminal device of the present invention are not limited to the embodiments. Attached Figure Description
[0047] Figure 1 This is a flowchart of a vehicle location data storage method according to an embodiment of the present invention;
[0048] Figure 2 This is a flowchart of a vehicle location data storage system according to an embodiment of the present invention. Detailed Implementation
[0049] The objects and functions of the present invention, as well as the methods for achieving these objects and functions, will be clarified by referring to exemplary embodiments. However, the present invention is not limited to the exemplary embodiments disclosed below; it can be implemented in various forms. The purpose of this specification is merely to help those skilled in the art to comprehensively understand the specific details of the invention.
[0050] In the following description, embodiments of the invention will be illustrated with reference to the accompanying drawings. In the drawings, the same reference numerals represent the same or similar parts, or the same or similar steps.
[0051] It should be noted that the step labels in the specific implementation are only for making the document look clearer. In actual implementation, the order of the steps can be adjusted according to specific needs.
[0052] See Figure 1 As shown, the present invention provides a vehicle location data storage method, comprising:
[0053] S101, acquire a location data of the vehicle, and convert the location data into multiple 2-bit binary numbers;
[0054] S102, embed the multiple 2-bit binary numbers into the last two decimal digits of other location data of the vehicle;
[0055] S103, store the other location data.
[0056] It should be noted that the location data to be embedded into other location data is stored separately in 2-bit units. For example, if a vehicle has 17 location data points to store, and each location data point is 32 bits, then the 17th location data point can be divided into 16 2-bit units, and each can be embedded into the last two decimal digits (i.e., the last two decimal places) of the other 16 location data points. In this way, only 16 data points need to be stored, saving storage space and improving efficiency.
[0057] A method for embedding a 2-bit binary number into the last two decimal digits of data in another location includes:
[0058] Take the remainder by performing a modulo operation on the last two decimal digits of one of the other positional data, and obtain the remainder.
[0059] The 2-bit binary number is converted into a two-digit decimal number based on the value of the remainder;
[0060] The two decimal digits are embedded into the last two decimal digits of another data position.
[0061] Specifically, the following example illustrates how to embed a 2-bit binary number D from location data E into another location data set, longitude or latitude data A. Embedding methods include:
[0062] Step 1: Take the last two decimal digits of A (the last two decimal digits), let's say it's B. Since B is composed of two digits, 0 ≤ B ≤ 99. Take the remainder 4 with respect to B to get the remainder c.
[0063] Step two, assuming that after embedding D into B, the value of B becomes B', then when c = 0, the embedding method is:
[0064] in:
[0065]
[0066] When c = 1, the embedding method is:
[0067]
[0068] When c = 2, the embedding method is:
[0069]
[0070] When c = 3, the embedding method is:
[0071]
[0072] The modified B' replaces the last two digits B in the original location data A, becoming the new location data A'. It can be seen that, relative to the original location data, the minimum possible deviation of the last two decimal places in A' is 0, and the maximum deviation is 0.000003. This means that after embedding, A' shifts at most by 3E-6 coordinates, equivalent to 3 decimeters. Within the 1-5 meter positioning error range of ordinary civilian positioning systems, this data change will not affect the system's accuracy or usability.
[0073] Correspondingly, when location data E is needed, the embedded storage information must first be extracted from other stored location data, including:
[0074] Step 1: Extract the last two decimal digits B' of the position data.
[0075] Step 2: Perform a remainder-4 operation on B';
[0076] Step 3, obtain the embedded 2-bit data bit D, as follows:
[0077]
[0078] Step 4: Combine the two-bit data extracted from multiple other location data to obtain a complete location data E.
[0079] See Figure 2 As shown, the present invention provides a vehicle location data storage system, comprising:
[0080] The location data conversion module 201 acquires a location data of the vehicle and converts the location data into multiple 2-bit binary numbers;
[0081] The location data embedding module 202 embeds the multiple 2-bit binary numbers into the last two decimal digits of other location data of the vehicle.
[0082] Location data storage module 203 stores the other location data.
[0083] The location data embedding module is specifically used for:
[0084] Take the remainder by performing a modulo operation on the last two decimal digits of one of the other positional data, and obtain the remainder.
[0085] The 2-bit binary number is converted into a two-digit decimal number based on the value of the remainder.
[0086] Thirdly, the present invention 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 executes the computer program to implement the steps of the vehicle location data storage method.
[0087] The terminal device includes an in-vehicle terminal or a vehicle management platform, etc. That is, this method can be used for location data storage of in-vehicle terminals or vehicle management platforms, etc.
[0088] The specific embodiments described above further illustrate the purpose, technical solution, and effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and do not limit the present invention. Modifications, substitutions, and variations made by those skilled in the art under the guidance of the present invention without departing from the spirit and scope of the claims are all within the protection scope of the present invention.
Claims
1. A vehicle position data storage method characterized by, The method comprises: acquiring position data of a vehicle, and converting the position data into a plurality of 2-bit binary digits; embedding the plurality of 2-bit binary digits into the last two decimal digits of other position data of the vehicle respectively; storing the other position data; embedding one 2-bit binary digit into the last two decimal digits of one other position data, the method comprising: performing a modulo 4 operation on the last two decimal digits of one other position data to obtain a remainder; converting the 2-bit binary digit into two decimal digits according to the value of the remainder; embedding the two decimal digits into the last two decimal digits of one other position data.
2. The vehicle position data storage method according to claim 1, characterized by, The method of converting the 2-bit binary digit into two decimal digits according to the remainder comprises: if the remainder is equal to 0 and the 2-bit binary digit is 00, converting the 2-bit binary digit into a first digit; if the remainder is equal to 0 and the 2-bit binary digit is 01, converting the 2-bit binary digit into a second digit; if the remainder is equal to 0 and the 2-bit binary digit is 10, converting the 2-bit binary digit into a third digit; if the remainder is equal to 0 and the 2-bit binary digit is 11, converting the 2-bit binary digit into a fourth digit; if the remainder is equal to 1 and the 2-bit binary digit is 00, converting the 2-bit binary digit into the fourth digit; if the remainder is equal to 1 and the 2-bit binary digit is 01, converting the 2-bit binary digit into the first digit; if the remainder is equal to 1 and the 2-bit binary digit is 10, converting the 2-bit binary digit into the second digit; if the remainder is equal to 1 and the 2-bit binary digit is 11, converting the 2-bit binary digit into the third digit; if the remainder is equal to 2 and the 2-bit binary digit is 00, converting the 2-bit binary digit into the third digit; if the remainder is equal to 2 and the 2-bit binary digit is 01, converting the 2-bit binary digit into the fourth digit; if the remainder is equal to 2 and the 2-bit binary digit is 10, converting the 2-bit binary digit into the first digit; if the remainder is equal to 2 and the 2-bit binary digit is 11, converting the 2-bit binary digit into the second digit; if the remainder is equal to 3 and the 2-bit binary digit is 00, converting the 2-bit binary digit into the second digit; if the remainder is equal to 3 and the 2-bit binary digit is 01, converting the 2-bit binary digit into the third digit; if the remainder is equal to 3 and the 2-bit binary digit is 10, converting the 2-bit binary digit into the fourth digit; if the remainder is equal to 3 and the 2-bit binary digit is 11, converting the 2-bit binary digit into the first digit. If the remainder is equal to 3 and the binary digit of the 2BIT is 11, the binary digit of the 2BIT is converted into a first digit.
3. The vehicle position data storage method according to claim 2, characterized by, The first digit is equal to the last two decimal digits of the other location data.
4. The vehicle position data storage method according to claim 2, characterized by, If the last two decimal digits of the other location data is less than or equal to 99 after taking sum with 1, the second digit is equal to the last two decimal digits of the other location data plus 1; otherwise the second digit is equal to the last two decimal digits of the other location data minus 3.
5. The vehicle position data storage method of claim 2, wherein If the last two decimal digits of the other location data is greater than or equal to 0 after taking difference with 2, the third digit is equal to the last two decimal digits of the other location data minus 2; Otherwise the third digit is equal to the last two decimal digits of the other location data plus 2.
6. The vehicle position data storage method of claim 2, wherein If the last two decimal digits of the other location data is greater than or equal to 0 after taking difference with 1, the fourth digit is equal to the last two decimal digits of the other location data minus 1; Otherwise the fourth digit is equal to the last two decimal digits of the other location data plus 3.
7. A vehicle location data storage system characterized by, The method comprises the steps of: Converting a location data of a vehicle into a plurality of binary digits of 2BIT; Embedding the plurality of binary digits of 2BIT into the last two decimal digits of other location data of the vehicle respectively; Storing the other location data. The location data embedding module is specifically configured to: Taking remainder 4 operation on the last two decimal digits of one of the other location data to obtain a remainder; Converting the binary digit of 2BIT into two decimal digits according to the value of the remainder.
8. 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 executes the computer program to realize the steps of the method according to any one of claims 1 to 6; The terminal device comprises a vehicle-mounted terminal or a vehicle management platform. The method comprises the steps of: Converting a location data of a vehicle into a plurality of binary digits of 2BIT; Embedding the plurality of binary digits of 2BIT into the last two decimal digits of other location data of the vehicle respectively; Storing the other location data. The location data embedding module is specifically configured to: Taking remainder 4 operation on the last two decimal digits of one of the other location data to obtain a remainder; Converting the binary digit of 2BIT into two decimal digits according to the value of the remainder. The processor executes the computer program to realize the steps of the method according to any one of claims 1 to 6; The terminal device comprises a vehicle-mounted terminal or a vehicle management platform.
Citation Information
Patent Citations
Online GPS track data compression algorithm based on offset calculation
CN105071814A
GPS data lossless compression and decompression method, terminal device and storage medium
CN110069583A
Method of compressing GPS positioning information
CN1948990B
Information hiding method, apparatus and equipment and computer-readable storage medium
CN109325367A