Device and method for realizing stable and reliable encrypted transmission of data based on communication module

By using the domestic communication module and the Lora wireless protocol, the data is packaged and verified in pieces, and the timeout retransmission mechanism is adopted, the problem of data cannot be reliably transmitted in complex communication environments is solved, and stable and reliable encrypted transmission is achieved.

CN119865358AActive Publication Date: 2025-04-22UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510027200.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-04-22
Estimated Expiration
2045-01-08

AI Technical Summary

Technical Problem

In complex communication environments, especially when the 2.4GHz and 5GHz frequency bands are limited, reliable and diversified data transmission cannot be achieved, resulting in inconvenient communication.

Method used

The domestic communication module is adopted and combined with the Lora wireless protocol. By slicing the data, adding data verification, and using a timeout retransmission mechanism to ensure that the message content is correct and the transmission is reliable.

Benefits of technology

It realizes stable and reliable encrypted data transmission in complex communication environments, ensuring that the data is not intercepted, and maintains the accuracy and reliability of transmission in high-interference environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119865358A_ABST
    Figure CN119865358A_ABST
Patent Text Reader

Abstract

The invention discloses a device and method for realizing stable and reliable encrypted transmission of data based on a communication module, and belongs to the field of communication security, and the device comprises a communication module, a storage module, a data packaging module, a coding module, a compression module, an error correction module, an encryption module and a user interaction module. After packaging, coding, error correction and compression, the data are uploaded to the embedded system from the host system through user interaction, and data encryption is completed in the embedded system; the communication module transmits information, the storage module stores runtime information during communication through a storage medium, and when the receiving end receives the information, the communication module and the encryption module receive and decrypt the information and send the received content to the upper computer; and after the error correction module of the upper computer verifies that the error is correct, the communication module responds to a sender to receive successfully, filters out repeated information, and decodes, combines and decompresses the data. And finally, the information is transmitted to the storage module and the user interaction module to realize display and data persistence. According to the invention, characters, pictures and file contents can be stably and safely transmitted, and reliable transmission in a high-interference environment is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of communication security, and specifically provides a device and method for realizing stable and reliable encrypted transmission of data based on a communication module, wherein the transmitted message is text, picture or file, and information can be transmitted stably and reliably under complex circumstances. Background Art

[0002] In the field of communication security, with the rapid development of information technology and the acceleration of globalization, the security and reliability of data transmission has become a global issue. Especially in scenarios involving the transmission of sensitive information, such as government communications, enterprise data exchange, personal privacy protection, etc., the importance of communication security has become increasingly prominent. The present invention aims to provide a device for stable and reliable encrypted transmission of data based on a domestic communication module to cope with the current complex and changeable communication environment and the growing security needs.

[0003] As the key underlying hardware of the Internet of Things, the development level of domestic communication modules is directly related to national information security and industrial competitiveness. With the acceleration of the upgrading of intelligent industries, the degree of intelligence of modules has increased, and they are integrating various functions such as computing power, OS platform, and intelligent interfaces, effectively saving customer costs and R&D cycles, and accelerating the breadth and depth of Internet of Things applications. The development of domestic communication modules can not only enhance the ability of equipment to cope with complex application environments and ensure the stability and reliability of communication quality, but also is an important way to achieve independent and controllable technology and ensure national security.

[0004] However, due to the high interference in commonly used communication frequency bands, especially the 2.4GHz and 5GHz bands, it is impossible to reliably transmit diversified data in emergency situations where the wireless frequency band is limited, causing communication inconvenience. Summary of the invention

[0005] In view of the above-mentioned problems of the prior art, the purpose of the present invention is to provide a device and method for stable and reliable encrypted data transmission, which can utilize the data communication hardware capabilities of domestic chips, realize safe and efficient information encryption and decryption, and ensure that the data is not intercepted; the method uses the Lora wireless protocol to transmit information over tens of kilometers; the method ensures that the message content is correct and the transmission is reliable by packaging the data in fragments, adding data verification, and a timeout retransmission mechanism.

[0006] In order to achieve the above object, the present invention adopts the following technical solution:

[0007] The present invention provides a method for realizing stable and reliable encrypted transmission of data based on a communication module, comprising the following steps:

[0008] Transmitter encrypted data transmission implementation:

[0009] Step A1: compress and package the sent data to obtain fragmented data;

