Message transmission method, node and LORA ad hoc network

文档序号:1908819 发布日期:2021-11-30 浏览:13次 中文

阅读说明:本技术 一种报文传输方法、节点和lora自组网 (Message transmission method, node and LORA ad hoc network ) 是由 王坤 周书平 孔令武 于 2021-08-26 设计创作,主要内容包括:本申请涉及LoRa通信领域,尤其是涉及一种报文传输方法、节点和LORA自组网,包括:LORA网络中的节点工作在同一频段下,针对LORA网络中的每个节点:在当前节点接收到报文时,根据所述当前节点的地址在所述报文的地址信息中的位置确定对所述报文的处理方式,所述处理方式包括丢弃所述报文、广播所述报文以及解析所述报文;其中,所述地址信息包括按照先后顺序排列的源节点地址、转发节点地址以及目的节点地址。本申请使得LORA网络中的终端节点之间的通讯更加方便,同时也减少中继模块的浪费。(The application relates to the field of LoRa communication, in particular to a message transmission method, a node and a LORA ad hoc network, comprising: the nodes in the LORA network work under the same frequency band, and aiming at each node in the LORA network: when a current node receives a message, determining a processing mode of the message according to the position of the address of the current node in the address information of the message, wherein the processing mode comprises discarding the message, broadcasting the message and analyzing the message; the address information comprises a source node address, a forwarding node address and a destination node address which are arranged according to the sequence. The communication between the terminal nodes in the LORA network is more convenient, and meanwhile, the waste of the relay module is reduced.)

1. A message transmission method is applied to an LORA network and is characterized by comprising the following steps:

the nodes in the LORA network work under the same frequency band, and aiming at each node in the LORA network:

when a current node receives a message, determining a processing mode of the message according to the position of the address of the current node in the address information of the message, wherein the processing mode comprises discarding the message, broadcasting the message and analyzing the message;

the address information comprises a source node address, a forwarding node address and a destination node address which are arranged according to the sequence.

2. The method according to claim 1, wherein the determining a processing manner of the packet according to the position of the address of the current node in the address information of the packet comprises:

determining a first position of the address of the current node in the address information and a second position of the address of the node sending the message in the address information;

in the address information:

the first position is located before the second position, or the first position is located after the second position and the first position is not located at the next position of the second position, and the current node discards the message;

the first position is located next to the second position and the first position is not the last position of the address information, and the current node broadcasts the message;

the first position is located after the second position and the first position is the last position of the address information, and the current node analyzes the message.

3. The method of claim 2, further comprising, prior to determining the first location and the second location: and judging whether the address of the current node exists in the address information of the message or not, and if not, discarding the message.

4. Method according to claim 1 or 2, wherein the number of forwarding node addresses is equal to or greater than 0.

5. A node, characterized in that the terminal node is configured to:

when a message is received, determining a processing mode of the message according to the position of the address of the terminal node in the address information of the message, wherein the processing mode comprises discarding the message, broadcasting the message and analyzing the message;

the address information comprises a source node address, a forwarding node address and a destination node address which are arranged according to the sequence.

6. The node according to claim 4, characterized in that the terminal node is specifically configured to:

determining a first position of the address of the terminal node in the address information and a second position of the address of the node sending the message in the address information;

in the address information:

the first position is located before the second position, or the first position is located after the second position and the first position is not located at the next position of the second position, and the terminal node discards the message;

the first position is located next to the second position and the first position is not the last position of the address information, and the terminal node broadcasts the message;

and the first position is positioned after the second position and is the last position of the address information, and the terminal node analyzes the message.

7. The node of claim 6, wherein the terminal node is further configured, prior to determining the first location and the second location, to further comprise: and judging whether the address of the current node exists in the address information of the message or not, and if not, discarding the message.

8. The node according to claim 5 or 6, characterized in that the number of forwarding node addresses is equal to or greater than 0.

9. A LORA ad hoc network comprising a plurality of nodes according to any of claims 5 to 8.

Technical Field

