CN110809287A - Communication method of LoRa system - Google Patents

Communication method of LoRa system Download PDF

Info

Publication number
CN110809287A
CN110809287A CN201910960306.4A CN201910960306A CN110809287A CN 110809287 A CN110809287 A CN 110809287A CN 201910960306 A CN201910960306 A CN 201910960306A CN 110809287 A CN110809287 A CN 110809287A
Authority
CN
China
Prior art keywords
terminal
lora
time slot
sending
terminals
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
CN201910960306.4A
Other languages
Chinese (zh)
Other versions
CN110809287B (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.)
Beijing Yunzhi Digital Core Technology Co Ltd
Original Assignee
Beijing Yunzhi Digital Core Technology 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 Beijing Yunzhi Digital Core Technology Co Ltd filed Critical Beijing Yunzhi Digital Core Technology Co Ltd
Priority to CN201910960306.4A priority Critical patent/CN110809287B/en
Publication of CN110809287A publication Critical patent/CN110809287A/en
Application granted granted Critical
Publication of CN110809287B publication Critical patent/CN110809287B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/0289Congestion control
    • 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 invention provides a communication method of an LoRa system, which comprises that LoRa control equipment broadcasts a connection request to LoRa terminals in the whole network, so that the terminals to be connected which receive the connection request send response packets to the LoRa control equipment according to the transmission sequence of the response packets; the connection request comprises a monitoring module and control information, the terminal to be connected is any one of LoRa terminals which do not establish communication connection with the LoRa control equipment, and the terminal ID number of the terminal to be connected is not in the control information; the sending sequence of the response packets is determined by the terminal to be connected according to the terminal ID number and the monitoring modulus of the terminal to be connected; sequentially receiving response packets sent by terminals to be connected; the response packet comprises a terminal ID number of the terminal to be connected; and establishing communication connection with the terminal to be connected according to the terminal ID number of the terminal to be connected in the response packet. The method can prevent the link congestion of the LoRa control equipment.

Description