[0010] Step A2: performing error correction processing on the slice data to obtain slice data after adding error correction code;

[0011] Step A3: split the slice data after adding the error correction code according to the specified size to obtain new slice data;

[0012] Step A4, escaping the data after the error correction code is added to obtain escaped data;

[0013] Step A5, performing hardware AES encryption processing on the escaped data to obtain encrypted data;

[0014] Step A5: Send the encrypted data through the communication module. After all the fragments are transmitted and confirmed, the entire data transmission process is completed;

[0015] Decryption of data transmission at the receiving end is implemented as follows:

[0016] Step B1, receiving data through the communication module to obtain received data;

[0017] Step B2, perform hardware AES decryption processing on the received data to obtain plaintext data;

[0018] Step B3, performing error correction decoding processing on the plaintext data to obtain fragmented data;

[0019] Step B4: merge the fragmented data to obtain complete package data;

[0020] Step B5, parsing the packet data to obtain data type and compressed data;

[0021] Step B6, performing ZSTD decompression on the compressed data to obtain the original data;

[0022] Step B7: Display the original data through the user interaction module to complete data reception and display.

[0023] In the above scheme, step A1 includes:

[0024] Step A1.1, perform ZSTD compression algorithm on the data to be sent to obtain compressed data;

[0025] Step A1.2, adding a data start character, data type and file name to the compressed data to obtain marked data;

[0026] Step A1.3: Add a data terminator to the marked transmission data, and perform fragmentation processing according to the specified size to obtain fragmented data.

[0027] In the above scheme, step A2 includes:

[0028] Step A2.1, adding a slice start character and a slice end character to the slice data to obtain slice data with an identifier;

[0029] Step A2.2: Calculate the CRC checksum for the identified slice data and add it to the slice header;

[0030] Step A2.3: For the slice data with CRC, add an incremental slice sequence number to the slice header and add it to the slice header;

[0031] Step A4 includes:

[0032] Step A4.1: If a fragment start character and a fragment end character appear in the transmitted data content, the fragment data with the mark is escaped to obtain the encoded data. The escape method is to convert the fragment start character into an escape character and a fragment start character code, convert the fragment end character into an escape character and a fragment end character code, and convert one escape character into two consecutive escape characters.

[0033] In the above scheme, step A6 includes:

[0034] Step A6.1: After sending a segment, wait for the receiving end to return a confirmation segment. If a confirmation segment is received, proceed to step A6.3; otherwise, proceed to step A6.2.

[0035] Step A6.2: If the confirmation segment is not received within a fixed time or there is a check error flag in the confirmation segment, the segment is retransmitted. If the upper limit of retransmission times is reached, the segment is stopped and a transmission error is reported.

[0036] Step A6.2: Determine whether all the segments have been processed. If not, continue to execute step A6.1 until all the segments are transmitted and confirmation is received, completing the entire data transmission process.

[0037] In the above scheme, step B3 includes:

[0038] Step B3.1, de-escaping the plaintext data to obtain de-escaped data;

[0039] Step B3.2, perform CRC check on the de-escaped data to determine whether the data is correct. If correct, send a confirmation segment. If wrong, send a confirmation segment with a check error flag and request retransmission;

[0040] Step B3.3: Remove the slice sequence number and CRC check code from the received correct data to obtain slice data.

[0041] The present invention also provides a device for realizing stable and reliable encrypted transmission of data based on a communication module, comprising:

[0042] The transmitting end encrypted data transmission module is used to compress and package the transmitted data to obtain sliced ​​data, perform error correction on the sliced ​​data to obtain sliced ​​data with error correction code added, escape the data with error correction code added to obtain escaped data, perform hardware AES encryption on the escaped data to obtain encrypted data, and send the encrypted data through the communication module. After all slice transmissions are completed and confirmation is received, the entire data transmission process is completed;

[0043] The receiving end decryption data transmission module is used to receive data through the communication module to obtain received data, perform hardware AES decryption processing on the received data to obtain plaintext data, perform error correction decoding processing on the plaintext data to obtain fragmented data, merge the fragmented data to obtain complete package data, parse the package data to obtain data type and compressed data, perform ZSTD decompression on the compressed data to obtain original data, and display the original data through the user interaction module to complete data reception and display.

[0044] In the above device, the data to be sent is processed by ZSTD compression algorithm to obtain compressed data, and the data start symbol, data type and file name are added to the compressed data to obtain marked data, and a data end symbol is added to the marked sending data, and the data is fragmented according to the specified size to obtain fragmented data.

[0045] In the above device, the slice data is processed by adding a slice start symbol and a slice end symbol to obtain the slice data with an identifier, and a CRC check code is calculated for the slice data with the identifier and added to the slice header. For the slice data with the CRC, an incremental slice sequence number is added to the slice header and added to the slice header;

[0046] If a fragment start character and a fragment end character appear in the transmitted data content, the fragment data with the mark is escaped to obtain the encoded data. The escape method is to convert the fragment start character into an escape character and a fragment start character code, convert the fragment end character into an escape character and a fragment end character code, and convert one escape character into two consecutive escape characters.

[0047] In the above device, after sending a fragment, the receiving end is waited for to return a confirmation fragment.

[0048] If a confirmation fragment is received, determine whether all fragments have been processed. If not, continue to send a fragment and wait for the receiving end to return a confirmation fragment until all fragments are transmitted and confirmed, completing the entire data transmission process;

[0049] If the confirmation segment is not received within a fixed time or there is a checksum error flag in the confirmation segment, the segment will be retransmitted. If the upper limit of retransmission times is reached, the segment will stop sending and report a transmission error.

[0050] In the above device, the plaintext data is de-escaped to obtain the de-escaped data, and the de-escaped data is subjected to CRC check processing to determine whether the data is correct. If the data is correct, a confirmation segment is sent; if it is wrong, a confirmation segment with a check error flag is sent to request retransmission; the received correct data is processed by removing the segment sequence number and CRC check code to obtain segment data.

[0051] Compared with the prior art, the present invention has the following beneficial effects:

[0052] 1. The present invention utilizes the technical means of domestic communication chips.

[0053] 2. The present invention solves the technical problems that signals cannot be transmitted over long distances and are susceptible to interference by utilizing the strong diffraction ability of low-frequency signals, thereby achieving the technical effect of ensuring the reliability of data communications.

[0054] 3. The present invention solves the technical problem of possible theft and theft of secrets by utilizing the technical means of data encryption, thereby achieving the technical effect of ensuring the confidentiality of data communications.

[0055] 4. The present invention solves the technical problem that data may go wrong during transmission by utilizing the technical means of data verification, thereby achieving the technical effect of ensuring the accuracy of data communication.

[0056] 5. The present invention solves the technical problem of multi-terminal adaptation by utilizing cross-platform language and BS architecture, thereby achieving the technical effect of saving cross-platform development costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 It is the overall architecture diagram of the present invention;

[0058] Figure 2 Verification is performed by the error correction module in step A6 of the present invention;

[0059] Figure 3 A circuit design diagram used in an embodiment of the present invention;

[0060] Figure 4 PCB design diagram used in the embodiment of the present invention;

[0061] Figure 5 This is a system interface diagram used in an embodiment of the present invention. DETAILED DESCRIPTION

[0062] The following is a detailed description of the embodiments of the present invention. Although the present invention will be described and illustrated in conjunction with some specific embodiments, it should be noted that the present invention is not limited to these embodiments. On the contrary, modifications or equivalent substitutions made to the present invention should all be included in the scope of the claims of the present invention.

[0063] In addition, in order to better illustrate the present invention, numerous specific details are given in the following specific embodiments. It will be understood by those skilled in the art that the present invention can also be implemented without these specific details.

[0064] The present invention discloses a device and method for realizing stable and reliable encrypted data transmission based on a communication module, which belongs to the field of communication security and includes a communication module, a storage module, a data packaging module, an encoding module, a compression module, an error correction module, an encryption module and a user interaction module. After packaging, encoding, error correction and compression, the data is uploaded from the host system to the embedded system through user interaction, and data encryption is completed in the embedded system; the communication module transmits information, and the storage module saves the runtime information during communication through a storage medium. When the receiving end receives the information, the communication module and the encryption module receive and decrypt the information, and send the received content to the host computer. After the error correction module of the host computer verifies that there is no error, it responds to the sender through the communication module that the reception is successful and filters out duplicate information, and decodes, merges and decompresses the data. Finally, the information is passed to the storage module and the user interaction module to realize display and data persistence. The present invention can stably and safely transmit text, pictures and file contents, and ensure reliable transmission in a high interference environment.

