LoRaWAN gateway networking communication method, system, device and medium

By constructing a multi-level LoRaWAN communication architecture and a protocol layering design, the problem of data transmission interruption in areas without network coverage is solved, enabling terminal data transmission across uninhabited areas and low-power communication, which is suitable for special application scenarios such as smart agriculture and ecological monitoring.

CN121334702APending Publication Date: 2026-01-13SHENZHEN HAIDAO TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511346758.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-19
Publication Date
2026-01-13

AI Technical Summary

Technical Problem

In special application scenarios where there is a lack of fixed network coverage and mobile communication services, existing LoRaWAN gateway devices cannot effectively transmit data, causing key data collected by the terminal to remain locally, making it impossible to achieve remote monitoring and control.

Method used

A multi-level communication architecture is constructed, consisting of a terminal, a sub-gateway, a main gateway, and a server. The LoRaWAN protocol is used for bidirectional data transmission. A long-distance connection is established between the sub-gateway and the main gateway to form a complete communication loop. Data queues and priority scheduling are used to optimize transmission efficiency, and an uplink-triggered downlink data transmission mechanism is combined to reduce terminal power consumption.

Benefits of technology

It enables the transmission of terminal data across uninhabited areas without network coverage, significantly expanding the network coverage radius, solving the problem of data transmission interruption, and reducing terminal power consumption, making it suitable for field scenarios where power supply is difficult.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121334702A_ABST
    Figure CN121334702A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a LoRaWAN gateway networking communication method, a LoRaWAN gateway networking communication system, LoRaWAN gateway networking communication equipment and a medium, and relates to the technical field of network communication. The communication system comprises a terminal, a sub-gateway, a main gateway and a server, and the method comprises the following steps: if uplink data sent by the terminal is received, the sub-gateway sends the uplink data to the main gateway through a LoRaWAN protocol, and the main gateway sends the uplink data to the server; and if downlink data sent to the terminal by the server is received, the main gateway sends the downlink data to the sub-gateway through the LoRaWAN protocol, and the sub-gateway sends the downlink data to the terminal. In the invention, the transmission distance from the terminal to the sub-gateway and the LoRaWAN transmission distance from the sub-gateway to the main gateway form a superimposed effect, so that the overall communication range is greatly expanded, and the problem that data cannot be effectively transmitted in a special application scene lacking fixed network coverage and mobile communication service can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of network communication technology, and in particular to a LoRaWAN gateway networking communication method, system, device and medium. Background Technology

[0002] In IoT application scenarios such as smart cities, smart fire protection, and smart agriculture, the system architecture is typically divided into three core parts: the device side, the network transmission layer, and the application service layer. The device side consists of terminal nodes and gateway devices: the terminal nodes are responsible for collecting environmental or device data and achieving low-power wide-area communication through LoRa radio frequency technology; the gateway, as a key relay device, on the one hand, aggregates terminal data through the LoRa protocol, and on the other hand, forwards the data to the cloud server through backhaul links such as Ethernet, WiFi, or cellular networks, ultimately forming a complete data transmission link.

[0003] The current mainstream solution adopts the LoRaWAN protocol framework (a wide-area networking protocol based on LoRa physical layer technology). Its standard communication process is as follows: the terminal transmits data to the gateway via the LoRa wireless channel, and the gateway then forwards the data packets to the remote server platform via TCP / UDP network protocols. This architecture is well-suited for scenarios with stable internet infrastructure and can meet the needs of most applications.

[0004] However, existing technologies have a fundamental limitation: gateway devices must rely on wired broadband or wireless LAN / WAN as the backhaul channel. This will directly lead to system failure in special application scenarios lacking fixed network coverage and mobile communication services. Typical scenarios include: signal loss due to terrain barriers in remote mountainous areas, lack of communication infrastructure in uninhabited areas such as grasslands and deserts, and temporary monitoring networks deployed in emergency situations. In such environments, because the gateway cannot establish an effective connection with the cloud server, critical data collected by the terminal will remain locally, preventing remote monitoring and control functions. Summary of the Invention

