A data transmission method and system based on portable WiFi network

By detecting WiFi connection status, packets and compressing data on the transmitting device, and using forward error correction encoding when the network quality is poor, the reliability and efficiency problems of the data transmission method based on the portable WiFi network are solved in the case of poor network quality or signal interference, and the reliability and accuracy of data transmission are achieved.

CN118101126BActive Publication Date: 2025-03-14GUANGDONG SIRIUS INTERNET OF THINGS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410044268.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-12
Publication Date
2025-03-14
Estimated Expiration
2044-01-12

AI Technical Summary

Technical Problem

The data transmission method based on the portable WiFi network has problems such as low reliability, susceptibility to interference, and low transmission efficiency, especially when the network quality is poor or signal interference is present.

Method used

By detecting WiFi connection status on the transmitting device, grouping and compressing data, and using forward error correction encoding processing when network quality is poor, redundant information is generated, sharded transmission, and sorting, checking and reorganizing at the receiver, using redundant information for error correction.

Benefits of technology

It realizes reliable transmission and error correction of data in the case of poor network quality or signal interference, ensuring the effectiveness and accuracy of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118101126B_ABST
    Figure CN118101126B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of wireless communication and data transmission, and in particular to a data transmission method and system based on a portable WiFi network. The method comprises the following steps: 1) detecting whether a transmitting end device is connected to an available WiFi network; 2) obtaining data to be transmitted and grouping them into blocks of appropriate size; 3) performing compression encoding processing on each data block; 4) judging whether forward error correction encoding processing is required according to network quality and signal interference; 5-9) generating redundant information and adding it to the data block, performing forward error correction encoding, slicing and reassembling, and sending it to the receiving end device through the WiFi network; 10) the receiving end device sorts, verifies and reorganizes the data blocks, and performs error correction; 11) merging the decoded data blocks and restoring them to the original data output. The scheme is based on detecting connection status, grouping, encoding processing, redundant information generation and forward error correction to achieve reliable transmission and error correction. The receiving end sorts, verifies, reorganizes, and outputs the original data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of wireless communication and data transmission, and in particular to a data transmission method and system based on a portable WiFi network. Background Art

[0002] In modern society, people's demand for efficient and convenient data transmission methods is increasing. Traditional data transmission methods usually rely on wired connections or dedicated wireless networks, while methods based on portable WiFi networks allow users to directly transmit data on mobile devices with WiFi functions, reducing dependence on traditional network infrastructure.

[0003] However, although the data transmission method based on the portable WiFi network has certain advantages, it still has some defects.

[0004] The main drawback of this traditional solution is that the reliability of data transmission is affected when the network quality is poor or there is signal interference. Since portable WiFi networks usually have a small coverage area and are limited by the device's transmission power and environmental factors, the signal strength may be unstable, resulting in data loss or transmission errors. In addition, since portable WiFi networks are often faced with interference sources (such as other WiFi devices or electromagnetic interference), the signal quality is further reduced, increasing the error rate during data transmission.

[0005] Therefore, in traditional solutions, the data transmission method based on portable WiFi network has defects such as low reliability, susceptibility to interference, and low transmission efficiency, which limits its application scope and the stability of data transmission in specific environments. Summary of the invention

[0006] 1. Technical issues to be resolved

[0007] The present invention mainly aims at the above problems and proposes a data transmission method and system based on a portable WiFi network, which aims to solve the problems of low reliability, susceptibility to interference, low transmission efficiency, etc. during data transmission.

[0008] (II) Technical solution

[0009] To achieve the above object, the present invention provides a data transmission method based on a portable WiFi network, comprising the following steps:

[0010] Step 1: On the sending device, check whether the current device is connected to an available WiFi network;

[0011] Step 2: Get the data to be transmitted and group it into blocks of appropriate size;

[0012] Step 3: compress and encode each data block;

[0013] Step 4: Determine whether forward error correction coding is required; if the network quality is poor or there is a possibility of signal interference, perform the following steps 5-9; otherwise, skip steps 5-9;

[0014] Step 5: Generate redundant information for each data block and add it to the data block;

