Wireless sensor network routing method based on layering method
The hierarchical routing method with GWO-based cluster head selection and energy thresholding addresses uneven energy consumption in wireless sensor networks, improving network longevity and efficiency.
Patent Information
- Application Number
- CN202411239089.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2024-12-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing wireless sensor network routing methods suffer from uneven energy consumption among nodes, leading to premature node failure and reduced network lifespan due to inefficient data forwarding and poor energy balance.
A hierarchical routing method using the Grey Wolf Optimizer (GWO) algorithm to dynamically divide the network into clusters, select optimal cluster heads based on fitness functions, and balance energy consumption by setting energy thresholds for data forwarding.
The method extends network lifespan by balancing energy consumption and preventing premature node death, enhancing data transmission efficiency and network longevity.
Smart Images

Figure SMS_1 
Figure SMS_2 
Figure SMS_5
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of wireless sensor networks, and in particular relates to a routing method for a wireless sensor network. Background Art
[0002] Wireless sensor networks are composed of a large number of low-cost, low-power micro sensor nodes deployed in the monitoring area, forming a multi-hop, self-organizing network system through wireless communication. When wireless sensor networks transmit data, there is an energy balance optimization problem. The energy consumption of each sensor node is uneven, causing some sensor nodes to run out of energy in advance and lose the function of data collection and data transmission. This affects the communication range and network function of the entire network.
[0003] Classic wireless sensor network routing methods include flat routing protocols, location-aware routing protocols, and geographic routing protocols. These methods cannot effectively reduce the number of data forwardings, while hierarchical routing protocols divide the entire network into layers, elect some suitable sensor nodes as cluster head nodes to manage the remaining member nodes, and communicate with the base station. Summary of the invention
[0004] The invention aims to solve the problem of uneven node energy consumption in wireless sensor networks, as well as the problems of poor data transmission efficiency and short network life in existing routing methods.
[0005] The wireless sensor network routing method based on the hierarchical method includes the following steps:
[0006] S1 first determines the optimal number of clusters based on the number of nodes in the network and calculates the relative distance and variance between nodes;
[0007] In order to prevent isolated nodes from becoming centroid nodes and forming isolated clusters, S2 establishes a candidate set of centroids based on the variance between sensor nodes;
[0008] In the process of selecting the first centroid node in the candidate set, S3 selects the node with the largest relative distance to other nodes as the centroid node;
[0009] In the election of the remaining centroid nodes in S4, the node with the largest relative distance to the existing centroid node is selected as the new centroid node. This is to avoid the problem of over-crowding due to excessive concentration of centroid nodes;
[0010] S5: In the cluster formed in the previous step, the selected centroid node runs the cluster head optimization algorithm to calculate the fitness function of each node and find the optimal cluster head node in each cluster space. The whole process is as follows: Figure 1 As shown;
[0011] S6 In a wireless sensor network, cluster member nodes collect data and transmit it to cluster head nodes. After data integration, cluster head nodes transmit data to base stations. Therefore, cluster head nodes responsible for sending and receiving a large amount of data tend to consume energy quickly, and due to differences in the physical locations of cluster head nodes and the distance from the base station, the energy consumption of each cluster head node is uneven. In order to prevent the premature death of cluster head nodes, cluster head nodes with higher energy are selected for information forwarding.
[0012] In the above-mentioned wireless sensor network routing method based on the hierarchical method, step S1 comprises the following steps:
[0013] S11 first determines the number of clusters K according to the number of sensor nodes in the network area. The optimal number of clusters will change dynamically as the number of sensor nodes in the area changes;
[0014] S12 calculates the relative distance dist(x) between each sensor node and the remaining sensor nodes according to the two-dimensional position coordinates of each sensor node. i ,x j ), variance σ i , the above data is sent to the base station and stored in the memory of the base station and the sensor node.
[0015] In the above-mentioned wireless sensor network routing method based on the hierarchical method, step S2 comprises the following steps:
[0016] The S21 base station calculates the average coordinate x of the sensor node according to the two-dimensional position coordinates of each node in the memory; calculates the variance σ of the sensor node position coordinate according to the average coordinate and the two-dimensional position coordinate of the sensor node;
[0017] S22 Each sensor node will take its own variance σ i Compare with the total average variance σ, exclude isolated nodes with large variance; establish the centroid node candidate set S m , add the sensor node number with smaller variance to the centroid node candidate set S m .
[0018] In the above-mentioned wireless sensor network routing method based on the hierarchical method, step S3 comprises the following steps:
[0019] S31 base station sends candidate set node information to sensor nodes through broadcasting;
[0020] S32 sensor nodes receive the broadcast, and the sensor nodes in the candidate set retrieve the relative distance dist(x) to the rest of the nodes in the candidate set. i ,x j ); in the candidate set S m Node x in iCalculate the total distance d between itself and the remaining candidate set nodes i , compare all d i , select d i The largest candidate set node becomes the first centroid node O1.
[0021] In the above-mentioned wireless sensor network routing method based on the hierarchical method, step S4 comprises the following steps:
[0022] After S41 selects the first centroid node O1, the first centroid node sends a broadcast to elect the node with the largest distance from the centroid node in the candidate set to become the second centroid node O2;
[0023] According to the minimum distance principle, the non-centroid nodes in the S42 network are added to the cluster with the smaller distance to the two centroid nodes to form two clusters;
[0024] S43 In each cluster that has been formed, the centroid node O l According to the farthest distance from itself, l ,x i ), select a candidate node O l ';
[0025] S44 Each candidate node forms a new candidate set, and compares each candidate set node O l 'With its own cluster centroid node O l The distance dist(O l ,O l '), elect the candidate node with the largest distance to become the new centroid node; non-centroid nodes are re-clustered according to the principle of minimum distance;
[0026] S45 repeats the above steps of S44 until the network space is divided into K initial cluster spaces that meet the optimal number of clusters.
[0027] In the above-mentioned wireless sensor network routing method based on the hierarchical method, step S5 comprises the following steps:
[0028] S51 In each initial cluster space, the centroid node runs the cluster head optimization algorithm based on the Grey Wolf Optimizer (GWO);
[0029] S52 first initializes the population, randomly generates a group of candidate cluster head nodes in each cluster space as the initial solution, sets the number of algorithm iterations to 100, and sets the population size to 1 / 4 of the number of cluster member nodes in the cluster space;
[0030] S53 In the cluster head selection algorithm based on the grey wolf algorithm, in order to optimize the cluster head selection and improve the life cycle of the network, the present invention sets the following five fitness functions, which are: node residual energy, distance between nodes, distance between cluster heads and base stations, node degree and node centrality;
[0031] S54 calculates the fitness function of each "grey wolf" (candidate cluster head) in the population. Nodes with higher fitness are more likely to be selected as cluster heads. The three candidate cluster head nodes with the highest fitness are marked as α, β, and δ wolves respectively.
[0032] S55 updates the position of each wolf according to the basic process of the gray wolf algorithm, and calculates the distance coefficients A and C respectively; updates the position of each gray wolf according to the positions of α, β, and δ wolves;
[0033] S56 calculates the fitness value of the updated position (i.e., the new candidate cluster head). If the fitness value of the new candidate cluster head node is better, the positions of α, β, and δ wolves are updated;
[0034] S57 repeats steps S54 to S56 until the preset number of iterations is reached, and each cluster space completes cluster head optimization, and the α wolf of each cluster space is set as the cluster head node of the cluster.
[0035] In the above-mentioned wireless sensor network routing method based on the hierarchical method, step S6 comprises the following steps:
[0036] S61 In the present invention, the main data forwarding task of the cluster network is completed by the cluster head node, and the cluster member nodes only communicate with the corresponding cluster head node. Therefore, the energy of the cluster head node is often consumed faster and the energy consumption of each cluster head node is uneven. In order to achieve energy balance among cluster head nodes, an energy threshold E is set. th ;
[0037] The S62 cluster head node divides the effective forwarding cluster head nodes in the adjacency table into candidate sets using historical network information and neighbor node information, and calculates the average residual energy of the effective nodes, which is defined as the energy threshold E th ,The cluster head nodes whose residual energy is lower than the threshold do not participate in the forwarding of this data;
[0038] S63 The cluster head node sending data calculates the transmission cost of the forwarding nodes in the candidate set, and arranges the forwarding candidate set C in ascending order according to the forwarding transmission cost. i The order of forwarding cluster head nodes in ;
[0039] S64 Candidate Set C i The forwarding cluster head node c with the highest priority i1 If a data packet is received, then regardless of whether other candidate forwarding nodes receive the data packet, c i1will be the next hop for forwarding data; assuming that the first priority c i1 If the data packet is not received successfully, the candidate cluster head node with the second priority is responsible for forwarding it, and so on.
[0040] Beneficial effects:
[0041] The invention proposes a clustering method for wireless sensor networks based on a hierarchical method. First, the network space of the wireless sensor network is divided into cluster spaces by using an improved clustering method. Then, cluster head election is performed in the pre-divided cluster space, which effectively solves the problem of uneven node energy consumption caused by uneven cluster space division in the traditional clustering method. In the cluster head election stage, five fitness functions for electing the best cluster head are proposed. Cluster head election is performed in the pre-divided cluster space by using the GWO algorithm, which avoids the problem of over-dense distribution of cluster head nodes caused by selecting all cluster head nodes in the entire network space. In the cluster space function division of the wireless sensor network, cluster member nodes are responsible for data collection and data transmission to cluster head nodes, and cluster head nodes are responsible for managing cluster member nodes and data forwarding, clarifying the division of labor of different nodes and improving the life cycle of the network. In the inter-cluster communication link, the cluster head node determines whether to participate in the forwarding work based on the energy threshold and the forwarding priority value. The cluster head node with higher residual energy is responsible for data forwarding, which not only improves the balance of energy consumption of the cluster head node, but also avoids the problem of early energy exhaustion caused by frequent participation of individual cluster head nodes in data forwarding.
[0042] From the experimental results, the method proposed in the present invention has a longer network life than the traditional wireless sensor network clustering method, and the energy consumption is more balanced. It can be used to lay and build the wireless sensor network topology structure, and has certain application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 Flowchart of clustering method for wireless sensor networks
[0044] Figure 2 A random node distribution graph
[0045] Figure 3 The clustering result diagram
[0046] Figure 4 Network life cycle diagram for different numbers of nodes DETAILED DESCRIPTION
[0047] In order to solve the problem of uneven clustering, when the distribution positions of each sensor node in the wireless sensor network are known, the present invention first divides the cluster space into relatively balanced cluster spaces, then performs cluster head election in the cluster space, and finally proposes a method for inter-cluster data transmission. The present invention is further described below in conjunction with specific implementation methods. Note that the nodes and base stations in the present invention are randomly distributed, such as Figure 2 shown.
[0048] S1 first determines the optimal number of clusters based on the number of nodes in the network and calculates the relative distance and variance between nodes; specifically:
[0049] S11 first determines the number of clusters K according to the number of sensor nodes in the network area. The optimal number of clusters will change dynamically as the number of sensor nodes in the area changes;
[0050] S12 calculates the relative distance dist(x) between each sensor node and the remaining sensor nodes according to the two-dimensional position coordinates of each sensor node. i ,x j ), variance σ i , the distance between nodes is calculated using the Euclidean distance as shown below:
[0051]
[0052] Wherein, m represents the dimension of the sensor node position coordinates. In the present invention, the wireless sensor node coordinates are represented by two-dimensional coordinates. The variance of each sensor node is expressed as:
[0053]
[0054] The above data are sent to the base station and stored in the memory of the base station and the sensor node.
[0055] In order to prevent isolated nodes from becoming centroid nodes and forming isolated clusters, S2 establishes a candidate set of centroids based on the variance between sensor nodes; specifically:
[0056] The S21 base station calculates the average coordinates of the sensor nodes based on the two-dimensional position coordinates of each node in the memory The variance σ of the sensor node position coordinates is calculated based on the average value coordinates and the two-dimensional position coordinates of the sensor node;
[0057] S22 Each sensor node will take its own variance σ i Compare with the total variance σ, exclude isolated nodes with large variance; establish the centroid node candidate set S m , add the sensor node number with smaller variance to the centroid node candidate set S m .
[0058] In this embodiment, the average value of the sensor node coordinates is calculated as The variance of all sensor node coordinates is calculated as:
[0059]
[0060] In order to reduce the length of the data transmission path and thus reduce the energy consumption of the sensor nodes during the data transmission process, it is necessary to prevent isolated nodes far away from other sensor nodes from becoming cluster head nodes and participating in too much data transmission and reception. The variance of the sensor node itself is:
[0061]
[0062] In the formula, x j Represents sensor node x i According to the variance σ of each sensor node i The quantitative relationship with the total variance σ is used to establish the candidate set S of centroid nodes. m ={x i |σ i ≤λσ;i=1,..,n}, where λ is a stretch factor. By setting the value of λ, some isolated nodes that are not suitable as centroid nodes can be excluded, thereby improving clustering performance. In the present invention, λ is set to 1.4.
[0063] In the process of selecting the first centroid node from the candidate set, S3 selects the node with the largest relative distance from other nodes as the centroid node; specifically:
[0064] S31 base station sends candidate set node information to all sensor nodes through broadcasting;
[0065] S32 sensor nodes receive the broadcast, and the sensor nodes in the candidate set retrieve the relative distance dist(x) to the rest of the nodes in the candidate set. i ,x j ) information; in the candidate set S m Node x in i Calculate the total distance d between itself and the remaining candidate set nodes i :
[0066]
[0067] At this time, n+1 is the number of nodes in the candidate set. Compare the d i , select d i The largest candidate set node becomes the first centroid node O1, which is expressed as shown in the following formula.
[0068]
[0069] In the S4 remaining centroid node election, the node with the largest relative distance from the existing centroid nodes is selected as the new centroid node to avoid the problem of over-dense clustering caused by the over-concentration of centroid nodes; specifically:
[0070] After selecting the first centroid node O1, the first centroid node sends a broadcast to elect the node with the largest distance from the centroid nodes in the candidate set as the second centroid node O2;
[0071] Non-centroid nodes in the network join the cluster with the smaller distance from the two centroid nodes according to the minimum distance principle to form two clusters;
[0072] S43 In each of the formed clusters, the centroid node O l elects a candidate node O l ,x i ' according to the dist(o l ),x
[0073] The candidate nodes form a new candidate set, and compare the distance dist(O l ',O l ) between each candidate set node O l ' and its cluster centroid node O l '. The candidate node with the largest distance is elected as the new centroid node; non-centroid nodes are re-clustered according to the minimum distance principle;
[0074] Repeat the above steps of S44 until the network space is divided into K initial cluster spaces that meet the optimal number of clusters.
[0075] In this implementation, to prevent the problem of over-dense clustering in the network space, the second centroid node is selected as far away from the first centroid node as possible, expressed as:
[0076]
[0077] In this formula, x i represents the remaining sensor nodes in the candidate set after the selection of the first centroid node is completed.
[0078] After the election of the two initial centroid nodes, the following assumptions are made for the election of the remaining centroid nodes: Assume that k (2 < k < K) centroid nodes have been selected, and a candidate centroid node ο′ i , i = 1,..., k is elected within the k clusters. The election principle is as follows:
[0079]
[0080] In this formula, ο′ irepresents the candidate centroid node selected in the i-th cluster, C i represents the set of all cluster member nodes in the cluster space composed of centroid nodes. According to the above formula, we get the candidate centroid node set ο' = {ο'1, ο'2, ..., ο' k}, and secondly, the candidate centroid node that satisfies the following formula in the election candidate set becomes the new centroid node. k+1 :
[0081]
[0082] S5: In the cluster formed in the previous step, the selected centroid node runs the cluster head optimization algorithm to calculate the fitness function of each node and find the optimal cluster head node in each cluster space; specifically:
[0083] S51 In each initial cluster space, the centroid node runs the cluster head optimization algorithm based on the Grey Wolf Optimizer (GWO);
[0084] S52 first initializes the population, randomly generates a group of candidate cluster head nodes in each cluster space as the initial solution, sets the number of algorithm iterations to 100, and sets the population size to 1 / 4 of the number of cluster member nodes in the cluster space;
[0085] S53 In the cluster head selection algorithm based on the grey wolf algorithm, in order to optimize the cluster head selection and improve the life cycle of the network, the present invention sets the following five fitness functions, which are: node residual energy, distance between nodes, distance between cluster heads and base stations, node degree and node centrality;
[0086] Table 1 Five fitness functions
[0087]
[0088] S54 For each "grey wolf" (candidate cluster head scheme) in the population, calculate its fitness function. Nodes with higher fitness are more likely to be selected as cluster heads. The three candidate cluster head nodes with the highest fitness are marked as α, β, and δ wolves respectively;
[0089] S55 updates the position of each wolf according to the basic process of the gray wolf algorithm, and calculates the distance coefficients A and C respectively; updates the position of each gray wolf according to the positions of α, β, and δ wolves;
[0090] S56 calculates the fitness value of the updated position (i.e., the new candidate cluster head). If the fitness value of the new candidate cluster head node is better, the positions of α, β, and δ wolves are updated;
[0091] S57 repeats steps S54 to S56 until the preset number of iterations is reached, and the candidate cluster head in the clustering scheme represented by α wolf is determined as the new cluster head of each cluster space, completing the cluster head selection. The clustering result is as follows: Figure 3 As shown, the cross star represents the location of the cluster head node.
[0092] S6 In a wireless sensor network, cluster member nodes collect data and transmit it to cluster head nodes. After data integration, cluster head nodes transmit data to the base station. Therefore, cluster head nodes responsible for sending and receiving a large amount of data tend to consume energy quickly, and due to differences in the physical locations of cluster head nodes and the distance from the base station, the energy consumption of each cluster head node is uneven. In order to prevent the premature death of cluster head nodes, cluster head nodes with higher energy are selected for information forwarding; the details are as follows:
[0093] S61 In the present invention, the main data forwarding task of the cluster network is completed by the cluster head node, and the cluster member nodes only communicate with the corresponding cluster head node. Therefore, the energy of the cluster head node is often consumed faster and the energy consumption of each cluster head node is uneven. In order to achieve energy balance among cluster head nodes, an energy threshold E is set. th ;
[0094] The S62 cluster head node divides the effective forwarding cluster head nodes in the adjacency table into candidate sets using historical network information and neighbor node information, and calculates the average residual energy of the effective nodes, which is defined as the energy threshold E th , the calculation formula is as follows:
[0095]
[0096] Threshold E th is the mean residual energy of n candidate nodes. Only nodes exceeding the threshold are selected from the candidate valid nodes to be included in the candidate set, and candidate nodes below the threshold are abandoned. Cluster head nodes with residual energy below the threshold do not participate in the forwarding of this data;
[0097] S63 The cluster head node sending data calculates the transmission cost of the forwarding nodes in the candidate set, and arranges the forwarding candidate set C in ascending order according to the forwarding transmission cost. i The order of forwarding cluster head nodes in ;
[0098] S64 Candidate Set C i The forwarding cluster head node c with the highest priority i1 If a data packet is received, then regardless of whether other candidate forwarding nodes receive the data packet, c i1 will be the next hop for forwarding data; assuming that the first priority c i1 If the data packet is not received successfully, the candidate cluster head node with the second priority is responsible for forwarding it, and so on.
[0099] In order to verify the advantages of the method proposed in this invention, it is compared with three other methods, namely the traditional GWO-based clustering routing algorithm, the HEED-based clustering routing algorithm and the FEEC-IIR-based clustering routing algorithm. The comparison results are as follows: Figure 4 shown.
[0100] from Figure 4 It can be seen from the results that the network life cycle of the wireless sensor network built based on the present invention has advantages over other methods and has a higher use value in real complex wireless sensor networks.
Claims
1. A routing method for a wireless sensor network based on a hierarchical method, characterized in that: The following steps are involved: S1 first determines the optimal number of clusters based on the number of nodes in the network and calculates the relative distance and variance between nodes; In order to prevent isolated nodes from becoming centroid nodes and forming isolated clusters, S2 establishes a candidate set of centroids based on the variance between sensor nodes; In the process of selecting the first centroid node in the candidate set, S3 selects the node with the largest relative distance to other nodes as the centroid node; In the election of the remaining centroid nodes in S4, the node with the largest relative distance to the existing centroid node is selected as the new centroid node. This is to avoid the problem of over-crowding due to excessive concentration of centroid nodes; S5: In the cluster formed in the previous step, the selected centroid node runs the cluster head optimization algorithm, calculates the fitness function of each node, and finds the optimal cluster head node in each cluster space. The whole process is shown in Figure 1. S6 In a wireless sensor network, cluster member nodes collect data and transmit it to cluster head nodes. After data integration, cluster head nodes transmit data to base stations. Therefore, cluster head nodes responsible for sending and receiving a large amount of data tend to consume energy quickly, and due to differences in the physical locations of cluster head nodes and the distance from the base station, the energy consumption of each cluster head node is uneven. In order to prevent the premature death of cluster head nodes, cluster head nodes with higher energy are selected for information forwarding.
2. The routing method of a wireless sensor network based on a hierarchical method according to claim 1, characterized in that: The step S1 determines the optimal number of clusters according to the number of nodes in the network, and calculates the relative distance and variance between the nodes, including the following steps: S11 first determines the number of clusters K according to the number of sensor nodes in the network area. The optimal number of clusters will change dynamically as the number of sensor nodes in the area changes; S12 calculates the relative distance dist(x) between each sensor node and the remaining sensor nodes according to the two-dimensional position coordinates of each sensor node. i ,x j ), variance σ i , the above data is sent to the base station and stored in the memory of the base station and the sensor node.
3. The routing method of a wireless sensor network based on a hierarchical method according to claim 1, characterized in that: The step S2 is to prevent isolated nodes from becoming centroid nodes to form isolated clusters, and to establish a candidate set of centroids according to the variance between sensor nodes, and includes the following steps: The S21 base station calculates the average coordinate x of the sensor node according to the two-dimensional position coordinates of each node in the memory; calculates the variance σ of the sensor node position coordinate according to the average coordinate and the two-dimensional position coordinate of the sensor node; S22 Each sensor node will take its own variance σ i Compare with the total average variance σ, exclude isolated nodes with large variance; establish the centroid node candidate set S m , add the sensor node number with smaller variance to the centroid node candidate set S m .
4. The routing method of a wireless sensor network based on a hierarchical method according to claim 1, characterized in that: The step S3 selects the node with the largest relative distance from other nodes as the centroid node in the process of selecting the first centroid node from the candidate set, and includes the following sub-steps: S31 base station sends candidate set node information to sensor nodes through broadcasting; S32 sensor nodes receive the broadcast, and the sensor nodes in the candidate set retrieve the relative distance dist(x) to the rest of the nodes in the candidate set. i ,x j ); in the candidate set S m Node x in i Calculate the total distance d between itself and the remaining candidate set nodes i , compare all d i , select d i The largest candidate set node becomes the first centroid node O1.
5. The routing method of a wireless sensor network based on a hierarchical method according to claim 1, characterized in that: In the remaining centroid node election in step S4, the node with the largest relative distance to the existing centroid node is selected as the newly added centroid node. This is to avoid the problem of over-crowding due to excessive concentration of centroid nodes. The step S4 includes the following sub-steps: After S41 selects the first centroid node O1, the first centroid node sends a broadcast to elect the node with the largest distance from the centroid node in the candidate set to become the second centroid node O2; According to the minimum distance principle, the non-centroid nodes in the S42 network are added to the cluster with the smaller distance to the two centroid nodes to form two clusters; S43 In each cluster that has been formed, the centroid node O l According to the farthest distance from itself, l ,x i ), select a candidate node O l '; S44 Each candidate node forms a new candidate set, and compares each candidate set node O l 'With its own cluster centroid node O l The distance dist(O l ,O l '), elect the candidate node with the largest distance to become the new centroid node; non-centroid nodes are re-clustered according to the principle of minimum distance; S45 repeats the above steps of S44 until the network space is divided into K initial cluster spaces that meet the optimal number of clusters.
6. The routing method of a wireless sensor network based on a hierarchical method according to claim 1, characterized in that: The step S5 runs the cluster head optimization algorithm on the selected centroid node in the cluster formed in the previous step, calculates the fitness function of each node and searches for the optimal cluster head node in each cluster space, including the following sub-steps: S51 In each initial cluster space, the centroid node runs the cluster head optimization algorithm based on the Grey Wolf Optimizer (GWO); S52 first initializes the population, randomly generates a group of candidate cluster head nodes in each cluster space as the initial solution, sets the number of algorithm iterations to 100, and sets the population size to 1 / 4 of the number of cluster member nodes in the cluster space; S53 In the cluster head selection algorithm based on the grey wolf algorithm, in order to optimize the cluster head selection and improve the life cycle of the network, the present invention sets the following five fitness functions, which are: node residual energy, distance between nodes, distance between cluster heads and base stations, node degree and node centrality; S54 calculates the fitness function of each "grey wolf" (candidate cluster head) in the population. Nodes with higher fitness are more likely to be selected as cluster heads. The three candidate cluster head nodes with the highest fitness are marked as α, β, and δ wolves respectively. S55 updates the position of each wolf according to the basic process of the gray wolf algorithm, and calculates the distance coefficients A and C respectively; updates the position of each gray wolf according to the positions of α, β, and δ wolves; S56 calculates the fitness value of the updated position (i.e., the new candidate cluster head). If the fitness value of the new candidate cluster head node is better, the positions of α, β, and δ wolves are updated; S57 repeats steps S54 to S56 until the preset number of iterations is reached, and each cluster space completes cluster head optimization, and the α wolf of each cluster space is set as the cluster head node of the cluster.
7. The routing method of a wireless sensor network based on a hierarchical method according to claim 1, characterized in that: In step S6, in the wireless sensor network, cluster member nodes collect data and transmit it to the cluster head node. After data integration, the cluster head node transmits the data to the base station. Therefore, the cluster head node responsible for sending and receiving a large amount of data often consumes energy quickly, and due to the differences in the physical locations of the cluster head nodes and the distance from the base station, the energy consumption of each cluster head node is uneven. In order to prevent the premature death of the cluster head node, a cluster head node with higher energy is selected for information forwarding. , including the following sub-steps: S61 In the present invention, the main data forwarding task of the cluster network is completed by the cluster head node, and the cluster member nodes only communicate with the corresponding cluster head node. Therefore, the energy of the cluster head node is often consumed faster and the energy consumption of each cluster head node is uneven. In order to achieve energy balance among cluster head nodes, an energy threshold E is set. th ; The S62 cluster head node divides the effective forwarding cluster head nodes in the adjacency table into candidate sets using historical network information and neighbor node information, and calculates the average residual energy of the effective nodes, which is defined as the energy threshold E th ,The cluster head nodes whose residual energy is lower than the threshold do not participate in the forwarding of this data; S63 The cluster head node sending data calculates the transmission cost of the forwarding nodes in the candidate set, and arranges the forwarding candidate set C in ascending order according to the forwarding transmission cost. i The order of forwarding cluster head nodes in ; S64 Candidate Set C i The forwarding cluster head node c with the highest priority i1 If a data packet is received, then regardless of whether other candidate forwarding nodes receive the data packet, c i1 will be the next hop for forwarding data; assuming that the first priority c i1 If the data packet is not received successfully, the candidate cluster head node with the second priority is responsible for forwarding it, and so on.
Citation Information
Patent Citations
Efficient and energy-saving clustering method based on biological heuristic algorithm
CN115297497A
Wireless sensor network clustering routing method based on grey wolf optimization and Dijkstra
CN117279067A
Distributed Transforms for Efficient Data Gathering in Sensor Networks
US20120014289A1