Communication method of LoRa system
Technical Field
The invention relates to the technical field of communication, in particular to a communication method of a LoRa system.
Background
The Long range (Long range) technology is a wireless modulation technology used in Long-distance, low-power consumption, low-rate applications, and can be applied to various network technologies, and is a generic name of a Long-distance low-power consumption protocol family. The LoRa system is mostly a star-shaped connection structure, and includes a LoRa control device and a plurality of LoRa terminals respectively connected to the LoRa control device, as shown in fig. 1, the LoRa control device is respectively connected to a LoRa terminal-1, a LoRa terminal-2, a LoRa terminal-n-1 and a LoRa terminal-n.
Before the connection between the LoRa control device and the LoRa terminal is established, the LoRa control device needs to store a terminal ID number (generally, a serial number of the terminal, where the serial number is based on serial numbers of all non-networked LoRa terminals in the entire network, and a communication connection is established between the LoRa terminal and the LoRa control device when the terminal is networked, and a communication connection is not established between the LoRa terminal and the LoRa control device when the terminal is not networked). When communication connection is to be established, the LoRa control device sends connection requests to each non-network-accessing LoRa terminal in the whole network, receives response packets sent by the LoRa terminal, and establishes communication connection with the LoRa terminal, namely the LoRa terminal is in network access. However, this technique requires the LoRa control device to know the terminal ID number of each LoRa terminal in the entire network in advance, and if there is a new LoRa terminal, the terminal ID number of the new LoRa terminal needs to be written into the LoRa control device, that is, the program of the LoRa control device needs to be modified, thereby reducing the operating efficiency of the LoRa system and increasing the cost.
In order to solve the above problem, the LoRa control device may be configured to broadcast a connection request to the LoRa terminals in the entire network, and the LoRa terminal that receives the connection request may send a response packet to the LoRa control device to establish a communication connection. However, in this technique, a plurality of LoRa terminals may simultaneously transmit response packets to the LoRa control device, which may cause link congestion of the LoRa control device.
Disclosure of Invention
The present invention provides a communication method of the LoRa system that at least partially solves the above technical problems.
The invention provides a communication method of an LoRa system, wherein the LoRa system comprises a LoRa control device and a plurality of LoRa terminals in a whole network, and the method comprises the following steps:
broadcasting a first connection request to LoRa terminals in the whole network by LoRa control equipment so that the terminals to be connected, which receive the first connection request, send response packets to the LoRa control equipment according to a response packet sending sequence; the terminal to be connected is any one of LoRa terminals which are not in communication connection with LoRa control equipment in the whole network, and the terminal ID number of the terminal to be connected is not contained in the first control information; the sending sequence of the response packets is determined by the terminal to be connected according to the terminal ID number and the monitoring modulus of the terminal to be connected;
sequentially receiving response packets sent by each terminal to be connected; the response packet comprises a terminal ID number of the terminal to be connected;
and establishing communication connection with the terminal to be connected according to the terminal ID number of the terminal to be connected in the response packet.
Preferably, the sequentially receiving the response packets sent by the terminals to be connected includes:
and receiving a response packet sent by the terminal to be connected in a first monitoring time period after the first connection request is broadcasted.
Preferably, the response packet further includes a first sending continuous time slot of the terminal to be connected, and the first sending continuous time slot of the terminal to be connected is stored in a pairing manner with the terminal ID number of the terminal to be connected;
then, the method further comprises:
calculating a first sending initial time slot of each terminal to be connected according to the sequence of receiving each response packet and the first sending continuous time slot of each terminal to be connected;
and taking the terminal ID number in each response packet, the first sending continuous time slot of each terminal to be connected and the first sending initial time slot of each terminal to be connected as a piece of newly-added sending information, updating each newly-added sending information into the first control information to form second control information, and broadcasting a second connection request to LoRa terminals in the whole network, wherein the second connection request at least comprises the second control information.
Preferably, the first control information includes transmission information of a connected terminal, the transmission information of the connected terminal includes a device terminal ID, a first transmission start time slot and a first transmission continuation time slot, the first transmission start time slot of each connected terminal is different, and the connected terminal is any one of LoRa terminals that have established communication connection with the LoRa control device in the whole network;
then, the method further comprises:
and sequentially receiving the data packets sent by the connected terminals according to the first sending start time slot and the first sending continuous time slot in the sending information of the connected terminals in the control information.
Preferably, the data packet includes a terminal ID number, a total number of data packets, a current packet sequence number and data that are stored correspondingly;
then, the method further comprises:
when the last data packet of each connected terminal is received, judging whether all the data packets of the connected terminals are received or not according to the total number of the data packets in the last data packet and the current packet serial number in the last data packet; the connected terminal sequentially sends data packets to the LoRa control equipment according to the sequence of the current packet serial number in the data packets from small to large;
if not, calculating a second sending continuous time slot of the current interruption terminal according to the current packet serial number in the last data packet of the received current interruption terminal, the first sending continuous time slot and the total number of data packets in the last data packet; wherein, the current-cutoff terminal is one of connected terminals which are not received by the LoRa control equipment for all data packets;
calculating a second sending start time slot of each connected terminal according to a start time slot of preset data receiving, a sequence of receiving response packets of the connected terminals, a second sending continuous time slot of each current-cutoff terminal and first sending continuous time slots of other connected terminals; the other connected terminals are terminals except the current cutoff terminal in all the connected terminals;
and updating the control information according to the second transmission continuous time slot of the current interrupting terminal and the second transmission starting time slot of each connected terminal.
Preferably, calculating the second transmission duration time slot of the traffic interrupting terminal according to the received current packet sequence number in the last data packet of the traffic interrupting terminal, the first transmission duration time slot and the total number of data packets in the last data packet, includes:
calculating the sending time slot of the single-packet data packet according to the number of the received data packets of the current-cutoff terminal and the last sending continuous time slot in the last data packet;
and calculating a second sending continuous time slot of the current interrupting terminal according to the single packet data packet sending time slot and the total number of data packets in the last data packet.
Preferably, the listening modulus is randomly generated.
In a second aspect, the present invention further provides a communication method for an LoRa system, where the LoRa system includes an LoRa control device and a plurality of LoRa terminals in a whole network, and the method includes:
after receiving a first connection request broadcast by LoRa control equipment, a target terminal judges whether the control information comprises a terminal ID number of the target terminal; the first connection request comprises a monitoring module and control information, and the target terminal is any one of LoRa terminals in the whole network;
if not, determining the response packet sending sequence of the target terminal according to the terminal ID number and the monitoring modulus of the target terminal;
and sending response packets to the LoRa control equipment according to the response packet sending sequence so that the LoRa control equipment establishes communication connection with the target terminal according to the terminal ID number of the target terminal, wherein the response packets comprise the terminal ID number of the target terminal.
Preferably, the determining the sending sequence of the response packet of the target terminal according to the terminal ID number and the monitoring modulus of the target terminal includes:
calculating the remainder of dividing the terminal ID number of the target terminal by the monitoring modulus;
and determining the sending sequence of the response packets of the target terminal according to the remainder.
Preferably, after determining whether the control information includes the terminal ID number of the target terminal, the method further includes:
if so, acquiring the sending information of the connected terminal corresponding to the terminal ID number of the target terminal in the control information, wherein the sending information of the connected terminal comprises a first sending start time slot and a first sending continuous time slot;
and sending the data packet of the target terminal to LoRa control equipment according to the first sending starting time slot and the first sending continuous time slot.
As can be seen from the foregoing technical solutions, in the communication method of the LoRa system according to the embodiments of the present invention, the LoRa control device broadcasts the first connection request to the LoRa terminals in the whole network, the terminals to be connected determine the transmission sequence of the response packets according to the terminal ID numbers and the monitoring modules of the terminals to be connected, and transmit the response packets to the LoRa control device according to the transmission sequence of the response packets, so that the LoRa control device can sequentially receive the response packets transmitted by the terminals to be connected, thereby preventing link congestion of the LoRa control device caused by multiple LoRa terminals simultaneously transmitting the response packets to the LoRa control device.
Drawings
FIG. 1 is a system architecture diagram of the LoRa system of the star type;
fig. 2 is a flowchart of a communication method of an LoRa system according to an embodiment of the present invention;
FIG. 3 is a format diagram of a first connection request;
FIG. 4 is a format diagram of a response packet;
FIG. 5 is a format diagram of first control information;
FIG. 6 is a format diagram of a data packet;
fig. 7 is a flowchart of a communication method of an LoRa system according to another embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 2 is a flowchart of a communication method of an LoRa system according to an embodiment of the present invention.
As shown in fig. 2, a communication method of an LoRa system, where the LoRa system includes an LoRa control device and a plurality of LoRa terminals in a whole network, includes:
s201, broadcasting a first connection request to LoRa terminals in the whole network by LoRa control equipment, so that the terminals to be connected, which receive the first connection request, send response packets to the LoRa control equipment according to a response packet sending sequence; the terminal to be connected is any one of LoRa terminals which are not in communication connection with LoRa control equipment in the whole network, a terminal ID number of the terminal to be connected is not included in the first control information, the terminal ID number can be a preset number which is stored in the LoRa terminal in advance, and can be a serial number of the LoRa terminal in all the LoRa terminals in the whole network; the response packet is sent to the LoRa control equipment by the terminal to be connected according to the sending sequence of the response packet, and the sending sequence of the response packet is determined by the terminal to be connected according to the terminal ID number and the monitoring modulus of the terminal to be connected;
it should be noted that the LoRa control device is a device with autonomous communication capability, the self-service communication includes but is not limited to 4G, NB-IOT, and the LoRa terminal is a device without autonomous communication capability. And when no terminal is connected in the first control information, the first control information is null.
Fig. 3 is a format diagram of a first connection request, as shown in fig. 3, the first connection request includes:
the data packet head occupies 4 bytes;
command words, occupying 1Byte;
reserving and occupying 2 Byte;
monitoring the modulus, and occupying 1Byte;
first control information (control information in fig. 3), which is not of a fixed length;
CRC checks, take 4 bytes.
S202, sequentially receiving response packets sent by all terminals to be connected; the response packet comprises a terminal ID number of the terminal to be connected;
s203, establishing communication connection with the terminal to be connected according to the terminal ID number of the terminal to be connected in the response packet.
In this embodiment, the LoRa control device is star-connected to a plurality of LoRa terminals in the entire network.
In the communication method of the LoRa system according to the embodiment of the present invention, the LoRa control device broadcasts the first connection request to the LoRa terminals in the whole network, so that the terminals to be connected determine the transmission sequence of the response packets according to the terminal ID numbers and the monitoring modules of the terminals to be connected, and transmits the response packets to the LoRa control device according to the transmission sequence of the response packets, so that the LoRa control device can sequentially receive the response packets transmitted by the terminals to be connected, thereby preventing link congestion of the LoRa control device caused by a plurality of LoRa terminals simultaneously transmitting the response packets to the LoRa control device.
It should be noted that there may be an infinite number of LoRa terminals in the whole network theoretically, and in the embodiment of the present invention, in consideration of the practicability, the maximum access number of the LoRa terminals may be 50, and certainly, there may be other numbers.
In order to avoid time difference caused by crystal oscillator difference of each LoRa terminal, time system processing is required, time system information (time stamp of 8 Byte) is required to be transmitted to the LoRa terminals in the whole network, and the time information synchronization is used for unifying the year, month, day and hour/minute/second of each terminal. The contract is as follows:
1. sending the LoRa control equipment once when starting up, and unifying the year, month and day;
2. the LoRa control device transmits every N hours to prevent time inconsistency and synchronization of new nodes. N can be customized according to user requirements.
3. And the LoRa control equipment can also be manually operated to issue time system information.
As a preferred embodiment, the step S202 includes:
and receiving a response packet sent by the terminal to be connected in a first monitoring time period after the first connection request is broadcasted.
In this step, the first monitoring time period may be 2-6s, or other time periods may be set according to specific situations.
The communication method of the loRa system in the embodiment of the invention determines the time period for receiving the response packet by the loRa control equipment, so as to reserve enough time for the loRa terminal to determine the time for information processing such as the transmission sequence of the response packet, ensure that the response packet of the loRa terminal can be received in sequence, and determine the receiving time period, thereby preventing the waste of system resources caused by the non-deadline receiving of the response packet and ensuring the working efficiency of the loRa system. In the initial stage of the system, the response packet further comprises a first sending continuous time slot of the terminal to be connected, and the first sending continuous time slot of the terminal to be connected is matched and stored with the terminal ID number of the terminal to be connected;
fig. 4 is a format diagram of a response packet, such as the response packet shown in fig. 4, including:
the data packet head occupies 4 bytes;
the terminal ID number occupies 1Byte;
a first transmission-duration slot (transmission-duration slot in fig. 4) occupies 1Byte;
reserving and occupying 2 Byte;
CRC checks, take 4 bytes.
In this embodiment, the first transmission-duration time slot is calculated by the terminal to be connected according to the data that the terminal currently needs to transmit.
Then, the method further comprises:
calculating a first sending initial time slot of each terminal to be connected according to the sequence of receiving each response packet and the first sending continuous time slot of each terminal to be connected;
this step is illustrated by way of example: the whole network comprises 5 LoRa terminals, namely an A terminal, a B terminal, a C terminal, a D terminal and an E terminal, and the first sending starting time slot of each LoRa terminal is calculated according to the following mode:
and setting the sequence of receiving the response packets sent by the five LoRa terminals as follows: the terminal comprises a terminal A, a terminal C, a terminal E, a terminal D and a terminal B.
Then, the first transmission start time slots of the respective LoRa terminals are respectively:
Tsenda=T0;
Tsendc=Tsenda+Ta;
Tsende=Tsendc+Tc;
Tsendd=Tsende+Te;
Tsendb=Tsendd+Td。
where, Tsenda is a first transmission start time slot of a terminal a, tsendic is a first transmission start time slot of a terminal C, tsendie is a first transmission start time slot of a terminal E, tsendid is a first transmission start time slot of a terminal D, tsendib is a first transmission start time slot of a terminal B, T0 is a starting point for calculating the first transmission start time slots of all LoRa terminals, Ta is a first transmission continuation time slot corresponding to the terminal a, Tb is a first transmission continuation time slot corresponding to the terminal B, Tc is a first transmission continuation time slot corresponding to the terminal C, Td is a first transmission continuation time slot corresponding to the terminal D, and Te is a first transmission continuation time slot corresponding to the terminal E. Taking the terminal ID number in each response packet, the first sending continuous time slot of each terminal to be connected and the first sending initial time slot of each terminal to be connected as a new sending message; and updating each newly-added sending message into the first control message to form second control message, and broadcasting a second connection request to LoRa terminals in the whole network, wherein the second connection request at least comprises the second control message.
It should be noted that after being determined as a connected terminal, the LoRa terminals in the entire network transmit a packet to the LoRa control device according to the first transmission start slot and the first transmission continuation slot in the control information in the connection request.
In a specific embodiment, the second connection request may be broadcasted to the LoRa terminals in the entire network, and the steps S202 to S203 may be repeatedly performed with the second connection request regarded as the first connection request.
According to the communication method of the LoRa system, the LoRa control equipment calculates the first sending starting time slot of each terminal to be connected according to the sequence of receiving each response packet and the first sending continuous time slot of each terminal to be connected, and the time slot distribution of each LoRa terminal is realized; when the LoRa terminal determines that the LoRa terminal is the connected terminal, the data packet is sent to the LoRa control equipment according to the first sending starting time slot and the first sending continuous time slot, so that each connected terminal can send the data packet to the LoRa control equipment in a time-sharing mode, and link congestion of the LoRa control equipment is prevented.
If there are already connected terminals in the whole network, the first control information includes transmission information of the connected terminals, the transmission information of the connected terminals includes a device terminal ID, a first transmission start time slot, and a first transmission continuation time slot, as shown in fig. 5, the first transmission start time slots (in fig. 5, the transmission start time slots are transmission continuation time slots, and the first transmission continuation time slots are denoted by the transmission continuation time slots) of each connected terminal are different, and the connected terminal is any one of LoRa terminals which have already established communication connection with the whole network;
it should be noted that the first transmission start timeslot of each connected terminal may be determined according to a pre-known network access sequence of the connected terminals and the first transmission continuation timeslot of the connected terminal, generally, the transmission start timeslot of the next connected terminal is a time point after the transmission start timeslot of the last connected terminal continues the transmission continuation timeslot of the last connected terminal, and the network access sequence of the connected terminals may be determined according to a setting sequence of the transmission information of the connected terminals in the control information, that is, the network access sequence of the LoRa terminal is represented by the setting sequence of the transmission information in the control information.
Then, the method further comprises:
and sequentially receiving the data packets sent by the connected terminals according to the terminal ID of each connected terminal in the control information, and the first sending start time slot and the first sending continuous time slot in the sending information of each connected terminal.
According to the communication method of the LoRa system, the LoRa control device receives the data packets sent by the connected terminals in sequence according to the first sending start time slot and the first sending continuous time slot in the sending information of the connected terminals, and therefore link congestion of the LoRa control device is prevented.
As shown in fig. 6, as a preferred embodiment, the data packet includes a terminal ID number, a total number of data packets, a current packet sequence number and data that are stored correspondingly;
fig. 6 is a format diagram of a data packet, and as shown in fig. 6, the data packet includes:
the data packet head occupies 4 bytes;
the terminal ID number occupies 1Byte;
the total number of the data packets occupies 1Byte;
the current packet sequence number occupies 1Byte;
the data length occupies 1Byte;
reserving and occupying 4 bytes;
data, indefinite length, 4byte alignment;
CRC checks, take 4 bytes.
Then, the method further comprises:
when the last data packet of each connected terminal is received, judging whether all the data packets of the connected terminals are received or not according to the total number of the data packets in the last data packet and the current packet serial number in the last data packet; the connected terminal sequentially sends data packets to the LoRa control equipment according to the sequence of the current packet serial number in the data packets from small to large;
in this step, it is determined whether all data packets of the connected terminal have been received by determining whether the current packet sequence number in the last data packet is equal to the total number of data packets. For example, the following steps are carried out: and if the total number of the data packets is 5 and the current packet serial number in the last data packet is 4, determining that all the data packets of the connected terminal are not received, and if the current packet serial number in the last data packet is 5, determining that all the data packets of the connected terminal are received.
If not, calculating a second sending continuous time slot of the current interruption terminal according to the current packet serial number in the last data packet of the received current interruption terminal, the first sending continuous time slot and the total number of data packets in the last data packet; wherein, the current-cutoff terminal is one of connected terminals which are not received by the LoRa control equipment for all data packets;
it should be noted that this step illustrates that the first transmission duration allocated to the traffic interrupting terminal is not sufficient to transmit all the data packets of the LoRa terminal, and the transmission duration needs to be recalculated.
Calculating a second sending start time slot of each connected terminal according to a start time slot of preset data receiving, a sequence of receiving response packets of the connected terminals, a second sending continuous time slot of each current-cutoff terminal and first sending continuous time slots of other connected terminals; the other connected terminals are terminals except the current cutoff terminal in all the connected terminals;
in a specific embodiment, the starting time slot of the preset data reception is a time point when a second preset time period is reached from the beginning of broadcasting the first connection request by the LoRa control device, and the second preset time period may be 10s and so on.
It should be noted that, from this time of broadcasting the connection request to the next time of broadcasting a new connection request, it may be regarded as a cycle, and the timer is cleared every time the LoRa terminal receives the connection request, so as to count various timeslots in the new cycle again. The time period of each cycle can be divided into a control time slot domain and a data time slot domain, the control time slot domain can occupy 10 time slots, namely time slots 0 to 9, the number of the time slots of the data time slot domain is not fixed, for example, the time slots can be time slots 10 to time slots N, and each time slot can be 1 second. The control time slot domain comprises a control area, a monitoring control area and a reserved area, wherein the control area can occupy 2 time slots, namely time slot 0-time slot 1, the monitoring control area can occupy 5 time slots, namely time slot 2-time slot 6, and the reserved area can occupy 3 time slots, namely time slot 7-time slot 9. The LoRa control device broadcasts a connection request, including all the fields described above, while the other command packets include only control zone 0-1 time slots. And the monitoring control area monitors a response packet of the LoRa terminal in a time slot range, and is used for accessing the LoRa terminal which is not accessed to the network, and reporting data by the LoRa terminal which is accessed to the network in a data time slot range. The time for starting reporting and the duration (such as the sending starting time slot and the sending duration time slot) of each LoRa terminal are determined by parameters in the control information; and receiving data from the network-accessed LoRa terminal in the data time slot domain.
And updating the control information according to the second transmission continuous time slot of the current interrupting terminal and the second transmission starting time slot of each connected terminal.
According to the communication method of the LoRa system in the embodiment of the present invention, when it is determined that all data packets of the connected terminals are not received, the second sending continuation time slot of the interrupt terminal is calculated according to the number of the received data packets of the interrupt terminal, the first sending continuation time slot, and the total number of the data packets in the last data packet, and the second sending start time slot of each connected terminal is calculated according to the preset starting time slot of data reception, the sequence of receiving the response packets of the connected terminals, the second sending continuation time slot of each interrupt terminal, and the first sending continuation time slot of other connected terminals, so that each LoRa terminal can send all the data packets to the LoRa control device while preventing link congestion of the LoRa control device.
In a preferred embodiment, the snoop modulus is randomly generated, and the connection requests at different times are different, so that the transmission sequence of the response packets is variable to reduce the collision probability of the response packets.
As a preferred embodiment, the method for calculating the second transmission duration of the traffic interrupting terminal according to the number of received data packets of the traffic interrupting terminal, the first transmission duration and the total number of data packets in the last data packet comprises:
calculating the sending time slot of the single-packet data packet according to the number of the received data packets of the current-cutoff terminal and the last sending continuous time slot in the last data packet;
and calculating a second sending continuous time slot of the current interrupting terminal according to the sending time slot of the single packet data packet and the total number of the data packets in the last data packet, wherein if the sending time slot of the single packet data packet is t and the total number of the data packets in the last data packet is 5, the second sending continuous time slot is 5 t.
According to the communication method of the LoRa system, the second sending continuous time slot is recalculated according to the sending time slot of the single packet data packet and the total number of the data packets, so that the flow cutoff terminal can send all the data packets to the LoRa control equipment according to the second sending continuous time slot.
Fig. 7 is a flowchart of a communication method of an LoRa system according to another embodiment of the present invention.
As shown in fig. 7, a communication method of an LoRa system includes an LoRa control device and a plurality of LoRa terminals in a whole network, and the method includes:
s701, after receiving a first connection request broadcast by LoRa control equipment, a target terminal judges whether control information comprises a terminal ID number of the target terminal; the first connection request comprises a monitoring module and control information, and the target terminal is any one of LoRa terminals in the whole network;
in one embodiment, the terminal ID number of the target terminal is a serial number of the LoRa terminal in the LoRa terminals of the whole network, which is given in advance and stored in the LoRa terminal.
S702, if not, determining the sending sequence of the response packet of the target terminal according to the terminal ID number and the monitoring modulus of the target terminal;
and S703, sending a response packet to the LoRa control equipment according to the sending sequence of the response packet so that the LoRa control equipment establishes communication connection with the target terminal according to the terminal ID number of the target terminal, wherein the response packet comprises the terminal ID number of the target terminal.
In the embodiment of the present invention, the LoRa control device and the plurality of LoRa terminals in the entire network are connected in a star topology.
According to the communication method of the LoRa system, when the control information does not include the terminal ID number of the target terminal, the sending sequence of the response packet of the target terminal is determined according to the terminal ID number of the target terminal and the monitoring modulus, the response packet is sent to the LoRa control equipment according to the sending sequence of the response packet, and the link congestion of the LoRa control equipment caused by the fact that a plurality of LoRa terminals send the response packet to the LoRa control equipment at the same time is prevented.
As a preferred embodiment, the step S702 includes:
calculating the remainder of dividing the terminal ID number of the target terminal by the monitoring modulus;
and determining the sending sequence of the response packets of the target terminal according to the remainder.
Specifically, the response packets may be transmitted in order of the remainder from small to small, or the response packets may be transmitted in order of the remainder from large to small.
The communication method of the LoRa system in the embodiment of the present invention facilitates determining the transmission sequence of the target terminal response packet, and certainly, the transmission sequence of the target terminal response packet may also be determined according to the remainder of the division of the monitoring modulus by the terminal ID number of the target terminal.
As a preferred embodiment, after the step S701, the method further includes:
if so, acquiring the sending information of the connected terminal corresponding to the terminal ID number of the target terminal in the control information, wherein the sending information of the connected terminal comprises a first sending start time slot and a first sending continuous time slot;
it can be understood that the first transmission start timeslot of each connected terminal may be determined according to a pre-known network access sequence of the connected terminals and a transmission duration timeslot of the connected terminals, generally, the transmission start timeslot of the next connected terminal is a time point after the transmission start timeslot of the last connected terminal continues the transmission duration timeslot of the last connected terminal, and the network access sequence of the connected terminals may be determined according to a setting sequence of the transmission information of the connected terminals in the control information, that is, the network access sequence of the LoRa terminal is represented by the setting sequence of the transmission information in the control information.
And sequentially sending each data packet of the target terminal to LoRa control equipment according to the first sending start time slot and the first sending continuous time slot.
This step is illustrated by way of example: the method comprises the following steps that five LoRa terminals are arranged, namely an F terminal, a G terminal, an H terminal, an I terminal and a J terminal, and the sequence of sending data packets is as follows: f terminal, J terminal, H terminal, I terminal, and G terminal.
Tsendf is a first sending start time slot of an F terminal, Tsendh is a first sending start time slot of an H terminal, Tsendj is a first sending start time slot of a J terminal, Tsendi is a first sending start time slot of an I terminal, Tsendg is a first sending start time slot of a G terminal, Tf is a first sending continuous time slot corresponding to the F terminal, Tg is a first sending continuous time slot corresponding to the G terminal, Th is a first sending continuous time slot corresponding to the H terminal, Ti is a first sending continuous time slot corresponding to the I terminal, and Tj is a first sending continuous time slot corresponding to the J terminal.
When the time Tsendf is reached, the F terminal sends a data packet to the LoRa control equipment for Tf time, when the time Tsendj is reached, the J terminal sends the data packet to the LoRa control equipment for Tj time, when the time Tsendh is reached, the H terminal sends the data packet to the LoRa control equipment for Th time, when the time Tsendi is reached, the I terminal sends the data packet to the LoRa control equipment for Ti time, and when the time Tsendg is reached, the G terminal sends the data packet to the LoRa control equipment for Tg time.
According to the communication method of the LoRa system, the connected terminal sends the data packet of the target terminal to the LoRa control equipment according to the first sending starting time slot and the first sending continuous time slot, and therefore link congestion of the LoRa control equipment is prevented from being caused.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
The above embodiments are only suitable for illustrating the present invention and not limiting the present invention, and those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, so that all equivalent technical solutions also belong to the scope of the present invention, and the scope of the present invention should be defined by the claims.

