Dam safety Beidou short message submission data coding method and device
By performing binary encoding and floating-point data encoding on the dam safety monitoring data at the Beidou short message sending end, combined with ASCII encoding and data encryption, the problems of high bit error rate and redundant data in the transmission of dam safety monitoring data are solved. It realizes data transmission with simple coding, small space occupation and low bit error rate, and is suitable for different types of dam safety observation data.
Patent Information
- Application Number
- CN202410805193.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-08-23
AI Technical Summary
The existing technology lacks effective data encoding technology in the transmission of dam safety monitoring data, resulting in the failure to fully utilize Beidou's short message transmission capabilities and the problems of high bit error rates and redundant data.
A dam safety Beidou short message reporting data encoding method is adopted. The dam safety monitoring data is converted into defined structure information at the Beidou short message sending end, and a computer program is used for binary encoding, combining ASCII encoding and floating point numbers. Data encoding uses data encryption and lossless compression methods to ensure simple encoding, small footprint and low bit error rate.
It realizes data transmission with simple coding, small space occupation and low bit error rate, making full use of the transmission capabilities of Beidou short message to ensure the accurate transmission of dam safety monitoring data, and is suitable for different types of dam safety observation data.
Smart Images

Figure CN118540664A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Beidou short message data coding, and more specifically, to a Beidou short message reporting data coding method and device for dam safety. Background Art
[0002] The BeiDou short message system plays an important role in emergency communications. It has the characteristics of high reliability and wide coverage. Especially in the case of emergency communication interruption, BeiDou short messages can achieve safe and stable two-way communication without relying on ground communication facilities. The short message communication capability of BeiDou-3 has been further improved compared with BeiDou-2. The maximum length of its short message communication service is 14,000 bits, which is equivalent to about 1,000 Chinese characters. When the communication level is level 3, 3,883 bits of data can be transmitted at a time, which is about 277 Chinese characters.
[0003] Most hydropower stations are located in remote areas, and communications are easily affected by extreme weather and natural disasters. In emergency conditions where communications are interrupted, BeiDou-3 short message emergency communications can ensure the complete, timely, and accurate transmission of dam safety monitoring data, providing important support for dam safety. However, due to the limited transmission capacity of BeiDou short message information and the large amount of dam safety monitoring information data, BeiDou short message communication has certain limitations in the application of dam safety monitoring data reporting.
[0004] At present, the research on the transmission of dam safety Beidou short message data mainly focuses on Chinese character encoding compression, which is used to increase the information transmission volume of Beidou short messages. However, there is a lack of data encoding technology support in the field of dam safety monitoring information data transmission. Summary of the invention
[0005] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a dam safety Beidou short message reporting data encoding method and device, which has the advantages of simple encoding, small space occupation and low bit error rate.
[0006] The object of the present invention is achieved through the following solutions:
[0007] A dam safety Beidou short message reporting data encoding method comprises the following steps:
[0008] S1, obtain dam safety monitoring data and convert the dam safety monitoring data into definition structure information at the Beidou short message sending end;
[0009] S2, in the processor of the Beidou short message sending end, using a computer program to convert the defined structure information into binary code.
[0010] Furthermore, after step S2, the method further includes the following steps: for the binary code, using data encryption and / or data lossless compression methods to perform confidential transmission and spatial compression, so as to further improve the Beidou short message data transmission capability.
[0011] Furthermore, after step S2, the method further comprises the following steps:
[0012] S3, when the Beidou short message receiving end receives the dam safety monitoring data information sent by the Beidou short message sending end, it decodes and converts it.
[0013] Furthermore, the definition structure information includes a file header information definition: the file header information is defined as the dam name, observation date, number of bytes of the measuring point number, number of bytes of the measuring point data and a separator.
[0014] Furthermore, in the definition structure information, the measuring point number and data definition are included: the measuring point number is composed of an observation code and a sequence number, the observation code is composed of two uppercase English letters ASCII, and is defined as follows: the vertical line is PL, the inverted vertical line is IP, the precision level is LD, the static level is SL, the deformation observation pier is TS, the vacuum laser alignment LA, the steel pipe mark SP, the bimetallic mark DS, the tension line EX, the crack meter LF, the joint meter CF, the dislocation meter WC, the multi-point displacement meter MS, the inclinometer hole IN, the water measuring weir WE, the pressure tube UP, the piezometer PE, the water level hole OH, and the thermometer TD; the sequence number is composed of two digits ASCII, encoded from 00 to 99, and combined with an observation code to represent 100 different measuring points. If the number of measuring points is greater than 100, the sequence number is adjusted to a three-digit number 000-999;
[0015] The data is represented by two bytes with a total of 16 bits. The first eight bits are the sign bit and the integer part, and the last eight bits are the decimal part. The first bit is the positive and negative sign bit, 0 represents "+" and 1 represents "-". The second to eighth bits are the values, and the data from the eighth to the second bit represent 2 0 , 2 1 , 2 2 , 2 3 , 2 4 , 2 5 , 2 6 ; The ninth to sixteenth digits are decimals, representing the value of 1 / 2 1 , 1 / 2 2 , 1 / 2 3 , 1 / 2 4 , 1 / 2 5 , 1 / 2 6 , 1 / 2 7 , 1 / 2 8; Two bytes represent floating-point data between ±63. If the observed data exceeds this range, add one byte after the eighth bit of data, that is, add eight bits of data. The first to sixteenth bits are sign bits and integer data, and the seventeenth to twenty-fourth bits are decimal data.
[0016] Furthermore, the definition structure information includes separator definitions: the separators include a coding start character, separator 1, separator 2, separator 3, separator 4 and a coding end character; the coding start character is "<"; separator 1 is "#", separator 1 separates the dam name information from the observation time; separator 2 is " / ", separator 2 separates the observation time from the measuring point coding byte definition; separator 3 is ":", separator 3 separates the measuring point number from the corresponding measuring point data and the measuring point data from the measuring point data; separator 4 is "space", separator 4 separates different measuring point coding information; the coding end character uses ">".
[0017] Furthermore, the definition structure information also includes the measurement point data size definition: the measurement point data size definition includes the measurement point number byte and the data byte, the measurement point number byte is 4, including a 2-byte measurement point observation code and a 2-byte sequence number; if the number of measurement points for a certain observation is greater than 100, the sequence number is defined as 3, indicating 1000 measurement points; the data byte is defined as 2, indicating floating point data between -63 and 63. If the observation data is outside this range, the data byte definition is adjusted according to the data size.
[0018] Furthermore, if a measuring point includes multiple measurement components, the data are listed in sequence after the measuring point number and connected with “:”.
[0019] Further, in step S3, after the Beidou short message receiving end receives the dam safety monitoring data information sent by the Beidou short message sending end, it decodes and converts it, which specifically includes the following sub-steps:
[0020] Firstly, the binary coded data is converted into plain text character data, and then the character data is converted into dam safety monitoring data for storage;
[0021] Then, the binary data decoding adopts the combination of ASCII decoding and defined measuring point data decoding, which specifically includes: when the ASCII decoding obtains the ":" character, it indicates that the following is the measuring point data, and the decoding is performed according to the number of measuring point data bytes defined in the file header information; there are clear separation characters between each information end, which are used for comparison and confirmation during the decoding process. When the ASCII decoding obtains any of the characters "<", "#", " / ", ":", "space" and ">", the previous and subsequent data are compared to see whether they meet the character connection requirements, and except for ":", the subsequent data decoding of other separation characters is ASCII decoding to ensure the accuracy of the decoding process;
[0022] Finally, after the character data is decoded, it is converted into dam safety monitoring data according to the defined encoding method. The defined measuring point number is compared with the actual measuring point number of the dam and converted against the measuring point coding table to finally obtain the real observation data.
[0023] A dam safety Beidou short message reporting data encoding device includes a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is loaded by the processor, any of the methods described above is executed.
[0024] The beneficial effects of the present invention include:
[0025] (1) The coding of the present invention is simple, and only includes two types: the traditional ASCII coding and the floating point data coding defined in the present invention.
[0026] (2) The present invention occupies little space. The present invention uniformly encodes the measurement point numbers, which is concise and intuitive and occupies less space; a set of exclusive encoding methods is specifically defined for the measurement point data, which can make full use of the transmission capacity of Beidou short messages.
[0027] (3) The encoding process of the present invention is controllable and has a low bit error rate. The method of the present invention uses segmentation and control characters to control the encoding process. Different information segments have different segmentation characters, and only after the ":" there is floating point encoded data. The decoding process can be strictly checked according to the control characters, and the encoding can be checked according to the character prompts to ensure that the information transmission is accurate.
[0028] (4) The present invention is compatible with different types of dam safety observation data, and the corresponding coding length can be adjusted for different types of dam safety monitoring data.
[0029] (5) The present invention adopts a method combining the traditional ASCII coding overall structure and the custom observation data coding to reduce the size of the coding space and improve the Beidou short message dam safety monitoring information reporting capability.
[0030] (6) The present invention uses code segmentation and control symbols, and each information segment has a dedicated character for segmentation and control to ensure the correctness of the encoding and decoding verification. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0032] Figure 1 The data encoding and decoding flow chart of the present invention;
[0033] Figure 2 This is a data encoding structure diagram of the present invention. DETAILED DESCRIPTION
[0034] All features disclosed in all embodiments in this specification, or steps in all methods or processes implicitly disclosed, except for mutually exclusive features and / or steps, can be combined and / or expanded or replaced in any manner.
[0035] The present invention aims to solve the following technical problems: the existing data encoding technology is not customized for dam safety monitoring data, so its applicability is limited to a certain extent, and due to the limitation of Beidou short message data transmission capacity, the traditional data encoding method cannot fully utilize the information transmission capacity of Beidou short message, and there is a lot of redundant data. Therefore, considering the Beidou short message data transmission capacity and the characteristics of dam safety monitoring data, a new data encoding method is conceived and compiled. In a preferred implementation, Figure 1 and Figure 2 As shown, the specific implementation process is as follows:
[0036] The present invention performs binary encoding on the dam safety monitoring related data, mainly including four encoding information of file header identifier, separator, measuring point number and monitoring data, and uses binary 0 or 1 to represent the above-mentioned English letters, special characters and numbers. The conceptual scheme of the present invention includes the processes of file header information definition, measuring point number and data definition, separator definition, data encoding and data decoding after Beidou short message transmission.
[0037] The file header information consists of information related to the dam name, data observation date, number of bytes of the measurement point number, number of data bytes and separators. The file header information is encoded in ASCII encoding, which converts letters, numbers and characters into binary for encoding.
[0038] The information related to the dam name is the first letter of the dam in capital letters, such as SDZ for "Hydropower Station", which is then ASCII-encoded. Its binary code is 01010011 01000100 01011010, occupying 3 bytes. The data observation date is composed of 2-digit year plus 2-digit month and 2-digit date ASCII code. For example, May 20, 2024 is 240520, and its binary code is 0011001000110100 00110000 00110101 00110010 00110000, occupying 6 bytes. The number of bytes of the measuring point number is represented by one byte of ASCII, followed by the number of bytes occupied by the measuring point data encoded in one byte of ASCII.
[0039] The measuring point number consists of an observation code plus a sequence number. The observation code is encoded in two English letters in ASCII, such as PL for the vertical line, IP for the inverted line, LD for the precision level, SL for the static level, TS for the deformation observation pier, LA for the vacuum laser alignment, SP for the steel pipe mark, DS for the bimetallic mark, EX for the tension line, LF for the crack gauge, CF for the joint gauge, WC for the dislocation gauge, MS for the multi-point displacement gauge, IN for the incline hole, WE for the water measuring weir, UP for the pressure gauge, PE for the piezometer, OH for the water level hole, and TD for the thermometer. The sequence number consists of two digital ASCII codes, ranging from 00 to 99, which can be expanded according to the number of measuring points and the number of bytes of the sequence number can be increased. For example, IP01 is represented as 01001001 0101000000110000 00110001, occupying 4 bytes. In order to facilitate the encoding and transmission of Beidou short messages, the measuring point number can be different from the safety monitoring number of the hydropower station, and only one-to-one correspondence is required to ensure the normal execution of encoding and decoding.
[0040] The data of the measuring point is composed of integer + decimal. The integer is set according to the size of the observed data. For example, for conventional deformation observation, the integer part is represented by 8-bit binary data. Taking into account the positive and negative nature of the observed data, the positive and negative representation of the observed data is consistent with the dam safety monitoring. The negative number representation of the method of the present invention is different from the traditional complement coding. It only uses one positive and negative identification + data original code. That is, the first bit 0 of the integer part of the observed data represents "+", 1 represents "-", and the second to eighth bits are numerical values. 8-bit data can represent data between ±63. If the observed data is outside this range, an additional byte of space is added to represent the integer part of the data. The decimal part is represented by eight-bit binary data, and the numerical value of the first to eighth bits is 1 / 2 n , that is, the eighth bit of data represents 1 / 256, which is 0.00390625, which is the precision of the decimal represented by this method. The measurement point data consists of signed integers and unsigned decimals. For example, the code of 5.125 is 10000101 00100000, which occupies two bytes.
[0041] The separator is a character between real coding information. To ensure that the coding is carried out normally and correctly, it has the function of verifying the correctness of the coding and prompting the character coding method. The separator adopts characters such as / , #, :, space, <, > in ASCII, and the corresponding ASCII codes are 00101111, 00100011, 00111010, 00100000, 00111100, 00111110. The start character of the coding method of the present invention is "<", the dam information and the observation time are connected by "#", the observation time and the measuring point number prompt are separated by " / ", the measuring point number and the corresponding measuring point data, the measuring point data and the measuring point data (if a measuring point contains multiple measured value components, the data can be listed in sequence after the measuring point number, and connected with ":") are connected by ":", and the information of different measuring points is separated by "space", and the end character is ">".
[0042] Data decoding. When the Beidou short message receiving end receives the dam safety monitoring information sent by the sending end, it decodes and converts it. First, the binary coded data is converted into plain text character data, and then the character data is converted into dam safety monitoring data for storage. Binary data decoding adopts a method combining ASCII decoding and the measurement point data decoding defined in the present invention. When the ASCII decoding obtains the ":" character, it indicates that the measurement point data is followed, and then the decoding is performed according to the number of measurement point data bytes defined by the file header information. There are clear separation characters between each information end of the present invention, which can be compared and confirmed during the decoding process. When ASCII decoding obtains characters such as "<", "#", " / ", ":", "space" and ">", it can be compared to see whether the previous and next data meet the character connection requirements, and except for ":", the subsequent data decoding of other separation characters is ASCII decoding, which can ensure the accuracy of the decoding process. After the character data is decoded, it can be converted into dam safety monitoring data according to the defined encoding method, and the measurement point number defined in the present invention is compared and converted with the actual measurement point number of the dam in accordance with the measurement point coding table, and finally the real observation data is obtained.
[0043] In other implementations, the method of the present invention includes file header information definition, separator definition, measurement point data size definition, measurement point number and data definition, data encoding and decoding.
[0044] 1. The file header information is defined as the dam name, observation date, measurement point number and the number of measurement point data bytes.
[0045] 2. The delimiters include the coding start character, delimiter 1, delimiter 2, delimiter 3, delimiter 4 and coding end character. The coding start character is “<”; delimiter 1 is “#”, which separates the dam name information from the observation time; delimiter 2 is “ / ”, which separates the observation time from the measurement point coding byte definition; delimiter 3 is “:”, which separates the measurement point number from the corresponding measurement point data and the measurement point data from the measurement point data (if a measurement point contains multiple measurement value components, the data can be listed in sequence after the measurement point number and connected with “:”); delimiter 4 is “space”, which separates the coding information of different measurement points; the coding end character is “>”.
[0046] 3. The measurement point data size definition includes the measurement point number byte and the data byte. The measurement point number byte is 4, including a 2-byte measurement point observation code and a 2-byte sequence number. If the number of measurement points for a certain observation is greater than 100, the sequence number is defined as 3, which can represent 1000 measurement points. The data byte is defined as 2, which can represent floating point data between -63 and 63. If the observation data is outside this range, the data byte definition is adjusted according to the data size.
[0047] 4. Measuring point number and data definition. The measuring point number consists of an observation code and a sequence number. The observation code consists of two uppercase English letters ASCII, and is defined as follows: PL for the vertical line, IP for the inverted line, LD for the precision level, SL for the static level, TS for the deformation observation pier, LA for the vacuum laser alignment, SP for the steel pipe mark, DS for the bimetallic mark, EX for the tension line, LF for the crack gauge, CF for the seam gauge, WC for the dislocation gauge, MS for the multi-point displacement gauge, IN for the inclinometer hole, WE for the water measuring weir, UP for the pressure gauge, PE for the piezometer, OH for the water level hole, and TD for the thermometer. The sequence number consists of two digits ASCII, encoded from 00 to 99, and can represent 100 different measuring points in combination with an observation code. If the number of measuring points is greater than 100, the sequence number is adjusted to 3 digits, 000 to 999. The data is represented by two bytes with a total of 16 digits, the first eight digits are the sign bit and the integer part, and the last eight digits are the decimal part. The first bit is the positive or negative sign bit, 0 represents "+" and 1 represents "-"; the second to eighth bits are values, and the data from the eighth to the second bit represent 2 0 , 2 1 , 2 2 , 2 3 , 2 4 , 2 5 , 2 6 ; The ninth to sixteenth digits are decimals, representing the value of 1 / 2 1 , 1 / 2 2 , 1 / 2 3 , 1 / 2 4 , 1 / 2 5 , 1 / 2 6 , 1 / 2 7 , 1 / 2 8 Two bytes can represent floating point data between ±63. If the observed data exceeds this range, one byte can be added after the eighth bit of data, that is, eight bits of data are added. The first to sixteenth bits are the sign bit and integer data, and the seventeenth to twenty-fourth bits are decimal data.
[0048] 5. Data coding. According to the above 1 to 4, the dam safety monitoring data is converted into binary code. For example, the following information:
[0049] Hydropower station May 20, 2024 Measurement point number 4 bytes data 2 bytes Inverted measuring point IP01 left and right bank displacement -1.25mm upstream and downstream displacement 2.10mm static leveling measuring point SL01 settlement 6.23mm precision leveling measuring point LD01 settlement 5.08mm.
[0050] The converted structure information defined in the present invention is:<SDZ#240520 / 42 / IP01:-1.25:2.10SL01:6.23LD01:5.08> .
[0051] The binary encoding is: 00111100 01010011 01000100 01011010 00100011 00110010 0011010000110000 00110101 00110010 00110010 00110000 00101111 00110100 00110010 0010111101001001 01010000 00110000 00110001 00111010 10000001 01000000 001110100000 00111010000 01001100 00110000 00110001 0011101000000110 00111010 00100000 01001100 01000100 00110000 00110001 0011101000000101 00010100 00111110
[0053] The above code has 42 bytes in total.
[0054] 6. Decoding. Data decoding is the reverse step of step 5. The overall decoding idea is to combine ASCII code comparison with observation data decoding. When the decoding encounters the separator ":", the subsequent information adopts the decoding method of observation data encoding in step 4, combined with the file header information to define the size of the decoded data byte definition.
[0055] 7. In an optional implementation, data encryption and lossless data compression methods can be used to perform confidential transmission and space compression to further improve the Beidou short message data transmission capability.
[0056] It should be noted that within the scope of protection defined in the claims of the present invention, the following embodiments can be combined and / or expanded or replaced in any logical way from the above specific implementation methods, such as disclosed technical principles, disclosed technical features or implicitly disclosed technical features.
[0057] Example 1
[0058] A dam safety Beidou short message reporting data encoding method comprises the following steps:
[0059] S1, obtain dam safety monitoring data and convert the dam safety monitoring data into definition structure information at the Beidou short message sending end;
[0060] S2, in the processor of the Beidou short message sending end, using a computer program to convert the defined structure information into binary code.
[0061] Example 2
[0062] On the basis of Example 1, after step S2, the step is further included: the binary code is subjected to confidential transmission and spatial compression using data encryption and / or data lossless compression methods to further improve the Beidou short message data transmission capability.
[0063] Example 3
[0064] On the basis of embodiment 1, after step S2, the following steps are further included:
[0065] S3, when the Beidou short message receiving end receives the dam safety monitoring data information sent by the Beidou short message sending end, it decodes and converts it.
[0066] Example 4
[0067] On the basis of Example 1, the definition structure information includes the file header information definition: the file header information is defined as the dam name, observation date, number of bytes of the measuring point number, number of bytes of the measuring point data and a separator.
[0068] Example 5
[0069] On the basis of Embodiments 1 to 3, the definition structure information includes the measuring point number and data definition: the measuring point number is composed of an observation code and a sequence number, the observation code is composed of two uppercase English letters ASCII, and is defined as follows: the vertical line is PL, the inverted vertical line is IP, the precision level is LD, the static level is SL, the deformation observation pier is TS, the vacuum laser alignment LA, the steel pipe mark SP, the bimetallic mark DS, the tension line EX, the crack meter LF, the joint meter CF, the dislocation meter WC, the multi-point displacement meter MS, the inclinometer hole IN, the water measuring weir WE, the pressure tube UP, the piezometer PE, the water level hole OH, and the thermometer TD; the sequence number is composed of two digits ASCII, encoded from 00 to 99, and combined with an observation code to represent 100 different measuring points. If the number of measuring points is greater than 100, the sequence number is adjusted to a three-digit number 000-999;
[0070] The data is represented by two bytes with a total of 16 bits. The first eight bits are the sign bit and the integer part, and the last eight bits are the decimal part. The first bit is the positive and negative sign bit, 0 represents "+" and 1 represents "-". The second to eighth bits are the values, and the data from the eighth to the second bit represent 2 0 , 2 1 , 2 2 , 2 3 , 2 4 , 2 5 , 2 6 ; The ninth to sixteenth digits are decimals, representing the value of 1 / 2 1 , 1 / 22 , 1 / 2 3 , 1 / 2 4 , 1 / 2 5 , 1 / 2 6 , 1 / 2 7 , 1 / 2 8 ; Two bytes represent floating-point data between ±63. If the observed data exceeds this range, add one byte after the eighth bit of data, that is, add eight bits of data. The first to sixteenth bits are sign bits and integer data, and the seventeenth to twenty-fourth bits are decimal data.
[0071] Example 6
[0072] On the basis of Examples 1 to 3, the definition structure information includes delimiter definitions: delimiters include a coding start character, delimiter 1, delimiter 2, delimiter 3, delimiter 4 and a coding end character; the coding start character is "<"; delimiter 1 is "#", and delimiter 1 separates the dam name information from the observation time; delimiter 2 is " / ", and delimiter 2 separates the observation time from the measuring point coding byte definition; delimiter 3 is ":", and delimiter 3 separates the measuring point number from the corresponding measuring point data and the measuring point data from the measuring point data; delimiter 4 is "space", and delimiter 4 separates different measuring point coding information; the coding end character is ">".
[0073] Example 7
[0074] On the basis of Examples 1 to 3, the definition structure information further includes a measurement point data size definition: the measurement point data size definition includes a measurement point number byte and a data byte, the measurement point number byte is 4, including a 2-byte measurement point observation code and a 2-byte sequence number; if the number of measurement points for a certain observation is greater than 100, the sequence number is defined as 3, indicating 1000 measurement points; the data byte is defined as 2, indicating floating point data between -63 and 63, if the observation data is outside this range, the data byte definition is adjusted according to the data size.
[0075] Example 8
[0076] On the basis of Example 6, if a measuring point includes multiple measurement value components, the data are listed in sequence after the measuring point number and connected with “:”.
[0077] Example 9
[0078] On the basis of Example 8, in step S3, after the Beidou short message receiving end receives the dam safety monitoring data information sent by the Beidou short message sending end, decoding and converting the data information are performed, which specifically includes the following sub-steps:
[0079] Firstly, the binary coded data is converted into plain text character data, and then the character data is converted into dam safety monitoring data for storage;
[0080] Then, the binary data decoding adopts the combination of ASCII decoding and defined measuring point data decoding, which specifically includes: when the ASCII decoding obtains the ":" character, it indicates that the following is the measuring point data, and the decoding is performed according to the number of measuring point data bytes defined in the file header information; there are clear separation characters between each information end, which are used for comparison and confirmation during the decoding process. When the ASCII decoding obtains any of the characters "<", "#", " / ", ":", "space" and ">", the previous and subsequent data are compared to see whether they meet the character connection requirements, and except for ":", the subsequent data decoding of other separation characters is ASCII decoding to ensure the accuracy of the decoding process;
[0081] Finally, after the character data is decoded, it is converted into dam safety monitoring data according to the defined encoding method. The defined measuring point number is compared with the actual measuring point number of the dam and converted against the measuring point coding table to finally obtain the real observation data.
[0082] Example 10
[0083] A dam safety Beidou short message reporting data encoding device includes a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is loaded by the processor, a method as described in any one of Examples 1 to 3 is executed.
[0084] The units involved in the embodiments of the present invention may be implemented by software or hardware, and the units described may also be arranged in a processor. The names of these units do not, in some cases, limit the units themselves.
[0085] According to one aspect of an embodiment of the present invention, a computer program product or a computer program is provided, the computer program product or the computer program includes a computer instruction, and the computer instruction is stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided in the above various optional implementations.
[0086] As another aspect, an embodiment of the present invention further provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the method described in the above embodiment.
Claims
1. A dam safety Beidou short message reporting data encoding method, characterized in that: The following steps are involved: S1, obtains dam safety monitoring data and converts the dam safety monitoring data into definition structure information at the Beidou short message sending end; S2. In a processor of the Beidou short message sending end, a computer program is used to convert the defined structure information into binary code.
2. The dam safety Beidou short message reporting data encoding method according to claim 1 is characterized in that: After step S2, the method further includes the following steps: performing confidential transmission and spatial compression on the binary code using data encryption and / or data lossless compression methods, so as to further improve the Beidou short message data transmission capability.
3. The dam safety Beidou short message reporting data encoding method according to claim 1 is characterized in that: After step S2, the method further includes the following steps: S3, when the Beidou short message receiving end receives the dam safety monitoring data information sent by the Beidou short message sending end, it decodes and converts it.
4. The dam safety Beidou short message reporting data encoding method according to claim 1 is characterized in that: The definition structure information includes file header information definition: the file header information is defined as the dam name, observation date, measurement point number byte number, measurement point data byte number and separator.
5. The method for encoding dam safety Beidou short message data according to any one of claims 1 to 3, characterized in that: The definition structure information includes the measuring point number and data definition: the measuring point number consists of an observation code and a sequence number. The observation code consists of two uppercase English letters ASCII and is defined as follows: PL for the vertical line, IP for the inverted line, LD for the precision level, SL for the static level, TS for the deformation observation pier, LA for the vacuum laser alignment, SP for the steel pipe mark, DS for the bimetallic mark, EX for the tensioning line, LF for the crack gauge, CF for the joint gauge, WC for the dislocation gauge, MS for the multi-point displacement gauge, IN for the inclinometer hole, WE for the water weir, UP for the pressure gauge, PE for the piezometer, OH for the water level hole, and TD for the thermometer. The sequence number consists of two ASCII digits, coded from 00 to 99, and is combined with an observation code to represent 100 different measuring points. If the number of measuring points is greater than 100, the sequence number is adjusted to a three-digit number 000 to 999. The data is represented by two bytes with a total of 16 bits. The first eight bits are the sign bit and the integer part, and the last eight bits are the decimal part. The first bit is the positive and negative sign bit, 0 represents "+", and 1 represents "-". The second to eighth bits are the values, and the data from the eighth to the second bit represent 2 respectively. 0 , 2 1 , 2 2 , 2 3 , 2 4 , 2 5 , 2 6 ; The ninth to sixteenth digits are the decimal part, representing the value of 1 / 2 1 , 1 / 2 2 , 1 / 2 3 , 1 / 2 4 , 1 / 2 5 , 1 / 2 6 , 1 / 2 7 , 1 / 2 8 ; Two bytes represent floating-point data between ±63. If the observed data exceeds this range, one byte is added after the eighth bit of data, that is, eight bits of data are added. The first to sixteenth bits are the sign bit and integer data, and the seventeenth to twenty-fourth bits are decimal data.
6. The method for encoding dam safety Beidou short message data according to any one of claims 1 to 3, characterized in that: The definition structure information includes delimiter definitions: delimiters include a coding start character, delimiter 1, delimiter 2, delimiter 3, delimiter 4, and a coding end character; the coding start character is "<"; delimiter 1 is "#", which separates the dam name information from the observation time; delimiter 2 is " / ", which separates the observation time from the measuring point coding byte definition; delimiter 3 is ":", which separates the measuring point number from the corresponding measuring point data and the measuring point data from the measuring point data; delimiter 4 is "space", which separates the coding information of different measuring points; the coding end character is ">".
7. The method for encoding dam safety Beidou short message data according to any one of claims 1 to 3, characterized in that: The definition structure information also includes a measurement point data size definition: the measurement point data size definition includes a measurement point number byte and a data byte. The measurement point number byte is 4, including a 2-byte measurement point observation code and a 2-byte sequence number. If the number of measurement points for a certain observation is greater than 100, the sequence number is defined as 3, indicating 1000 measurement points. The data byte is defined as 2, indicating floating-point data between -63 and 63. If the observation data is outside this range, the data byte definition is adjusted according to the data size.
8. The dam safety Beidou short message reporting data encoding method according to claim 6 is characterized in that: If a measuring point includes multiple measurement components, list the data in sequence after the measuring point number and connect them with ":".
9. The dam safety Beidou short message reporting data encoding method according to claim 8 is characterized in that: In step S3, after the Beidou short message receiving end receives the dam safety monitoring data information sent by the Beidou short message sending end, it decodes and converts it, which specifically includes the following sub-steps: First, the binary coded data is converted into plain text character data, and then the character data is converted into dam safety monitoring data for storage; Then, binary data decoding uses a combination of ASCII decoding and defined measurement point data decoding. Specifically, when the ASCII decoding obtains the ":" character, it indicates that the following is the measurement point data, and decoding is performed according to the number of measurement point data bytes defined in the file header information; there are clear separator characters between each information end, which are used for comparison and confirmation during the decoding process. When the ASCII decoding obtains any of the characters "<", "#", " / ", ":", "space", and ">", the preceding and following data are compared to see if they meet the character connection requirements. In addition, except for the ":", the subsequent data decoding of other separator characters is ASCII decoding to ensure the accuracy of the decoding process; Finally, after the character data is decoded, it is converted into dam safety monitoring data according to the defined coding method. The defined measuring point number is compared with the actual measuring point number of the dam and converted against the measuring point coding table to finally obtain the real observation data.
10. A dam safety Beidou short message reporting data encoding device, characterized in that: The method comprises a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is loaded by the processor, the method according to any one of claims 1 to 3 is executed.
Citation Information
Patent Citations
Data coding / decoding method suitable for Bei Dou short message civil agreement
CN103279462A
Beidou short message data compression-encryption method and apparatus, and processor
CN107566999A
Binary data stream transmission method based on Beidou
CN110266436A
Variable-length high-compression bit message encoding and decoding method
CN116208667A
Binary data transmission system and method based on Beidou short message system
CN116744245A
