File transmission method for long-distance wireless communication

By dynamically adjusting transmission parameters in long-distance wireless communication and adopting appropriate coding solutions, the problem of large file transmission in low bandwidth and high packet loss environments is solved, efficient and reliable file transmission is achieved, and suitable for low-computing equipment.

CN120201021APending Publication Date: 2025-06-24POWER RES INST OF STATE GRID SHAANXI ELECTRIC POWER CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510377822.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

In a channel environment with low bandwidth and high packet loss rate, how to achieve large file transmission and ensure the efficiency and reliability of the algorithm on low computing power devices.

Method used

By evaluating channel quality, dynamically adjusting transmission parameters, such as shard size and redundancy rate, using Reed-Solomon encoding with mixed redundancy rates, and performing CRC32 and SHA-256 verification on the receiver side, realizing reliable file transmission.

Benefits of technology

It improves bandwidth utilization, reduces transmission time and energy consumption, is suitable for running on low-computing equipment, and ensures data integrity and correctness in a high packet loss environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120201021A_ABST
    Figure CN120201021A_ABST
Patent Text Reader

Abstract

The invention relates to a file transmission method for long-distance wireless communication. Comprising the following steps: evaluating channel quality of long-distance wireless communication and acquiring an initial packet loss rate; calculating a transmission parameter according to the initial packet loss rate, wherein the transmission parameter at least comprises a fragment size and a redundancy rate; fragmenting a to-be-transmitted file at the sending end according to the fragmentation size, and encoding according to the redundancy rate; splicing the fragmented data at a receiving end and checking file integrity; and acquiring a real-time packet loss rate in a file transmission process, and dynamically adjusting the transmission parameters according to the real-time packet loss rate. By dynamically adjusting the transmission parameters, the bandwidth utilization rate is improved, and the transmission time and energy consumption are reduced. Calculation of the fragment size and the redundancy rate is based on a simple linear formula, basic addition, subtraction, multiplication and division operation is involved, the operation can be rapidly completed in a real-time environment, a large number of computing resource algorithms are not occupied, and therefore the method is more suitable for running on low-computing-power equipment such as ESP32.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of communication technologies, and in particular, to a file transmission method for long-distance wireless communication. Background Art

[0002] Long Range (LoRa) wireless communication is widely used in Internet of Things (IoT) scenarios due to its low power consumption and long-distance characteristics. However, its transmission rate is low (the typical value is several kbps), and combined with environmental interference, it may lead to a high packet loss rate, making it difficult to transmit large files. In addition, low-computing-power devices have limitations in computing power and memory, and traditional complex algorithms are difficult to run effectively on these devices.

[0003] The following problems exist in the related technologies: how to achieve large file transmission in a low-bandwidth and high-packet-loss-rate channel environment; how to achieve reliable verification and efficient retransmission with limited hardware resources (low-computing-power devices); how to ensure the efficiency and reliability of algorithms while adapting to low-computing-power devices.

[0004] Therefore, it is necessary to improve one or more problems existing in the above-mentioned related technical solutions.

[0005] It should be noted that this part aims to provide background or context for the technical solutions of the present invention stated in the claims. The description herein is not admitted to be prior art merely because it is included in this part. Summary of the Invention

[0006] The purpose of the present invention is to provide a file transmission method for long-distance wireless communication, so as to at least partly solve one or more problems caused by the limitations and defects of the related technologies.

[0007] The present invention provides a file transmission method for long-distance wireless communication, including:

[0008] Evaluating the channel quality of long-distance wireless communication and obtaining the initial packet loss rate;

[0009] Calculating transmission parameters according to the initial packet loss rate, where the transmission parameters at least include the fragment size and the redundancy rate;

[0010] Fragmenting the file to be transmitted according to the fragment size at the sending end and encoding according to the redundancy rate;

[0011] Assembling the fragmented data at the receiving end and verifying the integrity of the file;

[0012] Obtaining the real-time packet loss rate during the file transmission process and dynamically adjusting the transmission parameters according to the real-time packet loss rate.

[0013] Optionally, the step of obtaining the real-time packet loss rate during file transmission and dynamically adjusting the transmission parameters according to the real-time packet loss rate includes:

[0014] The shard size S is calculated according to the following formula:

[0015] S = S min +(S max -S min )×(1 - P loss )