Claims (10)

1. A communication method of an LoRa system, where the LoRa system includes an LoRa control device and a plurality of LoRa terminals in a whole network, and the method includes:
broadcasting a first connection request to LoRa terminals in the whole network by LoRa control equipment so that the terminals to be connected, which receive the first connection request, send response packets to the LoRa control equipment according to a response packet sending sequence; the terminal to be connected is any one of LoRa terminals which are not in communication connection with LoRa control equipment in the whole network, and the terminal ID number of the terminal to be connected is not contained in the first control information; the sending sequence of the response packets is determined by the terminal to be connected according to the terminal ID number and the monitoring modulus of the terminal to be connected;
sequentially receiving response packets sent by each terminal to be connected; the response packet comprises a terminal ID number of the terminal to be connected;
and establishing communication connection with the terminal to be connected according to the terminal ID number of the terminal to be connected in the response packet.
2. The method according to claim 1, wherein the sequentially receiving the response packets sent by the terminals to be connected includes:
and receiving a response packet sent by the terminal to be connected in a first monitoring time period after the first connection request is broadcasted.
3. The method according to claim 1, wherein the response packet further comprises a first transmission duration time slot of the terminal to be connected, and the first transmission duration time slot of the terminal to be connected is stored in a pairing manner with the terminal ID number of the terminal to be connected;
then, the method further comprises:
calculating a first sending initial time slot of each terminal to be connected according to the sequence of receiving each response packet and the first sending continuous time slot of each terminal to be connected;
and taking the terminal ID number in each response packet, the first sending continuous time slot of each terminal to be connected and the first sending initial time slot of each terminal to be connected as a piece of newly-added sending information, updating each newly-added sending information into the first control information to form second control information, and broadcasting a second connection request to LoRa terminals in the whole network, wherein the second connection request at least comprises the second control information.
4. The method according to claim 1, wherein the first control information includes transmission information of connected terminals, the transmission information of the connected terminals includes a device terminal ID, a first transmission start time slot and a first transmission continuation time slot, the first transmission start time slot of each connected terminal is different, and the connected terminals are any one of LoRa terminals which have established communication connection with the LoRa control device in the whole network;
then, the method further comprises:
and sequentially receiving the data packets sent by the connected terminals according to the first sending start time slot and the first sending continuous time slot in the sending information of the connected terminals in the control information.
5. The method of claim 4, wherein the data packet comprises a terminal ID number, a total number of data packets, a current packet sequence number and data stored correspondingly;
then, the method further comprises:
when the last data packet of each connected terminal is received, judging whether all the data packets of the connected terminals are received or not according to the total number of the data packets in the last data packet and the current packet serial number in the last data packet; the connected terminal sequentially sends data packets to the LoRa control equipment according to the sequence of the current packet serial number in the data packets from small to large;
if not, calculating a second sending continuous time slot of the current interruption terminal according to the current packet serial number in the last data packet of the received current interruption terminal, the first sending continuous time slot and the total number of data packets in the last data packet; wherein, the current-cutoff terminal is one of connected terminals which are not received by the LoRa control equipment for all data packets;
calculating a second sending start time slot of each connected terminal according to a start time slot of preset data receiving, a sequence of receiving response packets of the connected terminals, a second sending continuous time slot of each current-cutoff terminal and first sending continuous time slots of other connected terminals; the other connected terminals are terminals except the current cutoff terminal in all the connected terminals;
and updating the control information according to the second transmission continuous time slot of the current interrupting terminal and the second transmission starting time slot of each connected terminal.
6. The method of claim 5, wherein calculating the second transmission duration time slot of the end point based on the current packet sequence number in the last packet received from the end point, the first transmission duration time slot, and the total number of packets in the last packet comprises:
calculating the sending time slot of the single-packet data packet according to the number of the received data packets of the current-cutoff terminal and the last sending continuous time slot in the last data packet;
and calculating a second sending continuous time slot of the current interrupting terminal according to the single packet data packet sending time slot and the total number of data packets in the last data packet.
7. The method of claim 1, wherein the listening modulus is randomly generated.
8. A communication method of an LoRa system, where the LoRa system includes an LoRa control device and a plurality of LoRa terminals in a whole network, and the method includes:
after receiving a first connection request broadcast by LoRa control equipment, a target terminal judges whether the control information comprises a terminal ID number of the target terminal; the first connection request comprises a monitoring module and control information, and the target terminal is any one of LoRa terminals in the whole network;
if not, determining the response packet sending sequence of the target terminal according to the terminal ID number and the monitoring modulus of the target terminal;
and sending response packets to the LoRa control equipment according to the response packet sending sequence so that the LoRa control equipment establishes communication connection with the target terminal according to the terminal ID number of the target terminal, wherein the response packets comprise the terminal ID number of the target terminal.
9. The method of claim 8, wherein the determining the transmission sequence of the response packets of the target terminal according to the terminal ID number and the listening module of the target terminal comprises:
calculating the remainder of dividing the terminal ID number of the target terminal by the monitoring modulus;
and determining the sending sequence of the response packets of the target terminal according to the remainder.
10. The method of claim 8, wherein after determining whether the control information includes the terminal ID number of the target terminal, the method further comprises:
if so, acquiring the sending information of the connected terminal corresponding to the terminal ID number of the target terminal in the control information, wherein the sending information of the connected terminal comprises a first sending start time slot and a first sending continuous time slot;
and sending the data packet of the target terminal to LoRa control equipment according to the first sending starting time slot and the first sending continuous time slot.
CN201910960306.4A 2019-10-10 2019-10-10 Communication method of LoRa system Active CN110809287B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910960306.4A CN110809287B (en) 2019-10-10 2019-10-10 Communication method of LoRa system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910960306.4A CN110809287B (en) 2019-10-10 2019-10-10 Communication method of LoRa system

