CN110719580A - 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
CN110719580A
CN110719580A CN201810757553.XA CN201810757553A CN110719580A CN 110719580 A CN110719580 A CN 110719580A CN 201810757553 A CN201810757553 A CN 201810757553A CN 110719580 A CN110719580 A CN 110719580A
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.)
Granted
Application number
CN201810757553.XA
Other languages
Chinese (zh)
Other versions
CN110719580B (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 M2M Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile M2M 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 M2M 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

Images

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 Internet of things, and discloses a communication method, a communication device, a communication terminal, a communication gateway and a computer storage medium, wherein the method comprises the following steps: 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 superior network device comprises an LoRa gateway or a second LoRa terminal which is 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 correspondingly determining that the first LoRa terminal is not the target terminal, and forwarding the downlink signal to a third LoRa terminal which is farther away from the LoRa gateway than the first LoRa terminal.

Description

Communication method, device, terminal, gateway and computer storage medium
Technical Field
The embodiment of the invention relates to the technology of internet of things, in particular to a communication method, a communication device, a communication terminal, a communication gateway and a computer storage medium.
Background
With the continuous development of the internet of things technology and the increasing quality of life, people have more and more requirements on intelligent experience, and the application of various traditional communication transmission technologies in various internet of things industries cannot meet the requirements of people gradually. Although conventional communication technologies such as WiFi, bluetooth and Zigbee at 2.4GHz and wireless technologies such as 2G/3G/4G in the conventional wide area network technology can implement network interconnection and communication of various terminal devices, they cannot simultaneously consider both long-distance transmission and low-power transmission.
Until the Low Power Wide Area Network (LPWAN) technology appears, it is possible to reduce Power consumption to the maximum extent and save transmission cost while ensuring longer-distance communication transmission. LoRa (Long Range) is a low-power-consumption wide area network communication technology, is a technology for ultra-long distance wireless transmission based on a 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, the LoRa mainly operates in a global free frequency band, such as 433MHz frequency band.
However, currently, the method of using the LoRa to perform communication is mainly implemented by the LoRa processor sending a request to the LoRa terminal by using the LoRa gateway at a specified time node, and the LoRa terminal sending data to the LoRa processor by using the LoRa gateway after receiving the request. However, this solution requires the LoRa processor to send a request to the LoRa terminal at a specific time, and when the LoRa terminal needs to report data (for example, alarm information) to the LoRa gateway, it needs to use an independent channel for reporting, and it needs to use the independent LoRa processor to process the LoRa gateway and the channel configuration, frequency band configuration, sending and receiving requests, etc. of each LoRa terminal, which is costly to deploy, and it is not able to guarantee the stability of data transmission because data is easily lost due to too long distance or other interference.
Disclosure of Invention
In view of this, embodiments of the present invention provide a communication method, an apparatus, a terminal, a gateway and a computer storage medium for solving at least one problem existing in the prior art, which can solve the technical problems that an LoRa network is high in deployment cost, and data is easily lost due to too long distance or other interference, and stability of data transmission cannot be guaranteed, so that terminal resources are fully utilized, and stability of the LoRa network in long-distance transmission and complex environment transmission of data is guaranteed.
In order to achieve the above purpose, the technical solution of the embodiment of the present invention is realized 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 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 superior network device comprises an LoRa gateway or a second LoRa terminal which is 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 correspondingly determining that the first LoRa terminal is not the target terminal, and forwarding the downlink signal to a third LoRa terminal which is farther away from the LoRa gateway than the first LoRa 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 equipment; the second response message is used for indicating that the first LoRa terminal and the first superior network device 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 identification or not according to the target terminal identification in the downlink signal, and if the first LoRa terminal has the target terminal identification, determining that the first LoRa terminal is the target terminal.
Further, the forwarding the downlink signal to a third LoRa terminal farther from the LoRa gateway than the first LoRa terminal includes:
and acquiring a third LoRa terminal which is farther from the LoRa gateway than the first LoRa terminal according to a preset signal forwarding strategy, 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:
and performing self-increment on the address of the first LoRa terminal, acquiring the address of the third LoRa terminal which is farther away 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; the fourth LoRa terminal is a terminal which is closest to the first LoRa terminal and is farther 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 to indicate that the fourth LoRa terminal receives the downlink signal;
in response to determining 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 that the first LoRa terminal and the fourth LoRa terminal complete signal transmission;
in response to determining that the first LoRa terminal does not receive the third response message sent by the fourth LoRa terminal, forwarding the downlink signal to a fifth LoRa terminal; the fifth loRa terminal is a terminal which is next close to the first loRa terminal and is farther from the loRa gateway than the first loRa terminal.
Further, the method further comprises:
receiving an uplink signal sent by a second superior network device; the uplink signal comprises an LoRa gateway identifier and a reporting instruction used for reporting information to the LoRa gateway; the second superior 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 or not according to the uplink signal;
and correspondingly determining that the first LoRa terminal is not the LoRa gateway, and forwarding the uplink signal to a seventh LoRa terminal which 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 to indicate 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 to indicate that the first LoRa terminal and the second superior network device 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 identification or not according to the LoRa gateway identification in the uplink signal, and if the first LoRa terminal does not have the target terminal identification, 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 an 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; the eighth LoRa terminal is the terminal which is closest to the first LoRa terminal and closer to the LoRa gateway than the first LoRa terminal;
determining whether a seventh response message sent by the eighth LoRa terminal is received; wherein, the seventh response message is used to indicate that the eighth LoRa terminal receives the uplink signal;
in response to determining that the first LoRa terminal receives the seventh response message sent by the eighth LoRa terminal, sending an eighth response message to the eighth LoRa terminal; the eighth response message is used for indicating that the first LoRa terminal and the eighth LoRa terminal complete signaling;
in response to determining that the first LoRa terminal does not receive the seventh response message sent by the eighth LoRa terminal, forwarding the uplink signal to a ninth LoRa terminal; the ninth loRa terminal is a terminal which is next close to the first loRa terminal and is 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 an LoRa gateway, and the method includes:
determining an LoRa terminal with the highest sequence from 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 order, the method further includes:
receiving a ninth response message sent by the LoRa terminal with the highest sequence; the ninth response message is used to indicate that the LoRa terminal with the highest order receives the downlink signal;
sending a tenth response message 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 an uplink signal sent by the LoRa terminal with the highest sequence; the uplink signal comprises an LoRa gateway identifier and a reporting instruction used for reporting information to the LoRa gateway;
determining whether the LoRa gateway is the LoRa gateway or not according to the uplink signal;
and correspondingly determining that the LoRa gateway is the LoRa gateway, and obtaining the reporting instruction in the uplink signal.
Further, after receiving the uplink signal sent by the LoRa terminal with the highest order, the method further includes:
sending an eleventh response message to the LoRa terminal with the highest sequence; wherein the eleventh response message is used to indicate that the LoRa gateway receives 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, where the apparatus includes:
a first receiving unit, configured to receive 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 superior network device comprises an LoRa gateway or a second LoRa terminal which is closer to the LoRa gateway than the device;
a first determining unit, configured to determine whether the apparatus itself is the target terminal according to the downlink signal;
a first execution unit, configured to execute the operation instruction in the downlink signal in response to determining that the apparatus itself is the target terminal; and the number of the first and second groups,
and in response to determining that the apparatus itself is not the target terminal, forwarding the downlink signal to a third LoRa terminal that is further away from the LoRa gateway than the apparatus.
Further, the apparatus further comprises:
the second receiving unit is used for receiving an uplink signal sent by a second superior network device; the uplink signal comprises an LoRa gateway identifier and a reporting instruction used for reporting information to the LoRa gateway; the second upper network device is a sixth LoRa terminal farther from the LoRa gateway than the apparatus;
a second determining unit, configured to determine whether the apparatus itself 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 apparatus in response to determining that the apparatus itself is not the LoRa gateway.
In a fourth aspect, an embodiment of the present invention provides a communications apparatus, where the apparatus includes:
a third determining unit, configured to determine, according to a preset sorting policy, an LoRa terminal with a highest order from LoRa terminals governed by the apparatus itself;
a generating unit, 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;
and the sending unit is used for sending the downlink signal to the LoRa terminal with the highest sequence.
Further, the apparatus further comprises:
a third receiving unit, configured to receive an uplink signal sent by the LoRa terminal with the highest order; wherein 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 apparatus itself is the apparatus according to the uplink signal;
a third executing unit, configured to obtain the reporting instruction in the uplink signal in response to determining that the apparatus itself is the apparatus.
In a fifth aspect, an embodiment of the present invention provides a communication terminal, where the terminal includes a first communication bus, a first memory, and a first processor; wherein,
the first communication bus is configured to realize connection communication among the components;
the first memory configured to store a computer program operable on the processor;
the first processor, when executing the computer program, is configured to perform the steps of the communication method of the first aspect.
In a sixth aspect, an embodiment of the present invention provides a communication gateway, where the gateway includes a second communication bus, a second memory, and a second processor; wherein,
the second communication bus is configured to realize connection communication among the components;
the second memory configured to store a computer program operable on the processor;
the second processor is configured to perform the steps of the second aspect when running the computer program.
In a seventh aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores a communication program, and when the communication program is executed by at least one processor, the method of the first aspect is implemented, or the method of the second aspect is implemented.
The embodiment of the invention provides a communication method, a communication device, a communication terminal, a communication gateway and a computer storage medium, wherein a downlink signal sent by a first superior network device is received; the downlink signal comprises a target terminal identifier and an operation instruction for indicating the target terminal to operate; the first superior network device comprises an LoRa gateway or a second LoRa terminal which is 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 correspondingly determining that the first LoRa terminal is not the target terminal, and forwarding the downlink signal to a third LoRa terminal which is farther away from the LoRa gateway than the first LoRa terminal. Therefore, the technical problems that the deployment cost of the LoRa network is high, data are easily lost due to too long distance or other interference, and the stability of data transmission cannot be guaranteed can be solved, so that the terminal resources are fully utilized, and the stability of the LoRa network in long-distance transmission and complex environment data transmission is guaranteed.
Drawings
FIG. 1 provides a schematic diagram of an exemplary network architecture according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a minimum unit for constructing a network architecture according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a communication method according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating another communication method according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a reporting signal from an LoRa terminal to an LoRa gateway according to an embodiment of the present invention;
fig. 6 is a flowchart illustrating a communication method according to an embodiment of the present invention;
fig. 7 is a flowchart illustrating 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 view of an intelligent street lamp based on an LoRa network 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 clearer, the following describes specific technical solutions of the present invention in further detail with reference to the accompanying drawings in the embodiments of the present invention. The following examples are intended to illustrate the invention but 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, and 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 after the LoRa terminal 1 receives the lighting request, corresponding lighting processing may be performed, but if the LoRa terminal 1 fails and cannot perform the lighting processing, the LoRa terminal 1 may report failure information to the server through the LoRa gateway 1. The network architecture in the embodiment of the present invention may also be applied to other scenarios of the internet of things, and the embodiment of the present 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 an LoRa gateway to which the terminal belongs. Each LoRa terminal needs to complete related configuration work with the LoRa gateway, including configuring baud rate, air rate, communication channel, terminal address, and the like. Moreover, the LoRa gateway can be connected and communicated with each LoRa terminal, and every two LoRa terminals can also be connected and communicated with 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 interference to the LoRa terminal closer to the LoRa gateway is smaller, that is, the greater the probability that the LoRa terminal closer to the LoRa gateway receives the message sent by the LoRa gateway is, and that the greater the probability that the LoRa terminal closer to the LoRa gateway can receive the message sent by the LoRa terminal is.
Example one
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 in the embodiment of the present invention, and as shown in fig. 3, the method mainly includes the following steps:
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 superior network device comprises an LoRa gateway or a second LoRa terminal which is 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, in response 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 the target terminal, forwarding the downlink 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 superior network device, the downlink signal can be sequentially forwarded to the next LoRa terminal until the destination terminal receives the downlink signal, thereby ensuring the stability of data transmission.
For the technical solution shown in fig. 3, in a possible implementation manner, after receiving the downlink signal sent by the first upper level 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; and the number of the first and second groups,
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 device complete signal transmission.
It should be noted that the first LoRa terminal may be a downlink signal sent by a received LoRa gateway, or may be a downlink signal sent by a second LoRa terminal closer to the LoRa gateway than the first LoRa terminal, and when the first LoRa terminal is the LoRa terminal closest to the LoRa gateway, the first LoRa terminal receives the downlink signal sent by the LoRa gateway, otherwise, the first LoRa terminal receives the downlink signal sent by the second LoRa terminal closer to the LoRa gateway than the first LoRa 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 receives the downlink signal sent by the LoRa gateway S1, and when the first LoRa terminal is not the LoRa terminal 1 closest to the LoRa gateway, for example, when the first LoRa terminal is the LoRa terminal 2, the LoRa terminal 2 receives the downlink signal forwarded by the LoRa terminal 1 closer to the LoRa gateway than the LoRa terminal 2S 2.
Here, the downlink signal may have a first LoRa terminal identifier, and therefore, only after the first LoRa terminal receives the downlink signal, the first LoRa terminal may send the first response message to the first upper level network device and receive the second response message sent by the first upper level network device, thereby implementing three-way handshake with the first upper level 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, the downlink signal S1 sent by the LoRa gateway is received, and the LoRa terminal 1 sends a first acknowledgement message ACK1-1 to the LoRa gateway and receives a second acknowledgement 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 technical 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 identification or not according to the target terminal identification in the downlink signal, and if the first LoRa terminal has the target terminal identification, determining that the first LoRa terminal is the target terminal.
For example, the target terminal identifier in the downlink signal is a target terminal address, and if the address of the first LoRa terminal is the target terminal address in the downlink signal, it is determined that the first LoRa terminal is 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 the determination that the first LoRa terminal is the target terminal, where it should be noted that, when the first LoRa terminal is determined to be the target terminal, the operation instruction in the downlink signal is executed. For example, if the operation instruction in the downlink signal is a target terminal lighting instruction, when it is determined that the first LoRa terminal itself is the target terminal, the first LoRa terminal performs corresponding lighting processing.
For the technical solution shown in fig. 3, in step 304, in response to determining that the first LoRa terminal is not the target terminal, forwarding the downlink signal to a third LoRa terminal that is farther from the LoRa gateway than the first LoRa terminal includes:
and acquiring a third LoRa terminal which is farther from the LoRa gateway than the first LoRa terminal according to a preset signal forwarding strategy, 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 is not the target terminal, the self-increment is performed on the address of the first LoRa terminal, an address of a third LoRa terminal farther from the LoRa gateway than the first LoRa terminal is obtained, and the downlink signal is forwarded to the third LoRa terminal, where a signal forwarded in the downlink signal may have the address of the third LoRa terminal, and may also have a forwarding identifier, that is, a 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 performs auto-increment on the basis of the address thereof to obtain an address 0x02, that is, the address of a third LoRa terminal farther from the LoRa gateway than the LoRa terminal 1, that is, the LoRa terminal 2, carries the address of the LoRa terminal 2 in the downlink signal to form a downlink signal S2, and forwards the downlink signal S2 to the LoRa terminal 2.
For the technical solution shown in fig. 3, in step 304, in response to determining that the first LoRa terminal is not the target terminal, forwarding the downlink signal to a third LoRa terminal that is farther from the LoRa gateway than the first LoRa terminal includes:
forwarding the downlink signal to a fourth LoRa terminal; the fourth LoRa terminal is a terminal which is closest to the first LoRa terminal and is farther away 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 to indicate that the fourth LoRa terminal receives the downlink signal;
in response to determining 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;
in response to determining that the first LoRa terminal does not receive the third response message sent by the fourth LoRa terminal, forwarding the downlink signal to a fifth LoRa terminal; the fifth loRa terminal is a terminal which is next close to the first loRa terminal and is farther from the loRa gateway than the first loRa terminal.
The third LoRa terminal is a fourth LoRa terminal or a fifth LoRa terminal, and first forwards a downlink signal to the fourth LoRa terminal, and if the fourth LoRa terminal does not receive the downlink signal, 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 to receive the downlink signal S1 sent by the LoRa gateway, the LoRa terminal 1 first forwards the downlink signal S2 to the LoRa terminal 2 that is closest to the LoRa terminal 1 and farther from the LoRa gateway than the LoRa terminal 1, and after confirming to receive the response message ACK2-1 sent by the LoRa terminal 2, the LoRa terminal 1 sends a response message ACK2-2 to the LoRa terminal 2, thereby implementing three-way handshake with the LoRa terminal 2; when the LoRa terminal 1 does not receive the response message ACK2-1 sent by the LoRa terminal 2, the LoRa terminal 1 forwards the downlink signal to the LoRa terminal 3 which is next closest to the LoRa terminal 1 and farther from the LoRa gateway than the LoRa terminal 1.
For the technical solution shown in fig. 3, step 301 and step 304 are a process in which the LoRa gateway transmits a downlink signal to the LoRa terminal, and in a possible implementation manner, the technical solution shown in fig. 3 further includes a process in which the LoRa terminal transmits an uplink signal to the LoRa gateway, as shown in fig. 4, the technical solution in fig. 4 includes:
step 401, receiving an uplink signal sent by a second superior network device; the uplink signal comprises an LoRa gateway identifier and a reporting instruction used for reporting information to the LoRa gateway; the second superior 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 the LoRa gateway, forwarding the uplink signal to a seventh LoRa terminal 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 level 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 to indicate that the first LoRa terminal and the second superior network device complete signal transmission.
It should be noted that the first LoRa terminal may be an uplink signal transmitted by a sixth LoRa terminal that is farther from the LoRa gateway than the first LoRa terminal. Fig. 5 is a schematic diagram of reporting a signal from an LoRa terminal to an LoRa gateway, and as shown in fig. 5, when an LoRa terminal 3 is a second superior network device, and a first LoRa terminal is an LoRa terminal 2, and the LoRa terminal 3 sends an uplink signal to the LoRa gateway, the LoRa terminal 2 may receive the uplink signal sent by the LoRa terminal 3.
In addition, the uplink signal may further have a first LoRa terminal identifier, so that only after the first LoRa terminal receives the uplink signal, the fifth response message may be sent to the second superior network device, and the sixth response message sent by the second superior network device is received, thereby implementing three-way handshake with the second superior 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 and receives the uplink signal S-P1 sent by the LoRa terminal 3, the LoRa terminal 2 sends a fifth acknowledgement message ACK-P1-1 to the LoRa terminal 3 and receives a sixth acknowledgement message ACK-P1-2 sent by the LoRa terminal 3, so as to implement a 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, the determining, according to the uplink signal, whether the first LoRa terminal is the LoRa gateway in step 402 includes:
and determining whether the first LoRa terminal has the LoRa gateway identification or not according to the LoRa gateway identification in the uplink signal, and if the first LoRa terminal does not have the target terminal identification, determining that the first LoRa terminal is not the LoRa gateway.
For example, the LoRa gateway identifier in the uplink signal is an 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, the determining, according to the uplink signal, whether the first LoRa terminal is the LoRa gateway 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, acquiring the address of a seventh LoRa terminal 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 LoRa terminal is not the LoRa gateway, a self-subtraction is performed on the address of the first LoRa terminal, an address of a seventh LoRa terminal closer to the LoRa gateway than the first LoRa terminal is obtained, and the uplink signal is forwarded to the seventh LoRa terminal, where forwarding the signal in the uplink signal may have the address of the seventh LoRa terminal, and may also have a forwarding identifier, that is, a signal for identifying that the signal forwarded to the seventh LoRa terminal is the 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 performs self-subtraction on the address of itself to obtain an 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, the uplink signal carries the address of the LoRa terminal 1, an uplink signal S2 is formed, and the uplink signal S2 is forwarded to the LoRa terminal 1.
For the technical solution shown in fig. 4, the determining, according to the uplink signal, whether the first LoRa terminal is the LoRa gateway in step 403 includes:
forwarding the uplink signal to an eighth LoRa terminal; the eighth LoRa terminal is the terminal which is closest to the first LoRa terminal and closer to the LoRa gateway than the first LoRa terminal;
determining whether a seventh response message sent by the eighth LoRa terminal is received; wherein, the seventh response message is used to indicate that the eighth LoRa terminal receives the uplink signal;
in response to determining that the first LoRa terminal receives the seventh response message sent by the eighth LoRa terminal, sending an eighth response message to 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;
in response to determining that the first LoRa terminal does not receive the seventh response message sent by the eighth LoRa terminal, forwarding the uplink signal to the ninth LoRa terminal; the ninth LoRa terminal is a terminal which is next closest to the first LoRa terminal and is closer to the LoRa gateway than the first LoRa terminal.
Here, the seventh LoRa terminal is an eighth LoRa terminal or a ninth LoRa terminal, and first forwards the uplink signal to an eighth LoRa terminal that is 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, forwards the uplink signal to a ninth LoRa terminal that is 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 comprises the steps of 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 superior network device comprises an LoRa gateway or a second LoRa terminal which is 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 correspondingly determining that the first LoRa terminal is not the target terminal, and forwarding the downlink signal to a third LoRa terminal which is farther away from the LoRa gateway than the first LoRa terminal. Therefore, the problem that the deployment cost of the LoRa network is high, data are easily lost due to too long distance or other interference, and the stability of data transmission cannot be guaranteed can be solved, and the stability of the LoRa network in data transmission is guaranteed.
Example two
An embodiment of the present invention provides a method for implementing a communication, where the method is applied to a LoRa gateway, and fig. 6 is a schematic flow chart of the communication method provided in the embodiment of the present invention, and as shown in fig. 6, the method mainly includes the following steps:
601, determining an LoRa terminal with the highest sequence from 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;
step 603, sending the downlink signal to the LoRa terminal with the highest sequence.
For the technical solution shown in fig. 6, in step 601, the LoRa terminal with the highest order is determined according to a preset ordering policy from the LoRa terminals served by the LoRa gateway itself, it should be noted that, as shown in fig. 2, where the LoRa terminal 1, the LoRa terminal 2, …, and the LoRa terminal 120 are all the LoRa terminals served by the LoRa gateway, and are ordered according to an address sequence, 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, in the step 602, the downlink signal is generated, it should be noted that 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 technical solution shown in fig. 6, in a possible implementation manner, the sending the uplink signal to the LoRa terminal with the highest order 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 to indicate that the LoRa terminal with the highest order receives the downlink signal; and the number of the first and second groups,
sending a tenth response message 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.
It should be noted that, after the downlink signal is sent to the LoRa terminal with the highest order, the ninth response message sent by the LoRa terminal with the highest order may be received; and sending a tenth response message to the LoRa terminal with the highest sequence, so as to realize 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 LoRa terminal with the highest sequence is the LoRa terminal 1, and the LoRa gateway sends the downlink signal to the LoRa terminal 1 and then receives the response message ACK1-1 sent by the LoRa terminal 1, the LoRa gateway sends the response message ACK1-2 to the LoRa terminal 1, so as to implement three-way handshake with the LoRa terminal 1, and determine that the LoRa terminal 1 receives the downlink signal S1.
For the technical solution shown in fig. 6, step 601 and 603 are a process in which the LoRa gateway transmits a downlink signal to the LoRa terminal, and in a possible implementation manner, the technical solution shown in fig. 6 further includes a process in which the LoRa terminal transmits an uplink signal to the LoRa gateway, as shown in fig. 7, 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 an LoRa gateway identifier and a reporting instruction used for reporting information to the LoRa gateway.
Step 702, determining whether the LoRa gateway is the LoRa gateway according to the uplink signal.
Step 703, in response to determining that the LoRa gateway itself is 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:
sending an eleventh response message to the LoRa terminal with the highest sequence; wherein the eleventh response message is used to indicate that the LoRa gateway receives the uplink signal; and the number of the first and second groups,
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 transmitted by the highest-order LoRa terminal, an eleventh response message may be transmitted to the highest-order LoRa terminal; and receiving a 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 LoRa terminal with the highest sequence is the LoRa terminal 1, the LoRa gateway receives the uplink signal S4 sent by the LoRa terminal 1, and then sends a response message ACK4-1 to the LoRa terminal 1, and receives a response message ACK4-2 sent by the LoRa terminal 1, so as to implement three-way handshake with the LoRa terminal 1, and determine that the LoRa gateway receives the uplink signal S4.
For the technical solution shown in fig. 7, in step 702, it is determined whether the LoRa gateway itself is the LoRa gateway according to the uplink signal, and it should be noted that, according to the LoRa gateway identifier in the uplink signal, it is determined whether the LoRa gateway itself has the LoRa gateway identifier, and if the LoRa gateway itself has the target terminal identifier, it is determined that the LoRa gateway itself is the LoRa gateway. For example, the LoRa gateway identifier in the uplink signal is an LoRa gateway address, and if the LoRa gateway address is the LoRa gateway address in the uplink signal, it is determined that the LoRa gateway is the LoRa gateway.
For the technical solution shown in fig. 7, in step 703, the report instruction in the uplink signal is obtained corresponding to the determination that the LoRa gateway is the LoRa gateway, where it is to be noted that, when it is determined that the LoRa gateway is the LoRa gateway, the report instruction in the uplink signal is obtained, the report instruction in the uplink signal may be recorded, and the report instruction in the uplink signal may also be sent to a server.
The embodiment of the invention provides a communication method, wherein LoRa terminals with the highest sequence are determined from 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. Therefore, the problem that the deployment cost of the LoRa network is high, data are easily lost due to too long distance or other interference, and the stability of data transmission cannot be guaranteed can be 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 provided in an embodiment of the present invention, and as shown in fig. 8, 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 an 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 address, the transmission process of the signal is ended.
Here, the signal S1 belongs to a downstream 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 confirms that the LoRa terminal currently receiving the signal is the LoRa destination terminal, and after confirming that the LoRa terminal currently receiving the signal is the LoRa destination terminal, the LoRa terminal receiving the signal does not forward the signal to another LoRa terminal, and ends the signal transmission process.
In addition, the operation instruction may be a command for instructing the destination terminal to perform a specific operation, for example, to instruct the destination terminal to perform an operation such as lighting, so that only after confirming that the LoRa terminal currently receiving the signal is the LoRa destination terminal, the current LoRa terminal can perform a corresponding operation process, but any LoRa terminal may perform a corresponding operation process after receiving the signal.
Here, the LoRa gateway may broadcast the signal S1 in the channel, where the broadcast signal S1 is that the LoRa gateway transmits the signal S1 to the LoRa terminal in the channel, but the LoRa terminal in the channel may receive the signal S1 or may not receive the signal S1, and especially, the LoRa terminal that is relatively far away from the LoRa gateway may not receive the signal S1 due to external factors such as distance, and the LoRa terminal governed by the LoRa gateway itself is sorted according to a preset sorting policy, and the LoRa terminal with the larger address is further away 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 will realize the three-way handshake with the LoRa gateway, and after receiving the signal S1, the other LoRa terminals will not realize the three-way handshake with the LoRa gateway, and ignore the signal S1. The specific implementation process of the three-way handshake can refer to subsequent step 802-803, and the three-way handshake enables the LoRa gateway to determine that the LoRa terminal 1 successfully receives the signal S1.
Fig. 10 is a schematic view of an intelligent street lamp based on an LoRa network according to an embodiment of the present invention, where, as shown in fig. 10, the control module includes an LoRa gateway and an visibility meter, and the control module is as close as possible to a street lamp where an LoRa terminal 1 is located (0.5 m apart in this example), where the LoRa terminal 1 is the LoRa terminal closest to the control module, and each street lamp includes an LoRa terminal, a MCU and an illumination lamp. The interval between each street lamp is 25m, and 256 street lamps are controlled to each LoRa gateway at most, can add a control module when exceeding 256 street lamps, namely add a LoRa gateway newly.
Before the intelligent street lamp works, the communication channels of all the LoRa communication modules are set as a channel 10, the air speed is 4.8Kbps, and the channel and the air speed can be set as other values according to needs. When the intelligent street lamp works, visibility information can be regularly collected by the visibility meter in the control module, the visibility information is uploaded 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 sends a lighting signal to inform all 120 lamps of lighting. When the LoRa gateway selects the address of the last LoRa terminal (i.e., the LoRa terminal 120) as the destination address to transmit the lighting signal S1, here, not only the lighting signal S1 is transmitted to the LoRa terminal 120, but also the lighting signal S1 is transmitted to all the devices in the channel 10, all the street lamps capable of receiving the signal S1 are lighted. At this time, regardless of whether or not the LoRa terminal farther from the LoRa gateway receives the signal S1, the LoRa terminal 1 closest to the LoRa gateway may 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 receiving the signal S1, the LoRa terminal 1 sends a first response message to the LoRa gateway.
It should be noted that, regardless of whether the LoRa destination terminal receives the signal S1, when the LoRa terminal 1 receives the signal S1, the LoRa terminal 1 sends a first response message to the LoRa gateway, where the first response message is used to identify that the LoRa terminal 1 receives 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 LoRa gateway has finished sending a signal to the LoRa terminal 1.
After receiving the second response message, the LoRa terminal 1 generates a signal S2 in step 804, where the signal S2 includes the address of the LoRa terminal 2.
Furthermore, the LoRa terminal 1 determines that the LoRa terminal 1 is not the LoRa destination terminal according to the signal transmission end flag in the signal S1, and further needs to transmit a signal to the next LoRa terminal, and generate a signal S2, where the signal S2 is a forwarding signal of the signal S1, and is substantially identical to the signal S1, except that the signal S2 includes the address of the LoRa terminal 2 and is not the address of the LoRa destination terminal, where the address of the LoRa terminal 2 is obtained by incrementing the LoRa terminal 1 on the basis of its own address, for example, the address of the terminal 1 is 0x01, the terminal 1 will obtain the address 0x02 by incrementing the address of 0x01, that is, the address of the LoRa terminal 2, and the signal S2 further carries the forwarding flag of the signal S1, where the forwarding flag is used to identify that the signal S2 is a forwarding signal of the signal S1.
For example, as shown in fig. 10, after receiving the signal S1, the LoRa terminal 1 implements three-way handshake, and causes the street lamp connected to the LoRa terminal to perform corresponding lighting processing, and when determining that the LoRa terminal 1 is not the LoRa destination terminal according to the signal transmission end flag in the signal S1, sends a lighting signal to the LoRa terminal 2.
Step 805, the LoRa terminal 1 sends a signal S2 to the LoRa terminal 2.
Here, the LoRa terminal 1 may broadcast the signal S2 on the channel, and although other LoRa terminals on the channel may also receive the signal S2, only the LoRa terminal having the LoRa terminal address in the signal S2, that is, the LoRa terminal 2, may receive the signal S2 and reply to the LoRa terminal 1, and the other LoRa terminals may ignore the signal S2 and may not reply to the LoRa terminal 1. That is, each LoRa terminal can broadcast the signal through the channel after the three-way handshake is implemented, 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, determining whether the LoRa terminal 2 and the LoRa terminal 1 complete three-way handshake.
In addition, the three-way handshake means that after receiving the signal S2 sent by the LoRa terminal 1, the LoRa terminal 2 sends a first response message to the LoRa terminal, after receiving the first response message, the LoRa terminal 1 sends a second response message to the LoRa terminal 2, and when receiving the second response message, the LoRa terminal 2 determines that the three-way handshake with the LoRa terminal 1 is completed.
In step 807, after completing the three-way handshake between the LoRa terminal 2 and the LoRa terminal 1, 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.
Here, after completing the three-way handshake with the LoRa terminal 1, the LoRa terminal 2 determines that the LoRa terminal 2 is not the LoRa destination terminal according to the transfer end flag in the signal S2, and needs to transfer a signal to the next LoRa terminal, generate and transmit the signal S3, where the signal S3 is a forwarding signal of the signal S2, and is substantially consistent with the signal S2, and the address of the LoRa terminal 3 is obtained by adding the LoRa terminal 2 on its own address. Although the LoRa terminal 2 may broadcast the signal S3 on the channel, only the LoRa terminal 3 may receive the signal S3 and reply to the LoRa terminal 2 with a response message.
Step 808, judging whether the LoRa terminal 3 and the LoRa terminal 2 complete three-way handshake.
Step 809, after the LoRa terminal 3 and the LoRa terminal 2 complete the three-way handshake, 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.
It should be noted that after the LoRa terminal 3 and the LoRa terminal 2 complete the three-way handshake, it is determined that the LoRa terminal 3 is not the LoRa destination terminal according to the transfer end flag in the signal S3, and it is also necessary to transfer a signal to the next LoRa terminal, generate and transmit a signal S4, where the signal S4 is a transfer signal of the signal S3, and is substantially identical to the signal S3, and the address of the LoRa destination terminal is obtained by the LoRa terminal 3 performing auto-increment on the basis of its own address.
Step 810, after receiving the signal S4, the LoRa destination terminal sends a first response message to the LoRa terminal 3.
Here, the first reply message is for identifying that the terminal of LoRa destination has received the signal S4.
Step 811, after receiving the first response message, the LoRa terminal 3 sends a second response message to the LoRa destination terminal.
In addition, after receiving the second response message, the LoRa destination terminal determines that the LoRa terminal currently receiving the signal S4 is the LoRa destination terminal according to the transfer end flag in the signal S4, and therefore does not need to transfer a signal to the next LoRa terminal, ends the signal transfer process, and performs a corresponding operation according to an operation instruction, for example, performs a lighting operation 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, the LoRa terminal 1 may forward the lighting signal to the LoRa terminal 2 after receiving the lighting signal, and the LoRa terminal 2 may forward the signal to the LoRa terminal 3 after receiving the lighting signal, and transmit the lighting signal according to the above method, so that the LoRa terminal 120 receives the lighting signal, and it is ensured that each LoRa terminal can receive the lighting signal, thereby ensuring that each street lamp connected to 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, where 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 response message, and thus it is determined that the LoRa terminal 3 does not receive the signal S3, the LoRa terminal 2 may generate a signal S-P4, where the address of the LoRa destination terminal is obtained by incrementing according to the address of the terminal 3, where the signal S-P4 is a forwarding signal of the signal S3, and is substantially identical to the signal S3.
For example, as shown in fig. 10, when the connection of the entire communication link is partially interrupted, for example, the LoRa terminal 5 does not reply to the LoRa terminal 4 all the time, the LoRa terminal 4 will continue to send the lighting signal S6 to the LoRa terminal 6, so as to ensure that the lighting signal continues to be transmitted.
In step 813, the LoRa terminal 2 sends a signal S-P4 to the LoRa destination terminal.
Step 814, after receiving the signal S-P4, the LoRa destination terminal sends a first response message to the LoRa terminal 2.
In addition, the first reply message is used to identify that the LoRa destination terminal has received the signal S-P4.
Step 815, after receiving the first response message, the LoRa terminal 2 sends a second response message to the LoRa destination terminal.
Here, after receiving the second response message, the LoRa destination terminal determines that the LoRa terminal currently receiving the signal S-P4 is the LoRa destination terminal according to the delivery end flag in the signal S-P4, and thus there is no need to deliver the signal to the next LoRa terminal.
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, where 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 response message, and thus it is determined that the LoRa terminal 2 does not receive the signal S2, the LoRa terminal 1 may generate the signal S-P5, where the address of the LoRa terminal 3 is obtained by incrementing according to the address of the terminal 2, and the signal S-P5 is a forwarding signal of the signal S2 and substantially coincides with the signal S2.
In step 817, the LoRa terminal 1 sends a signal S-P5 to the LoRa terminal 3.
Step 818, determining whether the LoRa terminal 3 and the LoRa terminal 1 complete three-way handshake.
Step 819, after the LoRa terminal 3 and the LoRa terminal 1 complete the three-way handshake, 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, after receiving the signal S5, the LoRa destination terminal sends a first response message to the LoRa terminal 3.
Step 821, after receiving the first response message, the LoRa terminal 3 sends a second response message to the LoRa destination terminal.
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, where the signal S-P6 includes the address of the LoRa destination terminal.
In step 823, the LoRa terminal 1 sends a signal S-P6 to the LoRa destination terminal.
Here, the signal S-P6 includes the address of the LoRa destination terminal, and the signal S-P6 is a transfer signal of the signal S-P5 and substantially coincides with the signal S-P5.
Step 824, after receiving the signal S-P6, the LoRa destination terminal sends a first response message 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.
Here, 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 delivery end flag in the signal S-P6, and thus the process of delivering the signal does not need to deliver the signal to the next LoRa terminal, and the process of delivering the signal is ended.
For the technical solution shown in fig. 8, step 801-:
step 901, the LoRa destination terminal sends a signal S1 to the LoRa terminal 3, where the signal S1 includes an LoRa terminal 3 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 an LoRa gateway, and if the terminal is determined to be the LoRa gateway address, the transmission process of the signal 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 the channel, and 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 perform 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-subtraction of the LoRa destination terminal on the basis of its own address.
For example, as shown in fig. 10, when a partial terminal of the entire communication link is disconnected, 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 since the LoRa gateway is far away from the LoRa terminal 120, the LoRa gateway and the LoRa terminal 120 cannot always complete three-way handshake, 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 destination terminal complete three-way handshake.
Step 903, after the LoRa terminal 3 and the LoRa terminal 2 complete the three-way handshake, the LoRa terminal 3 sends a signal S2 to the LoRa terminal 1, where the signal S2 includes an address of the LoRa terminal 2.
Here, after completing the three-way handshake between the LoRa terminal 3 and the LoRa terminal 2, it is determined whether the LoRa terminal 3 is an LoRa gateway according to the signal transmission end identifier in the signal S1, and if not, the LoRa terminal 3 generates a signal S2, where the signal S2 is substantially identical to the signal S1, and only the signal S2 includes the address of the LoRa terminal 2, but not the address of the LoRa terminal 1, and also carries the forwarding identifier of the signal S1.
Step 904, judging whether the LoRa terminal 2 and the LoRa terminal 3 complete three-way handshake.
Step 905, after completing the three-way handshake between the LoRa terminal 2 and the LoRa terminal 3, the LoRa terminal 2 sends a signal S3 to the LoRa terminal 1, where the signal S3 includes an address of the LoRa terminal 1.
Step 906, after receiving the signal S3, the LoRa terminal 1 sends a first response message to the LoRa terminal 2.
Step 907, after receiving the first response message, the LoRa terminal 2 sends a second response message to the LoRa terminal 1.
Here, the LoRa terminal 1 completes 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 receiving the signal S4, the LoRa gateway sends 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 or not it is the LoRa gateway according to the signaling completion flag in the signal S4, and if it is the LoRa gateway, performs corresponding processing according to the operation instruction.
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, where the signal S-P1 includes the address of the LoRa terminal 1.
Step 912, after receiving the signal S-P1, the LoRa terminal 1 sends a first response message to the LoRa terminal 3.
Step 913, after receiving the first response message, the LoRa terminal 3 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 three-way handshake, and then proceed 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, where the signal S-P2 includes the address of the LoRa terminal 2.
And step 915, judging whether the LoRa terminal 2 and the LoRa destination terminal complete three-way handshake.
Here, after the LoRa terminal 2 completes three-way handshake with the LoRa destination terminal, step 905 is entered.
In step 916, after 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 receiving the signal S-P3, the LoRa terminal 1 sends a first response message 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 LoRa terminal 1 completes three-way handshake with the LoRa destination terminal, step 908 is performed.
The embodiment of the invention provides a communication method, which comprises the steps of 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 superior network device comprises an LoRa gateway or a second LoRa terminal which is 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 correspondingly determining that the first LoRa terminal is not the target terminal, and forwarding the downlink signal to a third LoRa terminal which is farther away from the LoRa gateway than the first LoRa terminal. Therefore, the problem that the deployment cost of the LoRa network is high, data are easily lost due to too long distance or other interference, and the stability of data transmission cannot be guaranteed can be solved, and the stability of the LoRa network in data transmission is guaranteed.
Example four
An embodiment of the present invention provides a communication apparatus, and fig. 11 is a schematic structural diagram of a communication apparatus provided in an embodiment of the present invention, and as shown in fig. 11, the communication apparatus 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 level network device; the downlink signal comprises a target terminal identifier and an operation instruction for indicating the target terminal to operate; the first superior network device includes an LoRa gateway, or a second LoRa terminal closer to the LoRa gateway than the communication apparatus 1100;
the first determining unit 1102 is configured to determine whether the communication apparatus 1100 itself 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 apparatus 1100 itself is the target terminal; and the number of the first and second groups,
in response to determining that the communication apparatus 1100 itself is not the target terminal, the downlink signal is forwarded to a third LoRa terminal that is farther from the LoRa gateway than the communication apparatus 1100.
Accordingly, the first receiving unit 1101 is further configured to:
sending a first response message to the first superior network device; wherein the first acknowledgement message is used to indicate that the communication device 1100 receives the downlink signal;
receiving a second response message sent by the first superior network equipment; wherein the second response message is used to instruct the communication device 1100 to complete signal transmission with the first upper network device.
Exemplarily, the first determining unit 1102 is further configured to:
determining whether the communication device 1100 itself has the target terminal identifier according to the target terminal identifier in the downlink signal, and if the communication device 1100 itself has the target terminal identifier, determining that the communication device 1100 itself is the target terminal.
Optionally, the first executing unit 1103 is further configured to:
and according to a preset signal forwarding strategy, acquiring an address of a third LoRa terminal farther from the LoRa gateway than the communication device 1100, and forwarding the downlink signal to the third LoRa terminal.
Optionally, the first executing unit 1103 is further configured to:
the address of the communication device 1100 itself is increased, the address of a third LoRa terminal farther from the LoRa gateway than the first LoRa terminal is acquired, and the downlink signal is forwarded 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 a terminal that is closest to the communication apparatus 1100 and is further away from the LoRa gateway than the communication apparatus 1100;
determining whether a third response message sent by the fourth LoRa terminal is received; the third response message is used to indicate that the fourth LoRa terminal receives the downlink signal;
in response to determining that the communication apparatus 1100 receives the third response message sent by the fourth LoRa terminal, sending a fourth response message to the fourth LoRa terminal; wherein the fourth response message is used to instruct the communication apparatus 1100 to complete signaling with the fourth LoRa terminal.
In response to determining that the communication apparatus 1100 does not receive the third response message sent by the fourth LoRa terminal, forwarding the downlink signal to the fifth LoRa terminal; wherein the fifth LoRa terminal is a terminal that is next closest to the communication apparatus 1100 and is further away from the LoRa gateway than the communication apparatus 1100.
Illustratively, the apparatus 1100 further comprises: a second receiving unit 1104, a second determining unit 1105, and a second performing 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 an LoRa gateway identifier and a reporting instruction used for reporting information to the LoRa gateway; the second upper network device is a sixth LoRa terminal farther from the LoRa gateway than the communication apparatus 1100;
the second determining unit 1105 is configured to determine whether the communication apparatus 1100 itself is the LoRa gateway according to the uplink signal;
the second executing unit 1106 is configured to, in response to determining that the communication apparatus 1100 itself is not the LoRa gateway, forward the uplink signal to a seventh LoRa terminal that is closer to the LoRa gateway than the communication apparatus 1100.
Exemplarily, 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 indicate that the communication device 1100 receives the uplink signal;
receiving a sixth response message sent by the second superior network device; wherein the sixth response message is used to instruct the communication device 1100 to complete signal transmission with the second upper network device.
Correspondingly, the second determining unit 1105 is specifically configured to:
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:
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 communication device 1100, and forwarding the uplink signal to the seventh LoRa terminal.
Illustratively, the second execution unit 1106 is further configured to:
performing self-subtraction on the address of the communication apparatus 1100 itself, acquiring the address of a seventh LoRa terminal closer to the LoRa gateway than the communication apparatus 1100, and forwarding the uplink signal 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 a terminal that is closest to the communication apparatus 1100 and closer to an LoRa gateway than the communication apparatus 1100;
determining whether a seventh response message sent by the eighth LoRa terminal is received; wherein, the seventh response message is used to indicate that the eighth LoRa terminal receives the uplink signal;
in response to determining that the communication apparatus 1100 receives the seventh response message sent by the eighth LoRa terminal, sending an eighth response message to the eighth LoRa terminal; wherein the eighth response message is used to instruct the communication device 1100 to complete signaling with the eighth LoRa terminal.
In response to determining that the communication device 1100 does not receive the seventh response message sent by the eighth LoRa terminal, forwarding the uplink signal to the ninth LoRa terminal; wherein the ninth LoRa terminal is a terminal that is next closest to the communication apparatus 1100 and is closer to the LoRa gateway than the communication apparatus 1100.
The communication device provided by the embodiment of the invention receives 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 superior network device comprises an LoRa gateway or a second LoRa terminal which is 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 apparatus itself is the target terminal; in response to determining that the communication device itself is not the target terminal, forwarding the downlink signal to a third LoRa terminal that is further away from the LoRa gateway than the communication device. Therefore, the problem that the deployment cost of the LoRa network is high, data are easily lost due to too long distance or other interference, and the stability of data transmission cannot be guaranteed can be 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 a communication device according to an embodiment of the present invention, and 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, according to a preset ordering policy, an LoRa terminal with a highest order from the LoRa terminals belonging to the communication device 1200 itself;
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 order.
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 to indicate that the LoRa terminal with the highest order receives the downlink signal; and the number of the first and second groups,
sending a tenth response message 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 in the highest order.
Illustratively, the apparatus further comprises: a third receiving unit 1204, a fourth determining unit 1205, and a third performing unit 1206; wherein,
the third receiving unit 1204 is configured to receive an uplink signal sent by the LoRa terminal with the highest order; the uplink signal comprises an LoRa gateway identifier and a reporting instruction used for reporting information to the LoRa gateway;
the fourth determining unit 1205 is configured to determine whether the communication apparatus 1200 itself is the LoRa gateway according to the uplink signal;
the third executing unit 1206 is configured to obtain the reporting instruction in the uplink signal in response to determining that the communication device 1200 itself is the LoRa gateway.
Illustratively, the third receiving unit 1204 is further configured to:
sending an eleventh response message to the LoRa terminal with the highest sequence; the eleventh response message is used to indicate that the communication device 1200 receives 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 in the highest order.
According to the communication device provided by the embodiment of the invention, the LoRa terminal with the highest sequence is determined from the LoRa terminals governed by the communication device according to the 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 problem that the deployment cost of the LoRa network is high, data are easily lost due to too long distance or other interference, and the stability of data transmission cannot be guaranteed can be solved, and the stability of the LoRa network in data transmission is guaranteed.
EXAMPLE six
Fig. 13 is a schematic structural diagram of a terminal according to an embodiment of the present invention, and as shown in fig. 13, 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 connective communication between these components;
the memory 1303 stores computer programs running on the processor 1301;
the processor 1301, when running the computer program, performs:
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 superior network device includes an LoRa gateway, or a second LoRa terminal closer to the LoRa gateway than the terminal 1300;
determining whether the terminal 1300 itself is the target terminal according to the downlink signal;
in response to determining that the terminal 1300 itself is the target terminal, executing the operation instruction in the downlink signal;
and in response to determining that the terminal 1300 itself is not the target terminal, forwarding the downlink signal 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 a second superior network device; the uplink signal comprises an LoRa gateway identifier and a reporting instruction used for reporting information to the LoRa gateway; the second upper network device is a sixth LoRa terminal farther from the LoRa gateway than the terminal 1300;
determining whether the terminal 1300 is the LoRa gateway according to the uplink signal;
and correspondingly determining that the terminal 1300 is not the LoRa gateway, forwarding the uplink signal to a seventh LoRa terminal closer to the LoRa gateway than the terminal 1300.
Accordingly, an embodiment of the present invention further provides a computer storage medium, where a communication program is stored on the computer storage medium, and the communication program, when executed by a processor, implements the steps of the communication method provided in this embodiment.
EXAMPLE seven
An embodiment of the present invention provides a communication gateway 1400, fig. 14 is a schematic structural diagram of the gateway 1400 provided in the embodiment of the present invention, and as shown in fig. 14, the gateway 1400 at least includes a processor 1401, a communication bus 1402, and a memory 1403. Wherein the communication bus 1402 is configured to enable connection communication between these components;
the memory 1403 stores a computer program running on the processor 1401;
the processor 1401, when running the computer program, executes:
determining an LoRa terminal with the highest sequence from LoRa terminals governed by the gateway 1400 per se 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, further performs:
receiving an uplink signal sent by the LoRa terminal with the highest sequence; the uplink signal comprises an LoRa gateway identifier and a reporting instruction used for reporting information to the LoRa gateway;
determining whether the gateway 1400 itself is the LoRa gateway according to the uplink signal;
and correspondingly determining that the LoRa gateway 1400 is the LoRa gateway, obtaining the reporting instruction in the uplink signal.
Accordingly, an embodiment of the present invention further provides a computer storage medium, where a communication program is stored on the computer storage medium, and the communication program, when executed by a processor, implements the steps of the communication method provided in this 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 above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention. The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits 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 an … …" 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 ways. The above-described terminal embodiments are only illustrative, for example, the division of the unit is only a logical function division, and there may be other division ways 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 implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units; can be located in one place or distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as a removable Memory device, a Read Only Memory (ROM), a magnetic disk, or an optical disk.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a terminal to execute all or part of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a magnetic or optical disk, or other various media that can store program code.
The above description is only 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 conceive of changes or substitutions within the technical scope of the present invention, and all such changes or substitutions are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (23)

1. A communication method, applied to a first LoRa terminal, the method comprising:
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 superior network device comprises an LoRa gateway or a second LoRa terminal which is 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 correspondingly determining that the first LoRa terminal is not the target terminal, and forwarding the downlink signal to a third LoRa terminal which is farther away from the LoRa gateway than the first LoRa terminal.
2. The method according to claim 1, wherein after said receiving the downlink signal transmitted by the first upper network device, the method further comprises:
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 equipment; the second response message is used for indicating that the first LoRa terminal and the first superior network device complete signal transmission.
3. The method of claim 1, wherein the determining whether the first LoRa terminal is the target terminal according to the downlink signal comprises:
and determining whether the first LoRa terminal has the target terminal identification or not according to the target terminal identification in the downlink signal, and if the first LoRa terminal has the target terminal identification, determining that the first LoRa terminal is the target terminal.
4. The method of claim 1, wherein forwarding the downlink signal to a third LoRa terminal that is further away from the LoRa gateway than the first LoRa terminal comprises:
and acquiring a third LoRa terminal which is farther from the LoRa gateway than the first LoRa terminal according to a preset signal forwarding strategy, and forwarding the downlink signal to the third LoRa terminal.
5. The method according to claim 1 or 4, wherein the forwarding the downlink signal to a third LoRa terminal that is farther away 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 which is farther away from the LoRa gateway than the first LoRa terminal, and forwarding the downlink signal to the third LoRa terminal.
6. The method of claim 1, wherein forwarding the downlink signal to a third LoRa terminal that is further away from the LoRa gateway than the first LoRa terminal comprises:
forwarding the downlink signal to a fourth LoRa terminal; the fourth LoRa terminal is a terminal which is closest to the first LoRa terminal and is farther 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 to indicate that the fourth LoRa terminal receives the downlink signal;
in response to determining 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 that the first LoRa terminal and the fourth LoRa terminal complete signal transmission;
in response to determining that the first LoRa terminal does not receive the third response message sent by the fourth LoRa terminal, forwarding the downlink signal to a fifth LoRa terminal; the fifth loRa terminal is a terminal which is next close to the first loRa terminal and is farther from the loRa gateway than the first loRa terminal.
7. The method according to any one of claims 1-6, further comprising:
receiving an uplink signal sent by a second superior network device; the uplink signal comprises an LoRa gateway identifier and a reporting instruction used for reporting information to the LoRa gateway; the second superior 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 or not according to the uplink signal;
and correspondingly determining that the first LoRa terminal is not the LoRa gateway, and forwarding the uplink signal to a seventh LoRa terminal which is closer to the LoRa gateway than the first LoRa terminal.
8. The method according to claim 7, 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 to indicate 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 to indicate that the first LoRa terminal and the second superior network device complete signal transmission.
9. The method of claim 7, wherein the determining whether the first LoRa terminal is the LoRa gateway according to the uplink signal comprises:
and determining whether the first LoRa terminal has the LoRa gateway identification or not according to the LoRa gateway identification in the uplink signal, and if the first LoRa terminal does not have the target terminal identification, determining that the first LoRa terminal is not the LoRa gateway.
10. The method of claim 7, 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 an 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.
11. The method according to claim 7 or 10, wherein said 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.
12. The method of claim 7, 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; the eighth LoRa terminal is the terminal which is closest to the first LoRa terminal and closer to the LoRa gateway than the first LoRa terminal;
determining whether a seventh response message sent by the eighth LoRa terminal is received; wherein, the seventh response message is used to indicate that the eighth LoRa terminal receives the uplink signal;
in response to determining that the first LoRa terminal receives the seventh response message sent by the eighth LoRa terminal, sending an eighth response message to the eighth LoRa terminal; the eighth response message is used for indicating that the first LoRa terminal and the eighth LoRa terminal complete signaling;
in response to determining that the first LoRa terminal does not receive the seventh response message sent by the eighth LoRa terminal, forwarding the uplink signal to a ninth LoRa terminal; the ninth loRa terminal is a terminal which is next close to the first loRa terminal and is closer to the loRa gateway than the first loRa terminal.
13. A communication method is applied to an LoRa gateway, and comprises the following steps:
determining an LoRa terminal with the highest sequence from 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.
14. The method of claim 13, wherein after the sending the downlink signal to the highest-order LoRa terminal, the method further comprises:
receiving a ninth response message sent by the LoRa terminal with the highest sequence; the ninth response message is used to indicate that the LoRa terminal with the highest order receives the downlink signal;
sending a tenth response message 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.
15. The method according to any one of claims 13-14, further comprising:
receiving an uplink signal sent by the LoRa terminal with the highest sequence; the uplink signal comprises an LoRa gateway identifier and a reporting instruction used for reporting information to the LoRa gateway;
determining whether the LoRa gateway is the LoRa gateway or not according to the uplink signal;
and correspondingly determining that the LoRa gateway is the LoRa gateway, and obtaining the reporting instruction in the uplink signal.
16. The method according to claim 15, wherein after the receiving the uplink signal transmitted by the highest-order LoRa terminal, the method further comprises:
sending an eleventh response message to the LoRa terminal with the highest sequence; wherein the eleventh response message is used to indicate that the LoRa gateway receives 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.
17. A communications apparatus, the apparatus comprising:
a first receiving unit, configured to receive 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 superior network device comprises an LoRa gateway or a second LoRa terminal which is closer to the LoRa gateway than the device;
a first determining unit, configured to determine whether the apparatus itself is the target terminal according to the downlink signal;
a first execution unit, configured to execute the operation instruction in the downlink signal in response to determining that the apparatus itself is the target terminal; and the number of the first and second groups,
and in response to determining that the apparatus itself is not the target terminal, forwarding the downlink signal to a third LoRa terminal that is further away from the LoRa gateway than the apparatus.
18. The apparatus of claim 17, further comprising:
the second receiving unit is used for receiving an uplink signal sent by a second superior network device; the uplink signal comprises an LoRa gateway identifier and a reporting instruction used for reporting information to the LoRa gateway; the second upper network device is a sixth LoRa terminal farther from the LoRa gateway than the apparatus;
a second determining unit, configured to determine whether the apparatus itself 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 apparatus in response to determining that the apparatus itself is not the LoRa gateway.
19. A communications apparatus, the apparatus comprising:
a third determining unit, configured to determine, according to a preset sorting policy, an LoRa terminal with a highest order from LoRa terminals governed by the apparatus itself;
a generating unit, 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;
and the sending unit is used for sending the downlink signal to the LoRa terminal with the highest sequence.
20. The method of claim 19, wherein the apparatus further comprises:
a third receiving unit, configured to receive an uplink signal sent by the LoRa terminal with the highest order; wherein 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 apparatus itself is the apparatus according to the uplink signal;
a third executing unit, configured to obtain the reporting instruction in the uplink signal in response to determining that the apparatus itself is the apparatus.
21. A communication terminal, characterized in that the terminal comprises a first communication bus, a first memory and a first processor; wherein,
the first communication bus is configured to realize connection communication among the components;
the first memory configured to store a computer program operable on the processor;
the first processor, when executing the computer program, is configured to perform the steps of the communication method of any of claims 1 to 12.
22. A communications gateway, characterized in that the gateway comprises a second communications bus, a second memory and a second processor; wherein,
the second communication bus is configured to realize connection communication among the components;
the second memory configured to store a computer program operable on the processor;
the second processor, when executing the computer program, is configured to perform the steps of the communication method of any of claims 13 to 16.
23. A computer storage medium, characterized in that it stores a communication program which, when executed by at least one processor, implements the steps of the method of the communication program according to any one of claims 1 to 12 or implements the steps of the method of the communication program according to any one of claims 13 to 16.
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 true CN110719580A (en) 2020-01-21
CN110719580B 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)