[0016] where S min and S max are the minimum shard size and the maximum shard size respectively, and P loss is the real-time packet loss rate.

[0017] Optionally, the step of fragmenting the file to be transmitted according to the shard size and encoding according to the redundancy rate at the sending end includes:

[0018] Encoding the fragmented data using RS coding with a hybrid redundancy rate.

[0019] Optionally, the step of obtaining the real-time packet loss rate during file transmission and dynamically adjusting the transmission parameters according to the real-time packet loss rate includes:

[0020] The redundancy rate R is calculated according to the following formula:

[0021] R = R min +(R max -R min )×P loss

[0022] where R is the current redundancy rate, and the value range is [R min , R max ;

[0023] The RS coding parameter n is calculated according to the following formula:

[0024]

[0025] where k is the data block size, represents rounding up.

[0026] Optionally, the step of assembling the fragmented data and verifying the file integrity at the receiving end includes:

[0027] Using CRC32 checksum to verify the data integrity of each fragmented data.

[0028] Optionally, the step of assembling the fragmented data and verifying the file integrity at the receiving end includes:

[0029] Use SHA-256 to perform integrity verification on the reorganized transmission file.

[0030] Optionally, the transmission parameter further includes the maximum number of retransmissions;

[0031] Set the NACK mechanism according to the maximum number of retransmissions, and transmit NACK signals at the receiving end according to the NACK mechanism.

[0032] Optionally, the step of obtaining the real-time packet loss rate during file transmission and dynamically adjusting the transmission parameter according to the real-time packet loss rate includes:

[0033] The maximum number of retransmissions N max Calculate according to the following formula:

[0034]

[0035] where P loss is the real-time packet loss rate, N base is the basic number of retransmissions, N scale is the scaling factor of the number of retransmissions, represents rounding up.

[0036] Optionally, the transmission parameter further includes the spreading factor SF and the bandwidth BW;

[0037] Increase the spreading factor SF and decrease the bandwidth BW when the real-time packet loss rate increases;

[0038] Decrease the spreading factor SF and increase the bandwidth BW when the real-time packet loss rate decreases.

[0039] The technical solution provided by the present invention may include the following beneficial effects:

[0040] In the present invention, by dynamically adjusting the transmission parameter, the bandwidth utilization rate is improved, and the transmission time and energy consumption are reduced. And the calculation of the fragment size and the redundancy rate is based on a simple linear formula, involving basic arithmetic operations of addition, subtraction, multiplication and division, which can be quickly completed in a real-time environment and will not occupy a large amount of computing resources of the algorithm, so it is more suitable for running on low-computing-power devices such as ESP32. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The drawings here are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present invention, and are used together with the specification to explain the principles of the present invention. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.

[0042] Figure 1Schematic flowchart of a file transmission method for long - distance wireless communication in an exemplary embodiment of the present invention;

[0043] Figure 2 Schematic diagram of the system framework for long - distance wireless communication in an exemplary embodiment of the present invention;

[0044] Figure 3 Schematic flowchart of the transmitting end for long - distance wireless communication in an exemplary embodiment of the present invention;

[0045] Figure 4 Schematic flowchart of the receiving end for long - distance wireless communication in an exemplary embodiment of the present invention. Detailed implementation manners

[0046] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this invention will be more complete and comprehensive, and will fully convey the concept of the example embodiments to those skilled in the art. The features, structures, or characteristics described may be combined in any suitable manner in one or more embodiments.

[0047] In addition, the drawings are only schematic illustrations of the embodiments of the present invention and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repeated description will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities.

[0048] The present invention provides a file transmission method for long - distance wireless communication. As shown in Figure 1 , it includes:

[0049] Step S100: Evaluate the channel quality of long - distance wireless communication and obtain the initial packet loss rate.

[0050] Step S200: Calculate transmission parameters according to the initial packet loss rate, where the transmission parameters at least include the shard size and the redundancy rate.

[0051] Step S300: Shard the file to be transmitted according to the shard size at the transmitting end and perform encoding according to the redundancy rate.

[0052] Step S400: Assemble the sharded data at the receiving end and verify the file integrity.

[0053] Step S500: Obtain the real - time packet loss rate during the file transmission process and dynamically adjust the transmission parameters according to the real - time packet loss rate.

[0054] It should be understood that: (1) The large file is divided into several blocks through a dynamic sharding algorithm, and the shard size is dynamically adjusted according to the channel quality and device computing power; (2) Each block of data is encoded with Reed-Solomon (RS) error correction coding with a hybrid redundancy rate, and the redundancy is dynamically adjusted according to the channel quality to generate several redundant packets; (3) The shard number, packet number, total number of packets, CRC check code, and redundancy information are embedded in the data packet; (4) The NACK retransmission mechanism and the maximum number of retransmissions are used to achieve reliable shard transmission; (5) At the receiving end, the sharded data is assembled, and the file integrity is verified through SHA-256; (6) According to the real-time channel quality, packet loss rate, and device performance, the transmission parameters are dynamically adjusted, including the shard size, redundancy rate, number of retransmissions, and LoRa modulation parameters.

[0055] It should also be understood that the data structure of this application is simple: simple arrays or linked lists are used to store data packet information, without the need for complex data structures. Each data packet contains the following fields:

[0056] Packet Header: The packet header contains the shard number, packet number, and total number of packets. Among them, the shard number (FragmentID): is used to identify the shard order. The packet number (Packet ID): is used to identify which packet in the current shard. The total number of packets (Total Packets): is the total number of packets into which the current shard is divided.

[0057] Data: The actual payload data.

[0058] Check Code (CRC32): is used for data verification.

[0059] It should also be understood that the data packet structure of this application is optimized: the packet header is simplified, the proportion of the data payload in a single data packet is increased, and the bandwidth utilization rate is improved.

[0060] It should also be understood that the shard storage of this application is optimized: the receiving end only needs to cache the data of the current shard, avoiding the need for a large amount of memory.

[0061] It should also be understood that this application is suitable for low-computing-power devices: the computational complexity of the algorithm is low, and the memory and storage requirements are small, making it suitable for running on low-computing-power devices such as ESP32.

[0062] It should also be understood that this application has high efficiency: the transmission parameters are dynamically adjusted, improving the bandwidth utilization rate and reducing the transmission time and energy consumption.

[0063] It should also be understood that this application has reliability: through mathematical analysis and actual tests, the reliability of the algorithm in a high packet loss rate environment is proven, ensuring the integrity and correctness of the data.

[0064] By adopting the above file transmission method for long - distance wireless communication, the bandwidth utilization rate is improved, and the transmission time and energy consumption are reduced through dynamic adjustment of transmission parameters. And the calculation of the fragment size and redundancy rate is based on a simple linear formula, involving basic arithmetic operations of addition, subtraction, multiplication, and division, which can be quickly completed in a real - time environment without occupying a large amount of computing resources of the algorithm. Therefore, it is more suitable for running on low - computing - power devices such as ESP32.

[0065] Next, reference will be made to Figures 1 to 4 to describe each step of the above file transmission method for long - distance wireless communication in the present exemplary embodiment in more detail.

[0066] In some embodiments, step S500 includes:

[0067] The fragment size S is calculated according to the following formula:

[0068] S = S min +(S max - S min )×(1 - P loss )

[0069] where S min and S max are the minimum fragment size and the maximum fragment size respectively, and P loss is the real - time packet loss rate.

[0070] It should be understood that as shown in reference Figure 2 , the large file is fragmented according to a dynamic size, and the fragment size is adjusted according to the real - time channel quality and device computing power. Adaptive fragment size: Dynamically adjust the fragment size S according to the channel condition. When the channel is good, increase S, reduce the number of fragments, and reduce the transmission overhead.

[0071] In some embodiments, step S300 includes:

[0072] Encode the fragmented data using RS coding with a hybrid redundancy rate.

[0073] It should be understood that as shown in reference Figure 2 , for low - computing - power devices, the RS coding is optimized by selecting a smaller code length n and data block size k to reduce the computational complexity.

[0074] In some embodiments, step S500 includes:

[0075] The redundancy rate R is calculated according to the following formula:

[0076] R = R min +(R max - R min )×Ploss

[0077] Among them, R is the current redundancy rate, and the value range is [R min , R max ;

[0078] The RS coding parameter n is calculated according to the following formula:

[0079]

[0080] Among them, k is the data block size, represents rounding up.

[0081] It should be understood that as shown in reference Figure 2 , for the Reed - Solomon (RS) error - correcting coding with a hybrid redundancy rate, the redundancy is dynamically adjusted according to the channel quality. Adaptive redundancy rate: When the channel is good, the redundancy rate R is reduced to reduce the transmission of redundant data and increase the proportion of effective data.

[0082] In some embodiments, step S400 includes:

[0083] Verify the data integrity of each shard data using the CRC32 checksum.

[0084] It should be understood that as shown in reference Figure 4 , CRC check at the shard level: Using the CRC32 checksum can quickly detect data errors at the shard level and avoid the accumulation of incorrect data.

[0085] In some embodiments, step S400 includes:

[0086] Verify the integrity of the recombined transmission file using SHA - 256.

[0087] It should be understood that as shown in reference Figure 4 , SHA - 256 check at the file level: After recombining the entire file, using the SHA - 256 check can verify the integrity of the file to ensure that no data has been tampered with or omitted. The receiving end reassembles the data according to the shard number and packet number to complete the recovery of the large file.

[0088] In some embodiments, as shown in reference Figure 3 and Figure 4 , the transmission parameter further includes the maximum number of retransmissions; set the NACK mechanism according to the maximum number of retransmissions, and transmit NACK signals at the receiving end according to the NACK mechanism.

[0089] It should be understood that the use of simple NACK retransmission instead of complex window control protocols reduces the requirements for computing and memory. The receiving end only requests the missing data packets that are needed, reducing unnecessary data transmission. Maximum retransmission count control: To prevent infinite retransmission due to channel anomalies and ensure the stability of the system.

[0090] In some embodiments, step S500 includes:

[0091] The maximum retransmission count N max is calculated according to the following formula:

[0092]

[0093] where P loss is the real-time packet loss rate, N base is the base retransmission count, N scale is the scaling factor of the retransmission count, represents rounding up.

[0094] It should be understood that reducing the retransmission count: Through RS coding, the receiving end can correct errors within a certain range without requesting retransmission, reducing the retransmission count and waiting time.

[0095] In some embodiments, as shown in Figure 3 and Figure 4 , the transmission parameters further include the spreading factor SF and the bandwidth BW.

[0096] Increase the spreading factor SF and decrease the bandwidth BW when the real-time packet loss rate increases.

[0097] Decrease the spreading factor SF and increase the bandwidth BW when the real-time packet loss rate decreases.

[0098] It should be understood that according to the real-time channel quality, packet loss rate, and device performance, the following parameters are dynamically adjusted: fragment size S; redundancy rate R; maximum retransmission count Nmax; modulation parameters (such as spreading factor SF, bandwidth BW).

[0099] 1) The channel condition deteriorates (the packet loss rate increases):

[0100] Decrease the fragment size S;

[0101] Increase the redundancy rate R;

[0102] Increase the maximum retransmission count Nmax;

[0103] Reduce the modulation rate (increase SF, decrease BW).

[0104] 2) The channel condition improves (the packet loss rate decreases):