[0065] The present invention provides a method for realizing stable and reliable encrypted transmission of data based on a communication module, comprising the following steps:

[0066] Transmitter encrypted data transmission implementation:

[0067] Step A1: compress and package the sent data to obtain fragmented data;

[0068] Step A2: performing error correction processing on the slice data to obtain slice data after adding error correction code;

[0069] Step A3: split the slice data after adding the error correction code according to the specified size to obtain new slice data;

[0070] Step A4, escaping the data after the error correction code is added to obtain escaped data;

[0071] Step A5, performing hardware AES encryption processing on the escaped data to obtain encrypted data;

[0072] Step A5: Send the encrypted data through the communication module. After all the fragments are transmitted and confirmed, the entire data transmission process is completed;

[0073] Decryption of data transmission at the receiving end is implemented as follows:

[0074] Step B1, receiving data through the communication module to obtain received data;

[0075] Step B2, perform hardware AES decryption processing on the received data to obtain plaintext data;

[0076] Step B3, performing error correction decoding processing on the plaintext data to obtain fragmented data;

[0077] Step B4: merge the fragmented data to obtain complete package data;

[0078] Step B5, parsing the packet data to obtain data type and compressed data;

[0079] Step B6, performing ZSTD decompression on the compressed data to obtain the original data;

[0080] Step B7: Display the original data through the user interaction module to complete data reception and display.

[0081] In the above scheme, step A1 includes:

[0082] Step A1.1, perform ZSTD compression algorithm on the data to be sent to obtain compressed data;

[0083] Step A1.2, adding a data start character, data type and file name to the compressed data to obtain marked data;

[0084] Step A1.3: Add a data terminator to the marked transmission data, and perform fragmentation processing according to the specified size to obtain fragmented data.

[0085] In the above scheme, step A2 includes:

[0086] Step A2.1, adding a slice start character and a slice end character to the slice data to obtain slice data with an identifier;

[0087] Step A2.2: Calculate the CRC checksum for the identified slice data and add it to the slice header;

[0088] Step A2.3: For the slice data with CRC, add an incremental slice sequence number to the slice header and add it to the slice header;

[0089] Step A4 includes:

[0090] Step A4.1: If a fragment start character and a fragment end character appear in the transmitted data content, the fragment data with the mark is escaped to obtain the encoded data. The escape method is to convert the fragment start character into an escape character and a fragment start character code, convert the fragment end character into an escape character and a fragment end character code, and convert one escape character into two consecutive escape characters.

[0091] In the above scheme, step A6 includes:

[0092] Step A6.1: After sending a segment, wait for the receiving end to return a confirmation segment. If a confirmation segment is received, proceed to step A6.3; otherwise, proceed to step A6.2.

[0093] Step A6.2: If the confirmation segment is not received within a fixed time or there is a check error flag in the confirmation segment, the segment is retransmitted. If the upper limit of retransmission times is reached, the segment is stopped and a transmission error is reported.

[0094] Step A6.2: Determine whether all the segments have been processed. If not, continue to execute step A6.1 until all the segments are transmitted and confirmation is received, completing the entire data transmission process.

[0095] In the above scheme, step B3 includes:

[0096] Step B3.1, de-escaping the plaintext data to obtain de-escaped data;

[0097] Step B3.2, perform CRC check on the de-escaped data to determine whether the data is correct. If correct, send a confirmation segment. If wrong, send a confirmation segment with a check error flag and request retransmission;

[0098] Step B3.3: Remove the slice sequence number and CRC check code from the received correct data to obtain slice data.

[0099] The present invention also provides a device for realizing stable and reliable encrypted transmission of data based on a communication module, comprising:

[0100] The transmitting end encrypted data transmission module is used to compress and package the transmitted data to obtain sliced ​​data, perform error correction on the sliced ​​data to obtain sliced ​​data with error correction code added, escape the data with error correction code added to obtain escaped data, perform hardware AES encryption on the escaped data to obtain encrypted data, and send the encrypted data through the communication module. After all slice transmissions are completed and confirmation is received, the entire data transmission process is completed;