The present application relates to the field of LoRa communications, and in particular, to a packet transmission method, a node, and an LoRa ad hoc network.

Background

LoRa (Long Range radio) is a low-power consumption local area network wireless standard created by semtech corporation, is an ultra-long distance wireless transmission scheme based on spread spectrum technology, belongs to one of communication technologies of the Internet of things, and is characterized in that the communication distance of Lora is determined by the characteristics of the Lora, and because a terminal node is connected with a gateway in a single-hop manner, nodes beyond the technical Range of the Lora cannot communicate with the gateway.

In the related art, a relay module is usually added between an LoRa gateway and an LoRa terminal node to enable wireless signals of the LoRa gateway and the LoRa terminal node to be transmitted mutually, but in this mode, when an LoRa networking area is large, the demand of the relay module is increased, the relay module can only forward signals and cannot perform service work of the LoRa terminal node, so that waste is caused to a certain extent, and meanwhile in this mode, communication between the LoRa terminal nodes is inconvenient, and information transmission in a network is limited.

Disclosure of Invention

In order to enable communication between terminal nodes in an LORA network to be more convenient and reduce waste of relay modules, the application provides a message transmission method, the nodes and an LORA ad hoc network.

In a first aspect of the present application, a packet transmission method is provided, which is applied to an LORA network, and the method includes:

the nodes in the LORA network work under the same frequency band, and aiming at each node in the LORA network:

when a current node receives a message, determining a processing mode of the message according to the position of the address of the current node in the address information of the message, wherein the processing mode comprises discarding the message, broadcasting the message and analyzing the message;

the address information comprises a source node address, a forwarding node address and a destination node address which are arranged according to the sequence.

By adopting the technical scheme, all nodes in the LORA network are set to work under the same frequency, address information is set in a message received by a current node, the address information at least comprises a source node address and a destination node address, and can also comprise a forwarding node address, the current node can select a processing mode of discarding, broadcasting or analyzing the message according to the position of the address of the current node in the address information of the message, and the mutual communication among the nodes can be realized in the mode, so that the communication of each terminal node does not need to pass through a gateway, the communication between a terminal with a longer distance and the gateway needs to be completed by setting a relay device, the communication mode is more convenient, and the waste caused by setting too many relay devices is reduced.

Further, the determining, according to the position of the address of the current node in the address information of the packet, a processing manner of the packet includes:

determining a first position of the address of the current node in the address information and a second position of the address of the node sending the message in the address information;

in the address information:

the first position is located before the second position, or the first position is located after the second position and the first position is not located at the next position of the second position, and the current node discards the message;

the first position is located next to the second position and the first position is not the last position of the address information, and the current node broadcasts the message;

the first position is located after the second position and the first position is the last position of the address information, and the current node analyzes the message.

Further, the number of forwarding node addresses is greater than or equal to 0.

In a second aspect of the present application, there is provided a node configured to:

when a message is received, determining a processing mode of the message according to the position of the address of the terminal node in the address information of the message, wherein the processing mode comprises discarding the message, broadcasting the message and analyzing the message;

the address information comprises a source node address, a forwarding node address and a destination node address which are arranged according to the sequence.

Further, the node is specifically configured to:

determining a first position of the address of the terminal node in the address information and a second position of the address of the node sending the message in the address information;

in the address information:

the first position is located before the second position, or the first position is located after the second position and the first position is not located at the next position of the second position, and the terminal node discards the message;

the first position is located next to the second position and the first position is not the last position of the address information, and the terminal node broadcasts the message;

and the first position is positioned after the second position and is the last position of the address information, and the terminal node analyzes the message.

Further, in the above node, the number of forwarding node addresses is greater than or equal to 0.

In a third aspect of the present application, there is also provided a LORA ad hoc network comprising a plurality of nodes as described in any one of the above.

In summary, the present application at least includes the following beneficial effects:

1. the relay nodes do not need to be additionally installed and configured, and all the transmission of the messages can be forwarded by the terminal nodes.

2. The implementer can realize the mutual communication between one LORA terminal node and the LORA gateway or other nodes only by maintaining good address information.