[0005] This invention provides a LoRaWAN gateway networking communication method, system, device, and medium, aiming to solve the problem of ineffective data transmission in special application scenarios where there is a lack of fixed network coverage and mobile communication services.

[0006] In a first aspect, embodiments of the present invention provide a LoRaWAN gateway networking communication method, the method being applied to a communication system including a terminal, a sub-gateway, a main gateway, and a server, the method comprising:

[0007] If uplink data is received from the terminal, the sub-gateway sends the uplink data to the main gateway via the LoRaWAN protocol, and the main gateway sends the uplink data to the server.

[0008] If the main gateway receives downlink data sent to the terminal by the server, it sends the downlink data to the sub-gateway via the LoRaWAN protocol, and the sub-gateway then sends the downlink data to the terminal.

[0009] A further technical solution is that sending the uplink data to the main gateway via the LoRaWAN protocol includes:

[0010] The sub-gateway adds the uplink data to a preset uplink data queue;

[0011] The sub-gateway sends the uplink data in the uplink data queue to the main gateway in descending order of priority.

[0012] A further technical solution is that sending the downlink data to the sub-gateway via the LoRaWAN protocol includes:

[0013] The main gateway adds the downlink data to a preset first downlink data queue;

[0014] The main gateway obtains the type of the uplink data;

[0015] The main gateway determines whether it needs to send a response to the terminal based on the type of the uplink data;

[0016] If a response needs to be sent to the terminal, the main gateway retrieves the downlink data corresponding to the terminal from the first downlink data queue and adds the downlink data corresponding to the terminal to the first response message;

[0017] The main gateway sends the first response message to the sub-gateway.

[0018] A further technical solution is that sending the downlink data to the terminal includes:

[0019] The sub-gateway receives the first response message sent by the main gateway;

[0020] The sub-gateway obtains the downlink data from the first response message and adds the downlink data to a preset second downlink data queue;

[0021] The sub-gateway obtains the type of the uplink data;

[0022] The sub-gateway determines whether it needs to send a response to the terminal based on the type of the uplink data;

[0023] If a response needs to be sent to the terminal, the sub-gateway obtains the downlink data corresponding to the terminal from the second downlink data queue and adds the downlink data corresponding to the terminal to the second response message;

[0024] The sub-gateway sends the second response message to the terminal.

[0025] A further technical solution is that the uplink data includes a network number, the sub-gateway is configured with a network number, and before sending the uplink data to the main gateway via the LoRaWAN protocol, the method further includes:

[0026] The sub-gateway determines whether the network number of the uplink data is the same as the network number of the sub-gateway;

[0027] If the network number of the uplink data is different from the network number of the sub-gateway, the sub-gateway will discard the uplink data;

[0028] If the network number of the uplink data is the same as the network number of the sub-gateway, the sub-gateway jumps to the step of sending the uplink data to the main gateway via the LoRaWAN protocol.

[0029] A further technical solution is that the method further includes:

[0030] Terminals collect monitoring data;

[0031] The terminal generates the uplink data based on the monitoring data and the preset network number;

[0032] The terminal sends the uplink data to the sub-gateway.

[0033] A further technical solution is that sending the uplink data to the server includes:

[0034] The main gateway sends the uplink data to the server via TCP or UDP protocols.

[0035] Secondly, embodiments of the present invention also provide a communication system, the communication system including a terminal, a sub-gateway, a main gateway, and a server, the communication system being used to perform the method described in the first aspect.

[0036] Thirdly, embodiments of the present invention also provide a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method.

[0037] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the above-described method.

[0038] This invention provides a LoRaWAN gateway networking communication method applied to a communication system including a terminal, a sub-gateway, a main gateway, and a server. The method includes: if uplink data is received from the terminal, the sub-gateway sends the uplink data to the main gateway via the LoRaWAN protocol, and the main gateway sends the uplink data to the server; if downlink data is received from the server to the terminal, the main gateway sends the downlink data to the sub-gateway via the LoRaWAN protocol, and the sub-gateway sends the downlink data to the terminal. This invention can solve the problem of ineffective data transmission in special application scenarios lacking fixed network coverage and mobile communication services.