[0101] The receiving end decryption data transmission module is used to receive data through the communication module to obtain received data, perform hardware AES decryption processing on the received data to obtain plaintext data, perform error correction decoding processing on the plaintext data to obtain fragmented data, merge the fragmented data to obtain complete package data, parse the package data to obtain data type and compressed data, perform ZSTD decompression on the compressed data to obtain original data, and display the original data through the user interaction module to complete data reception and display.

[0102] In the above device, the data to be sent is processed by ZSTD compression algorithm to obtain compressed data, and the data start symbol, data type and file name are added to the compressed data to obtain marked data, and a data end symbol is added to the marked sending data, and the data is fragmented according to the specified size to obtain fragmented data.

[0103] In the above device, the slice data is processed by adding a slice start symbol and a slice end symbol to obtain the slice data with an identifier, and a CRC check code is calculated for the slice data with the identifier and added to the slice header. For the slice data with the CRC, an incremental slice sequence number is added to the slice header and added to the slice header;

[0104] If a fragment start character and a fragment end character appear in the transmitted data content, the fragment data with the mark is escaped to obtain the encoded data. The escape method is to convert the fragment start character into an escape character and a fragment start character code, convert the fragment end character into an escape character and a fragment end character code, and convert one escape character into two consecutive escape characters.

[0105] In the above device, after sending a fragment, the receiving end is waited for to return a confirmation fragment.

[0106] If a confirmation fragment is received, determine whether all fragments have been processed. If not, continue to send a fragment and wait for the receiving end to return a confirmation fragment until all fragments are transmitted and confirmed, completing the entire data transmission process;

[0107] If the confirmation segment is not received within a fixed time or there is a checksum error flag in the confirmation segment, the segment will be retransmitted. If the upper limit of retransmission times is reached, the segment will stop sending and report a transmission error.

[0108] In the above device, the plaintext data is de-escaped to obtain the de-escaped data, and the de-escaped data is subjected to CRC check processing to determine whether the data is correct. If the data is correct, a confirmation segment is sent; if it is wrong, a confirmation segment with a check error flag is sent to request retransmission; the received correct data is processed by removing the segment sequence number and CRC check code to obtain segment data.

[0109] The present invention provides a device for realizing stable and reliable encrypted data transmission based on a domestic communication module, which decomposes information data transmission into two parts: hardware transmission and software interpretation. The actual execution part runs on the host system, and the wireless transmission part runs on the embedded system, including the following modules:

[0110] Communication module: operating signal wireless transmission part;

[0111] Storage module: running program and data file storage part;

[0112] Data packaging module: fragments the transmitted data and marks the data type;

[0113] Encoding module: encodes the transmission data;

[0114] Compression module: runs data compression algorithm;

[0115] Error correction module: determines whether there are errors or omissions in the transmitted data, verifies the data, and notifies the sender to request retransmission of the erroneous data;

[0116] Encryption module: encrypts the transmitted data;

[0117] User interaction module: displays the received information and files in the form of web pages to facilitate user operation;

[0118] In the above scheme, files and messages are data directly input by users, including disk files, system screenshots, text messages, etc.

[0119] In the above scheme, the transmission data is encoded, stored, CRC-checked, AES-encrypted, ZSTD-compressed, 433MHz-transmitted, and cross-platform-supported.

[0120] In the above solution, the communication module uses a domestic chip based on the Lora 443MHz wireless communication protocol.

[0121] In the above scheme, the sending end in the data packaging module includes the following steps:

[0122] S1: Add the data start character, the data type and file name before sending the data;

[0123] S2: Add a data terminator after sending the data;

[0124] S3: Split the data into pieces according to the specified size.

[0125] The receiving end in the data packaging module includes the following steps:

[0126] S1: The receiving end starts recording the received slice data when receiving the data start character;

[0127] S2: The receiving end stops recording when receiving the data end character and returns the recorded data to the upper layer for processing.

[0128] In the above scheme, the sending end in the encoding module includes the following steps:

[0129] S1: Add a slice start character and a slice end character to the head and tail of each slice;

[0130] S2: If a fragment start character and a fragment end character appear in the transmitted data content, they are escaped. The escape method is to convert the fragment start character into an escape character and a fragment start character code, convert the fragment end character into an escape character and a fragment end character code, and convert the escape character into two escape characters.

[0131] The receiving end of the encoding module includes the following steps

[0132] S1: The receiving end starts recording the received data when receiving the start character of the segment.

[0133] S2: If the received content contains consecutive escape characters and fragment start character codes, convert them into fragment start characters;