Cited By (1)

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

Citations (11)

* 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)
US20110106959A1 (en) * 2008-04-18 2011-05-05 France Telecom Method for transferring a flow between heterogeneous access points
US20160191443A1 (en) * 2014-12-31 2016-06-30 William Dudley Cloud-based delivery notifications for messaging systems
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
US20180139274A1 (en) * 2016-11-16 2018-05-17 Cisco Technology, Inc. Application based intelligent edge computing in a low power wide area network environment
US10004097B1 (en) * 2016-12-20 2018-06-19 Intel Corporation Reestablishment of a network connection with an end device node methods and apparatuses

Patent Citations (11)

* 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
US20110106959A1 (en) * 2008-04-18 2011-05-05 France Telecom Method for transferring a flow between heterogeneous access points
CN101764724A (en) * 2008-05-30 2010-06-30 当代天启技术(北京)有限公司 Methods of network deployment and data transmission of building automation system (BAS)
US20160191443A1 (en) * 2014-12-31 2016-06-30 William Dudley Cloud-based delivery notifications for messaging systems
US20180139274A1 (en) * 2016-11-16 2018-05-17 Cisco Technology, Inc. Application based intelligent edge computing in a low power wide area network environment
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

Cited By (2)

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

Also Published As

Publication number Publication date
CN110719580B (en) 2023-08-15