Publications (2)

Publication Number Publication Date
CN110809287A true CN110809287A (en) 2020-02-18
CN110809287B CN110809287B (en) 2023-02-28

Family

ID=69488136

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910960306.4A Active CN110809287B (en) 2019-10-10 2019-10-10 Communication method of LoRa system

Country Status (1)

Country Link
CN (1) CN110809287B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112437030A (en) * 2020-10-29 2021-03-02 清华大学 LoRa data packet starting point alignment method and device
CN112511994A (en) * 2021-02-04 2021-03-16 杭州字节信息技术有限公司 Multicast implementation method based on LoRaWan and supporting ACK mechanism
CN113438729A (en) * 2021-08-25 2021-09-24 伏诺瓦(天津)科技有限公司 Lora sub-equipment registration method and device based on carrier channel monitoring mechanism
CN113825103A (en) * 2021-08-27 2021-12-21 北京国信华源科技有限公司 Carrier communication device based on LoRa communication
WO2023184794A1 (en) * 2022-03-30 2023-10-05 歌尔股份有限公司 Device control method, loudspeaker device, console, and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105813026A (en) * 2014-12-31 2016-07-27 华为技术有限公司 Broadcast realizing method, device and equipment
US20170195136A1 (en) * 2015-12-30 2017-07-06 Wipro Limited METHODS AND SYSTEMS FOR ADAPTIVE AND CONTEXT AWARE INTER- INTERNET OF THINGS (IoT) COMMUNICATION
CN107801172A (en) * 2017-09-18 2018-03-13 暨南大学 LoRa gateways with adaptive channel function and the network system based on LoRa gateways
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
CN108848538A (en) * 2018-05-30 2018-11-20 新华三技术有限公司 File transmitting method and device
KR101971156B1 (en) * 2018-10-30 2019-04-22 주식회사 케이디티 solar photovoltaic generation monitoring system type wired and wireless hybrid

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105813026A (en) * 2014-12-31 2016-07-27 华为技术有限公司 Broadcast realizing method, device and equipment
US20170195136A1 (en) * 2015-12-30 2017-07-06 Wipro Limited METHODS AND SYSTEMS FOR ADAPTIVE AND CONTEXT AWARE INTER- INTERNET OF THINGS (IoT) COMMUNICATION
CN107801172A (en) * 2017-09-18 2018-03-13 暨南大学 LoRa gateways with adaptive channel function and the network system based on LoRa gateways
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
CN108848538A (en) * 2018-05-30 2018-11-20 新华三技术有限公司 File transmitting method and device
KR101971156B1 (en) * 2018-10-30 2019-04-22 주식회사 케이디티 solar photovoltaic generation monitoring system type wired and wireless hybrid

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112437030A (en) * 2020-10-29 2021-03-02 清华大学 LoRa data packet starting point alignment method and device
CN112511994A (en) * 2021-02-04 2021-03-16 杭州字节信息技术有限公司 Multicast implementation method based on LoRaWan and supporting ACK mechanism
CN112511994B (en) * 2021-02-04 2021-04-27 杭州字节信息技术有限公司 Multicast implementation method based on LoRaWan and supporting ACK mechanism
CN113438729A (en) * 2021-08-25 2021-09-24 伏诺瓦(天津)科技有限公司 Lora sub-equipment registration method and device based on carrier channel monitoring mechanism
CN113438729B (en) * 2021-08-25 2021-11-12 伏诺瓦(天津)科技有限公司 Lora sub-equipment registration method and device based on carrier channel monitoring mechanism
CN113825103A (en) * 2021-08-27 2021-12-21 北京国信华源科技有限公司 Carrier communication device based on LoRa communication
CN113825103B (en) * 2021-08-27 2022-07-22 北京国信华源科技有限公司 Carrier communication system based on LoRa communication
WO2023184794A1 (en) * 2022-03-30 2023-10-05 歌尔股份有限公司 Device control method, loudspeaker device, console, and storage medium