[0134] S3: If the received content contains consecutive escape characters and end-of-segment character codes, convert them into end-of-segment characters;

[0135] S4: If the received content contains two consecutive escape characters, convert them into one escape character;

[0136] S5: The receiving end stops recording when receiving the end-of-segment character and returns the recorded data to the upper layer for processing.

[0137] In the above scheme, the compression module uses the ZSTD compression algorithm.

[0138] In the above scheme, the error correction module at the sending end includes the following steps:

[0139] S1: Number each fragment, add an increasing fragment sequence number and a CRC checksum of the fragment content to the fragment header.

[0140] S2: After sending a segment, wait for the receiver to return a confirmation segment; if the confirmation segment is not received within a fixed time or there is a check error flag in the confirmation segment, retransmit the segment until the confirmation is successful. If the upper limit of retransmission times is reached, stop sending and report a transmission error.

[0141] The receiving end error correction module includes the following steps:

[0142] Perform CRC check on the de-escaped data to determine whether the data is correct. If correct, send a confirmation segment. If wrong, send a confirmation segment with a check error flag and request retransmission.

[0143] In the above scheme, the encryption module uses hardware AES encryption, and the encryption key can be controlled by the host computer.

[0144] In the above scheme, the user interaction module includes the following steps:

[0145] S1: Start the host system and embedded system. The software detects whether there is an embedded system. If so, it starts local port monitoring.

[0146] S2: Open the local listening port through the browser, set the user name, and check whether the green connection is successful in the upper right corner;

[0147] S3: Another client repeats S1-S2 operations;

[0148] S4: User A enters information, pastes pictures or sends files in the browser, and the terminal console outputs the sending progress. A blue icon showing the information being transmitted is displayed in the upper right corner of the browser.

[0149] S5: User B checks in the browser whether the message is received. If not, return to step S1 and retest;

[0150] S6: User B repeats action S4 and checks in user A's browser whether the message is received.

[0151] Example

[0152] 1. Communication module and encryption module

[0153] The communication module of this embodiment uses a domestic chip based on the Lora 443MHz wireless communication protocol, which includes hardware AES encryption function and supports encryption key control by the host computer.

[0154] 2. Storage Module

[0155] Use 64G TF card to store running programs and data files.

[0156] 3. Data Packaging Module

[0157] The sending end of the data packaging module in this embodiment includes the following steps:

[0158] S1: Add the data start character, the data type and file name before sending the data;

[0159] S2: Add a data terminator after sending the data;

[0160] S3: Split the data into pieces according to the specified size.

[0161] The receiving end in the data packaging module of this embodiment includes the following steps:

[0162] S1: The receiving end starts recording the received slice data when receiving the data start character;

[0163] S2: The receiving end stops recording when receiving the data end character and returns the recorded data to the upper layer for processing.

[0164] Table 1 lists the specific values ​​used for the above identifiers.

[0165] Table 1 Values ​​of the identifiers used by the data packaging module in this embodiment

[0166]

[0167]

[0168] 4. Encoding module

[0169] In this embodiment, the transmitting end of the encoding module includes the following steps:

[0170] S1: Add a slice start character and a slice end character to the head and tail of each slice;

[0171] S2: If a fragment start character and a fragment end character appear in the transmitted data content, they are escaped. The escape method is to convert the fragment start character into an escape character and a fragment start character code, convert the fragment end character into an escape character and a fragment end character code, and convert the escape character into two escape characters.

[0172] In the encoding module of this embodiment, the receiving end performs a de-escaping operation on the plaintext data to obtain de-escaped data, which specifically includes the following steps:

[0173] S1: The receiving end starts recording the received data when receiving the start character of the segment.

[0174] S2: If the received content contains consecutive escape characters and fragment start character codes, convert them into fragment start characters;

[0175] S3: If the received content contains consecutive escape characters and end-of-segment character codes, convert them into end-of-segment characters;

[0176] S4: If the received content contains two consecutive escape characters, convert them into one escape character;

[0177] S5: The receiving end stops recording when receiving the end-of-segment character and returns the recorded data to the upper layer for processing.

[0178] Table 2 lists the specific values ​​used for the above identifiers.

[0179] Table 2 Values ​​of the identifiers used by the encoding module in this embodiment