[0015] Step 6: Perform forward error correction encoding on the data block with redundant information, and convert the data block into an encoded form;

[0016] Step 7: Segment and reassemble the encoded data blocks, dividing each data block into smaller segments;

[0017] Step 8: Send the fragmented data block fragments to the receiving device via the WiFi network;

[0018] Step 9: After receiving the data block fragments, the receiving device sorts, verifies and reassembles the received fragments to restore the original data block;

[0019] Step 10: If there is an error, use the redundant information of the forward error correction code to correct the error and restore the original data block;

[0020] Step 11: Merge the decoded data blocks and restore them to original data, and output the restored original data.

[0021] Furthermore, the judgment condition for determining whether the current device is connected to an available WiFi network in step 1 is: detecting the physical connection status between the current device and the WiFi network, and confirming that the device has successfully connected to the WiFi to obtain a valid IP address.

[0022] Furthermore, in step 3, gzip or LZ77 data compression algorithm is used to perform compression encoding processing on each data block.

[0023] Furthermore, the step of determining whether forward error correction coding is required in step 4 includes:

[0024] Before data transmission, obtain the current network signal strength and packet loss rate data;

[0025] Determine whether the network signal strength reaches the minimum signal strength threshold. If so, the network quality is considered good, and forward error correction coding processing is skipped to perform data transmission.

[0026] If the network signal strength does not reach the minimum signal strength threshold, continue to determine the packet loss rate;

[0027] Determine whether the packet loss rate is lower than the maximum packet loss rate threshold. If yes, the network quality is considered good, and the forward error correction coding process is skipped to perform data transmission.

[0028] If the packet loss rate exceeds the maximum packet loss rate threshold, the relevant operations in steps 5-9 are performed and forward error correction coding processing is applied.

[0029] Furthermore, in step 5, the specific steps of generating redundant information for each data block and adding it to the data block are as follows:

[0030] Determine the number of redundancy bits required for each data block;

[0031] Perform an XOR operation on each data bit in the data block and the redundant bit at the corresponding position to generate redundant information;

[0032] Adding the generated redundant information to the end of the data block to form a data block with redundant information;

[0033] The data block with redundant information is used as the input of forward error correction coding.

[0034] Furthermore, in step 7, the specific steps of fragmenting and reassembling the encoded data blocks are as follows:

[0035] Split the data block into fixed-size segments based on the size of the data block and transmission requirements;

[0036] Add a sequence number before each fragment and calculate the checksum of each fragment;

[0037] Send all the fragments with sequence numbers and checksums to the receiving device in order;

[0038] After receiving the fragments, the receiving device sorts the fragments according to the sequence number;

[0039] Each fragment is checked. If the checksum of a fragment does not match the expected value, the fragment is considered to be erroneous or lost.

[0040] Reassemble the data block based on the fragment sequence number and checksum results.

[0041] Furthermore, in step 2, the data to be transmitted is prioritized, and high priority data blocks are transmitted first.

[0042] To achieve the above object, the present invention provides a data transmission system based on a portable WiFi network, the system comprising:

[0043] WiFi connection detection module, used to detect whether the current device is connected to an available WiFi network, confirm the physical connection status and obtain a valid IP address;

[0044] A data acquisition and grouping module, which is used to acquire the data to be transmitted and divide it into blocks of appropriate size for subsequent processing and transmission;

[0045] The data compression and encoding module is used to perform compression and encoding processing on each data block, using algorithms such as gzip or LZ77;

[0046] A forward error correction coding judgment module is used to judge whether forward error correction coding processing is required based on the current network signal strength and packet loss rate data;

[0047] A redundant information generation and addition module is used to generate redundant information for each data block, and combine the redundant bits with the data bits through an XOR operation to form a data block with redundant information;

[0048] A forward error correction coding and sharding module is used to perform forward error correction coding on data blocks with redundant information, convert the data blocks into coded form, and perform sharding to divide each data block into smaller fragments;

[0049] A WiFi transmission module is used to send the fragmented data block fragments to the receiving end device through wireless transmission, using the WiFi network for data transmission;

[0050] WiFi connection detection module, used to detect whether the current device is connected to an available WiFi network, confirm the physical connection status and obtain a valid IP address;

