Communication queuing sending method based on LoRa bus
By introducing a queue sending mechanism in the LoRa bus communication system, the master module queues and manages the slave module's data requests and solves the problem of data packet collision, improves communication efficiency and reliability, and adapts to the scalability needs of complex scenarios.
Patent Information
- Application Number
- CN202510463418.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2025-07-11
AI Technical Summary
The existing LoRa communication system is prone to data collision when sending data to the main module at the same time by multiple slave modules, resulting in data loss or low transmission efficiency, especially in high concurrency scenarios, communication efficiency and reliability are difficult to ensure.
Using the communication queuing and sending method based on the LoRa bus, the main module queues the data sending requests of the slave module and allocates the sending time window. Through the timestamp and priority sorting, the sending time window and priority are dynamically adjusted to avoid packet collisions.
It effectively avoids data packet collisions, improves communication efficiency and reliability, reduces data loss rate, improves system throughput and response speed, supports a large number of slave module access, and meets the needs of complex scenarios.
Smart Images

Figure CN120302450A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technologies, and particularly to a queuing transmission method based on LoRa bus communication. Background Art
[0002] Due to its characteristics of low power consumption and long-distance transmission, LoRa (Long Range) technology is widely used in the Internet of Things (IoT) field. Existing LoRa communication systems usually adopt an architecture with one master module and multiple slave modules. The slave modules are responsible for collecting data and sending it to the master module, and the master module is responsible for data processing and forwarding. However, when multiple slave modules send data to the master module simultaneously, data collision packets are likely to occur, resulting in data loss or low transmission efficiency.
[0003] In the prior art, slave modules usually send data immediately after it is ready, and the master module cannot effectively distinguish and process multiple simultaneously arriving data packets when receiving data, resulting in data conflicts and losses. In a high-concurrency scenario, the communication efficiency and reliability of this architecture are difficult to guarantee. Summary of the Invention
[0004] To solve the above problems, an object of an embodiment of the present invention is to provide a queuing transmission method based on LoRa bus communication.
[0005] A queuing transmission method based on LoRa bus communication includes:
[0006] Step 1: After multiple slave modules complete data collection, they send data transmission requests to the master module;
[0007] Step 2: After the master module receives the data transmission requests from the slave modules, it queues the data transmission requests of each slave module and allocates corresponding transmission time windows;
[0008] Step 3: The master module sends the data collected by the slave modules according to the allocated transmission time windows.
[0009] Preferably, the master module is connected and communicates with multiple slave modules through the LoRa bus, and each slave module has a unique identifier.
[0010] Preferably, the master module sorts according to the data transmission request timestamps and priorities of the slave modules.
[0011] Preferably, when the master module sends the data collected by the slave modules according to the allocated transmission time windows, it determines whether a packet collision occurs by comparing the timestamps and contents on the received data packets, and notifies the corresponding slave module to re-send the data when a packet collision occurs.
[0012] Preferably, the master module dynamically adjusts the size and priority of the transmission time window of each slave module according to the network load and communication environment to improve the communication efficiency of the system.
[0013] The present invention also provides an electronic device, including a bus, a transceiver, a memory, a processor, and a computer program stored on the memory and executable on the processor. The transceiver, the memory, and the processor are connected through the bus. It is characterized in that when the computer program is executed by the processor, the steps in the above-mentioned LoRa bus communication queuing transmission method are implemented.
[0014] The present invention also provides a computer-readable storage medium, on which a computer program is stored. It is characterized in that when the computer program is executed by a processor, the steps in the above-mentioned LoRa bus communication queuing transmission method are implemented.
[0015] According to the specific embodiments provided by the present invention, the following technical effects are disclosed:
[0016] The present invention relates to a LoRa bus communication queuing transmission method. Compared with the prior art, before the slave module sends data, it first sends a data transmission request to the master module. The master module queues the data transmission requests of each slave module and allocates corresponding transmission time windows, which can effectively avoid data packet collisions and improve communication efficiency and reliability.
[0017] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following specific preferred embodiments are given in conjunction with the accompanying drawings and described in detail as follows. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0019] Figure 1 It is a flowchart of a LoRa bus communication queuing transmission method provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0020] In the description of the present invention, it should be understood that the orientation or positional relationship indicated by the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", etc. is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on the present invention.
[0021] In addition, the terms "first" and "second" are only used for descriptive purposes and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present invention, "a plurality of" means two or more unless otherwise specifically defined.
[0022] In the present invention, unless otherwise clearly specified and limited, the terms "mounted", "connected", "connected to", "fixed", etc. shall be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or an integral connection; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium, and it may be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0023] Please refer to Figure 1 , a queuing and sending method based on LoRa bus communication, including:
[0024] Step 1: After multiple slave modules complete data acquisition, they send data sending requests to the master module;
[0025] Step 2: After the master module receives the data sending requests from the slave modules, it queues the data sending requests of each slave module and assigns corresponding sending time windows;
[0026] Step 3: The master module sends the data collected by the slave modules according to the assigned sending time windows.
[0027] It should be noted that the master module is connected and communicates with multiple slave modules through the LoRa bus, and each slave module has a unique identifier.
[0028] The master module sorts according to the data sending request timestamps and priorities of the slave modules, and the queuing mechanism can be implemented based on other scheduling algorithms (such as round-robin, weighted fair queue, etc.) to adapt to different application scenarios.
[0029] In practical applications, the main module can complete sorting according to the following conditions:
[0030] 1. Request reception and queue management
[0031] After the slave module completes data acquisition, it sends a request containing a unique identifier to the main module.
[0032] The main module stores the requests in the request queue according to the reception timestamps.
[0033] 2. Sorting rules
[0034] Timestamp sorting: The requests are initially sorted in timestamp order (first come, first served).
[0035] Priority weighting: If some slave modules (such as emergency sensors) are given higher priorities, the main module will adjust their sorting positions through a weighting algorithm. For example: Final sorting position = Timestamp weight (such as 70%) + Priority weight (such as 30%).
[0036] Dynamic adjustment: According to network load and environment (such as signal strength), the main module may dynamically adjust the time window length or priority weight.
[0037] When the main module sends the data collected by the slave modules according to the allocated transmission time window, it determines whether packet collision occurs by comparing the timestamps and contents on the received data packets, and notifies the corresponding slave module to re - send the data when packet collision occurs.
[0038] It should be noted that the conflict detection mechanism in the main module includes:
[0039] 1. Data packet reception and verification
[0040] The main module receives data packets within the allocated transmission time window.
[0041] Extract the timestamp and content fields from the data packets.
[0042] 2. Timestamp comparison
[0043] The main module checks whether the timestamp of the data packet matches the allocated window time.
[0044] If the timestamp exceeds the window range, it is determined as packet collision (interference from data in other windows).
[0045] 3. Content consistency verification
[0046] Use a verification algorithm (such as CRC - 16) to calculate the verification value of the data packet.
[0047] The main module compares the received verification value with the verification value sent by the slave module. If they are inconsistent, it is determined as packet collision or data corruption.
[0048] The master module will also dynamically adjust the size and priority of the transmission time window of each slave module according to the network load and communication environment to improve the communication efficiency of the system.
[0049] According to the specific embodiments provided by the present invention, the following technical effects are disclosed:
[0050] (1) Completely avoid data packet collisions: Through the queuing transmission mechanism, it is ensured that the slave modules send data in order, completely solving the problem of data packet collisions, and reducing the data loss rate to less than 1%.
[0051] (2) Greatly improve communication efficiency: The dynamic adjustment mechanism optimizes the transmission window according to the network load and communication environment, increasing the system throughput by more than 50% and significantly accelerating the response speed.
[0052] (3) Significantly enhance reliability: The conflict detection and recovery mechanism effectively reduces the data loss rate, and the reliability of data transmission is increased to more than 99.9%.
[0053] (4) Flexible scalability: Support the access of a large number of slave modules, and the system scale can be expanded to more than 10 times that of the existing technology to meet the requirements of complex scenarios.
[0054] The present invention also provides an electronic device, including a bus, a transceiver, a memory, a processor, and a computer program stored on the memory and executable on the processor. The transceiver, the memory, and the processor are connected through the bus. It is characterized in that when the computer program is executed by the processor, the steps in the above-mentioned LoRa bus communication queuing transmission method are implemented.
[0055] The present invention also provides a computer-readable storage medium, on which a computer program is stored. It is characterized in that when the computer program is executed by a processor, the steps in the above-mentioned LoRa bus communication queuing transmission method are implemented. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present invention are the same as those of the above-mentioned LoRa bus communication queuing transmission method, and will not be elaborated here.
[0056] The above is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of technical solutions of changes or substitutions, which should be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.
Claims
1. A queuing and sending method based on LoRa bus communication, characterized in that, Including: Step 1: After multiple slave modules complete data acquisition, they send data transmission requests to the master module; Step 2: After the master module receives the data transmission requests from the slave modules, it queues the data transmission requests of each slave module and allocates corresponding transmission time windows; Step 3: The master module transmits the data collected by the slave modules according to the allocated transmission time windows.
2. The queued transmission method based on LoRa bus communication according to claim 1, characterized in that The master module is connected and communicates with multiple slave modules through the LoRa bus, and each slave module has a unique identifier.
3. A LoRa bus communication queuing transmission method according to claim 1, characterized in that, The master module sorts according to the data transmission request timestamps and priorities of the slave modules.
4. A queued transmission method based on LoRa bus communication according to claim 1, wherein, When the master module transmits the data collected by the slave modules according to the allocated transmission time windows, it judges whether packet collision occurs by comparing the timestamps and contents on the received data packets. When packet collision occurs, it notifies the corresponding slave module to retransmit the data.
5. A LoRa bus communication queuing and sending method according to claim 1, characterized in that The master module dynamically adjusts the size and priority of the transmission time window of each slave module according to the network load and communication environment to improve the communication efficiency of the system.
6. An electronic device, comprising a bus, a transceiver, a memory, a processor, and a computer program stored on the memory and executable on the processor, the transceiver, the memory, and the processor being connected through the bus, characterized in that When the computer program is executed by the processor, it implements the steps in a LoRa bus communication queuing transmission method according to any one of claims 1-5.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps in a LoRa bus communication queuing transmission method according to any one of claims 1-5.