[0180] Serial number Logo value 1 Slice start character 0xE4 2 End of Segment 0xE5 3 Escape Character 0xE6 4 Slice start code 0x01 5 End of piece code 0x02

[0181] 5. Compression module

[0182] The compression module of this embodiment uses the ZSTD compression algorithm.

[0183] 6. Error Correction Module

[0184] The error correction module at the transmitting end of this embodiment includes the following steps:

[0185] S1: Number each fragment, add an increasing fragment sequence number and a CRC checksum of the fragment content to the fragment header.

[0186] S2: After sending a segment, wait for the receiver to return a confirmation segment; if the confirmation segment is not received within a fixed time or there is a check error flag in the confirmation segment, retransmit the segment until the confirmation is successful. If the upper limit of retransmission times is reached, stop sending and report a transmission error.

[0187] The receiving end error correction module of this embodiment includes the following steps:

[0188] S1: For each received fragment, determine whether the CRC of the fragment data is the same as the CRC of the fragment header content.

[0189] S2: If they are the same, send a confirmation segment; if they are different, send a confirmation segment with a checksum error flag.

[0190] 7. User Interaction Module

[0191] The user interaction module of this embodiment includes the following steps:

[0192] S1: Start the host system and embedded system. The software detects whether there is an embedded system. If so, it starts local port monitoring.

[0193] S2: Open the local listening port through the browser, set the user name, and check whether the green connection is successful in the upper right corner;

[0194] S3: Another client repeats S1-S2 operations;

[0195] S4: User A enters information, pastes pictures or sends files in the browser, and the terminal console outputs the sending progress. A blue icon showing the information being transmitted is displayed in the upper right corner of the browser.

[0196] S5: User B checks in the browser whether the message is received. If not, return to step S1 and retest;

[0197] S6: User B repeats action S4 and checks in user A's browser whether the message is received.

[0198] The above are only representative embodiments of the present invention in many specific application scopes, and do not constitute any limitation on the protection scope of the present invention. Any technical solutions formed by transformation or equivalent replacement fall within the protection scope of the present invention.

Claims

1. A method for realizing stable and reliable encrypted data transmission based on a communication module, characterized in that: The following steps are involved: Transmitter encrypted data transmission implementation: Step A1: compress and package the sent data to obtain fragmented data; Step A2: performing error correction processing on the slice data to obtain slice data after adding error correction code; Step A3: split the slice data after adding the error correction code according to the specified size to obtain new slice data; Step A4: escaping the data after the error correction code is added by the encoding module to obtain the escaped data; Step A5, performing hardware AES encryption processing on the escaped data to obtain encrypted data; Step A6: The encrypted data is sent through the communication module and checked through the error correction module. After all the fragments are transmitted and confirmed, the entire data transmission process is completed; Decryption of data transmission at the receiving end is implemented as follows: Step B1, receiving data through the communication module to obtain received data; Step B2, perform hardware AES decryption processing on the received data to obtain plaintext data; Step B3, performing error correction decoding processing on the plaintext data to obtain fragmented data; Step B4: merge the fragmented data to obtain complete package data; Step B5, parsing the packet data to obtain data type and compressed data; Step B6, performing ZSTD decompression on the compressed data to obtain the original data; Step B7: Display the original data through the user interaction module to complete data reception and display.

2. According to claim 1, a method for realizing stable and reliable encrypted data transmission based on a communication module is characterized in that: Step A1 includes: Step A1.1, perform ZSTD compression algorithm on the data to be sent to obtain compressed data; Step A1.2, adding a data start character, data type and file name to the compressed data to obtain marked data; Step A1.3: Add a data terminator to the marked transmission data, and perform fragmentation processing according to the specified size to obtain fragmented data.

3. According to claim 1, a method for realizing stable and reliable encrypted data transmission based on a communication module is characterized in that: Step A2 includes: Step A2.1, adding a slice start character and a slice end character to the slice data to obtain slice data with an identifier; Step A2.2: Calculate the CRC checksum for the identified slice data and add it to the slice header; Step A2.3: For the slice data with CRC, add an incremental slice sequence number to the slice header and add it to the slice header; Step A4 includes: Step A4.1: If a fragment start character and a fragment end character appear in the transmitted data content, the fragment data with the mark is escaped to obtain the encoded data. The escape method is to convert the fragment start character into an escape character and a fragment start character code, convert the fragment end character into an escape character and a fragment end character code, and convert one escape character into two consecutive escape characters.