[0051] A data receiving and sorting module, used to receive data block fragments transmitted from a transmitting device via WiFi, and sort the received fragments;

[0052] A checksum verification module is used to check and verify the received fragments, determine whether there are errors or missing fragments, and record the verification results;

[0053] A forward error correction decoding module, used to use the redundant information of the forward error correction code to perform error correction on the received data block and restore the original data block;

[0054] The data reassembly module is used to reassemble the data blocks according to the sequence numbers and verification results of the fragments, merge and decode the fragments, and restore them to the original data;

[0055] The original data output module is used to output the original data after reorganization and decoding.

[0056] (III) Beneficial effects

[0057] Compared with the prior art, the present invention provides a data transmission method and system based on a portable WiFi network. The data transmission method based on the portable WiFi network achieves reliable data transmission and error correction in the case of poor network quality or signal interference through the steps of detecting device connection status, grouping data, compressing and encoding, generating redundant information and forward error correction coding. The receiving end device can sort, check and reorganize the received data fragments, restore the original data blocks, and use the redundant information of the forward error correction coding to correct errors, and finally output the restored original data to ensure the effect and accuracy of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 This is a flow chart of a data transmission method based on a portable WiFi network disclosed in this application.

[0059] Figure 2 This is a framework diagram of a data transmission system based on a portable WiFi network disclosed in this application. DETAILED DESCRIPTION

[0060] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0061] like Figure 1 As shown, the present invention provides a data transmission method based on a portable WiFi network, comprising the following steps:

[0062] Step 1: On the sending device, check whether the current device is connected to an available Wi-Fi network;

[0063] Step 2: Get the data to be transmitted and group it into blocks of appropriate size;

[0064] Step 3: compress and encode each data block;

[0065] Step 4: Determine whether forward error correction coding is required; if the network quality is poor or there is a possibility of signal interference, perform the following steps 5-9; otherwise, skip steps 5-9;

[0066] Step 5: Generate redundant information for each data block and add it to the data block;

[0067] Step 6: Perform forward error correction encoding on the data block with redundant information, and convert the data block into an encoded form;

[0068] Step 7: Segment and reassemble the encoded data blocks, dividing each data block into smaller segments;

[0069] Step 8: Send the fragmented data block fragments to the receiving device through the WiFi network;

[0070] Step 9: After receiving the data block fragments, the receiving device sorts, verifies and reassembles the received fragments to restore the original data block;

[0071] Step 10: If there is an error, use the redundant information of the forward error correction code to correct the error and restore the original data block;

[0072] Step 11: Merge the decoded data blocks and restore them to original data, and output the restored original data.

[0073] The above scheme describes the steps when transmitting data using a WiFi network. First, the sending device detects whether it is connected to an available WiFi network. Then, the data to be transmitted is divided into small blocks and compressed and encoded to reduce the amount of data. If the network quality is poor or there is signal interference, additional error correction measures will be taken. These measures include adding redundant information to the data blocks and converting them into special forms. Next, the data blocks are divided into smaller fragments and sent to the receiving device through the WiFi network. After receiving these fragments, the receiving device sorts, verifies and assembles them to restore the original data blocks. If errors occur, redundant information is used to correct the errors and ensure the accuracy of the data blocks. Finally, the corrected data blocks are merged, restored to the original data, and output to the user. This ensures that the data transmitted on the WiFi network is complete and reliable.

[0074] It can be understood that suppose a high-definition photo is sent from a mobile phone to a computer via WiFi. First, check whether the mobile phone is connected to an available WiFi network. Select the photo to be sent and divide it into smaller data blocks, such as each data block containing a part of the photo. Perform compression encoding on each data block to reduce the file size and facilitate transmission. Determine whether forward error correction coding is required based on the WiFi signal quality and interference. If forward error correction coding is required, redundant information is generated for each data block, such as adding some additional check data to each data block. Perform forward error correction coding to convert the data block into a coded form, which contains redundant information. The coded data block is fragmented again, splitting each data block into smaller fragments. These fragmented data block fragments are sent to the computer via the WiFi network. After the computer receives the data block fragments, it sorts, verifies and reassembles them to restore the original data block. If some errors occur during the transmission process, such as a fragment of a data block is lost or damaged, the computer can use the redundant information of the forward error correction coding to correct the errors and restore the original data block. Finally, the decoded data blocks are merged and restored to the original photo, and then the complete high-definition photo is displayed on the computer. In this way, even if there are some interference or errors during the WiFi transmission process, a complete and accurate photo can still be received.

