Irrigation control method, device and equipment based on soil moisture content sensor network and medium
Through dynamic area adjustment and fault node takeover mechanism based on soil moisture sensor network, the problems of loss of monitoring data consistency and inaccurate irrigation decisions in agricultural irrigation systems are solved, and the efficient and stable operation of the irrigation system is achieved.
Patent Information
- Application Number
- CN202510880536.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-08-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When faced with dynamic changes in farmland environment and equipment failures, existing agricultural irrigation systems have problems such as loss of monitoring data consistency, inaccurate irrigation decisions and delayed responses, and lack effective adjacent node responsibility inheritance mechanisms and communication topology update mechanisms.
Through the moisture sensor network, the dynamic changes in soil moisture are monitored in real time, the region division is adjusted using spectral clustering algorithm and terrain gradient continuity, the node mapping relationship is dynamically updated, the data transmission path and routing structure are optimized, the faulty node tasks are automatically taken over, and the network topology structure bound to the geographical boundary is generated to realize the reliable delivery of irrigation instructions.
Under the continuous changes in farmland environment and abnormal equipment, the spatial consistency of soil moisture monitoring and the reliable delivery of irrigation instructions have been maintained, which has improved the efficiency of agricultural water resource utilization and the stability of crop growth environment.
Smart Images

