A Clustering Routing Protocol Method and System for Seawater Rice Environmental Monitoring WSN Based on Multi-parameter Sensing

The FLEACH-2nd protocol optimizes the routing path inside and outside the cluster, solves the problem of unbalanced energy consumption in large-scale WSN, extends the network life and improves data throughput, and is suitable for marine rice environmental monitoring.

CN120050742BActive Publication Date: 2025-07-18GUANGDONG OCEAN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510526917.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2025-07-18
Estimated Expiration
2045-04-25

AI Technical Summary

Technical Problem

The existing WSN cluster routing protocol has failed to effectively optimize energy consumption and extend network life in large-scale marine rice environmental monitoring, and has not fully considered intercluster communication and system dynamic adjustment.

Method used

The FLEACH-2nd protocol based on multi-parameter perception is adopted. After initial cluster building through the LEACH algorithm, the first rotation weight of the cluster is dynamically adjusted with the particle swarm optimization algorithm with a constraint mechanism, the routing path inside and outside the cluster is optimized, and the multi-hop routing mechanism is used to reduce single-hop long-distance transmission and balance node energy consumption.

Benefits of technology

It extends the network life by 20% to 21%, improves data throughput by 30% to 27.2%, and is suitable for large-scale WSNs, with more balanced node energy consumption and more stable network load.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120050742B_ABST
    Figure CN120050742B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of wireless sensor networks, and discloses a WSN clustering routing protocol method and system for seawater rice environmental monitoring based on multi-parameter perception. The method includes: simulating and constructing the seawater rice environmental monitoring area, deploying sensor nodes based on the environment, and using the LEACH algorithm to cluster the deployed sensor nodes; after clustering, establishing a comprehensive evaluation function for cluster head rotation based on the current data of each node, and using a particle swarm optimization algorithm with a constraint mechanism to dynamically adjust the weights of the cluster head rotation parameters; selecting the best node as the cluster head based on the adjustment results, and using the average remaining energy ratio of the intra-cluster path to screen the intra-cluster routing path to obtain the intra-cluster routing path; regarding a single cluster as a node for inter-cluster routing, using the cluster head rotation frequency weight to evaluate the stability of the routing path, evaluating the routing cost according to the inter-cluster distance, and obtaining the inter-cluster routing path according to the stability and cost, thereby completing the large-scale WSN clustering routing protocol method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of wireless sensor networks, and particularly 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 yields require precise ecological environment control. However, due to environmental conditions and scale limitations, traditional monitoring methods are difficult to meet this requirement. Wireless sensor networks (WSNs) can automatically collect environmental data and remotely monitor it 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 higher score becomes the cluster head. This reduces the number of data transmissions between sensor nodes and lowers 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 clustering routing for large-scale wireless sensor networks based on probability weights. The probability routing strategy mainly selects the cluster head through the probability weighted average value to achieve effective load balancing between sensor nodes. However, there is a situation where the data transmission path of sensor nodes is fixed in this routing strategy, 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 attracted much attention, and many scholars have improved the algorithms to solve the difficult problems faced by WSNs. 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 related to 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 its performance in large-scale networks. 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 the environmental monitoring of seawater rice, 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 results of dynamic weight adjustment, and use the average remaining energy ratio of the intra-cluster path to screen the intra-cluster routing paths to obtain intra-cluster routing paths that meet the preset conditions;

[0009] 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 seawater rice environment monitoring WSN clustering routing protocol method.

[0010] Optionally, in the 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 intra-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 the 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 within the cluster, α, β, and γ are weight coefficients, α + β + γ = 1, and D xb is the distance between the sensor node and the base station.

[0020] Optionally, in step S2, the process of dynamically adjusting the weights of the parameters of the first-round rotation comprehensive evaluation function of the cluster using the particle swarm optimization algorithm with a constraint mechanism specifically includes:

[0021] Calculate the weights of each node within the cluster based on the 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;

[0022] Use the particle swarm optimization algorithm to dynamically adjust the weights of the parameters of the first-round rotation comprehensive evaluation function of the cluster, 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, c1 and c2 are acceleration constants, r1 and r2 are random numbers, and x i is the current position of the i-th particle;

[0025] Add a penalty term to calculate the dynamic adjustment of the updated weight in the particle swarm optimization algorithm:

[0026] ;

[0027] 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.

