[go: up one dir, main page]

CN107659974B - Wireless sensor network routing method, apparatus, device, and computer-readable storage medium - Google Patents

Wireless sensor network routing method, apparatus, device, and computer-readable storage medium Download PDF

Info

Publication number
CN107659974B
CN107659974B CN201711070565.7A CN201711070565A CN107659974B CN 107659974 B CN107659974 B CN 107659974B CN 201711070565 A CN201711070565 A CN 201711070565A CN 107659974 B CN107659974 B CN 107659974B
Authority
CN
China
Prior art keywords
cluster
cluster head
head node
node
nodes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201711070565.7A
Other languages
Chinese (zh)
Other versions
CN107659974A (en
Inventor
潘玉兰
刘广聪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN201711070565.7A priority Critical patent/CN107659974B/en
Publication of CN107659974A publication Critical patent/CN107659974A/en
Application granted granted Critical
Publication of CN107659974B publication Critical patent/CN107659974B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/02Communication route or path selection, e.g. power-based or shortest path routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • H04L45/124Shortest path evaluation using a combination of metrics
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/46Cluster building
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/02Communication route or path selection, e.g. power-based or shortest path routing
    • H04W40/04Communication route or path selection, e.g. power-based or shortest path routing based on wireless node resources
    • H04W40/10Communication route or path selection, e.g. power-based or shortest path routing based on wireless node resources based on available power or energy
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明公开了一种无线传感网路由方法、装置、设备及计算机可读存储介质,本发明是通过两个阶段来实现无线传感网的路由设计:第一阶段,通过k‑means算法对无线传感网的各个节点进行分簇,选取出合适的簇头节点,簇头节点与各个簇成员节点的距离都差不多;第二阶段,通过一种启发式仿生进化系统机制即蚁群优化算法在簇间通信路由中建立动态最优簇间路由路径,通过本发明的方法,使得各个簇成员节点传输信息至簇头节点时消耗的能量差不多,同时簇头节点通过动态最优簇间路由路径将信息传输至汇聚节点,尽可能地减小了各个簇头节点消耗能量的差距,保证了整个无线传感网的网络稳定性和网络能量负载均衡,从而更能延长无线传感网的生命周期。

Figure 201711070565

The invention discloses a wireless sensor network routing method, device, equipment and computer-readable storage medium. The invention realizes the wireless sensor network routing design through two stages: the first stage, through the k-means algorithm Each node of the wireless sensor network is clustered, and the appropriate cluster head node is selected. The distance between the cluster head node and each cluster member node is similar; in the second stage, through a heuristic bionic evolution system mechanism, the ant colony optimization algorithm A dynamic optimal inter-cluster routing path is established in the inter-cluster communication route, and the method of the present invention makes the energy consumed by each cluster member node to transmit information to the cluster head node is similar, and the cluster head node passes through the dynamic optimal inter-cluster routing path. The information is transmitted to the sink node, reducing the energy consumption gap of each cluster head node as much as possible, ensuring the network stability and network energy load balance of the entire wireless sensor network, thus prolonging the life cycle of the wireless sensor network. .

Figure 201711070565

Description

Wireless sensor network routing method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of wireless communication technologies, and in particular, to a routing method for a wireless sensor network. The invention also relates to a wireless sensor network routing method, a device and a computer readable storage medium.
Background
The Wireless Sensor Network (WSN) is a Wireless Network formed by a group of Sensor nodes in a self-organizing manner, and aims to sense and collect numerous pieces of information in the surrounding environment in real time with the help of various sensors built in the nodes, and process the information so that people can obtain a large amount of detailed and reliable information at any time, in most places and under various environmental conditions.
The sensor nodes are used as important components of the wireless sensor network, and the life cycle of the sensor nodes directly influences the life cycle of the whole network, so that how to reduce the energy consumption of the sensor nodes is the key for prolonging the life cycle of the whole network and balancing the energy consumption of the network. The problem of network energy consumption is always the research focus of the wireless sensor network.
In the prior art, most proposed solutions to solve the problem of wireless sensor network energy consumption are wireless sensor network routing protocols. Currently, wireless sensor network routing protocols are divided into two categories: plane type and hierarchy type, the routing protocol of the hierarchy type is more efficient than the plane type. In the hierarchical type, all nodes of the wireless sensor network are enabled to work cooperatively mainly through a clustering method, and respective energy is fully utilized. The nodes of the clustered wireless sensor network are divided into three types: the wireless sensor network is divided into a plurality of clusters, each cluster is provided with a cluster head node, and the rest are cluster member nodes. Firstly, the cluster member nodes send the collected data to the cluster head nodes, then the cluster head nodes compress and fuse the data information sent by all the cluster member nodes in the whole cluster, and finally the cluster head nodes send the collected data information to the sink nodes.
At present, in the prior art, nodes in a sensor network are simply clustered, and the communication distance between a cluster head node and a cluster member node is not considered in the clustering process, so that the communication distance between the cluster head node and the cluster member node is different in length, and the energy consumed by each cluster member node is different under the condition. In addition, in the prior art, communication between cluster head nodes is not considered, and communication paths between the cluster head nodes and the sink nodes are generated randomly, so that the difference between the communication paths between the cluster head nodes and the sink nodes is too large when the cluster head nodes select the communication paths between the cluster head nodes and the sink nodes, and the difference between energy consumed by each cluster head node is also too large. In summary, the prior art has the problem of different energy consumption of the sensor nodes, and therefore, the stability of the network and the network load balance cannot be well ensured.
Therefore, how to provide a wireless sensor network routing method, apparatus, device and computer readable storage medium with high stability is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The invention aims to provide a routing method of a wireless sensor network, which ensures the network stability and the network energy load balance of the whole wireless sensor network; another object of the present invention is to provide a wireless sensor network routing apparatus, device and computer readable storage medium including the above method, which also ensure network stability and network energy load balancing of the whole wireless sensor network.
In order to solve the above technical problem, the present invention provides a routing method for a wireless sensor network, comprising:
dividing the wireless sensor network into k clusters according to a preset clustering algorithm; each cluster comprises a cluster head node and a plurality of cluster member nodes; the difference value of the distances between the cluster head node and each cluster member node is smaller than a preset error threshold value, and the preset error threshold value is minimum within an allowable range;
controlling transmission of communication data from the cluster member node to the cluster head node;
establishing a dynamic optimal inter-cluster routing path between the cluster head node and the sink node according to a preset routing algorithm;
and controlling the communication data to be transmitted from the cluster head node to the sink node through the dynamic optimal inter-cluster routing path.
Preferably, the preset clustering algorithm is a k-means algorithm, and the process of dividing the wireless sensor network into k clusters according to the preset clustering algorithm specifically includes:
step S1: selecting k nodes from the n nodes as historical optimal cluster head nodes, wherein the cluster where the historical optimal cluster head nodes are located is the historical optimal cluster;
step S2: calculating the distance between a residual node and each historical optimal cluster head node, and dividing the residual node and the historical optimal cluster head node closest to the residual node into a cluster;
step S3: obtaining a new historical optimal cluster head node of each cluster through calculation, wherein the cluster where the new historical optimal cluster head node is located becomes a new historical optimal cluster;
step S4: judging whether the difference value between the standard measure function value of the new optimal historical cluster and the standard measure function value of the previous optimal historical cluster is smaller than a preset standard threshold or reaches the maximum iteration number, if so, ending the clustering process; if not, returning to step S2, where the historical optimal cluster head node in step S2 is the new historical optimal cluster head node calculated in step S3.
Preferably, the standard measure function value is a square sum of errors in a cluster, and a formula for calculating the square sum of errors in the cluster is as follows:
Figure BDA0001456779980000031
wherein E is a standard measure function, k is the total number of clusters, CiIs a set of said clusters, X is a member node of said clusters,
Figure BDA0001456779980000032
is said cluster CiThe cluster head node of (1).
Preferably, the preset routing algorithm is an ant colony optimization algorithm.
In order to solve the above technical problem, the present invention further provides a wireless sensor network routing apparatus, including:
the wireless sensor network cluster system comprises a dividing unit, a clustering unit and a processing unit, wherein the dividing unit is used for dividing a wireless sensor network into k clusters according to a preset clustering algorithm, and each cluster comprises a cluster head node and a plurality of cluster member nodes; the difference value of the distances between the cluster head node and each cluster member node is smaller than a preset error threshold value, and the preset error threshold value is minimum within an allowable range;
a first control unit for controlling transmission of communication data from the cluster member node to the cluster head node;
the creating unit is used for creating a dynamic optimal inter-cluster routing path between the cluster head node and the sink node according to a preset routing algorithm;
and the second control unit is used for controlling the communication data to be transmitted to the sink node from the cluster head node through the dynamic optimal inter-cluster routing path.
Preferably, the dividing unit includes:
the selecting subunit is used for selecting k nodes from the n nodes as historical optimal cluster head nodes, and the cluster where the historical optimal cluster head nodes are located is a historical optimal cluster;
the first calculating subunit is configured to calculate distances between remaining nodes and each of the initial cluster head nodes, and divide the remaining nodes and the initial cluster head node closest to the remaining nodes into a cluster;
the second calculating subunit is configured to obtain a new historical optimal cluster head node of each cluster through calculation, where a cluster where the new historical optimal cluster head node is located becomes a new historical optimal cluster;
a judging subunit, configured to judge whether a difference between the standard measure function value of the new optimal historical cluster and the standard measure function value of the previous optimal historical cluster is smaller than a preset standard threshold or reaches a maximum iteration number, and if so, end the clustering process; if not, returning to step S2, where the historical optimal cluster head node in step S2 is the new historical optimal cluster head node calculated in step S3.
In order to solve the above technical problem, the present invention further provides a wireless sensor network routing device, including:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the wireless sensor network routing method as described in any one of the above.
In order to solve the above technical problem, the present invention further provides a computer-readable storage medium, having a computer program stored thereon, where the computer program is executed by a processor to implement the steps of the wireless sensor network routing method according to any one of the above embodiments.
The invention provides a wireless sensor network routing method, a device, equipment and a computer readable storage medium, wherein the method comprises the steps of dividing a wireless sensor network into k clusters according to a preset clustering algorithm; each cluster comprises a cluster head node and a plurality of cluster member nodes; the difference value of the distance between the cluster head node and each cluster member node is smaller than a preset error threshold value, and the preset error threshold value is minimum within an allowable range; controlling communication data to be transmitted from the cluster member node to the cluster head node; establishing a dynamic optimal inter-cluster routing path between a cluster head node and a sink node according to a preset routing algorithm; and controlling the communication data to be transmitted from the cluster head node to the aggregation node.
By utilizing the invention, the wireless sensing network is divided into a plurality of clusters through the preset clustering algorithm, and the distances between the cluster head nodes and each cluster member node are ensured to be as equal as possible, so that the energy consumed when each cluster member node sends data to the cluster head nodes is as equal as possible, and because the cluster head nodes and the sink nodes transmit communication data through the dynamic optimal inter-cluster routing path, the energy consumed when each cluster head node transmits the communication data is also minimum.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed in the prior art and the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a flow chart of a routing method of a wireless sensor network according to the present invention;
fig. 2 is a flowchart of a clustering method for a wireless sensor network according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a routing apparatus of a wireless sensor network according to the present invention.
Detailed Description
The core of the invention is to provide a routing method of a wireless sensor network, which ensures the network stability and the network energy load balance of the whole wireless sensor network; another core of the present invention is to provide a wireless sensor network routing apparatus, device and computer readable storage medium including the above method, which also ensure network stability and network energy load balancing of the whole wireless sensor network.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The present invention provides a routing method of a wireless sensor network, as shown in fig. 1, fig. 1 is a flowchart of the routing method of the wireless sensor network provided by the present invention, and the method includes the following steps:
step 101: dividing the wireless sensor network into k clusters according to a preset clustering algorithm; each cluster comprises a cluster head node and a plurality of cluster member nodes; the difference value of the distance between the cluster head node and each cluster member node is smaller than a preset error threshold value, and the preset error threshold value is the minimum within an allowable range.
The invention relates to a wireless sensor network routing method based on two optimization algorithms, wherein the network structure is a hierarchical clustering algorithm, and compared with a planar structure, the network structure has higher working efficiency and is more suitable for monitoring areas with poor environment and complex terrain.
Firstly, a wireless sensor network is divided into a plurality of clusters through a preset clustering algorithm in a first stage, the node types of the wireless sensor network after clustering operation are divided into cluster head nodes, cluster member nodes and sink nodes, and different types of nodes undertake different work, wherein the distance between the cluster head nodes and other cluster member nodes is kept within a range as much as possible, namely the distances from the other cluster member nodes to the cluster head nodes are almost the same.
Step 102: control communication data is transmitted from the cluster member node to the cluster head node.
It should be noted that the cluster head node of each cluster allocates a Time slot for transmitting data to the member in the cluster in a TDMA (Time Division Multiple Access) manner, and the cluster member node transmits the acquired data to the cluster head node.
Step 103: and establishing a dynamic optimal inter-cluster routing path between the cluster head node and the sink node according to a preset routing algorithm.
It should be noted that, after the information collected by each cluster member node is collected, the cluster head node needs to fuse the collected information and transmit the fused information to the sink node, and the second stage of the present invention is to establish a dynamic optimal inter-cluster routing path between the cluster head node and the sink node by a preset routing algorithm after considering the communication between the clusters, where the path is a dynamic path, that is, the dynamic optimal inter-cluster routing path may change according to different actual conditions of the wireless sensor network.
Step 104: and controlling the communication data to be transmitted to the sink node from the cluster head node through the dynamic optimal inter-cluster routing path.
It should be noted that, after the cluster head node fuses the collected information and transmits the fused information to the sink node, the sink node uploads the information to the data processing center for data storage, processing and analysis. The whole wireless sensing network works by finally transmitting the monitored environmental information to the data processing center.
Preferably, the preset clustering algorithm is a k-means algorithm, as shown in fig. 2, and fig. 2 is a flowchart of a wireless sensor network clustering method provided in an embodiment of the present invention, and according to the preset clustering algorithm, a process of dividing a wireless sensor network into k clusters specifically includes:
step S1: and selecting k nodes from the n nodes as historical optimal cluster head nodes, wherein the cluster where the historical optimal cluster head nodes are located is the historical optimal cluster.
It should be noted that k nodes are selected from n nodes in the wireless sensor network as the historical optimal cluster head node, and the selection mode may be random selection, and of course, the present invention is not limited to a specific selection mode. The wireless sensor network is divided into k clusters by taking the k cluster head nodes as centers.
Step S2: and calculating the distance between the residual node and each historical optimal cluster head node, and dividing the residual node and the historical optimal cluster head node closest to the residual node into a cluster.
Step S3: and obtaining a new historical optimal cluster head node of each cluster through calculation, wherein the cluster where the new historical optimal cluster head node is located becomes the new historical optimal cluster.
Step S4: judging whether the difference value between the standard measure function value of the new optimal historical cluster and the standard measure function value of the previous optimal historical cluster is smaller than a preset standard threshold or reaches the maximum iteration number, if so, entering a step S5, and performing a step S5: finishing the clustering process; if not, returning to step S2, at this time, the historical optimal cluster head node in step S2 is the new historical optimal cluster head node calculated in step S3.
It should be noted that, after a new historical optimal cluster head node is obtained after step S3 is performed, the standard measure function value of the initial cluster and the standard measure function value of the historical optimal cluster are calculated, and it is determined whether a difference between the two is smaller than a preset standard threshold or reaches the maximum iteration number, if so, it indicates that the cluster members are not changed, and the clustering process may be ended.
It can be understood that the establishment of the clusters and the selection of the cluster heads are completed through a k-means algorithm, so that the cluster heads in each cluster keep proper distances from all other cluster member nodes in the cluster, the communication quality between the cluster member nodes and the cluster head nodes is improved, the data received by the monitoring environment is more accurate and more real-time, and the load balance and the network stability of the whole network are ensured.
Preferably, the standard measure function value is the square sum of the errors in the clusters, and the formula for calculating the square sum of the errors in the clusters is as follows:
Figure BDA0001456779980000071
where E is the standard measure function, k is the total number of clusters, CiIs a set of clusters, X is a member node of a cluster,
Figure BDA0001456779980000072
is a cluster CiThe cluster head node of (1).
Preferably, the preset routing algorithm is an ant colony optimization algorithm.
It should be noted that the ant colony algorithm is initially a probabilistic algorithm for finding the optimal path, which imitates the behavior of ants finding paths in the process of finding food. The ant can secrete a chemical substance 'pheromone' on the path from which the ant walks in the process of searching for food, the pheromones can attract other ants, when a subsequent ant touches the intersection again, the probability of selecting a path with high concentration of the 'pheromone' is relatively high, and an optimal path with the highest concentration of the 'pheromone' can be found out by the ant in the process of searching for food in the future. In the ant colony optimization algorithm implementation process. The pheromone comprehensively considers three factors of energy, distance and time delay.
In order to achieve relative balance of energy consumption of different nodes, it is necessary to avoid that each node transmits data through the same optimal path, so that the data packet flow of the path is too large, and the energy consumption of the node is caused. The algorithm is improved to accelerate convergence and avoid convergence to an optimal path, so that by adaptively changing the pheromone concentration of the algorithm, the routing consumption of ants, namely the energy required to be consumed by data packet transmission and the residual energy of nodes are both taken as factors influencing the pheromone concentration, and in the algorithm, the residual energy of the accessed nodes is taken as a parameter influencing the pheromone concentration. The specific implementation process is as follows:
assuming that an ant m is in cluster head node i, the probability that it selects the next cluster head node j for access:
Figure BDA0001456779980000081
(if j∈allowed k) Wherein i and j are respectively a starting cluster head node and a next cluster head node;
Figure BDA0001456779980000082
the visibility is the reciprocal of the distance between two paths i and j; alpha is alphaij(t) pheromone concentrations from i to j at time t; allowedkThe cluster head nodes which are not accessed are set; τ, β are two constants, weighted for pheromones and visibility.
And (3) updating pheromone: and (3) calculating the total path length CK of each ant every time iteration is completed, and updating the pheromone according to the following formula:
Figure BDA0001456779980000083
wherein m is the number of cluster head nodes, 0<ρ<1 is the evaporation rate of pheromone, Δ αij kPheromones left for the kth ant cluster head node on paths i to j.
The invention provides a routing method of a wireless sensor network, which comprises the steps of dividing the wireless sensor network into k clusters according to a preset clustering algorithm; each cluster comprises a cluster head node and a plurality of cluster member nodes; the difference value of the distance between the cluster head node and each cluster member node is smaller than a preset error threshold value, and the preset error threshold value is minimum within an allowable range; controlling communication data to be transmitted from the cluster member node to the cluster head node; establishing a dynamic optimal inter-cluster routing path between a cluster head node and a sink node according to a preset routing algorithm; and controlling the communication data to be transmitted from the cluster head node to the aggregation node.
By utilizing the invention, the wireless sensing network is divided into a plurality of clusters through the preset clustering algorithm, and the distances between the cluster head nodes and each cluster member node are ensured to be as equal as possible, so that the energy consumed when each cluster member node sends data to the cluster head nodes is as equal as possible, and because the cluster head nodes and the sink nodes transmit communication data through the dynamic optimal inter-cluster routing path, the energy consumed when each cluster head node transmits the communication data is also minimum.
The present invention also provides a routing apparatus for a wireless sensor network, as shown in fig. 3, and fig. 3 is a schematic structural diagram of the routing apparatus for a wireless sensor network provided in the present invention, and the apparatus includes:
the wireless sensor network cluster dividing device comprises a dividing unit 1, a clustering unit and a processing unit, wherein the dividing unit is used for dividing a wireless sensor network into k clusters according to a preset clustering algorithm, and each cluster comprises a cluster head node and a plurality of cluster member nodes; the difference value of the distance between the cluster head node and each cluster member node is smaller than a preset error threshold value, and the preset error threshold value is minimum within an allowable range;
a first control unit 2 for controlling transmission of communication data from the cluster member node to the cluster head node;
the creating unit 3 is used for creating a dynamic optimal inter-cluster routing path between the cluster head nodes and the sink nodes according to a preset routing algorithm;
and the second control unit 4 is used for controlling the communication data to be transmitted to the sink node from the cluster head node through the dynamic optimal inter-cluster routing path.
Preferably, the dividing unit 1 includes:
the selecting subunit is used for selecting k nodes from the n nodes as historical optimal cluster head nodes, and the cluster where the historical optimal cluster head nodes are located is the historical optimal cluster;
the first calculating subunit is used for calculating the distance between the remaining nodes and each historical optimal cluster head node and dividing the remaining nodes and the historical optimal cluster head node closest to the remaining nodes into a cluster;
the second calculation subunit is used for obtaining a new historical optimal cluster head node of each cluster through calculation, and the cluster where the new historical optimal cluster head node is located becomes a new historical optimal cluster;
the judging subunit is used for judging whether the difference value between the standard measure function value of the new optimal historical cluster and the standard measure function value of the previous optimal historical cluster is smaller than a preset standard threshold or reaches the maximum iteration number, and if so, ending the clustering process; if not, returning to step S2, at this time, the historical optimal cluster head node in step S2 is the new historical optimal cluster head node calculated in step S3.
The invention provides a wireless sensor network routing device, which comprises a wireless sensor network which is divided into k clusters according to a preset clustering algorithm; each cluster comprises a cluster head node and a plurality of cluster member nodes; the difference value of the distance between the cluster head node and each cluster member node is smaller than a preset error threshold value, and the preset error threshold value is minimum within an allowable range; transmitting communication data from the cluster member node to the cluster head node; establishing a dynamic optimal inter-cluster routing path between a cluster head node and a sink node according to a preset routing algorithm; and transmitting the communication data from the cluster head node to the sink node.
By utilizing the invention, the wireless sensing network is divided into a plurality of clusters through the preset clustering algorithm, and the distances between the cluster head nodes and each cluster member node are ensured to be as equal as possible, so that the energy consumed when each cluster member node sends data to the cluster head nodes is as equal as possible, and because the cluster head nodes and the sink nodes transmit communication data through the dynamic optimal inter-cluster routing path, the energy consumed when each cluster head node transmits the communication data is also minimum.
The invention also provides a wireless sensor network routing device, which comprises:
a memory for storing a computer program;
a processor for executing a computer program to implement the steps of the routing method of the wireless sensor network according to any one of the embodiments.
The invention further provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of any one of the wireless sensor network routing methods according to the embodiments.
For the introduction of the wireless sensor network routing device and the computer readable storage medium provided by the present invention, please refer to the above method embodiments, which are not repeated herein.
The present invention provides a wireless sensor network routing method, apparatus, device and computer readable storage medium. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (5)

1.一种无线传感网路由方法,其特征在于,包括:1. a wireless sensor network routing method, is characterized in that, comprises: 根据预设分簇算法,将无线传感网分为k个簇;各个所述簇包括一个簇头节点以及若干个簇成员节点;所述簇头节点与各个所述簇成员节点的距离的差值均小于预设误差阈值,所述预设误差阈值在可允许范围内最小;According to a preset clustering algorithm, the wireless sensor network is divided into k clusters; each of the clusters includes a cluster head node and several cluster member nodes; the difference between the distances between the cluster head node and each of the cluster member nodes The values are all smaller than the preset error threshold, and the preset error threshold is the smallest within the allowable range; 控制通信数据从所述簇成员节点传输至所述簇头节点;Control communication data is transmitted from the cluster member node to the cluster head node; 根据预设路由算法,建立所述簇头节点与汇聚节点之间的动态最优簇间路由路径;establishing a dynamic optimal inter-cluster routing path between the cluster head node and the sink node according to a preset routing algorithm; 控制所述通信数据从所述簇头节点通过所述动态最优簇间路由路径传输至所述汇聚节点;controlling the communication data to be transmitted from the cluster head node to the sink node through the dynamic optimal inter-cluster routing path; 所述预设分簇算法为k-means算法,所述根据预设分簇算法,将无线传感网分为k个簇的过程具体包括:The preset clustering algorithm is a k-means algorithm, and the process of dividing the wireless sensor network into k clusters according to the preset clustering algorithm specifically includes: 步骤S1:从n个节点选择k个节点作为历史最优簇头节点,所述历史最优簇头节点所在的簇为历史最优簇;Step S1: select k nodes from the n nodes as the historical optimal cluster head node, and the cluster where the historical optimal cluster head node is located is the historical optimal cluster; 步骤S2:计算剩余节点与各个所述历史最优簇头节点的距离,将所述剩余节点与距离所述剩余节点最近的历史最优簇头节点划分为一个簇;Step S2: Calculate the distance between the remaining nodes and each of the historical optimal cluster head nodes, and divide the remaining nodes and the historical optimal cluster head nodes closest to the remaining nodes into a cluster; 步骤S3:通过计算得到每个所述簇的新的历史最优簇头节点,所述新的历史最优簇头节点所在的簇成为新的历史最优簇;Step S3: obtaining a new historical optimal cluster head node of each of the clusters through calculation, and the cluster where the new historical optimal cluster head node is located becomes a new historical optimal cluster; 步骤S4:判断所述新的历史最优簇的标准测度函数值与上一个历史最优簇的标准测度函数值的差值是否小于预设标准阈值或达到最大迭代次数,若是,则结束分簇过程;若否,则返回步骤S2,此时步骤S2中的所述历史最优簇头节点为步骤S3中计算得到的所述新的历史最优簇头节点;Step S4: judging whether the difference between the standard measurement function value of the new historical optimal cluster and the standard measurement function value of the previous historical optimal cluster is less than a preset standard threshold or reaches the maximum number of iterations, and if so, end clustering process; if not, return to step S2, and the historical optimal cluster head node in step S2 is the new historical optimal cluster head node calculated in step S3; 根据预设路由算法,建立所述簇头节点与汇聚节点之间的动态最优簇间路由路径的过程可以包括:According to the preset routing algorithm, the process of establishing the dynamic optimal inter-cluster routing path between the cluster head node and the sink node may include: 所述预设路由算法为蚁群优化算法;The preset routing algorithm is an ant colony optimization algorithm; 当所述通信数据传输到簇头节点i,则根据所述簇头节点i选择下一簇头节点j进行访问的概率:
Figure FDA0003117097130000011
确定所述通信数据传输的下一簇头节点,其中i,j分别为起点簇头节点和下一簇头节点;
Figure FDA0003117097130000021
为能见度,是两点i,j路距离的倒数;αij(t)为时间t时由i到j的信息素浓度;allowedk为尚未访问过的簇头节点集合;τ,β为两常数,分别是信息素和能见度的加权值;
When the communication data is transmitted to the cluster head node i, the probability of selecting the next cluster head node j for access according to the cluster head node i:
Figure FDA0003117097130000011
Determine the next cluster head node of the communication data transmission, wherein i, j are the starting point cluster head node and the next cluster head node respectively;
Figure FDA0003117097130000021
is the visibility, which is the reciprocal of the distance between two points i and j; α ij (t) is the pheromone concentration from i to j at time t; allowed k is the cluster head node set that has not been visited; τ, β are two constants , are the weighted values of pheromone and visibility, respectively;
当每完成一次簇头节点迭代,计算每只蚂蚁全部路径长度CK,根据公式
Figure FDA0003117097130000022
更新信息素,其中m为簇头节点个数,0<ρ<=1为信息素的蒸发率,Δαij k为第k个簇头节点在路径i到j所留下来的信息素。
When each iteration of the cluster head node is completed, the total path length CK of each ant is calculated, according to the formula
Figure FDA0003117097130000022
Update the pheromone, where m is the number of cluster head nodes, 0<ρ<=1 is the evaporation rate of the pheromone, and Δα ij k is the pheromone left by the kth cluster head node on the path i to j.
2.根据权利要求1所述的方法,其特征在于,所述标准测度函数值为簇内误差平方总和,计算所述簇内误差平方总和的公式如下:2. The method according to claim 1, wherein the standard measurement function value is the sum of squares of errors within a cluster, and the formula for calculating the sum of squares of errors within a cluster is as follows:
Figure FDA0003117097130000023
Figure FDA0003117097130000023
其中,E为标准测度函数,k为所述簇的总数,Ci为所述簇的集合,X为所述簇的成员节点,
Figure FDA0003117097130000024
为所述簇Ci的簇头节点。
Among them, E is the standard measure function, k is the total number of the clusters, C i is the set of the clusters, X is the member nodes of the clusters,
Figure FDA0003117097130000024
is the cluster head node of the cluster C i .
3.一种无线传感网路由装置,其特征在于,包括:3. A wireless sensor network routing device, comprising: 划分单元,用于根据预设分簇算法,将无线传感网分为k个簇;各个所述簇包括一个簇头节点以及若干个簇成员节点;所述簇头节点与各个所述簇成员节点的距离的差值均小于预设误差阈值,所述预设误差阈值在可允许范围内最小;A dividing unit is used to divide the wireless sensor network into k clusters according to a preset clustering algorithm; each of the clusters includes a cluster head node and several cluster member nodes; the cluster head node and each of the cluster members The difference between the distances of the nodes is all smaller than the preset error threshold, and the preset error threshold is the smallest within the allowable range; 第一控制单元,用于控制通信数据从所述簇成员节点传输至所述簇头节点;a first control unit for controlling the transmission of communication data from the cluster member node to the cluster head node; 创建单元,用于根据预设路由算法,建立所述簇头节点与汇聚节点之间的动态最优簇间路由路径;A creation unit, configured to establish a dynamic optimal inter-cluster routing path between the cluster head node and the sink node according to a preset routing algorithm; 第二控制单元,用于控制所述通信数据从所述簇头节点通过所述动态最优簇间路由路径传输至所述汇聚节点;a second control unit, configured to control the communication data to be transmitted from the cluster head node to the sink node through the dynamic optimal inter-cluster routing path; 所述划分单元包括:The division unit includes: 选取子单元,用于从n个节点选择k个节点作为历史最优簇头节点,所述历史最优簇头节点所在的簇为历史最优簇;Selecting a subunit for selecting k nodes from n nodes as the historically optimal cluster head node, and the cluster where the historically optimal cluster head node is located is the historically optimal cluster; 第一计算子单元,用于计算剩余节点与各个所述历史最优簇头节点的距离,将所述剩余节点与距离所述剩余节点最近的历史最优簇头节点划分为一个簇;The first calculation subunit is used to calculate the distance between the remaining nodes and each of the historical optimal cluster head nodes, and divide the remaining nodes and the historical optimal cluster head nodes closest to the remaining nodes into one cluster; 第二计算子单元,用于通过计算得到每个所述簇的新的历史最优簇头节点,所述新的历史最优簇头节点所在的簇成为新的历史最优簇;The second calculation subunit is used to obtain a new historical optimal cluster head node of each of the clusters through calculation, and the cluster where the new historical optimal cluster head node is located becomes the new historical optimal cluster; 判断子单元,用于判断所述新的历史最优簇的标准测度函数值与上一个历史最优簇的标准测度函数值的差值是否小于预设标准阈值或达到最大迭代次数,若是,则结束分簇过程;若否,则返回步骤S2,此时步骤S2中的所述历史最优簇头节点为步骤S3中计算得到的所述新的历史最优簇头节点;The judgment subunit is used to judge whether the difference between the standard measurement function value of the new historical optimal cluster and the standard measurement function value of the previous historical optimal cluster is less than a preset standard threshold or reaches the maximum number of iterations, and if so, then End the clustering process; if not, return to step S2, and the historical optimal cluster head node in step S2 is the new historical optimal cluster head node calculated in step S3; 所述第二计算子单元用于,所述预设路由算法为蚁群优化算法;当所述通信数据传输到簇头节点i,则根据所述簇头节点i选择下一簇头节点j进行访问的概率:
Figure FDA0003117097130000031
确定所述通信数据传输的下一簇头节点,其中i,j分别为起点簇头节点和下一簇头节点;
Figure FDA0003117097130000032
为能见度,是两点i,j路距离的倒数;αij(t)为时间t时由i到j的信息素浓度;allowedk为尚未访问过的簇头节点集合;τ,β为两常数,分别是信息素和能见度的加权值;
The second computing sub-unit is used for the preset routing algorithm to be an ant colony optimization algorithm; when the communication data is transmitted to the cluster head node i, the next cluster head node j is selected according to the cluster head node i to perform the operation. Probability of visiting:
Figure FDA0003117097130000031
Determine the next cluster head node of the communication data transmission, wherein i, j are the starting point cluster head node and the next cluster head node respectively;
Figure FDA0003117097130000032
is the visibility, which is the reciprocal of the distance between two points i and j; α ij (t) is the pheromone concentration from i to j at time t; allowed k is the cluster head node set that has not been visited; τ, β are two constants , are the weighted values of pheromone and visibility, respectively;
当每完成一次簇头节点迭代,计算每只蚂蚁全部路径长度CK,根据公式
Figure FDA0003117097130000033
更新信息素,其中m为簇头节点个数,0<ρ<=1为信息素的蒸发率,Δαij k为第k个簇头节点在路径i到j所留下来的信息素。
When each iteration of the cluster head node is completed, the total path length CK of each ant is calculated, according to the formula
Figure FDA0003117097130000033
Update the pheromone, where m is the number of cluster head nodes, 0<ρ<=1 is the evaporation rate of the pheromone, and Δα ij k is the pheromone left by the kth cluster head node on the path i to j.
4.一种无线传感网路由设备,其特征在于,包括:4. A wireless sensor network routing device, comprising: 存储器,用于存储计算机程序;memory for storing computer programs; 处理器,用于执行所述计算机程序以实现如权利要求1至2任一项所述无线传感网路由方法的步骤。The processor is configured to execute the computer program to implement the steps of the wireless sensor network routing method according to any one of claims 1 to 2. 5.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至2任一项所述无线传感网路由方法的步骤。5. A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the wireless transmission according to any one of claims 1 to 2 is implemented. The steps of the sensor network routing method.
CN201711070565.7A 2017-11-03 2017-11-03 Wireless sensor network routing method, apparatus, device, and computer-readable storage medium Expired - Fee Related CN107659974B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711070565.7A CN107659974B (en) 2017-11-03 2017-11-03 Wireless sensor network routing method, apparatus, device, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711070565.7A CN107659974B (en) 2017-11-03 2017-11-03 Wireless sensor network routing method, apparatus, device, and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN107659974A CN107659974A (en) 2018-02-02
CN107659974B true CN107659974B (en) 2021-08-13

Family

ID=61096938

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711070565.7A Expired - Fee Related CN107659974B (en) 2017-11-03 2017-11-03 Wireless sensor network routing method, apparatus, device, and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN107659974B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3783952A1 (en) * 2019-08-20 2021-02-24 Mitsubishi Electric R&D Centre Europe B.V. Method for providing network orchestration for industrial communication system
CN111093246B (en) * 2019-12-30 2022-05-31 国网北京市电力公司 Intelligent clustering method for wireless sensor network based on human factor engineering
CN111405634B (en) * 2020-02-26 2022-03-04 中国空间技术研究院 A wireless sensor network adaptive clustering method and device
CN113242509A (en) * 2021-04-23 2021-08-10 北京科技大学 Unmanned aerial vehicle-assisted IRS communication method for intelligent logistics
CN113573392B (en) * 2021-07-13 2022-11-22 电子科技大学中山学院 Energy-saving communication method under abnormal state of gateway of Internet of things
CN114363988B (en) * 2021-12-10 2023-07-07 北京佰才邦技术股份有限公司 Clustering method and device and electronic equipment
CN114500621B (en) * 2022-01-24 2024-04-26 山东智达自控系统有限公司 Intelligent power distribution control system based on Internet of things

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120104867A (en) * 2011-03-14 2012-09-24 서울시립대학교 산학협력단 Cluster head node election method for hierarchical routing protocol in sensor network
CN103237334B (en) * 2013-04-12 2015-10-28 太原理工大学 A kind of wireless sensor network clustering routing based on tunnel environment
CN105792110B (en) * 2016-03-30 2019-04-30 上海申腾信息技术有限公司 A kind of data fusion of multiple data origin, the processing method of intelligent search
CN106102112B (en) * 2016-05-19 2019-06-11 东华大学 A Data Collection Method of Mobile Sink Node Based on Ant Colony Algorithm
CN106304235A (en) * 2016-08-22 2017-01-04 广东工业大学 A Cooperative Clustering Routing Communication Method Based on Hierarchical Area Division in WSN
CN107087290B (en) * 2017-02-17 2020-08-11 广东工业大学 Wireless sensor network dynamic clustering target tracking method and device
CN107277889B (en) * 2017-08-03 2020-10-20 扬州大学 Wireless sensor network clustering method based on k-means

Also Published As

Publication number Publication date
CN107659974A (en) 2018-02-02

Similar Documents

Publication Publication Date Title
CN107659974B (en) Wireless sensor network routing method, apparatus, device, and computer-readable storage medium
US10439890B2 (en) Optimal deployment of fog computations in IoT environments
CN105246097B (en) A kind of wireless sense network optimization method for survival time with mobile Sink node
CN101299861A (en) Base station system polling path automatization determination method based on shortest cycle
US11425628B2 (en) Method and system for achieving auto adaptive clustering in a sensor network
Chen et al. Joint optimization of sensing and computation for status update in mobile edge computing systems
CN118353827A (en) Dynamic route optimization method, device, equipment and storage medium
Hasanin et al. [Retracted] Efficient Multiuser Computation for Mobile‐Edge Computing in IoT Application Using Optimization Algorithm
Zhou et al. Long link wireless sensor routing optimization based on improved adaptive ant colony algorithm
Tewari et al. An energy efficient routing scheme in internet of things enabled WSN: neuro-fuzzy approach
Tyagi et al. GM-WOA: a hybrid energy efficient cluster routing technique for SDN-enabled WSNs
Zhang et al. Energy efficient sleep schedule with service coverage guarantee in wireless sensor networks
CN111698752A (en) System and method for waking up nodes of Internet of things through intelligent path finding
CN111405634A (en) A wireless sensor network adaptive clustering method and device
Kang et al. Towards scalability of dense sensor networks: A software-defined networking approach
CN111010704B (en) Underwater wireless sensor network data prediction optimization method based on exponential smoothing
Lemos et al. Reducing energy consumption in provisioning of virtual sensors by similarity of heterogenous sensors
CN104113590B (en) Copy selection method based on copy response time prediction
Yuvaraja et al. Lifetime enhancement of WSN using energy-balanced distributed clustering algorithm with honey bee optimization
JP2017038148A (en) Tree route determination device and tree route determination method
Sebastin Suresh et al. Fuzzy logic based nodes distributed clustering for energy efficient fault tolerance in IoT-enabled WSN
CN112738756B (en) Internet of things equipment data collection method and device
Yang et al. An efficient top-k query processing framework in mobile sensor networks
Vahabi et al. Reinforcement learning movement path for multiple mobile sinks in wireless sensor networks
Allani et al. A Multi-Objective Clustering for Better Data Management in Connected Environment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210813

CF01 Termination of patent right due to non-payment of annual fee