Figure CN120455357A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of irrigation control, and in particular relates to an irrigation control method, device, equipment and medium based on a soil moisture sensor network. Background Art
[0002] Current agricultural irrigation system node management often uses a static zoning strategy, assigning sensor nodes and irrigation terminals within fixed geographic boundaries to form pre-defined control units. While this approach simplifies initial deployment, the real farmland environment is subject to numerous dynamic factors: terrain elevation changes due to soil erosion or human intervention, crop rotations lead to the migration of planting areas, and soil moisture anomalies due to meteorological conditions or uneven irrigation. These changes gradually cause node monitoring data within the original static boundaries to lose spatial consistency, ultimately leading to inaccurate irrigation decisions.
[0003] To address this issue, some systems have attempted to introduce periodic rezoning mechanisms, such as fully updating node groupings at fixed intervals. However, these periodic adjustments are subject to significant lags, often causing crops to suffer from water stress before the rezoning is complete. Furthermore, existing solutions are relatively reactive in responding to equipment failures, often requiring manual intervention to address monitoring blind spots covered by faulty nodes, resulting in delayed irrigation response.
[0004] While recent research has attempted to dynamically adjust zoning based on environmental data, key flaws remain: topographical factors and crop distribution data are not incorporated into the zoning system; there is no mechanism for inheriting responsibility from neighboring nodes in the event of a node failure; and communication topology updates are decoupled from changes in geographic boundaries. These shortcomings make it difficult for irrigation systems to meet the accuracy and robustness requirements of modern agriculture. Summary of the Invention
[0005] Based on this, it is necessary to provide an irrigation control method, device, equipment and medium based on a soil moisture sensor network to address the above technical problems.
[0006] In a first aspect, the present application provides an irrigation control method based on a soil moisture sensor network, comprising:
[0007] S1. Based on the soil moisture data collected by multiple sensor nodes, the management areas are divided based on spatial correlation to obtain an initial set of management areas and an initial mapping relationship between the areas and sensor nodes;
[0008] S2. Based on the initial mapping relationship, soil moisture data of sensor nodes in each area of the initial management area set is collected, and the moisture characteristic deviation of each area is calculated;
[0009] S3. When the moisture characteristic deviation exceeds a preset threshold and persists for a preset time, a spectral clustering algorithm that considers terrain gradient continuity and crop type consistency is used to re-cluster the nodes in the corresponding area and adjacent areas, and the initial management area set and initial mapping relationship are updated to obtain the final management area set and updated node mapping relationship.
[0010] S4. Monitor the status of the sensor nodes. If a faulty node is detected, assign monitoring sub-regions to the neighboring nodes based on the geographical coordinates of the faulty node and the region to which it belongs in the final management region set. Update the updated node mapping relationship to obtain the final node mapping relationship.
[0011] S5. Optimize the data transmission paths and cross-region routing within each region in the final management region set based on the final node mapping relationship, and generate a network topology structure bounded by the region boundaries;
[0012] S6. Calculate the regional irrigation amount based on the average moisture value of each area in the final management area set, the crop water requirement model, and meteorological data; and send the irrigation instructions corresponding to the regional irrigation amount to the corresponding control terminal based on the network topology.
[0013] In a second aspect, the present application further provides an irrigation control device based on a soil moisture sensor network, which is used in the method described in the first aspect, comprising:
[0014] Initialize the management area division module, which is used to divide the management area based on spatial correlation according to the soil moisture data collected by multiple sensor nodes, and obtain the initial management area set and the initial mapping relationship between the area and the sensor node;
[0015] The real-time water demand characteristic analysis module is used to collect soil moisture data of sensor nodes in each area of the initial management area set based on the initial mapping relationship and calculate the moisture characteristic deviation of each area;
[0016] The dynamic area adjustment module is used to re-cluster the nodes of the corresponding area and adjacent areas using a spectral clustering algorithm that considers terrain gradient continuity and crop type consistency when the moisture characteristic deviation exceeds a preset threshold and persists for a preset period of time, updating the initial management area set and initial mapping relationship to obtain the final management area set and updated node mapping relationship;
[0017] The fault node takeover processing module is used to monitor the status of sensor nodes. If a faulty node is detected, it will allocate monitoring sub-regions to neighboring nodes based on the geographical coordinates of the faulty node and the region it belongs to in the final management region set, and update the updated node mapping relationship to obtain the final node mapping relationship;
[0018] The network communication topology reconstruction module is used to optimize the data transmission paths and cross-region routing in each area of the final management area set according to the final node mapping relationship, and generate a network topology structure bounded by the area boundary;
[0019] The irrigation decision-making and execution module is used to calculate the regional irrigation amount based on the average moisture value of each area in the final management area set, the crop water requirement model and meteorological data; and according to the network topology, the irrigation instructions corresponding to the regional irrigation amount are sent to the corresponding control terminal.
[0020] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements an irrigation control method based on a soil moisture sensor network as in the first aspect.
[0021] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the irrigation control method based on a soil moisture sensor network as in the first aspect is implemented.
[0022] The above-mentioned irrigation control method, device, equipment and medium based on the soil moisture sensor network divide the management area and obtain the mapping relationship between the area and the sensor node according to the soil moisture data collected by the sensor nodes; monitor the dynamic change data of soil moisture in each area of the farmland in real time, and trigger the reorganization of the geographical area boundary when the difference in soil moisture characteristics of adjacent areas exceeds the preset similarity threshold; adjust the management ownership of the monitoring nodes in real time based on the reorganized geographical boundaries and update the mapping relationship between the nodes and the areas; at the same time, automatically take over the monitoring task of the area to which the faulty node belongs and assign it to the adjacent nodes to re-divide the monitoring sub-areas, and simultaneously optimize the data transmission path and cross-region routing structure according to the updated regional boundaries and node mapping relationships, and bind the generated network topology structure to the geographical boundaries; finally, based on the topology structure, accurately locate the control terminal within the boundary to perform differentiated irrigation operations, and simultaneously maintain the spatial consistency of soil moisture monitoring and the reliable delivery of irrigation instructions under the conditions of continuous changes in the farmland environment and equipment abnormalities, thereby significantly improving the efficiency of agricultural water resource utilization and the stability of the crop growth environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0024] Figure 1A schematic flow chart of an irrigation control method based on a soil moisture sensor network provided by the present invention;
[0025] Figure 2 Schematic diagram of a flow chart for obtaining a moisture characteristic deviation in an optional embodiment of the present invention;
[0026] Figure 3 This is a structural schematic diagram of an irrigation control device based on a soil moisture sensor network provided by the present invention. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0028] refer to Figure 1 , which presents a flow chart of an irrigation control method based on a soil moisture sensor network provided by the present application, the method comprising the following steps:
[0029] S1. Based on the soil moisture data collected by multiple sensor nodes, the management areas are divided based on spatial correlation to obtain an initial set of management areas and an initial mapping relationship between the areas and sensor nodes.
[0030] Specifically, from a technical perspective, soil moisture exhibits spatial correlation, meaning that soil moisture trends in adjacent areas or areas with similar terrain or crops tend to be consistent. Based on this, a spatial clustering algorithm can be used to group sensor nodes. Specifically, a spatial similarity matrix can be constructed, whose element values are composed of weights derived from the geographic distances between sensor nodes and the weights derived from the soil moisture differences. Assuming there are n sensor nodes, the similarity matrix S can be expressed as:
[0031]
[0032] Among them, s ij It represents the similarity measure between node i and node j, and the calculation formula can be:
[0033]
[0034] Where dij is the geographical distance between nodes i and j, h i and h jThe matrix represents the soil moisture values collected at two nodes, respectively. α and β are weight coefficients that balance the effects of geographic distance and humidity differences, and γ is used to adjust the sensitivity of humidity differences. After processing this matrix using a clustering algorithm, an initial set of management regions is obtained. Nodes within each region are highly correlated in terms of spatial location and humidity perception. An initial mapping relationship between regions and nodes is also established, clarifying the set of nodes contained in each region.
[0035] S2. Based on the initial mapping relationship, soil moisture data of sensor nodes in each area of the initial management area set is collected, and the moisture characteristic deviation of each area is calculated.
[0036] Specifically, when calculating the moisture characteristic deviation, the regional benchmark moisture value can be determined first. Ideally, the corresponding standard soil moisture content h can be retrieved from the agricultural database based on the crop varieties, growth stages, and soil texture of the region. std As the benchmark value. After collecting soil moisture data at each node in the area, remove obvious abnormal values and calculate the arithmetic mean h avg As the current average moisture value of the area. According to the relative deviation formula: The moisture characteristic deviation δ of the area is obtained to quantify the degree of deviation of the regional soil moisture from the ideal state. If δ exceeds the preset threshold δ th , it indicates that the soil moisture conditions in the area may endanger crop growth, and further analysis is needed to determine whether it is caused by unreasonable regional division.
[0037] S3. When the moisture characteristic deviation exceeds the preset threshold and lasts for a preset time, the spectral clustering algorithm that considers the continuity of terrain gradient and the consistency of crop type is used to re-cluster the nodes in the corresponding area and adjacent areas, and the initial management area set and initial mapping relationship are updated to obtain the final management area set and updated node mapping relationship.
[0038] Specifically, when the moisture characteristic deviation δ of a certain area continues to exceed the threshold δ th After the preset time T is reached, the validity of the original area division is questioned. At this time, it is necessary to re-examine the node distribution of the area and its adjacent areas and re-cluster them considering terrain and crop factors.
[0039] From the perspective of terrain, the concept of terrain gradient continuity is introduced. With the help of Geographic Information System (GIS), the digital elevation model (DEM) of farmland is obtained and the slope θ of each node is calculated. i Nodes with similar slopes are grouped together because the slope affects soil moisture runoff and infiltration, and the slope difference is less than the threshold θ thNodes in the same area share similar topographic drainage characteristics. Furthermore, considering the different root water absorption depths and water consumption rates of different crops, crop types can be distinguished. Using the crop distribution map provided by the farm management system, nodes in the same crop type planting area are clustered.
[0040] Improve the spectral clustering algorithm and construct a comprehensive similarity matrix C, whose elements can be expressed as:
[0041]
[0042] Among them, s ij The spatial similarity matrix from step S1, reflects the slope similarity between nodes, κ is the slope weight coefficient, γ ij It is a binary variable that takes the value 1 if the crop type is the same and 0 if it is different. After spectral clustering, the mapping relationship between the management area set and the node is updated to make the newly divided area more consistent with the actual soil moisture distribution and crop demand.
[0043] S4. Monitor the status of the sensor nodes. If a faulty node is detected, a monitoring sub-area is allocated to the neighboring nodes according to the geographical coordinates of the faulty node and the area to which it belongs in the final management area set. The updated node mapping relationship is updated to obtain the final node mapping relationship.
[0044] Specifically, each sensor node periodically transmits a heartbeat signal to the base station, containing information such as its node ID, battery level, and signal strength. Simultaneously, a data quality monitoring module verifies the uploaded soil moisture data for plausibility. If data mutations exceed a threshold for multiple consecutive cycles, it is considered an anomaly. When a faulty node is detected, a redundant node takes over.
[0045] The known geographical coordinates (x f ,y f ), select the neighboring nodes that are working normally in the neighborhood with a radius of R. According to the distance weighting method, the monitoring area of the faulty node is divided into several sub-areas and assigned to the neighboring nodes based on the distance from the faulty node. The distance weight coefficient w i The calculation formula for the allocation ratio of neighboring node i can be: i=1,2,…,m, where d i is the distance from neighboring node i to the faulty node, and m is the total number of neighboring nodes. Based on this, the monitoring range of each neighboring node is updated, the node mapping relationship is improved, and the integrity and continuity of the entire monitoring network are ensured.
[0046] S5. Based on the final node mapping relationship, optimize the data transmission path and cross-region routing in each area of the final management area set to generate a network topology structure bound to the area boundary.
[0047] Specifically, within the region, a data transmission path based on the minimum spanning tree (MST) can be constructed, with each sensor node as the vertex of the graph and the energy consumption of the communication link between nodes as the edge weight w ij ,Using the Kruskal algorithm, a spanning tree that connects all nodes and has the minimum ,total energy consumption is gradually constructed, forming an efficient data ,aggregation path and reducing the data transmission ,energy consumption and packet loss rate.
[0048] For cross-regional communication, a spatial decomposition algorithm can be used to construct inter-regional communication routes based on the coordinates of regional center points. The Euclidean distance between regional center points is calculated, and communication priorities are determined based on distance. Direct communication links between close-range regions are prioritized, while longer-distance communications are routed through intermediate regions. The resulting network topology organically integrates regional boundaries with communication boundaries, ensuring efficient transmission of irrigation instructions and data, and improving overall system efficiency.
[0049] S6. Calculate the regional irrigation amount based on the average moisture value of each area in the final management area set, the crop water requirement model, and meteorological data; and send the irrigation instructions corresponding to the regional irrigation amount to the corresponding control terminal based on the network topology.
[0050] Specifically, for planted crops, their saturation water content h can be obtained from the crop growth database. sat Based on the soil water characteristic curve and other key parameters, a quantitative relationship between soil moisture content and crop water deficit is established. At the same time, the daily evaporation and transpiration (ET0) data provided by the meteorological station is introduced and combined with the irrigation water calculation formula to calculate the irrigation water volume. The irrigation water volume calculation formula can be as follows:
[0051] I=(h sat -h avg )·K c ET0 A;
[0052] Where I is the irrigation amount, K c is the crop coefficient set based on expert experience, where A represents the area of the region. This formula comprehensively considers the current soil moisture content, crop water requirements, and meteorological conditions to determine the optimal irrigation amount.
[0053] Using the network topology generated in step S5, irrigation instructions are encoded into data packets containing parameters such as irrigation duration and water pressure. These instructions are then forwarded hop-by-hop to the controllers of the corresponding irrigation devices, via the control terminal at the regional central node, based on the routing relationships within the network topology. After parsing the instructions, the controllers adjust the solenoid valve opening angle and pump operating power to ensure that the irrigation water volume and irrigation range are precisely matched to the calculated results, achieving automated and precise control of the irrigation process.
[0054] The above-mentioned irrigation control method based on a soil moisture sensor network divides management areas and obtains mapping relationships between areas and sensor nodes based on soil moisture data collected by sensor nodes; monitors the dynamic changes in soil moisture data in various areas of farmland in real time, and triggers the reorganization of geographical area boundaries when the difference in soil moisture characteristics in adjacent areas exceeds a preset similarity threshold; adjusts the management ownership of monitoring nodes in real time based on the reorganized geographical boundaries and updates the mapping relationship between nodes and areas; simultaneously automatically takes over the monitoring tasks of the area to which the faulty node belongs and assigns them to neighboring nodes to re-divide the monitoring sub-areas, and simultaneously optimizes the data transmission path and cross-region routing structure based on the updated regional boundaries and node mapping relationships, and binds the generated network topology structure to the geographical boundaries; finally, based on the topology structure, accurately locates the control terminal within the boundary to perform differentiated irrigation operations, and simultaneously maintains the spatial consistency of soil moisture monitoring and the reliable delivery of irrigation instructions under the conditions of continuous changes in the farmland environment and equipment abnormalities, significantly improving the efficiency of agricultural water resource utilization and the stability of the crop growth environment.
[0055] In an optional embodiment, S1 includes the following steps:
[0056] S11. Calculate the Euclidean distance between each sensor node based on the geographic location data in the soil moisture data to obtain a geographic Euclidean distance matrix.
[0057] Specifically, the geographic location data collected by the sensor nodes is used to calculate the Euclidean distance between each sensor node and construct the geographic Euclidean distance matrix D geo , the element D in the matrix geo (i, j) represents the geographic straight-line distance between node i and node j, and the calculation formula is:
[0058]
[0059] Among them, x i ,y i , z i and x j ,y j , z j are the geographic coordinates of nodes i and j, respectively. This matrix reflects the spatial proximity of nodes and is the basic data for measuring the spatial distribution characteristics of nodes. It provides a spatial location basis for subsequent regional division based on other features.
[0060] S12. Obtain non-geographical location features based on the non-geographical location data in the soil moisture data, and perform weighted fusion on the non-geographical location features according to a preset feature weight coefficient to generate a feature difference matrix between each sensor node; the expression of each element in the feature difference matrix is:
[0061]
[0062] Among them, λ k is the preset feature weight coefficient corresponding to the kth non-geographical feature, D k is the preset category difference function, D k (S i ,S j ) represents the distance between node i and node j of the kth non-geographical feature; non-geographical features include: soil type code, terrain elevation value, terrain slope value, crop type code and moisture value.
[0063] Specifically, based on the non-geographical data in the soil moisture data, such as soil type code, terrain elevation value, terrain slope value, crop type code, and moisture value, non-geographical features are obtained. The preset feature weight coefficient is introduced to perform weighted fusion on these non-geographical features to generate the feature difference matrix D between each sensor node. feat Among them, the expression of each element in the feature difference matrix is:
[0064]
[0065] In the formula, S i and S j Represents the feature sets of node i and node j respectively, λ k is the preset feature weight coefficient corresponding to the kth non-geographical feature (for example, the soil type code weight is 0.3, the terrain elevation value weight is 0.2, etc.). These weight coefficients can be pre-set according to the importance of each factor on irrigation in actual farmland. k is a preset category difference function used to calculate the distance between the kth non-geographical feature of node i and node j. For example:
[0066] 1) For discrete features such as soil type encoding, the Hamming distance can be used to indicate whether two nodes have the same soil type. If the soil types are the same, the Hamming distance is 0; otherwise, it is 1.
[0067] 2) For continuous features such as terrain elevation and slope, the Euclidean distance can be used to calculate feature differences. The calculation formula is:
[0068] D k (S i ,S j )=|s ik -s jk |;
[0069] Among them, s ik and s jk are the terrain elevation values or terrain slope values of node i and node j respectively.
[0070] 3) For crop type coding, the Hamming distance and other methods can also be used to measure the differences.
[0071] 4) For moisture values, the normalized Euclidean distance can be used to eliminate the dimension effect. The calculation formula is:
[0072]
[0073] Among them, max(s k ) and min(s k ) are the maximum and minimum moisture values of all nodes respectively.
[0074] By weighting the differences of different features, we can get the feature difference matrix D feat , which comprehensively reflects the overall differences between nodes in multiple attributes such as soil, topography, and crop planting.
[0075] S13. Generate a composite distance matrix by linear weighting based on the geographic Euclidean distance matrix and the feature difference matrix. The expression of the composite distance matrix is:
[0076] D comp =α·D geo +β·D deat ;
[0077] Among them, D geo is the geographic Euclidean distance matrix, D feat is the feature difference matrix, and α and β are distance weight factors.
[0078] Specifically, the distance weight factor is used to adjust the relative importance of geographic distance and feature differences in the comprehensive distance calculation. In practical applications, it can be pre-set according to the specific conditions of the farmland. For example, in farmland with complex terrain, diverse soil types, and uneven crop distribution, α = 0.4 and β = 0.6 can be set to better highlight the impact of node differences in soil, terrain, and crop properties on regional division. The composite distance matrix D comp The element D in comp (i, j) represents the comprehensive distance between node i and node j. This distance comprehensively reflects the dual differences in spatial location and attribute characteristics of the nodes, providing a basis for subsequent clustering and division of management areas based on node similarity.
[0079] S14. Based on the composite distance matrix, the nodes are spatially divided into regions using a density clustering algorithm to obtain an initial management region set; and a polygon boundary set covering the initial management region and a corresponding regional node member set are generated to obtain an initial mapping relationship.
[0080] Specifically, based on the composite distance matrix D comp, using a density clustering algorithm (such as DBSCAN) to partition the nodes into spatial regions. Density clustering algorithms can automatically discover clusters of arbitrary shapes based on the density distribution between nodes, making them suitable for handling irregularly shaped management areas that may exist in farmland. Using the DBSCAN algorithm as an example, the specific operations in this step can be as follows:
[0081] The neighborhood radius ε and the minimum number of included samples, MinPts, can be pre-set based on the node density within the farmland. For example, if the average node spacing is approximately 50 meters, ε = 70 meters and MinPts = 5 can be initially set. Choosing these two parameters will affect the accuracy of the clustering results and can be optimized through repeated experiments and verification.
[0082] Calculate the neighborhood density of each node. For each node i, count the number of nodes within its neighborhood radius ε. If the number is greater than or equal to MinPts, the node is considered to belong to a high-density area and can be used as a core object. If the node does not belong to any high-density area, it is marked as a boundary object or noise point.
[0083] Clustering is performed based on neighborhood density. Starting from any unvisited core object, all densely connected nodes in its neighborhood are found to form a cluster. Nodes in this cluster have high similarity in spatial location and attribute characteristics, forming an initial management area. Repeat the above steps until all core objects have been visited and divided into corresponding clusters, ultimately obtaining the initial management area set.
[0084] At the same time, a polygonal boundary set covering the initial management area is generated to clarify the geographical boundary range of each management area, which is convenient for the subsequent unified management and control of the nodes within the area; and a corresponding regional node member set is generated, that is, the set of sensor nodes contained in each initial management area is determined, and an initial mapping relationship is established, which lays the foundation for subsequent operations such as data collection and analysis of each node in the area and corresponding irrigation decision-making.
[0085] refer to Figure 2 In an optional embodiment, S2 includes the following steps:
[0086] S21. Collect the soil moisture value θ of each node according to the regional node member set n (t), and obtain the moisture value set {θ n (t)}; where n represents the index of the sensor node in the regional node member set, and t represents time.
[0087] Specifically, each sensor node can measure the physical quantities of the soil such as the dielectric constant through the soil moisture sensor at a preset time interval (for example, every 30 minutes or every hour), and convert it into the soil moisture volume percentage value θn (t), its conversion formula follows the calibration curve of the sensor. For example, for a capacitive soil moisture sensor, it can be calculated by the formula θ n (t) = a·C n (t) + b calculation, where C n (t) is the capacitance value measured by node n at time t, and a and b are the sensor calibration coefficients. The collected data is then uploaded to the central control system, which classifies and organizes the data according to the regional node member set and constructs the moisture value set {θ n (t)}, laying the data foundation for subsequent analysis.
[0088] S22. Select the lower percentile p based on crop growth requirements and soil moisture historical data characteristics. min and the upper percentile p max , call the pth historical moisture value of the crop growth period in each area in the initial management area set min Percentile θ min and p max Percentile θ max , as the suitable moisture range [θ min ,θ max ].
[0089] Specifically, taking wheat planting as an example, it is more sensitive to soil moisture demand during the jointing stage. After analyzing historical soil moisture data, we selected p min =20 and p max =80, calculate the 20th percentile of the historical moisture value of wheat at the jointing stage using statistical software or algorithms min = 20% and 80th percentile θ max =28%, thus determining the suitable moisture range as [20%, 28%]. This indicates that during the jointing stage, when soil moisture is lower than 20% or higher than 28%, it may affect the normal growth of wheat and appropriate irrigation or drainage measures need to be taken.
[0090] S23. Calculate the weighted average moisture value of each region based on the moisture value set. The calculation formula for the weighted average moisture value is:
[0091]
[0092] Among them, Θ K (t) represents the weighted average moisture value of region K, with weight w n It is set according to the reliability level of the sensor node.
[0093] Specifically, the node reliability level can be determined as follows:
[0094] 1) Sensor Performance Evaluation: Sensor nodes are regularly tested for key performance indicators, including measurement accuracy, stability, and response time. For example, the measurement error is calculated by comparing sensor measurements with known standard values. If the measurement error is within the allowable range, the sensor is considered to have good performance and a high reliability rating; otherwise, the reliability rating is low.
[0095] 2) Historical data quality analysis: Analyze the quality of data collected by sensor nodes in the past, including data continuity and consistency. For example, if a node frequently experiences data loss or abnormal fluctuations during past collection processes, the reliability level of the node should be reduced accordingly.
[0096] 3) Environmental factors: Consider the impact of the node's environmental conditions on data reliability. For example, the reliability level of a node installed in a location prone to water accumulation or mechanical damage may be affected.
[0097] According to the reliability level of the node, it is assigned a corresponding weight w n The weight setting can follow the following principles: nodes with higher reliability levels have larger weights, and their data has a greater influence on the weighted average calculation. Nodes with lower reliability levels have smaller weights, and their data has a relatively smaller impact on the weighted average.
[0098] The weights can be determined quantitatively. For example, the reliability level can be divided into three levels: high, medium, and low, with corresponding weight coefficients of 0.6, 0.3, and 0.1, respectively.
[0099] S24. Calculate the normalized deviation of the moisture value of each region based on the suitable moisture range and the weighted average moisture value as the moisture characteristic deviation; the calculation formula for the normalized deviation is:
[0100]
[0101] Among them, Δ K (t) represents the normalized deviation of the moisture value in region K at time t; |K| represents the total number of sensor nodes in region K.
[0102] Specifically, Δ K (t) reflects the degree of deviation of regional soil moisture from the optimum range. Smaller values indicate that soil moisture is closer to the optimum range. Accurately calculating the deviation of regional moisture characteristics can provide a scientific basis for subsequent irrigation decisions and achieve precision irrigation.
[0103] In an optional embodiment, S4 includes the following steps:
[0104] S41. Based on the heartbeat signal sequence periodically sent by the sensor node, determine the faulty node through state transition analysis.
[0105] Specifically, the sensor node sends a heartbeat signal to the central control system regularly (e.g., every 10 minutes), which contains information such as node ID, battery power, signal strength, etc., indicating that the node is in normal working condition. The central control system records the heartbeat signal of each node and constructs a state transition model. If a node fails to send a heartbeat signal for multiple consecutive times (e.g., 3 times), or if the key information in the heartbeat signal (e.g., a sudden drop in battery power, abnormal signal strength) changes abnormally, the node is judged to be a faulty node. The state transition model can be described by a Markov chain. Assuming that the node has a normal state (S0) and a faulty state (S1), the state transition probability matrix is as follows:
[0106]
[0107] Among them, p 00 represents the probability of maintaining the normal state, p 01 represents the probability of the normal state transitioning to the fault state, p 10 represents the probability of the fault state returning to the normal state, p 11 Indicates the probability that the fault state persists. By updating the state transition probability matrix in real time, the state change of the node can be dynamically evaluated.
[0108] For example, during normal operation, the node's heartbeat signal sequence appears as regular periodic data; however, when the node antenna is damaged, the signal strength will drop sharply. The central control system can detect faulty nodes in a timely manner by analyzing this state transition.
[0109] S42. Filter out the first M neighboring nodes with the closest geographical distance from all nodes in the management area according to the geographical coordinates of the faulty node; where M is a preset value.
[0110] Specifically, each sensor node is equipped with a GPS module, which allows it to obtain its own geographic coordinates (longitude, latitude, and elevation) in real time. The Euclidean distance formula is used to calculate the geographic distances between all healthy nodes and the faulty node within its management area. The calculated distances are sorted, and the first M nodes with the closest distances are selected as the neighboring node set H.
[0111] S43. Based on the distance between the selected neighboring nodes and the faulty node and the reliability index of the node itself, the takeover responsibility weight of each neighboring node is comprehensively calculated. The calculation formula for the takeover responsibility weight is:
[0112]
[0113] Among them, W i represents the takeover responsibility weight of the i-th neighboring node, R i Represents the reliability index of the i-th neighboring node, Rmax represents the maximum reliability index, di represents the distance between the ith neighboring node and the faulty node, H represents the set of neighboring nodes, γ is the reliability weight coefficient and 0<γ<1.
[0114] Specifically, reliability can be determined by regularly testing the performance of sensor nodes, including key indicators such as measurement accuracy, stability, and response time. For example, by comparing sensor measurements with known standard values, the measurement error can be calculated. If the measurement error is within the allowable range, the sensor is considered to have good performance and a high reliability index; otherwise, the reliability index is low. Furthermore, the quality of the data collected by the sensor node in the past can be analyzed, including data continuity and consistency. If a node has frequently experienced data loss or abnormal fluctuations during past data collection, the reliability index of that node should be reduced accordingly.
[0115] S44. Based on the takeover responsibility weight, a weighted geometric partitioning algorithm is used to divide the area to which the faulty node belongs into monitoring sub-areas, and each monitoring sub-area is associated with a neighboring node.
[0116] Specifically, according to the takeover responsibility weight W of each neighboring node i , the original monitoring area of the fault node is divided into multiple sub-areas. The larger the weight of the node, the larger the sub-area allocated to it, and the sub-area is closer to the side of the node. The division process can be: with the fault node as the center, construct a Voronoi diagram. Each neighboring node is used as a generating point, according to W i Adjust the Voronoi boundary so that nodes with large weights are allocated to sub-regions closer to the core of the fault area. The specific boundary adjustment formula is:
[0117]
[0118] Among them, Original Boundary is the original Voronoi boundary based on distance, and Adjusted Boundary is the adjusted boundary.
[0119] For example, the weight of neighboring node B is higher. After division, its associated monitoring sub-area is not only larger in area, but also closer to the core position of the original monitoring area of the faulty node, ensuring that the node can take over the monitoring task more effectively.
[0120] S45 , binding the divided monitoring sub-areas to corresponding adjacent nodes, updating the updated node mapping relationship, and obtaining a final node mapping relationship.
[0121] Specifically, in the central control system, each monitoring sub-area is associated with its corresponding adjacent node, clarifying which node is responsible for monitoring each sub-area. The node mapping table is modified to remove the association between the faulty node and the original monitoring area and add the association between the adjacent node and the new monitoring sub-area to ensure the continuity of data collection and management. The structure of the updated mapping table is as follows:
[0122]
[0123] The Region ID represents the unique identifier of the monitoring subregion, and the Node ID represents the unique identifier of the adjacent node responsible for the subregion.
[0124] For example, the faulty node's original monitoring area is region F. After partitioning, subregion F1 is associated with neighboring node C, and subregion F2 is associated with neighboring node D. In the updated mapping table, the record for region F is deleted, and new association records for F1-C and F2-D are added, allowing subsequent data collection and processing to be performed based on the new mapping relationships.
[0125] In an optional embodiment, S5 includes the following steps:
[0126] S51. Based on the final node mapping relationship, a link quality matrix including signal strength and transmission delay indicators is established.
[0127] Specifically, the wireless communication module of the sensor node (such as Zigbee, LoRa, etc.) is used to regularly measure the signal strength (RSSI) between the sensor node and other nodes. The signal strength reflects the stability of the link. The higher the RSSI value, the more stable the link. By sending and receiving heartbeat signals or other test data packets, the round-trip time (RTT) of the data packet from the sending node to the receiving node is measured and used as an indicator of transmission delay. The transmission delay reflects the real-time performance of the link. The smaller the delay, the more timely the data transmission. Construct a matrix LQ, where the element LQ ij represents the link quality between node i and node j. Link quality can be calculated by combining signal strength and transmission delay:
[0128]
[0129] Among them, α is the weight coefficient, which is used to adjust the relative importance of signal strength and transmission delay in link quality calculation (usually 0.5≤α≤0.7), RSSI ij is the signal strength from node i to node j, RTT ij is the round-trip time from node i to node j. The link quality matrix obtained by this method can fully reflect the stability and real-time performance of the communication link between each node.
[0130] S52. Based on the link quality matrix and with the link quality as the edge weight, a tree-like communication topology covering all nodes is generated by a minimum spanning tree algorithm.
[0131] Specifically, the Kruskal or Prim algorithms can be used, using the values in the link quality matrix LQ as edge weights to construct a spanning tree that connects all nodes and maximizes the total weight. This ensures that all nodes are connected by the highest-quality links, guaranteeing stable and efficient data transmission.
[0132] The output of a spanning tree algorithm is a tree structure, in which each node is connected to the root node through one or more links. This tree structure ensures unique and loop-free data transmission paths, preventing duplicate packet transmission and broadcast storms, thereby improving network reliability and efficiency.
[0133] S53. In the tree communication topology, select the node at the center of the topology and with the highest residual energy as the regional cluster head.
[0134] Specifically, to calculate the centrality of each node in the tree topology, methods such as Closeness Centrality or Betweenness Centrality can be used. Nodes with high centrality have an important position in the network and can effectively aggregate and forward data. The residual energy of each node is obtained through the battery power monitoring module of the node. Selecting nodes with high residual energy as cluster heads can extend the life cycle of the network and ensure that the cluster head node can undertake heavier data aggregation and forwarding tasks. Taking into account the centrality and residual energy of the node, the optimal node is selected as the regional cluster head. For example, the comprehensive score of each node can be calculated by the following formula:
[0135]
[0136] Among them, β is the weight coefficient, Centralityi is the centrality of node i, Energyyi is the residual energy of node i, and MaxEnergy is the maximum energy of the node in the network. The node with the highest comprehensive score is selected as the regional cluster head.
[0137] S54 , taking the node corresponding to the regional cluster head as the routing node, calculating the minimum hop path based on the regional boundary corresponding to the final management area set, and generating a routing table of the path corresponding to the target cluster head.
[0138] Specifically, the regional cluster heads are used as routing nodes, responsible for forwarding data packets from the source node to the destination node. Using the breadth-first search (BFS) algorithm or the Dijkstra algorithm, the minimum hop path from each routing node to other nodes is calculated. The minimum hop path ensures that data packets can reach the destination node with the least number of forwarding times, reducing transmission delay and energy consumption. A routing table is generated for each cluster head, recording the optimal path from the cluster head to other nodes. The structure of the routing table can be as follows:
[0139]
[0140] Where Destination Node represents the destination node, NextHop Node represents the next hop node, and HopCount represents the number of hops. The routing table guides the forwarding direction of data packets, ensuring that data can be transmitted along the optimal path.
[0141] S55 , the tree-like communication topology, the nodes corresponding to the regional cluster heads, and the routing table are bound and stored as a network topology structure according to the IDs of the regional boundaries.
[0142] Specifically, in the central control system, a record is created for each area boundary ID, and the tree-like communication topology structure, regional cluster head node information, and routing table of the area are associated and stored. For example, the storage structure is as follows:
[0143]
[0144] Among them, RegionID is the unique identifier of the region boundary, Tree Structure is the tree-like communication topology structure of the region, Cluster Head is the regional cluster head node, and Routing Table is the routing table corresponding to the cluster head.
[0145] By binding storage, network topology can be easily managed, queried, and updated. During subsequent data transmission, the system can quickly locate the corresponding network topology based on the area boundary ID, ensuring efficient and accurate data transmission.
[0146] The above-mentioned irrigation control method based on a soil moisture sensor network divides management areas and obtains mapping relationships between areas and sensor nodes based on soil moisture data collected by sensor nodes; monitors the dynamic changes in soil moisture data in various areas of farmland in real time, and triggers the reorganization of geographical area boundaries when the difference in soil moisture characteristics in adjacent areas exceeds a preset similarity threshold; adjusts the management ownership of monitoring nodes in real time based on the reorganized geographical boundaries and updates the mapping relationship between nodes and areas; simultaneously automatically takes over the monitoring tasks of the area to which the faulty node belongs and assigns them to neighboring nodes to re-divide the monitoring sub-areas, and simultaneously optimizes the data transmission path and cross-region routing structure based on the updated regional boundaries and node mapping relationships, and binds the generated network topology structure to the geographical boundaries; finally, based on the topology structure, accurately locates the control terminal within the boundary to perform differentiated irrigation operations, and simultaneously maintains the spatial consistency of soil moisture monitoring and the reliable delivery of irrigation instructions under the conditions of continuous changes in the farmland environment and equipment abnormalities, significantly improving the efficiency of agricultural water resource utilization and the stability of the crop growth environment.
[0147] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0148] Based on the same inventive concept, embodiments of the present application also provide a device for implementing the aforementioned soil moisture sensor network-based irrigation control method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more of the following embodiments of the soil moisture sensor network-based irrigation control device can be found in the aforementioned limitations of the soil moisture sensor network-based irrigation control method and will not be further elaborated here.
[0149] In an exemplary embodiment, Figure 3 As shown, an irrigation control device 30 based on a soil moisture sensor network is provided, which is used to implement the methods of the above-mentioned method embodiments, including:
[0150] The initialization management area division module 31 is used to divide the management area based on spatial correlation according to the soil moisture data collected by multiple sensor nodes, and obtain an initial management area set and an initial mapping relationship between the area and the sensor node.
[0151] The real-time water demand characteristic analysis module 32 is used to collect soil moisture data of sensor nodes in each area of the initial management area set based on the initial mapping relationship and calculate the moisture characteristic deviation of each area.
[0152] The dynamic area adjustment module 33 is used to re-cluster the nodes of the corresponding area and adjacent areas using a spectral clustering algorithm that considers the continuity of terrain gradients and the consistency of crop types when the moisture characteristic deviation exceeds a preset threshold and persists for a preset period of time, and to update the initial management area set and initial mapping relationship to obtain the final management area set and updated node mapping relationship.
[0153] The fault node takeover processing module 34 is used to monitor the status of sensor nodes. If a faulty node is detected, a monitoring sub-area is allocated to the neighboring nodes based on the geographical coordinates of the faulty node and the area to which it belongs in the final management area set, and the updated node mapping relationship is updated to obtain the final node mapping relationship.
[0154] The network communication topology reconstruction module 35 is used to optimize the data transmission paths and cross-region routings within each region in the final management region set according to the final node mapping relationship, and generate a network topology structure bounded by the region boundaries.
[0155] The irrigation decision and execution module 36 is used to calculate the regional irrigation amount based on the average moisture value of each area in the final management area set, the crop water requirement model and meteorological data; and according to the network topology structure, the irrigation instructions corresponding to the regional irrigation amount are sent to the corresponding control terminal.
[0156] An embodiment of the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0157] An embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0158] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the components described as separate parts may or may not be physically separated, and the parts displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the disclosed solution. A person of ordinary skill in the art can understand and implement it without expending creative work.
[0159] The above-described embodiments merely represent several implementation methods of the embodiments of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that a person skilled in the art may make various modifications and improvements without departing from the concept of the embodiments of the present application, and these modifications and improvements fall within the scope of protection of the embodiments of the present application.
Claims
1. An irrigation control method based on a soil moisture sensor network, characterized in that: The method comprises: S1. Based on the soil moisture data collected by multiple sensor nodes, the management areas are divided based on spatial correlation to obtain an initial set of management areas and an initial mapping relationship between the areas and sensor nodes; S2. Based on the initial mapping relationship, collect soil moisture data of sensor nodes in each area of the initial management area set, and calculate the moisture characteristic deviation of each area; S3. When the moisture characteristic deviation exceeds a preset threshold and persists for a preset time, a spectral clustering algorithm that considers terrain gradient continuity and crop type consistency is used to re-cluster the nodes of the corresponding area and adjacent areas, and the initial management area set and the initial mapping relationship are updated to obtain a final management area set and an updated node mapping relationship. S4. Performing status monitoring on the sensor nodes. If a faulty node is detected, assigning monitoring sub-regions to neighboring nodes based on the geographical coordinates of the faulty node and the region to which it belongs in the final management region set, and updating the updated node mapping relationship to obtain a final node mapping relationship. S5. Optimizing the data transmission paths and cross-region routing within each region of the final set of managed regions based on the final node mapping relationship to generate a network topology structure bounded by region boundaries; S6. Calculate the regional irrigation amount based on the average moisture value of each area in the final management area set, the crop water requirement model and meteorological data; and send the irrigation instructions corresponding to the regional irrigation amount to the corresponding control terminal according to the network topology.
2. The method according to claim 1, characterized in that Said S1 comprises: S11, calculating the Euclidean distance between each of the sensor nodes according to the geographical location data in the soil moisture data to obtain a geographical Euclidean distance matrix; S12. Obtain non-geographical location features based on the non-geographical location data in the soil moisture data, and perform weighted fusion on the non-geographical location features according to preset feature weight coefficients to generate a feature difference matrix between the sensor nodes; the expression of each element in the feature difference matrix is: [D deat ] i,j =∑ k λ k ·D k (S i ,S j ); Among them, λ k is the preset feature weight coefficient corresponding to the kth non-geographical feature, D k is the preset category difference function, D k (S i ,S j ) represents the distance between node i and node j of the kth non-geographical feature; the non-geographical features include: soil type code, terrain elevation value, terrain slope value, crop type code, and moisture value; S13. Generate a composite distance matrix by linear weighting based on the geographic Euclidean distance matrix and the feature difference matrix; the expression of the composite distance matrix is: D comp =α·D geo +β·D deat ; Among them, D geo is the geographic Euclidean distance matrix, D feat is the feature difference matrix, α and β are distance weight factors; S14. Based on the composite distance matrix, the nodes are spatially divided into regions by a density clustering algorithm to obtain the initial management region set; and a polygon boundary set covering the initial management region and a corresponding region node member set are generated to obtain the initial mapping relationship.
3. The method according to claim 2, characterized in that The S2 includes: S21. Collect the soil moisture value θ of each node according to the regional node member set n (t), and obtain the moisture value set {θ n (t)}; wherein n represents the index of the sensor node in the regional node member set, and t represents time; S22. Select the lower percentile p based on crop growth requirements and soil moisture historical data characteristics. min and the upper percentile p max , call the pth historical moisture value of the crop growth period in each area in the initial management area set min Percentile θ min and p max Percentile θ max , as the suitable moisture range [θ min ,θ max ]; S23. Calculate the weighted average moisture value of each region based on the moisture value set; the calculation formula for the weighted average moisture value is: Among them, Θ K (t) represents the weighted average moisture value of region K, with weight w n Set according to the reliability level of sensor nodes; S24. Calculate the normalized deviation of the moisture value of each region based on the suitable moisture range and the weighted average moisture value as the moisture characteristic deviation; the calculation formula of the normalized deviation is: Among them, Δ K (t) represents the normalized deviation of the moisture value in region K at time t; |K| represents the total number of sensor nodes in region K.
4. The method according to claim 1, wherein The S4 includes: S41, based on the heartbeat signal sequence periodically sent by the sensor node, determine the faulty node through state transition analysis; S42. Filter out the first M neighboring nodes with the closest geographical distance from all nodes in the management area according to the geographical coordinates of the faulty node; where M is a preset value; S43. Comprehensively calculate the takeover responsibility weight of each neighboring node based on the distance between the selected neighboring nodes and the faulty node and the reliability index of the node itself. The calculation formula for the takeover responsibility weight is: Among them, W i represents the takeover responsibility weight of the i-th neighboring node, R i represents the reliability index of the i-th neighboring node, R max represents the maximum reliability index, di represents the distance between the ith neighboring node and the faulty node, H represents the set of neighboring nodes, γ is the reliability weight coefficient and 0<γ<1; S44. Divide the area to which the faulty node belongs into monitoring sub-areas using a weighted geometric partitioning algorithm based on the takeover responsibility weight, and associate each monitoring sub-area with one of the neighboring nodes. S45: Bind the divided monitoring sub-areas to corresponding adjacent nodes, update the updated node mapping relationship, and obtain the final node mapping relationship.
5. The method according to any one of claims 1 to 4, characterized in that S5 include: S51. Based on the final node mapping relationship, establish a link quality matrix including signal strength and transmission delay indicators; S52. Based on the link quality matrix, using link quality as edge weight, generating a tree-like communication topology covering all nodes through a minimum spanning tree algorithm; S53, in the tree-like communication topology, selecting a node at the center of the topology and with the highest residual energy as a regional cluster head; S54, taking the node corresponding to the regional cluster head as the routing node, calculating the minimum hop path based on the regional boundary corresponding to the final management area set, and generating a routing table of the path corresponding to the target cluster head; S55 , binding the tree-like communication topology, the nodes corresponding to the regional cluster heads, and the routing table according to the IDs of the regional boundaries and storing them as the network topology structure.
6. An irrigation control device based on a soil moisture sensor network, used to implement the method according to any one of claims 1 to 5, characterized in that: The device comprises: Initialize the management area division module, which is used to divide the management area based on spatial correlation according to the soil moisture data collected by multiple sensor nodes, and obtain the initial management area set and the initial mapping relationship between the area and the sensor node; A real-time water demand characteristic analysis module is used to collect soil moisture data of sensor nodes in each area of the initial management area set based on the initial mapping relationship and calculate the moisture characteristic deviation of each area; A dynamic area adjustment module is configured to, when the moisture characteristic deviation exceeds a preset threshold and persists for a preset period of time, re-cluster the nodes of the corresponding area and adjacent areas using a spectral clustering algorithm that considers terrain gradient continuity and crop type consistency, update the initial management area set and the initial mapping relationship, and obtain a final management area set and an updated node mapping relationship; a faulty node takeover processing module, configured to monitor the status of sensor nodes; if a faulty node is detected, assigning monitoring sub-regions to neighboring nodes based on the geographical coordinates of the faulty node and the region to which it belongs in the final management region set; and updating the updated node mapping relationship to obtain a final node mapping relationship; A network communication topology reconstruction module is used to optimize the data transmission path and cross-region routing in each area of the final management area set according to the final node mapping relationship, and generate a network topology structure bounded by the area boundary; The irrigation decision-making and execution module is used to calculate the regional irrigation amount based on the average moisture value of each area in the final management area set, the crop water requirement model and meteorological data; and according to the network topology structure, the irrigation instruction corresponding to the regional irrigation amount is sent to the corresponding control terminal.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.