[0039] This invention effectively solves the problem of data transmission interruption caused by the lack of fixed networks and mobile communication services in remote areas by constructing a multi-level communication architecture of "terminal-sub-gateway-main gateway-server" and limiting bidirectional data transmission between sub-gateways and the main gateway to the LoRaWAN protocol. Specifically, when a sub-gateway receives uplink data from a terminal, it forwards the data to the main gateway via the LoRaWAN protocol, and then the main gateway submits it to the server; the downlink direction follows the reverse path. This design fully utilizes the ultra-long-distance transmission characteristics of the LoRaWAN protocol, allowing sub-gateways to establish connections with the main gateway without relying on traditional communication infrastructure. For example, in areas without network coverage, such as deserts and grasslands, environmental data collected by the terminal can be transmitted across uninhabited areas via the sub-gateway's LoRaWAN link to the main gateway deployed in the network coverage area, and finally arrive at the server, forming a complete communication loop. At the same time, this architecture significantly expands the network coverage radius—the transmission distance from the terminal to the sub-gateway and the LoRaWAN transmission distance from the sub-gateway to the main gateway create a superimposed effect, greatly improving the overall communication range. Attached Figure Description

[0040] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 A schematic diagram of a communication system provided in an embodiment of the present invention;

[0042] Figure 2 A flowchart illustrating a LoRaWAN gateway networking communication method provided in an embodiment of the present invention;

[0043] Figure 3 A schematic block diagram of a computer device provided for an embodiment of the present invention. Detailed Implementation

[0044] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0045] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0046] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0047] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0048] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrases "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."

[0049] Please see Figure 1 This invention provides a communication system comprising a terminal 10, a sub-gateway 20, a main gateway 30, and a server 40. The number of terminals 10 and sub-gateways 20 can be multiple. The communication system is used to execute a LoRaWAN gateway networking communication method proposed in this invention.

[0050] Please see Figure 2 This invention provides a LoRaWAN gateway networking communication method, which includes the following steps:

[0051] S1, if uplink data is received from the terminal, the sub-gateway sends the uplink data to the main gateway via the LoRaWAN protocol, and the main gateway sends the uplink data to the server.

[0052] S2, if downlink data is received from the server to the terminal, the main gateway sends the downlink data to the sub-gateway via the LoRaWAN protocol, and the sub-gateway sends the downlink data to the terminal.

[0053] In its specific implementation, this invention constructs a four-layer communication architecture of "terminal → sub-gateway → main gateway → server", the core of which lies in the use of the LoRaWAN protocol for bidirectional data transmission between the sub-gateway and the main gateway.

[0054] Specifically, when a sub-gateway receives uplink data from a terminal, it forwards it to the main gateway via the LoRaWAN protocol, and the main gateway then submits it to the server; the downlink process is reversed. This communication architecture first solves the problem of communication interruption in areas without network coverage (such as deep mountains and deserts)—because the LoRaWAN protocol itself has ultra-long range (typically covering 30 kilometers) and low power consumption characteristics, the sub-gateway can establish a connection with the main gateway without relying on infrastructure such as 4G / Ethernet.

[0055] For example, in grassland pastoral areas, livestock location data collected by the terminal is transmitted across uninhabited areas to the main gateway via the LoRaWAN link of the sub-gateway, and finally arrives at the server, achieving a communication closed loop that traditional solutions cannot achieve.

[0056] Meanwhile, this design significantly expands the network coverage radius: the transmission link from the terminal to the sub-gateway is superimposed with the LoRaWAN link from the sub-gateway to the main gateway, which greatly increases the communication distance and solves the problem of data not being able to be effectively transmitted in special application scenarios where there is a lack of fixed network coverage and mobile communication services.

[0057] Furthermore, both the sub-gateway and the main gateway can simultaneously receive multiple (e.g., 8) channels of different frequencies, each channel simultaneously supporting six different rates from rate 7 to rate 712.

[0058] In some preferred embodiments, the above step "sending the uplink data to the main gateway via the LoRaWAN protocol" specifically includes the following steps: the sub-gateway adds the uplink data to a preset uplink data queue; the sub-gateway sends the uplink data in the uplink data queue to the main gateway in descending order of priority.