3. According to the relative position of the current node address in the message and the node address for sending the message in the address information, the transmission process of the message can be known, the LORA node automatically judges the processing scheme of the message, and the loopback and repeated sending of the message can be avoided.

Drawings

The above and other features, advantages and aspects of various embodiments of the present application will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. In the drawings, like or similar reference characters designate like or similar elements, and wherein:

fig. 1 is an architecture diagram of a LORA network in the embodiment of the present application.

Fig. 2 is a flowchart of a LORA node determining a packet in the embodiment of the present application.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some embodiments of the present disclosure, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.

An LORA is an ultra-long distance wireless transmission scheme based on a spread spectrum technology, and belongs to one of communication technologies of the internet of things, a system architecture related to the embodiment of the present application is introduced next, it should be noted that the system architecture described in the embodiment of the present application is for more clearly illustrating the technical scheme of the embodiment of the present application, and does not form a limitation on the technical scheme provided in the embodiment of the present application, and as a person having ordinary skill in the art can know, along with the evolution of a network architecture and the occurrence of a new service scenario, the technical scheme provided in the embodiment of the present application is also applicable to similar technical problems.

As shown in fig. 1, the LORA network includes an LORA gateway and 7 LORA terminal nodes, in this embodiment of the present application, communication can be implemented between the 7 LORA terminal nodes and between the LORA terminal nodes and the LORA gateway, and specifically, communication can be implemented between the LORA terminal node 1, the LORA terminal node 2, and the LORA gateway; the LORA terminal node 3 can communicate with the LORA terminal node 1 and the LORA terminal node 4; the LORA terminal node 4 can communicate with the LORA terminal node 1, the LORA terminal node 3, the LORA terminal node 5 and the LORA terminal node 7; the LORA terminal node 5 can communicate with the LORA terminal node 4, the LORA terminal node 6, the LORA terminal node 2 and the LORA terminal node 7; the LORA terminal node 6 can communicate with the LORA terminal node 2 and the LORA terminal node 5; the LORA terminal node 7 may communicate with the LORA terminal node 4 and the LORA terminal node 5.

In order to facilitate communication between terminal nodes in an LORA network, embodiments of the present application provide a packet transmission method, which is applied to the LORA network.

In the embodiment of the present application, nodes in the LORA network include LORA terminal nodes and LORA gateways, in this LORA network, all nodes work in the same frequency, and all set up to pass-through mode, and assign unique addresses to each LORA terminal node and LORA gateway in the same LORA network, in one example, in a LORA network, assign 1 byte address for each node, the LORA gateway address can set up to 0X00, other terminal nodes can carry out address assignment according to the serial number, LORA terminal node 1 is 0X01, LORA terminal node 2 is 0X02, the other LORA terminal nodes set up in turn, and the address of each node is unique.

According to the addresses of the LORA nodes, configuring at least one piece of address information for each node according to the actual communication requirement of each LORA node, wherein the address information at least comprises a source node address and a destination node address, if the distance between the source node and the destination node enables the two nodes not to be in direct communication, the two nodes can be forwarded through other nodes, at this time, the addresses of the nodes needing to be forwarded are added into the address information, and the source node address, the forwarding node address and the destination node address are sequenced according to the sequence. In one example, if the LORA end node 7 needs to communicate with the LORA gateway through forwarding of the LORA end node 5 and the LORA end node 2, the address information of the LORA end node 7 is set to 0X07, 0X05, 0X02, 0X01, 0X 00.

The following is a packet transmission method of an LORA network node in the embodiment of the present application:

all nodes are set in the same frequency to work and are set in a transparent transmission mode, when the current node receives a message, the processing mode of the message can be determined according to the position of the address of the current node in the address information of the message, and the processing mode comprises message discarding, message broadcasting and message parsing.

In the embodiment of the application, before signal communication, the LORA node generating a signal selects corresponding address information from address information configured in advance according to an address of a destination node, assembles the address information and data to be sent into a message, and broadcasts the message, and all nodes in the LORA network that can receive the source node signal can receive the message.