4. According to claim 1, a method for realizing stable and reliable encrypted data transmission based on a communication module is characterized in that: The checking by the error correction module in step A6 includes: Step A6.1: After sending a segment, wait for the receiving end to return a confirmation segment. If a confirmation segment is received, proceed to step A6.3; otherwise, proceed to step A6.

2. Step A6.2: If the confirmation segment is not received within a fixed time or there is a check error flag in the confirmation segment, the segment is retransmitted. If the upper limit of retransmission times is reached, the segment is stopped and a transmission error is reported. Step A6.2: Determine whether all the segments have been processed. If not, continue to execute step A6.1 until all the segments are transmitted and confirmation is received, completing the entire data transmission process.

5. According to claim 1, a method for realizing stable and reliable encrypted data transmission based on a communication module is characterized in that: Step B33 includes: Step B3.1, de-escaping the plaintext data to obtain de-escaped data; Step B3.2, perform CRC check on the de-escaped data to determine whether the data is correct. If correct, send a confirmation segment. If wrong, send a confirmation segment with a check error flag and request retransmission; Step B3.3: Remove the slice sequence number and CRC check code from the received correct data to obtain slice data.

6. A device for realizing stable and reliable encrypted data transmission based on a communication module, characterized in that: include: The transmitting end encrypted data transmission module is used to compress and package the transmitted data to obtain sliced ​​data, perform error correction on the sliced ​​data to obtain sliced ​​data with error correction code added, escape the data with error correction code added to obtain escaped data, perform hardware AES encryption on the escaped data to obtain encrypted data, and send the encrypted data through the communication module. After all slice transmissions are completed and confirmation is received, the entire data transmission process is completed; The receiving end decryption data transmission module is used to receive data through the communication module to obtain received data, perform hardware AES decryption processing on the received data to obtain plaintext data, perform error correction decoding processing on the plaintext data to obtain fragmented data, merge the fragmented data to obtain complete package data, parse the package data to obtain data type and compressed data, perform ZSTD decompression on the compressed data to obtain original data, and display the original data through the user interaction module to complete data reception and display.

7. The device for realizing stable and reliable encrypted data transmission based on a communication module according to claim 6, characterized in that: The data to be sent is processed by ZSTD compression algorithm to obtain compressed data, and the data start symbol, data type and file name are added to the compressed data to obtain marked data, and the data end symbol is added to the marked sending data, and the data is fragmented according to the specified size to obtain fragmented data.

8. The device for realizing stable and reliable encrypted data transmission based on a communication module according to claim 7, characterized in that: Add a slice start symbol and a slice end symbol to the slice data to obtain the slice data with an identifier. For the slice data with an identifier, calculate the CRC check code and add it to the slice header. For the slice data with CRC, add an incremental slice sequence number to the slice header and add it to the slice header. If a fragment start character and a fragment end character appear in the transmitted data content, the fragment data with the mark is escaped to obtain the encoded data. The escape method is to convert the fragment start character into an escape character and a fragment start character code, convert the fragment end character into an escape character and a fragment end character code, and convert one escape character into two consecutive escape characters.

9. The device for realizing stable and reliable encrypted data transmission based on a communication module according to claim 7, characterized in that: Verify through the error correction module: After sending a fragment, wait for the receiving end to return the confirmation fragment. If a confirmation fragment is received, determine whether all fragments have been processed. If not, continue to send a fragment and wait for the receiving end to return a confirmation fragment until all fragments are transmitted and confirmed, completing the entire data transmission process; If the confirmation segment is not received within a fixed time or there is a check error flag in the confirmation segment, the segment will be retransmitted. If the upper limit of retransmission times is reached, the segment will stop sending and report a transmission error.

10. The device for realizing stable and reliable encrypted data transmission based on a communication module according to claim 9, characterized in that: De-escape the plaintext data to obtain the de-escaped data, and perform CRC check on the de-escaped data to determine whether the data is correct. If correct, send a confirmation segment; if wrong, send a confirmation segment with a check error flag and request retransmission; remove the segment sequence number and CRC check code from the received correct data to obtain the segment data.

Citation Information

Patent Citations

  • Information transmission system based on data encryption

    CN114422230A

  • Recipient-driven data encryption

    US20190103962A1