[0059] In practice, the uplink data is configured with a priority identifier, and the priority of the uplink data is determined based on the priority identifier. For example, the priority from high to low includes high priority, medium priority and low priority, and the priority identifiers corresponding to different priorities are different.

[0060] In this invention, by setting up a data queue and implementing priority scheduling on the uplink path, transmission efficiency in network congestion scenarios is optimized. When multiple terminals send data to the sub-gateway simultaneously (such as when temperature sensors collectively trigger alarms in forest fire monitoring), the sub-gateway temporarily stores the burst data in a queue and sends it in order of priority: high-priority fire alarm data is transmitted first, while routine temperature and humidity data is processed later.

[0061] Specifically, priority queues are equivalent to building a traffic buffer pool between gateways, allowing limited bandwidth resources to be allocated to critical data. In farmland monitoring scenarios, disaster data has higher priority than soil moisture data, ensuring that high-priority data is delivered promptly, while ordinary data is transmitted when the channel is idle.

[0062] In some preferred embodiments, the above step "sending the downlink data to the sub-gateway via the LoRaWAN protocol" specifically includes the following steps: the main gateway adds the downlink data to a preset first downlink data queue; the main gateway obtains the type of the uplink data; the main gateway determines whether a response needs to be sent to the terminal based on the type of the uplink data; if a response needs to be sent to the terminal, the main gateway obtains the downlink data corresponding to the terminal from the first downlink data queue and adds the downlink data corresponding to the terminal to a first response message; the main gateway sends the first response message to the sub-gateway.

[0063] In practice, the uplink data includes a type identifier, which includes type 1 and type 2. Type 1 requires a response, while type 2 does not.

[0064] In this invention, downlink data transmission is coupled with an uplink data acknowledgment mechanism. After receiving downlink data from the server, the main gateway does not immediately push it; instead, it caches it in a downlink queue, waiting for uplink data from the target terminal to arrive. When it detects that the terminal's uplink data requires an acknowledgment (e.g., the terminal sends an alarm signal requiring confirmation), the main gateway retrieves the corresponding downlink data from the queue, embeds it in the first acknowledgment message, and sends it to the sub-gateway. This design solves the high energy consumption problem of the terminal's persistent receiving mode: the terminal only briefly opens its receiving window to acquire downlink data after sending uplink data, remaining dormant the rest of the time. Taking oilfield equipment monitoring as an example, the main gateway caches the parameter configuration instructions issued by the server in a queue. When the terminal reports data, it sends the downlink data along with the first acknowledgment message, and the terminal briefly opens its receiving window to acquire the downlink data, thereby effectively reducing the terminal's power consumption.

[0065] In some preferred embodiments, the above step "sending the downlink data to the terminal" specifically includes the following steps: the sub-gateway receives the first response message sent by the main gateway; the sub-gateway obtains the downlink data from the first response message and adds the downlink data to a preset second downlink data queue; the sub-gateway obtains the type of the uplink data; the sub-gateway determines whether a response needs to be sent to the terminal based on the type of the uplink data; if a response needs to be sent to the terminal, the sub-gateway obtains the downlink data corresponding to the terminal from the second downlink data queue and adds the downlink data corresponding to the terminal to a second response message; the sub-gateway sends the second response message to the terminal.

[0066] In practice, after receiving the first response message from the main gateway, the sub-gateway also temporarily stores the downlink data in its local queue (the second downlink data queue). Only when the terminal sends uplink data that requires a response will the downlink data be encapsulated into the second response message and sent to the terminal.

[0067] This two-level waiting mechanism produces three benefits: first, the terminal always maintains an intermittent wake-up receiving mode, reducing power consumption; second, it avoids energy waste caused by the sub-gateway continuously listening to downlink data; and third, it ensures the timeliness of data transmission through the terminal's uplink triggering mechanism (the terminal can always obtain downlink data when it is active).

[0068] In some preferred embodiments, there can be multiple sub-gateways, and each sub-gateway is pre-assigned a unique network number, with each sub-gateway having a different network number.

