WO2022121234A1 - Data transmission method and device, storage medium and electronic device - Google Patents
Data transmission method and device, storage medium and electronic device Download PDFInfo
- Publication number
- WO2022121234A1 WO2022121234A1 PCT/CN2021/093928 CN2021093928W WO2022121234A1 WO 2022121234 A1 WO2022121234 A1 WO 2022121234A1 CN 2021093928 W CN2021093928 W CN 2021093928W WO 2022121234 A1 WO2022121234 A1 WO 2022121234A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- node
- nodes
- target
- attribute
- sensor network
- Prior art date
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 68
- 238000000034 method Methods 0.000 title claims abstract description 67
- 241000854291 Dianthus carthusianorum Species 0.000 claims description 132
- 238000012545 processing Methods 0.000 claims description 23
- 230000015654 memory Effects 0.000 claims description 18
- 238000004590 computer program Methods 0.000 claims description 7
- 239000011159 matrix material Substances 0.000 description 25
- 238000013480 data collection Methods 0.000 description 20
- 238000005259 measurement Methods 0.000 description 19
- KRTSDMXIXPKRQR-AATRIKPKSA-N monocrotophos Chemical compound CNC(=O)\C=C(/C)OP(=O)(OC)OC KRTSDMXIXPKRQR-AATRIKPKSA-N 0.000 description 15
- 238000010586 diagram Methods 0.000 description 12
- 238000004891 communication Methods 0.000 description 6
- 238000010276 construction Methods 0.000 description 6
- 238000005265 energy consumption Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 6
- 230000008447 perception Effects 0.000 description 5
- 238000012986 modification Methods 0.000 description 4
- 230000004048 modification Effects 0.000 description 4
- 235000008694 Humulus lupulus Nutrition 0.000 description 3
- 238000004422 calculation algorithm Methods 0.000 description 3
- 238000009792 diffusion process Methods 0.000 description 3
- 238000001914 filtration Methods 0.000 description 3
- 230000002035 prolonged effect Effects 0.000 description 3
- 238000012216 screening Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 238000010187 selection method Methods 0.000 description 1
- 238000004904 shortening Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W40/00—Communication routing or communication path finding
- H04W40/02—Communication route or path selection, e.g. power-based or shortest path routing
- H04W40/04—Communication route or path selection, e.g. power-based or shortest path routing based on wireless node resources
- H04W40/10—Communication route or path selection, e.g. power-based or shortest path routing based on wireless node resources based on available power or energy
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W40/00—Communication routing or communication path finding
- H04W40/24—Connectivity information management, e.g. connectivity discovery or connectivity update
- H04W40/248—Connectivity information update
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W40/00—Communication routing or communication path finding
- H04W40/24—Connectivity information management, e.g. connectivity discovery or connectivity update
- H04W40/32—Connectivity information management, e.g. connectivity discovery or connectivity update for defining a routing cluster membership
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/30—Services specially adapted for particular environments, situations or purposes
- H04W4/38—Services specially adapted for particular environments, situations or purposes for collecting sensor information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W84/00—Network topologies
- H04W84/18—Self-organising networks, e.g. ad-hoc networks or sensor networks
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Definitions
- the present invention relates to the technical field of wireless communication, and in particular, to a data transmission method and device, a storage medium and an electronic device.
- the wireless sensor network is clustered, and the cluster member nodes send the data to be transmitted to the corresponding cluster head node, and the cluster head node sends the data to the base station communicating with the wireless sensor network.
- the clusters divided by the wireless sensor network are fixed, and the cluster head node is also fixed, when the cluster head node directly sends data to the base station, the cluster head node consumes more energy, thus shortening the cluster head.
- the transmission lifetime (aka usage time) of the node is the transmission lifetime of the node.
- Embodiments of the present invention provide a data transmission method and device, a storage medium, and an electronic device to at least solve the technical problem in the related art that nodes consume more energy during data transmission in a sensor network.
- a data transmission method comprising: determining a maximum independent set in a target sensor network, wherein the maximum independent set is formed by two non-adjacent sets of the target sensor network.
- a set of nodes, each node in the target sensor network corresponds to a sensor one-to-one; determine a target node set in a first node set in the target sensor network, wherein the first node set is composed of all A set of nodes in the target sensor network that do not belong to the maximum independent set, each target node in the target node set conforms to a preset condition, and the preset condition is used to indicate that a target node is in the maximum independent set.
- each node in the maximum independent set and the target node set is determined as a node in the connected dominating set corresponding to the target sensor network, and the connected dominating set is obtained, wherein, Any two nodes in the connected domination set can communicate with each other; according to the connected domination set, the nodes in the target sensor network are clustered to obtain multiple clusters in the target sensor network, wherein, Each node in the connected domination set is a cluster head node of one of the multiple clusters; through the nodes in the connected domination set, the cluster member nodes in at least one of the multiple clusters send the The data is relayed to the base station.
- a data transmission apparatus comprising: a processing module configured to determine a maximum independent set in a target sensor network, wherein the maximum independent set is determined by the target sensor network A set composed of two non-adjacent nodes, each node in the target sensor network corresponds to a sensor one-to-one; the processing module is further configured to determine the target in the first node set in the target sensor network A node set, wherein the first node set is a set composed of nodes in the target sensor network that do not belong to the maximum independent set, and each target node in the target node set meets a preset condition, so The preset condition is used to indicate that a target node has two neighbor nodes in the maximum independent set; the processing module is also configured to determine the maximum independent set and each node in the target node set as the maximum independent set.
- the processing module is further configured to Dominant set, cluster the nodes in the target sensor network to obtain a plurality of clusters in the target sensor network, wherein each node in the connected domination set is a cluster of one of the plurality of clusters A cluster head node;
- a transmission module configured to relay the data sent by the cluster member nodes in at least one of the multiple clusters to the base station through the nodes in the connectivity control set.
- the maximum independent set in the target sensor network is determined, wherein the maximum independent set is a set composed of nodes in the target sensor network that are not adjacent to each other, each of the target sensor network One-to-one correspondence between nodes and sensors; determining a target node set in a first node set in the target sensor network, wherein the first node set is composed of nodes in the target sensor network that do not belong to the maximum independent set
- Each target node in the target node set conforms to a preset condition, and the preset condition is used to indicate that a target node has two neighbor nodes in the maximum independent set;
- the maximum independent set And each node in the target node set is determined as a node in the connected domination set corresponding to the target sensor network, and the connected domination set is obtained, wherein any two nodes in the connected domination set can communicate with each other.
- the connected domination set cluster the nodes in the target sensor network to obtain a plurality of clusters in the target sensor network, wherein each node in the connected domination set is the plurality of clusters A cluster head node of one of the clusters; through the nodes in the connectivity control set, the data sent by the cluster member nodes in at least one of the multiple clusters is forwarded to the base station. Therefore, in the related art, the technical problem that the nodes consume more energy during data transmission in the sensor network can be solved, the energy consumption of the nodes in the sensor network is reduced, and the lifespan of the nodes is prolonged.
- FIG. 1 is a flowchart of a data transmission method according to an embodiment of the present invention.
- FIG. 2 is a schematic diagram of a node attribute according to an embodiment of the present invention.
- FIG. 3 is a schematic diagram of an initial state of a target sensor network according to an embodiment of the present invention.
- FIG. 4 is a schematic diagram of a maximum independent set in a target sensor network according to an embodiment of the present invention.
- FIG. 5 is a schematic diagram of a connected dominating set in a target sensor network according to an embodiment of the present invention.
- FIG. 6 is a schematic diagram of a target sensor network clustering according to an embodiment of the present invention.
- FIG. 7 is a structural block diagram of a data transmission apparatus according to an embodiment of the present invention.
- FIG. 8 is a schematic structural diagram of an optional electronic device according to an embodiment of the present invention.
- Compressive Sensing Sparse or compressible signals can be sampled in a way that is much lower than the standard of the Shannon-Nyquist sampling theorem, and it can still achieve sparse or compressible data. Accurate reconstruction of compressible signals. The following linear formula models are involved:
- y ⁇ Rm is the measurement vector
- x ⁇ Rn is the original data vector
- a ⁇ Rm ⁇ n is the perception matrix
- m, n are integers.
- the perception matrix A is usually a Gaussian random matrix, that is, each item in A is independently sampled from a Gaussian distribution N(0,1/m), where N is an integer.
- N is an integer.
- the k-sparse vector x can be changed from Calculated in , where a ji is the (j, i)-th element in A (that is, the element in the j-th row and the i-th column), and i and j are integers.
- a given number of measurement values can be effectively collected from the sensor nodes, and a sufficient amount of measurement data can be collected at the collection point (including but not limited to the base station), and the original data can be reliably recovered. vector.
- the distance between nodes v i and v j is denoted as
- the slots are of equal duration, and a node can transmit a unit-sized data packet in each slot.
- PrIM protocol interference model
- Connected dominating set that is, all nodes on the backbone of the dominating set are connected to each other, and any two nodes can communicate with each other.
- a layered and diffused selection method is used to select the dominant node, and specifically starting from the sink node, the dominant node is obtained by filtering down layer by layer until the entire wireless sensor network is traversed, so as to obtain the A set of dominating nodes is a connected dominating set.
- FIG. 1 is a flowchart of a data transmission method according to an embodiment of the present invention.
- the method includes: step S102 , determining the maximum independent set in the target sensor network , wherein the maximum independent set is a set composed of nodes in the target sensor network that are not adjacent to each other, and each node in the target sensor network corresponds to a sensor one-to-one; step S104, determine the A target node set in the first node set in the target sensor network, wherein the first node set is a set composed of nodes in the target sensor network that do not belong to the maximum independent set, and the target node set is Each target node of the target node meets a preset condition, and the preset condition is used to indicate that a target node has two neighbor nodes in the maximum independent set; Step S106, put the maximum independent set and the target node set in the maximum independent set.
- Each node in the target sensor network is determined as a node in the connected domination set corresponding to the target sensor network, and the connected domination set is obtained, wherein any two nodes in the connected domination set can communicate with each other;
- Step S108 according to the the connected dominating set, clustering the nodes in the target sensor network to obtain a plurality of clusters in the target sensor network, wherein each node in the connected dominating set is one of the plurality of clusters
- the cluster head node of the cluster in step S110, the data sent by the cluster member nodes in at least one of the multiple clusters is forwarded to the base station through the nodes in the connectivity control set.
- the maximum independent set in the target sensor network is determined, wherein the maximum independent set is a set composed of nodes in the target sensor network that are not adjacent to each other, each of the target sensor network One-to-one correspondence between nodes and sensors; determining a target node set in a first node set in the target sensor network, wherein the first node set is composed of nodes in the target sensor network that do not belong to the maximum independent set
- Each target node in the target node set conforms to a preset condition, and the preset condition is used to indicate that a target node has two neighbor nodes in the maximum independent set;
- the maximum independent set And each node in the target node set is determined as a node in the connected domination set corresponding to the target sensor network, and the connected domination set is obtained, wherein any two nodes in the connected domination set can communicate with each other.
- the connected domination set cluster the nodes in the target sensor network to obtain a plurality of clusters in the target sensor network, wherein each node in the connected domination set is the plurality of clusters A cluster head node of one of the clusters; through the nodes in the connectivity control set, the data sent by the cluster member nodes in at least one of the multiple clusters is forwarded to the base station. Therefore, in the related art, the technical problem that the nodes consume more energy during data transmission in the sensor network can be solved, the energy consumption of the nodes in the sensor network is reduced, and the lifespan of the nodes is prolonged.
- the method before the determining of the maximum independent set in the target sensor network, includes: setting the node attributes of all nodes in the target sensor network to be empty; wherein, the determining of the maximum independent set in the target sensor network
- the maximum independent set includes: updating the node attribute of the sink node in the target sensor network to the first attribute, and according to the node attribute of each node sh in the target sensor network except the sink node and
- the notification message received by the node sh from the neighbor nodes of the node sh updates the node attribute of the node sh, so as to update the node attributes of all nodes in the target sensor network to the target attribute , where h ⁇ [1, n′], n′ is the number of nodes in the target sensor network other than the sink node, and the notification message carries the attribute of the node sending the notification message
- the target attribute includes the first attribute and the second attribute, each node with the first attribute is determined as a node in the maximum independent set, and each node with the second attribute is determined is a no
- the node attribute of each node sh in the target sensor network except the sink node updating the node attributes of the node sh , so as to update the node attributes of all nodes in the target sensor network to one of the target attributes, including: the node attribute of the node sh is empty, and If the notification messages are all messages carrying the first attribute, update the node attribute of the node sh to the second attribute; when the node attribute of the node sh is empty and In the case that the notification messages are all messages carrying the second attribute, the node attribute of the node sh is updated to the third attribute, wherein each node with the third attribute is determined is a candidate node of the maximum independent centralized node; the node attribute of the node sh is empty, and the notification message includes a message carrying the first attribute and a message carrying the second attribute In the case of the message of the node sh , the node attribute of the node sh is updated to the second attribute.
- the method further includes: determining a second node set from all candidate nodes having the third attribute, wherein all The second node set includes the node sh , and all the nodes in the second node set have the same level identifier, and all the nodes in the second node set form a connected path, and the level identifier uses In order to indicate the node level at which the node with the level identifier is located in the target sensor network, the number of nodes in the second node set is greater than 1; the first node with the largest remaining energy in the second node set is The node attribute of the node is updated to the first attribute.
- all the nodes in the second node set form a connected path, that is, there is no isolated node in the second node set, wherein the isolated node is a node that does not have a direct connection relationship with any node in the second node set .
- the level identifier of the node is used to indicate the level where the node is located in the target sensor network, and different level identifiers are used to represent different layers, that is, the target sensor network is identified by the level identifier. All nodes in are layered. For example, a level ID of 1 indicates that a node is at level 1 in the target sensor network, and a node with level ID 1 is at a level above the node with level ID 2.
- the method further includes: sending the second node to the second node through the first node.
- the second node in the node set sends a notification message, wherein the second node is a neighbor node of the first node, and the notification message sent by the first node carries the information of the first node.
- the node attribute of each node other than the node is updated to the first attribute or the second attribute, wherein the current node is initialized as the second node: the node attribute at the current node is the third attribute attribute, and the node attribute carried in the notification message received by the current node is the first attribute, update the node attribute of the current node to the second attribute; When the node attribute is the third attribute and the node attribute carried in the notification message received by the current node is the second attribute, update the node attribute of the current node to the first attribute , wherein the notification message received by the current node is sent to the current node by the neighbor node of the current node in the second node set; After the update, a notification message is sent by the current node to the neighbor nodes of the current node in the second node set, wherein the notification message sent by the
- the node sh in the case where there is no neighbor node of the node sh in all the candidate nodes with the third attribute, update the node attribute of the node sh to the first attribute, and pass the The node sh sends a notification message to the neighbor node of the node sh , wherein the notification message sent by the node sh carries the level identifier of the node sh and the information of the node sh .
- Node properties in the case where there is no neighbor node of the node sh in all the candidate nodes, the node sh is not directly connected to any node in the candidate nodes, that is, the node sh is an isolated node whose node attribute is the third attribute. , so the node attribute of node sh is directly updated to the first attribute, so that node sh becomes a node in the maximum independent set.
- the determining the target node set in the first node set in the target sensor network includes: after updating the node attributes of all nodes in the target sensor network to the target attribute, adding the first node attribute to the target sensor network.
- the set composed of all nodes with two attributes is determined as the first node set;
- the third node set composed of target nodes in the first node set that meet the preset conditions is determined, wherein the preset conditions include the following One: the hierarchical identification of one of the two neighbor nodes of the one target node is greater than the hierarchical identification of the one target node, and the hierarchical identification of the other node of the two neighbor nodes is smaller than the The hierarchical identification of a target node;
- the hierarchical identification of one of the two neighbor nodes of the one target node is equal to the hierarchical identification of the one target node, and the hierarchical identification of the other node of the two neighbor nodes
- the identifier is greater than the hierarchy identifier of the one target node; the
- the determining the target node set from the third node set includes: in the case that there are multiple nodes with the same level identifier in the third node set, determining that the multiple nodes have the same level identifier.
- clustering the nodes in the target sensor network to obtain a plurality of clusters in the target sensor network comprising: sending each cluster head node to each cluster head node.
- Each neighbor node of the cluster head node broadcasts a target packet, wherein the target packet carries the node identifier of the cluster head node sending the target packet and the rest of the cluster head node sending the target packet Energy information; for each node Cq in the fourth node set, according to all target packets received by the node Cq, determine the cluster head node to which the node Cq belongs, wherein the cluster head to which the node Cq belongs
- the node is the cluster head node with the largest residual energy among the neighbor nodes of the node Cq, the q ⁇ [1, m'], the m' is the number of nodes in the fourth node set, the The four-node set is a set composed of all nodes in the target sensor network except the cluster head node; a request message is sent through the node
- transferring the data sent by the cluster member nodes in at least one of the multiple clusters to the base station through the nodes in the connectivity dominance set includes: sending data to at least one cluster in the at least one cluster.
- the data sent by the member node performs the following operations until the neighbor node of the current cluster head node is the base station, wherein the current cluster head node is initialized as the cluster head node to which the at least one cluster member node belongs: through the current cluster head node
- the node receives the data sent by the cluster member node of the cluster where the current cluster head node is located; the current cluster head node pairs the data received from the cluster member node of the cluster where the current cluster head node is located and the current cluster head node.
- the solutions in the related art are basically performed under the assumption that the perception matrix is a dense matrix (each element in the matrix is a non-zero element), but in fact the perception matrix is executed.
- the matrix can also be a sparse matrix (most elements in the matrix are zero elements), and the compressed sensing data collection method based on sparse matrix can further improve the data collection efficiency;
- each node in the network needs to send data; third, each cluster head node in the transmission backbone will merge The data is directly sent to the base station, resulting in a large and unnecessary consumption of the energy generated when the dominant node far from the base station transmits the data directly to the base station.
- a compressed data collection method is provided that combines the connected dominating set and the compressed data collection. Through the embodiments of the present invention, the energy consumption of nodes during data collection is saved, and the compressed sensing of sparse random matrix is used to improve the data collection efficiency of the wireless sensor network, and at the same time, the data collection efficiency of the wireless sensor network based on the pipeline technology is realized. data collection.
- a reasonable connected dominating set is established to constitute the transmission backbone of the data transmission, and thus each reasonably distributed cluster is formed through a reasonable clustering algorithm.
- a hierarchical diffusion method is used to select the dominant node, specifically starting from the sink node, and filtering down layer by layer until the entire wireless sensor network is traversed; and in the sparse matrix-based compressed sensing data collection method, Only the nodes that need to send data participate in the collection of measurement values, so energy can be saved and data collection delay can be shortened; in addition, each cluster head node in the transmission backbone no longer sends the merged data directly to the base station, but adopts hierarchical transmission. In this way, the large and unnecessary consumption of energy generated when the dominant node far away from the base station transmits data directly to the base station can be avoided.
- a data collection method that is, a data transmission method based on a hierarchical diffusion connected dominating set, including the following steps:
- Step 2 the maximum independent set construction process:
- a hierarchical diffusion type maximum independent set is constructed first, and then a connected dominating set is determined based on the maximum independent set.
- the sink node sends a notification message to start the construction process of the largest independent set, and other nodes determine their own node attributes through the content carried in the received notification message, and continue to send notification messages to their respective neighbor nodes to determine the next The node attributes of the layer nodes, until all nodes are screened, the construction process of the largest independent set is completed;
- the node attributes of all nodes are the target attributes, that is, after the screening is completed, the node attributes of all nodes are Both are one of the following attributes: first attribute, second attribute.
- nodes with different node attributes are represented by different icons, wherein a node with an empty node attribute is also called a white node, a node with the first attribute is also called a black node, and the node with the first attribute is also called a black node.
- the node with the second attribute is also called the gray node, and the node with the third attribute is also called the green node; when the node whose node attribute is the second attribute meets the preset conditions, the node attribute of the node is updated to the fourth attribute, and the node become the target node, and the node attribute of the target node is finally updated to the first attribute, and the node with the fourth attribute is also called the blue node.
- Step 3 Connected domination set construction process: each gray node finds out whether there are more than two black nodes in its neighbor nodes, and filters some gray nodes to become connected nodes and the original black nodes through the conditional filter to form the final connected domination. set.
- Step 4 The process of forming a cluster according to the connected dominating set: all the gray nodes become the cluster member nodes in the cluster with the black node as the cluster head node by finding the black node with the highest residual energy in their respective neighbor nodes; among them, When all gray nodes have determined the cluster to which they belong, the clustering process is completed.
- Step 5 data transmission initialization phase: all sensor nodes in the target sensor network that are located in the connected dominating set generate a uniform sparse random matrix (ie, the perception matrix A ⁇ Rm ⁇ n ), in which the sensor nodes can collect the measured values.
- the process ie, the data transmission process calculates the data to be transmitted according to the random matrix.
- Step 6 data transmission process: the cluster member nodes first transmit the data to be transmitted to their respective cluster head nodes, and each cluster head node then converts the data into multiple data sample points and transmits it layer by layer to the next layer through the compressed data collection method. , and finally transmitted to the base station.
- the pipeline technology is also adopted in the process of data sample point transmission between cluster head nodes, and the next round of transmission has already started before the previous round of data sample point transmission has ended.
- Step 7 Extraction of original data in the network: After the base station has collected enough measurement values, it recovers the original data of each sensor according to the data recovery algorithm.
- Step 1.1 the initial color of all nodes is white (wherein, the color of the node is the node attribute of the node, that is, the node attribute of all nodes is set to be empty), after the implementation of this embodiment is completed.
- all nodes are finally transformed into black nodes or gray nodes.
- Black indicates that the node is selected to join the maximum independent set as the cluster head node; green indicates that the node is in an active state; gray indicates that the cluster member node that has not joined the maximum independent set; blue indicates that the gray node is selected as the connecting node (that is, the target node).
- Step 1.2 Each node broadcasts a first message (for example, Msg_Build message), which carries the respective node identifiers (including but not limited to node identifiers (for example, node IDs)) and numbers (that is, the hierarchical identifiers in the above-mentioned embodiments) of the nodes. ); by receiving the Msg_Build message sent by other nodes, each node can construct its own neighbor node information table.
- the neighbor node information table is a z ⁇ 4 two-dimensional array, where z is the number of neighbor nodes around each, the first column is the number of the neighbor node, and the second column is the color of the neighbor node (the initial color of each node). are all white), the third column is the number of black nodes around the neighbor node (the initial value of this column is zero), and the fourth column is the remaining energy of each neighbor node.
- Step 2 includes the following steps: Step 2.1: Update the node attribute of the sink node to the first attribute, that is, the sink node first marks itself as black, and sends a second packet (for example, a Msg_Deliver packet), Msg_Deliver
- the sink node sends a third message (for example, a Msg_Dominator message, or a sink message) at the same time, and starts the process of constructing a maximum independent set (Maximum Independent Set, MIS for short).
- each node finally completes its own number according to the setting of the number of hops away from the sink node.
- Step 2.3 The white node that receives the Msg_Dominator message sent by the sink node sets the sink node as the parent node, and marks the node color as black in its neighbor node information table, and marks itself as a gray node, and sends the first node. Five messages (eg Msg_Dominatee message).
- Step 2.4 If other white nodes receive the Msg_Dominatee message sent by the neighbor node, they will mark themselves as green (green corresponds to the third attribute in the above embodiment), enter the active state at the same time, and send the sixth message (for example, Msg_Active). message).
- the message carries the information about the number of surrounding white neighbor nodes and its remaining energy; if the white node receives both the Msg_Dominator message and the Msg_Dominatee message, the Msg_Dominator message has a higher priority, and the white node has a higher priority.
- a green node If a green node has the largest remaining energy in its green neighbor nodes, it will mark itself as black, and send the Msg_Dominator message; if the green node receives the Msg_Dominator message sent by the neighbor node, set it as the parent node, then update the color of the node in the neighbor node table to black, mark itself as gray, and send Msg_Dominatee message, so far the node's participation in this round of election is over.
- Step 2.5 If the gray node receives the Msg_Dominator message sent by the neighbor node, the color of the node in the neighbor node table is marked as black; if the gray node receives the Msg_Dominatee message sent by the neighbor node, the node in the neighbor node table The color is marked as gray, and the round of determining the maximum independent set ends until there are no white nodes in the network.
- the notification message in the above embodiment includes the above-mentioned third message and the fifth message, wherein the third message carries the node identifier and node attribute of the node sending the third message, and may also It includes the hierarchical identifier of the node sending the third message; the fifth message carries the node identifier and node attribute of the node sending the fifth message, and may also include the hierarchical identifier of the node sending the fifth message.
- Figure 3 is a schematic diagram of the initial state of the target sensor network, in which node A is a sink node, and node A initiates the construction process of the maximum independent set.
- the construction of the maximum independent set is as follows: Node A sends a Msg_Dominator report After the message, the node ⁇ B,C,D,E ⁇ marks itself as gray and sets its own number to 2 and sends Msg_Dominatee messages to the respective neighbor nodes, and determines the parent node of the node ⁇ B,C,D,E ⁇ is the A node.
- the node ⁇ F,G,H ⁇ After receiving the Msg_Dominatee message, the node ⁇ F,G,H ⁇ marks itself as green, and sets its own number to 3, and sends the Msg_Active message to participate in the competition.
- the competition process is as follows: First, compare the nodes ⁇ F,G,H ⁇ remaining energy, and finally the F node with higher remaining energy becomes the black cluster head and sends the Msg_Dominator message. Since the nodes ⁇ F, G, H ⁇ are connected in series (that is, three nodes form a connected path) and compete at the same time, node G turns gray after receiving the Msg_Dominator message sent by F and sends the Msg_Dominatee message, and then node H receives the message.
- the black cluster head node After reaching the Msg_Dominatee message, it becomes the black cluster head node and sends the Msg_Dominator message, and finally forms multiple green nodes connected in series in the same layer and finally forms a situation where each black node is connected in series with a gray node.
- Node I receives the Msg_Dominatee message sent by node G, and becomes a new gray node after receiving the Msg_Dominator message sent by node F, and sets its own number to 4, and sends the Msg_Dominatee message.
- the parent node of node I It is node G or node F; node J becomes a black node after receiving the Msg_Dominatee message sent by node G, and sets its own number to 4, and sends a Msg_Dominator message.
- the parent node of node J is node G.
- node K receives the Msg_Dominator message sent by node H, and becomes a new gray node after receiving the Msg_Dominatee message sent by node G, and sets its own number to 4, and sends the Msg_Dominatee message.
- the father of node K The node is either a G node or an H node.
- node L After receiving the Msg_Dominator message sent by node H, node L becomes a new gray node and sets its own number to 4, and sends the Msg_Dominatee message.
- the parent node of node L is node H.
- Figure 4 shows the maximum independent set in a target sensor network formed according to the above steps, wherein the maximum independent set is a set composed of node A, node F, node H and node J, and the nodes of all nodes in the maximum independent set are Attributes are all first attributes.
- Step 3.2: The neighbor node of the sink node, that is, the first-hop node sets its own number to f after receiving the message, where f f+1 and continues to send the Msg_Deliver message to the next-hop node.
- Step 3.3 By analogy, each node completes its own number according to the setting of the number of hops away from the sink node.
- Step 3.4 Each gray node looks up whether there are more than two black nodes in its neighbor nodes and one of the following conditions is satisfied:
- the black nodes are its own previous hop node and the node with the same hop as itself, that is, the same number. ;
- the black nodes are their own next hop node and the node with the same hop number as their own respectively;
- the black nodes are their own previous hop node and next hop node respectively.
- Step 3.5 If the above conditions are met, the node will be marked as blue, and the node will send the seventh message (eg Msg_Border message). When the black node in the neighbor node receives the Msg_Border message, it will establish a connection with the blue connection of colored nodes.
- the blue node is a target node in the third node set in the above embodiment; wherein, when a blue node and a node in the maximum independent set have the same neighbor node, and the same neighbor node When the node is a node in the maximum independent set, the blue node is cancelled to be marked as blue, that is, the blue node is restored to a gray node (corresponding to restoring the node attribute of the node to the second attribute).
- Step 3.6 After all the gray nodes have gone through the above screening steps, mark all the blue nodes as black nodes, so that all the black nodes constitute a connected dominating set.
- the nodes ⁇ B, C, D, E ⁇ in the second hop are all gray nodes, and then continue to enter the next hop (that is, enter the screening of the next layer of nodes).
- the black node ⁇ F,H ⁇ numbered 3 is in this hop, and there is a gray node D in the previous hop number 2, which can connect the two nodes to the black node A numbered 1 at the same time, Therefore, node D is selected as the connecting node before entering the next hop.
- FIG. 5 is a schematic diagram of a connected dominating set in a target sensor network according to an embodiment of the present invention, wherein the connected dominating set is a set consisting of node A, node D, node F, node G, node H, and node J, and is connected to The backbone nodes in the domination set, namely node A, node D, node G, and node J, form a connected path.
- the above step 4 includes the following steps: Step 4.1: The node in the connectivity dominance set sends the message Msg_Head (that is, the target message in the above embodiment) that it becomes the cluster head node to the surrounding neighbor nodes, and in the The message adds its own remaining energy information.
- FIG. 6 is a schematic diagram of clustering a target sensor network according to an embodiment of the present invention, wherein node B, node E, and node C join the cluster where the cluster head node A is located, node I joins the cluster where the cluster head node F is located, and the node K. Node L joins the cluster where the cluster head node H is located.
- Step 6 includes the following steps: Step 6.1: First, the cluster head node determines the level to which it belongs according to the number of node hops through which data is transmitted to the base station. The cluster head node that transmits data directly to the base station after one hop is selected as the first-level cluster head node (ie, the level ID is 1), and the cluster head node that transmits data to the base station through the parent node becomes the second-level cluster head node. And so on, adding one for each additional hop level.
- the first-level cluster head node ie, the level ID is 1
- the cluster head node that transmits data to the base station through the parent node becomes the second-level cluster head node. And so on, adding one for each additional hop level.
- Step 6.2 The energy transmission between the cluster head nodes uses the compressed data collection method, and each node sends a linear combination of the original data instead of the original data itself; among them, each cluster member node sends the data to the cluster head node to which it belongs. Send the original data. After each cluster head node receives the data, it linearly combines the data with the data received by the previous hop node to obtain m data sample points and transmits them, so that the number of transmissions on any link is m . Among them, after each cluster head node receives data, it linearly combines the data with the data received by the previous hop node so that the number of transmissions on any link is m, including:
- Step 6.3 Without affecting the previous round of transmission, after a round of transmission of the cluster head node at the previous level is completed, after the transmission condition is determined by the interference radius condition, after a short standby time, it is in the next round of transmission.
- the cluster head node of the hierarchical level starts the next round of data sample point transmission, instead of starting the next round of data transmission after the entire wireless network has completed one round of data transmission. Among them, the standby time is affected by the condition of the interference radius.
- the transmission conditions are determined.
- compressed sensing theory is applied in the data collection process of the wireless network, so the original signal can be extracted from a linear combination of a smaller amount of original signals.
- each element in the sensing matrix is non-zero. Therefore, in the process of collecting measurement values by applying compressed sensing technology, it is often necessary to construct a complete spanning tree, one based on the base station. It is the root and covers the spanning tree of each node. Each node on the spanning tree needs to send its own data to the base station.
- the performance of the sparse sensing matrix used in restoring the original signal can reach the same level as the dense sensing matrix, and a sparse random matrix applied in the compressed sensing technology can be constructed through the above embodiment.
- each round requires those nodes whose weighting coefficients are not zero to send the collected measurement data to the base station.
- some nodes have a weighting coefficient of zero, they are responsible for forwarding data, so as to ensure that the base station can receive all the required data.
- the target sensor network is decomposed into different cells (clusters), and the cells are connected to each other like a chain, so it is only necessary to keep at least one node (cluster head node) in each cell active, The connectivity of the entire network can be guaranteed.
- the above embodiment also adopts the pipeline technology, that is, the next round of measurement value collection starts when the previous round of measurement value collection is not over, and the time for each cell to send data does not affect other data transmissions. As early as possible, in order to reduce the delay of data collection, while reducing the energy consumption of the entire network, the delay of data collection can also be reduced. In addition, because each node has the same probability of remaining active during each round of measurement value collection, the data collection method in the above embodiment can also ensure that the load of the entire network is also balanced.
- the following technical effects can be achieved: (1) Low energy consumption: In the above embodiment, not every sensor participates in the process of data reception and transmission during the whole process of collecting measurement values, but only the Sensors and relay sensors that contribute to the ongoing measurement participate in the reception and transmission of data. Moreover, when the sensor is not sending or receiving data, the sensor will enter a sleep state to save energy. (2) Low latency: When collecting each measurement value, only some of the nodes related to the measurement value participate in the reception and transmission of data, so the time consumed by collecting each measurement value in this way will be reduced.
- each node has the same probability of sending data to collect each round of measurement values. According to the probability correlation theory, after the entire data collection is over, the energy consumed by each node is roughly the same, and the difference is also small, so the load of each sensor is more balanced.
- a data transmission apparatus is provided, and the apparatus is configured to implement the above-mentioned embodiments and preferred implementations, and what has been described will not be repeated.
- the term "module” may be a combination of software and/or hardware that implements a predetermined function.
- the apparatus described in the following embodiments is preferably implemented in software, implementations in hardware, or a combination of software and hardware, are also possible and contemplated.
- the apparatus includes: a processing module 72 configured to determine a maximum independent set in a target sensor network, wherein the maximum independent set is generated by the target sensor A set of nodes in the network that are not adjacent to each other, each node in the target sensor network corresponds to a sensor one-to-one; the processing module 72 is further configured to determine the first node in the target sensor network The target node set in the set, wherein the first node set is a set composed of nodes in the target sensor network that do not belong to the maximum independent set, and each target node in the target node set meets the predetermined Set a condition, the preset condition is used to indicate that a target node has two neighbor nodes in the maximum independent set; the processing module 72 is further configured to set each of the maximum independent set and the target node set to Each node is determined to be a node in the connected domination set corresponding to the target sensor network, and the connected domination set is obtained, wherein any
- the maximum independent set in the target sensor network is determined, wherein the maximum independent set is a set composed of nodes in the target sensor network that are not adjacent to each other, each of the target sensor network One-to-one correspondence between nodes and sensors; determining a target node set in a first node set in the target sensor network, wherein the first node set is composed of nodes in the target sensor network that do not belong to the maximum independent set
- Each target node in the target node set conforms to a preset condition, and the preset condition is used to indicate that a target node has two neighbor nodes in the maximum independent set;
- the maximum independent set And each node in the target node set is determined as a node in the connected domination set corresponding to the target sensor network, and the connected domination set is obtained, wherein any two nodes in the connected domination set can communicate with each other.
- the connected domination set cluster the nodes in the target sensor network to obtain a plurality of clusters in the target sensor network, wherein each node in the connected domination set is the plurality of clusters A cluster head node of one of the clusters; through the nodes in the connectivity control set, the data sent by the cluster member nodes in at least one of the multiple clusters is forwarded to the base station. Therefore, in the related art, the technical problem that the nodes consume more energy during data transmission in the sensor network can be solved, the energy consumption of the nodes in the sensor network is reduced, and the lifespan of the nodes is prolonged.
- the processing module is further configured to set the node attributes of all nodes in the target sensor network to null before the determination of the maximum independent set in the target sensor network; wherein the processing module, It is also set to: update the node attribute of the sink node in the target sensor network to the first attribute, and according to the node attribute of each node sh in the target sensor network except the sink node and the The notification message received by the node sh from the neighbor nodes of the node sh updates the node attribute of the node sh, so as to update the node attributes of all nodes in the target sensor network to the target attribute, wherein , the h ⁇ [1, n′], where n′ is the number of nodes in the target sensor network other than the sink node, and the notification message carries the information that sends the notification message a node attribute of a node, the target attribute includes the first attribute and a second attribute, each node with the first attribute is determined as a node in the maximum independent set, each with the second attribute The node of is determined as
- the processing module is further configured to: in the case that the node attribute of the node sh is empty and the notification packets are all packets carrying the first attribute, the node The node attribute of sh is updated to the second attribute; when the node attribute of the node sh is empty and the notification packets are all packets carrying the second attribute, the The node attribute of the node sh is updated to a third attribute, wherein each node with the third attribute is determined as a candidate node of the maximum independent set of nodes; the node attribute of the node sh is empty, And if the notification message includes a message carrying the first attribute and a message carrying the second attribute, the node attribute of the node sh is updated to the second attribute.
- the processing module is further configured to: after updating the node attribute of the node sh to the third attribute, determine a second node set from all candidate nodes having the third attribute, Wherein, the second node set includes the node sh , and all nodes in the second node set have the same level identifier, and all nodes in the second node set form a connected path, and the The level identifier is used to indicate the node level of the node with the level identifier in the target sensor network, and the number of nodes in the second node set is greater than 1; the remaining energy in the second node set is maximized
- the node attribute of the first node of is updated to the first attribute.
- the processing module is further configured to: after updating the node attribute of the first node with the largest remaining energy in the second node set to the first attribute, send the information to all nodes through the first node.
- the second node in the second node set sends a notification message, wherein the second node is a neighbor node of the first node, and the notification message sent by the first node carries the first node.
- the hierarchical identification of a node and the node attribute of the first node the following operations are performed for each node in the second node set except the first node, so as to remove all nodes in the second node set except the first node.
- the node attribute of each node other than the first node is updated to the first attribute or the second attribute, wherein the current node is initialized as the second node: the node attribute of the current node is all When the third attribute is used and the node attribute carried in the notification message received by the current node is the first attribute, update the node attribute of the current node to the second attribute; When the node attribute of the current node is the third attribute and the node attribute carried in the notification message received by the current node is the second attribute, update the node attribute of the current node to the The first attribute, wherein the notification message received by the current node is sent to the current node by the neighbor node of the current node in the second node set; After the node attribute of the node is updated, a notification message is sent by the current node to the neighbor nodes of the current node in the second node set, wherein the notification message sent by the current node carries the The level identifier of the current node and the node attribute of the current node;
- the processing module is further configured to: update the node attribute of the node sh as the the first attribute, and send a notification message to the neighbor nodes of the node sh through the node sh , wherein the notification message sent by the node sh carries the level identifier of the node sh and the node attributes of said node sh .
- the processing module is further configured to: after updating the node attributes of all nodes in the target sensor network to the target attribute, determine a set composed of all nodes with the second attribute as the first A node set; determining a third node set consisting of target nodes in the first node set that meet the preset condition, wherein the preset condition includes one of the following: the two target nodes of the one target node
- the hierarchical identification of one node in the neighbor nodes is greater than the hierarchical identification of the one target node, and the hierarchical identification of the other node in the two neighbor nodes is smaller than the hierarchical identification of the one target node;
- the hierarchical identification of one node in the two neighbor nodes is equal to the hierarchical identification of the one target node, and the hierarchical identification of the other node in the two neighbor nodes is greater than the hierarchical identification of the one target node;
- the The level identifier of one of the two neighbor nodes of a target node is equal to the level
- the processing module is further configured to: when there are multiple nodes with the same level identifier in the third node set, determine each node in the multiple nodes with the same level identifier The number of neighbor nodes in the largest independent set; the node with the largest number of neighbor nodes is determined as a node in the target node set; in the case that the level identifiers of each node in the third node set are different Next, each node in the third node set is determined as a node in the target node set; wherein, after the target node set is determined from the third node set, the The method further includes: removing redundant nodes from the target node set, wherein the redundant node and a node in the maximum independent set have the same neighbor node, and the same neighbor node is the maximum independent node a node in the set; after the redundant nodes are eliminated from the target node set, the node attribute of each node in the target node set is updated to the first attribute.
- the processing module is further configured to: broadcast a target message to neighbor nodes of each cluster head node through each of the cluster head nodes, wherein the target message carries the The node identifier of the cluster head node of the target message and the remaining energy information of the cluster head node sending the target message; for each node Cq in the fourth node set, according to all the target messages received by the node Cq , determine the cluster head node to which the node Cq belongs, wherein the cluster head node to which the node Cq belongs is the cluster head node with the largest residual energy among the neighbor nodes of the node Cq, and the q ⁇ [1, m '], the m' is the number of nodes in the fourth node set, and the fourth node set is a set composed of all nodes in the target sensor network except all the cluster head nodes; by The node Cq sends a request message to the cluster head node to which the node Cq belongs, where the request message is used to request the cluster head node to which
- the transmission module is further configured to: perform the following operations on the data sent by at least one cluster member node in the at least one cluster, until the neighbor node of the current cluster head node is the base station, wherein the current cluster The head node is initialized as the cluster head node to which the at least one cluster member node belongs: the current cluster head node receives data sent by the cluster member nodes of the cluster where the current cluster head node is located; The data received from the cluster member nodes of the cluster where the current cluster head node is located and the data received by the current cluster head node from the child nodes of the current cluster head node are linearly combined to obtain the first data, and the The first data is sent to the parent node of the current cluster head node, wherein the level identification of the child node is smaller than the level identification of the current cluster head node, and the child node is the neighbor of the current cluster head node A cluster head node in the node, the hierarchical identification of the parent node is greater than the hierarchical identification of the current cluster
- An embodiment of the present invention further provides a storage medium, where the storage medium includes a stored program, wherein the above-mentioned program executes any one of the above-mentioned methods when running.
- the above-mentioned storage medium may be configured to store program codes for executing the following steps:
- S1 Determine the maximum independent set in the target sensor network, where the maximum independent set is a set composed of nodes in the target sensor network that are not adjacent to each other, and each node in the target sensor network is connected to Sensors are in one-to-one correspondence;
- S2 determine a target node set in a first node set in the target sensor network, where the first node set is composed of nodes in the target sensor network that do not belong to the maximum independent set
- Each target node in the target node set conforms to a preset condition, and the preset condition is used to indicate that a target node has two neighbor nodes in the maximum independent set;
- S3 the maximum independent set Each node in the independent set and the target node set is determined as a node in the connected domination set corresponding to the target sensor network, and the connected domination set is obtained, wherein, between any two nodes in the connected domination set can communicate with each other;
- S4 according to the connected domination set, cluster the nodes in the target sensor network to obtain multiple cluster
- the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (Read-Only Memory, referred to as ROM), a random access memory (Random Access Memory, referred to as RAM), Various media that can store program codes, such as removable hard disks, magnetic disks, or optical disks.
- ROM Read-Only Memory
- RAM Random Access Memory
- An embodiment of the present invention also provides an electronic device, comprising a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any of the above method embodiments.
- the above-mentioned electronic device may further include a transmission device and an input-output device, wherein the transmission device is connected to the above-mentioned processor, and the input-output device is connected to the above-mentioned processor.
- the above-mentioned processor may be configured to perform the following steps through a computer program: S1, determine the maximum independent set in the target sensor network, wherein the maximum independent set is determined by the target sensor network A set composed of two non-adjacent nodes in the target sensor network, each node in the target sensor network corresponds to a sensor one-to-one; S2, determine the target node set in the first node set in the target sensor network, wherein , the first node set is a set consisting of nodes in the target sensor network that do not belong to the maximum independent set, each target node in the target node set meets a preset condition, and the preset condition Used to indicate that a target node has two neighbor nodes in the maximum independent set; S3, determine the maximum independent set and each node in the target node set as the target sensor network corresponding to the connected domination set.
- a node to obtain the connected domination set wherein any two nodes in the connected domination set can communicate with each other
- S4 according to the connected domination set, cluster the nodes in the target sensor network, Obtaining a plurality of clusters in the target sensor network, wherein each node in the connectivity domination set is a cluster head node of a cluster in the plurality of clusters;
- S5 through the nodes in the connectivity domination set, convert the The data sent by the cluster member nodes in at least one of the multiple clusters is relayed to the base station.
- FIG. 8 is a schematic structural diagram of an optional electronic device according to an embodiment of the present invention.
- the electronic device can also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, and a mobile Internet device (Mobile Internet device).
- Internet Devices MID
- PAD PAD
- FIG. 8 does not limit the structure of the above electronic device.
- the electronic device may also include more or less components than those shown in FIG. 8 (eg, network interfaces, etc.), or have a different configuration than that shown in FIG. 8 .
- the memory 1002 can be configured to store software programs and modules, such as program instructions/modules corresponding to the data transmission method and the data transmission device in the embodiment of the present invention, and the processor 1004 runs the software programs and modules stored in the memory 1002, Thereby, various functional applications and data processing are performed, that is, the above-mentioned data transmission method is realized.
- Memory 1002 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, memory 1002 may further include memory located remotely from processor 1004, and these remote memories may be connected to the terminal through a network.
- the above-mentioned memory 1002 may include, but is not limited to, the processing module 72 and the transmission module 74 of the above-mentioned data transmission apparatus. In addition, it may also include, but is not limited to, other module units in the above-mentioned data transmission apparatus, which will not be repeated in this example.
- the above-mentioned transmission device 1006 is configured to receive or send data via a network.
- Specific examples of the above-mentioned networks may include wired networks and wireless networks.
- the transmission device 1006 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers through a network cable to communicate with the Internet or a local area network.
- the transmission device 1006 is a radio frequency (RF) module configured to communicate with the Internet wirelessly.
- RF radio frequency
- the above electronic device further includes: a display 1008 configured to display a picture; and a connection bus 1010 configured to connect various module components in the above electronic device.
- modules or steps of the present invention can be implemented by a general-purpose computing device, which can be centralized on a single computing device, or distributed in a network composed of multiple computing devices Alternatively, they may be implemented in program code executable by a computing device, such that they may be stored in a storage device and executed by the computing device, and in some cases, in a different order than here
- the steps shown or described are performed either by fabricating them separately into individual integrated circuit modules, or by fabricating multiple modules or steps of them into a single integrated circuit module.
- the present invention is not limited to any particular combination of hardware and software.
- the above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention.
- the present invention may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included within the protection scope of the present invention.
- the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (Read-Only Memory, referred to as ROM), a random access memory (Random Access Memory, referred to as RAM), Various media that can store program codes, such as removable hard disks, magnetic disks, or optical disks.
- ROM Read-Only Memory
- RAM Random Access Memory
- Various media that can store program codes such as removable hard disks, magnetic disks, or optical disks.
- modules or steps of the present invention can be implemented by a general-purpose computing device, which can be centralized on a single computing device, or distributed in a network composed of multiple computing devices Alternatively, they may be implemented in program code executable by a computing device, whereby they may be stored in a storage device and executed by the computing device, and in some cases, in a different order than here
- the steps shown or described are performed either by fabricating them separately into individual integrated circuit modules, or by fabricating multiple modules or steps of them into a single integrated circuit module.
- the present invention is not limited to any particular combination of hardware and software.
- the above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention.
- the present invention may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included within the protection scope of the present invention.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
- Arrangements For Transmission Of Measured Signals (AREA)
Abstract
The present invention provides a data transmission method and device, a storage medium and an electronic device. Said method comprises: determining a maximum independent set in a target sensor network; determining a target node set in a first node set in the target sensor network, wherein the first node set is a set composed of nodes which do not belong to the maximum independent set in the target sensor network; determining each node in the maximum independent set and the target node set as one node in a connected dominating set corresponding to the target sensor network, to obtain the connected dominating set; according to the connected dominating set, clustering the nodes in the target sensor network to obtain a plurality of clusters in the target sensor network; and by means of the nodes in the connected dominating set, transferring to a base station data sent by a cluster member node in at least one cluster of the plurality of clusters. The present invention solves the technical problem in the related art that when data transmission is performed in a sensor network, a node consumes much energy.
Description
本发明涉及无线通信技术领域,具体而言,涉及一种数据传输方法和装置、存储介质及电子装置。The present invention relates to the technical field of wireless communication, and in particular, to a data transmission method and device, a storage medium and an electronic device.
相关技术中,对无线传感器网络进行分簇,簇成员节点将需要传输的数据发送给所属的簇头节点,并由簇头节点将该数据发送至与该无线传感器网络通信的基站。然而由于无线传感器网络划分的簇是固定的,并且簇头节点也是固定不变的,从而在由簇头节点直接将数据发送至基站时,簇头节点消耗的能量较多,从而缩短了簇头节点的传输寿命(又称为使用时间)。In the related art, the wireless sensor network is clustered, and the cluster member nodes send the data to be transmitted to the corresponding cluster head node, and the cluster head node sends the data to the base station communicating with the wireless sensor network. However, since the clusters divided by the wireless sensor network are fixed, and the cluster head node is also fixed, when the cluster head node directly sends data to the base station, the cluster head node consumes more energy, thus shortening the cluster head. The transmission lifetime (aka usage time) of the node.
针对相关技术中,在传感器网络中进行数据传输时,节点消耗能量较多的技术问题,尚未提出有效的技术方案。Aiming at the technical problem in the related art that nodes consume a lot of energy during data transmission in a sensor network, no effective technical solution has been proposed.
发明内容SUMMARY OF THE INVENTION
本发明实施例提供了一种数据传输方法和装置、存储介质及电子装置,以至少解决相关技术中,在传感器网络中进行数据传输时,节点消耗能量较多的技术问题。Embodiments of the present invention provide a data transmission method and device, a storage medium, and an electronic device to at least solve the technical problem in the related art that nodes consume more energy during data transmission in a sensor network.
根据本发明的一个实施例,提供了一种数据传输方法,包括:确定目标传感器网络中的最大独立集,其中,所述最大独立集是由所述目标传感器网络中的两两互不邻接的节点组成的集合,所述目标传感器网络中的每个节点与传感器一一对应;确定所述目标传感器网络中的第一节点集合中的目标节点集合,其中,所述第一节点集合是由所述目标传感器网络中不属于所述最大独立集的节点组成的集合,所述目标节点集合中的每个目标节点均符合预设条件,所述预设条件用于指示一个目标节点在所述最大独立集中存在两个邻居节点;将所述最大独立集以及所述目标节点集合中的每个节点确定为所述目标传感器网络对应的连通支配集中的一个节点,得到所述连通支配集,其中,所述连通支配集中的任意两个节点之间能够互相通信;根据所述连通支配集,对所述目标传感器网络中的节点进行分簇,得到所述目标传感器网络中的多个簇,其中,所述连通支配集中的每个节点为所述多个簇中的一个簇的簇头节点;通过所述连通支配集中的节点,将所述多个簇中至少一个簇中的簇成员节点发送的数据中转至基站。According to an embodiment of the present invention, a data transmission method is provided, comprising: determining a maximum independent set in a target sensor network, wherein the maximum independent set is formed by two non-adjacent sets of the target sensor network. A set of nodes, each node in the target sensor network corresponds to a sensor one-to-one; determine a target node set in a first node set in the target sensor network, wherein the first node set is composed of all A set of nodes in the target sensor network that do not belong to the maximum independent set, each target node in the target node set conforms to a preset condition, and the preset condition is used to indicate that a target node is in the maximum independent set. There are two neighbor nodes in the independent set; each node in the maximum independent set and the target node set is determined as a node in the connected dominating set corresponding to the target sensor network, and the connected dominating set is obtained, wherein, Any two nodes in the connected domination set can communicate with each other; according to the connected domination set, the nodes in the target sensor network are clustered to obtain multiple clusters in the target sensor network, wherein, Each node in the connected domination set is a cluster head node of one of the multiple clusters; through the nodes in the connected domination set, the cluster member nodes in at least one of the multiple clusters send the The data is relayed to the base station.
根据本发明的另一个实施例,提供了一种数据传输装置,包括:处理模块,设置为确定目标传感器网络中的最大独立集,其中,所述最大独立集是由所述目标传感器网络中的两两互不邻接的节点组成的集合,所述目标传感器网络中的每个节点与传感器一一对应;所述处理模块,还设置为确定所述目标传感器网络中的第一节点集合中的目标节点集合,其中,所述第一节点集合是由所述目标传感器网络中不属于所述最大独立集的节点组成的集合,所述目标节点集合中的每个目标节点均符合预设条件,所述预设条件用于指示一个目标节点在所述最大独立集中存在两个邻居节点;所述处理模块,还设置为将所述最大独立集以及所述目标节点集合中的每个节点确定为所述目标传感器网络对应的连通支配集中的一个节点,得到所述连通支配集,其中,所述连通支配集中的任意两个节点之间能够互相通信;所述处理模块,还设置为根据所述连通支配集,对所述目标传感器网络中的节点进行分簇,得到所述目标传感器网络中的多个簇,其中,所述连通支配集中的每个节点为所述多个簇中的一个簇的簇头节点;传输模块,设置为通过所述连通支配集 中的节点,将所述多个簇中至少一个簇中的簇成员节点发送的数据中转至基站。According to another embodiment of the present invention, there is provided a data transmission apparatus, comprising: a processing module configured to determine a maximum independent set in a target sensor network, wherein the maximum independent set is determined by the target sensor network A set composed of two non-adjacent nodes, each node in the target sensor network corresponds to a sensor one-to-one; the processing module is further configured to determine the target in the first node set in the target sensor network A node set, wherein the first node set is a set composed of nodes in the target sensor network that do not belong to the maximum independent set, and each target node in the target node set meets a preset condition, so The preset condition is used to indicate that a target node has two neighbor nodes in the maximum independent set; the processing module is also configured to determine the maximum independent set and each node in the target node set as the maximum independent set. A node in the connected domination set corresponding to the target sensor network, to obtain the connected domination set, wherein any two nodes in the connected domination set can communicate with each other; the processing module is further configured to Dominant set, cluster the nodes in the target sensor network to obtain a plurality of clusters in the target sensor network, wherein each node in the connected domination set is a cluster of one of the plurality of clusters A cluster head node; a transmission module, configured to relay the data sent by the cluster member nodes in at least one of the multiple clusters to the base station through the nodes in the connectivity control set.
通过本发明,确定目标传感器网络中的最大独立集,其中,所述最大独立集是由所述目标传感器网络中的两两互不邻接的节点组成的集合,所述目标传感器网络中的每个节点与传感器一一对应;确定所述目标传感器网络中的第一节点集合中的目标节点集合,其中,所述第一节点集合是由所述目标传感器网络中不属于所述最大独立集的节点组成的集合,所述目标节点集合中的每个目标节点均符合预设条件,所述预设条件用于指示一个目标节点在所述最大独立集中存在两个邻居节点;将所述最大独立集以及所述目标节点集合中的每个节点确定为所述目标传感器网络对应的连通支配集中的一个节点,得到所述连通支配集,其中,所述连通支配集中的任意两个节点之间能够互相通信;根据所述连通支配集,对所述目标传感器网络中的节点进行分簇,得到所述目标传感器网络中的多个簇,其中,所述连通支配集中的每个节点为所述多个簇中的一个簇的簇头节点;通过所述连通支配集中的节点,将所述多个簇中至少一个簇中的簇成员节点发送的数据中转至基站。因此,可以解决相关技术中,在传感器网络中进行数据传输时,节点消耗能量较多的技术问题,减小了传感器网络中的节点的能量消耗,延长了节点的寿命。Through the present invention, the maximum independent set in the target sensor network is determined, wherein the maximum independent set is a set composed of nodes in the target sensor network that are not adjacent to each other, each of the target sensor network One-to-one correspondence between nodes and sensors; determining a target node set in a first node set in the target sensor network, wherein the first node set is composed of nodes in the target sensor network that do not belong to the maximum independent set Each target node in the target node set conforms to a preset condition, and the preset condition is used to indicate that a target node has two neighbor nodes in the maximum independent set; the maximum independent set And each node in the target node set is determined as a node in the connected domination set corresponding to the target sensor network, and the connected domination set is obtained, wherein any two nodes in the connected domination set can communicate with each other. communication; according to the connected domination set, cluster the nodes in the target sensor network to obtain a plurality of clusters in the target sensor network, wherein each node in the connected domination set is the plurality of clusters A cluster head node of one of the clusters; through the nodes in the connectivity control set, the data sent by the cluster member nodes in at least one of the multiple clusters is forwarded to the base station. Therefore, in the related art, the technical problem that the nodes consume more energy during data transmission in the sensor network can be solved, the energy consumption of the nodes in the sensor network is reduced, and the lifespan of the nodes is prolonged.
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The accompanying drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the attached image:
图1为根据本发明实施例的数据传输方法的流程图;1 is a flowchart of a data transmission method according to an embodiment of the present invention;
图2为根据本发明实施例的节点属性的示意图;2 is a schematic diagram of a node attribute according to an embodiment of the present invention;
图3为根据本发明实施例的目标传感器网络的初始状态的示意图;3 is a schematic diagram of an initial state of a target sensor network according to an embodiment of the present invention;
图4为根据本发明实施例的目标传感器网络中的最大独立集的示意图;4 is a schematic diagram of a maximum independent set in a target sensor network according to an embodiment of the present invention;
图5为根据本发明实施例的目标传感器网络中的连通支配集的示意图;5 is a schematic diagram of a connected dominating set in a target sensor network according to an embodiment of the present invention;
图6为根据本发明实施例的目标传感器网络分簇的示意图;6 is a schematic diagram of a target sensor network clustering according to an embodiment of the present invention;
图7是根据本发明一实施例的数据传输装置的结构框图;7 is a structural block diagram of a data transmission apparatus according to an embodiment of the present invention;
图8是根据本发明实施例的一种可选的电子装置的结构示意图。FIG. 8 is a schematic structural diagram of an optional electronic device according to an embodiment of the present invention.
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。Hereinafter, the present invention will be described in detail with reference to the accompanying drawings and in conjunction with embodiments. It should be noted that the embodiments in the present application and the features of the embodiments may be combined with each other in the case of no conflict.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that the terms "first", "second" and the like in the description and claims of the present invention and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence.
首先,对本发明实施例中涉及到的技术术语的含义作如下解释:First, the meanings of the technical terms involved in the embodiments of the present invention are explained as follows:
压缩感知技术(Compressive Sensing,简称为CS):是对稀疏或可压缩信号可通过远低于香农-奈奎斯特(Shannon-Nyquist)采样定理标准的方式进行采样数据,其仍能够实现稀疏或可压缩信号的精确重构。涉及以下线性公式模型:Compressive Sensing (CS): Sparse or compressible signals can be sampled in a way that is much lower than the standard of the Shannon-Nyquist sampling theorem, and it can still achieve sparse or compressible data. Accurate reconstruction of compressible signals. The following linear formula models are involved:
y=Ax,y=Ax,
其中y∈R
m是测量向量,x∈R
n是原始数据向量,A∈R
m×n为感知矩阵,m、n为整数。称向 量x在基ψ(满足x=ψc)下是k-稀疏的,其中矩阵c中非零项的个数c′不超过k,k为整数,ψ表示一个矩阵,又称为基矩阵。
where y∈Rm is the measurement vector, x∈Rn is the original data vector, A∈Rm ×n is the perception matrix, and m, n are integers. The vector x is said to be k-sparse under the basis ψ (satisfying x=ψc), where the number c' of non-zero entries in the matrix c does not exceed k, k is an integer, and ψ represents a matrix, also known as the basis matrix.
在CS中,感知矩阵A通常是高斯随机矩阵,即A中的每一项都是从高斯分布N(0,1/m)中独立抽样而来,其中,N为整数。当m=O(k log(n))且k<<n时,k-稀疏向量x可以从
中计算得到,其中a
ji是A中的第(j,i)个元素(即第j行第i列的元素),i、j为整数。在本发明实施例中,可以实现从传感器节点中有效地收集给定数量的测量值,并且在汇集点(包括但不限于基站)采集到足够数量的测量数据,就可以可靠地恢复出原始数据向量。
In CS, the perception matrix A is usually a Gaussian random matrix, that is, each item in A is independently sampled from a Gaussian distribution N(0,1/m), where N is an integer. When m=O(k log(n)) and k<<n, the k-sparse vector x can be changed from Calculated in , where a ji is the (j, i)-th element in A (that is, the element in the j-th row and the i-th column), and i and j are integers. In the embodiment of the present invention, a given number of measurement values can be effectively collected from the sensor nodes, and a sufficient amount of measurement data can be collected at the collection point (including but not limited to the base station), and the original data can be reliably recovered. vector.
对于一个有n个传感器(又称为发射器)v
1,v
2,…,v
n的传感器网络,这些传感器部署在以v
1为汇聚节点的区域内,传感器v
1可以获得一个用x
1表示的参数,则传感器参数的集合也即数据向量为x=[x
1,...,x
n]。在传感器网络中的所有节点共享一个公共的无线信道的情况下,将节点v
i和v
j之间的距离表示为|v
i-v
j|。在一个时隙系统中,其中时隙具有相等的持续时间,并且一个节点可以在每个时隙内发送一个单位大小的数据包。对于协议干扰模型(PrIM):若节点的通信半径为r(r为自然数),如果|v
i-v
j|≤r且对于并发发射器v
t来说|v
t-v
j|≥(1+δ)r(δ>0是常数),则节点v
i可以成功地向v
j传输数据。在PrIM中,若任意两个发射器之间的距离是ρr时(ρ=2+δ),这两个发射器可以同时传输数据,并且这两个发射器均称为并发发射器。构造由PrIM得到的通信图G=(V,E),其中V={v
1,v
2,...,v
n}是节点集合,当|v
i-v
j|≤r时,存在边(v
i,v
j)∈E。
For a sensor network with n sensors (also called transmitters) v 1 , v 2 ,..., v n , these sensors are deployed in an area with v 1 as the sink node, sensor v 1 can obtain a sensor with x 1 represents the parameters, then the set of sensor parameters, that is, the data vector, is x=[x 1 , . . . , x n ]. In the case that all nodes in a sensor network share a common wireless channel, the distance between nodes v i and v j is denoted as |v i -v j |. In a slotted system, where the slots are of equal duration, and a node can transmit a unit-sized data packet in each slot. For the protocol interference model (PrIM): if the communication radius of the node is r (r is a natural number), if |v i -v j |≤r and for concurrent transmitter v t |v t -v j |≥(1 +δ)r (δ>0 is a constant), then node v i can successfully transmit data to v j . In PrIM, if the distance between any two transmitters is ρr (ρ=2+δ), these two transmitters can transmit data at the same time, and these two transmitters are called concurrent transmitters. Construct the communication graph G=(V,E) obtained by PrIM, where V={v 1 ,v 2 ,...,v n } is the set of nodes, when |v i -v j |≤r, there is an edge (v i ,v j )∈E.
支配集的定义如下:对于给定无向图G=(V,E),其中V是点集,E是边集,称V的一个子集S为支配集,当且仅当对于V-S中任何一个点v,都有子集S中的某个点u,使得(u,v)∈E时,支配集成立。The definition of the dominating set is as follows: For a given undirected graph G=(V, E), where V is the set of points and E is the set of edges, a subset S of V is called the dominating set if and only if for any of V-S A point v has a certain point u in the subset S, such that when (u, v) ∈ E, the dominant set is established.
连通支配集:即支配集内主干上的所有节点都是互相连通的,任意两个节点之间都能相互通信。在本发明实施例中,采用分层扩散式的选择办法来选择支配节点,以及具体是从汇聚节点开始,逐层向下进行筛选得到支配节点,直到遍历整个无线传感网络为止,从而得到由支配节点组成的集合即连通支配集。Connected dominating set: that is, all nodes on the backbone of the dominating set are connected to each other, and any two nodes can communicate with each other. In the embodiment of the present invention, a layered and diffused selection method is used to select the dominant node, and specifically starting from the sink node, the dominant node is obtained by filtering down layer by layer until the entire wireless sensor network is traversed, so as to obtain the A set of dominating nodes is a connected dominating set.
本发明实施例提供了一种数据传输方法,图1为根据本发明实施例的数据传输方法的流程图,如图1所示,该方法包括:步骤S102,确定目标传感器网络中的最大独立集,其中,所述最大独立集是由所述目标传感器网络中的两两互不邻接的节点组成的集合,所述目标传感器网络中的每个节点与传感器一一对应;步骤S104,确定所述目标传感器网络中的第一节点集合中的目标节点集合,其中,所述第一节点集合是由所述目标传感器网络中不属于所述最大独立集的节点组成的集合,所述目标节点集合中的每个目标节点均符合预设条件,所述预设条件用于指示一个目标节点在所述最大独立集中存在两个邻居节点;步骤S106,将所述最大独立集以及所述目标节点集合中的每个节点确定为所述目标传感器网络对应的连通支配集中的一个节点,得到所述连通支配集,其中,所述连通支配集中的任意两个节点之间能够互相通信;步骤S108,根据所述连通支配集, 对所述目标传感器网络中的节点进行分簇,得到所述目标传感器网络中的多个簇,其中,所述连通支配集中的每个节点为所述多个簇中的一个簇的簇头节点;步骤S110,通过所述连通支配集中的节点,将所述多个簇中至少一个簇中的簇成员节点发送的数据中转至基站。通过本发明,确定目标传感器网络中的最大独立集,其中,所述最大独立集是由所述目标传感器网络中的两两互不邻接的节点组成的集合,所述目标传感器网络中的每个节点与传感器一一对应;确定所述目标传感器网络中的第一节点集合中的目标节点集合,其中,所述第一节点集合是由所述目标传感器网络中不属于所述最大独立集的节点组成的集合,所述目标节点集合中的每个目标节点均符合预设条件,所述预设条件用于指示一个目标节点在所述最大独立集中存在两个邻居节点;将所述最大独立集以及所述目标节点集合中的每个节点确定为所述目标传感器网络对应的连通支配集中的一个节点,得到所述连通支配集,其中,所述连通支配集中的任意两个节点之间能够互相通信;根据所述连通支配集,对所述目标传感器网络中的节点进行分簇,得到所述目标传感器网络中的多个簇,其中,所述连通支配集中的每个节点为所述多个簇中的一个簇的簇头节点;通过所述连通支配集中的节点,将所述多个簇中至少一个簇中的簇成员节点发送的数据中转至基站。因此,可以解决相关技术中,在传感器网络中进行数据传输时,节点消耗能量较多的技术问题,减小了传感器网络中的节点的能量消耗,延长了节点的寿命。An embodiment of the present invention provides a data transmission method. FIG. 1 is a flowchart of a data transmission method according to an embodiment of the present invention. As shown in FIG. 1 , the method includes: step S102 , determining the maximum independent set in the target sensor network , wherein the maximum independent set is a set composed of nodes in the target sensor network that are not adjacent to each other, and each node in the target sensor network corresponds to a sensor one-to-one; step S104, determine the A target node set in the first node set in the target sensor network, wherein the first node set is a set composed of nodes in the target sensor network that do not belong to the maximum independent set, and the target node set is Each target node of the target node meets a preset condition, and the preset condition is used to indicate that a target node has two neighbor nodes in the maximum independent set; Step S106, put the maximum independent set and the target node set in the maximum independent set. Each node in the target sensor network is determined as a node in the connected domination set corresponding to the target sensor network, and the connected domination set is obtained, wherein any two nodes in the connected domination set can communicate with each other; Step S108, according to the the connected dominating set, clustering the nodes in the target sensor network to obtain a plurality of clusters in the target sensor network, wherein each node in the connected dominating set is one of the plurality of clusters The cluster head node of the cluster; in step S110, the data sent by the cluster member nodes in at least one of the multiple clusters is forwarded to the base station through the nodes in the connectivity control set. Through the present invention, the maximum independent set in the target sensor network is determined, wherein the maximum independent set is a set composed of nodes in the target sensor network that are not adjacent to each other, each of the target sensor network One-to-one correspondence between nodes and sensors; determining a target node set in a first node set in the target sensor network, wherein the first node set is composed of nodes in the target sensor network that do not belong to the maximum independent set Each target node in the target node set conforms to a preset condition, and the preset condition is used to indicate that a target node has two neighbor nodes in the maximum independent set; the maximum independent set And each node in the target node set is determined as a node in the connected domination set corresponding to the target sensor network, and the connected domination set is obtained, wherein any two nodes in the connected domination set can communicate with each other. communication; according to the connected domination set, cluster the nodes in the target sensor network to obtain a plurality of clusters in the target sensor network, wherein each node in the connected domination set is the plurality of clusters A cluster head node of one of the clusters; through the nodes in the connectivity control set, the data sent by the cluster member nodes in at least one of the multiple clusters is forwarded to the base station. Therefore, in the related art, the technical problem that the nodes consume more energy during data transmission in the sensor network can be solved, the energy consumption of the nodes in the sensor network is reduced, and the lifespan of the nodes is prolonged.
可选地,在所述确定目标传感器网络中的最大独立集之前,所述方法包括:将所述目标传感器网络中的所有节点的节点属性设置为空;其中,所述确定目标传感器网络中的最大独立集,包括:将所述目标传感器网络中的汇聚节点的节点属性更新为第一属性,以及根据所述目标传感器网络中除所述汇聚节点之外的每个节点s
h的节点属性和所述节点s
h从所述节点s
h的邻居节点接收到的通知报文,对所述节点s
h的节点属性进行更新,以将所述目标传感器网络中所有节点的节点属性更新至目标属性,其中,h∈[1,n′],n′为所述目标传感器网络中除所述汇聚节点之外的节点的数量,所述通知报文中携带有发送所述通知报文的节点属性,所述目标属性包括所述第一属性和第二属性,每个具有所述第一属性的节点被确定为所述最大独立集中的一个节点,每个具有所述第二属性的节点被确定为所述第一节点集合中的一个节点。需要说明的是,在上述实施例中,邻居节点均为一跳节点,即某一节点的邻居节点,是与该某一节点直接连接的节点。
Optionally, before the determining of the maximum independent set in the target sensor network, the method includes: setting the node attributes of all nodes in the target sensor network to be empty; wherein, the determining of the maximum independent set in the target sensor network The maximum independent set includes: updating the node attribute of the sink node in the target sensor network to the first attribute, and according to the node attribute of each node sh in the target sensor network except the sink node and The notification message received by the node sh from the neighbor nodes of the node sh updates the node attribute of the node sh, so as to update the node attributes of all nodes in the target sensor network to the target attribute , where h∈[1, n′], n′ is the number of nodes in the target sensor network other than the sink node, and the notification message carries the attribute of the node sending the notification message , the target attribute includes the first attribute and the second attribute, each node with the first attribute is determined as a node in the maximum independent set, and each node with the second attribute is determined is a node in the first node set. It should be noted that, in the above embodiment, the neighbor nodes are all one-hop nodes, that is, the neighbor nodes of a certain node, which are nodes directly connected to the certain node.
可选地,所述根据所述目标传感器网络中除所述汇聚节点之外的每个节点s
h的节点属性,以及所述节点s
h从所述节点s
h的邻居节点接收到的报文,对所述节点s
h的节点属性进行更新,以将所述目标传感器网络中所有节点的节点属性更新至目标属性中的一个属性,包括:在所述节点s
h的节点属性为空、且所述通知报文均为携带有所述第一属性的报文情况下,将所述节点s
h的节点属性更新为所述第二属性;在所述节点s
h的节点属性为空、且所述通知报文均为携带有所述第二属性的报文的情况下,将所述节点s
h的节点属性更新为第三属性,其中,每个具有所述第三属性的节点被确定为所述最大独立集中节点的一个候选节点;在所述节点s
h的节点属性为空、且所述通知报文中包括携带有所述第一属性的报文以及携带有所述第二属性的报文的情况下,将所述节点s
h的节点属性更新为所述第二属性。
Optionally, according to the node attribute of each node sh in the target sensor network except the sink node, and the message received by the node sh from the neighbor nodes of the node sh , updating the node attributes of the node sh , so as to update the node attributes of all nodes in the target sensor network to one of the target attributes, including: the node attribute of the node sh is empty, and If the notification messages are all messages carrying the first attribute, update the node attribute of the node sh to the second attribute; when the node attribute of the node sh is empty and In the case that the notification messages are all messages carrying the second attribute, the node attribute of the node sh is updated to the third attribute, wherein each node with the third attribute is determined is a candidate node of the maximum independent centralized node; the node attribute of the node sh is empty, and the notification message includes a message carrying the first attribute and a message carrying the second attribute In the case of the message of the node sh , the node attribute of the node sh is updated to the second attribute.
可选地,在将所述节点s
h的节点属性更新为所述第三属性之后,所述方法还包括:在具有所述第三属性的所有候选节点中确定第二节点集合,其中,所述第二节点集合包括所述节点s
h,并且所述第二节点集合中的所有节点具有相同的层级标识,以及所述第二节点集合中的所有节点组成一条连通路径,所述层级标识用于指示具有所述层级标识的节点在所述目标传感器网络中所处的节点层级,所述第二节点集合中的节点数量大于1;将所述第二节点集合中的剩余能量最大的第一节点的节点属性更新为所述第一属性。
Optionally, after updating the node attribute of the node sh to the third attribute, the method further includes: determining a second node set from all candidate nodes having the third attribute, wherein all The second node set includes the node sh , and all the nodes in the second node set have the same level identifier, and all the nodes in the second node set form a connected path, and the level identifier uses In order to indicate the node level at which the node with the level identifier is located in the target sensor network, the number of nodes in the second node set is greater than 1; the first node with the largest remaining energy in the second node set is The node attribute of the node is updated to the first attribute.
其中,第二节点集合中所有的所有节点组成一条连通路径,即第二节点集合中不存在孤立节点,其中,孤立节点为与第二节点集合中的任何一个节点均不存在直接连接关系的节点。Wherein, all the nodes in the second node set form a connected path, that is, there is no isolated node in the second node set, wherein the isolated node is a node that does not have a direct connection relationship with any node in the second node set .
需要说明的是,在上述实施例中,节点的层级标识用于表示节点在所述目标传感器网络中所在的层级,并且不同的层级标识用于表示不同的层,即通过层级标识将目标传感器网络中的所有节点进行了分层。例如,层级标识为1,表示节点处于目标传感器网络中的第1层,并且具有层级标识1的节点位于具有层级标识2的节点的上一层。It should be noted that, in the above-mentioned embodiment, the level identifier of the node is used to indicate the level where the node is located in the target sensor network, and different level identifiers are used to represent different layers, that is, the target sensor network is identified by the level identifier. All nodes in are layered. For example, a level ID of 1 indicates that a node is at level 1 in the target sensor network, and a node with level ID 1 is at a level above the node with level ID 2.
可选地,在将所述第二节点集合中的剩余能量最大的第一节点的节点属性更新为所述第一属性之后,所述方法还包括:通过所述第一节点向所述第二节点集合中的第二节点发送通知报文,其中,所述第二节点为所述第一节点的邻居节点,所述第一节点发送的所述通知报文中携带有所述第一节点的层级标识以及所述第一节点的节点属性;对于所述第二节点集合中除所述第一节点之外的每个节点执行以下操作,以将所述第二节点集合中除所述第一节点之外的每个节点的节点属性更新至所述第一属性或所述第二属性,其中,当前节点被初始化为所述第二节点:在所述当前节点的节点属性为所述第三属性、且所述当前节点接收到的通知报文中携带的节点属性为所述第一属性的情况下,将所述当前节点的节点属性更新为所述第二属性;在所述当前节点的节点属性为所述第三属性、且所述当前节点接收到的通知报文中携带的节点属性为所述第二属性的情况下,将所述当前节点的节点属性更新为所述第一属性,其中,所述当前节点接收到的所述通知报文是由所述第二节点集合中的所述当前节点的邻居节点发送给所述当前节点的;在完成对所述当前节点的节点属性更新之后,通过所述当前节点向所述第二节点集合中的所述当前节点的邻居节点发送通知报文,其中,所述当前节点发送的所述通知报文中携带有所述当前节点的层级标识以及所述当前节点的节点属性;将所述第二节点集合中的所述当前节点的邻居节点确定为所述当前节点。Optionally, after updating the node attribute of the first node with the largest remaining energy in the second node set to the first attribute, the method further includes: sending the second node to the second node through the first node. The second node in the node set sends a notification message, wherein the second node is a neighbor node of the first node, and the notification message sent by the first node carries the information of the first node. level identification and node attributes of the first node; perform the following operations on each node in the second node set except the first node, to remove the first node in the second node set The node attribute of each node other than the node is updated to the first attribute or the second attribute, wherein the current node is initialized as the second node: the node attribute at the current node is the third attribute attribute, and the node attribute carried in the notification message received by the current node is the first attribute, update the node attribute of the current node to the second attribute; When the node attribute is the third attribute and the node attribute carried in the notification message received by the current node is the second attribute, update the node attribute of the current node to the first attribute , wherein the notification message received by the current node is sent to the current node by the neighbor node of the current node in the second node set; After the update, a notification message is sent by the current node to the neighbor nodes of the current node in the second node set, wherein the notification message sent by the current node carries the information of the current node. The level identifier and the node attribute of the current node; the neighbor node of the current node in the second node set is determined as the current node.
可选地,在具有所述第三属性的所有候选节点中不存在所述节点s
h的邻居节点的情况下,将所述节点s
h的节点属性更新为所述第一属性,并通过所述节点s
h向所述节点s
h的邻居节点发送通知报文,其中,所述节点s
h发送的所述通知报文中携带有所述节点s
h的层级标识以及所述节点s
h的节点属性。其中,在所有候选节点中不存在节点s
h的邻居节点的情况下,节点s
h与候选节点中的任何一个节点均不直接连接,即节点s
h是节点属性为第三属性的一个孤立节点,因此直接将节点s
h的节点属性更新为第一属性,从而使节点s
h成为最大独立集中的一个节点。
Optionally, in the case where there is no neighbor node of the node sh in all the candidate nodes with the third attribute, update the node attribute of the node sh to the first attribute, and pass the The node sh sends a notification message to the neighbor node of the node sh , wherein the notification message sent by the node sh carries the level identifier of the node sh and the information of the node sh . Node properties. Among them, in the case where there is no neighbor node of the node sh in all the candidate nodes, the node sh is not directly connected to any node in the candidate nodes, that is, the node sh is an isolated node whose node attribute is the third attribute. , so the node attribute of node sh is directly updated to the first attribute, so that node sh becomes a node in the maximum independent set.
可选地,所述确定所述目标传感器网络中的第一节点集合中的目标节点集合,包括:在将所述目标传感器网络中所有节点的节点属性更新至目标属性之后,将具有所述第二属性的所有节点组成的集合确定为所述第一节点集合;确定所述第一节点集合中符合所述预设条件的目标节点组成的第三节点集合,其中,所述预设条件包括以下之一:所述一个目标节点的所述两个邻居节点中的一个节点的层级标识大于所述一个目标节点的层级标识,并且所述两个邻居节点中的另一个节点的层级标识小于所述一个目标节点的层级标识;所述一个目标节点的所述两个邻居节点中的一个节点的层级标识等于所述一个目标节点的层级标识,并且所述两个邻居节点中的另一个节点的层级标识大于所述一个目标节点的层级标识;所述一个目标节点的所述两个邻居节点中的一个节点的层级标识等于所述一个目标节点的层级标识,并且所述两个邻居节点中的另一个节点的层级标识小于所述一个目标节点的层级标识;从所述第三节点集合中确定所述目标节点集合。Optionally, the determining the target node set in the first node set in the target sensor network includes: after updating the node attributes of all nodes in the target sensor network to the target attribute, adding the first node attribute to the target sensor network. The set composed of all nodes with two attributes is determined as the first node set; the third node set composed of target nodes in the first node set that meet the preset conditions is determined, wherein the preset conditions include the following One: the hierarchical identification of one of the two neighbor nodes of the one target node is greater than the hierarchical identification of the one target node, and the hierarchical identification of the other node of the two neighbor nodes is smaller than the The hierarchical identification of a target node; the hierarchical identification of one of the two neighbor nodes of the one target node is equal to the hierarchical identification of the one target node, and the hierarchical identification of the other node of the two neighbor nodes The identifier is greater than the hierarchy identifier of the one target node; the hierarchy identifier of one of the two neighbor nodes of the one target node is equal to the hierarchy identifier of the one target node, and the other one of the two neighbor nodes is equal to the hierarchy identifier of the one target node. The level identifier of one node is smaller than the level identifier of the one target node; the target node set is determined from the third node set.
可选地,所述从所述第三节点集合中确定所述目标节点集合,包括:在所述第三节点集合中存在多个具有相同层级标识的节点的情况下,确定所述多个具有相同层级标识的节点中的每个节 点在所述最大独立集中的邻居节点数量;将邻居节点数量最大的节点确定为所述目标节点集合中的一个节点;在所述第三节点集合中的每个节点的层级标识均不相同的情况下,将所述第三节点集合中的每个节点均确定为所述目标节点集合中的一个节点;其中,在所述从所述第三节点集合中确定所述目标节点集合之后,所述方法还包括:从所述目标节点集合中剔除冗余节点,其中,所述冗余节点与所述最大独立集中的一个节点存在相同的邻居节点,并且所述相同的邻居节点是所述最大独立集中的一个节点;在所述从所述目标节点集合中剔除冗余节点之后,将所述目标节点集合中的每个节点的节点属性更新为所述第一属性。Optionally, the determining the target node set from the third node set includes: in the case that there are multiple nodes with the same level identifier in the third node set, determining that the multiple nodes have the same level identifier. The number of neighbor nodes in the maximum independent set for each node in the nodes identified at the same level; the node with the largest number of neighbor nodes is determined as a node in the target node set; each node in the third node set is In the case where the hierarchical identifiers of the nodes are all different, each node in the third node set is determined as a node in the target node set; wherein, in the third node set from the third node set After the target node set is determined, the method further includes: removing redundant nodes from the target node set, wherein the redundant node and a node in the maximum independent set have the same neighbor node, and all The same neighbor node is a node in the maximum independent set; after the redundant node is eliminated from the target node set, the node attribute of each node in the target node set is updated to the first node attribute. an attribute.
可选地,所述根据所述连通支配集,对所述目标传感器网络中的节点进行分簇,得到所述目标传感器网络中的多个簇,包括:通过每个所述簇头节点向每个所述簇头节点的邻居节点广播目标报文,其中,所述目标报文中携带有发送所述目标报文的簇头节点的节点标识以及发送所述目标报文的簇头节点的剩余能量信息;对于第四节点集合中的每个节点Cq,根据所述节点Cq接收到的所有目标报文,确定出所述节点Cq所属的簇头节点,其中,所述节点Cq所属的簇头节点为所述节点Cq的邻居节点中具有最大剩余能量的簇头节点,所述q∈[1,m’],所述m’为所述第四节点集合中的节点的数量,所述第四节点集合为所述目标传感器网络中除簇头节点之外的所有节点组成的集合;通过所述节点Cq向所述节点Cq所属的簇头节点发送请求报文,其中,所述请求报文用于请求所述节点Cq所属的簇头节点将所述节点Cq添加为自身的簇成员节点。通过上述实施例,在确定出第四集合中的每个节点所属的簇头节点后,实现了将目标传感器网络划分了多个簇。Optionally, according to the connected dominating set, clustering the nodes in the target sensor network to obtain a plurality of clusters in the target sensor network, comprising: sending each cluster head node to each cluster head node. Each neighbor node of the cluster head node broadcasts a target packet, wherein the target packet carries the node identifier of the cluster head node sending the target packet and the rest of the cluster head node sending the target packet Energy information; for each node Cq in the fourth node set, according to all target packets received by the node Cq, determine the cluster head node to which the node Cq belongs, wherein the cluster head to which the node Cq belongs The node is the cluster head node with the largest residual energy among the neighbor nodes of the node Cq, the q∈[1, m'], the m' is the number of nodes in the fourth node set, the The four-node set is a set composed of all nodes in the target sensor network except the cluster head node; a request message is sent through the node Cq to the cluster head node to which the node Cq belongs, wherein the request message It is used to request the cluster head node to which the node Cq belongs to add the node Cq as its own cluster member node. Through the above embodiment, after the cluster head node to which each node in the fourth set belongs is determined, the target sensor network is divided into multiple clusters.
可选地,所述通过所述连通支配集中的节点,将所述多个簇中至少一个簇中的簇成员节点发送的数据中转至基站,包括:对所述至少一个簇中的至少一个簇成员节点发送的数据执行以下操作,直至当前簇头节点的邻居节点为所述基站,其中,当前簇头节点被初始化为所述至少一个簇成员节点所属的簇头节点:通过所述当前簇头节点接收所述当前簇头节点所在簇的簇成员节点发送的数据;通过所述当前簇头节点对从所述当前簇头节点所在簇的簇成员节点接收到的数据以及所述当前簇头节点从所述当前簇头节点的子节点接收到的数据进行线性组合,得到第一数据,并将所述第一数据发送给所述当前簇头节点的父节点,其中,所述子节点的层级标识小于所述当前簇头节点的层级标识、且所述子节点为所述当前簇头节点的邻居节点中的一个簇头节点,所述父节点的层级标识大于所述当前簇头节点的层级标识、且所述父节点为所述当前簇头节点的邻居节点中的一个簇头节点;将所述当前簇头节点的所述父节点确定为所述当前簇头节点。Optionally, transferring the data sent by the cluster member nodes in at least one of the multiple clusters to the base station through the nodes in the connectivity dominance set includes: sending data to at least one cluster in the at least one cluster. The data sent by the member node performs the following operations until the neighbor node of the current cluster head node is the base station, wherein the current cluster head node is initialized as the cluster head node to which the at least one cluster member node belongs: through the current cluster head node The node receives the data sent by the cluster member node of the cluster where the current cluster head node is located; the current cluster head node pairs the data received from the cluster member node of the cluster where the current cluster head node is located and the current cluster head node. Linearly combine the data received from the child nodes of the current cluster head node to obtain first data, and send the first data to the parent node of the current cluster head node, wherein the level of the child node is The identification is smaller than the level identification of the current cluster head node, and the child node is a cluster head node in the neighbor nodes of the current cluster head node, and the level identification of the parent node is greater than the level of the current cluster head node. and the parent node is a cluster head node among the neighbor nodes of the current cluster head node; the parent node of the current cluster head node is determined as the current cluster head node.
以下结合一示例对上述实施例中的数据传输方法进行解释说明,但不用于限定本发明实施例的技术方案。The data transmission method in the above embodiment is explained below with reference to an example, but is not used to limit the technical solution of the embodiment of the present invention.
相关技术中,存在以下几个方面的问题:第一,相关技术中的方案基本都是假设感知矩阵为稠密矩阵(矩阵中每个元素都是非零元素)的情况下执行的,而实际上感知矩阵也可以为稀疏矩阵(矩阵中大部分元素为零元素),基于稀疏矩阵的压缩感知数据收集方法可以进一步提高数据的收集效率;第二,相关技术中的方案都是构建一棵把基站作为根的完全生成树,然后依据生成树收集每个节点的数据,在测量值的收集过程中,网络内的每个节点都需要发送数据;第三,处于传输主干中的各簇头节点将融合的数据直接发送给基站,从而导致距离基站较远的支配节点将数据直接传输给基站时所产生的能量的大量而又不必要的消耗。而在本发明实施例中,提供的是一种将连通支配集和压缩数据收集相结合的压缩数据收集方法。通过本发明实施例,实现了节省数据收集时节点的能量消耗同时,也做到了利用稀疏随机矩阵的压缩感知来提高无线传感器网络的数据收集效率,同时实现了在无线传感器网络中基于流水线技术进行数据收集。In the related art, there are problems in the following aspects: First, the solutions in the related art are basically performed under the assumption that the perception matrix is a dense matrix (each element in the matrix is a non-zero element), but in fact the perception matrix is executed. The matrix can also be a sparse matrix (most elements in the matrix are zero elements), and the compressed sensing data collection method based on sparse matrix can further improve the data collection efficiency; The complete spanning tree of the root, and then collect the data of each node according to the spanning tree. In the process of collecting the measurement value, each node in the network needs to send data; third, each cluster head node in the transmission backbone will merge The data is directly sent to the base station, resulting in a large and unnecessary consumption of the energy generated when the dominant node far from the base station transmits the data directly to the base station. However, in the embodiment of the present invention, a compressed data collection method is provided that combines the connected dominating set and the compressed data collection. Through the embodiments of the present invention, the energy consumption of nodes during data collection is saved, and the compressed sensing of sparse random matrix is used to improve the data collection efficiency of the wireless sensor network, and at the same time, the data collection efficiency of the wireless sensor network based on the pipeline technology is realized. data collection.
在本发明实施例中,建立合理的连通支配集构成数据传输的传输主干,并由此通过合理的分簇算法形成各个分布合理均匀的簇。其中,采用分层扩散式的方式来选择支配节点,具体是从汇聚节点开始,逐层向下进行筛选,直到遍历整个无线传感网络为止;以及在基于稀疏矩阵的压缩感知数据收集方法中,只有需要发送数据的节点参与测量值的收集,因此可以节省能量和缩短数据收集延迟;此外,处于传输主干中的各簇头节点不再将融合的数据直接发送给基站,而是采用分层传输的方式进行,这样就能避免距离基站较远的支配节点将数据直接传输给基站时所产生的能量的大量而又不必要的消耗。In the embodiment of the present invention, a reasonable connected dominating set is established to constitute the transmission backbone of the data transmission, and thus each reasonably distributed cluster is formed through a reasonable clustering algorithm. Among them, a hierarchical diffusion method is used to select the dominant node, specifically starting from the sink node, and filtering down layer by layer until the entire wireless sensor network is traversed; and in the sparse matrix-based compressed sensing data collection method, Only the nodes that need to send data participate in the collection of measurement values, so energy can be saved and data collection delay can be shortened; in addition, each cluster head node in the transmission backbone no longer sends the merged data directly to the base station, but adopts hierarchical transmission. In this way, the large and unnecessary consumption of energy generated when the dominant node far away from the base station transmits data directly to the base station can be avoided.
本发明的一个可选实施例中,提供了一种基于分层扩散连通支配集的数据收集方法(即数据传输方法),包括以下步骤:In an optional embodiment of the present invention, there is provided a data collection method (that is, a data transmission method) based on a hierarchical diffusion connected dominating set, including the following steps:
步骤1,分簇算法初始化阶段:预先将n′+1个传感器节点(以目标传感器网络中的汇聚节点的数量为1,目标传感器网络中除汇聚节点之外的节点的数量为n′为例,可选地,n′+1=n)随机地部署在目标传感器网络的预设区域内(包括但不限于一个正方形监测区域);其中,在通过本发明实施例中的方法对目标传感器网络进行簇的划分后,以及簇头节点和簇成员节点构成的网络模型来进行数据的传输。Step 1, the initialization phase of the clustering algorithm: n'+1 sensor nodes (taking the number of sink nodes in the target sensor network as 1 and the number of nodes other than sink nodes in the target sensor network as n' as an example) , optionally, n′+1=n) is randomly deployed in a preset area of the target sensor network (including but not limited to a square monitoring area); After the cluster is divided, the network model composed of the cluster head node and the cluster member nodes is used to transmit the data.
步骤2,最大独立集构造过程:在本发明实施例中,先构造分层扩散式的最大独立集,再基于该最大独立集确定连通支配集。其中,汇聚节点发送通知报文开启最大独立集的构造过程,其它节点通过接收到的通知报文中携带的内容确定自己的节点属性,并继续向各自的邻居节点发送通知报文以确定下一层节点的节点属性,直到所有节点筛选完毕则完成最大独立集的构造过程;Step 2, the maximum independent set construction process: In the embodiment of the present invention, a hierarchical diffusion type maximum independent set is constructed first, and then a connected dominating set is determined based on the maximum independent set. Among them, the sink node sends a notification message to start the construction process of the largest independent set, and other nodes determine their own node attributes through the content carried in the received notification message, and continue to send notification messages to their respective neighbor nodes to determine the next The node attributes of the layer nodes, until all nodes are screened, the construction process of the largest independent set is completed;
需要说明的是,在上述实施例中,在对所有节点完成筛选后(即对所有节点的节点属性完成更新后)所有节点的节点属性均为目标属性,即完成筛选后,所有节点的节点属性均为以下属性之一:第一属性,第二属性。可选地,如图2所示,通过不同的图标表示具有不同节点属性的节点,其中,节点属性为空的节点又称为白色节点,具有第一属性的节点又称为黑色节点,具有第二属性的节点又称为灰色节点,具有第三属性的节点又称为绿色节点;在节点属性为第二属性的节点符合预设条件时,该节点的节点属性更新为第四属性,该节点成为目标节点,并且目标节点的节点属性最终更新为第一属性,具有第四属性的节点又称为蓝色节点。It should be noted that, in the above embodiment, after all nodes are screened (that is, after updating the node attributes of all nodes), the node attributes of all nodes are the target attributes, that is, after the screening is completed, the node attributes of all nodes are Both are one of the following attributes: first attribute, second attribute. Optionally, as shown in FIG. 2 , nodes with different node attributes are represented by different icons, wherein a node with an empty node attribute is also called a white node, a node with the first attribute is also called a black node, and the node with the first attribute is also called a black node. The node with the second attribute is also called the gray node, and the node with the third attribute is also called the green node; when the node whose node attribute is the second attribute meets the preset conditions, the node attribute of the node is updated to the fourth attribute, and the node become the target node, and the node attribute of the target node is finally updated to the first attribute, and the node with the fourth attribute is also called the blue node.
步骤3,连通支配集构造过程:每个灰色节点查找自己的邻居节点中是否有两个以上的黑色节点,并通过条件筛选部分灰色节点成为连接节点与原有的黑色节点共同构成最终的连通支配集。Step 3: Connected domination set construction process: each gray node finds out whether there are more than two black nodes in its neighbor nodes, and filters some gray nodes to become connected nodes and the original black nodes through the conditional filter to form the final connected domination. set.
步骤4,根据连通支配集构成簇的过程:所有的灰色节点通过寻找各自的邻居节点中剩余能量最高的黑色节点,并成为以给黑色节点为簇头节点的簇中的簇成员节点;其中,当所有灰色节点都确定自己所归属的簇之后,则完成了分簇过程。Step 4: The process of forming a cluster according to the connected dominating set: all the gray nodes become the cluster member nodes in the cluster with the black node as the cluster head node by finding the black node with the highest residual energy in their respective neighbor nodes; among them, When all gray nodes have determined the cluster to which they belong, the clustering process is completed.
步骤5,数据传输初始化阶段:目标传感器网络中的所有位于连通支配集内的传感器节点生成一个统一的稀疏随机矩阵(即感知矩阵A∈R
m×n),其中,传感器节点可以在测量值收集过程(即数据传输过程)依据该随机矩阵计算所需要传输的数据。
Step 5, data transmission initialization phase: all sensor nodes in the target sensor network that are located in the connected dominating set generate a uniform sparse random matrix (ie, the perception matrix A∈Rm ×n ), in which the sensor nodes can collect the measured values. The process (ie, the data transmission process) calculates the data to be transmitted according to the random matrix.
步骤6,数据传输过程:簇成员节点将自己所要传输的数据首先传输给各自的簇头节点,各个簇头节点再将数据转换成多个数据样本点通过压缩数据收集方法逐层向上一层级传输,最终传输给基站。同时在簇头节点间的数据样本点传输过程中还采用了流水线技术,在上一轮数据样本点传输还没结束时下一轮的传输已经开始。Step 6, data transmission process: the cluster member nodes first transmit the data to be transmitted to their respective cluster head nodes, and each cluster head node then converts the data into multiple data sample points and transmits it layer by layer to the next layer through the compressed data collection method. , and finally transmitted to the base station. At the same time, the pipeline technology is also adopted in the process of data sample point transmission between cluster head nodes, and the next round of transmission has already started before the previous round of data sample point transmission has ended.
步骤7,网络中原始数据的提取:基站在收集到足够多的测量值之后,根据数据恢复算法恢复 出每个传感器的原始数据。Step 7: Extraction of original data in the network: After the base station has collected enough measurement values, it recovers the original data of each sensor according to the data recovery algorithm.
可选地,上述步骤1包括以下步骤:步骤1.1:所有节点初始颜色均为白色(其中,节点的颜色即节点的节点属性,即所有节点的节点属性设置为空),在执行完本实施例中的方法后,所有节点最终转化为黑色节点或灰色节点。黑色表示节点被选择加入最大独立集成为簇头节点;绿色表示节点处于活动状态;灰色表示未加入最大独立集的簇成员节点;蓝色表示灰色节点被选择为连接节点(即上述实施例中的目标节点)。步骤1.2:各节点广播第一报文(例如,Msg_Build报文),其中携带节点各自的节点标识(包括但不限于节点标识(例如,节点ID))和编号(即上述实施例中的层级标识);通过接收其他节点发送的Msg_Build报文,各节点可以构造各自的邻居节点信息表。其中,邻居节点信息表为一个z×4的二维数组,其中z为各自周围的邻居节点数量,第1列为邻居节点的编号,第2列为邻居节点的颜色(每个节点的初始颜色均为白色),第3列为邻居节点周围的黑色节点的数量(该列的初值为零),第4列为各个邻居节点的剩余能量。Optionally, the above step 1 includes the following steps: Step 1.1: the initial color of all nodes is white (wherein, the color of the node is the node attribute of the node, that is, the node attribute of all nodes is set to be empty), after the implementation of this embodiment is completed. After the method in , all nodes are finally transformed into black nodes or gray nodes. Black indicates that the node is selected to join the maximum independent set as the cluster head node; green indicates that the node is in an active state; gray indicates that the cluster member node that has not joined the maximum independent set; blue indicates that the gray node is selected as the connecting node (that is, the target node). Step 1.2: Each node broadcasts a first message (for example, Msg_Build message), which carries the respective node identifiers (including but not limited to node identifiers (for example, node IDs)) and numbers (that is, the hierarchical identifiers in the above-mentioned embodiments) of the nodes. ); by receiving the Msg_Build message sent by other nodes, each node can construct its own neighbor node information table. Among them, the neighbor node information table is a z×4 two-dimensional array, where z is the number of neighbor nodes around each, the first column is the number of the neighbor node, and the second column is the color of the neighbor node (the initial color of each node). are all white), the third column is the number of black nodes around the neighbor node (the initial value of this column is zero), and the fourth column is the remaining energy of each neighbor node.
可选地,上述步骤2包括如下步骤:步骤2.1:将汇聚节点的节点属性更新为第一属性,即汇聚节点先将自己标为黑色,并发送第二报文(例如Msg_Deliver报文),Msg_Deliver报文中包含自己的编号f(即层级标识:f),其中汇聚节点的f=1。然后,汇聚节点同时发送第三报文(例如Msg_Dominator报文,或称为sink报文),并启动最大独立集(Maximum Independent Set,简称为MIS)的构造过程。步骤2.2:汇聚节点的邻居节点,即一跳节点收到报文后将自己的编号设置为f=f+1,并继续发送第四报文(例如Msg_Deliver报文)给下一跳节点。以此类推,最终各个节点根据自己距离汇聚节点的跳数设置完成自己的编号。步骤2.3:收到汇聚节点发送的Msg_Dominator报文的白色节点将汇聚节点设为父亲节点,并在自己的邻居节点信息表中将该节点颜色标记为黑色,同时将自己标记为灰色节点,发送第五报文(例如Msg_Dominatee报文)。步骤2.4:若其他白色节点收到邻居节点发送的Msg_Dominatee报文,则将自己标为绿色(绿色对应于上述实施例中的第三属性),同时进入活动状态,发送第六报文(例如Msg_Active报文)。该报文中携带了其周围的白色邻居节点的数量以及自己剩余能量的信息;若白色节点既收到了Msg_Dominator报文,又收到了Msg_Dominatee报文,那么Msg_Dominator报文的优先级更高,白色节点将自己标为灰色,并发送Msg_Dominatee报文;若绿色节点从邻居节点处收到Msg_Dominatee报文,则将邻居节点表中该节点对应的第2列标为灰色;若绿色节点从邻居节点处收到Msg_Active报文,则将邻居节点表中对应的第2列标为绿色;此时相邻的绿色节点参与竞选,若某绿色节点在其绿色邻居节点中拥有最大剩余能量,则将自己标为黑色,并发送Msg_Dominator报文;若绿节点收到邻居节点发送的Msg_Dominator报文,则将其设为父亲节点,然后更新邻居节点表中该节点的颜色为黑色,并将自己标为灰色,发送Msg_Dominatee报文,至此该节点此轮参与的竞选结束。步骤2.5:若灰节点收到邻居节点发送的Msg_Dominator报文,则将邻居节点表中节点的颜色标为黑色;若灰节点收到邻居节点发送的Msg_Dominatee报文,则将邻居节点表中节点的颜色标为灰色,直至网络内没有白色节点为止则一轮确定最大独立集的过程结束。Optionally, the above step 2 includes the following steps: Step 2.1: Update the node attribute of the sink node to the first attribute, that is, the sink node first marks itself as black, and sends a second packet (for example, a Msg_Deliver packet), Msg_Deliver The message contains its own number f (ie, the level identifier: f), where f=1 of the sink node. Then, the sink node sends a third message (for example, a Msg_Dominator message, or a sink message) at the same time, and starts the process of constructing a maximum independent set (Maximum Independent Set, MIS for short). Step 2.2: The neighbor node of the sink node, that is, the first-hop node sets its own number to f=f+1 after receiving the message, and continues to send the fourth message (eg Msg_Deliver message) to the next-hop node. By analogy, each node finally completes its own number according to the setting of the number of hops away from the sink node. Step 2.3: The white node that receives the Msg_Dominator message sent by the sink node sets the sink node as the parent node, and marks the node color as black in its neighbor node information table, and marks itself as a gray node, and sends the first node. Five messages (eg Msg_Dominatee message). Step 2.4: If other white nodes receive the Msg_Dominatee message sent by the neighbor node, they will mark themselves as green (green corresponds to the third attribute in the above embodiment), enter the active state at the same time, and send the sixth message (for example, Msg_Active). message). The message carries the information about the number of surrounding white neighbor nodes and its remaining energy; if the white node receives both the Msg_Dominator message and the Msg_Dominatee message, the Msg_Dominator message has a higher priority, and the white node has a higher priority. Mark itself as gray, and send Msg_Dominatee message; if green node receives Msg_Dominatee message from neighbor node, it will mark the second column corresponding to this node in neighbor node table as gray; if green node receives Msg_Dominatee message from neighbor node To the Msg_Active message, mark the corresponding second column in the neighbor node table as green; at this time, the adjacent green nodes participate in the election. If a green node has the largest remaining energy in its green neighbor nodes, it will mark itself as black, and send the Msg_Dominator message; if the green node receives the Msg_Dominator message sent by the neighbor node, set it as the parent node, then update the color of the node in the neighbor node table to black, mark itself as gray, and send Msg_Dominatee message, so far the node's participation in this round of election is over. Step 2.5: If the gray node receives the Msg_Dominator message sent by the neighbor node, the color of the node in the neighbor node table is marked as black; if the gray node receives the Msg_Dominatee message sent by the neighbor node, the node in the neighbor node table The color is marked as gray, and the round of determining the maximum independent set ends until there are no white nodes in the network.
需要说明的是,上述实施例中的通知报文包括上述第三报文和第五报文,其中第三报文中携带了发送该第三报文的节点的节点标识、节点属性,还可以包括发送该第三报文的节点的层级标识;第五报文中携带了发送该第五报文的节点的节点标识、节点属性,还可以包括发送该第五报文的节点的层级标识。It should be noted that the notification message in the above embodiment includes the above-mentioned third message and the fifth message, wherein the third message carries the node identifier and node attribute of the node sending the third message, and may also It includes the hierarchical identifier of the node sending the third message; the fifth message carries the node identifier and node attribute of the node sending the fifth message, and may also include the hierarchical identifier of the node sending the fifth message.
图3为目标传感器网络的初始状态的示意图,其中,节点A为汇聚节点,并由节点A发起最大独立集构造过程,以图3为例,最大独立集的构造构成如下:节点A发送Msg_Dominator报文后,节点{B,C,D,E}标记自身为灰色且设置自己的编号为2同时向各自的邻居节点发送 Msg_Dominatee报文,并且确定节点{B,C,D,E}的父亲节点为A节点。节点{F,G,H}接收到Msg_Dominatee报文后标记自身为绿色,并且设置自己的编号为3,同时发送Msg_Active报文参与竞争,其中,竞争过程如下:首先比较节点{F,G,H}的剩余能量,最终剩余能量更高的F节点成为黑色簇头并发送Msg_Dominator报文。由于节点{F,G,H}串联(即三个节点组成一条连通路径)且同时参与竞争,节点G收到F发出的Msg_Dominator报文后变为灰色并发送Msg_Dominatee报文,接下来节点H接收到Msg_Dominatee报文后成为黑色簇头节点并发送Msg_Dominator报文,最终形成同一层中多个串联的绿色节点最终形成每个黑色节点中串联一个灰色节点的情况。Figure 3 is a schematic diagram of the initial state of the target sensor network, in which node A is a sink node, and node A initiates the construction process of the maximum independent set. Taking Figure 3 as an example, the construction of the maximum independent set is as follows: Node A sends a Msg_Dominator report After the message, the node {B,C,D,E} marks itself as gray and sets its own number to 2 and sends Msg_Dominatee messages to the respective neighbor nodes, and determines the parent node of the node {B,C,D,E} is the A node. After receiving the Msg_Dominatee message, the node {F,G,H} marks itself as green, and sets its own number to 3, and sends the Msg_Active message to participate in the competition. The competition process is as follows: First, compare the nodes {F,G,H } remaining energy, and finally the F node with higher remaining energy becomes the black cluster head and sends the Msg_Dominator message. Since the nodes {F, G, H} are connected in series (that is, three nodes form a connected path) and compete at the same time, node G turns gray after receiving the Msg_Dominator message sent by F and sends the Msg_Dominatee message, and then node H receives the message. After reaching the Msg_Dominatee message, it becomes the black cluster head node and sends the Msg_Dominator message, and finally forms multiple green nodes connected in series in the same layer and finally forms a situation where each black node is connected in series with a gray node.
节点I接收到节点G发送的Msg_Dominatee报文,同时接收到节点F发送的Msg_Dominator报文后成为新的灰色节点,并且设置自己的编号为4,并发送Msg_Dominatee报文,这时节点I的父亲节点为G节点或者是F节点;节点J接收到节点G发送的Msg_Dominatee报文后成为黑色节点且设置自己的编号为4,并发送Msg_Dominator报文,这时节点J的父亲节点为G节点。同时节点K接收到节点H发送的Msg_Dominator报文,同时接收到节点G发送的Msg_Dominatee报文后成为新的灰色节点,且设置自己的编号为4,并发送Msg_Dominatee报文,这时节点K的父亲节点为G节点或者是H节点。而节点L接收到节点H发送的Msg_Dominator报文后成为新的灰色节点且设置自己的编号为4,并发送Msg_Dominatee报文,这时节点L的父亲节点为H节点。Node I receives the Msg_Dominatee message sent by node G, and becomes a new gray node after receiving the Msg_Dominator message sent by node F, and sets its own number to 4, and sends the Msg_Dominatee message. At this time, the parent node of node I It is node G or node F; node J becomes a black node after receiving the Msg_Dominatee message sent by node G, and sets its own number to 4, and sends a Msg_Dominator message. At this time, the parent node of node J is node G. At the same time, node K receives the Msg_Dominator message sent by node H, and becomes a new gray node after receiving the Msg_Dominatee message sent by node G, and sets its own number to 4, and sends the Msg_Dominatee message. At this time, the father of node K The node is either a G node or an H node. After receiving the Msg_Dominator message sent by node H, node L becomes a new gray node and sets its own number to 4, and sends the Msg_Dominatee message. At this time, the parent node of node L is node H.
图4中示出了按上述步骤形成的一个目标传感器网络中的最大独立集,其中最大独立集是由节点A、节点F、节点H以及节点J组成的集合,最大独立集中的所有节点的节点属性均为第一属性。Figure 4 shows the maximum independent set in a target sensor network formed according to the above steps, wherein the maximum independent set is a set composed of node A, node F, node H and node J, and the nodes of all nodes in the maximum independent set are Attributes are all first attributes.
可选地,上述步骤3包括如下步骤:步骤3.1:汇聚节点向邻居节点发送Msg_Deliver报文,报文中包含自己的编号f(汇聚节点的f=1)。步骤3.2:汇聚节点的邻居节点,即一跳节点收到报文后将自己的编号设置为f,其中f=f+1并继续发送Msg_Deliver报文给下一跳节点。步骤3.3:以此类推,各个节点根据自己距离汇聚节点的跳数设置完成自己的编号。步骤3.4:每个灰色节点查找自己的邻居节点中是否有两个以上的黑色节点且满足以下情况中的一种:黑色节点分别是自己的上一跳节点和与自己同一跳即编号相同的节点;黑色节点分别是自己的下一跳节点和与自己同一跳即编号相同的节点;黑色节点分别是自己的上一跳节点和下一跳节点。步骤3.5:若满足以上情况则将该节点标为蓝色,并由该节点发送第七报文(例如Msg_Border报文),当邻居节点中的黑色节点收到Msg_Border报文后则建立与该蓝色节点的连接。需要说明的是,蓝色节点即上述实施例中的第三节点集合中的一个目标节点;其中,当一个蓝色节点与最大独立集中的一个节点存在相同的邻居节点,并且所述相同的邻居节点是所述最大独立集中的一个节点时,取消将该蓝色节点标为蓝色,即将该蓝色节点恢复为灰色节点(对应于将该节点的节点属性恢复为第二属性)。步骤3.6:当所有的灰色节点都经历了上述的筛选步骤之后,将所有的蓝色节点标记为黑色节点,这样所有的黑色节点则构成了一个连通支配集。Optionally, the above step 3 includes the following steps: Step 3.1: the sink node sends a Msg_Deliver message to the neighbor node, and the message includes its own number f (f=1 of the sink node). Step 3.2: The neighbor node of the sink node, that is, the first-hop node sets its own number to f after receiving the message, where f=f+1 and continues to send the Msg_Deliver message to the next-hop node. Step 3.3: By analogy, each node completes its own number according to the setting of the number of hops away from the sink node. Step 3.4: Each gray node looks up whether there are more than two black nodes in its neighbor nodes and one of the following conditions is satisfied: The black nodes are its own previous hop node and the node with the same hop as itself, that is, the same number. ; The black nodes are their own next hop node and the node with the same hop number as their own respectively; the black nodes are their own previous hop node and next hop node respectively. Step 3.5: If the above conditions are met, the node will be marked as blue, and the node will send the seventh message (eg Msg_Border message). When the black node in the neighbor node receives the Msg_Border message, it will establish a connection with the blue connection of colored nodes. It should be noted that the blue node is a target node in the third node set in the above embodiment; wherein, when a blue node and a node in the maximum independent set have the same neighbor node, and the same neighbor node When the node is a node in the maximum independent set, the blue node is cancelled to be marked as blue, that is, the blue node is restored to a gray node (corresponding to restoring the node attribute of the node to the second attribute). Step 3.6: After all the gray nodes have gone through the above screening steps, mark all the blue nodes as black nodes, so that all the black nodes constitute a connected dominating set.
在基于最大独立集确定连通支配集的过程中,主要涉及到了连通支配集中的连接节点的选择,具体步骤如下:In the process of determining the connected dominating set based on the maximum independent set, it mainly involves the selection of the connected nodes in the connected dominating set. The specific steps are as follows:
首先从汇聚节点A开始往下一跳开始筛选,处于第二跳的节点{B,C,D,E}都为灰色节点,则继续进入下一跳(即进入下一层节点的筛选)。此时编号为3的黑色节点{F,H}处于这一跳,并且邻居节点中有处于上一跳编号为2的灰色节点D可同时将两个节点与编号为1的黑色节点A连接,因此节点D被选为连接节点,之后再进入下一跳。继续检查处于编号为4中的节点中有黑色节点J,它的邻居节点中有处于上一跳编号为3的灰色节点G与编号为3的黑色节点{F,H}连接,因此 节点G被选为连接节点。当所有灰色节点筛选完毕后将所有的蓝色节点标为黑色节点。First, start filtering from the sink node A to the next hop. The nodes {B, C, D, E} in the second hop are all gray nodes, and then continue to enter the next hop (that is, enter the screening of the next layer of nodes). At this time, the black node {F,H} numbered 3 is in this hop, and there is a gray node D in the previous hop number 2, which can connect the two nodes to the black node A numbered 1 at the same time, Therefore, node D is selected as the connecting node before entering the next hop. Continue to check that there is a black node J in the node numbered 4, and its neighbor nodes have a gray node G in the previous hop numbered 3 connected to the black node {F,H} numbered 3, so node G is Selected as the connection node. When all gray nodes are filtered out, mark all blue nodes as black nodes.
图5为根据本发明实施例的目标传感器网络中的连通支配集的示意图,其中,连通支配集为由节点A、节点D、节点F、节点G、节点H、节点J组成的集合,并且连通支配集中的主干节点即节点A、节点D、节点G、节点J组成一条连通路径。5 is a schematic diagram of a connected dominating set in a target sensor network according to an embodiment of the present invention, wherein the connected dominating set is a set consisting of node A, node D, node F, node G, node H, and node J, and is connected to The backbone nodes in the domination set, namely node A, node D, node G, and node J, form a connected path.
可选地,上述步骤4包括如下步骤:步骤4.1:处在连通支配集中的节点向周围的邻居节点发送自己成为簇头节点的报文Msg_Head(即上述实施例中的目标报文),且在该报文中添加了自己的剩余能量信息。步骤4.2:簇成员节点则根据收到的一个或几个来自不同簇头节点的Msg_Head报文,确定出剩余能量最多的簇头节点,并向剩余能量最多的簇头节点发送Msg_Join报文以申请加入该剩余能量最多的簇头节点对应的簇。步骤4.3:簇头节点接收来自其簇内成员节点发送的Msg_Join报文,并且将不属于本簇的节点在自己的邻居节点信息汇总表中删除。Optionally, the above step 4 includes the following steps: Step 4.1: The node in the connectivity dominance set sends the message Msg_Head (that is, the target message in the above embodiment) that it becomes the cluster head node to the surrounding neighbor nodes, and in the The message adds its own remaining energy information. Step 4.2: The cluster member node determines the cluster head node with the most remaining energy according to one or several Msg_Head packets received from different cluster head nodes, and sends a Msg_Join packet to the cluster head node with the most remaining energy to apply for Join the cluster corresponding to the cluster head node with the most remaining energy. Step 4.3: The cluster head node receives the Msg_Join message sent from the member nodes in its cluster, and deletes the nodes that do not belong to the cluster from its neighbor node information summary table.
图6为根据本发明实施例的目标传感器网络分簇的示意图,其中,节点B、节点E、节点C加入到了簇头节点A所在的簇,节点I加入到了簇头节点F所在的簇,节点K、节点L加入到了簇头节点H所在的簇。6 is a schematic diagram of clustering a target sensor network according to an embodiment of the present invention, wherein node B, node E, and node C join the cluster where the cluster head node A is located, node I joins the cluster where the cluster head node F is located, and the node K. Node L joins the cluster where the cluster head node H is located.
可选地,上述步骤6包括如下步骤:步骤6.1:首先簇头节点根据向基站传输数据所要经过的节点跳数来确定自己所属的层级。经过一跳直接向基站传输数据的簇头节点被选为一级簇头节点(即层级标识为1),而通过父亲节点向基站传输数据的簇头节点则成为二级簇头节点。以此类推,每多一跳层级就加一。步骤6.2:簇头节点之间的能量传输则运用了压缩数据收集方法,每个节点发送的是原始数据的线性组合而非原始数据本身;其中,各个簇成员节点向自己所归属的簇头节点发送原始数据,每个簇头节点接收到数据后将这些数据与前一跳节点接收到的数据进行线性组合得到m个数据样本点并进行传输,从而使任何链路上的传输数量均为m。其中,每个簇头节点接收到数据后将这些数据与前一跳节点接收到的数据进行线性组合从而使任何链路上的传输数量均为m,包括:Optionally, the above step 6 includes the following steps: Step 6.1: First, the cluster head node determines the level to which it belongs according to the number of node hops through which data is transmitted to the base station. The cluster head node that transmits data directly to the base station after one hop is selected as the first-level cluster head node (ie, the level ID is 1), and the cluster head node that transmits data to the base station through the parent node becomes the second-level cluster head node. And so on, adding one for each additional hop level. Step 6.2: The energy transmission between the cluster head nodes uses the compressed data collection method, and each node sends a linear combination of the original data instead of the original data itself; among them, each cluster member node sends the data to the cluster head node to which it belongs. Send the original data. After each cluster head node receives the data, it linearly combines the data with the data received by the previous hop node to obtain m data sample points and transmits them, so that the number of transmissions on any link is m . Among them, after each cluster head node receives data, it linearly combines the data with the data received by the previous hop node so that the number of transmissions on any link is m, including:
根据公式
计算得到各个y
j,并在每次传输中传输其中的一个y,即通过m次传输完成对y
1直至y
j的传输,从而实现在链路上的数据传输量为m。步骤6.3:在不影响前一轮传输的情况下,处于上一层级的簇头节点一轮传输结束后,经过受干扰半径条件影响的传输条件判定,在一段短暂的待机时间之后,处于下一层级的簇头节点就开始进行下一轮的数据样本点传输,而不是在整个无线网络进行完一轮数据传输之后才开始进行下一轮传输,其中,待机时间是根据受干扰半径条件影响的传输条件确定出的。
According to the formula Each y j is obtained by calculation, and one of y is transmitted in each transmission, that is, the transmission of y 1 to y j is completed through m times of transmission, so that the data transmission amount on the link is m. Step 6.3: Without affecting the previous round of transmission, after a round of transmission of the cluster head node at the previous level is completed, after the transmission condition is determined by the interference radius condition, after a short standby time, it is in the next round of transmission. The cluster head node of the hierarchical level starts the next round of data sample point transmission, instead of starting the next round of data transmission after the entire wireless network has completed one round of data transmission. Among them, the standby time is affected by the condition of the interference radius. The transmission conditions are determined.
在上述实施例中,在无线网络的数据收集过程中应用了压缩感知理论,因此能从较少量的原始信号的线性组合中提取出原始信号。而相关技术中应用稠密的感知矩阵的方案中,感知矩阵中的每个元素都是非零的,因此在应用压缩感知技术收集测量值的过程中往往需要构造一棵完全生成树,一棵以基站为根,并且覆盖每个节点的生成树,生成树上的每个节点都需将自己的数据发送给基站。然而,在上述实施例中,所采用的稀疏的感知矩阵在恢复原始信号方面的性能可以达到和稠密的感知矩阵同等程度,通过上述实施例可以构造出应用在压缩感知技术中的稀疏随机矩阵。并且,在基于稀疏随机矩阵的压缩感知数据收集过程中,每一轮都值需要那些加权系数不为零的节点将收集的测量值数据发送给基站。除此之外,因为要保证网络的连通性,还有一些节点虽然加权系数为零,但是它们要负责转发数据,以此就可以保证基站能收到所有需要的数据。在上述实施例中,将目标传感器网络分解为一个个不同的蜂窝(簇),蜂窝之间像链条一样相互连接,因此只需让每个蜂窝内至少有一个节点(簇头节点)保持活跃,整个网络的连通性就能得到保证。 上述实施例还采用了流水线技术,即在前一轮测量值收集还没结束的时候就开始下一轮的测量值收集,每个蜂窝发送数据的时间都做到不影响其他数据传输的情况下尽可能的早,以此来降低数据收集的延迟,实现了在降低整个网络的能耗的同时,也能降低数据收集的延迟。此外,因为每个节点在每一轮测量值收集过程中保持活跃的概率相同,所以上述实施例中的数据收集方法同时能保证整个网络的负载也是均衡的。In the above-mentioned embodiment, compressed sensing theory is applied in the data collection process of the wireless network, so the original signal can be extracted from a linear combination of a smaller amount of original signals. However, in the scheme of applying a dense sensing matrix in the related art, each element in the sensing matrix is non-zero. Therefore, in the process of collecting measurement values by applying compressed sensing technology, it is often necessary to construct a complete spanning tree, one based on the base station. It is the root and covers the spanning tree of each node. Each node on the spanning tree needs to send its own data to the base station. However, in the above embodiment, the performance of the sparse sensing matrix used in restoring the original signal can reach the same level as the dense sensing matrix, and a sparse random matrix applied in the compressed sensing technology can be constructed through the above embodiment. Moreover, in the compressed sensing data collection process based on sparse random matrix, each round requires those nodes whose weighting coefficients are not zero to send the collected measurement data to the base station. In addition, in order to ensure the connectivity of the network, although some nodes have a weighting coefficient of zero, they are responsible for forwarding data, so as to ensure that the base station can receive all the required data. In the above embodiment, the target sensor network is decomposed into different cells (clusters), and the cells are connected to each other like a chain, so it is only necessary to keep at least one node (cluster head node) in each cell active, The connectivity of the entire network can be guaranteed. The above embodiment also adopts the pipeline technology, that is, the next round of measurement value collection starts when the previous round of measurement value collection is not over, and the time for each cell to send data does not affect other data transmissions. As early as possible, in order to reduce the delay of data collection, while reducing the energy consumption of the entire network, the delay of data collection can also be reduced. In addition, because each node has the same probability of remaining active during each round of measurement value collection, the data collection method in the above embodiment can also ensure that the load of the entire network is also balanced.
通过上述实施例,可以达到以下技术效果:(1)能耗低:在上述实施例中,并不是每一个传感器都在收集测量值的全程参加到数据接收和发送的过程中,而是只有其中对正在进行的测量有贡献的传感器和中继传感器参与到数据的接收和发送中。而且,当传感器不发送、不接收数据时该传感器就会进入休眠状态来节省能耗。(2)延迟低:在收集每个测量值时,只有其中与该测量值相关的部分节点参与数据的接收和发送,因此通过这种方式收集每个测量值所消耗的时间就会减少。而且,上述实施例中,采用了在前一轮测量值收集还没有完成时,下一轮测量值的收集过程就已经开始的流水线技术,进一步降低了整个数据收集所需的延迟。(3)负载均衡:每个节点收集每轮测量值所需要发送数据的概率都相同。根据概率相关理论,在整个数据收集结束后,每个节点消耗的能量也大致相同,所存在的差异也较小,因此每个传感器的负载较均衡。Through the above embodiment, the following technical effects can be achieved: (1) Low energy consumption: In the above embodiment, not every sensor participates in the process of data reception and transmission during the whole process of collecting measurement values, but only the Sensors and relay sensors that contribute to the ongoing measurement participate in the reception and transmission of data. Moreover, when the sensor is not sending or receiving data, the sensor will enter a sleep state to save energy. (2) Low latency: When collecting each measurement value, only some of the nodes related to the measurement value participate in the reception and transmission of data, so the time consumed by collecting each measurement value in this way will be reduced. Moreover, in the above-mentioned embodiment, the pipeline technology in which the collection process of the next round of measurement values is started before the previous round of measurement value collection is completed, further reduces the delay required for the entire data collection. (3) Load balancing: each node has the same probability of sending data to collect each round of measurement values. According to the probability correlation theory, after the entire data collection is over, the energy consumed by each node is roughly the same, and the difference is also small, so the load of each sensor is more balanced.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation. Based on this understanding, the technical solutions of the present invention can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products are stored in a storage medium (such as ROM/RAM, magnetic disk, CD-ROM), including several instructions to make a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention.
根据本发明的另一个实施例,提供了一种数据传输装置,该装置设置为实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。According to another embodiment of the present invention, a data transmission apparatus is provided, and the apparatus is configured to implement the above-mentioned embodiments and preferred implementations, and what has been described will not be repeated. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, implementations in hardware, or a combination of software and hardware, are also possible and contemplated.
图7是根据本发明一实施例的数据传输装置的结构框图,该装置包括:处理模块72,设置为确定目标传感器网络中的最大独立集,其中,所述最大独立集是由所述目标传感器网络中的两两互不邻接的节点组成的集合,所述目标传感器网络中的每个节点与传感器一一对应;所述处理模块72,还设置为确定所述目标传感器网络中的第一节点集合中的目标节点集合,其中,所述第一节点集合是由所述目标传感器网络中不属于所述最大独立集的节点组成的集合,所述目标节点集合中的每个目标节点均符合预设条件,所述预设条件用于指示一个目标节点在所述最大独立集中存在两个邻居节点;所述处理模块72,还设置为将所述最大独立集以及所述目标节点集合中的每个节点确定为所述目标传感器网络对应的连通支配集中的一个节点,得到所述连通支配集,其中,所述连通支配集中的任意两个节点之间能够互相通信;所述处理模块72,还设置为根据所述连通支配集,对所述目标传感器网络中的节点进行分簇,得到所述目标传感器网络中的多个簇,其中,所述连通支配集中的每个节点为所述多个簇中的一个簇的簇头节点;传输模块74,设置为通过所述连通支配集中的节点,将所述多个簇中至少一个簇中的簇成员节点发送的数据中转至基站。7 is a structural block diagram of a data transmission apparatus according to an embodiment of the present invention, the apparatus includes: a processing module 72 configured to determine a maximum independent set in a target sensor network, wherein the maximum independent set is generated by the target sensor A set of nodes in the network that are not adjacent to each other, each node in the target sensor network corresponds to a sensor one-to-one; the processing module 72 is further configured to determine the first node in the target sensor network The target node set in the set, wherein the first node set is a set composed of nodes in the target sensor network that do not belong to the maximum independent set, and each target node in the target node set meets the predetermined Set a condition, the preset condition is used to indicate that a target node has two neighbor nodes in the maximum independent set; the processing module 72 is further configured to set each of the maximum independent set and the target node set to Each node is determined to be a node in the connected domination set corresponding to the target sensor network, and the connected domination set is obtained, wherein any two nodes in the connected domination set can communicate with each other; the processing module 72, further It is set to cluster the nodes in the target sensor network according to the connected dominating set to obtain a plurality of clusters in the target sensor network, wherein each node in the connected dominating set is the plurality of clusters. A cluster head node of one of the clusters; the transmission module 74 is configured to transfer the data sent by the cluster member nodes in at least one of the multiple clusters to the base station through the nodes in the connectivity control set.
通过本发明,确定目标传感器网络中的最大独立集,其中,所述最大独立集是由所述目标传感器网络中的两两互不邻接的节点组成的集合,所述目标传感器网络中的每个节点与传感器一一对应;确定所述目标传感器网络中的第一节点集合中的目标节点集合,其中,所述第一节点集合 是由所述目标传感器网络中不属于所述最大独立集的节点组成的集合,所述目标节点集合中的每个目标节点均符合预设条件,所述预设条件用于指示一个目标节点在所述最大独立集中存在两个邻居节点;将所述最大独立集以及所述目标节点集合中的每个节点确定为所述目标传感器网络对应的连通支配集中的一个节点,得到所述连通支配集,其中,所述连通支配集中的任意两个节点之间能够互相通信;根据所述连通支配集,对所述目标传感器网络中的节点进行分簇,得到所述目标传感器网络中的多个簇,其中,所述连通支配集中的每个节点为所述多个簇中的一个簇的簇头节点;通过所述连通支配集中的节点,将所述多个簇中至少一个簇中的簇成员节点发送的数据中转至基站。因此,可以解决相关技术中,在传感器网络中进行数据传输时,节点消耗能量较多的技术问题,减小了传感器网络中的节点的能量消耗,延长了节点的寿命。Through the present invention, the maximum independent set in the target sensor network is determined, wherein the maximum independent set is a set composed of nodes in the target sensor network that are not adjacent to each other, each of the target sensor network One-to-one correspondence between nodes and sensors; determining a target node set in a first node set in the target sensor network, wherein the first node set is composed of nodes in the target sensor network that do not belong to the maximum independent set Each target node in the target node set conforms to a preset condition, and the preset condition is used to indicate that a target node has two neighbor nodes in the maximum independent set; the maximum independent set And each node in the target node set is determined as a node in the connected domination set corresponding to the target sensor network, and the connected domination set is obtained, wherein any two nodes in the connected domination set can communicate with each other. communication; according to the connected domination set, cluster the nodes in the target sensor network to obtain a plurality of clusters in the target sensor network, wherein each node in the connected domination set is the plurality of clusters A cluster head node of one of the clusters; through the nodes in the connectivity control set, the data sent by the cluster member nodes in at least one of the multiple clusters is forwarded to the base station. Therefore, in the related art, the technical problem that the nodes consume more energy during data transmission in the sensor network can be solved, the energy consumption of the nodes in the sensor network is reduced, and the lifespan of the nodes is prolonged.
可选地,所述处理模块,还设置为在所述确定目标传感器网络中的最大独立集之前,将所述目标传感器网络中的所有节点的节点属性设置为空;其中,所述处理模块,还设置为:将所述目标传感器网络中的汇聚节点的节点属性更新为第一属性,以及根据所述目标传感器网络中除所述汇聚节点之外的每个节点s
h的节点属性和所述节点s
h从所述节点s
h的邻居节点接收到的通知报文,对所述节点s
h的节点属性进行更新,以将所述目标传感器网络中所有节点的节点属性更新至目标属性,其中,所述h∈[1,n′],所述n′为所述目标传感器网络中除所述汇聚节点之外的节点的数量,所述通知报文中携带有发送所述通知报文的节点的节点属性,所述目标属性包括所述第一属性和第二属性,每个具有所述第一属性的节点被确定为所述最大独立集中的一个节点,每个具有所述第二属性的节点被确定为所述第一节点集合中的一个节点。
Optionally, the processing module is further configured to set the node attributes of all nodes in the target sensor network to null before the determination of the maximum independent set in the target sensor network; wherein the processing module, It is also set to: update the node attribute of the sink node in the target sensor network to the first attribute, and according to the node attribute of each node sh in the target sensor network except the sink node and the The notification message received by the node sh from the neighbor nodes of the node sh updates the node attribute of the node sh, so as to update the node attributes of all nodes in the target sensor network to the target attribute, wherein , the h∈[1, n′], where n′ is the number of nodes in the target sensor network other than the sink node, and the notification message carries the information that sends the notification message a node attribute of a node, the target attribute includes the first attribute and a second attribute, each node with the first attribute is determined as a node in the maximum independent set, each with the second attribute The node of is determined as a node in the first node set.
可选地,所述处理模块,还设置为:在所述节点s
h的节点属性为空、且所述通知报文均为携带有所述第一属性的报文情况下,将所述节点s
h的节点属性更新为所述第二属性;在所述节点s
h的节点属性为空、且所述通知报文均为携带有所述第二属性的报文的情况下,将所述节点s
h的节点属性更新为第三属性,其中,每个具有所述第三属性的节点被确定为所述最大独立集中节点的一个候选节点;在所述节点s
h的节点属性为空、且所述通知报文中包括携带有所述第一属性的报文以及携带有所述第二属性的报文的情况下,将所述节点s
h的节点属性更新为所述第二属性。
Optionally, the processing module is further configured to: in the case that the node attribute of the node sh is empty and the notification packets are all packets carrying the first attribute, the node The node attribute of sh is updated to the second attribute; when the node attribute of the node sh is empty and the notification packets are all packets carrying the second attribute, the The node attribute of the node sh is updated to a third attribute, wherein each node with the third attribute is determined as a candidate node of the maximum independent set of nodes; the node attribute of the node sh is empty, And if the notification message includes a message carrying the first attribute and a message carrying the second attribute, the node attribute of the node sh is updated to the second attribute.
可选地,所述处理模块,还设置为:在将所述节点s
h的节点属性更新为所述第三属性之后,在具有所述第三属性的所有候选节点中确定第二节点集合,其中,所述第二节点集合包括所述节点s
h,并且所述第二节点集合中的所有节点具有相同的层级标识,以及所述第二节点集合中的所有节点组成一条连通路径,所述层级标识用于指示具有所述层级标识的节点在所述目标传感器网络中所处的节点层级,所述第二节点集合中的节点数量大于1;将所述第二节点集合中的剩余能量最大的第一节点的节点属性更新为所述第一属性。
Optionally, the processing module is further configured to: after updating the node attribute of the node sh to the third attribute, determine a second node set from all candidate nodes having the third attribute, Wherein, the second node set includes the node sh , and all nodes in the second node set have the same level identifier, and all nodes in the second node set form a connected path, and the The level identifier is used to indicate the node level of the node with the level identifier in the target sensor network, and the number of nodes in the second node set is greater than 1; the remaining energy in the second node set is maximized The node attribute of the first node of is updated to the first attribute.
可选地,所述处理模块,还设置为:在将所述第二节点集合中的剩余能量最大的第一节点的节点属性更新为所述第一属性之后,通过所述第一节点向所述第二节点集合中的第二节点发送通知报文,其中,所述第二节点为所述第一节点的邻居节点,所述第一节点发送的所述通知报文中携带有所述第一节点的层级标识以及所述第一节点的节点属性;对于所述第二节点集合中除所述第一节点之外的每个节点执行以下操作,以将所述第二节点集合中除所述第一节点之外的每个节点的节点属性更新至所述第一属性或所述第二属性,其中,当前节点被初始化为所述第二节点:在所述当前节点的节点属性为所述第三属性、且所述当前节点接收到的通知报文中携带的节点属性为所述第一属性的情况下,将所述当前节点的节点属性更新为所述第二属性;在所述当前节点的节点属性为所述第三属性、且所述当前节点接收到的通知报文中携带的节点属性为所述第二属性的情况下,将所述当前节点的节点属性更新为所述第一属性,其中,所述当前节点接收到的所 述通知报文是由所述第二节点集合中的所述当前节点的邻居节点发送给所述当前节点的;在完成对所述当前节点的节点属性更新之后,通过所述当前节点向所述第二节点集合中的所述当前节点的邻居节点发送通知报文,其中,所述当前节点发送的所述通知报文中携带有所述当前节点的层级标识以及所述当前节点的节点属性;将所述第二节点集合中的所述当前节点的邻居节点确定为所述当前节点。Optionally, the processing module is further configured to: after updating the node attribute of the first node with the largest remaining energy in the second node set to the first attribute, send the information to all nodes through the first node. The second node in the second node set sends a notification message, wherein the second node is a neighbor node of the first node, and the notification message sent by the first node carries the first node. The hierarchical identification of a node and the node attribute of the first node; the following operations are performed for each node in the second node set except the first node, so as to remove all nodes in the second node set except the first node. The node attribute of each node other than the first node is updated to the first attribute or the second attribute, wherein the current node is initialized as the second node: the node attribute of the current node is all When the third attribute is used and the node attribute carried in the notification message received by the current node is the first attribute, update the node attribute of the current node to the second attribute; When the node attribute of the current node is the third attribute and the node attribute carried in the notification message received by the current node is the second attribute, update the node attribute of the current node to the The first attribute, wherein the notification message received by the current node is sent to the current node by the neighbor node of the current node in the second node set; After the node attribute of the node is updated, a notification message is sent by the current node to the neighbor nodes of the current node in the second node set, wherein the notification message sent by the current node carries the The level identifier of the current node and the node attribute of the current node; the neighbor node of the current node in the second node set is determined as the current node.
其中,所述处理模块,还设置为:在具有所述第三属性的所有候选节点中不存在所述节点s
h的邻居节点的情况下,将所述节点s
h的节点属性更新为所述第一属性,并通过所述节点s
h向所述节点s
h的邻居节点发送通知报文,其中,所述节点s
h发送的所述通知报文中携带有所述节点s
h的层级标识以及所述节点s
h的节点属性。
Wherein, the processing module is further configured to: update the node attribute of the node sh as the the first attribute, and send a notification message to the neighbor nodes of the node sh through the node sh , wherein the notification message sent by the node sh carries the level identifier of the node sh and the node attributes of said node sh .
可选地,所述处理模块,还设置为:在将所述目标传感器网络中所有节点的节点属性更新至目标属性之后,将具有所述第二属性的所有节点组成的集合确定为所述第一节点集合;确定所述第一节点集合中符合所述预设条件的目标节点组成的第三节点集合,其中,所述预设条件包括以下之一:所述一个目标节点的所述两个邻居节点中的一个节点的层级标识大于所述一个目标节点的层级标识,并且所述两个邻居节点中的另一个节点的层级标识小于所述一个目标节点的层级标识;所述一个目标节点的所述两个邻居节点中的一个节点的层级标识等于所述一个目标节点的层级标识,并且所述两个邻居节点中的另一个节点的层级标识大于所述一个目标节点的层级标识;所述一个目标节点的所述两个邻居节点中的一个节点的层级标识等于所述一个目标节点的层级标识,并且所述两个邻居节点中的另一个节点的层级标识小于所述一个目标节点的层级标识;从所述第三节点集合中确定所述目标节点集合。Optionally, the processing module is further configured to: after updating the node attributes of all nodes in the target sensor network to the target attribute, determine a set composed of all nodes with the second attribute as the first A node set; determining a third node set consisting of target nodes in the first node set that meet the preset condition, wherein the preset condition includes one of the following: the two target nodes of the one target node The hierarchical identification of one node in the neighbor nodes is greater than the hierarchical identification of the one target node, and the hierarchical identification of the other node in the two neighbor nodes is smaller than the hierarchical identification of the one target node; The hierarchical identification of one node in the two neighbor nodes is equal to the hierarchical identification of the one target node, and the hierarchical identification of the other node in the two neighbor nodes is greater than the hierarchical identification of the one target node; the The level identifier of one of the two neighbor nodes of a target node is equal to the level identifier of the one target node, and the level identifier of the other node of the two neighbor nodes is smaller than the level identifier of the one target node identifying; determining the target node set from the third node set.
可选地,所述处理模块,还设置为:在所述第三节点集合中存在多个具有相同层级标识的节点的情况下,确定所述多个具有相同层级标识的节点中的每个节点在所述最大独立集中的邻居节点数量;将邻居节点数量最大的节点确定为所述目标节点集合中的一个节点;在所述第三节点集合中的每个节点的层级标识均不相同的情况下,将所述第三节点集合中的每个节点均确定为所述目标节点集合中的一个节点;其中,在所述从所述第三节点集合中确定所述目标节点集合之后,所述方法还包括:从所述目标节点集合中剔除冗余节点,其中,所述冗余节点与所述最大独立集中的一个节点存在相同的邻居节点,并且所述相同的邻居节点是所述最大独立集中的一个节点;在所述从所述目标节点集合中剔除冗余节点之后,将所述目标节点集合中的每个节点的节点属性更新为所述第一属性。Optionally, the processing module is further configured to: when there are multiple nodes with the same level identifier in the third node set, determine each node in the multiple nodes with the same level identifier The number of neighbor nodes in the largest independent set; the node with the largest number of neighbor nodes is determined as a node in the target node set; in the case that the level identifiers of each node in the third node set are different Next, each node in the third node set is determined as a node in the target node set; wherein, after the target node set is determined from the third node set, the The method further includes: removing redundant nodes from the target node set, wherein the redundant node and a node in the maximum independent set have the same neighbor node, and the same neighbor node is the maximum independent node a node in the set; after the redundant nodes are eliminated from the target node set, the node attribute of each node in the target node set is updated to the first attribute.
可选地,所述处理模块,还设置为:通过每个所述簇头节点向每个所述簇头节点的邻居节点广播目标报文,其中,所述目标报文中携带有发送所述目标报文的簇头节点的节点标识以及发送所述目标报文的簇头节点的剩余能量信息;对于第四节点集合中的每个节点Cq,根据所述节点Cq接收到的所有目标报文,确定出所述节点Cq所属的簇头节点,其中,所述节点Cq所属的簇头节点为所述节点Cq的邻居节点中具有最大剩余能量的簇头节点,所述q∈[1,m’],所述m’为所述第四节点集合中的节点的数量,所述第四节点集合为所述目标传感器网络中除所述所有簇头节点之外的所有节点组成的集合;通过所述节点Cq向所述节点Cq所属的簇头节点发送请求报文,其中,所述请求报文用于请求所述节点Cq所属的簇头节点将所述节点Cq添加为自身的簇成员节点。Optionally, the processing module is further configured to: broadcast a target message to neighbor nodes of each cluster head node through each of the cluster head nodes, wherein the target message carries the The node identifier of the cluster head node of the target message and the remaining energy information of the cluster head node sending the target message; for each node Cq in the fourth node set, according to all the target messages received by the node Cq , determine the cluster head node to which the node Cq belongs, wherein the cluster head node to which the node Cq belongs is the cluster head node with the largest residual energy among the neighbor nodes of the node Cq, and the q∈[1, m '], the m' is the number of nodes in the fourth node set, and the fourth node set is a set composed of all nodes in the target sensor network except all the cluster head nodes; by The node Cq sends a request message to the cluster head node to which the node Cq belongs, where the request message is used to request the cluster head node to which the node Cq belongs to add the node Cq as its own cluster member node .
可选地,所述传输模块,还设置为:对所述至少一个簇中的至少一个簇成员节点发送的数据执行以下操作,直至当前簇头节点的邻居节点为所述基站,其中,当前簇头节点被初始化为所述至少一个簇成员节点所属的簇头节点:通过所述当前簇头节点接收所述当前簇头节点所在簇的簇 成员节点发送的数据;通过所述当前簇头节点对从所述当前簇头节点所在簇的簇成员节点接收到的数据以及所述当前簇头节点从所述当前簇头节点的子节点接收到的数据进行线性组合,得到第一数据,并将所述第一数据发送给所述当前簇头节点的父节点,其中,所述子节点的层级标识小于所述当前簇头节点的层级标识、且所述子节点为所述当前簇头节点的邻居节点中的一个簇头节点,所述父节点的层级标识大于所述当前簇头节点的层级标识、且所述父节点为所述当前簇头节点的邻居节点中的一个簇头节点;将所述当前簇头节点的所述父节点确定为所述当前簇头节点。Optionally, the transmission module is further configured to: perform the following operations on the data sent by at least one cluster member node in the at least one cluster, until the neighbor node of the current cluster head node is the base station, wherein the current cluster The head node is initialized as the cluster head node to which the at least one cluster member node belongs: the current cluster head node receives data sent by the cluster member nodes of the cluster where the current cluster head node is located; The data received from the cluster member nodes of the cluster where the current cluster head node is located and the data received by the current cluster head node from the child nodes of the current cluster head node are linearly combined to obtain the first data, and the The first data is sent to the parent node of the current cluster head node, wherein the level identification of the child node is smaller than the level identification of the current cluster head node, and the child node is the neighbor of the current cluster head node A cluster head node in the node, the hierarchical identification of the parent node is greater than the hierarchical identification of the current cluster head node, and the parent node is a cluster head node in the neighbor nodes of the current cluster head node; The parent node of the current cluster head node is determined as the current cluster head node.
本发明的实施例还提供了一种存储介质,该存储介质包括存储的程序,其中,上述程序运行时执行上述任一项的方法。可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的程序代码:An embodiment of the present invention further provides a storage medium, where the storage medium includes a stored program, wherein the above-mentioned program executes any one of the above-mentioned methods when running. Optionally, in this embodiment, the above-mentioned storage medium may be configured to store program codes for executing the following steps:
S1,确定目标传感器网络中的最大独立集,其中,所述最大独立集是由所述目标传感器网络中的两两互不邻接的节点组成的集合,所述目标传感器网络中的每个节点与传感器一一对应;S2,确定所述目标传感器网络中的第一节点集合中的目标节点集合,其中,所述第一节点集合是由所述目标传感器网络中不属于所述最大独立集的节点组成的集合,所述目标节点集合中的每个目标节点均符合预设条件,所述预设条件用于指示一个目标节点在所述最大独立集中存在两个邻居节点;S3,将所述最大独立集以及所述目标节点集合中的每个节点确定为所述目标传感器网络对应的连通支配集中的一个节点,得到所述连通支配集,其中,所述连通支配集中的任意两个节点之间能够互相通信;S4,根据所述连通支配集,对所述目标传感器网络中的节点进行分簇,得到所述目标传感器网络中的多个簇,其中,所述连通支配集中的每个节点为所述多个簇中的一个簇的簇头节点;S5,通过所述连通支配集中的节点,将所述多个簇中至少一个簇中的簇成员节点发送的数据中转至基站。S1. Determine the maximum independent set in the target sensor network, where the maximum independent set is a set composed of nodes in the target sensor network that are not adjacent to each other, and each node in the target sensor network is connected to Sensors are in one-to-one correspondence; S2, determine a target node set in a first node set in the target sensor network, where the first node set is composed of nodes in the target sensor network that do not belong to the maximum independent set Each target node in the target node set conforms to a preset condition, and the preset condition is used to indicate that a target node has two neighbor nodes in the maximum independent set; S3, the maximum independent set Each node in the independent set and the target node set is determined as a node in the connected domination set corresponding to the target sensor network, and the connected domination set is obtained, wherein, between any two nodes in the connected domination set can communicate with each other; S4, according to the connected domination set, cluster the nodes in the target sensor network to obtain multiple clusters in the target sensor network, wherein each node in the connected domination set is A cluster head node of one of the multiple clusters; S5, through the nodes in the connectivity control set, relay the data sent by the cluster member nodes in at least one of the multiple clusters to the base station.
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (Read-Only Memory, referred to as ROM), a random access memory (Random Access Memory, referred to as RAM), Various media that can store program codes, such as removable hard disks, magnetic disks, or optical disks.
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。Optionally, for specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments and optional implementation manners, and details are not described herein again in this embodiment.
本发明的实施例还提供了一种电子装置,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。An embodiment of the present invention also provides an electronic device, comprising a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any of the above method embodiments.
可选地,上述电子装置还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。Optionally, the above-mentioned electronic device may further include a transmission device and an input-output device, wherein the transmission device is connected to the above-mentioned processor, and the input-output device is connected to the above-mentioned processor.
可选地,在本实施例中,上述处理器可以被设置为通过计算机程序执行以下步骤:S1,确定目标传感器网络中的最大独立集,其中,所述最大独立集是由所述目标传感器网络中的两两互不邻接的节点组成的集合,所述目标传感器网络中的每个节点与传感器一一对应;S2,确定所述目标传感器网络中的第一节点集合中的目标节点集合,其中,所述第一节点集合是由所述目标传感器网络中不属于所述最大独立集的节点组成的集合,所述目标节点集合中的每个目标节点均符合预设条件,所述预设条件用于指示一个目标节点在所述最大独立集中存在两个邻居节点;S3,将所述最大独立集以及所述目标节点集合中的每个节点确定为所述目标传感器网络对应的连通支配集中的一个节点,得到所述连通支配集,其中,所述连通支配集中的任意两个节点之间能够互相通信;S4,根据所述连通支配集,对所述目标传感器网络中的节点进行分簇,得到所述目标传感器网络中的多个簇,其中,所述连通支配集中的每个节点为所述多个簇中的一个簇的簇头节点; S5,通过所述连通支配集中的节点,将所述多个簇中至少一个簇中的簇成员节点发送的数据中转至基站。Optionally, in this embodiment, the above-mentioned processor may be configured to perform the following steps through a computer program: S1, determine the maximum independent set in the target sensor network, wherein the maximum independent set is determined by the target sensor network A set composed of two non-adjacent nodes in the target sensor network, each node in the target sensor network corresponds to a sensor one-to-one; S2, determine the target node set in the first node set in the target sensor network, wherein , the first node set is a set consisting of nodes in the target sensor network that do not belong to the maximum independent set, each target node in the target node set meets a preset condition, and the preset condition Used to indicate that a target node has two neighbor nodes in the maximum independent set; S3, determine the maximum independent set and each node in the target node set as the target sensor network corresponding to the connected domination set. a node to obtain the connected domination set, wherein any two nodes in the connected domination set can communicate with each other; S4, according to the connected domination set, cluster the nodes in the target sensor network, Obtaining a plurality of clusters in the target sensor network, wherein each node in the connectivity domination set is a cluster head node of a cluster in the plurality of clusters; S5, through the nodes in the connectivity domination set, convert the The data sent by the cluster member nodes in at least one of the multiple clusters is relayed to the base station.
图8是根据本发明实施例的一种可选的电子装置的结构示意图。可选地,本领域普通技术人员可以理解,图8所示的结构仅为示意,电子装置也可以是智能手机(如Android手机、iOS手机等)、平板电脑、掌上电脑以及移动互联网设备(Mobile Internet Devices,MID)、PAD等终端设备。图8其并不对上述电子装置的结构造成限定。例如,电子装置还可包括比图8中所示更多或者更少的组件(如网络接口等),或者具有与图8所示不同的配置。FIG. 8 is a schematic structural diagram of an optional electronic device according to an embodiment of the present invention. Optionally, those of ordinary skill in the art can understand that the structure shown in FIG. 8 is only for illustration, and the electronic device can also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, and a mobile Internet device (Mobile Internet device). Internet Devices, MID), PAD and other terminal equipment. FIG. 8 does not limit the structure of the above electronic device. For example, the electronic device may also include more or less components than those shown in FIG. 8 (eg, network interfaces, etc.), or have a different configuration than that shown in FIG. 8 .
其中,存储器1002可设置为存储软件程序以及模块,如本发明实施例中的数据传输方法和数据传输装置对应的程序指令/模块,处理器1004通过运行存储在存储器1002内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的数据传输方法。存储器1002可包括高速随机存储器,还可以包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器1002可进一步包括相对于处理器1004远程设置的存储器,这些远程存储器可以通过网络连接至终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。作为一种示例,上述存储器1002中可以但不限于包括上述数据传输装置的处理模块72、传输模块74。此外,还可以包括但不限于上述数据传输装置中的其他模块单元,本示例中不再赘述。Wherein, the memory 1002 can be configured to store software programs and modules, such as program instructions/modules corresponding to the data transmission method and the data transmission device in the embodiment of the present invention, and the processor 1004 runs the software programs and modules stored in the memory 1002, Thereby, various functional applications and data processing are performed, that is, the above-mentioned data transmission method is realized. Memory 1002 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, memory 1002 may further include memory located remotely from processor 1004, and these remote memories may be connected to the terminal through a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof. As an example, the above-mentioned memory 1002 may include, but is not limited to, the processing module 72 and the transmission module 74 of the above-mentioned data transmission apparatus. In addition, it may also include, but is not limited to, other module units in the above-mentioned data transmission apparatus, which will not be repeated in this example.
可选地,上述的传输设备1006设置为经由一个网络接收或者发送数据。上述的网络具体实例可包括有线网络及无线网络。在一个实例中,传输设备1006包括一个网络适配器(Network Interface Controller,NIC),其可通过网线与其他网络设备与路由器相连从而可与互联网或局域网进行通讯。在一个实例中,传输设备1006为射频(Radio Frequency,RF)模块,其设置为通过无线方式与互联网进行通讯。Optionally, the above-mentioned transmission device 1006 is configured to receive or send data via a network. Specific examples of the above-mentioned networks may include wired networks and wireless networks. In one example, the transmission device 1006 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers through a network cable to communicate with the Internet or a local area network. In one example, the transmission device 1006 is a radio frequency (RF) module configured to communicate with the Internet wirelessly.
此外,上述电子设备还包括:显示器1008,设置为显示画面;和连接总线1010,设置为连接上述电子装置中的各个模块部件。In addition, the above electronic device further includes: a display 1008 configured to display a picture; and a connection bus 1010 configured to connect various module components in the above electronic device.
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。Optionally, for specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments and optional implementation manners, and details are not described herein again in this embodiment.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present invention can be implemented by a general-purpose computing device, which can be centralized on a single computing device, or distributed in a network composed of multiple computing devices Alternatively, they may be implemented in program code executable by a computing device, such that they may be stored in a storage device and executed by the computing device, and in some cases, in a different order than here The steps shown or described are performed either by fabricating them separately into individual integrated circuit modules, or by fabricating multiple modules or steps of them into a single integrated circuit module. As such, the present invention is not limited to any particular combination of hardware and software. The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included within the protection scope of the present invention.
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (Read-Only Memory, referred to as ROM), a random access memory (Random Access Memory, referred to as RAM), Various media that can store program codes, such as removable hard disks, magnetic disks, or optical disks. Optionally, for specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments and optional implementation manners, and details are not described herein again in this embodiment.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地, 它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present invention can be implemented by a general-purpose computing device, which can be centralized on a single computing device, or distributed in a network composed of multiple computing devices Alternatively, they may be implemented in program code executable by a computing device, whereby they may be stored in a storage device and executed by the computing device, and in some cases, in a different order than here The steps shown or described are performed either by fabricating them separately into individual integrated circuit modules, or by fabricating multiple modules or steps of them into a single integrated circuit module. As such, the present invention is not limited to any particular combination of hardware and software. The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included within the protection scope of the present invention.
Claims (13)
- 一种数据传输方法,包括:A method of data transmission, comprising:确定目标传感器网络中的最大独立集,其中,所述最大独立集是由所述目标传感器网络中的两两互不邻接的节点组成的集合,所述目标传感器网络中的每个节点与传感器一一对应;Determine the maximum independent set in the target sensor network, wherein the maximum independent set is a set composed of nodes in the target sensor network that are not adjacent to each other, and each node in the target sensor network is one with the sensor. one correspondence;确定所述目标传感器网络中的第一节点集合中的目标节点集合,其中,所述第一节点集合是由所述目标传感器网络中不属于所述最大独立集的节点组成的集合,所述目标节点集合中的每个目标节点均符合预设条件,所述预设条件用于指示一个目标节点在所述最大独立集中存在两个邻居节点;determining a target node set in a first node set in the target sensor network, wherein the first node set is a set consisting of nodes in the target sensor network that do not belong to the maximum independent set, the target Each target node in the node set meets a preset condition, and the preset condition is used to indicate that a target node has two neighbor nodes in the maximum independent set;将所述最大独立集以及所述目标节点集合中的每个节点确定为所述目标传感器网络对应的连通支配集中的一个节点,得到所述连通支配集,其中,所述连通支配集中的任意两个节点之间能够互相通信;Determine the maximum independent set and each node in the target node set as a node in the connected domination set corresponding to the target sensor network, and obtain the connected domination set, wherein any two in the connected domination set are determined. The nodes can communicate with each other;根据所述连通支配集,对所述目标传感器网络中的节点进行分簇,得到所述目标传感器网络中的多个簇,其中,所述连通支配集中的每个节点为所述多个簇中的一个簇的簇头节点;According to the connected dominating set, cluster the nodes in the target sensor network to obtain a plurality of clusters in the target sensor network, wherein each node in the connected dominating set is one of the plurality of clusters the cluster head node of a cluster;通过所述连通支配集中的节点,将所述多个簇中至少一个簇中的簇成员节点发送的数据中转至基站。The data sent by the cluster member nodes in at least one of the multiple clusters is forwarded to the base station through the nodes in the connectivity dominating set.
- 根据权利要求1所述的方法,其中,在所述确定目标传感器网络中的最大独立集之前,所述方法包括:The method of claim 1, wherein prior to said determining the largest independent set in the target sensor network, the method comprises:将所述目标传感器网络中的所有节点的节点属性设置为空;Setting the node attributes of all nodes in the target sensor network to be empty;其中,所述确定目标传感器网络中的最大独立集,包括:Wherein, the determining the maximum independent set in the target sensor network includes:将所述目标传感器网络中的汇聚节点的节点属性更新为第一属性,以及根据所述目标传感器网络中除所述汇聚节点之外的每个节点s h的节点属性和所述节点s h从所述节点s h的邻居节点接收到的通知报文,对所述节点s h的节点属性进行更新,以将所述目标传感器网络中所有节点的节点属性更新至目标属性,其中,h∈[1,n′],n′为所述目标传感器网络中除所述汇聚节点之外的节点的数量,所述通知报文中携带有发送所述通知报文的节点的节点属性,所述目标属性包括所述第一属性和第二属性,每个具有所述第一属性的节点被确定为所述最大独立集中的一个节点,每个具有所述第二属性的节点被确定为所述第一节点集合中的一个节点。 Update the node attribute of the sink node in the target sensor network to the first attribute, and according to the node attribute of each node sh in the target sensor network except the sink node and the node sh from The notification message received by the neighbor nodes of the node sh updates the node attributes of the node sh to update the node attributes of all nodes in the target sensor network to the target attributes, where h∈ [ 1, n′], n′ is the number of nodes in the target sensor network other than the sink node, the notification message carries the node attribute of the node sending the notification message, the target Attributes include the first attribute and a second attribute, each node with the first attribute is determined as a node in the maximum independent set, and each node with the second attribute is determined as the first attribute. A node in a set of nodes.
- 根据权利要求2所述的方法,其中,所述根据所述目标传感器网络中除所述汇聚节点之外的每个节点s h的节点属性,以及所述节点s h从所述节点s h的邻居节点接收到的报文,对所述节点s h的节点属性进行更新,以将所述目标传感器网络中所有节点的节点属性更新至目标属性中的一个属性,包括: The method according to claim 2, wherein the node attribute of each node sh in the target sensor network except the sink node, and the node sh from the node sh The message received by the neighbor node updates the node attributes of the node sh , so as to update the node attributes of all nodes in the target sensor network to one of the target attributes, including:在所述节点s h的节点属性为空、且所述通知报文均为携带有所述第一属性的报文情况下,将所述节点s h的节点属性更新为所述第二属性; When the node attribute of the node sh is empty and the notification messages are all packets carrying the first attribute, updating the node attribute of the node sh to the second attribute;在所述节点s h的节点属性为空、且所述通知报文均为携带有所述第二属性的报文的情况下,将所述节点s h的节点属性更新为第三属性,其中,每个具有所述第三属性的节点被确定 为所述最大独立集中节点的一个候选节点; In the case that the node attribute of the node sh is empty and the notification packets are all packets carrying the second attribute, the node attribute of the node sh is updated to the third attribute, wherein , each node with the third attribute is determined as a candidate node of the maximum independent set of nodes;在所述节点s h的节点属性为空、且所述通知报文中包括携带有所述第一属性的报文以及携带有所述第二属性的报文的情况下,将所述节点s h的节点属性更新为所述第二属性。 In the case that the node attribute of the node s h is empty, and the notification packet includes a packet carrying the first attribute and a packet carrying the second attribute, the node s The node attribute of h is updated to the second attribute.
- 根据权利要求3所述的方法,其中,在将所述节点s h的节点属性更新为所述第三属性之后,所述方法还包括: The method according to claim 3, wherein after updating the node attribute of the node sh to the third attribute, the method further comprises:在具有所述第三属性的所有候选节点中确定第二节点集合,其中,所述第二节点集合包括所述节点s h,并且所述第二节点集合中的所有节点具有相同的层级标识,以及所述第二节点集合中的所有节点组成一条连通路径,所述层级标识用于指示具有所述层级标识的节点在所述目标传感器网络中所处的节点层级,所述第二节点集合中的节点数量大于1; determining a second set of nodes among all candidate nodes having the third attribute, wherein the second set of nodes includes the node sh , and all nodes in the second set of nodes have the same level identification, and all nodes in the second node set form a connected path, the level identifier is used to indicate the node level where the node with the level identifier is located in the target sensor network, and the second node set is The number of nodes is greater than 1;将所述第二节点集合中的剩余能量最大的第一节点的节点属性更新为所述第一属性。The node attribute of the first node with the largest remaining energy in the second node set is updated to the first attribute.
- 根据权利要求4所述的方法,其中,在将所述第二节点集合中的剩余能量最大的第一节点的节点属性更新为所述第一属性之后,所述方法还包括:The method according to claim 4, wherein after updating the node attribute of the first node with the largest remaining energy in the second node set to the first attribute, the method further comprises:通过所述第一节点向所述第二节点集合中的第二节点发送通知报文,其中,所述第二节点为所述第一节点的邻居节点,所述第一节点发送的所述通知报文中携带有所述第一节点的层级标识以及所述第一节点的节点属性;Send a notification message to a second node in the second node set by the first node, where the second node is a neighbor node of the first node, and the notification sent by the first node The message carries the hierarchical identifier of the first node and the node attribute of the first node;对于所述第二节点集合中除所述第一节点之外的每个节点执行以下操作,以将所述第二节点集合中除所述第一节点之外的每个节点的节点属性更新至所述第一属性或所述第二属性,其中,当前节点被初始化为所述第二节点:Perform the following operations on each node in the second node set except the first node to update the node attribute of each node in the second node set except the first node to The first attribute or the second attribute, wherein the current node is initialized to the second node:在所述当前节点的节点属性为所述第三属性、且所述当前节点接收到的通知报文中携带的节点属性为所述第一属性的情况下,将所述当前节点的节点属性更新为所述第二属性;When the node attribute of the current node is the third attribute and the node attribute carried in the notification message received by the current node is the first attribute, update the node attribute of the current node is the second attribute;在所述当前节点的节点属性为所述第三属性、且所述当前节点接收到的通知报文中携带的节点属性为所述第二属性的情况下,将所述当前节点的节点属性更新为所述第一属性,其中,所述当前节点接收到的所述通知报文是由所述第二节点集合中的所述当前节点的邻居节点发送给所述当前节点的;When the node attribute of the current node is the third attribute and the node attribute carried in the notification message received by the current node is the second attribute, update the node attribute of the current node is the first attribute, wherein the notification message received by the current node is sent to the current node by a neighbor node of the current node in the second node set;在完成对所述当前节点的节点属性更新之后,通过所述当前节点向所述第二节点集合中的所述当前节点的邻居节点发送通知报文,其中,所述当前节点发送的所述通知报文中携带有所述当前节点的层级标识以及所述当前节点的节点属性;After the node attribute update of the current node is completed, a notification message is sent by the current node to the neighbor nodes of the current node in the second node set, wherein the notification message sent by the current node is The message carries the level identifier of the current node and the node attribute of the current node;将所述第二节点集合中的所述当前节点的邻居节点确定为所述当前节点。A neighbor node of the current node in the second node set is determined as the current node.
- 根据权利要求4所述的方法,其中,在具有所述第三属性的所有候选节点中不存在所述节点s h的邻居节点的情况下,将所述节点s h的节点属性更新为所述第一属性,并通过所述节点s h向所述节点s h的邻居节点发送通知报文,其中,所述节点s h发送的所述通知报文中携带有所述节点s h的层级标识以及所述节点s h的节点属性。 The method according to claim 4, wherein in the case where no neighbor node of the node sh exists in all the candidate nodes with the third attribute, the node attribute of the node sh is updated to the the first attribute, and send a notification message to the neighbor nodes of the node sh through the node sh , wherein the notification message sent by the node sh carries the level identifier of the node sh and the node attributes of said node sh .
- 根据权利要求2所述的方法,其中,所述确定所述目标传感器网络中的第一节点集 合中的目标节点集合,包括:The method of claim 2, wherein the determining the target node set in the first node set in the target sensor network comprises:在将所述目标传感器网络中所有节点的节点属性更新至目标属性之后,将具有所述第二属性的所有节点组成的集合确定为所述第一节点集合;After updating the node attributes of all nodes in the target sensor network to the target attribute, determining a set composed of all nodes having the second attribute as the first node set;确定所述第一节点集合中符合所述预设条件的目标节点组成的第三节点集合,其中,所述预设条件包括以下之一:Determine a third node set consisting of target nodes that meet the preset conditions in the first node set, wherein the preset conditions include one of the following:所述一个目标节点的所述两个邻居节点中的一个节点的层级标识大于所述一个目标节点的层级标识,并且所述两个邻居节点中的另一个节点的层级标识小于所述一个目标节点的层级标识;The level identifier of one of the two neighbor nodes of the one target node is greater than the level identifier of the one target node, and the level identifier of the other node of the two neighbor nodes is smaller than the one target node. 's level identification;所述一个目标节点的所述两个邻居节点中的一个节点的层级标识等于所述一个目标节点的层级标识,并且所述两个邻居节点中的另一个节点的层级标识大于所述一个目标节点的层级标识;The hierarchical identification of one of the two neighbor nodes of the one target node is equal to the hierarchical identification of the one target node, and the hierarchical identification of the other node of the two neighbor nodes is greater than the one target node. 's level identification;所述一个目标节点的所述两个邻居节点中的一个节点的层级标识等于所述一个目标节点的层级标识,并且所述两个邻居节点中的另一个节点的层级标识小于所述一个目标节点的层级标识;The level identifier of one of the two neighbor nodes of the one target node is equal to the level identifier of the one target node, and the level identifier of the other node of the two neighbor nodes is smaller than the one target node. 's level identification;从所述第三节点集合中确定所述目标节点集合。The target node set is determined from the third node set.
- 根据权利要求7所述的方法,其中,所述从所述第三节点集合中确定所述目标节点集合,包括:The method of claim 7, wherein the determining the target node set from the third node set comprises:在所述第三节点集合中存在多个具有相同层级标识的节点的情况下,确定所述多个具有相同层级标识的节点中的每个节点在所述最大独立集中的邻居节点数量;In the case that there are multiple nodes with the same level identifier in the third node set, determining the number of neighbor nodes in the maximum independent set for each of the multiple nodes with the same level identifier;将邻居节点数量最大的节点确定为所述目标节点集合中的一个节点;Determine the node with the largest number of neighbor nodes as a node in the target node set;在所述第三节点集合中的每个节点的层级标识均不相同的情况下,将所述第三节点集合中的每个节点均确定为所述目标节点集合中的一个节点;In the case that the hierarchical identifiers of each node in the third node set are different, each node in the third node set is determined as a node in the target node set;其中,在所述从所述第三节点集合中确定所述目标节点集合之后,所述方法还包括:从所述目标节点集合中剔除冗余节点,其中,所述冗余节点与所述最大独立集中的一个节点存在相同的邻居节点,并且所述相同的邻居节点是所述最大独立集中的一个节点;Wherein, after determining the target node set from the third node set, the method further includes: removing redundant nodes from the target node set, wherein the redundant nodes are the same as the maximum node set. A node in the independent set has the same neighbor node, and the same neighbor node is a node in the maximum independent set;在所述从所述目标节点集合中剔除冗余节点之后,将所述目标节点集合中的每个节点的节点属性更新为所述第一属性。After the redundant nodes are removed from the target node set, the node attribute of each node in the target node set is updated to the first attribute.
- 根据权利要求1所述的方法,其中,所述根据所述连通支配集,对所述目标传感器网络中的节点进行分簇,得到所述目标传感器网络中的多个簇,包括:The method according to claim 1, wherein the clustering of nodes in the target sensor network according to the connected dominance set to obtain a plurality of clusters in the target sensor network, comprising:通过每个所述簇头节点向每个所述簇头节点的邻居节点广播目标报文,其中,所述目标报文中携带有发送所述目标报文的簇头节点的节点标识以及发送所述目标报文的簇头节点的剩余能量信息;A target packet is broadcast to the neighbor nodes of each cluster head node through each cluster head node, wherein the target packet carries the node identifier of the cluster head node that sends the target packet and the destination node that sends the target packet. Describe the remaining energy information of the cluster head node of the target message;对于第四节点集合中的每个节点Cq,根据所述节点Cq接收到的所有目标报文,确定出所述节点Cq所属的簇头节点,其中,所述节点Cq所属的簇头节点为所述节点Cq的邻居节点中 具有最大剩余能量的簇头节点,q∈[1,m’],m’为所述第四节点集合中的节点的数量,所述第四节点集合为所述目标传感器网络中除簇头节点之外的所有节点组成的集合;For each node Cq in the fourth node set, the cluster head node to which the node Cq belongs is determined according to all the target packets received by the node Cq, wherein the cluster head node to which the node Cq belongs is the is the cluster head node with the largest residual energy among the neighbor nodes of the node Cq, q∈[1, m'], m' is the number of nodes in the fourth node set, and the fourth node set is the target The set of all nodes in the sensor network except the cluster head node;通过所述节点Cq向所述节点Cq所属的簇头节点发送请求报文,其中,所述请求报文用于请求所述节点Cq所属的簇头节点将所述节点Cq添加为自身的簇成员节点。Send a request message to the cluster head node to which the node Cq belongs through the node Cq, where the request message is used to request the cluster head node to which the node Cq belongs to add the node Cq as its own cluster member node.
- 根据权利要求1所述的方法,其中,所述通过所述连通支配集中的节点,将所述多个簇中至少一个簇中的簇成员节点发送的数据中转至基站,包括:The method according to claim 1, wherein the transferring the data sent by the cluster member nodes in at least one of the multiple clusters to the base station through the nodes in the connectivity control set comprises:对所述至少一个簇中的至少一个簇成员节点发送的数据执行以下操作,直至当前簇头节点的邻居节点为所述基站,其中,当前簇头节点被初始化为所述至少一个簇成员节点所属的簇头节点:Perform the following operations on the data sent by at least one cluster member node in the at least one cluster, until the neighbor node of the current cluster head node is the base station, wherein the current cluster head node is initialized as the at least one cluster member node belongs to The cluster head node of:通过所述当前簇头节点接收所述当前簇头节点所在簇的簇成员节点发送的数据;Receive, through the current cluster head node, the data sent by the cluster member nodes of the cluster where the current cluster head node is located;通过所述当前簇头节点对从所述当前簇头节点所在簇的簇成员节点接收到的数据,以及所述当前簇头节点从所述当前簇头节点的子节点接收到的数据进行线性组合,得到第一数据,并将所述第一数据发送给所述当前簇头节点的父节点,其中,所述子节点的层级标识小于所述当前簇头节点的层级标识、且所述子节点为所述当前簇头节点的邻居节点中的一个簇头节点,所述父节点的层级标识大于所述当前簇头节点的层级标识、且所述父节点为所述当前簇头节点的邻居节点中的一个簇头节点;The current cluster head node performs a linear combination of the data received from the cluster member nodes of the cluster where the current cluster head node is located and the data received by the current cluster head node from the child nodes of the current cluster head node , obtain the first data, and send the first data to the parent node of the current cluster head node, wherein the level identification of the child node is smaller than the level identification of the current cluster head node, and the child node is a cluster head node in the neighbor nodes of the current cluster head node, the hierarchical identification of the parent node is greater than the hierarchical identification of the current cluster head node, and the parent node is the neighbor node of the current cluster head node a cluster head node in ;将所述当前簇头节点的所述父节点确定为所述当前簇头节点。The parent node of the current cluster head node is determined as the current cluster head node.
- 一种数据传输装置,包括:A data transmission device, comprising:处理模块,设置为确定目标传感器网络中的最大独立集,其中,所述最大独立集是由所述目标传感器网络中的两两互不邻接的节点组成的集合,所述目标传感器网络中的每个节点与传感器一一对应;The processing module is configured to determine the maximum independent set in the target sensor network, wherein the maximum independent set is a set composed of nodes in the target sensor network that are not adjacent to each other, and each node in the target sensor network Each node corresponds to the sensor one by one;所述处理模块,还设置为确定所述目标传感器网络中的第一节点集合中的目标节点集合,其中,所述第一节点集合是由所述目标传感器网络中不属于所述最大独立集的节点组成的集合,所述目标节点集合中的每个目标节点均符合预设条件,所述预设条件用于指示一个目标节点在所述最大独立集中存在两个邻居节点;The processing module is further configured to determine a target node set in a first node set in the target sensor network, wherein the first node set is composed of nodes in the target sensor network that do not belong to the maximum independent set a set of nodes, where each target node in the target node set meets a preset condition, and the preset condition is used to indicate that a target node has two neighbor nodes in the maximum independent set;所述处理模块,还设置为将所述最大独立集以及所述目标节点集合中的每个节点确定为所述目标传感器网络对应的连通支配集中的一个节点,得到所述连通支配集,其中,所述连通支配集中的任意两个节点之间能够互相通信;The processing module is further configured to determine each node in the maximum independent set and the target node set as a node in the connected dominating set corresponding to the target sensor network, to obtain the connected dominating set, wherein, Any two nodes in the connectivity domination set can communicate with each other;所述处理模块,还设置为根据所述连通支配集,对所述目标传感器网络中的节点进行分簇,得到所述目标传感器网络中的多个簇,其中,所述连通支配集中的每个节点为所述多个簇中的一个簇的簇头节点;The processing module is further configured to cluster the nodes in the target sensor network according to the connected dominance set, to obtain a plurality of clusters in the target sensor network, wherein each of the connected dominance sets is The node is a cluster head node of one of the multiple clusters;传输模块,设置为通过所述连通支配集中的节点,将所述多个簇中至少一个簇中的簇成员节点发送的数据中转至基站。The transmission module is configured to forward the data sent by the cluster member nodes in at least one of the multiple clusters to the base station through the nodes in the connectivity control set.
- 一种存储介质,所述存储介质中存储有计算机程序,其中,所述计算机程序被设置 为运行时执行所述权利要求1至10任一项中所述的方法。A storage medium having stored therein a computer program, wherein the computer program is arranged to execute the method of any one of claims 1 to 10 when run.
- 一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为通过所述计算机程序执行所述权利要求1至10任一项中所述的方法。An electronic device comprising a memory and a processor, the memory having a computer program stored therein, the processor being arranged to perform the method of any one of claims 1 to 10 by means of the computer program.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011423895.1A CN112566210B (en) | 2020-12-08 | 2020-12-08 | Data transmission method and device, storage medium and electronic device |
CN202011423895.1 | 2020-12-08 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022121234A1 true WO2022121234A1 (en) | 2022-06-16 |
Family
ID=75059706
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/093928 WO2022121234A1 (en) | 2020-12-08 | 2021-05-14 | Data transmission method and device, storage medium and electronic device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112566210B (en) |
WO (1) | WO2022121234A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112566210B (en) * | 2020-12-08 | 2022-12-27 | 三维通信股份有限公司 | Data transmission method and device, storage medium and electronic device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102497620A (en) * | 2011-12-01 | 2012-06-13 | 华为技术有限公司 | Method and system of information transmission in wireless sensor network |
US20130089002A1 (en) * | 2011-10-06 | 2013-04-11 | Rockwell Collins, Inc. | UCDS: Unifying Connected Dominating Set Using Localized Two Hop Information with a Flexible Dominating Factor |
CN111371572A (en) * | 2018-12-25 | 2020-07-03 | 电信科学技术研究院有限公司 | Network node election method and node equipment |
CN111601351A (en) * | 2019-02-20 | 2020-08-28 | 电信科学技术研究院有限公司 | Gateway node selection method, node, device and medium |
CN112566210A (en) * | 2020-12-08 | 2021-03-26 | 三维通信股份有限公司 | Data transmission method and device, storage medium and electronic device |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100558062C (en) * | 2006-09-07 | 2009-11-04 | 上海交通大学 | The distribution type structuring method of virtual backbone network in the wireless sensor network |
US8634329B2 (en) * | 2011-01-31 | 2014-01-21 | Alcatel Lucent | Method for improved topology mapping in wireless communication networks |
CN102612083B (en) * | 2012-03-27 | 2014-06-04 | 南京工业大学 | Method for constructing connected dominating set based on exclusive region in wireless sensor network |
CN102801468B (en) * | 2012-08-27 | 2015-09-09 | 重庆邮电大学 | A kind of optical network fault localization method based on minimum dominant set sub-clustering |
CN105007599B (en) * | 2015-07-01 | 2018-07-17 | 湘潭大学 | A kind of data compression collection method based on degree of communication sub-clustering |
US10599638B2 (en) * | 2017-02-06 | 2020-03-24 | The Texas State University-San Marcos | System and method for identifying maximal independent sets in parallel |
CN107370536A (en) * | 2017-07-19 | 2017-11-21 | 哈尔滨工业大学深圳研究生院 | Satellite network multi-broadcast routing method and system based on minimum connected dominating set |
CN107992572A (en) * | 2017-11-30 | 2018-05-04 | 天津大学 | A kind of distributed graph coloring algorithm based on Pregel |
-
2020
- 2020-12-08 CN CN202011423895.1A patent/CN112566210B/en active Active
-
2021
- 2021-05-14 WO PCT/CN2021/093928 patent/WO2022121234A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130089002A1 (en) * | 2011-10-06 | 2013-04-11 | Rockwell Collins, Inc. | UCDS: Unifying Connected Dominating Set Using Localized Two Hop Information with a Flexible Dominating Factor |
CN102497620A (en) * | 2011-12-01 | 2012-06-13 | 华为技术有限公司 | Method and system of information transmission in wireless sensor network |
CN111371572A (en) * | 2018-12-25 | 2020-07-03 | 电信科学技术研究院有限公司 | Network node election method and node equipment |
CN111601351A (en) * | 2019-02-20 | 2020-08-28 | 电信科学技术研究院有限公司 | Gateway node selection method, node, device and medium |
CN112566210A (en) * | 2020-12-08 | 2021-03-26 | 三维通信股份有限公司 | Data transmission method and device, storage medium and electronic device |
Non-Patent Citations (1)
Title |
---|
ZHOU, XINLIAN ET AL.: "BPEC: An Energy-Aware Distributed Clustering Algorithm in WSNs", JOURNAL OF COMPUTER RESEARCH AND DEVELOPMENT, vol. 46, no. 5, 31 May 2009 (2009-05-31), pages 723 - 730, XP055941323 * |
Also Published As
Publication number | Publication date |
---|---|
CN112566210A (en) | 2021-03-26 |
CN112566210B (en) | 2022-12-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Chiang et al. | A minimum hop routing protocol for home security systems using wireless sensor networks | |
Tao et al. | Flow-balanced routing for multi-hop clustered wireless sensor networks | |
CN103906164B (en) | Maritime search and rescue wireless sensor network topology and topology control method | |
CN109587753B (en) | Cluster head selection algorithm of improved LEACH protocol based on target threshold constraint | |
CN108347346B (en) | Method for upgrading equipment in mesh network | |
CN108770029A (en) | Cluster-Based Routing Protocols for Wireless Sensor based on cluster and fuzzy system | |
CN109889376B (en) | Balanced network topology generation method | |
US20100054183A1 (en) | Sensor network control method for data path establishment and recovery and sensor network therefor | |
CN108366093B (en) | Distributed wireless ad hoc network based on virtual center and mobile agent | |
CN105898679B (en) | It is a kind of based on the heterogeneous sensor method of data capture for representing node more and being merged with multilayer | |
CN108184260B (en) | Network state identification method and device of Zigbee node | |
CN108235402B (en) | Wireless sensor network routing protocol based on improved tree type clustering | |
CN107995667A (en) | Energy consumption balanced routing method capable of controlling cluster scale | |
WO2022121234A1 (en) | Data transmission method and device, storage medium and electronic device | |
Sengul et al. | A survey of adaptive services to cope with dynamics in wireless self-organizing networks | |
CN113411766A (en) | Intelligent Internet of things comprehensive sensing system and method | |
CN110650512A (en) | Fuzzy theory-based low-power-consumption wide-area heterogeneous sensor network clustering algorithm | |
Tumula et al. | An opportunistic energy‐efficient dynamic self‐configuration clustering algorithm in WSN‐based IoT networks | |
CN114866976A (en) | Intelligent sensing terminal device and method based on LoRa ad hoc network | |
Khan | Performance and route stability analysis of RPL protocol | |
Rao et al. | Energy efficient routing in wireless sensor networks via circulating operator packets | |
WO2018098748A1 (en) | Communication method in distributed network, node, and system | |
US11723101B1 (en) | Mobile ad-hoc network data concurrency | |
KR20140044626A (en) | Method of clustering ship usn using location attribute and residual energy of sensors | |
CN110996371A (en) | Clustering algorithm for prolonging life cycle of wireless sensor network |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21901948 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21901948 Country of ref document: EP Kind code of ref document: A1 |