An improved Beidou short message location information compression processing method
Through the improved ASCII code compression method, Beidou short messages are encoded and decoded, which solves the problem of low communication efficiency of Beidou short messages and improves the packet transmission efficiency.
Patent Information
- Application Number
- CN202411234933.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-09-04
AI Technical Summary
The communication efficiency of Beidou short messages is low, and due to the communication frequency and length, the message transmission efficiency is not high.
Using an improved ASCII code compression method, the initial latitude and longitude coordinate information is subjected to specific encoding and decoding processing, and the packets are compressed and decompressed to improve communication efficiency. The specific steps include multiplying the latitude and longitude coordinate information by 1e5 and rounding it, converting it into a 32-bit binary value, performing inverse order sorting or operation, and finally performing ASCII encoding and decoding.
Improve the communication efficiency of Beidou short messages and improve the byte utilization rate.
Smart Images

Figure CN118741601B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Beidou message processing, and in particular to an improved Beidou short message location information compression processing method. Background Art
[0002] Beidou short messages rely directly on satellite communications and are therefore not restricted by surrounding infrastructure. However, Beidou short messages have problems such as limited communication frequency and length, and the communication efficiency is relatively low. Message compression is of great significance to improving byte utilization.
[0003] ASCII (American Standard Code for Information Interchange) is a computer encoding system based on the Latin alphabet. It is the most common information exchange standard and is equivalent to the international standard ISO / IEC 646. ASCII was first published as a standard in 1967 and was last updated in 1986. So far, a total of 128 characters have been defined.
[0004] Therefore, a method to improve Beidou short message compression based on ASCII code is proposed to improve message transmission efficiency. Summary of the invention
[0005] The purpose of the present invention is to provide an improved Beidou short message location information compression processing method to solve the problems raised in the above background technology.
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] An improved Beidou short message location information compression processing method comprises the following steps:
[0008] S1, compressing the initial longitude and latitude coordinate information;
[0009] S2, adding the compressed latitude and longitude coordinate information to the header information and sending it;
[0010] S3, decompressing the received compressed message;
[0011] The S1 comprises the following steps:
[0012] S1.1, judging the acquired longitude and latitude coordinate information, and obtaining the signed value of the initial longitude and latitude coordinates;
[0013] S1.2. Multiply the signed value by 1e5 and then round it to a decimal integer.
[0014] S1.3. Determine whether the decimal integer is a positive value, and convert the decimal integer value into a 32-bit binary value according to the specified message protocol to obtain a 5-bit block of binary values;
[0015] S1.4, arrange the obtained 5-bit blocks in reverse order;
[0016] S1.5, OR each block with 0x20;
[0017] S1.6, convert the obtained 6-bit blocks into decimal values, and add the decimal value 63 to each decimal value;
[0018] S1.7. Encode the obtained decimal value into ASCII code.
[0019] Preferably, the S1.1 comprises the following steps:
[0020] S1.11, determining whether the obtained longitude and latitude coordinates are the initial longitude and latitude coordinates;
[0021] S1.12. If it is the initial longitude and latitude coordinates, directly obtain the longitude and latitude coordinates and obtain the signed values of the initial longitude and latitude coordinates;
[0022] S1.13. If it is not the initial longitude and latitude coordinates, subtract the longitude and latitude coordinates of the previous coordinate point to obtain the longitude and latitude change, and obtain the initial signed value;
[0023] S1.14. Repeat step S1.11.
[0024] Preferably, S1.3 comprises the following steps:
[0025] S1.31. If the decimal integer is positive, the steps include:
[0026] Convert a decimal integer to a 32-bit binary value; Shift the 32-bit binary value left by 1 bit;
[0027] Divide the left-shifted binary value into 5-bit blocks;
[0028] S1.32. If the decimal integer is a negative value, the steps include:
[0029] Convert a decimal integer to a 32-bit binary value;
[0030] Get the two's complement value;
[0031] Shift the binary value left by 1 bit;
[0032] Invert all the left-shifted binary values to obtain their inverted binary values;
[0033] Divide the binary value into 5-bit blocks.
[0034] Preferably, S3 comprises the following steps:
[0035] S3.1. Decode the received message in ASCII to obtain a decimal value, subtract 63 from the decimal value and convert it into a 6-bit binary value;
[0036] S3.2, perform AND operation on the binary value and 0x20 to determine whether it is 0;
[0037] S3.3, arrange the obtained 5-bit blocks in reverse order and determine whether the last digit is 0;
[0038] S3.4. Divide the obtained decimal value by 1e5 to obtain the initial signed value. The first two digits are the initial longitude and latitude coordinates, and the following two digits are the offset of the next coordinate point relative to the previous coordinate point. Add the offset to the previous coordinate point to obtain the longitude and latitude coordinates of the corresponding coordinate point.
[0039] Preferably, S3.2 comprises the following steps:
[0040] If it is 0, intercept this block and determine whether it is the last block. If it is, remove the first bit of the binary value to obtain a 5-bit block; if not, select the next binary value to determine whether it is 0, and repeat step S3.2;
[0041] If it is not 0, select the next binary value and determine whether it is 0, and repeat step S3.2.
[0042] Preferably, the S3.3 comprises the following steps:
[0043] If it is 0, the binary value is shifted right by 1 bit, the left bit is 0, and the resulting binary value is converted to a decimal value and the sign "+" is added;
[0044] If it is not 0, invert the binary value, shift the binary value right by 1 bit, and the left bit is 1, subtract 1 from the binary value and invert the code, convert the inverted binary value to a decimal value and add the sign "-".
[0045] Compared with the prior art, the beneficial effect of the present invention is that the present invention compresses the message on the basis of ASCII, thereby improving the communication efficiency of Beidou short message. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 is a flow chart of the method of the present invention;
[0047] Figure 2 It is a flow chart of the process of compressing longitude and latitude coordinate information in an embodiment of the present invention;
[0048] Figure 3The figure is a flow chart of a message decompression process in an embodiment of the present invention. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0050] In the description of the present invention, it should be noted that the terms "upper", "lower", "inner", "outer", "top / bottom" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific position, be constructed and operated in a specific position, and therefore cannot be understood as limiting the present invention. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance.
[0051] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "provided with", "mounted / connected", "connected", etc. should be understood in a broad sense. For example, "connected" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0052] See also Figure 1-3 The present invention provides a technical solution: an improved Beidou short message location information compression processing method, comprising the following steps:
[0053] S1, compressing the initial latitude and longitude coordinate information, specifically including the following steps:
[0054] S1.1, judging whether the obtained longitude and latitude coordinates are the initial longitude and latitude coordinates, that is, judging whether it is the first point, and obtaining the initial signed value; specifically comprising the following steps:
[0055] S1.11, determine whether the coordinates are the initial longitude and latitude;
[0056] S1.12. If it is the initial longitude and latitude coordinates, directly obtain the longitude and latitude coordinates and obtain the initial signed value;
[0057] S1.13. If it is not the initial longitude and latitude coordinates, subtract the longitude and latitude coordinates of the previous coordinate point to obtain the longitude and latitude change, and obtain the initial signed value;
[0058] S1.14. Repeat step S1.11.
[0059] S1.2, multiply the initial signed value by 1e5 and then round it to a decimal integer;
[0060] S1.3. Determine whether the decimal integer is a positive value, and convert the decimal integer value into a 32-bit binary value according to the specified message protocol to obtain a 5-bit block of binary values, specifically including the following steps: S1.31. If the decimal integer is a positive value, including the steps of:
[0061] Convert a decimal integer to a 32-bit binary value;
[0062] Shift the 32-bit binary value left by 1 bit;
[0063] Divide the left-shifted binary value into 5-bit blocks, starting from the right;
[0064] S1.32. If the decimal integer is a negative value, the steps include:
[0065] Convert a decimal integer to a 32-bit binary value;
[0066] Get the two's complement value;
[0067] Shift the binary value left by 1 bit;
[0068] Invert all the left-shifted binary values to obtain their inverted binary values;
[0069] Divide the binary value into 5-bit blocks, starting from the right.
[0070] S1.4, arrange the obtained 5-bit blocks in reverse order;
[0071] S1.5. OR each block with 0x20, except the rightmost block;
[0072] S1.6, convert the obtained 6-bit blocks into decimal values, and add the decimal value 63 to each decimal value;
[0073] S1.7, encode the obtained decimal value into ASCII code to compress the initial longitude and latitude coordinate information;
[0074] S2, adding header information to the compressed data information and sending it;
[0075] S3, decompressing the received compressed message;
[0076] The S3 comprises the following steps: S3.1, receiving a message from the airborne terminal and performing ASCII decoding to obtain a decimal value, subtracting 63 from the decimal value and converting the result into a 6-bit binary value;
[0077] S3.2, perform AND operation on the binary value and 0x20 to determine whether it is 0;
[0078] S3.3, arrange the obtained 5-bit blocks in reverse order and determine whether the last digit is 0;
[0079] S3.4. Divide the obtained decimal value by 1e5 to obtain the initial signed value. The first two digits are the initial longitude and latitude coordinates, and the following two digits are the offset of the next coordinate point relative to the previous coordinate point. Add the offset to the previous coordinate point to obtain the longitude and latitude coordinates of the corresponding coordinate point.
[0080] The S3.2 comprises the following steps:
[0081] If it is 0, intercept this block and determine whether it is the last block. If it is, remove the first bit of the binary value to obtain a 5-bit block; if not, select the next binary value to determine whether it is 0, and repeat step S3.2;
[0082] If it is not 0, select the next binary value and determine whether it is 0, and repeat step S3.2.
[0083] The S3.3 comprises the following steps:
[0084] If it is 0, the binary value is shifted right by 1 bit, the left bit is 0, and the resulting binary value is converted to a decimal value and the sign "+" is added;
[0085] If it is not 0, invert the binary value, shift the binary value right by 1 bit, and the left bit is 1, subtract 1 from the binary value and invert the code, convert the inverted binary value to a decimal value and add the sign "-".
[0086] In this embodiment, it is assumed that the longitude in the initial longitude and latitude is -179.9832104. Since it is the initial coordinate point, the initial signed value can be directly obtained:
[0087] -179.9832104
[0088] Multiply the decimal value by 1e5 and then round to get:
[0089] -17998321
[0090] To determine whether it is a positive value, convert the decimal integer value to a 32-bit binary value as follows: 0000 0001 0001 0010 1010 0001 1111 0001
[0092] The binary value is obtained from its two's complement as follows: 1111 1110 1110 1101 0101 1110 0000 1110 1111 1110 1110 1101 0101 1110 0000 1111
[0095] Shift the binary value left by 1 bit: 1111 1101 1101 1010 1011 1100 0001 1110
[0097] Reversing the encoding yields: 0000 0010 0010 0101 0100 0011 1110 0001
[0099] Divide the binary value into 5-bit chunks (starting from the right): 00001 00010 01010 10000 11111 00001
[0101] Arrange the 5-bit blocks in reverse order: 00001 11111 10000 01010 00010 00001
[0103] OR each block with 0x20 (except the rightmost block): 100001 111111 110000 101010 100010 000001
[0105] Convert each value to a decimal value: 33 63 48 42 34 1
[0107] Add 63 to each value: 96 126 111 105 97 64
[0109] Convert each value to its corresponding ASCII value:
[0110] ASCII code table: 96 → `; 126 → ~; 111 → o; 105 → i; 97 → a; 64 → @;
[0111] The above message is compressed into: `~oia@.
[0112] The following table shows some example encoded points, showing the encoding as a series of offsets relative to the previous point. Points: (38.5, -120.2), (40.7, -120.95), (43.252, -126.453).
[0113] Table 1 The changes of longitude and latitude obtained based on longitude and latitude coordinates
[0114]
[0115] Table 2 Compression into code points based on longitude and latitude changes
[0116]
[0117] The encoded polyline can be obtained:
[0118] _p~iF~ps|U_ulLnnqC_mqNvxq`@.
[0119] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0120] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. An improved Beidou short message location information compression processing method, characterized in that: The method comprises the following steps: S1, compressing the initial longitude and latitude coordinate information; S2, adding the compressed latitude and longitude coordinate information to the header information and sending it; S3, decompressing the received compressed message; The S1 comprises the following steps: S1.1, judging the acquired longitude and latitude coordinate information, and obtaining the signed value of the initial longitude and latitude coordinates; S1.
2. Multiply the signed value by 1e5 and then round it to a decimal integer. S1.
3. Determine whether the decimal integer is a positive value, and convert the decimal integer value into a 32-bit binary value according to the specified message protocol to obtain a 5-bit block of binary values; S1.4, arrange the obtained 5-bit blocks in reverse order; S1.5, OR each block with 0x20; S1.6, convert the obtained 6-bit blocks into decimal values, and add the decimal value 63 to each decimal value; S1.7, encode the obtained decimal value into ASCII code; The S1.1 comprises the following steps: S1.11, determining whether the obtained longitude and latitude coordinates are the initial longitude and latitude coordinates; S1.
12. If it is the initial longitude and latitude coordinates, directly obtain the longitude and latitude coordinates and obtain the signed values of the initial longitude and latitude coordinates; S1.
13. If it is not the initial longitude and latitude coordinates, subtract the longitude and latitude coordinates of the previous coordinate point to obtain the longitude and latitude change, and obtain the initial signed value; S1.14, repeat step S1.11; The S1.3 comprises the following steps: S1.
31. If the decimal integer is positive, the steps include: Convert a decimal integer to a 32-bit binary value; Shift the 32-bit binary value left by 1 bit; Divide the left-shifted binary value into 5-bit blocks; S1.
32. If the decimal integer is a negative value, the steps include: Convert a decimal integer to a 32-bit binary value; Get the two's complement value; Shift the binary value left by 1 bit; Invert all the left-shifted binary values to obtain their inverted binary values; Divide the binary value into 5-bit blocks.
2. According to claim 1, an improved Beidou short message location information compression processing method is characterized in that: The S3 comprises the following steps: S3.
1. Decode the received message in ASCII to obtain a decimal value, subtract 63 from the decimal value and convert it into a 6-bit binary value; S3.2, perform AND operation on the binary value and 0x20 to determine whether it is 0; S3.3, arrange the obtained 5-bit blocks in reverse order and determine whether the last digit is 0; S3.
4. Divide the obtained decimal value by 1e5 to obtain the initial signed value. The first two digits are the initial longitude and latitude coordinates, and the following two digits are the offset of the next coordinate point relative to the previous coordinate point. Add the offset to the previous coordinate point to obtain the longitude and latitude coordinates of the corresponding coordinate point.
3. The improved Beidou short message location information compression processing method according to claim 2, characterized in that: The S3.2 comprises the following steps: If it is 0, intercept this block and determine whether it is the last block; if so, remove the first bit of the binary value to obtain a 5-bit block; if not, select the next binary value to determine whether it is 0, and repeat step S3.2; If it is not 0, select the next binary value and determine whether it is 0, and repeat step S3.
2.
4. The improved Beidou short message location information compression processing method according to claim 2, characterized in that: The S3.3 comprises the following steps: If it is 0, the binary value is shifted right by 1 bit, the left bit is 0, and the resulting binary value is converted to a decimal value and the sign "+" is added; If it is not 0, invert the binary value, shift the binary value right by 1 bit, and make the left bit 1, subtract 1 from the binary value and invert the code, convert the inverted binary value to a decimal value and add the sign "-".