[0069] Furthermore, each sub-gateway manages all terminals within its assigned area, and the network number assigned to all terminals managed by the sub-gateway must be consistent with the sub-gateway's network number to ensure that data received by the sub-gateway from terminals outside its assigned area can be filtered and discarded.

[0070] Furthermore, all terminals under the jurisdiction of the sub-gateways are registered with the main gateway to generate a whitelist; when the main gateway receives uplink data, it will authenticate the terminal and filter out and discard the data of illegal terminals.

[0071] Furthermore, in some preferred embodiments, the method further includes: the terminal collecting monitoring data; the terminal generating uplink data based on the monitoring data and a preset network number; and the terminal sending the uplink data to the sub-gateway.

[0072] In practice, the terminal node reports uplink data to the sub-gateway via the LoRa protocol (non-standard LoRaWAN protocol). The uplink data can be specifically message packets, which consist of two parts: a network number and message data. The network number must be consistent with the sub-gateway, and the message data includes terminal monitoring data, status data, LoRaWAN protocol layer data, etc. This invention does not specifically limit these.

[0073] In this invention, a terminal and sub-gateway are bound together by a preset network number. After collecting monitoring data, the terminal must actively embed the network number of its assigned sub-gateway before sending it to the sub-gateway. This pre-configuration method makes each data packet inherently identified, resulting in three optimizations: first, it simplifies the sub-gateway processing flow (direct comparison of network numbers eliminates the need to query a mapping table), effectively reducing processing latency; second, it supports dynamic terminal migration (only the network number needs to be reset when the terminal changes areas); and third, it provides a foundation for multi-gateway collaboration. For example, in mine safety monitoring, when an excavator (terminal) moves from area A (sub-gateway 1 network number = 30) to area B (sub-gateway 2 network number = 40), only the preset network number needs to be updated to seamlessly switch communication gateways without re-registering with the server.

[0074] Furthermore, before the above step "sending the uplink data to the main gateway via the LoRaWAN protocol", the method further includes the following steps: the sub-gateway determines whether the network number of the uplink data is the same as the network number of the sub-gateway; if the network number of the uplink data is different from the network number of the sub-gateway, the sub-gateway discards the uplink data; if the network number of the uplink data is the same as the network number of the sub-gateway, the sub-gateway jumps to the step of sending the uplink data to the main gateway via the LoRaWAN protocol.

[0075] In practice, each sub-gateway is assigned a unique network number (0-255), and all terminals managed by it must match the same network number. When a sub-gateway receives uplink data, it first verifies the consistency of the network number and discards mismatched data (such as data mistakenly sent by a neighboring farm terminal). Taking a smart agricultural park as an example, sub-gateway 1 (network number = 10) only processes sensor data from its assigned greenhouse. When temperature control data from greenhouse 2 (network number = 20) reaches sub-gateway 1 due to signal drift, it will be immediately discarded. This design brings two core benefits: first, it eliminates cross-regional data interference, effectively reducing the amount of invalid data processed by sub-gateways and improving effective throughput; second, it builds a primary security barrier, preventing unauthorized terminals from forging valid network numbers to access the network. Combined with the whitelist mechanism of the main gateway, a dual protection system of "sub-gateway physical layer filtering + main gateway application layer authentication" is formed.

[0076] In some preferred embodiments, the above step "sending the uplink data to the server" specifically includes: the main gateway sending the uplink data to the server via TCP or UDP protocol.

[0077] In practice, the main gateway to the server uses TCP or UDP protocols for transmission, which is essentially using mature Internet protocols to achieve "last mile" access.

[0078] Since the main gateway is usually deployed in the network coverage area (such as next to a highway on the edge of a desert), the reliable transmission of the TCP protocol (three-way handshake + retransmission mechanism) ensures zero loss of critical data (such as earthquake early warning); while video streaming data with high real-time requirements can be transmitted with low latency using the UDP protocol.

[0079] For example, in a forest fire prevention system, fire coordinates are transmitted to the cloud platform via TCP to ensure accuracy, while fire scene video streams are pushed in real time via UDP. This design is compatible with 99% of existing IoT platforms (all of which support TCP / UDP access), and leverages the advantages of each protocol layer: LoRaWAN solves the wide-area coverage problem, while TCP / UDP addresses the high reliability / low latency requirements, thus elevating the overall system compatibility to industrial-grade standards.