[0075] In this embodiment, in step 1, determining whether the current device is connected to an available WiFi network is to ensure that a valid physical connection is established between the device and the WiFi network and a valid IP address is successfully obtained. The determination conditions involve two aspects:

[0076] Physical connection status: The device needs to detect the physical connection status between itself and the WiFi network, including signal strength, connection stability, etc. If the device cannot establish a physical connection with the WiFi network, or the connection is very unstable, data transmission may be interrupted or lost.

[0077] Get a valid IP address: After connecting to a WiFi network, the device needs to obtain a valid IP address through DHCP (Dynamic Host Configuration Protocol) or static IP settings. The IP address is the address that uniquely identifies the device in the network. If the device fails to successfully obtain a valid IP address, it will not be able to communicate with other devices or access the Internet.

[0078] By detecting the physical connection status and confirming that a valid IP address is obtained, you can ensure that the device has been properly connected to an available WiFi network. In this way, before data transmission, you can be sure that the device has good network connection conditions to ensure smooth data transmission and reception.

[0079] In step 3, the purpose of using the gzip or LZ77 data compression algorithm to compress and encode each data block is to reduce the file size of the data block so that it occupies less network bandwidth and storage space during transmission.

[0080] It needs to be explained that gz ip is a commonly used data compression algorithm, which uses the DEFLATE algorithm for compression. LZ77 is a dictionary compression algorithm based on a sliding window. It achieves compression by utilizing repeated fragments in data blocks. The LZ77 algorithm represents repeated fragments as a combination of pointers to previous occurrences and lengths. By storing only pointer and length information, rather than the repeated data itself, the size of the data block can be significantly reduced.

[0081] How to decide whether to perform forward error correction coding processing, specifically, this step first obtains the current network signal strength and packet loss rate data before data transmission. These two indicators are important parameters for measuring the quality of the network environment and can affect the stability and speed of data transmission. Then, it is determined whether the network signal strength has reached the minimum signal strength threshold. If it reaches or exceeds this threshold, it means that the network quality is good, and forward error correction coding processing is not required, and data transmission can be carried out directly. Otherwise, it is necessary to further determine the packet loss rate of the network. The packet loss rate is judged to see if it is lower than the maximum packet loss rate threshold. If it is lower than this threshold, it means that the network quality is good, and forward error correction coding processing can still be skipped for data transmission. However, if the packet loss rate exceeds the maximum packet loss rate threshold, the network environment may be poor, and the relevant operations in steps 5-9 will be executed at this time, that is, forward error correction coding processing will be enabled. Forward error correction coding can generate additional redundant data so that possible errors can be detected and corrected at the receiving end, thereby improving the reliability of data transmission.

[0082] In this embodiment, in step 5, the specific steps of generating redundant information for each data block and adding it to the data block are as follows: For each data block to be sent, first determine how many redundant bits need to be added. Redundant bits can help us find and fix problems when data is transmitted incorrectly. After that, perform an XOR operation on each data bit (0 or 1) in the data block and the redundant bit at the corresponding position. In computer science, the XOR operation is a basic logical operation that compares two bits (i.e., 0 or 1). If the two bits are the same, the result is 0, and if the two bits are different, the result is 1. The information generated in this way is redundant information. Then, add the generated redundant information to the end of the data block. In this way, the original data block carries redundant information, forming a new, longer data block. Finally, this data block with redundant information can be used as input for forward error correction coding. In other words, this data block with redundant information can be used for data transmission. After receiving the data, the receiving end can use this redundant information to check whether there is an error and correct it, thereby ensuring the correctness of the data.

[0083] How to fragment and reassemble the encoded data blocks during the data transmission process to improve the efficiency and accuracy of data transmission. The specific steps are as follows:

