Disclosure of Invention
Aiming at the problems of low data acquisition throughput, high power consumption and poor expansibility of a wireless sensor network node distribution dense scene in the prior art, the invention provides a wireless sensor network for collecting data based on constructive interference multi-cluster so as to efficiently collect mass data in the wireless sensor network in dense distribution.
Meanwhile, the invention also provides a wireless sensor network data collection method based on constructive interference clustering collection data.
A wireless sensor network data collection method based on constructive interference clustering collection data comprises the following steps:
a starting stage: acquiring the network node information, creating a source node dynamic distribution table, and maintaining time synchronization of the wireless sensor network, wherein: the node comprises a master sink node, a slave sink node and a source node, and clusters are formed on the node, wherein each cluster comprises a master sink node or a slave sink node, each cluster is allocated with an independent channel for data collection, and each node is allocated with a phase ID; the starting stage comprises a synchronous control period and a network synchronous state confirmation period;
data collection phase: the master sink node initiates constructive interference network flooding in a synchronous control period, synchronous control is broadcast, the slave sink node and the source node participate in the flooding, after synchronous control information is received, the source node adjusts a channel and a data-phase in a data collection stage according to the received synchronous control information, and the slave sink node and the source node judge whether a newlost node exists in the network.
Further, the starting stage further includes that the master sink node initiates constructive interference network flooding, and time synchronization is performed on all nodes in the network.
Further, in the synchronization control period, all nodes work on a common channel 0, and the master sink node initiates flooding, and the network synchronization status confirmation period is composed of a plurality of statistical periods, and all nodes work on a common channel 1.
Further, the master sink node initiates constructive interference network flooding, time synchronization is carried out on all nodes in the network, if the nodes judge that synchronization is finished, a network synchronization state confirmation stage is entered, the master sink node is informed of the hop count from the master sink node to the sink in an allocated statistical period, otherwise, the master sink node continues to execute the master sink node to initiate constructive interference network flooding, time synchronization is carried out on all the nodes in the network until time synchronization is finished by all the nodes, and a starting process is finished.
Further, when the clustered data is collected, the source node judges whether a newlost node exists in the network, if the newlost node exists, whether the source node is the newlost node or not is further judged, if the newlost node exists, the source node is used as an initiator of constructive interference to enter a lost-phase, and if the newlost node does not exist, the source node is used as a receiver to enter the lost-phase.
Further, when the clustered data is collected, the sink node judges whether a newlost node exists, if the newlost node exists, the sink node is used as a receiver to enter a lost-phase, and if the newlost node does not exist, the sink node is used to enter a data-phase.
Further, in the lost-phase, the newlost node creates a flooding message and broadcasts the flooding message as an initiator of constructive interference, and the non-newlost node receives and forwards the message as a receiver of constructive interference.
Further, in the data-phase, the source node is switched into an allocated channel, and according to the allocated phase ID, flooding is initiated in the corresponding data-phase, sink nodes of each cluster receive, and the sink nodes receive and finish reading the content of the source data packet.
Further, all nodes judge whether the data-phase is ended, if so, the sink node is switched to the slave-phase, the source node waits for entering the sync-phase, otherwise, the source node continues to execute the initiation of flooding according to the set phase ID.
Further, the wireless sensor data network clustering includes the following steps:
step S21, providing a plurality of wireless sensors;
step S22, setting each sensor to be equivalent to a node, wherein the plurality of nodes form the wireless sensor network, the node comprises a plurality of sink nodes and a plurality of source nodes, and the sink nodes comprise a master sink node and a slave sink node;
Step S23, clustering the plurality of nodes to obtain a plurality of clusters, wherein each cluster comprises a sink node and a plurality of source nodes, and in each cluster, the sink nodes are provided with the same number of phase IDs, and the same number of source nodes with the same hop count are equal;
step S24, collecting source node data in each cluster by a master sink node in each cluster, collecting the source node data in each cluster by the slave sink node in each cluster, and uploading the data to the master sink node;
step S25, the master sink node maintains the time synchronization of the wireless sensor network and adjusts the load balance and the connectivity balance of the nodes in the cluster according to the source node data uploaded by the slave sink node and the source node data in the cluster collected by the master sink node to generate synchronization control information.
Further, the load balancing adjustment steps are as follows:
in step S251, the master sink node counts a source node distribution table (NodeID Distribution Table, NDT) at the start stage, where the information counted by the table includes a Channel where the source node is located, a node ID, a hop count hoptosnk from the node to the sink node in the cluster, a phase ID of the node, and a state of the node, that is, whether the node is a lost node. When the cluster, phase ID and node state of the node in the network change, the information of the node distribution table is updated.
Step S252, the main sink node counts the number of source nodes under each hop count of each cluster as follows:
wherein:
i cluster network
k current statistical hop count value
L i,k H in ith cluster j Number of source nodes when=k
j-th source node
n number of endogenous nodes in the ith cluster
h j J-th source node to sink node hop count
f(i,j,h j ) Count value of jth source node of ith cluster when hop value is k
In step S253, the master sink node counts the average number of source nodes with the same hop count from all nodes to the sink node, and the specific formula is as follows:
wherein:
average number of source nodes with hop count h=k in all clusters
i cluster network
M number of clusters
L i,k Number of source nodes when the number of hops in the ith cluster is h=k
Step S254, the master sink node calculates the imbalance of the load balancing under each hop:
wherein:
D k imbalance in kth hop
Step S255, the master sink node finds the maximum value of the unbalance degrees, namely the maximum unbalance degree D max . If the maximum unbalance degree D max Greater than a set degree of load imbalance D, i.e. D max > D, then indicate the hop countAnd if the corresponding load is unbalanced, indicating that the load is balanced.
In step S256, the master sink node adjusts the hop count of the unbalanced load. The specific adjustment scheme is as follows:
i. Traversing the source node distribution table to find D max Corresponding hop countCluster M with the largest number of lower nodes and cluster N with the smallest number of nodes, and recording the number of hops in cluster M and cluster N as +.>Is a node ID list of (a);
ii. Finding the hop count value with the least number of nodes in the cluster M
iii, random number of hopsSelecting a node a from a list of node IDs corresponding to the cluster M, and randomly selecting a hop count value in the same way>Selecting a node b from a node ID list corresponding to the cluster N;
and iv, exchanging the channel and phase IDs of the nodes a and b to realize adjustment of load balance. And updating the channel and phase ID information of the nodes a and b in the source node distribution table.
Further, when the connectivity balance adjustment is performed on the nodes in the cluster, the method includes the following steps:
step S257, the packet loss rate implies node connectivity;
by adopting a communication mechanism of TDMA, each node is set to be distributed with a phase ID, and the phase IDs of the nodes in the same cluster are different from each other, so that the cluster number and the phase ID can be used for uniquely determining one node ID.
And the sink node records the phase ID of the source node of the lost data packet in the cluster and then gathers the phase ID to the main sink node. The master sink node makes a decision, decides which lost node to adjust in the period according to the cluster number, the phase ID and the HopToSink, and marks the node as newlost.
Step S258, realizing information interaction through network flooding based on constructive interference;
and the master sink node generates a synchronous control message after making a decision, and the message is sent to the nodes of the whole network through constructive interference network flooding.
Each node receives the synchronous control message sent by the main sink node, thereby obtaining the synchronous control instruction of the main sink node. The node newlost to be regulated correspondingly obtains the synchronous control instruction of the main sink node, and initiates a constructive interference network flooding in a lost-phase period corresponding to the public channel.
Step S259, obtaining the hop count hoptosnk from each source node to the sink node, and setting each source node as a neighbor, i.e. a one-hop receiver, and receiving the signal strength when the neighbor is used as an initiator to initiate flooding.
And the newlost node initiates the flooding broadcast at the set lost-phase. When the node receives the flooding message, the following judgment is performed:
i. whether the cluster Clustersource where the node is located is the same as the cluster Clusternewload where the newload node is located;
ii. The node is a neighbor node which is not a newlost node, namely whether the hop count value HopToNl from the newlost node to the node is 1;
And iii, whether the node is a neighbor node of the newlost node close to the sink node direction, namely whether the hop count HopToSinkSource (+1) of the node is equal to the hop count HopToSinknewlost of the newlost node.
Only when the above three conditions are fully satisfied, i.e., equation (5) is satisfied, it is indicated that the newlost node qualifies to opt-in to the cluster in which the source node is located. And the source node sets a source node data packet according to the judging result and informs the sink node. The formula (5) is as follows:
step S260, after receiving the flooding initiated by each source node of the cluster as an initiator, the sink node finds out the maximum value CMaxRssi of the received newlost node transmission signal strength RSSI in the cluster and the corresponding node ID value CMaxRssiID based on the received information; in addition, in the cluster where the CMaxRssiID is located, the node ID value cmaxconclid containing the maximum number of neighbor nodes CMaxN is searched.
Step S261, the master sink node compares the CMaxRssi values of each cluster, and finds out the node ID corresponding to the maximum RSSI value MaxRssi: the MaxRssiID is found out, and the node ID with the most neighbor nodes in the cluster where the MaxRssiID is located is found out: maxconcdd. The cluster where the node MaxRssiID is located is the cluster where the newlost node needs to turn. Meanwhile, if the node ID of the cluster is MaxConcID, the cluster where the newlost node is located is required to be turned to.
Step S262, the master sink node searches the source node information table, and exchanges the channel and phase ID of the newlost node with the channel and phase ID of the maxconc ID node, thereby completing adjustment of connectivity balance. And updating the corresponding information in the node information table.
The wireless sensor network based on the constructive interference multi-cluster collected data comprises a plurality of nodes, a plurality of independent channels and a plurality of phase IDs (identity) which are connected into a network, wherein the nodes comprise a master sink node, a plurality of slave sink nodes and a source node, each node is allocated with a phase ID, the plurality of nodes are correspondingly divided into a plurality of clusters, each cluster comprises a sink node, each cluster corresponds to an independent channel, the independent channels correspondingly transmit data, and the master sink node is initiated with constructive interference network flooding and broadcast synchronous control in a synchronous control period, and the slave sink node and the source node participate in the flooding; during a data collection period, data are collected based on clustering, and each node transfers to a set channel for data transmission according to own clusters; and during the control data fusion period, the slave sink node floods relevant control data information to the master sink node in the respective slave-phase period. The master sink node fuses the information of each slave sink node, judges the load balance and the connectivity balance, and generates corresponding synchronous control message data packets, thereby realizing the load balance and the connectivity balance.
Compared with the prior art, the clustering method based on constructive interference and the measurement method based on load balancing and connectivity balancing is used for clustering, is applied to application scenes with a plurality of nodes and dense distribution, realizes data collection, obtains the data collection effect with low power consumption, high throughput, instantaneity and high reliability, and is widely applied to application scenes such as data center monitoring and tunnel monitoring.
Furthermore, the clustering is based on dynamic clustering of a source node distribution table established in a starting stage to form a dynamic multi-cluster network structure, so that the reliability of the whole network is improved.
Detailed Description
The following description of the technical solutions in the embodiments of the present invention will be clear and complete, and it is obvious that the described embodiments are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1 and fig. 2 in combination, fig. 1 is a schematic diagram of a wireless sensor network for collecting data based on constructive interference clustering according to the present invention, and fig. 2 is a schematic diagram of a flow for transmitting data based on constructive interference principle in the wireless sensor network shown in fig. 1. When the wireless sensor network is adopted to flood and transmit data based on the principle of constructive interference, the method comprises the following steps:
Step S01, providing a first node N1, a second node N2, a third node N3 and a fourth node N4, wherein the second node N2, the third node N3 are adjacent to the first node N1, and the fourth node N4 is adjacent to the second node N2 and the third node N3;
step S02, the first node N1 synchronously sends a data packet to the second node N2 and the third node N3 that are adjacent to each other;
step S03, the second node N2 and the third node N3 synchronously receive the data packet from the first node N1, and flood the data packet, as shown in fig. 3;
in step S04, the second node N2 and the third node N3 respectively and synchronously transmit the received data packets, and the data packets are received by the fourth node N4 adjacent to each other after spatial constructive interference, as shown in fig. 4.
In the data transmission flooding process based on constructive interference, the data transmission flooding process comprises software processing time, data packet sending, data packet receiving, data packet monitoring and wireless closing time. Because of the principle of constructive interference, when a plurality of different nodes simultaneously receive the same data packet and simultaneously flood the data packet, radio waves form energy-enhanced interference in physical space, signals with stronger energy are formed by superposition, and the success rate of data transmission is improved. Further, in order to improve the transmission success rate, it may be configured that each data packet is sent multiple times during the transmission process.
Please refer to fig. 5, which is a schematic diagram of a data collection flow using flooding.
Step S11, providing a plurality of nodes, namely a first node Nx, a second node Nx+1 and a third node Nx+2, wherein each node is allocated with a set independent phase ID, the independent phase ID of the first node Nx is set as x, the independent phase ID of the second node Nx+1 is set as x+1, and the independent phase ID of the third node Nx+2 is set as x+2, as shown in FIG. 6;
step S12, setting the phase length as Tphase in the independent phase ID of the first node Nx, wherein the first node Nx is an initiator of constructive interference, and the second node Nx+1 and the third node Nx+2 are receivers of constructive interference, so as to realize network flooding, as shown in FIG. 7;
step S13, repeating the steps, and polling to initiate the network flooding of constructive interference so that the data packet is transmitted to all data nodes, namely: and the whole data network realizes data collection.
In the above steps, the source node is used as an initiator of constructive interference, the source node is used for transmitting the data packet to other adjacent nodes, the other nodes are used as data receivers, the sink node is used as an aggregation node, and the data packet is transmitted to all nodes of the whole wireless data network based on message flooding from the source node to the aggregation node, so that data collection of the whole wireless data network is realized. In this process, data is transmitted and collected between the data initiator and the data receiver based on the principle of constructive interference. More importantly, in order to improve reliability, the sink node and the source node poll to initiate constructive interference network flooding, in each flooding, a data packet is transmitted to the whole wireless sensor network, namely: polling multiple floods enables data collection.
Please refer to fig. 8 and fig. 9 simultaneously, wherein fig. 8 is a schematic diagram of a clustering flow of the wireless sensor data network, and fig. 9 is a schematic diagram of a clustering structure of the wireless sensor data network shown in fig. 8.
When clustering a wireless sensor data network, it comprises the steps of:
step S21, providing a plurality of wireless sensors;
step S22, setting each sensor to be equivalent to a node, wherein the plurality of nodes form the wireless sensor network, the node comprises a plurality of sink nodes and a plurality of source nodes, and the sink nodes comprise a master sink node and a slave sink node;
step S23, clustering the plurality of nodes to obtain a plurality of clusters, wherein each cluster comprises a sink node and a plurality of source nodes, and in each cluster, the sink nodes are provided with the same number of phase IDs, and the same number of source nodes with the same hop count are equal;
step S24, collecting source node data in each cluster by a master sink node in each cluster, collecting the source node data in each cluster by the slave sink node in each cluster, and uploading the data to the master sink node;
step S25, the master sink node maintains the time synchronization of the wireless sensor network and adjusts the load balance and the connectivity balance of the nodes in the cluster according to the source node data uploaded by the slave sink node and the source node data in the cluster collected by the master sink node to generate synchronization control information.
In the step, when all sink nodes are placed at the same physical position, the hop numbers from the source node to each sink node are equal. When the load balance adjustment is carried out on the nodes in the cluster, the sink node calculates the average value of the source node quantity of each hop in the whole network, compares and adjusts the average value with the source node quantity of the same hop number in each cluster network, thereby realizing the basically consistent source node quantity of the corresponding hop number in each cluster network and balancing the network communication load among different clusters.
The load balancing adjustment steps are as follows:
in step S251, the master sink node counts the source node distribution table (NodeID Distribution Table, NDT) in the startup phase.
The information counted by the source node distribution table comprises a Channel where the source node is located, a node ID, the hop count HopToSink from the node to the aggregation node of the cluster, a phase ID of the node and the state of the node, namely whether the node is a lost node or not. When the cluster, phase ID and node state of the node in the network change, the information of the node distribution table is updated.
Step S252, the main sink node counts the number of source nodes under each hop count of each cluster as follows:
Wherein:
i, an ith cluster network;
k, counting the current hop count value;
L i,k h in ith cluster j Number of source nodes at=k;
j is the j source node;
n is the number of endogenous nodes in the ith cluster;
h j the hop count from the jth source node to the sink node;
f(i,j,h j ) The count value of the jth source node of the ith cluster when the hop value is k.
In step S253, the main sink node counts the average number of source nodes with the same hop count from all nodes to the sink node, and the specific formula is as follows:
wherein:
the average number of source nodes for the number of hops h=k in all clusters;
i, an ith cluster network;
m is the number of clusters;
L i,k number of source nodes when the number of hops in the ith cluster h=k.
Step S254, the master sink node calculates the imbalance of the load balancing under each hop:
wherein:
D k imbalance in the kth hop.
Step S255, the master sink node finds the maximum value of the unbalance degrees, namely the maximum unbalance degree D max . If the maximum unbalance degree D max Greater than a set degree of load imbalance D, i.e. D max And if the number of the hops is larger than D, indicating that the load corresponding to the hops is unbalanced, otherwise, indicating that the load is balanced.
In step S256, the master sink node adjusts the hop count of the unbalanced load.
The specific adjustment scheme is as follows:
i. traversing the source node distribution table to find D max Corresponding hop countThe cluster M with the largest number of lower nodes and the cluster N with the smallest number of nodes are recorded, and the number of hops in the cluster M and the cluster N is +.>Is a node ID list of (a);
ii. Finding the hop count value with the least number of nodes in the cluster M
iii, random number of hopsSelecting a node a from a list of node IDs corresponding to the cluster M, and randomly selecting a hop count value in the same way>Selecting a node b from a node ID list corresponding to the cluster N;
and iv, exchanging the channel and phase IDs of the nodes a and b to realize adjustment of load balance. And updating the channel and phase ID information of the nodes a and b in the source node distribution table.
In a wireless sensor network, a connectivity balance criterion and a load balance criterion between nodes are interdependent, so that the link quality of the whole network is guaranteed together. The connection degree equalization ensures that nodes in a cluster are relatively uniformly linked, and the phenomenon that the nodes in the same cluster fail in communication due to excessive dispersion is avoided.
In the initial phase of the network, a situation may occur that one or more source nodes cannot communicate with the sink node, and such nodes become lost (lost) nodes. For lost nodes, adjustment of connectivity balance is required. The method comprises the following steps: each node records the received signal strength (Received Signal Strength Indicator, RSSI) value of its neighbor node, i.e., the one-hop neighbor node, when it receives the signal when it initiates the flooding as an initiator. After the RSSI value is collected by the sink node of each cluster, the node with the largest RSSI in the neighbor nodes of the lost node and the node with the largest number of neighbor nodes in the cluster where the RSSI maximum node is located are found out. The RSSI value with larger value indicates that the probability of successfully receiving the data packet by the node is large, and the number of neighbor nodes is large, which indicates that the nodes are densely distributed at the position where the node is located. The cluster in which the lost node is turned is the cluster in which the node with the largest RSSI is located, and the node with the largest number of neighbors in the cluster is turned to the cluster in which the lost node is located, so that the load balance of the cluster is maintained while the connectivity balance is considered.
In the step S25, when the connectivity balance adjustment is performed on the nodes in the cluster, the method includes the following steps:
step S257, the packet loss rate implies node connectivity;
by adopting a communication mechanism of TDMA, each node is set to be distributed with a phase ID, and the phase IDs of the nodes in the same cluster are different from each other, so that the cluster number and the phase ID can be used for uniquely determining one node ID.
And the sink node records the phase ID of the source node of the lost data packet in the cluster and then gathers the phase ID to the main sink node. The master sink node makes a decision, decides which lost node to adjust in the period according to the cluster number, the phase ID and the HopToSink, and marks the node as newlost.
Step S258, realizing information interaction through network flooding based on constructive interference;
and the master sink node generates a synchronous control message after making a decision, and the message is sent to the nodes of the whole network through constructive interference network flooding.
Each node receives the synchronous control message sent by the main sink node, thereby obtaining the synchronous control instruction of the main sink node. The node newlost to be regulated correspondingly obtains the synchronous control instruction of the main sink node, and initiates a constructive interference network flooding in a lost-phase period corresponding to the public channel.
Step S259, obtaining the hop count hoptosnk from each source node to the sink node, and setting each source node as a neighbor, i.e. a one-hop receiver, and receiving the signal strength when the neighbor is used as an initiator to initiate flooding.
And the newlost node initiates the flooding broadcast at the set lost-phase. When the node receives the flooding message, the following judgment is performed:
i. whether the cluster Clustersource where the node is located is the same as the cluster Clusternewload where the newload node is located;
ii. The node is a neighbor node which is not a newlost node, namely whether the hop count value HopToNl from the newlost node to the node is 1;
and iii, whether the node is a neighbor node of the newlost node close to the sink node direction, namely whether the hop count HopToSinkSource (+1) of the node is equal to the hop count HopToSinknewlost of the newlost node.
Only when the above three conditions are fully satisfied, i.e., equation (5) is satisfied, it is indicated that the newlost node qualifies to opt-in to the cluster in which the source node is located. And the source node sets a source node data packet according to the judging result and informs the sink node. The formula (5) is as follows:
step S260, after receiving the flooding initiated by each source node of the cluster as an initiator, the sink node finds out the maximum value CMaxRssi of the received newlost node transmission signal strength RSSI in the cluster and the corresponding node ID value CMaxRssiID based on the received information; in addition, in the cluster where the CMaxRssiID is located, the node ID value cmaxconclid containing the maximum number of neighbor nodes CMaxN is searched.
Step S261, the master sink node compares the CMaxRssi values of each cluster, and finds out the node ID corresponding to the maximum RSSI value MaxRssi: the MaxRssiID is found out, and the node ID with the most neighbor nodes in the cluster where the MaxRssiID is located is found out: maxconcdd. The cluster where the node MaxRssiID is located is the cluster where the newlost node needs to turn. Meanwhile, if the node ID of the cluster is MaxConcID, the cluster where the newlost node is located is required to be turned to.
Step S262, the master sink node searches the source node information table, and exchanges the channel and phase ID of the newlost node with the channel and phase ID of the maxconc ID node, thereby completing adjustment of connectivity balance. And updating the corresponding information in the node information table.
On the basis of data acquisition based on the principle of constructive interference and the principle of clustering, when the wireless sensor network is operated for data acquisition, the wireless sensor network is divided into a starting stage and a clustering data collection stage, which are respectively shown in fig. 10 and 11.
In the starting stage: and acquiring the network node information, creating a source node distribution table, and maintaining time synchronization of the wireless sensor network.
Specifically, one cycle length Tperiod in the startup phase is set to 2 seconds, which includes two periods: a synchronization control period (sync-phase) and a network synchronization status acknowledgement period.
In the synchronous control period, all nodes work in a common channel 0, and the master sink node initiates flooding. The network synchronization status acknowledgement period consists of a plurality of statistical periods (stats.—phase), all nodes operating on common channel 1.
In the network synchronization state confirmation process, the master sink node confirms that all nodes have been successfully added into the network. The operation schematic diagram of the starting stage is shown in fig. 12, and the main sink node and the nodes A1 to An belong to a cluster a; belonging to cluster B from sink node B, node B1 to Bn; the slave sink node C, nodes C1 to Cn, belong to cluster C.
In the initialization, source nodes in the network are evenly distributed into each cluster according to the number of sink nodes. Each cluster is allocated an independent channel for data collection, each node is allocated a phase ID, and a lost-phase is reserved. The master sink node creates a node distribution table according to the cluster number and the phase ID of each node.
The master sink node initiates constructive interference network flooding and performs time synchronization on all nodes in the network.
The node judges whether the synchronization is finished or not, if the synchronization is finished, the node enters a network synchronization state confirmation stage, and the master sink node is informed of the number of hops from the node to the sink HopToSink in the distributed stats. Otherwise, returning to the step (2), and waiting for the master sink node to synchronize.
And the master sink node judges whether the network completes the starting process or not according to the data packet sent by the source node, namely whether all nodes complete time synchronization or not. If yes, go to step (5), otherwise go back to step (2).
All nodes in the network complete the starting process and complete the time synchronization.
In the clustering data collection stage:
referring to fig. 12 again, the master sink node initiates constructive interference network flooding in the synchronization control period, and broadcasts synchronization control. The slave sink node and the source node participate in the flooding as receivers. After the synchronous control message is received, the source node adjusts the channel and the data-phase of the data collection stage according to the received synchronous control message. Judging whether a newlost node exists in the network from the sink node and the source node:
a. source node: and judging whether a newlost node exists in the network. If a newlost node exists, whether the newlost node is the newlost node or not is further judged, if the newlost node is the newlost node, the newlost node is used as an initiator of constructive interference to enter a lost-phase, and if the newlost node is used as a receiver to enter the lost-phase. If no newlost node exists, entering a data-phase, and skipping the step (7) to directly execute the step (8).
b. Sink node: it is determined whether there is a newlost node. If a newlost node exists, the receiver enters a lost-phase. If the lost node does not exist, entering a data-phase, and skipping the step (7) to directly execute the step (8).
In lost-phase, a newlost node creates a flooding message and broadcasts as an initiator of constructive interference. The non-newlost node then receives and forwards the message as a recipient of constructive interference.
In the data-phase, the source node is switched into an allocated channel, and according to the allocated phase ID, flooding is initiated in the corresponding data-phase. And the sink nodes of each cluster receive and finish reading the content of the source data packet.
And (3) judging whether the data-phase is ended or not by all the nodes, if so, switching the sink node into the slave-phase, waiting for the source node to enter the sync-phase, and otherwise, returning to the step (8).
And entering a slave-phase, switching the sink node into a common channel, and generating a decision control message according to the data receiving condition of the cluster. And the slave sink nodes alternately initiate constructive interference network flooding according to the allocated phase IDs, and upload decision control information of the cluster to the master sink node.
The sink node judges whether slave-phase is finished or not, if not, the step (10) is returned to; otherwise, the process proceeds to step (12).
The slave sink node waits to transfer to the sync-phase, and the master sink node judges and adjusts the load balancing and the connectivity balancing according to the decision control message uploaded by the slave sink node. When the load unbalance and the connectivity unbalance exist at the same time, the connectivity balance adjustment is preferentially performed, and the load balance adjustment is performed after the connectivity balance. According to the rule, all the decision control messages are analyzed to obtain synchronous control messages.
All nodes enter sync.—phase, step (6) is performed.
As further verification of the embodiment, experiments prove that the invention combines Contiki operation system protocol software to simulate and experimentally verify in a Cooja simulation environment based on a TelosB node platform formed by an MSP430F1611 singlechip and a CC2420 wireless communication chip, and obtains the experimental effects of low power consumption, high throughput and high reliability, which are required to be applied to a node dense distribution scene, with high throughput and high reliability.
Compared with the prior art, the clustering method based on the constructive interference, the flooding data and the measurement method based on the load balancing and the connectivity balancing is used for clustering, is applied to application scenes with a plurality of nodes and dense distribution, realizes data flooding collection, obtains the data collection effects of low power consumption, high throughput, good instantaneity and high reliability, and is widely applied to application scenes such as data center monitoring and tunnel monitoring.
The invention also provides a data acquisition system corresponding to the data acquisition system of the wireless sensor network based on the data acquisition method of the wireless sensor network based on the constructive interference clustering, wherein the data acquisition system of the wireless sensor network comprises a plurality of wireless sensors, a plurality of independent channels and a plurality of phase IDs.
Each wireless sensor corresponds to a node, and the wireless sensor network data acquisition system comprises a plurality of nodes which are connected into a network, wherein each node comprises a master sink node, a plurality of slave sink nodes and a source node. Each node is assigned a phase ID.
The plurality of nodes are correspondingly divided into a plurality of clusters, each cluster comprises an aggregation node, each cluster corresponds to an independent channel, and the independent channels are correspondingly used for transmitting data.
In the synchronous control period, constructive interference network flooding is initiated to the master sink node, synchronous control is broadcasted, and the slave sink node and the source node participate in the flooding;
during a data collection period, data are collected based on clustering, and each node transfers to a set channel for data transmission according to own clusters;
and during the control data fusion period, the slave sink node floods relevant control data information to the master sink node in the respective slave-phase period. The master sink node fuses the information of each slave sink node, judges the load balance and the connectivity balance, and generates corresponding synchronous control message data packets, thereby realizing the load balance and the connectivity balance.
In the wireless sensor network data collection system based on constructive interference clustering, when time synchronization of the whole network is completed, information of all network nodes is acquired, a source node distribution table is correspondingly established, and clustering is adjusted based on the statistical result of the source node distribution table of data collection, so that the network clustering is a dynamic process.
The foregoing description is only illustrative of the present invention and is not intended to limit the scope of the invention, and all equivalent structures or equivalent processes or direct or indirect application in other related technical fields are included in the scope of the present invention.