[0080] This invention proposes a LoRaWAN gateway networking communication method applied to a communication system including a terminal, a sub-gateway, a main gateway, and a server. The method includes: if uplink data is received from the terminal, the sub-gateway sends the uplink data to the main gateway via the LoRaWAN protocol, and the main gateway sends the uplink data to the server; if downlink data is received from the server to the terminal, the main gateway sends the downlink data to the sub-gateway via the LoRaWAN protocol, and the sub-gateway sends the downlink data to the terminal. This invention can solve the problem of ineffective data transmission in special application scenarios lacking fixed network coverage and mobile communication services.

[0081] This invention effectively solves the problem of data transmission interruption caused by the lack of fixed networks and mobile communication services in remote areas by constructing a multi-level communication architecture of "terminal-sub-gateway-main gateway-server" and limiting bidirectional data transmission between sub-gateways and the main gateway to the LoRaWAN protocol. Specifically, when a sub-gateway receives uplink data from a terminal, it forwards the data to the main gateway via the LoRaWAN protocol, and then the main gateway submits it to the server; the downlink direction follows the reverse path. This design fully utilizes the ultra-long-distance transmission characteristics of the LoRaWAN protocol, allowing sub-gateways to establish connections with the main gateway without relying on traditional communication infrastructure. For example, in areas without network coverage, such as deserts and grasslands, environmental data collected by the terminal can be transmitted across uninhabited areas via the sub-gateway's LoRaWAN link to the main gateway deployed in the network coverage area, and finally arrive at the server, forming a complete communication loop. At the same time, this architecture significantly expands the network coverage radius—the transmission distance from the terminal to the sub-gateway and the LoRaWAN transmission distance from the sub-gateway to the main gateway create a superimposed effect, greatly improving the overall communication range.

[0082] Furthermore, at the transmission mechanism level, the standard LoRaWAN protocol is used between gateways to ensure seamless integration of the main gateway with existing IoT platforms, avoiding server-side modification costs. Especially for downlink data transmission, the main gateway temporarily stores data sent from the server and embeds it in the response message to the terminal's uplink data. This allows the terminal to obtain instructions by briefly opening its receiving window after sending data, significantly reducing terminal power consumption. This uplink-triggered downlink transmission mechanism, combined with the low-power characteristics of LoRaWAN itself, makes the system particularly suitable for outdoor scenarios where power supply is difficult.

[0083] In summary, this invention, through its innovative networking architecture and protocol layering design, enables long-distance, low-power data transmission in areas without network coverage while ensuring communication reliability, providing a feasible communication solution for special application scenarios such as smart agriculture and ecological monitoring.

[0084] Please see Figure 3 , Figure 3 This is a schematic block diagram of a computer device 500 provided in an embodiment of this application. The computer device 500 can be a terminal or a server.

[0085] The computer device 500 includes a processor 502, a memory, and a network interface 505 connected via a system bus 501. The memory may include a non-volatile storage medium 503 and internal memory 504.

[0086] The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, it causes the processor 502 to execute a LoRaWAN gateway networking communication method.

[0087] The processor 502 provides computing and control capabilities to support the operation of the entire computer device 500.

[0088] The internal memory 504 provides an environment for the execution of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a LoRaWAN gateway networking communication method.

[0089] The network interface 505 is used for network communication with other devices. Those skilled in the art will understand that the above structure is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 500 to which the present application is applied. A specific computer device 500 may include more or fewer components than shown in the figures, or combine certain components, or have different component arrangements.

[0090] The processor 502 is used to run a computer program 5032 stored in a memory to implement the steps of a LoRaWAN gateway networking communication method provided in any of the above embodiments.

[0091] It should be understood that in the embodiments of this application, the processor 502 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0092] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program may be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.

[0093] Therefore, the present invention also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program. When executed by a processor, the computer program causes the processor to perform the steps of a LoRaWAN gateway networking communication method provided in any of the above embodiments.