It should be noted that the address of the LORA node of the generated signal is the source node address in the address information, and the address of the destination node to be sent is the destination node address in the address information; and assembling the address information and the data to be sent into a message, wherein the message comprises a control domain and an application service data unit, the control domain comprises the address information, and the application service data unit consists of actual service data to be sent.

The following explains the implementation of the message transmission method of the LORA network node.

All the nodes are set to work in the same frequency and are set to be in a transparent transmission mode, so that interactive communication can be ensured between each terminal node and the gateway in the same LORA network, and data can be transmitted after the communication.

When the current node receives the message, determining a processing mode of the message according to the position of the address of the current node in the address information of the message, specifically: determining address information according to the control domain of the received message, determining a first position of the address of the current node in the address information and a second position of the address of the node sending the message in the address information.

And judging according to the address information:

and if the first position is located before the second position, or the first position is located after the second position and the first position is not located at the next position of the second position, the current node discards the message.

In this case, the node is described before the first location is located at the second location and receives the broadcast processed message, and the next location where the first location is located after the second location and the first location is not located at the second location indicates that the current node is a forwarding node in the address information, but the current node is not in the order of the current node, so the current node should discard the message in both cases.

The first position is located next to the second position and the first position is not the last position of the address information, and the current node broadcasts the message.

In this case, it is described that the current node is the current node that should forward the packet, and therefore, the sub-packet needs to be broadcast.

The first position is next to the second position and is the last position of the address information, and the current node analyzes the message.

In this case, the next node in the second position indicates that the packet is transmitted to the current node via the node address in the address information, and the current node is the last node in the address information and indicates that the current node is the destination node, so the current node needs to analyze and process the packet and receive the service data in the packet.

In some application embodiments, before determining the first location and the second location, determining whether a current node location exists in the address information, and if not, discarding the packet by the current node; and if so, judging the first position and the second position.

The determination of whether the current node position exists and whether the current node position exists in the address information is to determine whether the current node is a forwarding node or a destination node required for transmitting the message, and if the current node position does not exist, the determination proves that the current node has no any effect on the transmission process of the message, so that the message is discarded.

As shown in fig. 2, an implementation manner of a message transmission method of a LORA network node in the embodiment of the present application is shown in an example.

First, the format of the packet may be set as a control field and an application service data unit, where the control field is composed of a node address SA, an address information length L, and address information for sending the packet, the application service data unit is composed of actual service data, the node address may be set as 1 byte, and the format of the packet is shown in table 1:

table 1 message format

The following example is made with reference to fig. 1 to illustrate the judgment processing after the node receives the packet:

in the LORA network, a 1-byte address is allocated to each node, the LORA gateway address is set to 0X00, the LORA terminal node 1 is 0X01, the LORA terminal node 2 is 0X02, and the other LORA terminal nodes are sequentially allocated according to numbers.

According to the network topology diagram of fig. 1, the LORA terminal node 7 may be associated to the LORA gateway sequentially through the LORA terminal node 4 and the LORA terminal node 1, that is, 1 piece of address information may be configured in the LORA terminal node 7: 0x07, 0x04, 0x01, 0x 00.

When the LORA terminal node 7 needs to send a message to the LORA gateway, address information ending in the LORA gateway address, that is, 0x07, 0x04, 0x01, and 0x00, is found from the address information, where the node address SA sending the message in the address information is 0x07, and the length L of the address information is 0x04, the specific control domain forming the message is 0x 070 x 040 x 070 x 040 x 010 x00, and the message further includes an application service data unit, and then the LORA terminal node 7 sends the frame message in a broadcast manner.

After receiving the broadcast frame, the LORA terminal node 5 obtains address information according to the message as follows: 0x07, 0x04, 0x01, and 0x00, and the address 0x05 of the LORA terminal node 5 is not included in the address information, so the message is discarded.