[0105] Increase the shard size S;

[0106] Decrease the redundancy rate R;

[0107] Reduce the number of retransmissions Nmax;

[0108] Increase the modulation rate (decrease SF, increase BW).

[0109] In addition, the reliability of this application is proven through the following mathematical model and probability analysis.

[0110] Calculation of the successful recovery probability P success :

[0111] Let the loss probability of a single data packet be P loss , then for each shard, the probability of successful recovery is:

[0112]

[0113] Where is the combination number, n is the total number of data packets, and k is the minimum number of data packets to be received.

[0114] By adjusting n and k, P success can be made close to 1, enabling successful data recovery even at a relatively high packet loss rate.

[0115] Next, the above file transfer method for long-distance wireless communication will be illustrated with more specific embodiments.

[0116] Embodiment 1: Remote firmware upgrade

[0117] In Internet of Things devices, firmware upgrade is a common requirement. Using this algorithm, large-scale firmware upgrades can be reliably completed in a LoRa network with low bandwidth and high packet loss rate.

[0118] Process description:

[0119] Sender:

[0120] Read the firmware file and initialize the transmission parameters.

[0121] Dynamically adjust the shard size and redundancy rate according to the channel quality.

[0122] Shard the firmware file and perform RS coding.

[0123] Send the data packets in order and wait for the ACK / NACK from the receiver.

