A meteorological data transmission method and analysis method based on Beidou short message communication
By compressing and subcontracting the rainfall data observed by the automatic weather station, combining incremental transmission and RS encoding, the problems of low data transmission efficiency and poor real-time performance in Beidou short message communication are solved, achieving more efficient and more efficient Accurate meteorological data transmission.
Patent Information
- Application Number
- CN202311129877.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-01
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2043-09-01
AI Technical Summary
When the automatic weather station uses Beidou short message communication, due to the limited data packet data volume and time window limitation, the transmission efficiency of meteorological factor data is low, the real-time performance is poor, and the success rate is reduced.
By compressing the continuously observed rainfall data, a compressed rainfall string with a bit number smaller than the original data is formed and subcontracted to transmit it. The incremental transmission mechanism and RS encoding are used to improve data transmission efficiency and accuracy.
It realizes data compression, improves the data transmission efficiency and real-time nature of Beidou short message communication, enhances the accuracy of transmission, and is suitable for extreme scenarios.
Smart Images

Figure CN117176823B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of meteorological technology, and in particular to a meteorological data transmission method and a parsing method based on Beidou short message communication. Background Art
[0002] An automatic weather station is a device that can automatically observe and store meteorological data. It needs to transmit the monitored meteorological data to the central station for unified monitoring. Limited by the communication infrastructure, some automatic weather stations need to transmit meteorological data through Beidou short message communication. However, in the civilian environment, the amount of data transmitted by Beidou short message communication is very limited. Each data packet can only transmit 78 bytes, and there is a time window limit. After sending a data packet, you need to wait for one minute before sending the next data packet.
[0003] However, the amount of meteorological element data observed by the automatic weather station is very large. Taking rainfall data as an example, the automatic weather station needs to observe and transmit rainfall data every minute of every hour, and the value range of each rainfall data is 0.0mm~9.9mm. After conversion into binary data, each rainfall data takes up 7 bits. Therefore, the automatic weather station often needs to divide it into multiple data packets to transmit meteorological element data, which has low transmission efficiency, poor real-time transmission, and reduced data transmission success rate. Summary of the invention
[0004] In view of the above problems and technical requirements, the applicant has proposed a meteorological data transmission method and analysis method based on Beidou short message communication. The technical solution of this application is as follows:
[0005] A meteorological data transmission method based on Beidou short message communication, the meteorological data transmission method comprising:
[0006] The N continuously observed rainfall data in decimal form are compressed to form a compressed rainfall string R in binary form, each rainfall data in decimal form includes one integer bit data and one decimal bit data, the high-order data string in the compressed rainfall string R matches the integer bit data of each rainfall data, the low-order data string in the compressed rainfall string R matches the decimal bit data of each rainfall data, and the number of bits occupied by each compressed rainfall string R is less than 7*N, and the integer parameter N≥2;
[0007] The multiple compressed rainfall strings R formed by sequentially processing according to the observation time sequence are concatenated to obtain the original byte stream and determine the valid byte stream;
[0008] Encode the valid byte stream to form Beidou short message data and send the Beidou short message data.
[0009] A meteorological data parsing method based on Beidou short message communication, the meteorological data parsing method comprising:
[0010] Receive Beidou short message data and decode the Beidou short message data to obtain a valid byte stream;
[0011] Determine the original byte stream according to the valid byte stream, the original byte stream is obtained by splicing the data of multiple compressed rainfall strings R in sequence according to the observation time sequence;
[0012] Parse the original byte stream, determine that the highest data bit of the bit stream corresponding to the original byte stream starts with the first compressed rainfall string R, parse the high-order data string in the compressed rainfall string R to obtain integer bit data of N rainfall data, parse the low-order data string in the compressed rainfall string to obtain decimal bit data of N rainfall data, and the integer parameter N≥2;
[0013] Complete data analysis for a compressed rainfall string R and organize the N decimal rainfall data corresponding to the compressed rainfall string R that are observed continuously in the observation time sequence, each rainfall data includes a corresponding integer bit data and a decimal bit data; perform data analysis on the next compressed rainfall string R in turn until data analysis is completed for all compressed rainfall strings R.
[0014] The beneficial technical effects of this application are:
[0015] The present application discloses a meteorological data transmission method and analysis method based on Beidou short message communication. The method is based on the characteristic that the difference of continuously observed rainfall data is not large, and the integer bit data and decimal bit data of multiple continuous rainfall data are uniformly compressed and processed respectively, and the high-order data string of the compressed rainfall string is obtained according to the integer bit data of multiple rainfall data, and the low-order data string of the compressed rainfall string is obtained according to the decimal bit data of multiple rainfall data, so that the multiple continuously observed rainfall data are uniformly compressed into a compressed rainfall string and carried in the Beidou short message data. The number of bits occupied by the compressed rainfall string after compression processing is less than the number of bits occupied by the original rainfall data, so data compression is achieved, so that each Beidou short message data sent can transmit more rainfall data, improve the data transmission efficiency and real-time performance, and the same rainfall data can be completed through fewer transmissions, which is also conducive to improving the accuracy of transmission.
[0016] In addition, this application also makes compatible processing for situations where there are large differences in continuously observed rainfall data under extreme scenarios, and provides two different compression processing methods, making the method more widely applicable.
[0017] Furthermore, the method of the present application introduces an incremental transmission mechanism for the original byte stream, and uses a method of periodically transmitting the original byte stream and transmitting an incremental effective byte stream between two groups of original byte streams to perform data interaction, so that each Beidou short message data sent can further carry more rainfall data, further improving data transmission efficiency, real-time and accuracy.
[0018] In addition, the present application also introduces RS coding into Beidou short message data, so that occasional data errors can be corrected at the receiving end, the accuracy of data transmission is improved, and the quality of data transmission is ensured. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 This is a method flow chart of a meteorological data transmission method according to an embodiment of the present application.
[0020] Figure 2 It is a schematic diagram of the data format of a compressed rainfall string obtained by compressing three consecutively observed rainfall data in one embodiment of the present application.
[0021] Figure 3 It is a schematic diagram of a reference bit stream E and a reference byte stream F obtained by comparing an original byte stream Q with a valid byte stream P in a most recent set of reference message data sent in an example of the present application.
[0022] Figure 4 It is a method flow chart of a meteorological data analysis method in an example of the present application. DETAILED DESCRIPTION
[0023] The specific implementation of the present application is further described below in conjunction with the accompanying drawings.
[0024] The present application discloses a meteorological data transmission method and a parsing method based on Beidou short message communication, which are used to realize the meteorological element data transmission function between an automatic meteorological station and a central station. The automatic meteorological station transmits the observed meteorological element data to the central station using the Beidou short message communication mechanism according to the meteorological data transmission method of the present application, and the central station parses the data received using the Beidou short message communication mechanism according to the meteorological data parsing method of the present application to obtain the meteorological element data.
[0025] The meteorological element data typically transmitted in this application is rainfall data. As described in the background technology section, the amount of observation data for rainfall data is relatively large. Rainfall data needs to be observed every minute within every hour, and the value range of each rainfall data is 0.0mm to 9.9mm. Each rainfall data needs 7 bits of data to be directly represented in binary. The meteorological data transmission method based on Beidou short message communication disclosed in this application provides a new method for compressing and transmitting rainfall data, which is beneficial to improving the transmission efficiency of meteorological data. The meteorological data transmission method includes the following steps, please refer to Figure 1 Flowchart:
[0026] Step 110, compressing the N decimal rainfall data observed continuously to form a compressed rainfall string R in binary form, where the integer parameter N≥2.
[0027] Each rainfall data in decimal form includes one integer digit and one decimal digit, and the value range of the integer digit is [0, 9], and the value range of the decimal digit is [0, 9].
[0028] The high-order data string in each compressed rainfall string R matches the integer-order data of the N rainfall data, and the low-order data string in the compressed rainfall string R matches the decimal-order data of the N rainfall data.
[0029] Step 120, data splicing is performed on a plurality of compressed rainfall strings R formed by sequentially processing according to the observation time sequence to obtain an original byte stream and determine a valid byte stream.
[0030] Step 130, encode the valid byte stream to form Beidou short message data and send the Beidou short message data.
[0031] According to the traditional practice, each rainfall data is directly converted into binary data and occupies 7 bits, so N rainfall data occupy 7*N bits in total. In step 110, each compressed rainfall string R obtained by performing data compression processing on the N rainfall data occupies less than 7*N bits. Therefore, the present application reduces the bit data occupied by the N rainfall data by performing data compression processing on the N rainfall data, so that under the byte limit of the Beidou short message data, the Beidou short message data sent at a single time can contain more rainfall data, thereby improving the data transmission efficiency.
[0032] In one embodiment, N=3 and the three rainfall data observed in sequence from the front to the back in the observation time sequence are recorded as the first rainfall data, the second rainfall data and the third rainfall data respectively, the integer data of the first rainfall data is a1 and the decimal data is a2, the integer data of the second rainfall data is b1 and the decimal data is b2, the integer data of the third rainfall data is c1 and the decimal data is c2. Then the above step 110 compresses the three rainfall data to form a compressed rainfall string R, including compressing the three rainfall data to form a compressed rainfall string R occupying 16 bits, so that any data bit R of the compressed rainfall string i Represents any i-th bit from high to low, 1≤i≤16, where the contents of each data bit are as follows, please refer to Figure 2 The data format of the compressed rainfall string is shown:
[0033] The high-order data string in the compressed rainfall string includes data bits R1 to R6 and matches the integer bit data of the three rainfall data, and the most significant 3 bits of data bits R1 to R3 are the binary results corresponding to the minimum value min among a1, b1 and c1, including: (1) When min=0, the most significant 3 bits of data bits R1 to R3 are 000. (2) When min=1, the most significant 3 bits of data bits R1 to R3 are 001. (3) When min=2, the most significant 3 bits of data bits R1 to R3 are 010. (4) When min=3, the most significant 3 bits of data bits R1 to R3 are 011. (5) When min=4, the most significant 3 bits of data bits R1 to R3 are 100. (6) When min=5, the most significant 3 bits of data bits R1 to R3 are 101. (7) When min=6, the highest 3 bits of data bits R1 to R3 are 110.
[0034] Data bit R4 is the decimal result of a1-min, data bit R5 is the decimal result of b1-min, and data bit R6 is the decimal result of c1-min. Any one of data bit R4, data bit R5, and data bit R6 is 0 or 1.
[0035] The low-order data string in the compressed rainfall string includes data bits R7 to R 16The 10-bit data of the lower data string is the binary result corresponding to the decimal concatenation result B of the three rainfall data and is obtained by filling the high bit with zero when the bit width is insufficient. Among them, the decimal concatenation result B is the decimal result formed by concatenating the decimal data a2, b2 and c2 of the three rainfall data from high to low in sequence. The decimal concatenation result B is in the form of a three-digit integer, a2 is the hundreds digit of the decimal concatenation result B, b2 is the tens digit of the decimal concatenation result B, and c2 is the ones digit of the decimal concatenation result B.
[0036] For example, in one example, the three rainfall data observed in order from the beginning to the end of the observation time sequence are 2.2, 1.9 and 1.8, all in mm. Then the integer digits of the three rainfall data are determined to be a1=2, b1=1 and c1=1, and the decimal digits of the three rainfall data are determined to be a2=2, b2=9 and c2=8.
[0037] Therefore, it is determined that the minimum value min=1 among a1, b1 and c1 satisfies the condition of min≤6, and a1-min=1, b1-min=0, c1-min=0 all meet the condition. Therefore, it is determined that the binary result of the 3-bit data of data bit R1 to data bit R3 is min=1 is 001, and data bit R4 is a1-min=1, data bit R5 is b1-min=0, and data bit R6 is c1-min=0.
[0038] The decimal point concatenation result B formed by concatenating the decimal point data of the three rainfall data is 298, and its corresponding binary result is 100101010. The high-order zero is filled to 10 bits, which is 0100101010, which is data bits R7 to R 16 10-bit data.
[0039] Finally, the three rainfall data of 2.2, 1.9 and 1.8 are compressed to obtain a 16-bit compressed rainfall string R=0011000100101010.
[0040] In the above embodiment, the value range of the most significant 3 bits of data bits R1 to R3 is 000-110, that is, the value range of the corresponding decimal result minimum value min is 0-6. And each data bit in data bits R4 to R6 takes a value of 0 or 1, indicating that the difference between the three integer bit data a1, b1 and c1 and the minimum value min does not exceed 1. That is, this embodiment actually has an implicit condition that a1-min≤1 and b1-min≤1 and c1-min≤1 and min≤6. Only when this condition is met, the three rainfall data are compressed according to the data compression method of this embodiment to form a compressed rainfall string R occupying 16 bits.
[0041] In practical application scenarios, in most cases, the three rainfall data observed continuously in the observation time sequence can meet the above requirements, because the observation frequency of the automatic weather station is high, and the three rainfall data observed continuously are very close in time sequence, and rainfall data is often unlikely to have mutations in similar time series, so the decimal data of the three rainfall data observed continuously may have a small difference or a large difference, but the integer data difference is often small, so under most conditions, the conditions of a1-min≤1, b1-min≤1, and c1-min≤1 can be met. Moreover, although the value range of each rainfall data is 0.0mm~9.9mm in theory, in actual scenarios, rainfall data is often less than 7.0mm, so in general, the integer data of the three rainfall data are less than 7, so under most conditions, the condition of min≤6 can be met.
[0042] However, in order to avoid the situation where the above conditions cannot be met in some extreme scenarios and the method cannot be run, another fault-tolerant compression method is provided in another embodiment:
[0043] That is, in most cases, when the conditions of a1-min≤1 and b1-min≤1 and c1-min≤1 and min≤6 are met, the three rainfall data are compressed according to the method provided in the above embodiment to form a compressed rainfall string R occupying 16 bits.
[0044] In extreme cases, when the conditions of a1-min≤1 and b1-min≤1 and c1-min≤1 and min≤6 are not met, the three rainfall data are compressed to form a compressed rainfall string R occupying 23 bits, so that any data bit R of the compressed rainfall string j Represents any j-th bit from high to low, 1≤j≤23, where:
[0045] The most significant 3 bits of data bits R1 to R3 in the compressed rainfall string are 111. 13 The middle 10 bits of data are the binary result corresponding to the integer bit splicing result A of the three rainfall data and are obtained by filling the high bits with zeros when the bit width is insufficient. The integer bit splicing result A is the decimal result formed by splicing the integer bit data a1, b1 and c1 of the three rainfall data from high to low in sequence. The integer bit splicing result A is a three-digit integer form, a1 is the hundreds digit of the integer bit splicing result A, b1 is the tens digit of the integer bit splicing result A, and c1 is the ones digit of the integer bit splicing result A. Data bits R in the compressed rainfall string 14 To data bit R 23The least significant 10 bits of data are the binary result corresponding to the concatenation result B of the decimal places of the three rainfall data and are obtained by filling the high bits with zeros when the bit width is insufficient, which is the same as the above embodiment.
[0046] For example, in an extreme case, the three rainfall data observed in order from the beginning to the end of the observation time sequence are 0.2, 2.9 and 2.8, all in mm. Then the integer digits of the three rainfall data are determined to be a1=0, b1=2 and c1=2, and the decimal digits of the three rainfall data are determined to be a2=2, b2=9 and c2=8.
[0047] Therefore, it is determined that the minimum value min=0 among a1, b1 and c1 satisfies the condition of min≤6, a1-min=0 satisfies the condition, but b1-min=2 and c1-min=2 do not satisfy the condition. Therefore, the 3-bit data from data bit R1 to data bit R3 is directly determined to be 111.
[0048] The integer bit concatenation result A obtained by concatenating a1, b1 and c1 is 022, and the corresponding binary result is 10110. After the high-order zero is padded to 10 bits, it is 0000010110. The decimal bit concatenation result B formed by concatenating the decimal data of the three rainfall data is 298, and the corresponding binary result is 100101010. After the high-order zero is padded to 10 bits, it is 0100101010.
[0049] Finally, the three rainfall data of 0.2, 2.9 and 2.8 are compressed to obtain a compressed rainfall string R=11100000101100100101010 which occupies 23 bits.
[0050] Combining the above two embodiments, under normal circumstances, after the three continuously observed rainfall data are compressed by the data compression method of the present application, the three rainfall data that originally occupied 21 bits can be compressed into a compressed rainfall string R that only occupies 16 bits, which can reduce 5 bits on the basis of ensuring the accuracy of the quantity transmission. For 60 rainfall data contained in an hourly message, a total of 12.5 bytes can be reduced in transmission. For extreme cases, although the compressed rainfall string R occupies 23 bits, which is more than the original 21 bits, this allows the method to be compatible with some extreme cases, thereby improving the scope of application of the method of the present application. Moreover, considering that the probability of extreme cases occurring in actual applications is very small and the proportion is very low, even if a small part of the compressed rainfall string R needs to occupy 23 bits, when most of the compressed rainfall strings R occupy 16 bits, the method of the present application can still effectively improve the data transmission rate.
[0051] In order to further improve the data transmission rate, in another embodiment, in the above step 120, the original byte stream is not always directly used as the effective byte stream, but an incremental transmission mechanism is further added to further compress the data, which is divided into two cases:
[0052] 1. For the original byte stream contained in the Beidou short message data as the reference message data sent at predetermined time intervals, the original byte stream is directly used as the valid byte stream.
[0053] The predetermined time interval is a custom value, and the frequency of sending the reference message data can be customized. For example, it is common to send the reference message data once every hour.
[0054] As mentioned above, under normal circumstances, the compressed rainfall string R occupies 16 bits, which occupies 2 bytes when converted into byte form. The compressed rainfall string R obtained in sequence according to the observation time sequence is spliced to obtain the original byte stream including several bytes in sequence. For example, an original byte stream A is obtained as Figure 3 As shown, the original byte stream P is directly used as the valid byte stream P. The total number of bytes of the valid byte stream contained in each group of Beidou short message data is K, so the original byte stream P includes K bytes, and byte P k It is any k-th byte from high to low in the original byte stream P, 1≤k≤K.
[0055] 2. For the original byte stream Q contained in any set of Beidou short message data sent between any two adjacent sets of reference message data, perform the following steps (1) to (5) to obtain the valid byte stream The valid byte stream obtained It is not the result of directly splicing the compressed rainfall string R, but the result of using incremental transmission, so that the effective byte stream in each group of Beidou short message data The data content of more compressed rainfall strings R can be included:
[0056] (1) Initialize integer parameter k = 1 and read byte Q k and P k For comparison, Byte Q k is any kth byte from high to low in the original byte stream Q, byte P k It is any kth byte from high to low in the valid byte stream P in the most recent set of reference message data that has been sent.
[0057] (2) When Q k With P k When they are equal, determine E k =0,E k Represents any kth bit from high to low in the reference bit stream E.
[0058] (3) When Q k With P k If they are not equal, determine E k = 1, and byte Q k The least significant byte added to the reference byte stream F.
[0059] (4) When k<K, let k=k+1 and compare Q again k With P k To update the reference bit stream E and reference byte stream F, continue the traversal.
[0060] (5) When k=K, it is determined that the traversal comparison has been completed. k With P k All bytes of the reference bit stream E and reference byte stream F are obtained.
[0061] (6) Convert the reference bit stream E into a byte stream to obtain a reference byte stream E′, and determine the total number of bytes Len occupied by the reference byte stream E′ to obtain a valid byte stream Starting from the high bit, they are the word length byte, the reference byte stream E′ and the reference byte stream F. The word length byte occupies one byte and is the binary result of the total number of bytes Len.
[0062] For example, Figure 3 In the example, the contents of each byte in the original byte stream Q and the valid byte stream P in the most recent set of reference message data that has been sent are shown. Starting from k=1, we traverse in sequence. Since Q1=P1, E1=0. Q2≠P2, so E2=1, and add Q2=04 to the lowest byte of the reference byte stream F. Since the initial reference byte stream F is empty, the reference byte stream F is 04 at this time. We traverse in this way. When we traverse to k=13, since Q 13 ≠P 13 , so E 13 = 1, and add Q to the least significant byte of the reference byte stream F 13 =02, so that the reference byte stream F becomes 0402. This is repeated until all bytes in the original byte stream Q and the valid byte stream P are traversed, and the reference bit stream E = 01000000000010000100000000000010 and the reference byte stream F = 04021575 are obtained. The reference bit stream E is converted into a byte stream form to obtain a reference byte stream E' = 40084002, and the total number of bytes occupied by the reference byte stream E' is determined to be Len = 4. The word length byte is 04, so the valid byte stream is obtained It can be seen intuitively that the effective byte stream Compared with the original byte stream Q, data compression is further performed.
[0063] Even after data compression is performed using the method of the present application, all complete rainfall data observed by the automatic weather station still needs to be transmitted in multiple Beidou short message data in multiple times, and each transmission of Beidou short message data will have a certain probability of packet loss due to interference and other factors. The more Beidou short message data is transmitted, the lower the transmission success rate of all complete rainfall data. Therefore, in order to ensure transmission accuracy, in one embodiment, the valid byte stream includes 73 bytes, in addition to which, it also includes a 1-byte check byte and a 4-byte RS check code. The method of encoding the valid byte stream to form Beidou short message data in step 130 includes the following steps:
[0064] (1) Perform XOR check on the valid byte stream to obtain a 1-byte check byte and add it to the low order of the valid byte stream to obtain 74 bytes of check data.
[0065] (2) The high-order bits of the check data are padded with zeros, and 177 bytes of zeros are added to obtain 251 bytes of padded check data.
[0066] (3) Use the RS (255, 251) encoding and decoding algorithm to encode the padding check data to obtain encoded data containing 255 bytes.
[0067] (4) According to the calculation process of the RS encoding algorithm, the high bits of the obtained coded data are still 177 bytes of 0, so the high bits of 177 bytes of 0 are removed, and the low 78 bytes of the coded data are intercepted to obtain the Beidou short message data.
[0068] Corresponding to the meteorological data transmission method provided in this application, this application also discloses a meteorological data parsing method based on Beidou short message communication, please refer to Figure 4 The flowchart shown includes the following steps:
[0069] Step 310, receiving Beidou short message data and decoding the Beidou short message data to obtain a valid byte stream.
[0070] Step 320, determining the original byte stream according to the valid byte stream, where the original byte stream is obtained by sequentially splicing data of multiple compressed rainfall strings R according to the observation time sequence.
[0071] Step 330, performing data parsing on the original byte stream, determining that the highest data bit of the bit stream corresponding to the original byte stream starts with the first compressed rainfall string R, performing data parsing on the high-order data string in each compressed rainfall string R to obtain integer bit data of N rainfall data, performing data parsing on the low-order data string in the compressed rainfall string to obtain decimal bit data of N rainfall data, and the integer parameter N≥2;
[0072] Step 340, complete data parsing for a compressed rainfall string R and organize to obtain N rainfall data in decimal form that are observed successively in the observation sequence corresponding to the compressed rainfall string R, each rainfall data includes a corresponding integer bit data and a decimal bit data; perform data parsing on the next compressed rainfall string R in turn until data parsing is completed for the bit stream corresponding to the original byte stream.
[0073] Corresponding to the data compression method in the meteorological data transmission method provided in the present application, the method for parsing the original byte stream in step 330 includes the following steps to compress any data bit R of the rainfall string: i Represents any i-th bit from high to low, 1≤i≤16:
[0074] The decimal result corresponding to the 3-bit data from data bit R1 to data bit R3 in the compressed rainfall string is used as the minimum value min of the integer bit data of the three rainfall data. The decimal addition result of the data of data bit R4 in the compressed rainfall string and the minimum value min is used as the integer bit data a1 of the first rainfall data. The decimal addition result of the data of data bit R5 in the compressed rainfall string and the minimum value min is used as the integer bit data b1 of the second rainfall data. The decimal addition result of the data of data bit R6 in the compressed rainfall string and the minimum value min is used as the integer bit data c1 of the third rainfall data.
[0075] Compress the data bit R7 to data bit R in the rainfall string 16 The decimal result corresponding to the 10-bit data is taken as the decimal concatenation result B. And determine a2=(B / 10)%10, b2=(B / 10)%10, c2=B%10. Among them, the symbol % indicates the remainder.
[0076] Thus, the first rainfall data, the second rainfall data and the third rainfall data are sorted out from front to back in the observation time sequence. The integer digit data of the first rainfall data is a1, and the decimal digit data is a2. The integer digit data of the second rainfall data is b1, and the decimal digit data is b2. The integer digit data of the third rainfall data is c1, and the decimal digit data is c2.
[0077] For example, the content of the original byte stream starting from the highest bit is determined to be 010501230293, and the corresponding bit stream is 10000010100000001001000110000001010010011. The first compressed rainfall string is determined to start from the highest bit. The 3-bit data from data bit R1 to data bit R3 of the first compressed rainfall string is 100, and the corresponding decimal result is 4, which is min. Data bit R4 is 0, so a1=0+min=4 is determined. Data bit R5 is 0, so b1=0+min=4 is determined. Data bit R6 is 0, so c1=0+min=4 is determined. Data bit R7 to data bit R 16 The 10-bit data is 1010000000, and the corresponding decimal result is 640, so a2=6, b2=4, and c2=0 are determined. The three rainfall data corresponding to the first compressed rainfall string are 4.6, 4.4, and 4.0 (all in mm).
[0078] After parsing the first compressed rainfall string, continue parsing the next compressed rainfall string. The 3-bit data from data bit R1 to data bit R3 of the next compressed rainfall string is also 100, so min = 4. Data bit R4 to data bit R6 are 100, so it is determined that a1 = 1 + min = 5, b1 = 0 + min = 4, and c1 = 0 + min = 4. Data bit R7 to data bit R 16 The 10-bit data is 0110000001, and the corresponding decimal result is 385, so a2=3, b2=8, c2=5 are determined. The three rainfall data corresponding to the second compressed rainfall string are 5.3, 4.8 and 4.5 (all in mm). The data analysis is continued in this way.
[0079] Corresponding to the data compression method, in most cases, the 3-bit data from data position R1 to data position R3 in the compressed rainfall string is 000-110, that is, the decimal result corresponding to the 3-bit data from data position R1 to data position R3 in the compressed rainfall string is less than or equal to 6, and the data is parsed according to the above embodiment. However, in some special cases, the 3-bit data from data position R1 to data position R3 in the compressed rainfall string is parsed to be 111, and the corresponding decimal result is 7. At this time, the decimal result corresponding to the 3-bit data from data position R1 to data position R3 is no longer taken as min, but the following data parsing method is used to compress any data position R1 of the rainfall string. j Represents any j-th bit from high to low, 1≤j≤23:
[0080] Compress the data bit R4 to data bit R in the rainfall string 13The decimal result corresponding to the 10-bit data is used as the integer bit concatenation result A, and the data bit R in the compressed rainfall string is 14 To data bit R 23 The decimal result corresponding to the 10-bit data is taken as the decimal concatenation result B. Then determine a1=(a / 100)%10, b1=(A / 10)%10, c1=A%10 and a2=(B / 100)%10, b2=(B / 10)%10, c2=B%10, and sort out the first rainfall data, the second rainfall data and the third rainfall data from front to back in the observation time sequence, the integer data of the first rainfall data is a1, the decimal data is a2, the integer data of the second rainfall data is b1, the decimal data is b2, the integer data of the third rainfall data is c1, the decimal data is c2.
[0081] For example, in the process of parsing the bit stream corresponding to the original byte stream, after parsing a compressed rainfall string, the remaining unparsed bit stream content is 111000001011001001010100011000100, then it is determined that the 3-bit data from data bit R1 to data bit R3 is 111, and then the data bits R4 to R4 are read. 13 The 10-bit data is 0000010110, and the corresponding decimal result is 22, which is the integer bit concatenation result A. Therefore, a1=0, b1=2, c1=2 are determined. Read data bit R 14 To data bit R 23 The 10-bit data is 0100101010, and the corresponding decimal result is 298, which is the decimal concatenation result B. Therefore, a2=2, b2=9, c2=8 are determined, and the three rainfall data are analyzed to be 0.2, 2.9 and 2.8 respectively (all in mm).
[0082] Corresponding to the above incremental transmission mechanism, in the above step 320, the valid byte stream is not directly used as the original byte stream, but is divided into two cases:
[0083] 1. For the valid byte stream contained in the Beidou short message data received as the reference message data at every predetermined time interval, the valid byte stream P is directly used as the original byte stream P, which is similar to the transmission part and will not be described in detail in this embodiment.
[0084] 2. For any valid byte stream contained in any set of Beidou short message data received between any two adjacent sets of reference message data Execute the following steps (1) to (7) to determine the original byte stream Q:
[0085] (1) Extracting valid byte stream The decimal result of the highest bit of the word length byte that occupies one byte is the total number of bytes Len.
[0086] (2) Extracting valid byte stream The byte stream starting from the second byte in the middle high position and occupying a total of Len bytes is used as the reference byte stream E' to extract the valid byte stream The remaining byte stream in is used as the reference byte stream F.
[0087] (3) The reference byte stream E′ is converted into a bit stream form to obtain a reference bit stream E containing K bits, where K is the total number of bytes of the valid byte stream contained in each group of Beidou short message data.
[0088] (4) Initialize integer parameter k=1.
[0089] (5)When E k = 0, take byte P k As any k-th byte Q from high to low in the original byte stream Q k . When E k = 1, take the highest byte that has not been taken in the reference byte stream F as any kth byte Q from high to low in the original byte stream Q k , Byte P k It is any k-th byte from high to low in the original byte stream P in the most recent set of reference message data received.
[0090] (6) When k<K, set k=k+1 and execute step (5) again.
[0091] (7) When k=K, it is determined that the original byte stream Q is extracted.
[0092] Corresponds to Figure 3 In one example, the original byte stream P in the most recent set of received reference message data is as follows: Figure 3 As shown, the valid byte stream obtained Extract the first word length byte as 04 and determine the corresponding decimal result as 4, that is, the total number of bytes Len = 4. Then extract the valid byte stream The byte stream starting from the second byte of the high-order bit and occupying 4 bytes is used as the reference byte stream E′, which is 40084002. The remaining byte stream is the reference byte stream F, which is 04021575. The reference byte stream E′ is converted into a bit stream form to obtain a reference bit stream E=01000000000010000100000000000010.
[0093] Since E1 = 0, we take Q1 = P1 = 01. Continue traversing, since E2 = 1, we take the highest byte 04 in the reference byte stream F to get Q2 = 04. Continue traversing, since E3 = 0, we take Q3 = P3 = 01, and so on, so that we can parse and get Figure 3 The raw byte stream Q is shown.
[0094] Corresponding to the coding used in the transmission of meteorological data, the method of decoding the Beidou short message data to obtain a valid byte stream in step 310 includes:
[0095] (1) The high-order bits of the Beidou short message data are padded with zeros, and 177 bytes of 0 are added to obtain a zero-padded message data containing 255 bytes.
[0096] (2) After decoding the zero-filled message data using the RS (255, 251) encoding and decoding algorithm, remove the 0s in the high-order 177 bytes and intercept the low-order 78 bytes to obtain the decoded data.
[0097] (3) Extract the high 74 bytes of the decoded data to obtain the check data.
[0098] (4) When the XOR check result of the upper 73 bytes of the check data is the same as the check byte of the lowest 1 byte of the check data, it is determined that the check has passed and the upper 73 bytes of the check data are extracted to obtain a valid byte stream; otherwise, it is determined that the check has failed and the Beidou short message data is discarded. The automatic weather station can be informed to resend it later through the Beidou short message.
[0099] By adding RS coding, the receiving central station can correct up to 2 bytes of data errors when receiving Beidou short message data.
[0100] The above are only preferred embodiments of the present application, and the present application is not limited to the above embodiments. It is understood that other improvements and changes directly derived or associated by those skilled in the art without departing from the spirit and concept of the present application should be considered to be included in the protection scope of the present application.
Claims
1. A meteorological data transmission method based on Beidou short message communication, characterized in that: The meteorological data transmission method comprises: Perform data compression processing on N continuously observed rainfall data in decimal form to form a compressed rainfall string R in binary form, each rainfall data in decimal form includes one integer bit data and one decimal bit data, the high-order data string in the compressed rainfall string R matches the integer bit data of each rainfall data, the low-order data string in the compressed rainfall string R matches the decimal bit data of each rainfall data, and the number of bits occupied by each compressed rainfall string R is less than 7*N, and the integer parameter N≥2; The multiple compressed rainfall strings R formed by sequentially processing according to the observation time sequence are concatenated to obtain the original byte stream and determine the valid byte stream; Encoding the valid byte stream to form Beidou short message data and sending the Beidou short message data; N=3, and the integer digits of the three rainfall data observed in sequence from the beginning to the end of the observation time sequence are a1, b1, and c1 respectively, and the decimal digits of the three rainfall data observed in sequence from the beginning to the end of the observation time sequence are a2, b2, and c2 respectively; The three rainfall data are compressed to form a compressed rainfall string R including: When a1-min≤1 and b1-min≤1 and c1-min≤1 and min≤6, the three rainfall data are compressed to form a compressed rainfall string R occupying 16 bits, and any data bit R of the compressed rainfall string is used. i represents any i-th bit from high to low, 1≤i≤16, wherein: the high-order data string in the compressed rainfall string includes data bits R1 to R6 and matches the integer bit data of the three rainfall data, and the highest 3 bits of data bits R1 to R3 are the binary results corresponding to the minimum value min among a1, b1 and c1, data bit R4 is the decimal result of a1-min, data bit R5 is the decimal result of b1-min, and data bit R6 is the decimal result of c1-min; the low-order data string in the compressed rainfall string includes data bits R7 to R8. 16 10-bit data, the low-order data string is the binary result corresponding to the decimal splicing result B of the three rainfall data and is obtained by filling the high-order zero when the bit width is insufficient, and the decimal splicing result B is the decimal result formed by splicing the decimal data a2, b2 and c2 of the three rainfall data from high to low in sequence; Otherwise, the three rainfall data are compressed to form a compressed rainfall string R occupying 23 bits, and any data bit R of the compressed rainfall string is used as j represents any j-th bit from high to low, 1≤j≤23, wherein: the highest 3 bits of data bits R1 to R3 in the compressed rainfall string are 111, and the highest 3 bits of data bits R4 to R5 in the compressed rainfall string are 111. 13 The middle 10-bit data is the binary result corresponding to the integer bit concatenation result A of the three rainfall data and is obtained by filling the high bit with zero when the bit width is insufficient. The data bits R14 to R14 in the compressed rainfall string are 23 The lowest 10 bits of data are the binary result corresponding to the decimal bit splicing result B of the three rainfall data and are obtained by filling the high bits with zeros when the bit width is insufficient; the integer bit splicing result A is the decimal result formed by splicing the integer bit data a1, b1 and c1 of the three rainfall data in sequence from high to low bits; The determining of the valid byte stream comprises: for the original byte stream contained in the Beidou short message data as the reference message data sent at every predetermined time interval, directly using the original byte stream as the valid byte stream; for the original byte stream Q contained in any group of Beidou short message data sent between any two adjacent groups of reference message data, executing the following steps (1) to (5): (1) Initialize integer parameter k = 1: (2) When Q k With P k When they are equal, determine E k =0, byte Q k is any kth byte from high to low in the original byte stream Q, byte P k is any kth byte from high to low in the valid byte stream P in the most recent set of reference message data sent, E k represents any k-th bit from high to low in the reference bit stream E; (3) When Q k With P k If they are not equal, determine E k =1, byte Q k The least significant byte added to the reference byte stream F; (4) When k<K, let k=k+1 and compare Q again k With P k To update the reference bit stream E and the reference byte stream F, K is the total number of bytes of the valid byte stream contained in each group of Beidou short message data; (5) When k=K, convert the reference bit stream E into a byte stream form to obtain a reference byte stream R′, and determine the total number of bytes Len occupied by the reference byte stream E′, and obtain a valid byte stream Q, which is a word length byte, a reference byte stream E′, and a reference byte stream F, starting from the high bit. The word length byte occupies one byte and is the binary result of the total number of bytes Len; The valid byte stream includes 73 bytes, and the valid byte stream is encoded to form Beidou short message data: the valid byte stream is XOR-checked to obtain a 1-byte check byte and added to the low bit of the valid byte stream to obtain check data containing 74 bytes; the high bit of the check data is padded with zeros to obtain padded check data containing 251 bytes; the padded check data is encoded using the RS (255, 251) encoding and decoding algorithm to obtain coded data containing 255 bytes; the lower 78 bytes of the coded data are intercepted to obtain the Beidou short message data.
2. A meteorological data analysis method based on Beidou short message communication, characterized in that: The meteorological data analysis method comprises: Receive Beidou short message data and decode the Beidou short message data to obtain a valid byte stream; Determine an original byte stream according to the valid byte stream, wherein the original byte stream is obtained by sequentially splicing data of multiple compressed rainfall strings R according to the observation time sequence; Parsing the original byte stream, determining that the highest data bit of the bit stream corresponding to the original byte stream starts with the first compressed rainfall string R, parsing the high-order data string in the compressed rainfall string R to obtain integer bit data of N rainfall data, parsing the low-order data string in the compressed rainfall string to obtain decimal bit data of N rainfall data, and the integer parameter N≥2; Complete data parsing for a compressed rainfall string R and sort out the N decimal rainfall data corresponding to the compressed rainfall string R that are observed successively in the observation time sequence, each rainfall data includes a corresponding integer bit data and a decimal bit data; perform data parsing for the next compressed rainfall string R in turn until data parsing for all compressed rainfall strings R is completed; The data parsing of the original byte stream includes: determining that the data bit of the highest bit of the bit stream corresponding to the original byte stream starts as the data bit R1 of the first compressed rainfall string, and using the decimal result corresponding to the 3-bit data of the data bit R1 to the data bit R3 in the compressed rainfall string as the minimum value min of the integer bit data of the three rainfall data; using the decimal addition result of the data of the data bit R4 in the compressed rainfall string and the minimum value min as the integer bit data a1 of the first rainfall data, using the decimal addition result of the data of the data bit R5 in the compressed rainfall string and the minimum value min as the integer bit data b1 of the second rainfall data, using the decimal addition result of the data of the data bit R6 in the compressed rainfall string and the minimum value min as the integer bit data c1 of the third rainfall data, and using the decimal addition result of the data of the data bit R7 to the data bit R8 in the compressed rainfall string as the integer bit data c1 of the third rainfall data. 16 The decimal result corresponding to the 10-bit data is taken as the decimal concatenation result B, and a2=(B / 100)%10, b2=(R / 10)%10, c2=R%10 are determined and sorted to obtain the first rainfall data, the second rainfall data and the third rainfall data from the front to the back according to the observation time sequence. The integer bit data of the first rainfall data is a1 and the decimal data bit is a2, the integer bit data of the second rainfall data is b1 and the decimal data bit is b2, and the integer bit data of the third rainfall data is c1 and the decimal data bit is c2; wherein, any data bit R of the compressed rainfall string i It represents any i-th bit from high to low, 1≤i≤16, and the symbol % represents the remainder; The method of arranging and obtaining three decimal rainfall data corresponding to a compressed rainfall string R comprises: when the decimal result corresponding to the 3-bit data of data bit R1 to data bit R3 in the compressed rainfall string is less than or equal to 6, executing the step of using the decimal result corresponding to the 3-bit data of data bit R1 to data bit R3 in the compressed rainfall string as the minimum value min of the integer bit data of the three rainfall data; otherwise, when it is determined that the 3-bit data of data bit R1 to data bit R3 in the compressed rainfall string is 111 and the corresponding decimal result is 7, using the decimal result corresponding to the 3-bit data of data bit R1 to data bit R3 in the compressed rainfall string as the minimum value min of the integer bit data of the three rainfall data. 13 The decimal result corresponding to the 10-bit data is used as the integer bit concatenation result A, and the data bit R in the compressed rainfall string is converted into 14 To data bit R 23 The decimal result corresponding to the 10-bit data is taken as the decimal concatenation result R; determine a1=(A / 100)%10, b1=(A / 10)%10, c1=A%10 and a2=(B / 100)%10, b2=(B / 10)%10, c2=B%10, and sort out the first rainfall data, the second rainfall data and the third rainfall data from front to back according to the observation time sequence, the integer bit data of the first rainfall data is a1, the decimal data bit a2, the integer bit data of the second rainfall data is b1, the decimal data bit b2, the integer bit data of the third rainfall data is c1, the decimal data bit c2; wherein, any data bit R of the compressed rainfall string j Represents any j-th bit from high to low, 1≤j≤23; The determining of the original byte stream according to the valid byte stream comprises: for the valid byte stream contained in the Beidou short message data received as the reference message data at every predetermined time interval, directly using the valid byte stream as the original byte stream; for the valid byte stream contained in any group of Beidou short message data received between any two adjacent groups of reference message data Perform the following steps (1) to (7): (1) Extracting valid byte stream The decimal result of the highest bit of the word length byte that occupies one byte is the total number of bytes Len; (2) Extracting valid byte stream The byte stream starting from the second byte in the middle high position and occupying a total of Len bytes is used as the reference byte stream R' to extract the valid byte stream The remaining byte stream in is used as the reference byte stream F; (3) Convert the reference byte stream E′ into a bit stream form to obtain a reference bit stream E containing K bits, where K is the total number of bytes of the valid byte stream contained in each group of Beidou short message data; (4) Initialize integer parameter k=1; (5)When E k = 0, take byte P k As any k-th byte Q from high to low in the original byte stream Q k ; when E k = 1, take the highest byte in the reference byte stream that has not been taken as any kth byte Q from high to low in the original byte stream Q k , Byte P k It is any kth byte from high to low in the original byte stream P in the most recent set of received reference message data; (6) When k<K, set k=k+1 and execute step (5) again; (7) When k=K, it is determined that the original byte stream Q is extracted; The decoding of the Beidou short message data to obtain a valid byte stream includes: padding the high bits of the Beidou short message data with zeros to obtain zero-padded message data containing 255 bytes, decoding the zero-padded message data using the RS (255, 251) encoding and decoding algorithm, intercepting the lower 78 bytes to obtain decoded data, intercepting the upper 74 bytes of the decoded data to obtain verification data, and when the XOR check result of the upper 73 bytes of the verification data is the same as the check byte of the lowest 1 byte of the verification data, determining that the check is passed and extracting the upper 73 bytes of the verification data to obtain the valid byte stream, otherwise determining that the check is not passed and discarding the Beidou short message data.
Citation Information
Patent Citations
Remote sensing satellite service data structure construction method based on Beidou satellite constellation
CN116054925A
Remote meteorological monitoring system based on Beidou RDSS protocol
CN116125558A