Sea rice environment monitoring WSN clustering routing protocol method and system based on multi-parameter perception
By adopting a multi-parameter-aware clustering routing protocol in the WSN in the marine rice environment monitoring, combined with LEACH and particle swarm optimization algorithm, the problems of energy consumption imbalance and inter-cluster communication in large-scale WSN are solved, and the effects of node energy consumption equalization and network life extension are achieved.
Patent Information
- Application Number
- CN202510526917.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-04-25
AI Technical Summary
The existing WSN cluster routing protocols have problems such as uneven energy consumption, complex inter-cluster communication and difficulty in dynamic system adjustment in large-scale marine rice environment monitoring, which is difficult to meet the needs of high-precision environmental control of marine rice.
A WSN clustering routing protocol method based on multi-parameter perception of sea rice environment monitoring is proposed. The first cluster construction is carried out through the LEACH algorithm, and the first rotation weight of the cluster is dynamically adjusted in combination with the particle swarm optimization algorithm, and the routing paths within and between clusters are optimized to ensure the balance of node energy consumption and the extension of network life.
It realizes the balance of energy consumption of large-scale WSN nodes and extends network life, improves data throughput, and is suitable for marine rice environmental monitoring in complex environments.
Smart Images

Figure CN120050742A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of wireless sensor networks, and specifically relates to a WSN clustering routing protocol method and system for seawater rice environmental monitoring based on multi-parameter perception. Background Art
[0002] In recent years, seawater rice has become a hot topic in agricultural research, and its high and stable yield requires precise ecological environment control. However, due to environmental conditions and scale limitations, traditional monitoring methods are difficult to meet this demand. Wireless sensor networks (WSNs) can automatically collect environmental data and remotely monitor in complex environments by virtue of their self-organizing network and low-power consumption characteristics. However, the special environment of seawater rice also poses challenges to WSNs, especially the energy consumption problem under large-scale deployment. Therefore, it is crucial to optimize the routing protocol design to reduce energy consumption and extend the network lifetime. Among many routing algorithms, the clustering routing algorithm has become a research hotspot due to its simple structure, efficient topology management, and the need not to maintain complex routing information. Gattani et al. proposed a network load balancing algorithm based on cluster head scoring, which uses the distance and energy of sensor nodes to find the best sensor node, and the sensor node with a high score becomes the cluster head. This reduces the number of data transmissions between sensor nodes and the energy consumption of sensor nodes. However, this algorithm lacks overall optimization consideration for WSNs and does not consider inter-cluster routing, so it is not applicable to large-scale WSN environments. Farooq et al. proposed an efficient cluster routing for large-scale wireless sensor networks based on probability weights. The probability routing strategy mainly selects the cluster head by based on the probability weighted average to achieve effective load balancing between sensor nodes. However, in this routing strategy, there will be a situation where the data transmission path of sensor nodes is fixed, resulting in excessive energy consumption of some sensor nodes and increasing the probability of sensor node death. El-Fouly et al. proposed a clustering routing protocol based on the remaining energy of sensor nodes and the distance between sensor nodes. This protocol includes the selection of cluster heads and the inter-cluster routing algorithm, which improves the network lifetime and throughput.
[0003] At present, swarm intelligence optimization algorithms have received much attention, and many scholars have solved the difficult problems faced by WSNs by improving the algorithms. Gülbaş et al. proposed the LEACH-SA protocol based on the Simulated Annealing (SA) algorithm to minimize the energy loss of nodes and improve the lifespan of WSNs. Yu Xiuwu et al. proposed a clustering routing strategy based on the firefly optimization algorithm, established a fitness function regarding the remaining energy and distance, selected the node with the largest fitness value as the cluster head node and updated it dynamically, effectively balancing the cluster head load. Palanikumar et al. proposed an optimal routing scheme based on Deep Reinforcement Learning (DRL) and Hosted Cuckoo Optimization (HO-COA). This scheme reduces the routing overhead, energy loss and improves the network lifespan. However, this experiment was only conducted on a relatively small network scale and did not discuss the performance in a large-scale network. The performance of WSNs in large-scale and complex environments needs to be improved.
[0004] In summary, many scholars have proposed solutions to specific problems in large-scale wireless sensor networks (WSNs). For example, the problem of energy consumption of nodes within a single cluster, the unbalanced distribution of cluster heads, and the improvement of data transmission reliability. However, these studies do not comprehensively consider the overall optimization requirements of large-scale WSNs. In a large-scale network environment, in addition to the problems within a single cluster, there are more complex challenges, such as energy consumption balance of the WSN system, inter-cluster communication, and system dynamic adjustment. Therefore, the current WSN clustering routing method is still not suitable for large-scale application scenarios such as seawater rice environmental monitoring, and the overall optimization needs to reasonably analyze various factors in a complex environment. Summary of the Invention
[0005] To solve the above technical problems, the present invention provides a clustering routing protocol method for seawater rice environmental monitoring WSN based on multi-parameter perception, and the method includes:
[0006] Step S1: Simulate and construct the seawater rice environmental monitoring area, deploy sensor nodes based on the constructed simulation environment, and use the LEACH algorithm to perform the first clustering on the deployed sensor nodes;
[0007] Step S2: Establish a comprehensive evaluation function for cluster head rotation based on the data of the sensor nodes after the first clustering, and use the particle swarm optimization algorithm with a constraint mechanism to dynamically adjust the weights of the parameters of the comprehensive evaluation function for cluster head rotation;
[0008] Step S3: Select sensor nodes as cluster heads based on the weighted dynamic adjustment results, and use the average remaining energy ratio of the in-cluster path to screen the in-cluster routing paths to obtain in-cluster routing paths that meet the preset conditions;
[0009] Step S4: Regard a single cluster as a sensor node for inter-cluster routing, transfer the data in the cluster head to the base station based on the inter-cluster routing path, evaluate the stability of the inter-cluster routing path using the cluster head rotation frequency weight, evaluate the inter-cluster routing cost according to the inter-cluster distance, and obtain the inter-cluster routing path according to the stability and the inter-cluster routing cost, thus completing the seawater rice environmental monitoring WSN clustering routing protocol method.
[0010] Optionally, in step S1, the process of using the LEACH algorithm to perform the first clustering on the deployed sensor nodes specifically includes:
[0011] Each sensor node determines a random number in [0,1]. If the random number of the sensor node to be measured is lower than the preset threshold T(n), the sensor node to be measured becomes a cluster head; otherwise, it becomes an in-cluster member:
[0012] ;
[0013] where p is the proportion of sensor nodes as cluster heads; r is the current round number; r mod 1 / p is the number of nodes that have been elected as cluster heads in the current round of loop; G is the set of sensor nodes that have not become cluster heads in the most recent 1 / p rounds, and n is the node currently being evaluated.
[0014] Optionally, in step S2, the process of establishing a comprehensive cluster head rotation evaluation function based on the data of the sensor nodes after the first clustering specifically includes:
[0015] Construct a weight function based on three factors: node energy consumption, distance between nodes, and distance between the node and the base station :
[0016] ;
[0017] ;
[0018] ;
[0019] where E x is the current energy consumption of the sensor node, E init is the initial energy of the sensor node, E res is the remaining energy of the sensor node, D x_avg is the average distance between the sensor node and other sensor nodes in the cluster, N is the total number of sensor nodes in the cluster, D xiis the distance between the sensor node and other sensor nodes in the cluster, α, β, and γ are weight coefficients, α + β + γ = 1, and D xb is the distance between the sensor node and the base station.
[0020] Optionally, in the step S2, the process of dynamically adjusting the weights of the parameters of the comprehensive evaluation function for the first round of cluster rotation using the particle swarm optimization algorithm with a constraint mechanism specifically includes:
[0021] Calculate the weights of each node in the cluster based on the comprehensive evaluation function for the first round of cluster rotation and calculate the difference from the preset standard weight, and select the cluster head based on the absolute value of the difference;
[0022] Use the particle swarm optimization algorithm to dynamically adjust the weights of the parameters of the comprehensive evaluation function for the first round of cluster rotation, specifically:
[0023] ;
[0024] In the formula, represents the new velocity of the i-th particle after the next iteration, v i is the current velocity, pBest i is the individual best position of the i-th particle, gBest is the global best position, w is the inertia weight, c 1 , c 2 is the acceleration constant, r 1 , r 2 is a random number, x i is the current position of the i-th particle;
[0025] Add a penalty term in the particle swarm optimization algorithm to calculate the dynamic adjustment of the updated weights:
[0026] ;
[0027] In the formula, F is the fitness; W is the difference between the current node weight and the standard weight in the cluster, k is the power of the penalty term, and P is the penalty factor.
[0028] The present invention discloses a seawater rice environmental monitoring WSN clustering routing protocol system based on multi-parameter perception, and the system includes: a first clustering module, a first-round cluster rotation module, an intra-cluster routing module, and an inter-cluster routing module;
[0029] The first clustering module is used to simulate and construct the seawater rice environmental monitoring area, deploy sensor nodes based on the constructed simulation environment, and perform the first clustering on the deployed sensor nodes using the LEACH algorithm;
[0030] The cluster first-round rotation module is used to establish a comprehensive evaluation function for cluster first-round rotation based on the data of sensor nodes after the first cluster formation, and use the particle swarm optimization algorithm with a constraint mechanism to dynamically adjust the weights of the parameters of the comprehensive evaluation function for cluster first-round rotation;
[0031] The in-cluster routing module is used to select sensor nodes as cluster heads based on the dynamic weight adjustment results, and use the average remaining energy ratio of in-cluster paths to screen in-cluster routing paths to obtain in-cluster routing paths that meet the preset conditions;
[0032] The inter-cluster routing module is used to perform inter-cluster routing by treating a single cluster as a sensor node, transmit the data in the cluster head to the base station based on the inter-cluster routing path, evaluate the stability of the inter-cluster routing path using the weight of the cluster first-round rotation frequency, evaluate the inter-cluster routing cost according to the inter-cluster distance, and obtain the inter-cluster routing path based on the stability and the inter-cluster routing cost, thus completing the method of the seawater rice environmental monitoring WSN clustering routing protocol.
[0033] Optionally, the working process of using the LEACH algorithm to perform the first cluster formation on the deployed sensor nodes in the first cluster formation module specifically includes:
[0034] Each sensor node determines a random number in [0,1]. If the random number of the sensor node to be measured is lower than the preset threshold T(n), the sensor node to be measured becomes a cluster head; otherwise, it becomes an in-cluster member:
[0035] ;
[0036] where p is the proportion of sensor nodes as cluster heads; r is the current round number; r mod 1 / p is the number of nodes that have been elected as cluster heads in the current round of loop; G is the set of sensor nodes that have not become cluster heads in the most recent 1 / p rounds, and n is the node currently being evaluated.
[0037] Optionally, the process of establishing a comprehensive evaluation function for cluster first-round rotation based on the data of sensor nodes after the first cluster formation in the cluster first-round rotation module specifically includes:
[0038] Construct a weight function based on three factors: node energy consumption, distance between nodes, and distance between nodes and the base station :
[0039] ;
[0040] ;
[0041] ;
[0042] where E x is the current energy consumption of the sensor node, E initis the initial energy of the sensor node, E res is the remaining energy of the sensor node, D x_avg is the average distance between the sensor node and other sensor nodes in the cluster, N is the total number of sensor nodes in the cluster, D xi is the distance between the sensor node and other sensor nodes in the cluster, α, β, γ are weight coefficients, α + β + γ = 1, D xb is the distance between the sensor node and the base station.
[0043] Optionally, in the cluster first round rotation module, the process of dynamically adjusting the weights of the parameters of the cluster first round rotation comprehensive evaluation function using the particle swarm optimization algorithm with a constraint mechanism specifically includes:
[0044] Calculate the weights of each node in the cluster based on the cluster first round rotation comprehensive evaluation function and calculate the difference from the preset standard weight, and select the cluster head based on the absolute value of the difference;
[0045] Use the particle swarm optimization algorithm to perform dynamic weight adjustment on the cluster first round rotation comprehensive evaluation function, specifically:
[0046] ;
[0047] In the formula, represents the new velocity of the i-th particle after the next iteration, v i is the current velocity, pBest i is the individual best position of the i-th particle, gBest is the global best position, w is the inertia weight, c 1 , c 2 is the acceleration constant, r 1 , r 2 is a random number, x i is the current position of the i-th particle;
[0048] Add a penalty term in the particle swarm optimization algorithm to calculate the dynamic adjustment of the updated weights:
[0049] ;
[0050] In the formula, F is the fitness; W is the difference between the current node weight and the standard weight in the cluster, k is the power of the penalty term, and P is the penalty factor.
[0051] Compared with the prior art, the beneficial effects of the present invention are as follows: Against the background of seawater rice environment monitoring, the present invention proposes a large-scale WSN clustering routing protocol based on multi-parameter perception (FLEACH-2nd protocol) for the problems of large-scale WSN node lifespan and routing optimization. On the premise of the first clustering through the LEACH protocol, parameters for balancing energy consumption such as node energy consumption, distance between nodes within a cluster, and distance between nodes and the base station are proposed, and the first-round rotation of clusters is comprehensively optimized by introducing a PSO algorithm with a constraint mechanism. For the network operation duration, the parameter weights are set to change dynamically to balance the energy consumption of each node in different time periods and optimize the routing path selection. The average first-round rotation frequency parameter of clusters is introduced to evaluate the routing weight between clusters, and the average inter-cluster distance ensures the reliability of inter-cluster routing. Experimental results show that as the number of nodes increases, the FLEACH-2nd protocol considering multiple factors has a flatter energy consumption, a larger data throughput, and better applicability to large-scale WSNs. The network lifespan of FLEACH-2nd is extended by 20% and 21% compared with the MAX LEACH and LEACH-SA protocols, and the data throughput is increased by 30% and 27.2%. The proposed protocol achieves the expected goals of balancing the energy consumption of large-scale WSN nodes, extending the network lifespan, and network load balancing. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions of the present invention, the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can also obtain other drawings based on these drawings without creative efforts.
[0053] Figure 1 It is the energy consumption model structure diagram of the embodiment of the present invention;
[0054] Figure 2 It is the schematic diagram of the division result of area division based on the simulation environment in the embodiment of the present invention;
[0055] Figure 3 It is the method step diagram of cluster formation and the first-round rotation of clusters in the embodiment of the present invention;
[0056] Figure 4 It is the method step diagram of multi-hop routing within and between clusters in the embodiment of the present invention;
[0057] Figure 5 It is the method step diagram of multi-hop routing in the embodiment of the present invention;
[0058] Figure 6 It is the experimental comparison diagram of four protocols when the number of nodes in the embodiment of the present invention is 50;
[0059] Figure 7Experimental comparison diagram of four protocols when the node data in the embodiment of the present invention is 100;
[0060] Figure 8 Experimental comparison diagram of four protocols when the node data in the embodiment of the present invention is 200;
[0061] Figure 9 Method flow chart of the large-scale WSN clustering routing protocol method in the embodiment of the present invention. Detailed implementation manners
[0062] To make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific implementation manners.
[0063] Embodiment 1
[0064] A clustering routing protocol method for seawater rice environmental monitoring WSN based on multi-parameter perception, as Figure 9 shown, the method includes:
[0065] Step S1: Simulate and construct the seawater rice environmental monitoring area, deploy sensor nodes based on the constructed simulation environment, and use the LEACH algorithm to perform the first clustering of the deployed sensor nodes.
[0066] Simulate the seawater rice planting environment, set N sensor nodes to be evenly distributed in this area, and satisfy the following conditions: (1) The sensor nodes are distributed at fixed positions in the simulation area according to different monitoring data. (2) Each node has a unique UID (User Identification). (3) The specifications (initial energy, communication power, etc.) of each node are the same, and each node has an equal status. (4) Each node can perform data transmission and reception. The energy consumption of the node in each round of data transmission is uncontrollable, and the node can obtain its own energy consumption data and can adjust its own transmission power according to the communication distance to communicate with adjacent nodes.
[0067] The proposed routing algorithm consists of four stages: cluster construction, cluster first rotation, intra-cluster routing, and inter-cluster routing. The model is divided into uniform small areas, and each area collects various types of data by different types of sensor nodes. Adjacent nodes within the area autonomously form a cluster, as Figure 2 shown.
[0068] Energy consumption model: When sensor nodes perform wireless communication, it involves various aspects of energy consumption, such as signal amplification energy consumption, signal transmission and reception energy consumption, data processing energy consumption, etc. The present invention adopts the above energy consumption model, as Figure 1 shown. M opt is the proven optimal data packet size, as shown in Equation (1).
[0069] (1)
[0070] In the formula: , represents the packet header, and K 1 represents the energy consumed by the payload during communication, and K 2 represents the energy consumption when the node is powered on, represents the channel bit error rate. E TX and E RX are the energy consumptions of the node when sending and receiving M opt bit data respectively, as shown in Formulas (2) and (3).
[0071] (2)
[0072] (3)
[0073] In the formula: x is the distance between nodes, and E elec is the energy consumed for sending or receiving a unit bit of data, and ε amp is the energy consumption when the sending node amplifies the signal.
[0074] (4)
[0075] Among them, x th represents the distance threshold, and ε fs and ε mp represent the free space signal amplification energy parameter and the multipath fading parameter respectively. If the distance x between the sending node and the receiving node is greater than or equal to x th , the multipath fading channel model will be used. Otherwise, the free space propagation model will be used. Therefore, for a data packet of size M opt from sending to receiving, the total energy consumption E total is shown in Formula (5), and E DA is the energy consumption when the cluster head performs data fusion.
[0076] (5)
[0077] x is the distance between the member node and the cluster head, and x BS is the distance between the cluster head and the base station. The remaining energy of the member node after transmitting M opt data to the cluster head is shown in Formula (6).
[0078] (6)
[0079] After the cluster head performs data fusion, it transmits the data to the base station, and its remaining energy is calculated as shown in Formula (7).
[0080] (7)
[0081] Since the energies of all nodes are the same in the initial stage, the classical LEACH algorithm is used to construct clusters. In the LEACH algorithm, each node independently determines whether it can be a cluster head without negotiation and confirmation among nodes, and cluster heads are randomly generated. Each node determines a random number from [0, 1]. If the random number is lower than the threshold T(n), then the node becomes the cluster head in this round; otherwise, it is a member within a cluster. Equation (8) is the calculation formula for T(n).
[0082] ; (8)
[0083] Among them, p is the proportion of sensor nodes as cluster heads; r is the current round number; r mod 1 / p is the number of nodes that have been elected as cluster heads in the current round of cycle; G is the set of sensor nodes that have not been cluster heads in the most recent 1 / p rounds, and n is the node currently being evaluated. By completing node classification through the set G, it can effectively prevent nodes from continuously being cluster heads multiple times. In the LEACH protocol, (r mod 1 / p) is the remainder after r is divided by 1 / p in the current cycle, that is, the number of nodes that have been elected as cluster heads.
[0084] Step S2: Based on the data of sensor nodes after the first cluster construction, establish a comprehensive evaluation function for cluster head rotation, and use the particle swarm optimization algorithm with a constraint mechanism to dynamically adjust the weights of the parameters of the comprehensive evaluation function for cluster head rotation, as Figure 3 shown.
[0085] Cluster head nodes need to perform data fusion and communicate with the base station, which results in a large load and high energy consumption for cluster heads. To balance the energy consumption of each node within a cluster, the remaining energy of nodes should be considered in subsequent cluster head rotations. In addition, the energy consumption of wireless transmission is positively correlated with the communication distance. The longer the transmission distance, the higher the energy consumption. Therefore, the nodes with a shorter average distance to other nodes within the cluster and a shorter distance to the base station also have lower transmission energy consumption. Considering the above three factors, a weight function is designed to reasonably select cluster head rotations.
[0086] ; (9)
[0087] ; (10)
[0088] ; (11)
[0089] In the formula, E x is the current energy consumption of the node, E init is the initial energy of the node, E res is the remaining energy of the node. D x_avg is the average distance between the node and other nodes within the cluster, N is the total number of nodes within the cluster, D xiis the distance between the node and other nodes within the cluster. α, β, and γ are weight coefficients, and they change dynamically according to the power-on time of the nodes, with α + β + γ = 1. D xb is the distance between the node and the base station, as shown in Equation (11).
[0090] ; (12)
[0091] Among them, W std is the standard weight function of a single cluster, E avg is the average energy consumption of the nodes within the cluster, D avg is the average distance between the nodes within the cluster, D xavg is the average distance between all the nodes within the cluster and the base station, as shown in Equation (12). After calculating the weights of the nodes within the cluster and comparing them with the standard weight, take the absolute value, and the one with the smallest difference is selected as the cluster head, as shown in Equation (13).
[0092] ; (13)
[0093] Since the working tasks of each node are different in different time periods, the energy consumption per unit time of each node is different. In order to accurately and reasonably select the cluster head, according to the design of the above weight function, the cluster head rotation needs to reasonably allocate the weight of the node's own parameters according to the standard weight function. The present invention uses an intelligent algorithm to evaluate the multi-parameters of the nodes and inputs them into the preset weight function for optimization and solution. Among many existing intelligent optimization schemes, the PSO algorithm has high flexibility and a balanced exploration mechanism, and can efficiently integrate the global exploration range and the ability of local fine optimization. This algorithm simulates the memory and learning of individuals for the optimal position during the process of searching for food. In each iteration of each particle, the adjustment of the speed and direction of its flight path is affected by two aspects: one is the individual optimal solution found in its own exploration process, and the other is the global optimal solution found in the history of the entire group. This dynamic adjustment mechanism prompts the particles to explore and update their positions in space, and the coordinates of each particle essentially correspond to a feasible solution in space. Its mathematical model is shown in Equation (14).
[0094] ; (14)
[0095] In the formula, represents the new speed of the i-th particle after the next iteration, v i is the current speed, pBest i is the individual best position of the i-th particle, gBest is the global best position, w is the inertia weight, c 1 , c 2 is the acceleration constant, r 1 , r 2 is a random number, x iis the current position of the i-th particle. At the same time, in order to ensure that the weights meet α + β + γ = 1, the present invention adds a penalty term to the fitness function, as shown in Equation (15).
[0096] ; (15)
[0097] In the formula, F is the fitness; W is the difference between the current node weight and the standard weight within the cluster, k is the power of the penalty term, and P is the penalty factor.
[0098] The specific algorithm process is as follows: S31: Obtain the N node parameters within the cluster respectively, initialize the penalty factor and the penalty power, and set the maximum number of iterations; S32: Ensure the random initialization of each particle, and determine whether the constraint condition is met through γ = 1 - α - β. If not, add a penalty term and calculate the fitness after penalty; if met, the penalty is zero; S33: Calculate the fitness according to Equation (15); S34: (1) while t < T max do; (2) for i = 1 to N do; (3) Update the particle velocity according to Equation (14); (4) According to the formula Update the particle position; (5) end for; (6) Calculate the new fitness of each particle, and update the individual optimal pBest and the global optimal gBest; (7) Adjust the penalty factor according to the number of iterations. S35: Output the weight value and W min , and the difference between the actual weight and the standard weight of each node takes the minimum difference and is denoted as W min ; S36: Obtain the output result, and select the node with the smallest difference as the cluster head.
[0099] Step S3: Select the best sensor node as the cluster head based on the result of the dynamic weight adjustment. In this embodiment, the best here is the sensor node with the smallest difference. Use the average remaining energy ratio of the intra-cluster path to screen the intra-cluster routing path to obtain an intra-cluster routing path that meets the preset conditions.
[0100] As Figure 4 - Figure 5 shown, after the cluster head is determined, the nodes within the cluster can perform data sensing and intra-cluster data transmission. According to the above cluster formation and cluster head rotation process, the nodes within the cluster are not completely close to the cluster head node. If each node uses enhanced transmission power to achieve single-hop communication with the cluster head when the cluster head is performing data fusion, it will greatly consume the energy of the nodes and easily cause the nodes to run out of energy and die. Therefore, it is necessary to design an intra-cluster routing mechanism to extend the node life and ensure the integrity of the cluster structure.
[0101] To avoid selecting a routing path where the node energy is about to be exhausted, the remaining energy of the node is used as the main routing parameter to balance the energy consumption of the entire network and ensure routing stability. Therefore, the path average remaining energy ratio E is introduced avg_t to analyze the current energy consumption status of the node, as shown in Equations (16) and (17), where E r is the remaining energy, E init is the initial energy of the node, and j is the number of nodes on a certain path.
[0102] ; (16)
[0103] ; (17)
[0104] Step S4: Treat a single cluster as a sensor node for inter-cluster routing, transfer the data in the cluster head to the base station based on the inter-cluster routing path, evaluate the stability of the inter-cluster routing path using the cluster head rotation frequency weight, evaluate the inter-cluster routing cost according to the inter-cluster distance, and obtain the inter-cluster routing path based on the stability and the inter-cluster routing cost, thus completing the large-scale WSN clustering routing protocol method.
[0105] The specific routing process is as follows: (1) When the source node communicates with the cluster head node, it broadcasts a routing request message to adjacent nodes; (2) After receiving the broadcast message from the source node, the cluster head responds with a routing reply message and feeds back its E t value to the upper-level node; (3) The source node aggregates and analyzes the response messages from different paths, calculates the E avg_t values of different paths, and the routing path with the largest remaining energy will be retained. (4) After the routing is determined, the source node starts to send data.
[0106] In general, clustering routing is that each cluster head uses a single-hop form to transmit the aggregation information to the base station. In this case, if the cluster is far from the base station, it means consuming more energy.
[0107] The difference between the FLEACH-2nd protocol and the traditional clustering protocol is that multiple multi-hop transmission paths are established between the cluster and the base station, and the best route is selected according to the routing weight size to avoid single-hop long-distance transmission.
[0108] Since the cluster heads in each region are dynamically changing, if the cluster heads change frequently, the remaining energy of the cluster is less. For this reason, the cluster head rotation frequency is proposed, as shown in Equation (18). Among them, C var is the cluster head rotation frequency, N h_ch is the number of historical cluster heads, and N is the total number of nodes in the cluster. Treat a single cluster as a whole, use the cluster head rotation frequency weight to evaluate the stability of the routing path, evaluate the routing cost according to the inter-cluster distance, and determine the best routing path.
[0109] ; (18)
[0110] C v_avg is the cluster first rotation frequency weight, that is, the average of the cluster first rotation frequencies of all clusters on a certain inter-cluster path, m is the number of clusters on the path, see Equation (19).
[0111] ; (19)
[0112] Based on the comprehensive cluster first rotation frequency and the inter-cluster distance, an inter-cluster routing weight function is proposed, see Equation (20). In the formula, C i is the intermediate cluster, D x is the distance between clusters, and W represents the routing weight between clusters.
[0113] ; (20)
[0114] On the premise of completing clustering, the specific routing process is as follows: When the data initiating cluster needs to send data to the base station, the cluster head sends a broadcast message to the adjacent clusters to obtain relevant information of the adjacent clusters. The relevant information is the data required for judging routing selection as shown in Table 1, specifically including the ID of the local cluster head node, the cluster first rotation frequency, the ID of the lower-level cluster head node, the number of adjacent clusters, the cluster first rotation frequencies of adjacent clusters, and routing confirmation.
[0115] Table 1
[0116] ID of the current cluster head node Cluster head rotation frequency ID of the lower - level cluster head node Number of adjacent clusters Cluster head rotation frequency of adjacent clusters Routing confirmation Chloc_add Chshift_fre Chsub_add Clu_num Clu_shift_fre Rout_ver
[0117] If the next hop of the lower-level cluster is the base station, after the lower-level cluster receives the broadcast message, it calculates the cluster first rotation frequency of this cluster and uploads the relevant information of the cluster head (cluster head address, cluster first rotation frequency) to the upper-level cluster; after the upper-level cluster receives the convergence information from different paths, it calculates the path weight W (C i ), and the path with the smallest weight will be retained in the local routing table, and the relevant information of this cluster will be uploaded to the upper-level cluster. Each intermediate cluster loops this process until it is forwarded to the data initiating cluster; after the data initiating cluster receives the message returned by the lower-level cluster, it calculates the average cluster first rotation frequency and the average inter-cluster distance of different paths, see Equations (21) and (22). In this embodiment, the lower-level cluster is the next hop during data forwarding. For example, when cluster A forwards data to cluster S, the intermediate clusters are B, C, D, and E. Assuming there are three paths: A->B->D->S, A->C->D->S, and A->B->E->S, then among these three paths, B and C are the lower-level clusters of A respectively, and D is the lower-level cluster of B or C respectively. Among them, C s is the data initiating cluster, BS is the base station, D x_avgis the average inter-cluster distance of a certain path. The routing with the minimum weight is reserved in the routing table and a routing confirmation message is sent to the subordinate clusters in the routing table. The subordinate clusters send routing confirmation messages in sequence according to the paths in the local routing table, and the routing is established;
[0118] ; (21)
[0119] ; (22)
[0120] After the routing path is determined, the data initiating cluster starts to send data; if the cluster head of the intermediate cluster changes during the data transmission stage, the cluster head replacement frequency of this cluster is recalculated, and the updated cluster head address is forwarded to the superior cluster. The superior cluster initiates a broadcast message to obtain the routing weights of each adjacent subordinate cluster. The routing with the minimum weight is saved in the local routing table to complete the routing table update.
[0121] As Figure 5 shown, the data initiating cluster S sends broadcast messages to adjacent clusters A and B. After the adjacent clusters receive the broadcast messages from the S node, they judge whether the next hop is the base station. If not, they continue to forward the broadcast messages. When the last-hop clusters C, D, and E receive the broadcast messages, they calculate their respective cluster head rotation frequencies and send them to the superior cluster. After the superior cluster receives the information of the subordinate clusters, it calculates the link cost, judges the weight size, and the minimum weight will be reserved. After the weights of each path are screened out, the data initiating cluster sends a routing confirmation message and starts to officially send data.
[0122] Embodiment 2
[0123] To verify the superiority of FLEACH-2nd in large-scale WSNs, a rectangular area of 300 * 300 m 2 is simulated, and 50, 100, and 200 sensor nodes with different quantities are respectively deployed and simulated. As shown in Table 2, a comparative analysis is carried out on the proposed FLEACH-2nd protocol, MAX LEACH, LEACH-SA, and the traditional LEACH protocol in terms of network energy consumption, node survival time, average remaining energy of nodes, and network throughput.
[0124] Table 2
[0125] Parameter Value Side length of the monitoring area (meters) 300 Initial energy of the node (Joules) 2 Number of nodes (pieces) 50~200 Packet size (bits) 1700 Communication radius of the node (meters) 50 Maximum number of rounds (rounds) 1000
[0126] (1) Total energy consumption comparison: Under the condition of the same initial energy, the longer the node continuously executes tasks, the higher the energy consumption efficiency of the node, which is particularly important in the application of energy-constrained WSNs. (2) Comparison of the remaining number of nodes: Comparing the remaining number of nodes in the sensor network can be used to evaluate the availability of the network. A higher remaining number of nodes usually indicates a more stable and reliable network. (3) Comparison of the average remaining energy of nodes: By comparing the average remaining energy of nodes, it can be reflected whether the energy consumption of nodes is balanced. The more balanced the energy consumption of nodes, the higher the overall stability of the network. (4) Throughput comparison: Under the same number of nodes, a higher throughput usually indicates better network performance.
[0127] Figure 6 、 Figure 7 、 Figure 8 are the experimental comparisons of the four protocols when the number of nodes is 50, 100, and 200 respectively. According to Figure 6 (a), Figure 7 (a), Figure 8 From the total energy consumption diagram of nodes in (a), due to the randomness of cluster head election in the LEACH protocol and the single-hop transmission of cluster head nodes, the energy consumption of nodes is relatively high and the network lifetime is the shortest. The MAX LEACH protocol selects cluster heads only based on the maximum remaining energy of nodes, and this protocol does not consider much about the overall energy consumption balance of the network. The LEACH-SA protocol adds optimization for network energy consumption balance compared with MAX LEACH. Both protocols have improvements compared with the LEACH protocol, but not significantly. The proposed FLEACH-2nd protocol comprehensively considers network energy consumption, the distance between nodes and between nodes and cluster heads. Although the network energy consumption of the FLEACH-2nd protocol increases relatively fast in the early stage, as the routing selection stabilizes in the later stage, the increase in network energy consumption gradually slows down, and finally the network energy is exhausted around the 850th round, and it is significantly better than the other three protocols in terms of total energy consumption performance.
[0128] According to Figure 6 (b), Figure 7 (b), Figure 8 the remaining number of nodes of nodes in (b) and Figure 6 (c), Figure 7 (c), Figure 8(c)It can be seen from the average remaining energy of nodes that the number of remaining nodes of each protocol is basically the same in the early-stage tests. Around the 400th round, since the protocol proposed in the present invention requires large amounts of data processing, routing selection, and determination, and thus has high energy consumption, the number of nodes starts to decline first. However, as the routing selection gradually stabilizes, the advantages of this protocol are gradually manifested. The energy consumption of FLEACH-2nd nodes slows down, and the downward trend of the number of remaining nodes also slows down accordingly. Compared with the other three protocols, the node survival period is extended by 21%. As the network scale expands, the downward curve of the number of remaining nodes in the network adopting the FLEACH-2nd protocol gradually becomes smoother. Compared with the other three protocols, the advantages gradually increase, indicating that the protocol proposed in the present invention is more suitable for scenarios with a larger network scale. The larger the scale, the more balanced the node energy consumption and the more stable the network.
[0129] According to Figure 6 (d), Figure 7 (d), Figure 8 (d)It can be seen from the node throughput that there is no obvious difference in the total amount of data transmitted by the four protocols in the early stage of the experiment. However, in the later stage of the experiment, the FLEACH-2nd protocol has the longest network survival time and the slowest decline in the number of remaining nodes compared with the other three protocols. Therefore, the total data throughput of FLEACH-2nd nodes is significantly higher than that of the other three protocols. The final throughput is increased by 30% and 27.2% respectively compared with the MAX LEACH protocol and the LEACH-SA protocol.
[0130] Embodiment III
[0131] A WSN clustering routing protocol system for monitoring the environment of seawater rice based on multi-parameter perception, the system includes: a first clustering module, a cluster first rotation module, an intra-cluster routing module, and an inter-cluster routing module;
[0132] The environment division module is used to deploy sensors in the seawater rice planting environment, divide the deployed sensors according to the seawater rice planting environment to obtain a regional division result. Simulate the seawater rice planting environment, and assume that N sensor nodes are evenly distributed in this area and meet the following conditions: (1) The sensor nodes are distributed at fixed positions in the simulated area according to different monitoring data. (2) Each node has a unique UID (User Identification). (3) The specifications of each node (initial energy, communication power, etc.) are the same, and each node has an equal status. (4) Each node can perform data transmission and reception. The energy consumption of the node in each round of data transmission is uncontrollable, and the node can obtain its own energy consumption data and can adjust its transmission power according to the communication distance to communicate with adjacent nodes.
[0133] Divide the model into uniform small areas. Each area is collected various types of data by different types of sensor nodes. Adjacent nodes within the area autonomously form a cluster, such asFigure 2 as shown
[0134] Energy consumption model: When a sensor node conducts wireless communication, it involves various aspects of energy consumption, such as signal amplification energy consumption, signal transmission and reception energy consumption, data processing energy consumption, etc. The present invention adopts the above energy consumption model, see Figure 1 .M opt is the proven optimal data packet size, see Equation (23).
[0135] (23)
[0136] In the formula: , represents the packet header, K 1 represents the energy consumed by the payload during communication, K 2 represents the energy consumption when the node is powered on, represents the channel bit error rate. E TX and E RX are respectively the energy consumptions when the node sends and receives M opt bit data, see Equations (24) and (25).
[0137] ; (24)
[0138] ; (25)
[0139] In the formula: x is the distance between nodes, E elec is the energy consumed for sending or receiving a unit bit of data, ε amp is the energy consumption when the sending node amplifies the signal.
[0140] ; (26)
[0141] Among them, x th represents the distance threshold, ε fs and ε mp respectively represent the free space signal amplification energy parameter and the multipath fading parameter. If the distance x between the sending node and the receiving node is greater than or equal to x th , the multipath fading channel model will be used. Otherwise, the free space propagation model will be used. Therefore, for a data packet of size M opt from sending to receiving, the total energy consumption E total is shown in Equation (27), and E DA is the energy consumption when the cluster head performs data fusion.
[0142] ; (27)
[0143] x is the distance between the member node and the cluster head, x BSis the distance between the cluster head and the base station. The remaining energy of the member node after transmitting M opt data to the cluster head is shown in Equation (28).
[0144] ; (28)
[0145] After the cluster head performs data fusion, it transmits the data to the base station, and its remaining energy calculation is shown in Equation (29).
[0146] ; (29)
[0147] Since the energies of all nodes are the same in the initial stage, the classical LEACH algorithm is used to construct clusters. In the LEACH algorithm, each node independently determines whether it can be a cluster head, and there is no need for negotiation and confirmation among nodes, and cluster heads are randomly generated. Each node determines a random number from [0, 1]. If the random number is lower than the threshold T(n), then the node becomes the cluster head in this round; otherwise, it is a member within a cluster. Equation (30) is the calculation formula for T(n).
[0148] ; (30)
[0149] Among them, p is the proportion of sensor nodes as cluster heads; r is the current round number; r mod 1 / p is the number of nodes that have been elected as cluster heads in the current round of loop; G is the set of sensor nodes that have not been cluster heads in the most recent 1 / p rounds, and n is the node currently being evaluated. By completing node classification through the set G, it can effectively prevent nodes from continuously serving as cluster heads multiple times.
[0150] The cluster first rotation module is used to establish a comprehensive evaluation function for cluster first rotation based on the node data after the first cluster construction, and uses a particle swarm optimization algorithm with a constraint mechanism to dynamically adjust the weights of the comprehensive evaluation function for cluster first rotation.
[0151] The cluster head node needs to perform data fusion and communicate with the base station, which results in a large load and high energy consumption of the cluster head. To balance the energy consumption of each node within the cluster, the remaining energy of the node should be taken into account in the subsequent cluster first rotation. In addition, the energy consumption of wireless transmission is positively correlated with the communication distance. The longer the transmission distance, the higher the energy consumption. Therefore, the nodes with a shorter average distance from the cluster member nodes and a shorter distance from the base station also have lower transmission energy consumption. Considering the above three factors, a weight function is designed to reasonably select the cluster first rotation.
[0152] ; (31)
[0153] ; (32)
[0154] ; (33)
[0155] Where, E x is the current energy consumption of the node, E init is the initial energy of the node, E res is the remaining energy of the node. D x_avg is the average distance between the node and other nodes in the cluster, N is the total number of nodes in the cluster, D xi is the distance between the node and each other node in the cluster. α, β, γ are weight coefficients, and they change dynamically according to the node power-on time, α + β + γ = 1. D xb is the distance between the node and the base station, see Equation (34).
[0156] ; (34)
[0157] Among them, W std is the standard weight function of a single cluster, E avg is the average energy consumption of nodes in the cluster, D avg is the average distance between nodes in the cluster, D xavg is the average distance between all nodes in the cluster and the base station, see Equation (12). After calculating the weights of each node in the cluster and comparing them with the standard weight, take the absolute value, and the one with the smallest difference is selected as the cluster head, see Equation (35).
[0158] ; (35)
[0159] Since the working tasks of each node are different in different time periods, the energy consumption per unit time of each node is different. In order to accurately and reasonably select the cluster head, according to the design of the above weight function, the cluster head rotation needs to reasonably allocate the weight of the node's own parameters according to the standard weight function. The present invention uses an intelligent algorithm to evaluate the multi-parameters of the node and inputs them into the preset weight function for optimization and solution. Among many existing intelligent optimization schemes, the PSO algorithm has high flexibility and a balanced exploration mechanism, and can efficiently integrate the global exploration range and the ability of local fine optimization. This algorithm simulates the memory and learning of individuals for the optimal position during the process of searching for food. In each iteration of each particle, the adjustment of the speed and direction of its flight path is affected by two aspects: one is the individual optimal solution found in its own exploration process, and the other is the global optimal solution found in the history of the entire group. This dynamic adjustment mechanism prompts the particle to explore and update its position in space, and in fact, each particle coordinate corresponds to a feasible solution in space. Its mathematical model is shown in Equation (36).
[0160] ; (36)
[0161] Wherein, represents the new speed of the i-th particle after the next iteration, v i is the current speed, pBesti is the individual best position of the i-th particle, gBest is the global best position, w is the inertia weight, c 1 and c 2 are the acceleration constants, r 1 and r 2 are random numbers, and x i is the current position of the i-th particle. At the same time, in order to ensure that the weights satisfy α + β + γ = 1, the present invention adds a penalty term to the fitness function, as shown in Equation (37).
[0162] ; (37)
[0163] In the formula, F is the fitness; W is the difference between the current node weight and the standard weight within the cluster, k is the power of the penalty term, and P is the penalty factor.
[0164] The specific algorithm process is as follows: obtain the N node parameters within the cluster respectively, initialize the penalty factor and the penalty power, and set the maximum number of iterations; ensure the random initialization of each particle, and determine whether the constraint condition is satisfied through γ = 1 - α - β. If not, add a penalty term and calculate the fitness after penalty; if satisfied, the penalty is zero; calculate the fitness according to Equation (37); (1) while t < T max do; (2) for i = 1 to N do; (3) update the particle velocity according to Equation (36); (4) update the particle position according to Equation ; (5) end for; (6) calculate the new fitness of each particle, and update the individual optimal pBest and the global optimal gBest; (7) adjust the penalty factor according to the number of iterations and output the weight value and W min ; obtain the output result, and select the node with the smallest difference as the cluster head.
[0165] The intra-cluster routing module is used to generate an intra-cluster routing path based on the result of dynamic weight adjustment, and screen the intra-cluster routing path using the average remaining energy ratio of the intra-cluster path to obtain an intra-cluster routing path that meets the preset conditions.
[0166] Specifically, after the cluster head is determined, the intra-cluster nodes can perform data sensing and intra-cluster data transmission. According to the above cluster construction and cluster head rotation process, it can be seen that the intra-cluster nodes are not completely close to the cluster head node. If all nodes use enhanced transmission power to achieve single-hop communication with the cluster head when the cluster head is performing data fusion, it will greatly consume the energy of the nodes and easily cause the nodes to run out of energy and die. Therefore, it is necessary to design an intra-cluster routing mechanism to extend the node life and ensure the integrity of the cluster structure.
[0167] To avoid selecting a routing path where a node's energy is about to run out, the remaining energy of the node is used as the main routing parameter to balance the energy consumption of the entire network and ensure routing stability. Therefore, the path average remaining energy ratio E is introduced avg_t to analyze the current energy consumption status of the node, as shown in Equations (38) and (39), where E r is the remaining energy, E init is the initial energy of the node, and j is the number of nodes on a certain path.
[0168] ; (38)
[0169] ; (39)
[0170] The intra-cluster routing module is used to generate an intra-cluster routing path based on the result of dynamic adjustment of weights, and uses the intra-cluster path average remaining energy ratio to screen the intra-cluster routing path to obtain an intra-cluster routing path that meets the preset conditions.
[0171] The specific routing process is as follows: (1) When the source node communicates with the cluster head node, it broadcasts a routing request message to adjacent nodes; (2) After the cluster head receives the broadcast message from the source node, it responds with a routing reply message and feeds back its own E t value to the upper-level node; (3) The source node aggregates and analyzes the response messages from different paths, calculates the E avg_t values of different paths, and the routing path with the largest remaining energy will be retained. (4) After the routing is determined, the source node starts to send data.
[0172] In general, in cluster-based routing, each cluster head uses a single-hop form to transmit the aggregation information to the base station. In this case, if the cluster is far from the base station, it means more energy consumption. Different from the traditional cluster-based protocol, the FLEACH-2nd protocol establishes multiple multi-hop transmission paths between the cluster and the base station, and selects the best route according to the routing weight size to avoid single-hop long-distance transmission.
[0173] Since the cluster heads in each region are dynamically changing, if the cluster heads change frequently, the remaining energy of the cluster is less. Therefore, the cluster head rotation frequency is proposed, as shown in Equation (40). Among them, C var is the cluster head rotation frequency, N h_ch is the number of historical cluster heads, and N is the total number of nodes in the cluster. Regarding a single cluster as a whole, the cluster head rotation frequency weight is used to evaluate the stability of the routing path, and the routing cost is evaluated according to the inter-cluster distance to determine the best routing path.
[0174] ; (40)
[0175] C v_avgis the weight of the first-round rotation frequency of the cluster, that is, the average of the first-round rotation frequencies of all clusters on a certain inter-cluster path, and m is the number of clusters on the path, as shown in Equation (41).
[0176] ; (41)
[0177] Based on the first-round rotation frequency of the cluster and the inter-cluster distance, an inter-cluster routing weight function is proposed, as shown in Equation (42). In the formula, C i is the intermediate cluster, D x is the distance between clusters, and W represents the routing weight between clusters.
[0178] ; (42)
[0179] Table 3
[0180] Current cluster head node Cluster head rotation frequency Lower - level cluster head node Number of adjacent clusters Cluster head rotation frequency of adjacent clusters Routing confirmation Chloc_add Chshift_fre Chsub_add Clu_num Clu_shift_fre Rout_ver
[0181] On the premise that clustering is completed, the specific routing process is as follows: when the data initiating cluster needs to send data to the base station, the cluster head sends a broadcast message to the adjacent cluster to obtain the relevant information of the adjacent cluster, and the relevant information is shown in Table 3. If the next hop of the lower-level cluster is the base station, the lower-level cluster calculates the first-round rotation frequency of its own cluster head after receiving the broadcast message, and uploads the cluster head-related information (cluster head address, first-round rotation frequency of the cluster head) to the upper-level cluster; after receiving the convergence information from different paths, the upper-level cluster calculates the path weight W(C i ), and the path with the smallest weight will be retained in the local routing table, and the relevant information of this cluster will be uploaded to the upper-level cluster. Each intermediate cluster loops through this process until it is forwarded to the data initiating cluster; after receiving the message returned by the lower-level cluster, the data initiating cluster calculates the average first-round rotation frequency of different paths and the average inter-cluster distance, as shown in Equation (43). Among them, C s is the data initiating cluster, BS is the base station, and D x_avg is the average inter-cluster distance of a certain path. The routing with the smallest weight is retained in the routing table and a routing confirmation message is sent to the lower-level cluster in the routing table. The lower-level cluster sends routing confirmation messages in sequence according to the path in the local routing table, and the routing is established;
[0182] ; (43)
[0183] After the routing path is determined, the data initiating cluster starts to send data; if the cluster head of the intermediate cluster changes during the data transmission stage, the first-round rotation frequency of the cluster head of this cluster is recalculated, and the updated cluster head address is forwarded to the upper-level cluster. The upper-level cluster initiates a broadcast message to obtain the routing weights of the adjacent lower-level clusters, and the routing with the smallest weight is saved in the local routing table to complete the update of the routing table. The inter-cluster routing module is used to select the cluster head for inter-cluster routing based on the first-round rotation frequency of the cluster head and the remaining energy value within the cluster during the intra-cluster routing process, generate an inter-cluster routing path, and complete the large-scale WSN clustering routing protocol method.
[0184] The present invention only provides a node clustering routing protocol method for the environmental monitoring of seawater rice. By using the technical solution provided by the present invention, it can be implemented in a large-scale WSN clustering routing protocol system.
[0185] The embodiments described above are only descriptions of the preferred embodiments of the present invention, and do not limit the scope of the present invention. Without departing from the design spirit of the present invention, various deformations and improvements made by those of ordinary skill in the art to the technical solution of the present invention shall fall within the protection scope determined by the claims of the present invention.
Claims
1. A WSN clustering routing protocol method for sea rice environment monitoring based on multi-parameter perception, characterized in that: Methods include: Step S1, simulate and construct the sea rice environment monitoring area, deploy sensor nodes based on the constructed simulated environment, and use the LEACH algorithm to perform the first clustering of the deployed sensor nodes; Step S2, establishing a cluster head rotation comprehensive evaluation function based on the sensor node data after the first clustering, and using a particle swarm optimization algorithm with a constraint mechanism to dynamically adjust the weights of the parameters of the cluster head rotation comprehensive evaluation function; Step S3, selecting a sensor node as a cluster head based on the result of the dynamic adjustment of the weights, and using the average residual energy ratio of the intra-cluster paths to screen the intra-cluster routing paths to obtain the intra-cluster routing paths that meet the preset conditions; Step S4, treating a single cluster as a sensor node for inter-cluster routing, transmitting the data in the cluster head to the base station based on the inter-cluster routing path, evaluating the stability of the inter-cluster routing path using the cluster head rotation frequency weight, evaluating the inter-cluster routing cost according to the inter-cluster distance, obtaining the inter-cluster routing path according to the stability and the inter-cluster routing cost, and completing the sea rice environment monitoring WSN clustering routing protocol method.
2. The WSN clustering routing protocol method for sea rice environment monitoring based on multi-parameter perception according to claim 1 is characterized in that: In step S1, the process of using the LEACH algorithm to perform the first clustering of the deployed sensor nodes specifically includes: Each sensor node determines a random number in [0,1]. If the random number of the sensor node to be tested is lower than the preset threshold T(n), the sensor node to be tested becomes the cluster head, otherwise it becomes a member of the cluster: ; Among them, p is the proportion of sensor nodes as cluster heads; r is the current round number; rmod 1 / p is the number of nodes that have been elected as cluster heads in the current round; G is the set of sensor nodes that have not become cluster heads in the last 1 / p rounds, and n is the node currently being evaluated.
3. The WSN clustering routing protocol method for sea rice environment monitoring based on multi-parameter perception according to claim 2 is characterized in that: In step S2, the process of establishing the cluster head rotation comprehensive evaluation function based on the sensor node data after the first clustering specifically includes: Construct a weight function based on three factors: node energy consumption, distance between nodes, and distance between nodes and base stations : ; ; ; Among them, E x is the current energy consumption of the sensor node, E init is the initial energy of the sensor node, E res is the remaining energy of the sensor node, D x_avg is the average distance between the sensor node and other sensor nodes in the cluster, N is the total number of sensor nodes in the cluster, D xi is the distance between the sensor node and other sensor nodes in the cluster, α, β, γ are weight coefficients, α+β+γ=1, D xb is the distance between the sensor node and the base station.
4. The WSN clustering routing protocol method for sea rice environment monitoring based on multi-parameter perception according to claim 3 is characterized in that: In step S2, the process of dynamically adjusting the weights of the parameters of the cluster head rotation comprehensive evaluation function using the particle swarm optimization algorithm with a constraint mechanism specifically includes: The weight of each node in the cluster is calculated based on the cluster head rotation comprehensive evaluation function, and the difference is calculated with the preset standard weight, and the cluster head is selected based on the absolute value of the difference; The particle swarm optimization algorithm is used to dynamically adjust the weights of the parameters of the cluster head rotation comprehensive evaluation function, specifically: ; In the formula, represents the new velocity of the i-th particle after the next iteration, v i is the current speed, pBest i is the individual best position of the ith particle, gBest is the global best position, w is the inertia weight, c1, c2 are acceleration constants, r1, r2 are random numbers, and x i is the current position of the ith particle; Add penalty terms to the particle swarm optimization algorithm to calculate the dynamic adjustment of the updated weights: ; Where F is the fitness; W is the difference between the current node weight and the standard weight within the cluster, k is the power of the penalty term, and P is the penalty factor.
5. A WSN clustering routing protocol system for sea rice environment monitoring based on multi-parameter perception, the clustering routing protocol system is used to implement the clustering routing protocol method according to any one of claims 1 to 4, characterized in that: The system comprises: an initial clustering module, a cluster head rotation module, an intra-cluster routing module and an inter-cluster routing module; The first clustering module is used to simulate and construct the sea rice environment monitoring area, deploy sensor nodes based on the constructed simulated environment, and use the LEACH algorithm to perform the first clustering of the deployed sensor nodes; The cluster head rotation module is used to establish a cluster head rotation comprehensive evaluation function based on the sensor node data after the first clustering, and use a particle swarm optimization algorithm with a constraint mechanism to dynamically adjust the weights of the parameters of the cluster head rotation comprehensive evaluation function; The intra-cluster routing module is used to select a sensor node as a cluster head based on the result of the dynamic adjustment of the weights, and to screen the intra-cluster routing paths using the average residual energy ratio of the intra-cluster paths to obtain the intra-cluster routing paths that meet the preset conditions; The inter-cluster routing module is used to treat a single cluster as a sensor node for inter-cluster routing, transmit the data in the cluster head to the base station based on the inter-cluster routing path, evaluate the stability of the inter-cluster routing path using the cluster head rotation frequency weight, evaluate the inter-cluster routing cost according to the inter-cluster distance, obtain the inter-cluster routing path according to the stability and the inter-cluster routing cost, and complete the sea rice environment monitoring WSN clustering routing protocol method.
6. The WSN clustering routing protocol system for sea rice environment monitoring based on multi-parameter perception according to claim 5 is characterized in that: The workflow of using the LEACH algorithm to perform the first clustering of the deployed sensor nodes in the first clustering module specifically includes: Each sensor node determines a random number in [0,1]. If the random number of the sensor node to be tested is lower than the preset threshold T(n), the sensor node to be tested becomes the cluster head, otherwise it becomes a member of the cluster: ; Among them, p is the proportion of sensor nodes as cluster heads; r is the current round number; rmod 1 / p is the number of nodes that have been elected as cluster heads in the current round; G is the set of sensor nodes that have not become cluster heads in the last 1 / p rounds, and n is the node currently being evaluated.
7. The WSN clustering routing protocol system for sea rice environment monitoring based on multi-parameter perception according to claim 6 is characterized in that: The process of establishing a cluster head rotation comprehensive evaluation function based on the sensor node data after the first clustering in the cluster head rotation module specifically includes: Construct a weight function based on three factors: node energy consumption, distance between nodes, and distance between nodes and base stations : ; ; ; Among them, E x is the current energy consumption of the sensor node, E init is the initial energy of the sensor node, E res is the remaining energy of the sensor node, D x_avg is the average distance between the sensor node and other sensor nodes in the cluster, N is the total number of sensor nodes in the cluster, D xi is the distance between the sensor node and other sensor nodes in the cluster, α, β, γ are weight coefficients, α+β+γ=1, D xb is the distance between the sensor node and the base station.
8. The WSN clustering routing protocol system for sea rice environment monitoring based on multi-parameter perception according to claim 7 is characterized in that: In the cluster head rotation module, the process of dynamically adjusting the weights of the parameters of the cluster head rotation comprehensive evaluation function using the particle swarm optimization algorithm with a constraint mechanism specifically includes: The weight of each node in the cluster is calculated based on the cluster head rotation comprehensive evaluation function, and the difference is calculated with the preset standard weight, and the cluster head is selected based on the absolute value of the difference; The particle swarm optimization algorithm is used to dynamically adjust the weight of the cluster head rotation comprehensive evaluation function, specifically: ; In the formula, represents the new velocity of the i-th particle after the next iteration, v i is the current speed, pBest i is the individual best position of the ith particle, gBest is the global best position, w is the inertia weight, c1, c2 are acceleration constants, r1, r2 are random numbers, and x i is the current position of the ith particle; Add penalty terms to the particle swarm optimization algorithm to calculate the dynamic adjustment of the updated weights: ; Where F is the fitness; W is the difference between the current node weight and the standard weight within the cluster, k is the power of the penalty term, and P is the penalty factor.
Citation Information
Patent Citations
Extremum disturbed particle swarm optimization based SDWSN energy-balanced routing algorithm
CN108566663A
LEACH algorithm optimization method based on energy consumption balance
CN108696903A
Optimization method and optimization device for APTEEN routing protocol of wireless sensor network
CN110493802A
Wireless sensor network clustering routing protocol based on optimal relay angle
CN114125986A
Clustering routing method based on square optimal-scale double-cluster-head wireless sensor network
CN115087070A
Cited By
Wireless sensor network node clustering method based on improved Harris eagle algorithm
CN120812696A