Also Published As

Publication number Publication date
CN110809287B (en) 2023-02-28

Similar Documents

Publication Publication Date Title
CN110809287B (en) Communication method of LoRa system
US6940833B2 (en) Two-dimensional scheduling scheme for a broadband wireless access system
US8467327B2 (en) Sensor network system and communication method thereof
EP2958371B1 (en) Method and device for implementing non-centralized clustering mechanism
EP0560886B1 (en) Multiaccess carrier sensing network communication protocol with priority messages
US20030125087A1 (en) Wireless base station device, wireless communication system, and communication control method
US7693173B2 (en) Communication system, communication control method, communication control apparatus, and communication control program
US20030002442A1 (en) Method and apparatus for contention management in a radio-based packet network
US9848446B2 (en) System and methods for synchronizing edge devices on channels without carrier sense
KR20000029996A (en) Method and apparatus for optimizing a medium access control protocol
KR20080063749A (en) Media access control architecture
RU2006128592A (en) SYSTEM AND METHOD FOR THE PROTOCOL OF DISTRIBUTED RESERVATION AND MANAGEMENT OF ULTRAWIDE ACCESS TO THE TRANSFER ENVIRONMENT
CN111132337B (en) Lora communication method combining TDMA (time division multiple Access) and CSMA (Carrier sense multiple Access) mechanisms
US9019948B2 (en) Allocation slot arrangement for wireless body area networks with sensor initiated grant extensions
EP2048902B1 (en) Method and system for contention-free NPD periodic updating
US11750416B2 (en) Subscriber station for a serial bus system and method for communicating in a serial bus system
US20210306993A1 (en) Communication between network nodes
CN111935691A (en) Wireless low-power-consumption configuration method and device
EP1573944B1 (en) Method of communicating with a plurality of sets of users
JPH11331228A (en) System and method for data communication
US8792463B2 (en) Method for managing a distribution of bandwidth in a communications network, corresponding storage means and slave node
US20240306105A1 (en) Wireless methods, devices and systems for rapid synchronization with periodic broadcast link
EP4106247A1 (en) Data transfer within uwb ranging
JP7168458B2 (en) Base station, wireless terminal station and wireless communication system
JPH11266217A (en) Time division multiple access communication system, signal reception method in the time division multiple access communication system and center equipment used in the time division multiple access communication system

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