[0084] First, the large data block is divided into a series of small, fixed-size fragments according to the size of the data block and the transmission requirements. Then, in order to correctly reassemble these fragments at the receiving end, a sequence number is added in front of each fragment. At the same time, the checksum of each fragment is calculated. Then all the fragments with sequence numbers and checksums are sent to the receiving device in sequence. When the receiving device receives these fragments, it can arrange them according to the sequence numbers in front of the fragments to get the correct order. At the same time, the receiving end will also check each fragment to see if the checksum of each fragment matches the checksum calculated when sending. If it does not match, it means that the fragment may have an error or was lost during the transmission process. Finally, based on the sequence number and checksum results of the fragments, the receiving end can reassemble these fragments and restore the original large data block. Through this process, the efficiency of data transmission can be improved (because small fragments are easier to transmit) and the accuracy of the data can be ensured (errors are detected and corrected through sequence numbers and checksums).

[0085] In step 2, the data to be transmitted is prioritized, and high priority data blocks are transmitted first.

[0086] like Figure 2 As shown, this embodiment also provides a data transmission system based on a portable WiFi network, characterized in that the system includes:

[0087] WiFi connection detection module, used to detect whether the current device is connected to an available WiFi network, confirm the physical connection status and obtain a valid IP address;

[0088] A data acquisition and grouping module, which is used to acquire the data to be transmitted and divide it into blocks of appropriate size for subsequent processing and transmission;

[0089] The data compression and encoding module is used to perform compression and encoding processing on each data block, using algorithms such as gzip or LZ77;

[0090] A forward error correction coding judgment module is used to judge whether forward error correction coding processing is required based on the current network signal strength and packet loss rate data;

[0091] A redundant information generation and addition module is used to generate redundant information for each data block, and combine the redundant bits with the data bits through an XOR operation to form a data block with redundant information;

[0092] A forward error correction coding and sharding module is used to perform forward error correction coding on data blocks with redundant information, convert the data blocks into coded form, and perform sharding to divide each data block into smaller fragments;

[0093] A WiFi transmission module is used to send the fragmented data block fragments to the receiving end device through wireless transmission, using the WiFi network for data transmission;

[0094] WiFi connection detection module, used to detect whether the current device is connected to an available WiFi network, confirm the physical connection status and obtain a valid IP address;

[0095] A data receiving and sorting module, used to receive data block fragments transmitted from a transmitting device via WiFi, and sort the received fragments;

[0096] A checksum verification module is used to check and verify the received fragments, determine whether there are errors or missing fragments, and record the verification results;

[0097] A forward error correction decoding module, used to use the redundant information of the forward error correction code to perform error correction on the received data block and restore the original data block;

[0098] The data reassembly module is used to reassemble the data blocks according to the sequence numbers and verification results of the fragments, merge and decode the fragments, and restore them to the original data;

[0099] The original data output module is used to output the original data after reorganization and decoding.