[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 rotation module of the cluster, 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 use the LEACH algorithm to perform the first clustering on the deployed sensor nodes;

[0030] The first-round rotation module of the cluster is used to establish a first-round rotation comprehensive evaluation function 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 first-round rotation comprehensive evaluation function of the cluster;

[0031] The in-cluster routing module is used to select a sensor node as the cluster head based on the result of dynamic weight adjustment, and use the average remaining energy ratio of the in-cluster path to screen the in-cluster routing path, so as to obtain an in-cluster routing path that meets 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, 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 by using the weight of the cluster head rotation frequency, 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 environment monitoring WSN clustering routing protocol method.

[0033] Optionally, the working process of using the LEACH algorithm to perform the first clustering of the deployed sensor nodes in the first clustering 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 the cluster head; otherwise, it becomes a member within the cluster:

[0035] ;

[0036] 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 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 head rotation based on the data of sensor nodes after the first clustering in the cluster head rotation module specifically includes:

[0038] Construct a weight function based on three factors: node energy consumption, distance between nodes, and distance between the node and the base station :

[0039] ;

[0040] ;

[0041] ;

[0042] 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 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.

[0043] Optionally, in the cluster first rotation module, the process of dynamically adjusting the weights of the parameters of the cluster first 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 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 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, c1 and c2 are acceleration constants, r1 and r2 are random numbers, and x i is the current position of the i-th particle;

[0048] Add a penalty term to the particle swarm optimization algorithm to calculate the dynamic adjustment of the updated weight:

[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 environmental monitoring, the present invention proposes a large-scale WSN clustering routing protocol (FLEACH-2nd protocol) for the problems of the lifespan and routing optimization of large-scale WSN nodes. On the premise of the first clustering by 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. An average first-round cluster rotation frequency parameter is introduced to evaluate the routing weight between clusters, and the average inter-cluster distance ensures the reliability of the 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. 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 will be 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 building 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 according to different monitoring data in the simulation area. (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 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] Wherein: , represents the packet header, K1 represents the energy consumed by the payload during communication, K2 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 when the node sends and receives M opt bit data respectively, as shown in Equations (2) and (3).

[0071] (2)

[0072] (3)

[0073] Wherein: 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.

[0074] (4)

[0075] Among them, x th represents the distance threshold, ε 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 is used. Otherwise, the free space propagation model is used. Therefore, for a data packet of size M opt from sending to receiving, the total energy consumption E total is shown in Equation (5), and E DA is the energy consumption for the cluster head to perform 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 as shown in Equation (6).

[0078] (6)

[0079] After the cluster head performs data fusion, it transmits the data to the base station, and its remaining energy calculation is as shown in Equation (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 the 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 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 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 period, that is, the number of nodes that have been elected as cluster heads.

[0084] Step S2: Based on the sensor node data 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 the cluster, the remaining energy of the 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 will also have lower transmission energy consumption. Considering the above three factors, a weight function is designed to reasonably select the cluster head rotation.

[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 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 formula (11).

[0090] ; (12)

[0091] Among them, W std is the standard weight function for 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 formula (12). After calculating the weight of each node in the cluster, compare it with the standard weight, take the absolute value, and select the one with the smallest difference as the cluster head, see formula (13).

[0092] ; (13)

[0093] Since each node has different work tasks 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 above-mentioned weight function design, it can be known that the cluster head rotation needs to reasonably allocate the weights of the node's own parameters according to the standard weight function. The present invention adopts an intelligent algorithm to evaluate the multivariate 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 a high degree of flexibility and balanced exploration mechanism, which can efficiently integrate the global exploration range and local fine optimization capabilities. The algorithm simulates the memory and learning of the optimal position of individuals in the process of searching for food. At each iteration, the speed and direction adjustment of the flight path of each particle is affected by two aspects: one is based on 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 particles to explore and update their positions in space. Each particle coordinate actually corresponds to a feasible solution in space. Its mathematical model is shown in formula (14).

[0094] ; (14)

[0095] 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 iis 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 (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, judge whether the constraint condition is satisfied through γ = 1 - α - β. If not, add the penalty term and calculate the fitness after penalty; if satisfied, 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 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 the 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 during 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. See Equations (16) and (17). 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 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.

[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 more energy consumption.

[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 routing 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 weight of the cluster first rotation frequency, 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 cluster to obtain the relevant information of the adjacent cluster. The relevant information is the data required for judging the 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 frequency of the adjacent cluster, and routing confirmation.

[0115] Table 1

[0116] ID of the local 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 aggregation 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 phase, the cluster head replacement frequency 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 each adjacent lower-level 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 the adjacent clusters A and B. After the adjacent clusters receive the broadcast messages from the S node, they determine 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 upper-level cluster. After the upper-level cluster receives the information of the lower-level 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 send data formally.

[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 Data 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 time for the node to continuously execute 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 (a) Total energy consumption graph of nodes, it can be seen that 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. Eventually, 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 (b) Remaining number of nodes 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 was basically the same in the early tests. Around the 400th round, since the protocol proposed by the present invention requires large data processing, routing selection and determination, and the energy consumption is large, the number of nodes began to decline first. However, as the routing selection gradually stabilized, the advantages of this protocol gradually emerged. The energy consumption of FLEACH-2nd nodes slowed down, and the downward trend of the number of remaining nodes also slowed down. Compared with the other three protocols, the node survival period was extended by 21%. As the network scale expands, the decline curve of the number of remaining nodes in the network using the FLEACH-2nd protocol gradually becomes smoother. Compared with the other three protocols, the advantage gradually increases, indicating that the protocol proposed by 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 was 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 had 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 was significantly higher than that of the other three protocols. The final throughput increased by 30% and 27.2% compared with the MAX LEACH protocol and the LEACH-SA protocol respectively.

[0130] Example 3

[0131] A WSN clustering routing protocol system for seawater rice environmental monitoring based on multi-parameter perception, the system includes: a first clustering module, a cluster 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, set N sensor nodes evenly distributed in this area, and meet the following conditions: (1) The sensor nodes are distributed at fixed positions according to different monitoring data in the simulated area. (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 sending and receiving. 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 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, as shown in Figure 1 .M opt is the proven optimal data packet size, as shown in Equation (23).

[0135] (23)

[0136] In the formula: , represents the packet header, K1 represents the energy consumed by the payload during communication, K2 represents the energy consumption when the node powers on, represents the channel 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 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 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 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, and x BS is the distance between the cluster head and the base station. The member node transmits Mopt The remaining energy after the data reaches 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 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 (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 head rotation module is used to establish a comprehensive evaluation function for cluster head 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 head 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 considered in the subsequent cluster head 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 member nodes within the cluster 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 make a reasonable selection for cluster head rotation.

[0152] ; (31)

[0153] ; (32)

[0154] ; (33)

[0155] In the formula, E xis 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. 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, and D xi is the distance between the node and other nodes 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 formula (34).

[0156] ; (34)

[0157] Among them, W std is the standard weight function for 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 formula (12). After calculating the weight of each node in the cluster, compare it with the standard weight, take the absolute value, and select the one with the smallest difference as the cluster head, see formula (35).

[0158] ; (35)

[0159] Since each node has different tasks 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 above-mentioned weight function design, it can be known that the cluster head rotation needs to reasonably allocate the weights of the node's own parameters according to the standard weight function. The present invention adopts an intelligent algorithm to evaluate the multivariate 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 a high degree of flexibility and balanced exploration mechanism, which can efficiently integrate the global exploration range and local fine optimization capabilities. The algorithm simulates the memory and learning of the optimal position of individuals in the process of searching for food. At each iteration, the speed and direction adjustment of the flight path of each particle is affected by two aspects: one is based on 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 particles to explore and update their positions in space. Each particle coordinate actually corresponds to a feasible solution in space. Its mathematical model is shown in formula (36).

[0160] ; (36)

[0161] In the formula, represents the new velocity of the i-th particle after the next iteration, v i is the current speed, pBest iis the individual best position of the i-th particle, gBest is the global best position, w is the inertia weight, c1 and c2 are acceleration constants, r1 and r2 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 judge 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) 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 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 building and cluster head rotation process, the intra-cluster nodes 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 during data fusion by the cluster head, 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] In order 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 average remaining energy ratio E of the path is introduced avg_tAnalyze the current energy consumption status of the node, as shown in Equation (38) and Equation (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 filter 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.

[0171] The specific routing process is as follows: (1) When the source node communicates with the cluster head node, broadcast a routing request message to adjacent nodes; (2) After the cluster head receives the broadcast message from the source node, respond with a routing reply message and feedback 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, the cluster 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 formed cluster is far from the base station, it means more energy consumption. Different from the traditional clustering protocol, the FLEACH-2nd protocol establishes multiple multi-hop transmission paths between the cluster and the base station, selects the best route according to the routing weight size, and avoids 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, 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.

[0174] ; (40)

[0175] C v_avg is the cluster head rotation frequency weight, that is, the average value of the cluster head 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 clusters and the distance between clusters, a routing weight function between clusters is proposed, as shown in Equation (42). In the equation, C i is the intermediate cluster, D x is the distance between each cluster, and W represents the routing weight between each cluster.

[0178] ; (42)

[0179] Table 3

[0180] Local 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 the 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 clusters to obtain the relevant information of the adjacent clusters. The relevant information is shown in Table 3. If the next hop of the lower-level cluster is the base station, after receiving the broadcast message, the lower-level cluster calculates the first-round rotation frequency of its own cluster head and uploads the relevant information of the cluster head (cluster head address, first-round rotation frequency of the cluster head) to the upper-level cluster; after receiving the aggregated 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 distance between clusters, 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 distance between clusters 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 paths 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 replacement frequency of its own cluster head 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 seawater rice environmental monitoring. 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 spirit of the present invention's design, various deformations and improvements made by those of ordinary skill in the art to the technical solutions of the present invention shall fall within the protection scope determined by the claims of the present invention.

Claims

1. A multi-parameter perception-based clustering routing protocol method for seawater rice environmental monitoring WSN, characterized in that, The method includes: Step S1: Simulate and construct the environmental monitoring area of seawater rice, deploy sensor nodes based on the constructed simulation environment, and use the LEACH algorithm to perform the first clustering on the deployed sensor nodes, specifically including: 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), then the sensor node to be measured becomes the cluster head, otherwise it becomes a cluster member: ; 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; 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, specifically including: Construct a weight function based on three factors: node energy consumption, distance between nodes, and distance between nodes and the base station : ; ; ; 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; Step S3: Select sensor nodes as cluster heads based on the results of the dynamic weight adjustment, and use the average remaining energy ratio of the intra-cluster path to screen the intra-cluster routing paths to obtain intra-cluster routing paths that meet the preset conditions; 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 weight of the cluster head 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 to complete the WSN clustering routing protocol method for seawater rice environmental monitoring.

2. The multi-parameter perception-based seawater rice environmental monitoring WSN clustering routing protocol method according to claim 1, characterized in that In the step S2, the process of using 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 specifically includes: Calculate the weights of each node in the cluster based on the comprehensive evaluation function for cluster head rotation and calculate the difference from the preset standard weight, and select the cluster head based on the absolute value of the difference; Use the particle swarm optimization algorithm to dynamically adjust the weights of the parameters of the comprehensive evaluation function for cluster head rotation, specifically: ; 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, c1, c2 are acceleration constants, r1, r2 are random numbers, x i is the current position of the i-th particle; Add a penalty term to calculate the dynamic adjustment of the updated weight in the particle swarm optimization algorithm: ; 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.

3. A WSN clustering routing protocol system for seawater rice environmental monitoring based on multi-parameter perception, the clustering routing protocol system is used to implement the clustering routing protocol method described in any one of claims 1-2, characterized in that, The system includes: a first 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 environmental monitoring area of seawater rice, deploy sensor nodes based on the constructed simulation environment, and use the LEACH algorithm to perform the first clustering on the deployed sensor nodes; The cluster head rotation module is used to 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, specifically including: 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), then the sensor node to be measured becomes the cluster head, otherwise it becomes a cluster member: ; 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 become cluster heads in the most recent 1 / p rounds, and n is the node currently being evaluated; The intra-cluster routing module is used to select sensor nodes as cluster heads based on the results of dynamic weight adjustment, and use the average remaining energy ratio of the intra-cluster path to screen the intra-cluster routing paths, so as to obtain intra-cluster routing paths that meet the preset conditions, specifically including: Construct a weight function based on three factors: node energy consumption, distance between nodes, and distance between the node and the base station : ; ; ; 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; 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 head rotation frequency, 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 method of the clustered routing protocol for seawater rice environment monitoring WSN.

4. The seawater rice environmental monitoring WSN clustering routing protocol system based on multi-parameter perception according to claim 3, 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: Calculate the weights of each node in the cluster based on the cluster head 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; Use the particle swarm optimization algorithm to perform dynamic weight adjustment on 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 velocity, pBest i is the individual best position of the i-th particle, gBest is the global best position, w is the inertia weight, c1 and c2 are acceleration constants, r1 and r2 are random numbers, and x i is the current position of the i-th particle; Add a penalty term in the particle swarm optimization algorithm to calculate the dynamic adjustment of the updated weight: ; In the formula, F is the fitness; W is the difference between the current node weight and the intra-cluster standard weight, k is the power of the penalty term, and P is the penalty factor.

Citation Information

Patent Citations

  • Wireless sensor network clustering routing method based on grey wolf optimization and Dijkstra

    CN117279067A

  • WSN routing protocol method based on improved dung beetle optimization and Q learning algorithm

    CN118338381A