[0094] The storage medium is a physical, non-transient storage medium, such as a USB flash drive, external hard drive, read-only memory (ROM), magnetic disk, or optical disk, or any other physical storage medium capable of storing program code. The computer-readable storage medium can be non-volatile or volatile.

[0095] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0096] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0097] The steps in the method of this invention can be adjusted, merged, or reduced in order according to actual needs. The units in the device of this invention can be merged, divided, or reduced according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0098] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

[0099] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0100] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Since these modifications and variations fall within the scope of the claims and their equivalents, this invention also intends to include these modifications and variations.

[0101] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A LoRaWAN gateway networking communication method, characterized in that, The method is applied to a communication system, which includes a terminal, a sub-gateway, a main gateway, and a server. The method includes: If uplink data is received from the terminal, the sub-gateway sends the uplink data to the main gateway via the LoRaWAN protocol, and the main gateway sends the uplink data to the server. If the main gateway receives downlink data sent to the terminal by the server, it sends the downlink data to the sub-gateway via the LoRaWAN protocol, and the sub-gateway then sends the downlink data to the terminal.

2. The LoRaWAN gateway networking communication method according to claim 1, characterized in that, Sending the uplink data to the main gateway via the LoRaWAN protocol includes: The sub-gateway adds the uplink data to a preset uplink data queue; The sub-gateway sends the uplink data in the uplink data queue to the main gateway in descending order of priority.

3. The LoRaWAN gateway networking communication method according to claim 1, characterized in that, The step of sending the downlink data to the sub-gateway via the LoRaWAN protocol includes: The main gateway adds the downlink data to a preset first downlink data queue; The main gateway obtains the type of the uplink data; The main gateway determines whether it needs to send a response to the terminal based on the type of the uplink data; If a response needs to be sent to the terminal, the main gateway obtains the downlink data corresponding to the terminal from the first downlink data queue and adds the downlink data corresponding to the terminal to the first response message; The main gateway sends the first response message to the sub-gateway.

4. The LoRaWAN gateway networking communication method according to claim 3, characterized in that, Sending the downlink data to the terminal includes: The sub-gateway receives the first response message sent by the main gateway; The sub-gateway obtains the downlink data from the first response message and adds the downlink data to a preset second downlink data queue; The sub-gateway obtains the type of the uplink data; The sub-gateway determines whether it needs to send a response to the terminal based on the type of the uplink data; If a response needs to be sent to the terminal, the sub-gateway obtains the downlink data corresponding to the terminal from the second downlink data queue and adds the downlink data corresponding to the terminal to the second response message; The sub-gateway sends the second response message to the terminal.

5. The LoRaWAN gateway networking communication method according to claim 1, characterized in that, The uplink data includes a network number, the sub-gateway is configured with a network number, and before sending the uplink data to the main gateway via the LoRaWAN protocol, the method further includes: The sub-gateway determines whether the network number of the uplink data is the same as the network number of the sub-gateway; If the network number of the uplink data is different from the network number of the sub-gateway, the sub-gateway will discard the uplink data; If the network number of the uplink data is the same as the network number of the sub-gateway, the sub-gateway jumps to the step of sending the uplink data to the main gateway via the LoRaWAN protocol.

6. The LoRaWAN gateway networking communication method according to claim 5, characterized in that, The method further includes: Terminals collect monitoring data; The terminal generates the uplink data based on the monitoring data and the preset network number; The terminal sends the uplink data to the sub-gateway.

7. The LoRaWAN gateway networking communication method according to claim 1, characterized in that, Sending the uplink data to the server includes: The main gateway sends the uplink data to the server via TCP or UDP protocols.

8. A communication system, characterized in that, The communication system includes a terminal, a sub-gateway, a main gateway, and a server, and is used to perform the method as described in any one of claims 1-7.

9. A computer device, characterized in that, The computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, can implement the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Networking method and system based on LoRa

    CN107071791A

  • Multi-layer gateway data transmission system and method based on LoRa positioning

    CN111918307A

  • LoRa communication method, LoRa gateway, LoRa system and computer readable storage medium

    CN112399470A

  • Power distribution room data acquisition system and method, gateway and storage medium

    CN113395324A

  • Femtocell service through a secondary connection

    US20120026865A1