[0100] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A data transmission method based on a portable WiFi network, characterized in that: The following steps are involved: Step 1: On the sending device, check whether the current device is connected to an available WiFi network; Step 2: Get the data to be transmitted and group it into blocks of appropriate size; Step 3: compress and encode each data block; Step 4: Determine whether forward error correction coding is required; if the network quality is poor or there is a possibility of signal interference, perform the following steps 5-9; otherwise, skip steps 5-9; Step 5: Generate redundant information for each data block and add it to the data block; Step 6: Perform forward error correction encoding on the data block with redundant information, and convert the data block into an encoded form; Step 7: Segment and reassemble the encoded data blocks, dividing each data block into smaller segments; Step 8: Send the fragmented data block fragments to the receiving device via the WiFi network; Step 9: After receiving the data block fragments, the receiving device sorts, verifies and reassembles the received fragments to restore the original data block; If an error is found during this process, the redundant information of the forward error correction code is used to correct the error and restore the original data block; Step 10: Merge the decoded data blocks and restore them to original data, and output the restored original data; In step 4, the step of determining whether forward error correction coding is required includes: obtaining current network signal strength and packet loss rate data before data transmission; determining whether the network signal strength reaches a minimum signal strength threshold, if it reaches or exceeds the minimum signal strength threshold, no forward error correction coding is performed, and data transmission is performed directly; otherwise, it is necessary to further determine the packet loss rate of the network; determining the packet loss rate to see whether it is lower than a maximum packet loss rate threshold, if it is lower than the maximum packet loss rate threshold, skipping the forward error correction coding and performing data transmission, if the packet loss rate exceeds the maximum packet loss rate threshold, executing steps 5-9; In step 5, the step of generating redundant information for each data block and adding it to the data block includes: determining how many redundant bits need to be added for each data block to be sent; performing an XOR operation on each data bit in the data block and the redundant bit at the corresponding position to generate redundant information; adding the generated redundant information to the end of the data block to form a data block with redundant information; and using the data block with redundant information for data transmission; In step 9, after receiving the data block fragments, the receiving device sorts, verifies and reassembles the received fragments to restore the original data block; if an error is found in this process, the redundant information of the forward error correction code is used to correct the error, and the steps of restoring the original data block include: dividing the large data block into a series of small, fixed-size fragments according to the size of the data block and the transmission requirements; adding a sequence number before each fragment and calculating the checksum of each fragment; sending all the fragments with sequence numbers and checksums to the receiving device in sequence; when the receiving device receives the fragments with sequence numbers and checksums, it arranges them according to the sequence numbers before the fragments to obtain the correct sequence; the receiving end verifies each fragment to determine whether the checksum of each fragment matches the checksum calculated when sending; if they do not match, it means that the fragment has an error or is lost during the transmission process; according to the sequence number and check result of the fragment, the receiving end reassembles the fragment to restore the original large data block.

2. A data transmission method based on a portable WiFi network as claimed in claim 1, characterized in that: in, The judgment condition for determining whether the current device is connected to an available WiFi network in step 1 is: detecting the physical connection status between the current device and the WiFi network, and confirming that the device has successfully connected to the WiFi to obtain a valid IP address.

3. A data transmission method based on a portable WiFi network as claimed in claim 1, characterized in that: In step 3, each data block is compressed and encoded using the gzip or LZ77 data compression algorithm.

4. A data transmission method based on a portable WiFi network as claimed in claim 1, characterized in that: The step of determining whether forward error correction coding is required in step 4 includes: Before data transmission, obtain the current network signal strength and packet loss rate data; Determine whether the network signal strength reaches the minimum signal strength threshold. If so, the network quality is considered good, and forward error correction coding processing is skipped to perform data transmission. If the network signal strength does not reach the minimum signal strength threshold, continue to determine the packet loss rate; Determine whether the packet loss rate is lower than the maximum packet loss rate threshold. If yes, the network quality is considered good, and the forward error correction coding process is skipped to perform data transmission. If the packet loss rate exceeds the maximum packet loss rate threshold, the relevant operations in steps 5-9 are performed and forward error correction coding processing is applied.

5. A data transmission method based on a portable WiFi network as claimed in claim 1, characterized in that: In step 5, the specific steps of generating redundant information for each data block and adding it to the data block are as follows: Determine the number of redundancy bits required for each data block; Perform an XOR operation on each data bit in the data block and the redundant bit at the corresponding position to generate redundant information; Adding the generated redundant information to the end of the data block to form a data block with redundant information; The data block with redundant information is used as the input of forward error correction coding.

6. A data transmission method based on a portable WiFi network as claimed in claim 1, characterized in that: In step 7, the specific steps of fragmenting and reassembling the encoded data blocks are as follows: Split the data block into fixed-size segments based on the size of the data block and transmission requirements; Add a sequence number before each fragment and calculate the checksum of each fragment; Send all the fragments with sequence numbers and checksums to the receiving device in order; After receiving the fragments, the receiving device sorts the fragments according to the sequence number; Each fragment is checked. If the checksum of a fragment does not match the expected value, the fragment is considered to be erroneous or lost. Reassemble the data block based on the fragment sequence number and checksum results.

7. A data transmission method based on a portable WiFi network as claimed in claim 1, characterized in that: In step 2, the data to be transmitted is prioritized, and high priority data blocks are transmitted first.