Similar Documents

Publication Publication Date Title
JP6918707B2 (en) Machine-type communication methods, base stations and terminals
CN102547871B (en) Resource negotiation method and apparatus in a kind of D2D communication
CN107852661B (en) Network manager and mesh network system
KR101904745B1 (en) A main hub, a sub hub and a sensor node communicate in a wireless body area network including at least one sub hub and a methode thereof
CN207427184U (en) A kind of full duplex LoRa gateways
CN102238697B (en) Method and device for joining wireless sensor network
CN104221323A (en) Method for multicast flow routing selection
CN103975541A (en) Method and apparatus for transmitting a mac control message in wireless access system
CN103095605A (en) Data transmission method and system capable of fusing router in mobile internet of things
CN106604344B (en) RPL-based power utilization information system and networking and communication method thereof
KR101110111B1 (en) Method for mesh networking of street lamp and apparatus thereof
JP5142060B2 (en) Communications system
US10979865B2 (en) Handling of devices based on group membership
CN105451208A (en) Method and apparatus for achieving device to device (D2D) discovery
CN110719580A (en) Communication method, device, terminal, gateway and computer storage medium
CN108494687A (en) Power information physical system multipath networking communication means based on wifi and system
CN111580140A (en) Difference correction data broadcasting system, method, device and storage medium
CN107071856A (en) A kind of node cut-in method of channel wireless radio multi Mesh network
CN110418409B (en) Channel resource coordination allocation method and device
WO2011118100A1 (en) Base station apparatus
CN110430606A (en) A kind of method, terminal and base station that system information obtains
JP7489400B2 (en) Receiver-centric communication with multiple network technologies for enhanced reliability.
CN112770370B (en) Method and device for intelligent equipment to access network and intelligent equipment
CN112995043B (en) Information processing method and device in wireless mesh network and electronic equipment
CN104469881B (en) The method and apparatus of directional transmissions message

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