After receiving the broadcast frame, the LORA terminal node 4 obtains address information according to the message as follows: 0x07, 0x04, 0x01, 0x00, since the address 0x04 of the LORA terminal node 4 is in the address information, and the node address SA sending the message is 0x07, the address 0x04 of the current node is the next bit of SA, it is determined that the frame message needs to be forwarded, at this time, the modified SA is 0x04, the control domain information is 0x 040 x 040 x 070 x 040 x 010 x00, and then the LORA terminal node 4 sends the frame message in a broadcast mode.

After receiving the broadcast frame, the LORA terminal node 5 obtains address information according to the message as follows: 0x07, 0x04, 0x01, 0x 00. Since address 0x05 of LORA terminal node 5 is not included in the address information, the message is discarded.

After receiving the broadcast frame, the LORA terminal node 3 obtains address information according to the message as follows: 0x07, 0x04, 0x01, 0x 00. Since the address 0x03 of the LORA terminal node 3 is not included in the address information, the message is discarded.

After receiving the broadcast frame, the LORA terminal node 7 obtains address information according to the message as follows: 0x07, 0x04, 0x01, 0x 00. Since the address 0x07 of the LORA terminal node 7 is in the address information, the address SA of the node sending the message is 0x04, and the address 0x07 of the current node is before the SA, indicating that the frame message has been broadcast and sent, the message is discarded.

After receiving the broadcast frame, the LORA terminal node 1 obtains address information according to the message as follows: 0x07, 0x04, 0x01, 0x00, because the address 0x01 of the LORA terminal node 1 is in the address information, the node address SA sending the message is 0x04, the address 0x01 of the current node is the next bit of SA, it is determined that the frame message needs to be broadcast and forwarded, at this time, the modified SA is 0x01, the control domain message is 0x 010 x 040 x 070 x 040 x 010 x00, and then the LORA terminal node 4 sends the frame message in a broadcast manner.

After receiving the broadcast frame, the LORA terminal node 4 obtains address information according to the message as follows: 0x07, 0x04, 0x01, 0x00, because the address 0x04 of the LORA terminal node 4 is in the address information, but the node address SA sending the message at this time is 0x01, and the address 0x04 of the current node is before SA, which indicates that the frame message has already been sent, so the message is discarded.

After receiving the broadcast frame, the LORA gateway obtains address information according to the message as follows: 0x07, 0x04, 0x01, 0x00, since the LORA gateway address is 0x00, the SA of the node sending the message is 0x01, the SA gateway address 0x00 is the next bit of the SA, and the LORA gateway address 0x00 is the last bit of the address information, it is the destination receiving node of the frame message, i.e. it can analyze the application service data unit.

The above is a description of method embodiments, and the embodiments of the present application are further described below by way of apparatus embodiments.

A node configured to:

when a message is received, determining a message processing mode according to the position of the address of the terminal node in the address information of the message, wherein the message processing mode comprises message discarding, message broadcasting and message analyzing;

the address information comprises a source node address, a forwarding node address and a destination node address which are arranged according to the sequence.

Further, the node is further configured to:

determining a first position of the address of the terminal node in the address information and a second position of the address of the node sending the message in the address information;

in the address information:

the first position is located before the second position, or the first position is located after the second position and the first position is not located at the next position of the second position, and the terminal node discards the message;

the first position is located next to the second position and the first position is not the last position of the address information, and the terminal node broadcasts a message;

the first position is located after the second position and the first position is the last position of the address information, and the terminal node analyzes the message.

Further, the node is further configured, prior to determining the first location and the second location, to further comprise: and judging whether the address of the current node exists in the address information of the message or not, and if not, discarding the message.

Further, the number of forwarding node addresses in the address information of the node is equal to or greater than 0.

An embodiment of the present application further provides an LORA ad hoc network, which includes a plurality of any one of the above nodes.

The foregoing is only a partial embodiment of the present application, and it should be noted that, for those skilled in the art, several modifications and decorations can be made without departing from the principle of the present application, and these modifications and decorations should also be regarded as the protection scope of the present application.

11页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:铁路防灾监测无线传输系统路由及数据压缩自适应优化方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!