8. A data transmission system based on a portable WiFi network, characterized in that: The system comprises: WiFi connection detection module, used to detect whether the current device is connected to an available WiFi network, confirm the physical connection status and obtain a valid IP address; A data acquisition and grouping module, which is used to acquire the data to be transmitted and divide it into blocks of appropriate size for subsequent processing and transmission; The data compression and encoding module is used to perform compression and encoding processing on each data block, using algorithms such as gzip or LZ77; A forward error correction coding judgment module is used to judge whether forward error correction coding processing is needed based on the current network signal strength and packet loss rate data; A redundant information generation and addition module is used to generate redundant information for each data block, and combine the redundant bits with the data bits through an XOR operation to form a data block with redundant information; A forward error correction coding and sharding module is used to perform forward error correction coding on data blocks with redundant information, convert the data blocks into coded form, and perform sharding to divide each data block into smaller fragments; A WiFi transmission module is used to send the fragmented data block fragments to the receiving end device through wireless transmission, using the WiFi network for data transmission; WiFi connection detection module, used to detect whether the current device is connected to an available WiFi network, confirm the physical connection status and obtain a valid IP address; A data receiving and sorting module, used to receive data block fragments transmitted from a transmitting device via WiFi, and sort the received fragments; A checksum verification module is used to check and verify the received fragments, determine whether there are errors or missing fragments, and record the verification results; A forward error correction decoding module, used to use the redundant information of the forward error correction code to perform error correction on the received data block and restore the original data block; The data reassembly module is used to reassemble the data blocks according to the sequence numbers and verification results of the fragments, merge and decode the fragments, and restore them to the original data; The original data output module is used to output the original data after reorganization and decoding; The step of determining whether forward error correction coding is required includes: obtaining current network signal strength and packet loss rate data before data transmission; determining whether the network signal strength reaches a minimum signal strength threshold, if it reaches or exceeds the minimum signal strength threshold, no forward error correction coding is performed, and data transmission is performed directly; otherwise, the packet loss rate of the network needs to be further determined; the packet loss rate is determined to see whether it is lower than a maximum packet loss rate threshold, if it is lower than the maximum packet loss rate threshold, the forward error correction coding is skipped, and data transmission is performed; if the packet loss rate exceeds the maximum packet loss rate threshold, the following steps are performed: Generate redundant information for each data block and add it to the data block; Performing forward error correction encoding on the data block with redundant information, and converting the data block into an encoded form; Fragment and reassemble the encoded data blocks, dividing each data block into smaller fragments; Send the fragmented data block fragments to the receiving device via the WiFi network; After receiving the data block fragments, the receiving device sorts, verifies and reassembles the received fragments to restore the original data block; if an error is found in the process, the redundant information of the forward error correction code is used to correct the error and restore the original data block; The steps of generating redundant information for each data block and adding it to the data block include: determining how many redundant bits need to be added for each data block to be sent; performing an XOR operation on each data bit in the data block and the redundant bit at the corresponding position to generate redundant information; adding the generated redundant information to the end of the data block to form a data block with redundant information; and using the data block with redundant information for data transmission; After receiving the data block fragments, the receiving device sorts, verifies and reassembles the received fragments to restore the original data block; if an error is found in the process, the redundant information of the forward error correction code is used to correct the error. The steps of restoring the original data block include: dividing the large data block into a series of small, fixed-size fragments according to the size of the data block and the transmission requirements; adding a sequence number in front of each fragment and calculating the checksum of each fragment; sending all the fragments with sequence numbers and checksums to the receiving device in sequence; when the receiving device receives the fragments with sequence numbers and checksums, it arranges them according to the sequence numbers in front of the fragments to obtain the correct sequence; the receiving end verifies each fragment to determine whether the checksum of each fragment matches the checksum calculated when sending; if it does not match, it means that the fragment has an error or is lost during the transmission process; according to the sequence number and check result of the fragment, the receiving end reassembles the fragments to restore the original large data block.

Citation Information

Patent Citations

  • Method and device for verifying data recovered by forward error correction

    CN101662339A

  • Video data transmission method and system

    CN105791891A