[0124] Retransmit the specified data packets according to the NACK request.

[0125] Receiver:

[0126] Receive data packets and verify the CRC checksum.

[0127] Use RS decoding to recover the fragmented data.

[0128] Perform integrity checks at the fragment level and file level.

[0129] Complete the firmware upgrade.

[0130] Embodiment 2: Remote monitoring data transmission

[0131] For scenarios that require transmitting a large amount of monitoring data, such as environmental monitoring, video and image transmission, etc., this algorithm can ensure the integrity and timeliness of the data.

[0132] Process description:

[0133] Data acquisition end:

[0134] Collect monitoring data and form a file to be transmitted.

[0135] Adjust the transmission parameters according to the channel conditions.

[0136] Perform fragmentation, encoding, and transmission.

[0137] Data receiving end:

[0138] Receive and store the data packets.

[0139] Perform decoding and data recovery.

[0140] Use the monitoring data for subsequent analysis and processing.

[0141] In the description of this specification, the description referring to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine the different embodiments or examples described in this specification.

[0142] After considering the specification and practicing the invention disclosed herein, those skilled in the art will readily conceive of other implementations of the present invention. The present invention is intended to cover any variations, uses, or adaptations of the present invention, which follow the general principles of the present invention and include the common general knowledge or conventional technical means in the technical field not disclosed in the present invention. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present invention are pointed out by the appended claims.

