A device and method for realizing stable and reliable encrypted transmission of data based on a communication module
Through data segmentation, error correction and hardware AES encryption technology based on domestic communication modules, the reliability and confidentiality issues of data transmission in complex environments are solved, and stable and reliable information transmission is achieved.
Patent Information
- Application Number
- CN202510027200.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-01-08
AI Technical Summary
In a complex and ever-changing communication environment, especially when there is heavy interference in the 2.4GHz and 5GHz frequency bands, existing technologies cannot achieve stable and reliable diversified data transmission, resulting in communication inconvenience.
It adopts a data encryption transmission method based on domestic communication modules, and ensures stable and reliable information transmission in complex environments through data sharding, error correction processing, hardware AES encryption, Lora wireless protocol and other technologies.
It achieves the reliability and confidentiality of data transmission in complex environments, solves the problems of long-distance signal transmission and anti-interference, and reduces the cost of cross-platform development.
Smart Images

Figure CN119865358B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of communication security, and specifically relates to a device and method for realizing stable and reliable encrypted data transmission based on a communication module. BACKGROUND
[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 have become a global problem. Especially in scenarios involving sensitive information transmission, such as government communication, enterprise data exchange, and personal privacy protection, the importance of communication security is increasingly prominent. The present application aims to provide a device for realizing stable and reliable encrypted data transmission based on domestic communication modules to cope with the current complex communication environment and growing security needs.
[0003] As a key bottom-layer hardware for 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 intelligent industry upgrading and the improvement of module intelligence, the modules are integrating various functions such as computing power, OS platforms, and intelligent interfaces, effectively saving customer costs and research and development cycles, and accelerating the breadth and depth of Internet of Things applications. The development of domestic communication modules not only enhances the ability of devices to cope with complex application environments and ensures the stability and reliability of communication quality, but also is an important way to achieve technology self-containment and protect national security.
[0004] However, due to the current high interference in commonly used communication frequency bands, especially in the 2.4GHz and 5GHz frequency bands, it is not possible to reliably transmit diversified data in emergency situations where wireless frequency bands are limited, causing communication inconvenience. SUMMARY
[0005] To address the above-mentioned prior art problems, the present application aims to provide a device and method for stable and reliable encrypted data transmission, which can utilize the data communication hardware capabilities of domestic chips to achieve secure and efficient information encryption and decryption, ensuring that data is not intercepted. The method uses Lora wireless protocol to transmit information over tens of kilometers. The method ensures the correctness of message content and the reliability of transmission through data fragmentation packaging, data verification, and timeout retransmission mechanism.
[0006] To achieve the above-mentioned purposes, the present application adopts the following technical solutions:
[0007] The present application provides a method for realizing stable and reliable encrypted data transmission based on a communication module, comprising the following steps:
[0008] Transmission of encrypted data from the transmitting end:
[0009] Step A1, compress and package the data to be sent to obtain the slice data;
[0010] Step A2, error correction processing is performed on the slice data to obtain the slice data with error correction code added;
[0011] Step A3, the slice data with error correction code added is split according to the specified size to obtain new slice data;
[0012] Step A4, the data with error correction code added is escaped to obtain the escaped data;
[0013] Step A5, the escaped data is hardware AES encrypted to obtain the encrypted data;
[0014] Step A5, the encrypted data is sent through the communication module, and after all the slice transmission is completed and the confirmation is received, the entire data transmission process is completed;
[0015] Decryption data transmission implementation at the receiving end:
[0016] Step B1, receive data through the communication module to obtain the received data;
[0017] Step B2, the received data is hardware AES decrypted to obtain the plaintext data;
[0018] Step B3, the plaintext data is error correction decoded to obtain the slice data;
[0019] Step B4, the slice data is merged to obtain the complete package data;
[0020] Step B5, the package data is parsed to obtain the data type and compressed data;
[0021] Step B6, the compressed data is ZSTD decompressed to obtain the original data;
[0022] Step B7, the original data is displayed through the user interaction module to complete data reception and display.
[0023] In the above scheme, step A1 includes:
[0024] Step A1.1, the data to be sent is processed by ZSTD compression algorithm to obtain compressed data;
[0025] Step A1.2, the compressed data is added with data start symbol, data type and file name to obtain marked data;
[0026] Step A1.3, a data end symbol is added to the marked data to be sent, and the data is sliced according to the specified size to obtain the slice data.
[0027] In the above scheme, step A2 comprises:
[0028] Step A2.1, adding slice start symbol and slice end symbol to the slice data to obtain slice data with identification;
[0029] Step A2.2, calculating CRC check code for the slice data with identification and adding the CRC check code to the slice header;
[0030] Step A2.3, adding an incremental slice sequence number to the slice data with CRC check code in the slice header;
[0031] Step A4 comprises:
[0032] Step A4.1, if the slice start symbol and the slice end symbol appear in the data content to be transmitted, performing escape processing on the slice data with identification to obtain encoded data, the escape processing being converting the slice start symbol into an escape symbol and a slice start symbol code, converting the slice end symbol into an escape symbol and a slice end symbol code, and converting one escape symbol into two consecutive escape symbols.
[0033] In the above scheme, step A6 comprises:
[0034] Step A6.1, after sending one slice, waiting for the receiving end to return a confirmation slice, if the confirmation slice is received, performing step A6.3, otherwise, performing step A6.2;
[0035] Step A6.2, if no confirmation slice is received within a fixed time or a check error flag exists in the confirmation slice, retransmitting the slice, if the number of retransmissions reaches an upper limit, stopping the sending and reporting a transmission error;
[0036] Step A6.2, determining whether all slices are processed, if not, continuing to perform step A6.1, until all slices are transmitted and the confirmation is received, and the entire data transmission process is completed.
[0037] In the above scheme, step B3 comprises:
[0038] Step B3.1, performing a de-escape operation on the plaintext data to obtain de-escaped data;
[0039] Step B3.2, performing CRC check processing on the de-escaped data to determine whether the data is correct, if correct, sending a confirmation slice, if incorrect, sending a confirmation slice with a check error flag to request retransmission;
[0040] Step B3.3, performing slice sequence number and CRC check code removal processing on the received correct data to obtain slice data.
[0041] The application also provides a device for realizing stable and reliable encrypted data transmission based on a communication module, comprising:
[0042] The transmitting end encrypted data transmission module is used for compressing and data packaging the sending data to obtain fragmented data, performing error correction processing on the fragmented data to obtain slice data with added error correction codes, performing escaping on the data with added error correction codes to obtain escaped data, performing hardware AES encryption processing on the escaped data to obtain encrypted data, and sending the encrypted data through the communication module.
[0043] The receiving end decrypted data transmission module is used for receiving data through the communication module to obtain received data, performing hardware AES decryption processing on the received data to obtain plaintext data, performing error correction decoding processing on the plaintext data to obtain fragmented data, merging the fragmented data to obtain complete packet data, parsing the packet data to obtain data types and compressed data, performing ZSTD decompression on the compressed data to obtain original data, and displaying the original data through the user interaction module to complete data receiving and displaying.
[0044] In the device, the ZSTD compression algorithm is used to process the data to be sent to obtain compressed data, the data start symbol, data type and file name are added to the compressed data to obtain marked data, the data end symbol is added to the marked sending data, and the data is fragmented according to a specified size to obtain fragmented data.
[0045] In the device, the slice start symbol and slice end symbol are added to the fragmented data to obtain identified fragmented data, the CRC check code is calculated for the identified fragmented data and added to the slice header, and the incremental slice serial number is added to the fragmented data with CRC in the slice header.
[0046] If the slice start symbol and slice end symbol appear in the transmitted data content, the identified fragmented data is escaped to obtain encoded data, the escaping mode is to convert the slice start symbol into an escape symbol and a slice start symbol code, convert the slice end symbol into an escape symbol and a slice end symbol code, and convert one escape symbol into two consecutive escape symbols.
[0047] In the device, after one slice is sent, the receiving end returns an acknowledgement slice,
[0048] If the acknowledgement slice is received, it is determined whether all slices are processed, if not, one slice is continuously sent after being sent, the receiving end returns an acknowledgement slice, and the whole data transmission process is completed after all slices are transmitted and the acknowledgement is received.
[0049] If the acknowledgement fragment is not received within a fixed time or there is a check error flag in the acknowledgement fragment, the fragment is retransmitted, and if the upper limit of the retransmission number is reached, the transmission is stopped, and a transmission error is reported.
[0050] In the device, the plaintext data is subjected to a de-escaping operation to obtain de-escaped data, the de-escaped data is subjected to a CRC check processing to determine whether the data is correct, if correct, an acknowledgement fragment is sent, and if incorrect, an acknowledgement fragment with a check error flag is sent to require retransmission, and the received correct data is subjected to a removal of a fragment serial number and a CRC check code processing to obtain a fragment data.
[0051] Compared with the prior art, the present application has the beneficial effects of:
[0052] Firstly, the present application uses a domestic communication chip.
[0053] Secondly, the present application uses the strong diffraction ability of low-frequency signals to solve the technical problems of long-distance signal transmission and transmission interference, and achieves the technical effect of ensuring data communication reliability.
[0054] Thirdly, the present application uses data encryption to solve the technical problem of possible theft and hacking, and achieves the technical effect of ensuring data communication confidentiality.
[0055] Fourthly, the present application uses data checking to solve the technical problem of possible data errors in transmission, and achieves the technical effect of ensuring data communication accuracy.
[0056] Fifthly, the present application uses cross-platform language and B-S architecture to solve the technical problem of multi-terminal adaptation, and achieves the technical effect of saving cross-platform development cost. DETAILED DESCRIPTION
[0057] Figure 1 is the overall architecture diagram of the present application;
[0058] Figure 2 is the verification by the error correction module in step A6 of the present application;
[0059] Figure 3 is the circuit design diagram used in the embodiment of the present application;
[0060] Figure 4 is the PCB design diagram used in the embodiment of the present application;
[0061] Figure 5 is the system interface diagram used in the embodiment of the present application. DETAILED DESCRIPTION
[0062] The embodiments of the present application will be described in detail below. Although the present application will be described and illustrated by referring to specific embodiments, it is noted that the present application is not limited to these embodiments only. Rather, modifications and equivalents of the present application should be covered within the scope of the claims of the present application.
[0063] In addition, in order to better illustrate the present application, numerous specific details are given in the following detailed description. Those skilled in the art will understand that the present application can be practiced without these specific details.
[0064] The application discloses a device and method for realizing stable and reliable encrypted data transmission based on a communication module, and belongs to the field of communication security, comprising 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. The packaged, encoded, error-corrected and compressed data is uploaded from a host system to an embedded system through user interaction, and data encryption is completed in the embedded system; the communication module transmits information, the storage module saves runtime information during communication through a storage medium, when the receiving end receives information, the communication module and the encryption module receive and decrypt the information, and send the received content to the upper computer, the error correction module of the upper computer checks whether the information is correct, and if correct, sends a response to the sender through the communication module to indicate that the information is received successfully and filters out repeated information, and decodes, combines and decompresses the data. Finally, the information is transmitted to the storage module and the user interaction module to realize display and data persistence. The application can stably and safely transmit text, pictures and file content, and ensure reliable transmission in a high-interference environment.
[0065] The application provides a method for realizing stable and reliable encrypted data transmission based on a communication module, comprising the following steps:
[0066] Transmission of encrypted data at the transmitting end is realized:
[0067] Step A1, compressing and packaging the sending data to obtain fragmented data;
[0068] Step A2, performing error correction processing on the fragmented data to obtain slice data with added error correction codes;
[0069] Step A3, splitting the slice data with added error correction codes according to a specified size to obtain new fragmented data;
[0070] Step A4, performing escape processing on the data with added error correction codes 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, all fragment transmissions are transmitted and an acknowledgement is received, and the entire data transmission process is completed;
[0073] The receiving end decrypts the data transmission to implement:
[0074] Step B1, receive 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, perform error correction decoding processing on the plaintext data to obtain fragment data;
[0077] Step B4, merge the fragment data to obtain complete packet data;
[0078] Step B5, parse the packet data to obtain data type and compressed data;
[0079] Step B6, perform ZSTD decompression on the compressed data to obtain 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 processing on the data to be sent to obtain compressed data;
[0083] Step A1.2, add data start symbol, data type and file name to the compressed data to obtain marked data;
[0084] Step A1.3, add a data end symbol to the marked sending data, and perform fragmentation processing according to a specified size to obtain fragment data.
[0085] In the above scheme, step A2 includes:
[0086] Step A2.1, add a slice start symbol and a slice end symbol to the fragment data to obtain identified fragment data;
[0087] Step A2.2, calculate a CRC check code for the identified fragment data and add it to the slice header;
[0088] Step A2.3, add an incremental slice sequence number to the CRC fragment data in the slice header;
[0089] Step A4 includes:
[0090] Step A4.1, if the data content of the transmission appears a slice start symbol and a slice end symbol, the slice data with the mark is escaped to obtain the encoded data, the escape mode is that the slice start symbol is converted into an escape symbol and a slice start symbol code, the slice end symbol is converted into an escape symbol and a slice end symbol code, and one escape symbol is converted into two continuous escape symbols.
[0091] In the above scheme, step A6 includes:
[0092] Step A6.1, after sending a slice, waiting for the receiving end to return an acknowledgement slice, if the acknowledgement slice is received, step A6.3 is performed, otherwise, step A6.2 is performed.
[0093] Step A6.2, if no acknowledgement slice is received within a fixed time or the acknowledgement slice contains a check error flag, the slice is retransmitted, if the retransmission number reaches an upper limit, the sending is stopped, and a transmission error is reported;
[0094] Step A6.2, judging whether all slices are processed, if not, step A6.1 is continuously executed until all slices are transmitted and the acknowledgement is received, and the whole data transmission process is completed.
[0095] In the above scheme, step B3 includes:
[0096] Step B3.1, performing a de-escaping operation on the plaintext data to obtain de-escaped data;
[0097] Step B3.2, performing a CRC check on the de-escaped data to determine whether the data is correct, if yes, an acknowledgement slice is sent, if no, an acknowledgement slice with a check error flag is sent to request retransmission;
[0098] Step B3.3, performing a slice sequence number and CRC check code removal on the received correct data to obtain slice data.
[0099] The application also provides a device for realizing stable and reliable encrypted data transmission based on a communication module, which comprises:
[0100] The transmitting end encrypted data transmission module is used for compressing and data packaging the sending data to obtain slice data, performing error correction on the slice data to obtain slice data with added error correction codes, performing escaping on the data with added error correction codes to obtain escaped data, performing hardware AES encryption on the escaped data to obtain encrypted data, and sending the encrypted data through the communication module, all slice transmissions are completed and the acknowledgement is received, and the whole data transmission process is completed.
[0101] The receiving-end decryption data transmission module is used to receive data through the communication module, 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-mentioned device, the data to be sent is processed by the ZSTD compression algorithm to obtain compressed data, the data start symbol, data type and file name are added to the compressed data to obtain marked data, 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.
[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, a CRC check code is calculated for the slice data with the identifier, and the CRC check code is added to the slice header, and an incremental slice sequence number is added to the slice header for the slice data with the CRC.
[0104] If a fragment start character and a fragment end character appear in the transmitted data content, the fragment data with the identifier will be 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, it waits for the receiving end to return a confirmation fragment.
[0106] If a confirmation fragment is received, it is determined whether all fragments have been processed. If not, it continues to send a fragment and waits for the receiving end to return a confirmation fragment until all fragments are transmitted and confirmed. The entire data transmission process is completed;
[0107] If the confirmation fragment is not received within a fixed time or there is a check error flag in the confirmation fragment, the fragment will be retransmitted. If the upper limit of retransmission times is reached, the sending will be stopped and a transmission error will be reported.
[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 it 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 correct data received is processed by removing the segment sequence number and CRC check code to obtain segment data.
[0109] The application provides a device for realizing stable and reliable encrypted data transmission based on a domestic communication module, which decomposes information data transmission into hardware transmission and software interpretation two parts, and the actual execution part runs in a host system and the wireless transmission part runs in an embedded system, and comprises the following modules.
[0110] The communication module runs the wireless transmission part of signals.
[0111] The storage module runs the program and data file storage part.
[0112] The data packaging module slices the transmission data and labels the data type.
[0113] The encoding module encodes the transmission data.
[0114] The compression module runs the data compression algorithm.
[0115] The error correction module judges whether the transmission data has errors or omissions, checks the data, and notifies the sender to retransmit the error data.
[0116] The encryption module encrypts the transmission data.
[0117] The user interaction module displays the received information and files in the form of a webpage for user operation.
[0118] In the above scheme, the files and messages are data directly input by the user, including disk files, system screenshots, text messages,.
[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 scheme, 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 comprises the following steps:
[0122] S1: adding a data start symbol, the data type of this transmission and the file name before sending the data.
[0123] S2: adding a data end symbol after sending the data.
[0124] S3: slicing the data according to the specified size.
[0125] The receiving end in the data packaging module comprises the following steps:
[0126] S1: the receiving end starts to record the received slice data when the data start symbol is received.
[0127] S2: The receiving end stops recording when receiving the data end symbol, and returns the recorded data to the upper layer processing.
[0128] In the above scheme, the sending end in the encoding module includes the following steps:
[0129] S1: Adding a slice start symbol and a slice end symbol at the head and tail of each slice;
[0130] S2: If the slice start symbol and the slice end symbol appear in the transmitted data content, they are escaped. The escaping method is to convert the slice start symbol into an escape symbol and a slice start symbol code, convert the slice end symbol into an escape symbol and a slice end symbol code, and convert the escape symbol into two escape symbols.
[0131] The receiving end in the encoding module includes the following steps
[0132] S1: The receiving end starts recording the received data when receiving the slice start symbol.
[0133] S2: If the received content contains consecutive escape symbols and slice start symbol codes, they are converted into a slice start symbol;
[0134] S3: If the received content contains consecutive escape symbols and slice end symbol codes, they are converted into a slice end symbol;
[0135] S4: If the received content contains two consecutive escape symbols, they are converted into one escape symbol;
[0136] S5: The receiving end stops recording when receiving the slice end symbol, and returns the recorded data to the upper layer processing.
[0137] In the above scheme, the compression module uses the ZSTD compression algorithm.
[0138] In the above scheme, the sending end error correction module includes the following steps:
[0139] S1: For each slice number, an incremental slice sequence number and a CRC check code of the slice content are added in the slice head.
[0140] S2: After sending a slice, the receiving end waits for the receiving end to return the confirmation slice; if the confirmation slice is not received within a fixed time or the confirmation slice contains a check error flag, the slice is retransmitted until the confirmation is successful. If the upper limit of the number of retransmissions is reached, the sending is stopped, and a transmission error is reported.
[0141] The receiving end error correction module includes the following steps:
[0142] The CRC check processing is performed on the unescaped data to determine whether the data is correct, and if correct, a confirmation fragment is sent, and if incorrect, a confirmation fragment with a check error flag is sent to request retransmission.
[0143] In the above scheme, the encryption module uses hardware AES encryption, and the encryption key can be controlled by the upper computer.
[0144] In the above scheme, the user interaction module includes the following steps:
[0145] S1: Start the host system and the embedded system, and the software detects whether the embedded system exists, if exists, start the local port listening;
[0146] S2: Open the local listening port through the browser, set the username, and check whether the upper right corner is green to indicate successful connection;
[0147] S3: The other client repeats the operations of S1-S2;
[0148] S4: User A inputs information, pastes pictures or sends files in the browser, the terminal console outputs the sending progress, and the browser upper right corner gives a blue mark indicating that the information is being transmitted;
[0149] S5: User B checks whether the message is received in the browser, and if not, returns to step S1 to retest;
[0150] S6: User B repeats the action of S4, and checks whether the message is received in the browser of user A.
[0151] Embodiment
[0152] I. Communication module and encryption module
[0153] The communication module of the embodiment uses a domestic chip based on Lora 443MHz wireless communication protocol. It contains a hardware AES encryption function and supports control of the encryption key through the upper computer.
[0154] II. Storage module
[0155] A 64G TF card is used to store running programs and data files.
[0156] III. Data packaging module
[0157] The sending end in the data packaging module of the embodiment includes the following steps:
[0158] S1: Add a data start symbol, the data type of this sending and the file name before sending the data;
[0159] S2: Add a data end symbol after sending the data;
[0160] S3: The data is sliced according to the specified size.
[0161] The receiving end of the data packaging module in the embodiment includes the following steps:
[0162] S1: The receiving end starts recording the received slice data when the data start symbol is received.
[0163] S2: The receiving end stops recording when the data end symbol is received, and returns the recorded data to the upper layer processing.
[0164] Table 1 lists the specific values of the above-mentioned identifiers.
[0165] Table 1 lists the specific values of the above-mentioned identifiers.
[0166]
[0167]
[0168] IV. Encoding module
[0169] The sending end of the encoding module in the embodiment includes the following steps:
[0170] S1: Add the slice start symbol and the slice end symbol to the head and tail of each slice.
[0171] S2: If the slice start symbol and the slice end symbol appear in the transmitted data content, escape them. The escaping method is to convert the slice start symbol into an escape symbol and a slice start symbol code, convert the slice end symbol into an escape symbol and a slice end symbol code, and convert the escape symbol into two escape symbols.
[0172] The receiving end of the encoding module in the embodiment performs a de-escaping operation on the plaintext data to obtain de-escaped data, and includes the following steps:
[0173] S1: The receiving end starts recording the received data when the slice start symbol is received.
[0174] S2: If the received content contains consecutive escape symbols and slice start symbol codes, convert them into a slice start symbol.
[0175] S3: If the received content contains consecutive escape symbols and slice end symbol codes, convert them into a slice end symbol.
[0176] S4: If the received content contains consecutive two escape symbols, convert them into one escape symbol.
[0177] S5: The receiving end stops recording when the slice end symbol is received, and returns the recorded data to the upper layer processing.
[0178] Table 2 lists the specific values of the above-mentioned identifiers.
[0179] Table 2 Values of the identification used by the encoding module of the present embodiment
[0180] Sequence number Identification Value 1 Slice start symbol 0xE4 2 Slice end symbol 0xE5 3 Escape symbol 0xE6 4 Slice start symbol code 0x01 5 Slice end symbol code 0x02
[0181] V. Compression module
[0182] The compression module of the present embodiment uses the ZSTD compression algorithm.
[0183] VI. Error correction module
[0184] The error correction module of the sending end of the present embodiment includes the following steps:
[0185] S1: For each fragment number, add an incremental piece sequence number in the fragment header and the CRC check code of the fragment content.
[0186] S2: After sending a fragment, wait for the receiving end to return an acknowledgment fragment; if no acknowledgment fragment is received within a fixed time or there is a check error flag in the acknowledgment fragment, retransmit the fragment until the acknowledgment is successful. If the upper limit of the number of retransmissions is reached, stop sending and report a transmission error.
[0187] The error correction module of the receiving end of the present embodiment includes the following steps:
[0188] S1: For each received fragment, determine whether the CRC of the piece data is the same as the CRC of the piece header content.
[0189] S2: If they are the same, send an acknowledgment fragment; if they are different, send an acknowledgment fragment with a check error flag.
[0190] VII. User interaction module
[0191] The user interaction module of the present embodiment includes the following steps:
[0192] S1: Start the host system and the embedded system, and the software detects whether the embedded system exists. If it exists, open the local port for listening;
[0193] S2: Open the local listening port through the browser, set the username, and check whether the upper right corner is green to indicate successful connection;
[0194] S3: The other client repeats the operations of S1-S2;
[0195] S4: User A inputs information, pastes pictures, or sends files in the browser, and the terminal console outputs the sending progress. The upper right corner of the browser displays a blue flag indicating that the information is being transmitted.
[0196] S5: User B checks whether the message has been received in the browser. If not, return to step S1 to retest;
[0197] S6: User B repeats the action in 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 scope of protection of the present invention.
Claims
1. A method for achieving stable and reliable encrypted data transmission based on a communication module, characterized in that: The following steps are involved: Transmitter encrypted data transmission is achieved: 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 escaped data; Step A5: Perform hardware AES encryption on the escaped data to obtain encrypted data; Step A6: The encrypted data is sent through the communication module and verified through the error correction module. After all the fragments are transmitted and confirmed, the entire data transmission process is completed; Decryption 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 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: parse the packet data to obtain the data type and compressed data; Step B6: decompress the compressed data using ZSTD to obtain the original data; Step B7: Display the original data through the user interaction module to complete data reception and display.
2. A method for realizing stable and reliable encrypted data transmission based on a communication module according to claim 1, 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: Add the data start symbol, data type and file name to the compressed data to obtain the marked data; Step A1.3: Add a data terminator to the marked transmission data, and fragment it according to the specified size to obtain fragmented data.
3. The method for realizing stable and reliable encrypted data transmission based on a communication module according to claim 1, characterized in that: Step A2 includes: Step A2.1: Add a fragment start character and a fragment end character to the fragment data to obtain fragment 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 identifier 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. The method for realizing stable and reliable encrypted data transmission based on a communication module according to claim 1, characterized in that: The verification performed by the error correction module in step A6 includes: Step A6.1: After sending a fragment, wait for the receiving end to return a confirmation fragment. If a confirmation fragment is received, proceed to step A6.3; otherwise, proceed to step A6.
2. Step A6.2: If the confirmation fragment is not received within a fixed time or the confirmation fragment contains a checksum error flag, the fragment is retransmitted. If the upper limit of retransmission times is reached, the fragment is stopped and a transmission error is reported. Step A6.2: Determine whether all segments have been processed. If not, continue to execute step A6.1 until all segments are transmitted and confirmation is received, completing the entire data transmission process.
5. The method for realizing stable and reliable encrypted data transmission based on a communication module according to claim 1, characterized in that: Step B3 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 incorrect, send a confirmation segment with a checksum 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 achieving 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, 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 the ZSTD compression algorithm to obtain compressed data, the data start symbol, data type and file name are added to the compressed data to obtain marked data, 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. Calculate the CRC check code for the slice data with the identifier 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 identifier will be 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: Verification is performed 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, it is determined whether all fragments have been processed. If not, it continues to send a fragment and waits for the receiving end to return a confirmation fragment until all fragments are transmitted and confirmed. The entire data transmission process is completed; If the confirmation fragment is not received within a fixed time or there is a check error flag in the confirmation fragment, the fragment will be retransmitted. If the upper limit of retransmission times is reached, the sending will be stopped and a transmission error will be reported.
10. The device for realizing stable and reliable encrypted data transmission based on a communication module according to claim 9, characterized in that: Perform de-escaping operation on the plaintext data to obtain de-escaped data, perform CRC check on the de-escaped data to determine whether the data is correct. If correct, send a confirmation segment; if incorrect, 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 segmented data.
Citation Information
Patent Citations
Information transmission system based on data encryption
CN114422230A
Recipient-driven data encryption
US20190103962A1