CN110719580B - Communication method, device, terminal, gateway and computer storage medium - Google Patents

Communication method, device, terminal, gateway and computer storage medium Download PDF

Info

Publication number
CN110719580B
CN110719580B CN201810757553.XA CN201810757553A CN110719580B CN 110719580 B CN110719580 B CN 110719580B CN 201810757553 A CN201810757553 A CN 201810757553A CN 110719580 B CN110719580 B CN 110719580B
Authority
CN
China
Prior art keywords
lora
terminal
lora terminal
gateway
signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810757553.XA
Other languages
Chinese (zh)
Other versions
CN110719580A (en
Inventor
陈龙宇
张欢
续芳
张健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile IoT Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile IoT Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile IoT Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201810757553.XA priority Critical patent/CN110719580B/en
Publication of CN110719580A publication Critical patent/CN110719580A/en
Application granted granted Critical
Publication of CN110719580B publication Critical patent/CN110719580B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/02Terminal devices
    • H04W88/04Terminal devices adapted for relaying to or from another terminal or user
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention relates to the technology of the Internet of things and discloses a communication method, a device, a terminal, a gateway and a computer storage medium, wherein the method comprises the following steps: receiving a downlink signal sent by first superior network equipment; the downlink signal comprises a target terminal identifier and an operation instruction for indicating the target terminal to operate; the first upper network device comprises a LoRa gateway or a second LoRa terminal closer to the LoRa gateway than the first LoRa terminal; determining whether the first LoRa terminal is the target terminal according to the downlink signal; executing the operation instruction in the downlink signal corresponding to the determination that the first LoRa terminal is the target terminal; and forwarding the downlink signal to a third LoRa terminal farther from the LoRa gateway than the first LoRa terminal in response to determining that the first LoRa terminal is not itself the target terminal.

Description

Communication method, device, terminal, gateway and computer storage medium
Technical Field
The embodiment of the invention relates to the technology of the Internet of things, in particular to a communication method, a device, a terminal, a gateway and a computer storage medium.
Background
With the continuous development of the internet of things technology, the living quality is increasingly increased, the demands of people on intelligent experience are also increasingly increased, and the application of various traditional communication transmission technologies in various internet of things industries is gradually insufficient. Although the 2.4GHz WiFi, bluetooth, zigbee and other traditional communication technologies and the 2G/3G/4G and other traditional wide area network technologies can realize the network interconnection and communication of various terminal devices, the remote transmission and the low-power transmission cannot be simultaneously considered.
Until the low-power wide area network (Low Power Wide Area Network, LPWAN) technology appears, the power consumption can be reduced to the greatest extent and the transmission cost can be saved when the communication transmission at a longer distance is ensured. LoRa (Long Range) is a low-power-consumption wide area network communication technology, is a technology of ultra-long distance wireless transmission based on spread spectrum technology and is popularized by Semtech corporation in the United states, and has the characteristics of long distance, low power consumption, multiple nodes and low cost. Currently, loRa operates mainly in the global free frequency band, such as 433 MHz.
However, at present, the communication method using the LoRa is mainly implemented by using the LoRa gateway to send a request to the LoRa terminal at a designated time node by using the LoRa processor, and using the LoRa gateway to send data to the LoRa processor after the LoRa terminal receives the request. However, this solution requires that the LoRa processor can send a request to the LoRa terminal at a specific time node, and when the LoRa terminal needs to report data (such as alarm information) to the LoRa gateway, it needs to use an independent channel to report, and needs to use the independent LoRa processor to process the channel configuration, the frequency band configuration, the sending and receiving requests of the LoRa gateway and each LoRa terminal, which has a high deployment cost, and because the data is easily lost due to too far distance or other interference, the stability of data transmission cannot be ensured.
Disclosure of Invention
In view of this, the embodiment of the present invention provides a communication method, a device, a terminal, a gateway, and a computer storage medium to solve at least one problem existing in the prior art, which can solve the technical problems that the deployment cost of the LoRa network is high, and the stability of data transmission cannot be guaranteed due to the fact that the data is easily lost due to too far distance or other interference, so that terminal resources are fully utilized, and the stability of the LoRa network in long-distance transmission and data transmission in a complex environment is guaranteed.
In order to achieve the above object, the technical solution of the embodiment of the present invention is as follows:
in a first aspect, an embodiment of the present invention provides a communication method, where the method is applied to a first LoRa terminal, and the method includes:
receiving a downlink signal sent by first superior network equipment; the downlink signal comprises a target terminal identifier and an operation instruction for indicating the target terminal to operate; the first upper network device comprises a LoRa gateway or a second LoRa terminal closer to the LoRa gateway than the first LoRa terminal;
determining whether the first LoRa terminal is the target terminal according to the downlink signal;
Executing the operation instruction in the downlink signal corresponding to the determination that the first LoRa terminal is the target terminal;
and forwarding the downlink signal to a third LoRa terminal farther from the LoRa gateway than the first LoRa terminal in response to determining that the first LoRa terminal is not itself the target terminal.
Further, after the receiving the downlink signal sent by the first upper level network device, the method further includes:
sending a first response message to the first superior network device; the first response message is used for indicating that the first LoRa terminal receives the downlink signal;
receiving a second response message sent by the first superior network device; the second response message is used for indicating that the first loRa terminal and the first superior network equipment complete signal transmission.
Further, the determining whether the first LoRa terminal is the target terminal according to the downlink signal includes:
and determining whether the first LoRa terminal has the target terminal identifier according to the target terminal identifier in the downlink signal, and if the first LoRa terminal has the target terminal identifier, determining the first LoRa terminal as the target terminal.
Further, the forwarding the downstream signal to a third LoRa terminal farther from the LoRa gateway than the first LoRa terminal includes:
and according to a preset signal forwarding strategy, acquiring the third LoRa terminal farther from the LoRa gateway than the first LoRa terminal, and forwarding the downlink signal to the third LoRa terminal.
Further, the forwarding the downstream signal to a third LoRa terminal farther from the LoRa gateway than the first LoRa terminal includes:
and performing self-increment on the address of the first LoRa terminal, acquiring the address of the third LoRa terminal farther from the LoRa gateway than the first LoRa terminal, and forwarding the downlink signal to the third LoRa terminal.
Further, the forwarding the downlink signal to a third LoRa terminal farther from the LoRa gateway than the first LoRa terminal includes:
forwarding the downlink signal to a fourth LoRa terminal; wherein the fourth LoRa terminal is the terminal closest to the first LoRa terminal and further from the LoRa gateway than the first LoRa terminal;
determining whether a third response message sent by the fourth LoRa terminal is received; the third response message is used for indicating that the fourth LoRa terminal receives the downlink signal;
Transmitting a fourth response message to the fourth LoRa terminal corresponding to the determination that the first LoRa terminal receives the third response message transmitted by the fourth LoRa terminal; the fourth response message is used for indicating that the first LoRa terminal and the fourth LoRa terminal complete signal transmission;
the downlink signal is forwarded to a fifth LoRa terminal corresponding to the fact that the first LoRa terminal does not receive the third response message sent by the fourth LoRa terminal; wherein the fifth LoRa terminal is a terminal that is next closest to the first LoRa terminal and further from the LoRa gateway than the first LoRa terminal.
Further, the method further comprises:
receiving an uplink signal sent by second superior network equipment; the uplink signal comprises a LoRa gateway identifier and a reporting instruction for reporting information to the LoRa gateway; the second upper level network device is a sixth LoRa terminal that is farther from the LoRa gateway than the first LoRa terminal;
determining whether the first LoRa terminal is the LoRa gateway according to the uplink signal;
in response to determining that the first LoRa terminal is not itself the LoRa gateway, forwarding the upstream signal to a seventh LoRa terminal that is closer to the LoRa gateway than the first LoRa terminal.
Further, after the receiving the uplink signal sent by the second upper level network device, the method further includes:
sending a fifth response message to the second superior network device; the fifth response message is used for indicating that the first LoRa terminal receives the uplink signal;
receiving a sixth response message sent by the second superior network device; the sixth response message is used for indicating that the first LoRa terminal and the second superior network equipment complete signal transmission.
Further, the determining whether the first LoRa terminal is the LoRa gateway according to the uplink signal includes:
and determining whether the first LoRa terminal has the LoRa gateway identifier according to the LoRa gateway identifier in the uplink signal, and if the first LoRa terminal does not have the target terminal identifier, determining that the first LoRa terminal is not the LoRa gateway.
Further, the forwarding the uplink signal to a seventh LoRa terminal closer to the LoRa gateway than the first LoRa terminal includes:
and according to a preset signal forwarding strategy, acquiring the address of the seventh LoRa terminal which is closer to the LoRa gateway than the first LoRa terminal, and forwarding the uplink signal to the seventh LoRa terminal.
Further, the forwarding the uplink signal to a seventh LoRa terminal closer to the LoRa gateway than the first LoRa terminal includes:
and performing self-subtraction on the address of the first LoRa terminal, acquiring the address of the seventh LoRa terminal which is closer to the LoRa gateway than the first LoRa terminal, and forwarding the uplink signal to the seventh LoRa terminal.
Further, the forwarding the uplink signal to a seventh LoRa terminal closer to the LoRa gateway than the first LoRa terminal includes:
forwarding the uplink signal to an eighth LoRa terminal; wherein the eighth LoRa terminal is the nearest terminal to the first LoRa terminal and closer to a LoRa gateway than the first LoRa terminal;
determining whether a seventh response message sent by the eighth LoRa terminal is received; the seventh response message is configured to instruct the eighth LoRa terminal to receive the uplink signal;
transmitting an eighth response message to the eighth LoRa terminal corresponding to the determination that the first LoRa terminal receives the seventh response message transmitted by the eighth LoRa terminal; the eighth response message is used for indicating that the first LoRa terminal and the eighth LoRa terminal complete signal transmission;
Forwarding the uplink signal to a ninth LoRa terminal corresponding to the fact that the first LoRa terminal does not receive the seventh response message sent by the eighth LoRa terminal; wherein the ninth LoRa terminal is a terminal that is next closest to the first LoRa terminal and closer to the LoRa gateway than the first LoRa terminal.
In a second aspect, an embodiment of the present invention provides a communication method, where the method is applied to a LoRa gateway, and the method includes:
determining a LoRa terminal with the highest sequence from the LoRa terminals governed by the LoRa gateway according to a preset sequencing strategy;
generating a downlink signal; the downlink signal comprises a target terminal identifier and an operation instruction for indicating the target terminal to operate;
and sending the downlink signal to the LoRa terminal with the highest sequence.
Further, after the sending the downlink signal to the LoRa terminal with the highest sequence, the method further includes:
receiving a ninth response message sent by the LoRa terminal with the highest sequence; the ninth response message is used for indicating that the LoRa terminal with the highest sequence receives the downlink signal;
a tenth response message is sent to the LoRa terminal with the highest sequence; the tenth response message is used for indicating that the LoRa gateway and the LoRa terminal with the highest sequence complete signal transmission.
Further, the method further comprises:
receiving the uplink signal sent by the LoRa terminal with the highest sequence; the uplink signal comprises a LoRa gateway identifier and a reporting instruction for reporting information to the LoRa gateway;
determining whether the LoRa gateway is the LoRa gateway according to the uplink signal;
and obtaining the reporting instruction in the uplink signal corresponding to the fact that the LoRa gateway is determined to be the LoRa gateway.
Further, after the uplink signal sent by the LoRa terminal with the highest sequence is received, the method further includes:
an eleventh response message is sent to the LoRa terminal with the highest sequence; the eleventh response message is configured to instruct the LoRa gateway to receive the uplink signal;
receiving a twelfth response message sent by the LoRa terminal with the highest sequence; the twelfth response message is used for indicating that the LoRa gateway and the LoRa terminal with the highest sequence complete signal transmission.
In a third aspect, an embodiment of the present invention provides a communication apparatus, the apparatus including:
the first receiving unit is used for receiving the downlink signal sent by the first superior network equipment; the downlink signal comprises a target terminal identifier and an operation instruction for indicating the target terminal to operate; the first upper network device comprises a LoRa gateway or a second LoRa terminal closer to the LoRa gateway than the apparatus;
The first determining unit is used for determining whether the device is the target terminal according to the downlink signal;
the first execution unit is used for executing the operation instruction in the downlink signal corresponding to the determination that the device is the target terminal; the method comprises the steps of,
and in response to determining that the device itself is not the target terminal, forwarding the downstream signal to a third LoRa terminal that is farther from the LoRa gateway than the device.
Further, the apparatus further comprises:
the second receiving unit is used for receiving the uplink signal sent by the second superior network equipment; the uplink signal comprises a LoRa gateway identifier and a reporting instruction for reporting information to the LoRa gateway; the second upper level network device is a sixth LoRa terminal that is farther from the LoRa gateway than the apparatus;
the second determining unit is used for determining whether the device is the LoRa gateway according to the uplink signal;
and a second execution unit, configured to forward the uplink signal to a seventh LoRa terminal closer to the LoRa gateway than the device, in response to determining that the device itself is not the LoRa gateway.
In a fourth aspect, an embodiment of the present invention provides a communication apparatus, the apparatus including:
the third determining unit is used for determining the LoRa terminal with the highest sequence from the LoRa terminals managed by the device according to a preset ordering strategy;
a generation unit for generating a downlink signal; the downlink signal comprises a target terminal identifier and an operation instruction for indicating the target terminal to operate;
and the sending unit is used for sending the downlink signal to the LoRa terminal with the highest sequence.
Further, the apparatus further comprises:
the third receiving unit is used for receiving the uplink signals sent by the LoRa terminal with the highest sequence; the uplink signal comprises an identifier of the device and a reporting instruction for reporting information to the device;
a fourth determining unit, configured to determine whether the device is the device according to the uplink signal;
and the third execution unit is used for obtaining the reporting instruction in the uplink signal corresponding to the determination that the device is the device.
In a fifth aspect, an embodiment of the present invention provides a communication terminal, the terminal including a first communication bus, a first memory, and a first processor; wherein,
The first communication bus is configured to realize connection communication between components;
the first memory is configured to store a computer program capable of running on the processor;
the first processor is configured to perform the steps of the communication method of the first aspect when the computer program is run.
In a sixth aspect, an embodiment of the present invention provides a communications gateway, the gateway including a second communications bus, a second memory, and a second processor; wherein,
the second communication bus is configured to realize connection communication between the components;
the second memory is configured to store a computer program capable of running on the processor;
the second processor is configured to perform the steps of the second aspect when the computer program is run.
In a seventh aspect, an embodiment of the present invention provides a computer-readable storage medium storing a communication program, which when executed by at least one processor, implements the steps of the method of the communication program described in the first aspect or implements the steps of the method of the communication program described in the second aspect.
The embodiment of the invention provides a communication method, a device, a terminal, a gateway and a computer storage medium, which are used for firstly receiving a downlink signal sent by first superior network equipment; the downlink signal comprises a target terminal identifier and an operation instruction for indicating the target terminal to operate; the first upper network device comprises a LoRa gateway or a second LoRa terminal closer to the LoRa gateway than the first LoRa terminal; determining whether the first LoRa terminal is the target terminal according to the downlink signal; executing the operation instruction in the downlink signal corresponding to the determination that the first LoRa terminal is the target terminal; and forwarding the downlink signal to a third LoRa terminal farther from the LoRa gateway than the first LoRa terminal in response to determining that the first LoRa terminal is not itself the target terminal. Therefore, the technical problems that the deployment cost of the LoRa network is high, data is easy to lose due to too far distance or other interference, and the stability of data transmission cannot be guaranteed can be solved, terminal resources are fully utilized, and the stability of the LoRa network in long-distance transmission and data transmission in complex environments is guaranteed.
Drawings
Fig. 1 is a schematic diagram of an exemplary network architecture according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a minimum unit for constructing a network architecture according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of a communication method according to an embodiment of the present invention;
fig. 4 is a flow chart of another communication method according to an embodiment of the present invention;
fig. 5 is a schematic diagram of reporting a signal to a LoRa gateway by a LoRa terminal according to an embodiment of the present invention;
fig. 6 is a schematic flow chart of a communication method according to an embodiment of the present invention;
fig. 7 is a flow chart of another communication method according to an embodiment of the present invention;
fig. 8 is a schematic diagram of a communication method according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of another communication method according to an embodiment of the present invention;
FIG. 10 is a schematic diagram of a LoRa network-based intelligent street lamp according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of a communication device according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of another communication device according to an embodiment of the present invention;
fig. 13 is a schematic structural diagram of a terminal according to an embodiment of the present invention;
fig. 14 is a schematic structural diagram of a gateway according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the following detailed description of the specific technical solutions of the present invention will be given with reference to the accompanying drawings in the embodiments of the present invention. The following examples are illustrative of the invention and are not intended to limit the scope of the invention.
Fig. 1 is a schematic diagram of an exemplary network architecture according to an embodiment of the present invention, where, as shown in fig. 1, the network architecture includes a server, at least one LoRa gateway, and at least one LoRa terminal, where the server may be connected to the at least one LoRa gateway through a standard TCP/IP protocol, and the LoRa gateway may be connected to the at least one LoRa terminal. The server can send a message to the LoRa terminal through the LoRa gateway to which the LoRa terminal belongs, and the LoRa terminal can report the message to the server through the LoRa gateway to which the LoRa terminal belongs. For example, if the server needs to turn on the LoRa terminal 1, the server sends a lighting request to the LoRa terminal 1 through the LoRa gateway 1 to which the LoRa terminal belongs, and when the LoRa terminal 1 receives the lighting request, the corresponding lighting process can be performed, but if the LoRa terminal 1 fails and cannot perform the lighting process, the LoRa terminal 1 can report failure information to the server through the LoRa gateway 1. The network architecture in the embodiment of the invention can also be applied to other scenes of the Internet of things, and the embodiment of the invention is not limited.
It should be noted that the network architecture shown in fig. 1 may be composed of at least one minimum unit, and referring to fig. 2, a schematic diagram of the minimum unit for composing the network architecture is shown, where the minimum unit includes at least one LoRa terminal and a LoRa gateway to which the terminal belongs. Each LoRa terminal needs to perform configuration work related to the LoRa gateway, including configuration baud rate, air rate, communication channel, terminal address, etc. The LoRa gateway can be connected to each of the LoRa terminals, and can also be connected to each other. The default is that the smaller (or larger) the allocated address is, the closer the physical distance between the terminal and the gateway is, so as to ensure that the smaller the interference suffered by the LoRa terminal which is closer to the LoRa gateway is, the larger the probability that the LoRa terminal receives the message sent by the LoRa gateway is, and the larger the probability that the LoRa terminal which is closer to the LoRa gateway can receive the message sent by the LoRa terminal is.
Example 1
An embodiment of the present invention provides a communication method, where the method is applied to a first LoRa terminal, and fig. 3 is a schematic flow chart of the communication method provided by the embodiment of the present invention, as shown in fig. 3, where the method mainly includes the following steps:
Step 301, receiving a downlink signal sent by a first superior network device; the downlink signal comprises a target terminal identifier and an operation instruction for indicating the target terminal to operate; the first upper network device comprises a LoRa gateway or a second LoRa terminal closer to the LoRa gateway than the first LoRa terminal;
step 302, determining whether the first LoRa terminal is the target terminal according to the downlink signal;
step 303, corresponding to determining that the first LoRa terminal is the target terminal, executing the operation instruction in the downlink signal;
step 304, in response to determining that the first LoRa terminal is not itself the target terminal, forwards the downstream signal to a third LoRa terminal that is farther from the LoRa gateway than the first LoRa terminal.
Through the technical scheme shown in fig. 3, after receiving the downlink signal sent by the first upper network device, the downlink signal can be sequentially forwarded to the next LoRa terminal until the destination terminal receives the downlink signal, so that the stability of data transmission is ensured.
For the technical solution shown in fig. 3, in one possible implementation manner, after receiving the downlink signal sent by the first upper network device in step 301, the method further includes:
Sending a first response message to the first superior network device; the first response message is used for indicating that the first LoRa terminal receives the downlink signal; the method comprises the steps of,
receiving a second response message sent by the first superior network equipment; the second response message is used for indicating that the first loRa terminal and the first superior network equipment complete signal transmission.
It should be noted that, the first ra terminal may be a downlink signal sent by the received ra gateway, or may be a downlink signal sent by a second ra terminal that is closer to the ra gateway than the first ra terminal, where when the first ra terminal is the ra terminal that is closest to the ra gateway, the first ra terminal receives the downlink signal sent by the ra gateway, and otherwise, the first ra terminal receives the downlink signal sent by the second ra terminal that is closer to the ra gateway than the first ra terminal.
For example, as shown in fig. 2, when the first LoRa terminal is the LoRa terminal 1 closest to the LoRa gateway, the LoRa terminal 1 is the receiving LoRa gateway transmits the downlink signal S1, and when the first LoRa terminal is not the LoRa terminal 1 closest to the LoRa gateway, such as when the first LoRa terminal is the LoRa terminal 2, the LoRa terminal 2 is the receiving LoRa terminal 1 closer to the LoRa gateway than the LoRa terminal 2 transmits the downlink signal S2.
Here, the downlink signal may have the first LoRa terminal identifier, so only after the first LoRa terminal receives the downlink signal, the first LoRa terminal may send a first response message to the first upper network device and receive a second response message sent by the first upper network device, thereby implementing three-way handshake with the first upper network device, and determining that the first LoRa terminal receives the downlink signal through the three-way handshake. As shown in fig. 2, when the first LoRa terminal is the LoRa terminal 1, a downlink signal S1 sent by the LoRa gateway is received, the LoRa terminal 1 sends a first response message ACK1-1 to the LoRa gateway, and receives a second response message ACK1-2 sent by the LoRa gateway, so as to implement three-way handshake with the LoRa gateway, and determine that the LoRa terminal 1 receives the downlink signal S1.
For the solution shown in fig. 3, in a possible implementation manner, the determining, according to the downlink signal, whether the first LoRa terminal is the target terminal in step 302 includes:
and determining whether the first LoRa terminal has the target terminal identifier according to the target terminal identifier in the downlink signal, and if the first LoRa terminal has the target terminal identifier, determining the first LoRa terminal as the target terminal.
For example, the target terminal identifier in the downlink signal is a target terminal address, and if the first LoRa terminal self address is the target terminal address in the downlink signal, the first LoRa terminal is determined to be the target terminal.
For the technical solution shown in fig. 3, in step 303, the operation instruction in the downlink signal is executed corresponding to determining that the first LoRa terminal is the target terminal, and it should be noted that, when it is determined that the first LoRa terminal is the target terminal, the operation instruction in the downlink signal is executed. If the operation instruction in the downlink signal is a target terminal lighting instruction, when it is determined that the first LoRa terminal is a target terminal, the first LoRa terminal performs a corresponding lighting process.
For the solution shown in fig. 3, the forwarding of the downlink signal to a third LoRa terminal farther from the LoRa gateway than the first LoRa terminal in step 304, which corresponds to determining that the first LoRa terminal itself is not the target terminal, includes:
and according to a preset signal forwarding strategy, acquiring a third LoRa terminal farther from the LoRa gateway than the first LoRa terminal, and forwarding the downlink signal to the third LoRa terminal.
Or performing self-increment on the address of the first LoRa terminal, acquiring the address of a third LoRa terminal farther from the LoRa gateway than the first LoRa terminal, and forwarding the downlink signal to the third LoRa terminal.
Specifically, when it is determined that the first LoRa terminal itself is not the target terminal, performing self-increase on the address of the first LoRa terminal itself, acquiring the address of a third LoRa terminal farther from the LoRa gateway than the first LoRa terminal, and forwarding the downlink signal to the third LoRa terminal, where the signal in forwarding the downlink signal may have the address of the third LoRa terminal, and may also have a forwarding identifier, that is, a signal for identifying that the signal forwarded to the third LoRa terminal is a forwarded downlink signal.
For example, as shown in fig. 2, when the first LoRa terminal is the LoRa terminal 1 and is not the destination terminal, since the address of the LoRa terminal 1 is 0x01, the LoRa terminal 1 will perform self-increment based on the address of the self-increment to obtain the address 0x02, that is, the address of the third LoRa terminal farther from the LoRa gateway than the LoRa terminal 1, that is, the address of the LoRa terminal 2, and the address of the LoRa terminal 2 is carried in the downlink signal, so as to form the downlink signal S2, and forward the downlink signal S2 to the LoRa terminal 2.
For the solution shown in fig. 3, the forwarding of the downlink signal to a third LoRa terminal farther from the LoRa gateway than the first LoRa terminal in step 304, which corresponds to determining that the first LoRa terminal itself is not the target terminal, includes:
forwarding the downlink signal to a fourth LoRa terminal; wherein the fourth LoRa terminal is the terminal closest to the first LoRa terminal and further from the LoRa gateway than the first LoRa terminal;
determining whether a third response message sent by the fourth LoRa terminal is received; the third response message is used for indicating that the fourth LoRa terminal receives the downlink signal;
corresponding to the fact that the first LoRa terminal receives the third response message sent by the fourth LoRa terminal, sending a fourth response message to the fourth LoRa terminal; the fourth response message is used for indicating the first LoRa terminal and the fourth LoRa terminal to complete signal transmission;
the downlink signal is forwarded to a fifth LoRa terminal corresponding to the fact that the first LoRa terminal does not receive the third response message sent by the fourth LoRa terminal; wherein the fifth LoRa terminal is a terminal that is next closest to the first LoRa terminal and further from the LoRa gateway than the first LoRa terminal.
The third LoRa terminal is a fourth LoRa terminal or a fifth LoRa terminal, and the third LoRa terminal forwards the downlink signal to the fourth LoRa terminal first, and if the fourth LoRa terminal does not receive the downlink signal, the third LoRa terminal forwards the downlink signal to the fifth LoRa terminal.
For example, as shown in fig. 2, when the first LoRa terminal is the LoRa terminal 1, after confirming that the downlink signal S1 sent by the LoRa gateway is received by the LoRa terminal 1, the downlink signal S2 is forwarded to the LoRa terminal 2 closest to the LoRa terminal 1 and farther from the LoRa gateway than the LoRa terminal 1, and after confirming that the response message ACK2-1 sent by the LoRa terminal 2 is received by the LoRa terminal 1, the LoRa terminal 1 sends the response message ACK2-2 to the LoRa terminal 2 to implement three handshakes with the LoRa terminal 2; when the LoRa terminal 1 does not receive the acknowledgement message ACK2-1 sent by the LoRa terminal 2, the LoRa terminal 1 forwards the downlink signal to the LoRa terminal 3 which is closer to the LoRa terminal 1 and further from the LoRa gateway than the LoRa terminal 1.
For the technical solution shown in fig. 3, steps 301 to 304 are a process of transmitting a downlink signal to the LoRa terminal by the LoRa gateway, and in a possible implementation manner, the technical solution shown in fig. 3 further includes a process of transmitting an uplink signal to the LoRa gateway by the LoRa terminal, as shown in fig. 4, where the technical solution in fig. 4 includes:
Step 401, receiving an uplink signal sent by a second superior network device; the uplink signal comprises a LoRa gateway identifier and a reporting instruction for reporting information to the LoRa gateway; the second upper level network device is a sixth LoRa terminal that is farther from the LoRa gateway than the first LoRa terminal;
step 402, determining whether the first LoRa terminal is the LoRa gateway according to the uplink signal;
step 403, in response to determining that the first LoRa terminal is not itself the LoRa gateway, forwards the uplink signal to a seventh LoRa terminal that is closer to the LoRa gateway than the first LoRa terminal.
For the technical solution shown in fig. 4, the receiving the uplink signal sent by the second upper network device in step 401 includes:
sending a fifth response message to the second superior network device; the fifth response message is used for indicating that the first LoRa terminal receives the uplink signal;
receiving a sixth response message sent by the second superior network device; the sixth response message is used for indicating that the first LoRa terminal and the second superior network equipment complete signal transmission.
It should be noted that the first LoRa terminal may be an uplink signal that is received by a sixth LoRa terminal that is further away from the LoRa gateway than the first LoRa terminal. Fig. 5 is a schematic diagram of reporting a signal to the LoRa gateway by the LoRa terminal, and as shown in fig. 5, when the LoRa terminal 3 is a second upper network device and the first LoRa terminal is the LoRa terminal 2, the LoRa terminal 3 sends an uplink signal to the LoRa gateway, and then the LoRa terminal 2 receives the uplink signal sent by the LoRa terminal 3.
In addition, the uplink signal may also have the first LoRa terminal identifier, so only after the first LoRa terminal receives the uplink signal, the first LoRa terminal can send a fifth response message to the second upper network device and receive the sixth response message sent by the second upper network device, thereby implementing three-way handshake with the second upper network device, and determining that the first LoRa terminal receives the uplink signal through the three-way handshake.
For example, as shown in fig. 5, when the first LoRa terminal is the LoRa terminal 2, the uplink signal S-P1 sent by the LoRa terminal 3 is received, the LoRa terminal 2 sends the fifth response message ACK-P1-1 to the LoRa terminal 3, and receives the sixth response message ACK-P1-2 sent by the LoRa terminal 3, so as to implement three-way handshake with the LoRa terminal 3, and determine that the LoRa terminal 1 receives the uplink signal S-P1.
For the technical solution shown in fig. 4, determining whether the first LoRa terminal is the LoRa gateway according to the uplink signal in step 402 includes:
and determining whether the first LoRa terminal has the LoRa gateway identifier according to the LoRa gateway identifier in the uplink signal, and if the first LoRa terminal does not have the target terminal identifier, determining that the first LoRa terminal is not the LoRa gateway.
For example, the identity of the LoRa gateway in the uplink signal is a LoRa gateway address, and if the address of the first LoRa terminal is not the LoRa gateway address in the uplink signal, it is determined that the first LoRa terminal is not the LoRa gateway.
For the technical solution shown in fig. 4, determining whether the first LoRa terminal is the LoRa gateway according to the uplink signal in step 403 includes:
and according to a preset signal forwarding strategy, acquiring an address of a seventh LoRa terminal which is closer to the LoRa gateway than the first LoRa terminal, and forwarding the uplink signal to the seventh LoRa terminal.
Or performing self-subtraction on the address of the first LoRa terminal, obtaining the address of a seventh LoRa terminal which is closer to the LoRa gateway than the first LoRa terminal, and forwarding the uplink signal to the seventh LoRa terminal.
Specifically, when it is determined that the first ra terminal itself is not the ra gateway, performing self-subtraction on the address of the first ra terminal itself, acquiring the address of a seventh ra terminal that is closer to the ra gateway than the first ra terminal, and forwarding the uplink signal to the seventh ra terminal, where the signal in the forwarding uplink signal may have the address of the seventh ra terminal, and may also have a forwarding identifier, that is, a signal for identifying that the signal forwarded to the seventh ra terminal is a forwarded uplink signal.
For example, as shown in fig. 5, when the first LoRa terminal is the LoRa terminal 2 and is not the LoRa gateway, since the address of the LoRa terminal 2 is 0x02, the LoRa terminal 2 will perform self-subtraction based on the address of the self-subtraction to obtain the address 0x01, that is, the address of the seventh LoRa terminal closer to the LoRa gateway than the LoRa terminal 2, that is, the LoRa terminal 1, and the address of the LoRa terminal 1 is carried in the uplink signal, so as to form the uplink signal S2, and forward the uplink signal S2 to the LoRa terminal 1.
For the technical solution shown in fig. 4, determining whether the first LoRa terminal is the LoRa gateway according to the uplink signal in step 403 includes:
Forwarding the uplink signal to an eighth LoRa terminal; wherein the eighth LoRa terminal is the nearest terminal to the first LoRa terminal and closer to a LoRa gateway than the first LoRa terminal;
determining whether a seventh response message sent by the eighth LoRa terminal is received; the seventh response message is configured to instruct the eighth LoRa terminal to receive the uplink signal;
corresponding to the fact that the first LoRa terminal receives a seventh response message sent by the eighth LoRa terminal, sending the eighth response message to the eighth LoRa terminal; the eighth response message is used for indicating the first LoRa terminal and the eighth LoRa terminal to complete signal transmission;
forwarding the uplink signal to a ninth LoRa terminal corresponding to the fact that the first LoRa terminal does not receive the seventh response message sent by the eighth LoRa terminal; wherein the ninth LoRa terminal is a terminal that is next closest to the first LoRa terminal and closer to a LoRa gateway than the first LoRa terminal.
Here, the seventh LoRa terminal is an eighth LoRa terminal or a ninth LoRa terminal, and the uplink signal is forwarded to the eighth LoRa terminal closest to the first LoRa terminal and closer to the LoRa gateway than the first LoRa terminal, and if the eighth LoRa terminal does not receive the uplink signal, the uplink signal is forwarded to the ninth LoRa terminal next closest to the first LoRa terminal and closer to the LoRa gateway than the first LoRa terminal.
The embodiment of the invention provides a communication method, which is used for receiving a downlink signal sent by first superior network equipment; the downlink signal comprises a target terminal identifier and an operation instruction for indicating the target terminal to operate; the first upper network device comprises a LoRa gateway or a second LoRa terminal closer to the LoRa gateway than the first LoRa terminal; determining whether the first LoRa terminal is the target terminal according to the downlink signal; executing the operation instruction in the downlink signal corresponding to the determination that the first LoRa terminal is the target terminal; and forwarding the downlink signal to a third LoRa terminal farther from the LoRa gateway than the first LoRa terminal in response to determining that the first LoRa terminal is not itself the target terminal. Therefore, the problems that the deployment cost of the LoRa network is high, data is easy to lose due to too far distance or other interference, and the stability of data transmission cannot be guaranteed are solved, and the stability of the LoRa network in data transmission is guaranteed.
Example two
An embodiment of the present invention provides a communication method, where the method is applied to a LoRa gateway, and fig. 6 is a schematic flow chart of the communication method provided by the embodiment of the present invention, as shown in fig. 6, and the method mainly includes the following steps:
Step 601, determining a LoRa terminal with the highest sequence from the LoRa terminals governed by the LoRa gateway according to a preset sequencing strategy;
step 602, generating a downlink signal; the downlink signal comprises a target terminal identifier and an operation instruction for indicating the target terminal to operate;
and 603, transmitting the downlink signal to the LoRa terminal with the highest sequence.
For the technical solution shown in fig. 6, in step 601, the highest-order LoRa terminal is determined from the LoRa terminals governed by the LoRa gateway according to a preset ordering policy, and it should be noted that, as shown in fig. 2, the LoRa terminals 1, 2, … and 120 are all the LoRa terminals governed by the LoRa gateway, and are ordered according to the address order, and the LoRa terminal 1 closest to the LoRa gateway, that is, the LoRa terminal with the highest order is selected.
For the technical solution shown in fig. 6, the generating a downlink signal in step 602 needs to be described, where the target terminal identifier may be an address of the target terminal, and the operation instruction may be an instruction instructing the target terminal to perform operations such as lighting.
For the solution shown in fig. 6, in a possible implementation manner, the sending the uplink signal to the LoRa terminal with the highest sequence in step 603 further includes:
Receiving a ninth response message sent by the LoRa terminal with the highest sequence; the ninth response message is used for indicating that the LoRa terminal with the highest sequence receives the downlink signal; the method comprises the steps of,
a tenth response message is sent to the LoRa terminal with the highest sequence; the tenth response message is used for indicating that the LoRa gateway and the LoRa terminal with the highest sequence complete signal transmission.
After the downlink signal is sent to the LoRa terminal with the highest sequence, the ninth response message sent by the LoRa terminal with the highest sequence may be received; and sending a tenth response message to the LoRa terminal with the highest sequence, thereby realizing three-way handshake with the LoRa terminal with the highest sequence, and determining that the LoRa terminal with the highest sequence receives the downlink signal through the three-way handshake. As shown in fig. 2, when the highest-order LoRa terminal is the LoRa terminal 1, and after the LoRa gateway sends a downlink signal to the LoRa terminal 1, the LoRa gateway receives the acknowledgement message ACK1-1 sent by the LoRa terminal 1, the LoRa gateway sends the acknowledgement message ACK1-2 to the LoRa terminal 1, thereby implementing three-way handshake with the LoRa terminal 1, and determining that the LoRa terminal 1 receives the downlink signal S1.
For the technical solution shown in fig. 6, steps 601-603 are a process of transmitting a downlink signal to the LoRa terminal by the LoRa gateway, and in a possible implementation manner, the technical solution shown in fig. 6 further includes a process of transmitting an uplink signal to the LoRa gateway by the LoRa terminal, as shown in fig. 7, where the technical solution in fig. 7 includes:
step 701, receiving an uplink signal sent by the LoRa terminal with the highest sequence; the uplink signal comprises a LoRa gateway identifier and a reporting instruction for reporting information to the LoRa gateway.
Step 702, determining whether the LoRa gateway is itself the LoRa gateway according to the uplink signal.
Step 703, corresponding to determining that the LoRa gateway is itself the LoRa gateway, obtaining the reporting instruction in the uplink signal.
For the technical solution shown in fig. 7, the receiving the uplink signal sent by the LoRa terminal with the highest sequence in step 701 further includes:
an eleventh response message is sent to the LoRa terminal with the highest sequence; the eleventh response message is configured to instruct the LoRa gateway to receive the uplink signal; the method comprises the steps of,
receiving a twelfth response message sent by the LoRa terminal with the highest sequence; the twelfth response message is used for indicating that the LoRa gateway and the LoRa terminal with the highest sequence complete signal transmission.
In addition, after receiving the uplink signal sent by the LoRa terminal with the highest sequence, an eleventh response message may be sent to the LoRa terminal with the highest sequence; and receiving the twelfth response message sent by the LoRa terminal with the highest sequence, thereby realizing three-way handshake with the LoRa terminal with the highest sequence, and determining that the LoRa gateway receives the uplink signal through the three-way handshake. As shown in fig. 5, when the highest-order LoRa terminal is the LoRa terminal 1, after the LoRa gateway receives the uplink signal S4 sent by the LoRa terminal 1, the LoRa gateway sends a response message ACK4-1 to the LoRa terminal 1 and receives a response message ACK4-2 sent by the LoRa terminal 1, thereby implementing three-way handshake with the LoRa terminal 1 and determining that the LoRa gateway receives the uplink signal S4.
For the technical solution shown in fig. 7, in step 702, whether the LoRa gateway itself is the LoRa gateway is determined according to the uplink signal, it should be noted that, according to the LoRa gateway identifier in the uplink signal, whether the LoRa gateway itself has the LoRa gateway identifier is determined, and if the LoRa gateway itself has the target terminal identifier, the LoRa gateway itself is determined to be the LoRa gateway. For example, the LoRa gateway identifier in the uplink signal is a LoRa gateway address, and if the LoRa gateway self address is the LoRa gateway address in the uplink signal, the LoRa gateway self is determined to be the LoRa gateway.
For the technical solution shown in fig. 7, in step 703, the reporting instruction in the uplink signal is obtained corresponding to determining that the LoRa gateway is the LoRa gateway, and it should be noted that, when the LoRa gateway is determined to be the LoRa gateway, the reporting instruction in the uplink signal is obtained, the reporting instruction in the uplink signal may be recorded, or the reporting instruction in the uplink signal may be sent to a server.
The embodiment of the invention provides a communication method, which comprises the steps of determining a LoRa terminal with the highest sequence from the LoRa terminals managed by a LoRa gateway according to a preset sequencing strategy; generating a downlink signal; the downlink signal comprises a target terminal identifier and an operation instruction for indicating the target terminal to operate; and sending the downlink signal to the LoRa terminal with the highest sequence. Therefore, the problems that the deployment cost of the LoRa network is high, data is easy to lose due to too far distance or other interference, and the stability of data transmission cannot be guaranteed are solved, and the stability of the LoRa network in data transmission is guaranteed.
Example III
Fig. 8 is a schematic diagram of a communication method according to an embodiment of the present invention, as shown in fig. 8, where the method mainly includes the following steps:
Step 801, the LoRa gateway sends a signal S1 to the LoRa terminal 1, where the signal S1 includes a LoRa destination terminal address, a signal transmission end identifier, and an operation instruction, where the signal transmission end identifier is used to determine whether the LoRa terminal currently receiving the signal is the LoRa destination terminal, and if it is determined that the LoRa destination terminal address is the LoRa destination terminal, the signal transmission process is ended.
Here, the signal S1 belongs to a downlink signal transmitted by the LoRa gateway to the LoRa terminal.
It should be noted that the signal transmission end identifier may be an identifier that uniquely identifies that the currently received signal's LoRa terminal is the LoRa destination terminal, when the currently received signal's LoRa terminal is identified as the LoRa destination terminal, the received signal's LoRa terminal will not forward signals to other LoRa terminals, and the signal transmission process is ended, but when the currently received signal's LoRa terminal is identified as not the LoRa destination terminal, the signal will be forwarded to other LoRa terminals, and the signal transmission process is continued.
In addition, the operation instruction may be a command for instructing the destination terminal to perform a specific operation, for example, an operation for instructing the destination terminal to turn on a light, etc., so that the current LoRa terminal can perform a corresponding operation process only after confirming that the LoRa terminal that receives the signal is the LoRa destination terminal, but may also perform a corresponding operation process after any LoRa terminal receives the signal.
Here, the LoRa gateway may broadcast the signal S1 in the channel, where the broadcast signal S1 is that the LoRa gateway will send the signal S1 to the LoRa terminals in the channel, but the LoRa terminals in the channel may receive the signal S1, or may not receive the signal S1, especially, the LoRa terminals farther from the LoRa gateway may not receive the signal S1 due to external factors such as distance, and the LoRa terminals governed by the LoRa gateway are ranked according to a preset ranking policy, where the larger the address is, the farther from the LoRa gateway. However, the LoRa terminal 1 is the terminal closest to the LoRa gateway and can receive the signal S1. And after the LoRa gateway broadcasts the message in the channel, only the LoRa terminal 1 can realize three-way handshake with the LoRa gateway, and after other LoRa terminals receive the signal S1, the LoRa terminal can not realize three-way handshake with the LoRa gateway, and the signal S1 is ignored. The specific three-way handshake may refer to the following steps 802-803, through which the LoRa gateway can determine that the LoRa terminal 1 successfully receives the signal S1.
Fig. 10 is a schematic diagram of a smart street lamp based on a LoRa network according to an embodiment of the present invention, as shown in fig. 10, where the control module includes a LoRa gateway and a visibility meter, and the control module is as close to the street lamp where the LoRa terminal 1 is located as possible (0.5 m in this example), where the LoRa terminal 1 is the LoRa terminal closest to the control module, and each street lamp includes a LoRa terminal, a micro control unit MCU, and an illumination lamp. The interval between every two street lamps is 25m, and each LoRa gateway controls 256 street lamps at most, and when the interval exceeds 256 street lamps, a control module can be newly added, namely, a LoRa gateway is newly added.
Before the intelligent street lamp works, the communication channels of all the LoRa communication modules are set to be the channels 10, the air speed is 4.8Kbps, and the channels and the air speed can be set to be other values as required. When the intelligent street lamp works, the visibility meter in the control module can collect the visibility information at regular time and upload the visibility information to the remote server, and when the remote server sends a lighting command to the LoRa gateway according to the visibility information, the LoRa gateway can send a lighting signal to inform the 120 lamps of all lighting. When the LoRa gateway selects the address of the last LoRa terminal (i.e. LoRa terminal 120) as the destination address to send the lighting signal S1, here, instead of just sending the lighting signal S1 to the LoRa terminal 120, the lighting signal S1 is sent to all devices in the channel 10, and then all the street lamps capable of receiving the signal S1 will be lit. At this time, whether the LoRa terminal farther from the LoRa gateway receives the signal S1 or not, the LoRa terminal 1 nearest to the LoRa gateway can receive the signal S1, and the street lamp where the LoRa terminal 1 is located starts to perform three-way handshake with the LoRa gateway.
Step 802, after the LoRa terminal 1 receives the signal S1, a first response message is sent to the LoRa gateway.
It should be noted that, whether the LoRa destination terminal receives the signal S1 or not, when the LoRa terminal 1 receives the signal S1, a first response message is sent to the LoRa gateway, where the first response message is used to identify that the LoRa terminal 1 has received the signal S1.
Step 803, after receiving the first response message, the LoRa gateway sends a second response message to the LoRa terminal 1.
Here, after receiving the first response message sent by the LoRa terminal 1, the LoRa gateway sends a second response message to the LoRa terminal 1, where the second response message is used to identify that the work of sending a signal to the LoRa terminal 1 by the LoRa gateway is completed.
In step 804, after the LoRa terminal 1 receives the second response message, a signal S2 is generated, where the signal S2 includes the address of the LoRa terminal 2.
In addition, the LoRa terminal 1 determines that the LoRa terminal 1 is not the LoRa destination terminal according to the signal transmission ending identifier in the signal S1, and needs to transmit the signal to the next LoRa terminal and generate the signal S2, where the signal S2 is a forwarding signal of the signal S1 and substantially corresponds to the signal S1, and only the address of the LoRa terminal 2 is included in the signal S2 and is not the address of the LoRa destination terminal, where the address of the LoRa terminal 2 is obtained by self-increasing the address of the LoRa terminal 1 on the basis of its own address, for example, the address of the terminal 1 is 0x01, then the terminal 1 will self-increase on the basis of the address 0x01 to obtain the address 0x02, that is, the address of the LoRa terminal 2, and the signal S2 also carries the forwarding identifier of the signal S1, where the forwarding identifier is used to identify that the signal S2 is the forwarding signal of the signal S1.
For example, as shown in fig. 10, after the LoRa terminal 1 receives the signal S1, three handshakes are implemented, and the street lamp connected with the LoRa terminal performs corresponding lighting processing, and if it is determined that the LoRa terminal 1 is not the LoRa destination terminal according to the signal transmission end identifier in the signal S1, a lighting signal is sent to the LoRa terminal 2.
Step 805, the LoRa terminal 1 transmits a signal S2 to the LoRa terminal 2.
Here, the LoRa terminal 1 may broadcast the signal S2 in the channel, and although other LoRa terminals in the channel may receive the signal S2, only the LoRa terminal of the LoRa terminal address in the signal S2, that is, after the LoRa terminal 2 receives the signal S2, replies the response message to the LoRa terminal 1, and the other LoRa terminals ignore the signal S2 and do not reply the response message to the LoRa terminal 1. That is, after three handshakes are implemented by each LoRa terminal, the signal can be broadcast through the channel, but only if the address of the next terminal is the address of the LoRa terminal in the signal, the reply message can be replied.
Step 806, judging whether the LoRa terminal 2 completes three-way handshake with the LoRa terminal 1.
In addition, the three-way handshake refers to that when the LoRa terminal 2 receives the signal S2 sent by the LoRa terminal 1, a first response message is sent to the LoRa terminal, when the LoRa terminal 1 receives the first response message, the LoRa terminal 1 sends a second response message to the LoRa terminal 2, and when the LoRa terminal 2 receives the second response message, it is determined that the three-way handshake with the LoRa terminal 1 is completed.
In step 807, after the three handshakes between the LoRa terminal 2 and the LoRa terminal 1 are completed, the LoRa terminal 2 sends a signal S3 to the LoRa terminal 3, where the signal S3 includes the address of the LoRa terminal 3.
After the three handshakes between the LoRa terminal 2 and the LoRa terminal 1 are completed, it is determined that the LoRa terminal 2 is not the LoRa destination terminal according to the transmission end identifier in the signal S2, and the next LoRa terminal needs to be transmitted with the signal S3, where the signal S3 is a forwarding signal of the signal S2 and is basically consistent with the signal S2, and the address of the LoRa terminal 3 is obtained by self-increasing the address of the LoRa terminal 2. The LoRa terminal 2 may broadcast the signal S3 in the channel, but only after the LoRa terminal 3 receives the signal S3, a response message is returned to the LoRa terminal 2.
Step 808, it is determined whether the LoRa terminal 3 completes the three-way handshake with the LoRa terminal 2.
In step 809, after the three handshakes between the LoRa terminal 3 and the LoRa terminal 2 are completed, the LoRa terminal 3 sends a signal S4 to the LoRa destination terminal, where the signal S4 includes the address of the LoRa destination terminal.
After the three handshakes between the LoRa terminal 3 and the LoRa terminal 2 are completed, it is determined that the LoRa terminal 3 is not the LoRa destination terminal according to the transmission end identifier in the signal S3, the signal S4 is also required to be transmitted to the next LoRa terminal, the signal S4 is generated and transmitted, the signal S4 is a forwarding signal of the signal S3 and is basically consistent with the signal S3, and the address of the LoRa destination terminal is obtained by self-increasing the address of the LoRa terminal 3.
Step 810, after the LoRa destination terminal receives the signal S4, a first response message is sent to the LoRa terminal 3.
Here, the first reply message is used to identify that the LoRa destination terminal has received the signal S4.
Step 811, after the LoRa terminal 3 receives the first response message, it sends a second response message to the LoRa destination terminal.
In addition, after the LoRa destination terminal receives the second response message, it is determined that the LoRa terminal currently receiving the signal S4 is the LoRa destination terminal according to the transmission end identifier in the signal S4, the signal transmission process is ended without transmitting a signal to the next LoRa terminal, and corresponding operations are performed according to the operation instruction, for example, a lighting operation is performed according to a lighting instruction of the LoRa destination terminal in the signal S4.
For example, as shown in fig. 10, if the LoRa destination terminal is the LoRa terminal 120, after receiving the lighting signal, the LoRa terminal 1 will transmit the lighting signal to the LoRa terminal 2, after receiving the lighting signal, the LoRa terminal 2 will transmit the signal to the LoRa terminal 3, and the lighting signal is transmitted according to the above method, so that the LoRa terminal 120 receives the lighting signal, and each guaranteed LoRa terminal can receive the lighting signal, thereby guaranteeing that each street lamp connected with the LoRa terminal can be lighted.
In step 812, when the LoRa terminal 3 does not complete the three-way handshake with the LoRa terminal 2, the LoRa terminal 2 generates a signal S-P4, wherein the signal S-P4 includes the address of the LoRa destination terminal.
Here, the fact that the LoRa terminal 3 does not complete the three-way handshake with the LoRa terminal 2 may also mean that the LoRa terminal 2 does not receive the first reply message, and thus determines that the LoRa terminal 3 does not receive the signal S3, the LoRa terminal 2 generates the signal S-P4, where the address of the LoRa destination terminal is obtained by performing self-addition according to the address of the terminal 3, where the signal S-P4 is a forwarding signal of the signal S3 and substantially corresponds to the signal S3.
For example, as shown in fig. 10, when a part of the terminals are disconnected from the whole communication link, for example, the LoRa terminal 5 does not reply to the LoRa terminal 4 all the time, the LoRa terminal 4 continues to send the lighting signal S6 to the LoRa terminal 6, so as to ensure that the lighting signal continues to be transmitted.
Step 813, the LoRa terminal 2 will send a signal S-P4 to the LoRa destination terminal.
Step 814, after the LoRa destination terminal receives the signal S-P4, a first response message is sent to the LoRa terminal 2.
In addition, the first response message is used for identifying that the LoRa destination terminal receives the signal S-P4.
Step 815, after the LoRa terminal 2 receives the first response message, it sends a second response message to the LoRa destination terminal.
Here, after the LoRa destination terminal receives the second response message, it is determined that the LoRa terminal currently receiving the signal S-P4 is the LoRa destination terminal according to the transmission end identifier in the signal S-P4, and then it is not necessary to transmit a signal to the next LoRa terminal.
In step 816, when the LoRa terminal 2 does not complete the three-way handshake with the LoRa terminal 1, the LoRa terminal 1 generates a signal S-P5, wherein the signal S-P5 includes the address of the LoRa terminal 3.
It should be noted that, the fact that the LoRa terminal 2 does not complete the three-way handshake with the LoRa terminal 1 may also mean that the LoRa terminal 1 does not receive the first reply message, and thus determines that the LoRa terminal 2 does not receive the signal S2, the LoRa terminal 1 generates the signal S-P5, where the address of the LoRa terminal 3 is obtained by self-increasing according to the address of the terminal 2, and the signal S-P5 is a forwarding signal of the signal S2 and substantially corresponds to the signal S2.
Step 817, the LoRa terminal 1 sends a signal S-P5 to the LoRa terminal 3.
Step 818, determine if the LoRa terminal 3 completes the three-way handshake with the LoRa terminal 1.
In step 819, after the three handshakes between the LoRa terminal 3 and the LoRa terminal 1 are completed, the LoRa terminal 3 sends a signal S5 to the LoRa destination terminal, where the signal S5 includes the address of the LoRa destination terminal.
Step 820, when the LoRa destination terminal receives the signal S5, it sends a first response message to the LoRa terminal 3.
Step 821, after the LoRa terminal 3 receives the first response message, it sends a second response message to the LoRa destination terminal.
In step 822, when the LoRa terminal 3 does not complete the three-way handshake with the LoRa terminal 1, the LoRa terminal 1 generates a signal S-P6, wherein the signal S-P6 includes the address of the LoRa destination terminal.
Step 823, the LoRa terminal 1 sends a signal S-P6 to the LoRa destination terminal.
Here, the signal S-P6 contains the address of the LoRa destination terminal, and the signal S-P6 is a signal transferred from the signal S-P5 and substantially coincides with the signal S-P5.
Step 824, after the LoRa destination terminal receives the signal S-P6, a first response message is sent to the LoRa terminal 1.
Step 825, after receiving the first response message, the LoRa terminal 1 sends a second response message to the LoRa destination terminal.
After receiving the second response message, the LoRa destination terminal determines that the LoRa terminal currently receiving the signal S-P6 is the LoRa destination terminal according to the transmission end identifier in the signal S-P6, and does not need to transmit a signal to the next LoRa terminal, thereby ending the signal transmission process.
For the technical solution shown in fig. 8, steps 801 to 825 are a process of transmitting a downlink signal to the LoRa terminal by the LoRa gateway, and in a possible implementation manner, the technical solution shown in fig. 9 further includes a process of transmitting an uplink signal to the LoRa gateway by the LoRa terminal, as shown in fig. 9, where the technical solution in fig. 9 includes:
Step 901, the LoRa destination terminal sends a signal S1 to the LoRa terminal 3, where the signal S1 includes an address of the LoRa terminal 3, a signal transmission end identifier, and an operation instruction, where the signal transmission end identifier is used to determine whether the LoRa terminal currently receiving the signal is a LoRa gateway, and if it is determined that the LoRa terminal is the LoRa gateway address, the signal transmission process is ended.
It should be noted that, when the LoRa destination terminal needs to report a signal, the LoRa destination terminal broadcasts an uplink signal in a channel, when the LoRa gateway receives the uplink signal, the LoRa destination terminal performs three-way handshake with the LoRa destination terminal, but if the LoRa destination terminal cannot complete three-way handshake with the LoRa gateway all the time, the LoRa destination terminal sends a signal S1 to the LoRa terminal 3, where the signal S1 is a forwarding signal of the uplink signal, and the address of the LoRa terminal 3 is obtained by self-subtracting the LoRa destination terminal on the basis of its own address.
For example, as shown in fig. 10, when a part of terminals are disconnected from the whole communication link, if the LoRa terminal 120 is the LoRa destination terminal, the LoRa terminal 120 needs to report an alarm signal to the LoRa gateway, and the LoRa gateway and the LoRa terminal 120 cannot complete three handshakes all the time because the LoRa gateway is far away from the LoRa terminal 120, the LoRa terminal 120 forwards the alarm signal to the LoRa terminal 119.
And step 902, judging whether the LoRa terminal 3 and the LoRa target terminal finish three-way handshake.
In step 903, after the three handshakes between the LoRa terminal 3 and the LoRa terminal 2 are completed, the LoRa terminal 3 sends a signal S2 to the LoRa terminal 1, where the signal S2 includes the address of the LoRa terminal 2.
Here, after the three handshakes between the LoRa terminal 3 and the LoRa terminal 2 are completed, it is determined whether the LoRa terminal 3 is a LoRa gateway according to the signal transmission end identifier in the signal S1, if not, the LoRa terminal 3 generates the signal S2, where the signal S2 is basically consistent with the signal S1, and only the signal S2 includes the address of the LoRa terminal 2, not the address of the LoRa terminal 1, and also carries the forwarding identifier of the signal S1.
And 904, judging whether the LoRa terminal 2 and the LoRa terminal 3 finish three-way handshake.
In step 905, after the three handshakes between the LoRa terminal 2 and the LoRa terminal 3 are completed, the LoRa terminal 2 sends a signal S3 to the LoRa terminal 1, where the signal S3 includes the address of the LoRa terminal 1.
Step 906, after the LoRa terminal 1 receives the signal S3, a first response message is sent to the LoRa terminal 2.
Step 907, after the LoRa terminal 2 receives the first response message, it sends a second response message to the LoRa terminal 1.
Here, the LoRa terminal 1 completes the three-way handshake with the LoRa terminal 2.
Step 908, the LoRa terminal 1 sends a signal S4 to the LoRa gateway.
Step 909, after the LoRa gateway receives the signal S4, sending a first response message to the LoRa terminal 1.
Step 910, after receiving the first response message, the LoRa terminal 1 sends a second response message to the LoRa gateway.
Here, the LoRa gateway determines whether it is a LoRa gateway according to the signal transmission end identifier in the signal S4, and if it is, performs a corresponding process according to the operation instruction.
In step 911, when the LoRa terminal 2 does not complete the three-way handshake with the LoRa terminal 3, the LoRa terminal 3 generates a signal S-P1, wherein the signal S-P1 includes the address of the LoRa terminal 1.
Step 912, when the LoRa terminal 1 receives the signal S-P1, a first response message is sent to the LoRa terminal 3.
Step 913, after the LoRa terminal 3 receives the first response message, it sends a second response message to the LoRa terminal 1.
It should be noted that, the LoRa terminal 1 and the LoRa terminal 3 complete the three-way handshake, and the process proceeds to step 908.
In step 914, when the LoRa destination terminal does not complete the three-way handshake with the LoRa terminal 3, the LoRa destination terminal generates a signal S-P2, wherein the signal S-P2 includes the address of the LoRa terminal 2.
Step 915, judging whether the LoRa terminal 2 completes three-way handshake with the LoRa destination terminal.
Here, after the three-way handshake is completed between the LoRa terminal 2 and the LoRa destination terminal, step 905 is entered.
In step 916, when the LoRa terminal 3 does not complete the three-way handshake with the LoRa destination terminal, the LoRa destination terminal sends a signal S-P3 to the LoRa terminal 1, where the signal S-P3 includes the address of the LoRa terminal 1.
Step 917, after the LoRa terminal 1 receives the signal S-P3, a first response message is sent to the LoRa destination terminal.
Step 918, after receiving the first response message, the LoRa destination terminal sends a second response message to the LoRa terminal 1.
Here, after the three-way handshake is completed between the LoRa terminal 1 and the LoRa destination terminal, step 908 is entered.
The embodiment of the invention provides a communication method, which is used for receiving a downlink signal sent by first superior network equipment; the downlink signal comprises a target terminal identifier and an operation instruction for indicating the target terminal to operate; the first upper network device comprises a LoRa gateway or a second LoRa terminal closer to the LoRa gateway than the first LoRa terminal; determining whether the first LoRa terminal is the target terminal according to the downlink signal; executing the operation instruction in the downlink signal corresponding to the determination that the first LoRa terminal is the target terminal; and forwarding the downlink signal to a third LoRa terminal farther from the LoRa gateway than the first LoRa terminal in response to determining that the first LoRa terminal is not itself the target terminal. Therefore, the problems that the deployment cost of the LoRa network is high, data is easy to lose due to too far distance or other interference, and the stability of data transmission cannot be guaranteed are solved, and the stability of the LoRa network in data transmission is guaranteed.
Example IV
An embodiment of the present invention provides a communication device, and fig. 11 is a schematic structural diagram of the communication device provided in the embodiment of the present invention, as shown in fig. 11, the communication device 1100 mainly includes: a first receiving unit 1101, a first determining unit 1102, and a first executing unit 1103; wherein,
the first receiving unit 1101 is configured to receive a downlink signal sent by a first upper network device; the downlink signal comprises a target terminal identifier and an operation instruction for indicating the target terminal to operate; the first upper level network device includes a LoRa gateway or a second LoRa terminal that is closer to the LoRa gateway than the communication apparatus 1100;
the first determining unit 1102 is configured to determine whether the communication device 1100 is the target terminal according to the downlink signal;
the first executing unit 1103 is configured to execute the operation instruction in the downlink signal in response to determining that the communication device 1100 is the target terminal; the method comprises the steps of,
in response to determining that the communication device 1100 itself is not the target terminal, the downstream signal is forwarded to a third LoRa terminal that is farther from the LoRa gateway than the communication device 1100.
Correspondingly, the first receiving unit 1101 is further configured to:
sending a first response message to the first superior network device; wherein the first response message is used to instruct the communication device 1100 to receive the downlink signal;
receiving a second response message sent by the first superior network equipment; the second response message is used to instruct the communication apparatus 1100 to complete signal transmission with the first upper network device.
Illustratively, the first determining unit 1102 is further configured to:
according to the target terminal identifier in the downlink signal, it is determined whether the communication device 1100 itself has the target terminal identifier, and if the communication device 1100 itself has the target terminal identifier, it is determined that the communication device 1100 itself is the target terminal.
Optionally, the first executing unit 1103 is further configured to:
according to a preset signal forwarding policy, the address of a third LoRa terminal farther from the LoRa gateway than the communication device 1100 is obtained, and the downlink signal is forwarded to the third LoRa terminal.
Optionally, the first executing unit 1103 is further configured to:
and performing self-increment on the address of the communication device 1100, acquiring the address of a third LoRa terminal farther from the LoRa gateway than the first LoRa terminal, and forwarding the downlink signal to the third LoRa terminal.
Optionally, the first executing unit 1103 is further configured to:
forwarding the downlink signal to a fourth LoRa terminal; wherein the fourth LoRa terminal is the terminal closest to the communication device 1100 and farther from the LoRa gateway than the communication device 1100;
determining whether a third response message sent by the fourth LoRa terminal is received; the third response message is used for indicating that the fourth LoRa terminal receives the downlink signal;
transmitting a fourth response message to the fourth LoRa terminal in response to determining that the communication device 1100 receives the third response message transmitted by the fourth LoRa terminal; the fourth response message is used to instruct the communication device 1100 to complete signal transmission with the fourth LoRa terminal.
Forwarding the downlink signal to a fifth LoRa terminal in response to determining that the communication device 1100 does not receive the third response message sent by the fourth LoRa terminal; wherein the fifth LoRa terminal is a terminal that is closer to the communication device 1100 and further from the LoRa gateway than the communication device 1100.
Illustratively, the apparatus 1100 further comprises: a second receiving unit 1104, a second determining unit 1105, and a second executing unit 1106; wherein,
The second receiving unit 1104 is configured to receive an uplink signal sent by a second upper-level network device; the uplink signal comprises a LoRa gateway identifier and a reporting instruction for reporting information to the LoRa gateway; the second upper level network device is a sixth LoRa terminal that is farther from the LoRa gateway than the communication apparatus 1100;
the second determining unit 1105 is configured to determine, according to the uplink signal, whether the communication device 1100 itself is the LoRa gateway;
the second execution unit 1106 is configured to forward the uplink signal to a seventh LoRa terminal closer to the LoRa gateway than the communication device 1100, in response to determining that the communication device 1100 itself is not the LoRa gateway.
Illustratively, the second receiving unit 1104 is further configured to:
sending a fifth response message to the second superior network device; wherein the fifth response message is used to instruct the communication device 1100 to receive the uplink signal;
receiving a sixth response message sent by the second superior network device; the sixth response message is used to instruct the communication apparatus 1100 to complete signal transmission with the second upper network device.
Accordingly, the second determining unit 1105 is specifically configured to:
and determining whether the communication device 1100 itself has the LoRa gateway identifier according to the LoRa gateway identifier in the uplink signal, and if the communication device 1100 itself does not have the target terminal identifier, determining that the communication device 1100 itself is not the LoRa gateway.
Illustratively, the second execution unit 1106 is further configured to:
according to a preset signal forwarding policy, the address of a seventh LoRa terminal closer to the LoRa gateway than the communication device 1100 is obtained, and the uplink signal is forwarded to the seventh LoRa terminal.
Illustratively, the second execution unit 1106 is further configured to:
the self-subtraction is performed on the address of the communication device 1100 itself, the address of the seventh LoRa terminal that is closer to the LoRa gateway than the communication device 1100 is acquired, and the uplink signal is forwarded to the seventh LoRa terminal.
Illustratively, the second execution unit 1106 is further configured to:
forwarding the uplink signal to an eighth LoRa terminal; wherein the eighth LoRa terminal is the nearest terminal to the communication device 1100 and closer to the LoRa gateway than the communication device 1100;
Determining whether a seventh response message sent by the eighth LoRa terminal is received; the seventh response message is configured to instruct the eighth LoRa terminal to receive the uplink signal;
transmitting an eighth reply message to the eighth LoRa terminal in response to determining that the communication device 1100 received the seventh reply message transmitted by the eighth LoRa terminal; the eighth response message is used to instruct the communication device 1100 to complete signal transmission with the eighth LoRa terminal.
Forwarding the uplink signal to a ninth LoRa terminal in response to determining that the communication device 1100 does not receive the seventh response message sent by the eighth LoRa terminal; wherein the ninth LoRa terminal is a terminal closer to the communication device 1100 than the communication device 1100 is to a LoRa gateway.
The communication device provided by the embodiment of the invention receives a downlink signal sent by first superior network equipment; the downlink signal comprises a target terminal identifier and an operation instruction for indicating the target terminal to operate; the first upper network device comprises a LoRa gateway or a second LoRa terminal closer to the LoRa gateway than the communication device; determining whether the communication device is the target terminal according to the downlink signal; executing the operation instruction in the downlink signal in response to determining that the communication device itself is the target terminal; in response to determining that the communication device itself is not the target terminal, the downstream signal is forwarded to a third LoRa terminal that is farther from the LoRa gateway than the communication device. Therefore, the problems that the deployment cost of the LoRa network is high, data is easy to lose due to too far distance or other interference, and the stability of data transmission cannot be guaranteed are solved, and the stability of the LoRa network in data transmission is guaranteed.
Example five
An embodiment of the present invention provides a communication device, and fig. 12 is a schematic structural diagram of the communication device provided in the embodiment of the present invention, as shown in fig. 12, the communication device 1200 mainly includes: a third determination unit 1201, a generation unit 1202, and a transmission unit 1203; wherein,
the third determining unit 1201 is configured to determine, from the LoRa terminals managed by the communication device 1200, a LoRa terminal with a highest sequence according to a preset ordering policy;
the generating unit 1202 is configured to generate a downlink signal; the downlink signal comprises a target terminal identifier and an operation instruction for indicating the target terminal to operate;
the sending unit 1203 is configured to send the downlink signal to the LoRa terminal with the highest sequence.
Accordingly, the first sending unit 1203 is further configured to:
receiving a ninth response message sent by the LoRa terminal with the highest sequence; the ninth response message is used for indicating that the LoRa terminal with the highest sequence receives the downlink signal; the method comprises the steps of,
a tenth response message is sent to the LoRa terminal with the highest sequence; the tenth response message is used to instruct the communication device 1200 to complete signal transmission with the LoRa terminal with the highest sequence.
Illustratively, the apparatus further comprises: a third receiving unit 1204, a fourth determining unit 1205, and a third executing unit 1206; wherein,
the third receiving unit 1204 is configured to receive an uplink signal sent by the LoRa terminal with the highest sequence; the uplink signal comprises a LoRa gateway identifier and a reporting instruction for reporting information to the LoRa gateway;
the fourth determining unit 1205 is configured to determine whether the communication device 1200 itself is the LoRa gateway according to the uplink signal;
the third execution unit 1206 is configured to obtain the report instruction in the uplink signal corresponding to determining that the communication device 1200 is the LoRa gateway.
Illustratively, the third receiving unit 1204 is further configured to:
an eleventh response message is sent to the LoRa terminal with the highest sequence; wherein the eleventh response message is configured to instruct the communication apparatus 1200 to receive the uplink signal;
receiving a twelfth response message sent by the LoRa terminal with the highest sequence; the twelfth response message is used to instruct the communication device 1200 to complete signal transmission with the LoRa terminal with the highest sequence.
According to the communication device provided by the embodiment of the invention, from the LoRa terminals managed by the communication device, the LoRa terminal with the highest sequence is determined according to a preset ordering strategy; generating a downlink signal; the downlink signal comprises a target terminal identifier and an operation instruction for indicating the target terminal to operate; and sending the downlink signal to the LoRa terminal with the highest sequence. Therefore, the problems that the deployment cost of the LoRa network is high, data is easy to lose due to too far distance or other interference, and the stability of data transmission cannot be guaranteed are solved, and the stability of the LoRa network in data transmission is guaranteed.
Example six
An embodiment of the present invention provides a communication terminal, and fig. 13 is a schematic structural diagram of a terminal provided in the embodiment of the present invention, as shown in fig. 13, where, the terminal 1300 at least includes a processor 1301, a communication bus 1302 and a memory 1303. Wherein the communication bus 1302 is configured to enable connected communications between these components;
memory 1303 stores a computer program running on the processor 1301;
processor 1301, when executing the computer program, performs:
receiving a downlink signal sent by first superior network equipment; the downlink signal comprises a target terminal identifier and an operation instruction for indicating the target terminal to operate; the first upper level network device includes a LoRa gateway or a second LoRa terminal that is closer to the LoRa gateway than the terminal 1300;
Determining whether the terminal 1300 is the target terminal according to the downlink signal;
executing the operation instruction in the downlink signal in response to determining that the terminal 1300 itself is the target terminal;
in response to determining that the terminal 1300 itself is not the target terminal, the downstream signal is forwarded to a third LoRa terminal that is farther from the LoRa gateway than the terminal 1300.
The processor 1301 further performs:
receiving an uplink signal sent by second superior network equipment; the uplink signal comprises a LoRa gateway identifier and a reporting instruction for reporting information to the LoRa gateway; the second upper level network device is a sixth LoRa terminal that is farther from the LoRa gateway than the terminal 1300;
determining whether the terminal 1300 is the LoRa gateway according to the uplink signal;
in response to determining that the terminal 1300 itself is not the LoRa gateway, the upstream signal is forwarded to a seventh LoRa terminal that is closer to the LoRa gateway than the terminal 1300.
Accordingly, an embodiment of the present invention further provides a computer storage medium, on which a communication program is stored, which when executed by a processor, implements the steps of the communication method provided in the embodiment.
Example seven
Fig. 14 is a schematic structural diagram of a gateway 1400 according to an embodiment of the present invention, and as shown in fig. 14, the gateway 1400 includes at least a processor 1401, a communication bus 1402 and a memory 1403. Wherein the communication bus 1402 is configured to enable connection communication between the components;
the memory 1403 stores a computer program running on the processor 1401;
processor 1401, when executing the computer program, performs:
determining a LoRa terminal with the highest sequence from the LoRa terminals governed by the gateway 1400 according to a preset sequencing strategy;
generating a downlink signal; the downlink signal comprises a target terminal identifier and an operation instruction for indicating the target terminal to operate;
and sending the downlink signal to the LoRa terminal with the highest sequence.
The processor 1401 also performs:
receiving the uplink signal sent by the LoRa terminal with the highest sequence; the uplink signal comprises a LoRa gateway identifier and a reporting instruction for reporting information to the LoRa gateway;
determining whether the gateway 1400 itself is the LoRa gateway according to the uplink signal;
And obtaining the report instruction in the uplink signal corresponding to determining that the LoRa gateway 1400 is itself the LoRa gateway.
Accordingly, an embodiment of the present invention further provides a computer storage medium, on which a communication program is stored, which when executed by a processor, implements the steps of the communication method provided in the embodiment.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present invention, the sequence numbers of the foregoing processes do not mean the order of execution, and the order of execution of the processes should be determined by the functions and internal logic thereof, and should not constitute any limitation on the implementation process of the embodiments of the present invention. The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other manners. The above-described terminal embodiments are merely illustrative, and for example, the division of the units is merely a logical function division, and there may be other division manners in actual implementation, such as: multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. In addition, the various components shown or discussed may be coupled or directly coupled or communicatively coupled to each other via some interface, whether indirectly coupled or communicatively coupled to devices or units, whether electrically, mechanically, or otherwise.
The units described above as separate components may or may not be physically separate, and components shown as units may or may not be physical units; can be located in one place or distributed to a plurality of network units; some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present invention may be integrated in one processing unit, or each unit may be separately used as one unit, or two or more units may be integrated in one unit; the integrated units may be implemented in hardware or in hardware plus software functional units.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the above method embodiments may be implemented by hardware related to program instructions, and the foregoing program may be stored in a computer readable storage medium, where the program, when executed, performs steps including the above method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read Only Memory (ROM), a magnetic disk or an optical disk, or the like, which can store program codes.
Alternatively, the above-described integrated units of the present invention may be stored in a computer-readable storage medium if implemented in the form of software functional modules and sold or used as separate products. Based on such understanding, the technical solutions of the embodiments of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium, comprising several instructions for causing a terminal to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a removable storage device, a ROM, a magnetic disk, or an optical disk.
The foregoing is merely an embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present invention, and the changes and substitutions are intended to be covered by the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (20)

1. A communication method, wherein the method is applied to a first LoRa terminal, the method comprising:
Receiving a downlink signal sent by first superior network equipment; the downlink signal comprises a target terminal identifier, a signal transmission ending identifier and an operation instruction for indicating the target terminal to operate; the first upper network device comprises a LoRa gateway or a second LoRa terminal closer to the LoRa gateway than the first LoRa terminal; determining whether the first LoRa terminal is the target terminal according to the downlink signal;
executing the operation instruction in the downlink signal corresponding to the determination that the first LoRa terminal is the target terminal;
forwarding the downstream signal to a third LoRa terminal farther from the LoRa gateway than the first LoRa terminal in response to determining that the first LoRa terminal is not itself the target terminal;
wherein after the receiving the downlink signal sent by the first superior network device, the method further includes:
sending a first response message to the first superior network device; the first response message is used for indicating that the first LoRa terminal receives the downlink signal;
receiving a second response message sent by the first superior network device; the second response message is used for indicating that the first loRa terminal and the first superior network equipment complete signal transmission;
The forwarding the downstream signal to a third LoRa terminal that is farther from the LoRa gateway than the first LoRa terminal includes:
and according to a preset signal forwarding strategy, acquiring the third LoRa terminal farther from the LoRa gateway than the first LoRa terminal, and forwarding the downlink signal to the third LoRa terminal.
2. The method of claim 1, wherein the determining whether the first LoRa terminal itself is the target terminal according to the downlink signal comprises:
and determining whether the first LoRa terminal has the target terminal identifier according to the target terminal identifier in the downlink signal, and if the first LoRa terminal has the target terminal identifier, determining the first LoRa terminal as the target terminal.
3. The method of claim 1, wherein forwarding the downstream signal to a third LoRa terminal that is farther from the LoRa gateway than the first LoRa terminal comprises:
and performing self-increment on the address of the first LoRa terminal, acquiring the address of the third LoRa terminal farther from the LoRa gateway than the first LoRa terminal, and forwarding the downlink signal to the third LoRa terminal.
4. The method of claim 1, wherein forwarding the downstream signal to a third LoRa terminal that is farther from the LoRa gateway than the first LoRa terminal comprises:
forwarding the downlink signal to a fourth LoRa terminal; wherein the fourth LoRa terminal is the terminal closest to the first LoRa terminal and further from the LoRa gateway than the first LoRa terminal;
determining whether a third response message sent by the fourth LoRa terminal is received; the third response message is used for indicating that the fourth LoRa terminal receives the downlink signal;
transmitting a fourth response message to the fourth LoRa terminal corresponding to the determination that the first LoRa terminal receives the third response message transmitted by the fourth LoRa terminal; the fourth response message is used for indicating that the first LoRa terminal and the fourth LoRa terminal complete signal transmission;
the downlink signal is forwarded to a fifth LoRa terminal corresponding to the fact that the first LoRa terminal does not receive the third response message sent by the fourth LoRa terminal; wherein the fifth LoRa terminal is a terminal that is next closest to the first LoRa terminal and further from the LoRa gateway than the first LoRa terminal.
5. The method according to any one of claims 1-4, further comprising:
receiving an uplink signal sent by second superior network equipment; the uplink signal comprises a LoRa gateway identifier and a reporting instruction for reporting information to the LoRa gateway; the second upper level network device is a sixth LoRa terminal that is farther from the LoRa gateway than the first LoRa terminal;
determining whether the first LoRa terminal is the LoRa gateway according to the uplink signal;
in response to determining that the first LoRa terminal is not itself the LoRa gateway, forwarding the upstream signal to a seventh LoRa terminal that is closer to the LoRa gateway than the first LoRa terminal.
6. The method of claim 5, wherein after said receiving the uplink signal transmitted by the second superior network device, the method further comprises:
sending a fifth response message to the second superior network device; the fifth response message is used for indicating that the first LoRa terminal receives the uplink signal;
receiving a sixth response message sent by the second superior network device; the sixth response message is used for indicating that the first LoRa terminal and the second superior network equipment complete signal transmission.
7. The method of claim 5, wherein the determining whether the first LoRa terminal itself is the LoRa gateway according to the uplink signal comprises:
and determining whether the first LoRa terminal has the LoRa gateway identifier according to the LoRa gateway identifier in the uplink signal, and if the first LoRa terminal does not have the target terminal identifier, determining that the first LoRa terminal is not the LoRa gateway.
8. The method of claim 5, wherein forwarding the upstream signal to a seventh LoRa terminal that is closer to the LoRa gateway than the first LoRa terminal comprises:
and according to a preset signal forwarding strategy, acquiring the address of the seventh LoRa terminal which is closer to the LoRa gateway than the first LoRa terminal, and forwarding the uplink signal to the seventh LoRa terminal.
9. The method of claim 5 or 8, wherein forwarding the upstream signal to a seventh LoRa terminal closer to the LoRa gateway than the first LoRa terminal comprises:
and performing self-subtraction on the address of the first LoRa terminal, acquiring the address of the seventh LoRa terminal which is closer to the LoRa gateway than the first LoRa terminal, and forwarding the uplink signal to the seventh LoRa terminal.
10. The method of claim 5, wherein forwarding the upstream signal to a seventh LoRa terminal that is closer to the LoRa gateway than the first LoRa terminal comprises:
forwarding the uplink signal to an eighth LoRa terminal; wherein the eighth LoRa terminal is the nearest terminal to the first LoRa terminal and closer to a LoRa gateway than the first LoRa terminal;
determining whether a seventh response message sent by the eighth LoRa terminal is received; the seventh response message is configured to instruct the eighth LoRa terminal to receive the uplink signal;
transmitting an eighth response message to the eighth LoRa terminal corresponding to the determination that the first LoRa terminal receives the seventh response message transmitted by the eighth LoRa terminal; the eighth response message is used for indicating that the first LoRa terminal and the eighth LoRa terminal complete signal transmission;
forwarding the uplink signal to a ninth LoRa terminal corresponding to the fact that the first LoRa terminal does not receive the seventh response message sent by the eighth LoRa terminal; wherein the ninth LoRa terminal is a terminal that is next closest to the first LoRa terminal and closer to the LoRa gateway than the first LoRa terminal.
11. A method of communication, the method being applied to a LoRa gateway, the method comprising:
determining a LoRa terminal with the highest sequence from the LoRa terminals governed by the LoRa gateway according to a preset sequencing strategy;
generating a downlink signal; the downlink signal comprises a target terminal identifier, a signal transmission ending identifier and an operation instruction for indicating the target terminal to operate;
transmitting the downlink signal to the LoRa terminal with the highest sequence;
wherein after the downlink signal is sent to the LoRa terminal with the highest sequence, the method further includes:
receiving a ninth response message sent by the LoRa terminal with the highest sequence; the ninth response message is used for indicating that the LoRa terminal with the highest sequence receives the downlink signal;
a tenth response message is sent to the LoRa terminal with the highest sequence; the tenth response message is used for indicating that the LoRa gateway and the LoRa terminal with the highest sequence complete signal transmission.
12. The method of claim 11, wherein the method further comprises:
receiving the uplink signal sent by the LoRa terminal with the highest sequence; the uplink signal comprises a LoRa gateway identifier and a reporting instruction for reporting information to the LoRa gateway;
Determining whether the LoRa gateway is the LoRa gateway according to the uplink signal;
and obtaining the reporting instruction in the uplink signal corresponding to the fact that the LoRa gateway is determined to be the LoRa gateway.
13. The method of claim 12, wherein after said receiving the uplink signal transmitted by the highest ordered LoRa terminal, the method further comprises:
an eleventh response message is sent to the LoRa terminal with the highest sequence; the eleventh response message is configured to instruct the LoRa gateway to receive the uplink signal;
receiving a twelfth response message sent by the LoRa terminal with the highest sequence; the twelfth response message is used for indicating that the LoRa gateway and the LoRa terminal with the highest sequence complete signal transmission.
14. A communication device, the device comprising:
the first receiving unit is used for receiving the downlink signal sent by the first superior network equipment; the downlink signal comprises a target terminal identifier, a signal transmission ending identifier and an operation instruction for indicating the target terminal to operate; the first upper network device comprises a LoRa gateway or a second LoRa terminal closer to the LoRa gateway than the apparatus; the first determining unit is used for determining whether the device is the target terminal according to the downlink signal;
The first execution unit is used for executing the operation instruction in the downlink signal corresponding to the determination that the device is the target terminal; the method comprises the steps of,
forwarding the downstream signal to a third LoRa terminal farther from the LoRa gateway than the device in response to determining that the device itself is not the target terminal;
the first receiving unit is further configured to send a first response message to the first upper network device; the first response message is used for indicating the communication device to receive the downlink signal; receiving a second response message sent by the first superior network equipment; the second response message is used for indicating the communication device and the first superior network equipment to complete signal transmission;
the first execution unit is further configured to obtain, according to a preset signal forwarding policy, an address of a third LoRa terminal farther than the LoRa gateway in comparison with the communication device, and forward the downlink signal to the third LoRa terminal.
15. The apparatus of claim 14, wherein the apparatus further comprises:
the second receiving unit is used for receiving the uplink signal sent by the second superior network equipment; the uplink signal comprises a LoRa gateway identifier and a reporting instruction for reporting information to the LoRa gateway; the second upper level network device is a sixth LoRa terminal that is farther from the LoRa gateway than the apparatus;
The second determining unit is used for determining whether the device is the LoRa gateway according to the uplink signal;
and a second execution unit, configured to forward the uplink signal to a seventh LoRa terminal closer to the LoRa gateway than the device, in response to determining that the device itself is not the LoRa gateway.
16. A communication device, the device comprising:
the third determining unit is used for determining the LoRa terminal with the highest sequence from the LoRa terminals managed by the device according to a preset ordering strategy;
a generation unit for generating a downlink signal; the downlink signal comprises a target terminal identifier, a signal transmission ending identifier and an operation instruction for indicating the target terminal to operate;
a sending unit, configured to send the downlink signal to the LoRa terminal with the highest sequence;
the sending unit is further configured to receive a ninth response message sent by the LoRa terminal with the highest sequence; the ninth response message is used for indicating that the LoRa terminal with the highest sequence receives the downlink signal; and sending a tenth response message to the LoRa terminal with the highest sequence; the tenth response message is used for indicating the communication device and the LoRa terminal with the highest sequence to complete signal transmission.
17. The apparatus of claim 16, wherein the apparatus further comprises:
the third receiving unit is used for receiving the uplink signals sent by the LoRa terminal with the highest sequence; the uplink signal comprises an identifier of the device and a reporting instruction for reporting information to the device;
a fourth determining unit, configured to determine whether the device is the device according to the uplink signal;
and the third execution unit is used for obtaining the reporting instruction in the uplink signal corresponding to the determination that the device is the device.
18. A communication terminal, the terminal comprising a first communication bus, a first memory and a first processor; wherein,
the first communication bus is configured to realize connection communication between components;
the first memory is configured to store a computer program capable of running on the processor;
the first processor being configured to perform the steps of the communication method of any of claims 1 to 10 when the computer program is run.
19. A communication gateway comprising a second communication bus, a second memory, and a second processor; wherein,
The second communication bus is configured to realize connection communication between the components;
the second memory is configured to store a computer program capable of running on the processor;
the second processor being configured to perform the steps of the communication method of any of claims 11 to 13 when the computer program is run.
20. A computer storage medium storing a communication program which, when executed by at least one processor, implements the steps of the method of any one of claims 1 to 10 or the steps of the method of any one of claims 11 to 13.
CN201810757553.XA 2018-07-11 2018-07-11 Communication method, device, terminal, gateway and computer storage medium Active CN110719580B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810757553.XA CN110719580B (en) 2018-07-11 2018-07-11 Communication method, device, terminal, gateway and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810757553.XA CN110719580B (en) 2018-07-11 2018-07-11 Communication method, device, terminal, gateway and computer storage medium

Publications (2)

Publication Number Publication Date
CN110719580A CN110719580A (en) 2020-01-21
CN110719580B true CN110719580B (en) 2023-08-15

Family

ID=69208970

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810757553.XA Active CN110719580B (en) 2018-07-11 2018-07-11 Communication method, device, terminal, gateway and computer storage medium

Country Status (1)

Country Link
CN (1) CN110719580B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113411816B (en) * 2020-03-17 2024-05-14 阿里巴巴集团控股有限公司 Single-channel LoRa gateway, networking method thereof and network server

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1426194A (en) * 2001-12-20 2003-06-25 深圳市中兴通讯股份有限公司上海第二研究所 Route processing method for multi-stage network management system
CN101764724A (en) * 2008-05-30 2010-06-30 当代天启技术(北京)有限公司 Methods of network deployment and data transmission of building automation system (BAS)
CN106792916A (en) * 2016-12-13 2017-05-31 浙江科技学院 A kind of mixed type remote-wireless sensor network system and its communication means
CN107612668A (en) * 2017-09-06 2018-01-19 深圳天珑无线科技有限公司 Communication means, device, terminal, server and storage medium based on LoRa
CN107888420A (en) * 2017-11-23 2018-04-06 北京安博通科技股份有限公司 A kind of management system of LAN forwarding unit
CN107911801A (en) * 2017-10-26 2018-04-13 上海宏力达信息技术股份有限公司 A kind of wireless communication system and method based on LoRa
CN107995634A (en) * 2017-11-23 2018-05-04 武汉民大信息科技有限公司 A kind of small-scale remote local area network system and its method of work based on LoRa
US10004097B1 (en) * 2016-12-20 2018-06-19 Intel Corporation Reestablishment of a network connection with an end device node methods and apparatuses

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2930397A1 (en) * 2008-04-18 2009-10-23 France Telecom METHOD OF TRANSFERRING FLOW BETWEEN HETEROGENEOUS ACCESS POINTS
US10033682B2 (en) * 2014-12-31 2018-07-24 Sybase, Inc. Cloud-based delivery notifications for messaging systems
US10567495B2 (en) * 2016-11-16 2020-02-18 Cisco Technology, Inc. Application based intelligent edge computing in a low power wide area network environment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1426194A (en) * 2001-12-20 2003-06-25 深圳市中兴通讯股份有限公司上海第二研究所 Route processing method for multi-stage network management system
CN101764724A (en) * 2008-05-30 2010-06-30 当代天启技术(北京)有限公司 Methods of network deployment and data transmission of building automation system (BAS)
CN106792916A (en) * 2016-12-13 2017-05-31 浙江科技学院 A kind of mixed type remote-wireless sensor network system and its communication means
US10004097B1 (en) * 2016-12-20 2018-06-19 Intel Corporation Reestablishment of a network connection with an end device node methods and apparatuses
CN107612668A (en) * 2017-09-06 2018-01-19 深圳天珑无线科技有限公司 Communication means, device, terminal, server and storage medium based on LoRa
CN107911801A (en) * 2017-10-26 2018-04-13 上海宏力达信息技术股份有限公司 A kind of wireless communication system and method based on LoRa
CN107888420A (en) * 2017-11-23 2018-04-06 北京安博通科技股份有限公司 A kind of management system of LAN forwarding unit
CN107995634A (en) * 2017-11-23 2018-05-04 武汉民大信息科技有限公司 A kind of small-scale remote local area network system and its method of work based on LoRa

Also Published As

Publication number Publication date
CN110719580A (en) 2020-01-21

Similar Documents

Publication Publication Date Title
CN105392181B (en) A kind of networking method of smart machine, apparatus and system
CN108449117B (en) Internet of things system based on PLC and network access method
CN207427184U (en) A kind of full duplex LoRa gateways
CN104660498A (en) Gateway equipment and information processing method
CN105392185B (en) A kind of networking method of smart machine, apparatus and system
CN103713608A (en) Hierarchical network architecture of wireless Internet-of-Things home system and networking communication method thereof
KR101110111B1 (en) Method for mesh networking of street lamp and apparatus thereof
CN110719580B (en) Communication method, device, terminal, gateway and computer storage medium
US10979865B2 (en) Handling of devices based on group membership
CN105451208A (en) Method and apparatus for achieving device to device (D2D) discovery
CN111148136B (en) Wireless Internet of things edge collaborative sensing method, device and system
CN104703211A (en) A virtualization accessing method and apparatus
CN101374155B (en) Method for locating client node in wireless netted network and wireless netted network system
CN107071856A (en) A kind of node cut-in method of channel wireless radio multi Mesh network
CN111866856A (en) Mesh device control method and system, storage medium and electronic device
CN116684873A (en) Photovoltaic tracking system and ad hoc network method
CN111580140A (en) Difference correction data broadcasting system, method, device and storage medium
KR102301414B1 (en) Method and apparatus for transmitting and receing information between devices in a wireless communictaion system
CN112770370B (en) Method and device for intelligent equipment to access network and intelligent equipment
US11910224B2 (en) Receiver-centric communication by combined network technologies for enhanced reliability
CN112995043B (en) Information processing method and device in wireless mesh network and electronic equipment
CN105376770A (en) Signal sending method, detection method, and related equipment
CN110601892B (en) Main module access method, device and equipment based on object-oriented protocol
WO2021136719A1 (en) A method of provisioning node devices of a network from a backend server, a node device and a backend server
CN104661235A (en) Networking method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant