Disclosure of Invention
An object of the embodiments of the present disclosure is to provide a cluster-based low-power consumption wide area network recovery method.
In order to solve the technical problems, the embodiment of the application is realized by the following steps:
the application provides a cluster-based low-power consumption wide area network recovery method, which comprises the following steps:
when a gateway in the low-power-consumption wide area network fails, a server in the low-power-consumption wide area network sends a beacon to inform a first-layer cluster head node in the first-layer cluster group to switch to a Class B mode, and communication between the first-layer cluster head node in the first-layer cluster group and all CM nodes in the first-layer cluster group is restored;
the server transmits beacons layer by layer to inform cluster head nodes in other layers of cluster groups to switch to a Class B mode, and communication between the cluster head nodes in the other layers of cluster groups and all CM nodes of each layer of cluster groups is restored layer by layer;
the cluster head node of each layer of cluster group receives and compresses the data sent by each layer of CM node, and the compressed data is sequentially sent to the cluster head node or gateway of the previous layer until the server receives the data and returns a confirmation frame through a downlink;
the first layer cluster head nodes and the cluster head nodes in other layer cluster groups are determined before the gateway fails; each cluster includes a cluster head node and a CM node.
In one embodiment, the determining of the first layer cluster head node and the cluster head nodes in the other layer cluster group includes:
the server selects an alternative cluster head node according to the received historical data packet;
screening out nodes meeting the conditions from the candidate cluster head nodes to serve as first-layer cluster head nodes;
and screening out nodes meeting the conditions from the CM nodes of the first-layer cluster group according to the first-layer cluster head nodes, and taking the nodes as cluster head nodes in other-layer cluster groups.
In one embodiment, the server selects an alternative cluster head node according to the received historical data packet, including:
and the server selects nodes in the gateway coverage intersection area according to the received historical data packet, and initializes the nodes in the gateway coverage intersection area to alternative cluster head nodes.
In one embodiment, the screening the nodes meeting the conditions from the candidate cluster head nodes as the first-layer cluster head nodes includes:
the server sets a first CAD sensitivity threshold for the alternative cluster head node through a downlink;
the node which receives the first CAD sensitivity threshold detects CAD on the channel, determines the coverage area of each node, analyzes the received data packet and forms a cluster member list corresponding to each alternative cluster head node;
and each alternative cluster head node transmits the corresponding cluster member list to the server through an uplink, and the server screens redundant alternative cluster head nodes according to all the cluster member lists by using a widest coverage principle or a least cluster group principle to obtain a final first-layer cluster head node and sends a beacon to the first-layer cluster head node.
In one embodiment, the screening of the nodes meeting the conditions from the CM nodes of the first-layer cluster group according to the first-layer cluster head node as the cluster head nodes in the other-layer cluster group includes:
the server sets a second CAD sensitivity threshold for the CM nodes of the first-layer cluster according to the cluster member list of the first-layer cluster head node;
the CM node which receives the second CAD sensitivity threshold detects CAD on the channel, determines the respective coverage area, analyzes the intercepted data packet and forms a cluster member list corresponding to each CM node;
each CM node transmits the corresponding cluster member list to a server through an uplink, and the server screens redundant CM nodes according to all the cluster member lists by using a widest coverage principle or a least cluster principle to obtain cluster head nodes of a cluster group of the next layer;
the server checks whether all the nodes belong to one of the cluster groups, if the nodes do not join the cluster groups, the server repeatedly screens the nodes meeting the conditions from the CM nodes of the first-layer cluster group, and generates the cluster head nodes of the next-layer cluster group until all the nodes join the cluster group.
In one embodiment, a server in a low-power wide area network sends a beacon to inform a first-layer cluster head node in a first-layer cluster group to switch to a Class B mode, and resumes communication between the first-layer cluster head node in the first-layer cluster group and all CM nodes in the first-layer cluster group, including:
the server sends a beacon to inform a first layer cluster head node in the first layer cluster group to switch to a Class B mode;
the first layer cluster head node is switched to a Class B mode, and the number of receiving windows is set to be the number of nodes in the first layer cluster;
the first-layer cluster head node uses a default Date Rate channel to periodically broadcast a 'hello_I_am_CH' message in the first-layer cluster group so as to restore communication with all CM nodes in the first-layer cluster group; until the first layer cluster head node contacts all CM nodes in the first layer cluster.
In one embodiment, the first layer cluster head node periodically broadcasts a "hello_i_am_ch" message within the first layer cluster using a default Date Rate channel to resume communication with all CM nodes in the first layer cluster, comprising:
the first-layer cluster head node uses a default Date Rate channel to periodically broadcast a 'hello_I_am_CH' message in the first-layer cluster, and the CM node which receives the 'hello_I_am_CH' message sends the 'hello_I_am_CM' message to the first-layer cluster head node by using the default Date Rate channel;
the first layer cluster head node which receives the Hello_I_am_CM information distributes the spare receiving window to the corresponding CM node and sends the control frame to the corresponding CM node;
and the CM node which receives the control frame sends data to the first layer cluster head node at the moment of sending time according to the allocated receiving window.
In one embodiment, the control frame includes a local time, a time at which the receive window period of the present round begins, a spreading factor, a bandwidth, a center frequency, a sequence number assigned to the CM node receive window, a number of receive windows per beacon period, and a CRC check bit.
In one embodiment, the time of transmissionDetermined according to the following formula:
wherein, the liquid crystal display device comprises a liquid crystal display device,for the time of one beacon period +.>Receiving a sequence number for a window assigned to the CM node; />The number of members within the cluster; />For the time at which the receive window period starts for the present round.
In one embodiment, when the CM node in the first-layer cluster does not receive the acknowledgement frame sent by the server after retransmitting the acknowledgement frame for a preset number of times, the corresponding CM node switches to a default Date Rate channel to perform CAD functions, so as to receive the "hello_i_am_ch" message sent by the first-layer cluster first node.
The technical scheme provided by the embodiment of the present specification can be seen from the following scheme: by combining the cluster thought and the characteristics of the LPWAN, a brand new topological structure and a data transmission scheme for emergency communication are provided, and the fault tolerance of the LPWAN is improved.
Detailed Description
In order to make the technical solutions in the present specification better understood by those skilled in the art, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present disclosure.
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be apparent to those skilled in the art that various modifications and variations can be made in the specific embodiments of the application described herein without departing from the scope or spirit of the application. Other embodiments will be apparent to those skilled in the art from consideration of the specification of the present application. The specification and examples of the present application are exemplary only.
As used herein, the terms "comprising," "including," "having," "containing," and the like are intended to be inclusive and mean an inclusion, but not limited to.
Currently, when the LPWAN network suddenly crashes in the gateway, a large number of LPWAN nodes cannot reestablish communication with the network server, so that the whole LPWAN network is paralyzed. The key problem faced by this is how, after the gateway is disconnected, the individual end nodes establish connections between each other, construct a new network topology and find the gateway in the vicinity of working, offloading the communication tasks of the failed gateway to the problem of the neighbouring other gateways.
Therefore, the application designs a cluster-based low-power consumption wide area network recovery method, which can ensure that subordinate LPWAN nodes can still communicate with an LPWAN server when an LPWAN gateway is abnormal.
The application is described in further detail below with reference to the drawings and examples.
Referring to fig. 1, a flow chart of a cluster-based low-power wide area network recovery method according to an embodiment of the present application is shown.
It will be appreciated that prior to failure of the LPWAN, a cluster-based LPWAN network topology needs to be established between the LPWAN server (which may be referred to as a server) and the LPWAN end node (which may be referred to as a node) for emergency communication in the event of failure of the LPWAN.
First, selecting an alternative cluster head node.
There are multiple LPWAN gateways (may be simply referred to as gateways) in the LPWAN network scenario, and there may be a part of the gateways disconnected from the LPWAN server due to external factors (such as natural disasters, malicious attacks, etc.) or internal factors (power supply system disconnection, own hardware failure, etc.). The LPWAN server distinguishes nodes in the gateway coverage intersection area according to local historical data packets (the data packets are node-to-gateway data packets, namely uplink data packets), and the nodes (namely nodes in the gateway coverage intersection area) can still communicate with the LPWAN server through other LPWAN gateways. The LPWAN server initializes these nodes to alternative cluster head nodes (alternative CH nodes), as shown in fig. 2.
And screening out nodes meeting the conditions from the candidate cluster head nodes to serve as first-layer cluster head nodes.
The LPWAN server sets a first CAD sensitivity threshold for an alternative CH node through a downlinkReceive the first CAD sensitivity threshold +.>CAD (Channel detection mechanism ) detects on the channel, attempts to acquire the data packet transmitted by the nearby node to determine its coverage, analyzes the received data packet, and fills the radio parameters such as corresponding node ID, center Frequency, BW (BandWidth), SF (spreading factor), SNR (Signal-to-noise ratio), RSSI (Received Signal Strength Indication ), ping_slot Number (Number of receiving windows) into Cluster_Member_List (Cluster Member List, as shown in Table 1), expressed as%>,/>Is the first cluster group->Is the +.f. in the first layer cluster>Each of the candidate CH nodes, wherein a, …, B is a node within the coverage area of the candidate CH node, which may be referred to as CM (ClusterMember) node.
Watch 1 Cluster_Member_List
Node_ID
|
CF
|
BW
|
SF
|
SNR
|
RSSI
|
ping_slot Number
|
A
|
433MHz
|
250KHz
|
10
|
0dB
|
-20dB
|
NULL
|
…
|
…
|
…
|
…
|
…
|
…
|
…
|
B
|
433MHz
|
125KHz
|
12
|
2dB
|
-10dB
|
NULL |
After a specified period of time, each candidate CH node transmits its corresponding latest cluster_member_list to the LPWAN server through an uplink, and the LPWAN server screens out redundant candidate CH nodes according to all the cluster_member_list using the widest coverage principle or the least Cluster principle to obtain a final first-layer CH node, and informs the node through a Beacon.
Illustratively, the following formula is the broadest coverage principle formula:
wherein, the liquid crystal display device comprises a liquid crystal display device,representing the number of CM nodes in the cluster_membrane_list.
And after the first layer CH node receives the Beacon frame, switching to a Class B mode. And then, setting the ping slot period of the first-layer CH node by combining the Cluster_Member_List of the first-layer CH node, so as to ensure that the times of opening the receiving window by the first-layer CH node is consistent with the number of members in a Cluster. Illustratively, the Beacon frame is 128ms, the number of ping_slots is 5, and the ping_slot period is 128 ms/5=25.6 ms.
And screening out nodes meeting the conditions from CM nodes of the first-layer cluster group according to the first-layer cluster head nodes, and taking the nodes as cluster head nodes in other-layer cluster groups.
The LPWAN server sets a second CAD sensitivity threshold for the CM node (ClusterMember node) in the first layer Cluster according to the Cluster_Member_List of the first layer CH node determined by the stepsThe CM node which has acquired the threshold value carries out CAD detection on the channel, determines the coverage of the CM node and analyzes the received data packet to form a Cluster_Member_List of the CM node, which is expressed as +.>(/>Is->The clusters of the layers are arranged in a cluster,i≠0,/>is->The>The number of alternative CH nodes), which forms a corresponding cluster_member_list with the alternative Cluster head nodes in the first layer Cluster group, which will not be described herein.
Each CM node then submits the Cluster_Member_List to the LPWAN server via the first tier CH node, which receivesAfter that, firstly remove->The first layer CH node in the tree is obtained by screening redundant CM nodes according to the principle of the widest coverage or the principle of the least cluster groupThe cluster head node of the cluster group of the next layer, exemplarily, uses the formula +.>,iNot equal to 0, the CH node of the cluster of the next layer is selected. Finally, the LPWAN server checks whether all nodes are already belonged to a certain cluster group, if the nodes do not join the cluster group, the screening of the nodes meeting the conditions from the CM nodes of the first-layer cluster group is repeated, and the cluster head node of the next-layer cluster group is generated until all the nodes join the cluster group. A schematic diagram of determining coverage of CH nodes of each layer by CAD is shown in fig. 3.
The cluster-based LPWAN network topology established according to the above embodiment is shown in fig. 4.
As shown in fig. 1, the cluster-based low-power consumption wide area network recovery method may include:
s110, when a gateway in the low-power-consumption wide area network fails, a server in the low-power-consumption wide area network sends a beacon to inform a first-layer cluster head node in the first-layer cluster group to switch to a Class B mode, and communication between the first-layer cluster head node in the first-layer cluster group and all CM nodes in the first-layer cluster group is restored.
Specifically, when certain gateways in the LPWAN network fail (or are abnormal), the LPWAN server senses and notifies the first CH node to switch to emergency mode to start emergency communication.
In one embodiment, S110 may specifically include:
the server sends a beacon to inform a first layer cluster head node in the first layer cluster group to switch to a Class B mode;
the first layer cluster head node is switched to a Class B mode, and the number of receiving windows is set to be the number of nodes in the first layer cluster;
the first-layer cluster head node uses a default Date Rate channel to periodically broadcast a 'hello_I_am_CH' message in the first-layer cluster group so as to restore communication with all CM nodes in the first-layer cluster group; until the first layer cluster head node contacts all CM nodes in the first layer cluster.
When the CM node in the first-layer cluster still does not receive the confirmation frame sent by the server after retransmitting the preset times, the corresponding CM node is switched to a default Date Rate channel to perform the CAD function so as to receive the 'hello_I_am_CH' message sent by the first-layer cluster.
The first layer cluster head node uses a default Date Rate channel to periodically broadcast a hello_i_am_ch message in the first layer cluster group so as to restore communication with all CM nodes in the first layer cluster group, including:
the first-layer cluster head node uses a default Date Rate channel to periodically broadcast a 'hello_I_am_CH' message in the first-layer cluster, and the CM node which receives the 'hello_I_am_CH' message sends the 'hello_I_am_CM' message to the first-layer cluster head node by using the default Date Rate channel;
the first layer cluster head node which receives the Hello_I_am_CM information distributes the spare receiving window to the corresponding CM node and sends the control frame to the corresponding CM node; the control frame comprises local time, time for starting a period of a receiving window of the current round, a spread spectrum factor, bandwidth, center frequency, sequence numbers allocated to the receiving windows of the CM node, the number of the receiving windows of each beacon period and CRC check bits;
and the CM node which receives the control frame sends data to the first layer cluster head node at the moment of sending time according to the allocated receiving window.
Specifically, the notified first layer CH node switches to the Class B mode, and sets the number of ping_slots of the first layer CH node to the number of cluster members in the cluster. Next, the CH node periodically broadcasts a "hello_i_am_ch" message within the first layer cluster using a default Date Rate channel (e.g., sf=7, bw=250 KHz) until all CM nodes are contacted. When the CM node has not received an ACK (acknowledgement) frame from the LPWAN server after retransmitting the < Nbtrans > times (i.e. a preset number of times, which may be set according to actual requirements), and is still invalid after attempting to switch the different Date Rate schemes, it is acknowledged that the CM node has been out of connection with the LPWAN server, and then switches to a default Date Rate channel to perform CAD functions, in an attempt to receive a "hello_i_am_ch" message from the first-layer CH node.
The CM node that received the hello_i_am_ch message sends the hello_i_am_cm message to the first layer CH node at a default Date Rate.
The first layer CH node that receives the hello_i_am_cm message allocates the spare ping_slot to that CM node. Then, the first CH node transmits a control frame to the CM node, where the control frame includes a local Time (Time), a Time at which a ping_slot cycle starts (beacon_time), a spreading factor SF, a bandwidth BW, a Center Frequency (center_frequency), a sequence Number (ping_slot Number) allocated to the CM node, a ping_slot Number (i.e., the Number of members in a cluster group, ping nb) per Beacon cycle, and a CRC check bit (CRC), as shown in fig. 5.
Finally, as shown in FIG. 6, the CM node calculates the transmit time from the received control frame bySubsequently at +.>And sending data to the first layer CH node at any time.
Wherein, the liquid crystal display device comprises a liquid crystal display device,122.88s in the LPWAN for the time of one beacon period; />Sequence numbers assigned to the CM node pingslots; />The number of members within the cluster; />Is the time at which the ping slot cycle starts for this round.
S120, the server transmits beacons layer by layer to inform cluster head nodes in other layers of cluster groups to switch to a Class B mode, and communication between the cluster head nodes in the other layers of cluster groups and all CM nodes of each layer of cluster group is restored layer by layer;
s130, the cluster head node of each layer of cluster group receives the data sent by the CM node of each layer, compresses the data, and sends the compressed data to the cluster head node or gateway of the previous layer in sequence until the server receives the data and returns a confirmation frame through a downlink;
the first layer cluster head nodes and the cluster head nodes in other layer cluster groups are determined before the gateway fails; each cluster includes a cluster head node and a CM node. The cluster head nodes in the first-layer cluster group are first-layer cluster head nodes.
Specifically, when the first-layer cluster group resumes intra-cluster communication, the intra-cluster communication of the other-layer cluster groups is resumed layer by layer according to the pre-established cluster group-based LPWAN network topology structure.
After the CH nodes of each layer of cluster group pass through a round of ping_slot period, the data of all the nodes in the cluster are compressed through a data compression algorithm and then are delivered to the CH node or gateway of the last layer until the LPWAN server receives the data and returns an ACK frame, and all the LPWAN nodes are finished to resume communication with the LPWAN server. It can be understood that the first layer CH node compresses data and gives it up to the gateway, while the CH nodes of other layer clusters give it up to the last layer CH node.
By adopting the cluster-based low-power consumption wide area network recovery method provided by the embodiment of the application, when the LPWAN gateway is abnormal, subordinate LPWAN nodes can still communicate with the LPWAN server.
The cluster-based low-power-consumption wide area network recovery method provided by the embodiment of the application combines the cluster thought and the characteristics of the LPWAN, provides a brand-new topological structure and a data transmission scheme for emergency communication, and improves the fault tolerance of the LPWAN.
It should be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.