Claims

1. A file transmission method for long-distance wireless communication, characterized in that: include: Evaluate the channel quality of long-distance wireless communications and obtain the initial packet loss rate; Calculating transmission parameters according to the initial packet loss rate, wherein the transmission parameters include at least a fragment size and a redundancy rate; At the sending end, the file to be transmitted is segmented according to the segment size and encoded according to the redundancy rate; Assemble the fragmented data and verify the file integrity at the receiving end; The real-time packet loss rate is obtained during the file transmission process, and the transmission parameters are dynamically adjusted according to the real-time packet loss rate.

2. The file transmission method according to claim 1, characterized in that: The step of obtaining the real-time packet loss rate during the file transmission process and dynamically adjusting the transmission parameters according to the real-time packet loss rate includes: The shard size S is calculated according to the following formula: S=S min +(S max -S min )×(1-P loss ) Among them, S min and S max are the minimum and maximum fragment sizes, respectively, and P loss is the real-time packet loss rate.

3. The file transmission method according to claim 1, characterized in that: The step of segmenting the file to be transmitted according to the segment size and encoding according to the redundancy rate at the sending end includes: The slice data is encoded using mixed redundancy rate RS coding.

4. The file transmission method according to claim 3, characterized in that: The step of obtaining the real-time packet loss rate during the file transmission process and dynamically adjusting the transmission parameters according to the real-time packet loss rate includes: The redundancy rate R is calculated according to the following formula: R=R min +(R max -R min )×P loss Among them, R is the current redundancy rate, and its value range is [R min ,R max ]; The RS coding parameter n is calculated according to the following formula: Where k is the data block size, Indicates rounding up.

5. The file transmission method according to claim 1, characterized in that: The step of assembling the fragmented data and verifying the file integrity at the receiving end includes: Use CRC32 checksum to verify the data integrity of each fragment.

6. The file transmission method according to claim 5, characterized in that: The step of assembling the fragmented data and verifying the file integrity at the receiving end includes: Use SHA-256 to perform integrity check on the reassembled transmission file.

7. The file transmission method according to any one of claims 1 to 6, characterized in that: The transmission parameters also include a maximum number of retransmissions; A NACK mechanism is set according to the maximum number of retransmissions, and a NACK signal is transmitted at the receiving end according to the NACK mechanism.

8. The file transmission method according to claim 7, characterized in that: The step of obtaining the real-time packet loss rate during the file transmission process and dynamically adjusting the transmission parameters according to the real-time packet loss rate includes: The maximum number of retransmissions N max Calculate according to the following formula: Among them, P loss is the real-time packet loss rate, N base is the basic retransmission number, N scale is the scaling factor of the number of retransmissions, Indicates rounding up.

9. The file transmission method according to any one of claims 1 to 6, characterized in that: The transmission parameters also include a spreading factor SF and a bandwidth BW; When the real-time packet loss rate increases, the spreading factor SF is increased and the bandwidth BW is decreased; When the real-time packet loss rate decreases, the spreading factor SF is reduced and the bandwidth BW is increased.

Citation Information

Cited By

  • Batch firmware updating method and system for energy storage power station equipment

    CN122152341A