Method and device for obtaining field water holding capacity
Patent Information
- Application Number
- CN202611130561.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-28
- Publication Date
- 2026-10-27
AI Technical Summary
[0004]本申请提供一种田间持水量获取方法及装置,用以解决相关技术中如何无需人工采样即可获取田间持水量的技术问题
[0015]本申请实施例提供的田间持水量获取方法及装置,通过在排水事件对应的时序片段内部提取全局转折点与局部转折点,可以精准定位不同灌溉条件下排水速率变缓的关键位置,解决了单一阈值无法捕捉动态变化的问题;通过结合多维特征对候选点进行机器学习语义判别,可以有效利用逻辑约束剔除因灌溉不足等因素造成的伪田间持水量点,大幅增强模型在真实环境下的鲁棒性;通过对多个目标点的土壤含水量进行参数化拟合求解,可以克服单次观测数据的偶然误差,无需人工采样即可实现待测土壤田间持水量的原位、高精度动态获取。
Smart Images

Figure CN122986347A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of agricultural technology, and more specifically, to a method and apparatus for obtaining field water holding capacity. Background Technology
[0002] The coexistence of scarce agricultural water resources and experience-based irrigation has become a key issue restricting the high-quality development of agriculture. Field capacity (FC) is an important parameter for determining the timing of irrigation. However, in field scenarios, obtaining FC requires manual sampling followed by laboratory measurement, which is not only inefficient but also results in data delays.
[0003] Therefore, how to obtain field water holding capacity without manual sampling has become a technical problem that the industry urgently needs to solve. Summary of the Invention
[0004] This application provides a method and apparatus for obtaining field water holding capacity, which solves the technical problem in related technologies of how to obtain field water holding capacity without manual sampling.
[0005] Firstly, this application provides a method for obtaining field water holding capacity, including: Identify multiple drainage events of the soil under test based on soil moisture content time series data; The global turning point in the time segment corresponding to any drainage event is taken as the first candidate point, and the local turning point between the start point of the time segment and the first candidate point is taken as the second candidate point. The multidimensional features of the first candidate point and the second candidate point are obtained, and the target point corresponding to any drainage event is determined from the first candidate point and the second candidate point based on the multidimensional features. The target point is a candidate point belonging to the field water holding capacity point. The field capacity of the soil to be tested is determined based on the soil moisture content at the target point corresponding to each drainage event.
[0006] In some embodiments, identifying multiple drainage events of the soil under test based on soil moisture content time-series data includes: The original soil moisture content, event start information, and event end information of the soil moisture content time series data are concatenated to construct a combined input feature of the time series. Extract the probability of drainage events corresponding to the combined input features at each time step; The drainage event is obtained by aggregating consecutive time periods in which the probability of the drainage event occurring is greater than a preset probability threshold.
[0007] In some embodiments, the step of using a global inflection point in a time segment corresponding to any drainage event as a first candidate point, and using a local inflection point between the start point of the time segment and the first candidate point as a second candidate point, includes: Obtain the first connection between the start and end points of the time segment; Obtain the vertical distance from each data point in the time segment to the first connecting line, and determine the data point with the largest vertical distance as the first candidate point; Obtain the second line connecting the starting point and the first candidate point; Obtain the vertical distance from each data point between the starting point and the first candidate point to the second line, and determine the data point with the largest vertical distance as the second candidate point.
[0008] In some embodiments, before selecting the global inflection point in the time segment corresponding to any drainage event as the first candidate point, the method further includes: If the maximum water content of the drainage event is less than the first preset water content, the water content at the end of the drainage event is greater than the second preset water content, or the duration of the drainage event is less than the preset duration, the drainage event will be excluded as an interference event. The first preset moisture content and the second preset moisture content are both determined based on the maximum moisture content in the soil moisture content time series data at the depth corresponding to the drainage event, and the first preset moisture content is greater than the second preset moisture content.
[0009] In some embodiments, determining the target point corresponding to any drainage event from the first candidate point and the second candidate point based on the multidimensional features includes: The multidimensional features are input into the classification model to obtain the category labels corresponding to the first candidate point and the second candidate point output by the classification model. The target point is determined from the first candidate point and the second candidate point based on the category label; The multidimensional features include at least two of the following dimensions: Global attribute features used to characterize the overall duration of the drainage event and the magnitude of water content changes; Local attribute features used to characterize the relative time span and water content ratio of the first candidate point and the second candidate point in the time segment; Drainage rate features used to characterize the slope of the connection between the first candidate point and the second candidate point and the slope ratio of the time segment; This is used to characterize the temporal overlap of drainage events at different depths of the same detection device and the cross-depth collaborative features of the temporal distribution of the first and second candidate points.
[0010] In some embodiments, determining the field capacity of the soil to be tested based on the soil moisture content at the target point corresponding to each drainage event includes: Obtain the interquartile range of soil moisture content at multiple target points corresponding to the soil to be tested; Based on the interquartile range, abnormal water content in the soil moisture content is removed, and the remaining soil moisture content after removing the abnormal water content is taken as the effective water content. The value at a preset percentile of the effective water content is determined as the field water holding capacity of the soil to be tested; The preset percentile is determined based on the total number of samples with the effective water content.
[0011] Secondly, this application provides a field water holding capacity acquisition device, comprising: The identification module is used to identify multiple drainage events of the soil under test based on soil moisture content time series data; The candidate module is used to select the global turning point in the time segment corresponding to any drainage event as the first candidate point, and the local turning point between the start point of the time segment and the first candidate point as the second candidate point. The acquisition module is used to acquire multi-dimensional features of the first candidate point and the second candidate point, and determine the target point corresponding to any drainage event from the first candidate point and the second candidate point based on the multi-dimensional features. The target point is a candidate point belonging to the field water holding capacity point. The determination module is used to determine the field water holding capacity of the soil to be tested based on the soil moisture content at the target point corresponding to each drainage event.
[0012] Thirdly, embodiments of this application provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to implement the above-described method when executing the program through the computer program.
[0013] Fourthly, embodiments of this application provide a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method.
[0014] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0015] The field water holding capacity acquisition method and apparatus provided in this application can accurately locate key locations where the drainage rate slows down under different irrigation conditions by extracting global and local turning points within the time segment corresponding to the drainage event, thus solving the problem that a single threshold cannot capture dynamic changes. By combining multi-dimensional features to perform machine learning semantic discrimination on candidate points, it can effectively use logical constraints to eliminate false field water holding capacity points caused by factors such as insufficient irrigation, greatly enhancing the robustness of the model in real environments. By parametrically fitting and solving the soil moisture content of multiple target points, it can overcome the random errors of single observation data and achieve in-situ, high-precision dynamic acquisition of the field water holding capacity of the soil to be measured without manual sampling. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in this application or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is one of the flowcharts illustrating the method for obtaining field water holding capacity provided in the embodiments of this application.
[0018] Figure 2 This is the second flowchart illustrating the method for obtaining field water holding capacity provided in the embodiments of this application.
[0019] Figure 3 This is the third flowchart illustrating the method for obtaining field water holding capacity provided in this application embodiment.
[0020] Figure 4 This is a schematic diagram of the structure of BiLSTM provided in an embodiment of this application.
[0021] Figure 5 This is a schematic diagram of the structure of a multi-scale dilated convolutional network provided in an embodiment of this application.
[0022] Figure 6 This is a schematic diagram of the structure of a lightweight temporal Transformer network provided in an embodiment of this application.
[0023] Figure 7 This is a schematic diagram of the structure of a one-dimensional U-shaped network provided in an embodiment of this application.
[0024] Figure 8 The fourth flowchart illustrates the method for obtaining field water holding capacity provided in this application embodiment.
[0025] Figure 9 The fifth flowchart illustrates the method for obtaining field water holding capacity provided in this application embodiment.
[0026] Figure 10 A schematic diagram of a candidate point with sufficient irrigation provided in an embodiment of this application.
[0027] Figure 11 This is a schematic diagram of candidate points for insufficient irrigation provided in an embodiment of this application.
[0028] Figure 12 This is the sixth flowchart illustrating the method for obtaining field water holding capacity provided in the embodiments of this application.
[0029] Figure 13 This is one of the curves showing soil moisture content and time provided in the embodiments of this application.
[0030] Figure 14 The second graph showing soil moisture content versus time provided for embodiments of this application.
[0031] Figure 15 This is one of the schematic diagrams of a drainage event provided in the embodiments of this application.
[0032] Figure 16 This is the second schematic diagram of a drainage event provided in an embodiment of this application.
[0033] Figure 17 This is the third schematic diagram of a drainage event provided in the embodiments of this application.
[0034] Figure 18 The fourth illustration is a picture of a drainage event provided in the embodiments of this application.
[0035] Figure 19 This is a schematic diagram of the GroupKFold cross-validation confusion matrix of the XGBoost model provided in this embodiment of the application.
[0036] Figure 20 This is one of the schematic diagrams showing the results of an ablation experiment provided in an embodiment of this application.
[0037] Figure 21 The second schematic diagram shows the results of the ablation experiment provided in the embodiments of this application.
[0038] Figure 22 This is one of the device depth curves provided in the embodiments of this application.
[0039] Figure 23 The second device depth curve provided for the embodiments of this application.
[0040] Figure 24 This is a schematic diagram of the field water holding capacity acquisition device provided in the embodiments of this application.
[0041] Figure 25This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0042] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0043] It should be noted that the terms "first," "second," etc., used in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules is not necessarily limited to those steps or modules explicitly listed, but may include other steps or modules not explicitly listed or inherent to such processes, methods, products, or devices.
[0044] The field water holding capacity acquisition method provided in this application is applicable to terminals, which can be various electronic devices with a display screen and support web browsing, including servers, smartphones, tablets, laptops, and desktop computers.
[0045] Figure 1 This is one of the flowcharts illustrating the method for obtaining field water holding capacity provided in the embodiments of this application, such as... Figure 1 As shown, the method includes steps 110 to 140. These method steps are merely one possible implementation of this application.
[0046] Step 110: Identify multiple drainage events of the soil to be tested based on soil moisture content time series data.
[0047] Specifically, the execution subject of the field water holding capacity acquisition method provided in this application embodiment is a field water holding capacity acquisition device. This device can be a hardware device independently set in the terminal, or it can be a software program running in the terminal.
[0048] Field capacity (FC) refers to the maximum amount of water that soil can retain after it has been fully irrigated or saturated by rainfall, with gravity drainage essentially ceasing. It is an important parameter of soil moisture and plays a positive role in rational irrigation and agricultural water management in agricultural production. FC can provide a reference benchmark for irrigation timing for irrigation systems.
[0049] The detection device for obtaining soil moisture content time-series data in this application embodiment may include PGnH series sensors, and multiple PGnH series sensors can be used to obtain soil moisture content time-series data at different depths in the soil to be tested.
[0050] The PGnH series sensor is a high-precision instrument that integrates multiple parameters such as soil temperature and humidity, air temperature and humidity, and air pressure. It is used for precision irrigation and soil moisture monitoring in agricultural production. The sensor uses a high-frequency oscillation circuit to measure soil moisture, solving the problems of low accuracy and instability in previous sensors. The PGnH series sensor can monitor soil moisture at different depths. The number of measurement layers and depth can be adjusted according to the depth of crop roots, which allows the sensor to meet the needs of different soils and crops, thereby providing more accurate time-series data on soil moisture content.
[0051] To adapt to various crop growth stages and research needs, the PGnH series sensors allow users to freely set the sampling time interval. Regarding the sampling frequency, users can set it according to their own needs, generally sampling once every 2 hours, 1 hour, or half an hour. This high-frequency data acquisition capability enables the sensor to provide more detailed and real-time trends in soil moisture changes, helping agricultural producers to grasp the field moisture conditions in a timely manner and optimize irrigation decisions.
[0052] In addition, the PGnH series sensors have full network 4G wireless communication capabilities, which can upload collected information such as soil moisture, temperature, and humidity to the cloud in a timely manner for managers to view and analyze at any time. This is conducive to agricultural managers carrying out intelligent irrigation and fertilization work more conveniently, thereby promoting sustainable agricultural development and improving agricultural productivity.
[0053] Soil moisture content time series data refers to the sequence of soil volumetric moisture content continuously collected in chronological order by detection equipment deployed in the soil to be tested. It reflects the change process of soil moisture over time. Soil volumetric moisture content is also known as soil humidity. Drainage event refers to the time interval corresponding to the process of soil moisture content going from saturation to the basic end of gravity drainage after irrigation or rainfall. In time series data, it is represented by a waveform segment in which the moisture content first rises and then falls.
[0054] This application embodiment uses a bidirectional long short-term memory (BiLSTM) network to identify drainage events. Soil moisture content time-series data is input into the BiLSTM, and the BiLSTM outputs the event probability and event interval set for each time step. ,in, The start time of the event. The set represents the multiple drainage events extracted, with the event end time being the event end time.
[0055] The goal of this step is to select the intervals where drainage events may occur from the entire soil moisture time series data, significantly narrowing the scope of subsequent processing and reducing the impact of noise and background fluctuations on subsequent work.
[0056] Step 120: Take the global turning point in the time segment corresponding to any drainage event as the first candidate point, and take the local turning point between the starting point of the time segment and the first candidate point as the second candidate point.
[0057] Specifically, a time series segment refers to a continuous subsequence corresponding to a single drainage event extracted from a long-term soil moisture data series, and its time range is defined by the start and end times of that drainage event.
[0058] A global inflection point refers to the location in the time segment corresponding to a drainage event where the drainage rate changes most significantly from fast to slow. It usually corresponds to the knee point where the gravity drainage-dominated phase transitions to the slow water loss phase.
[0059] The starting point of a time series segment refers to the data point corresponding to the start time of the drainage event time series segment, that is, the critical position where the soil transitions from a saturated state to the gravity drainage stage after irrigation or rainfall ends.
[0060] A local inflection point refers to the location between the starting point of a time series segment and the first candidate point, where the drainage rate undergoes a secondary change. Its physical meaning varies depending on the degree of irrigation adequacy.
[0061] This step obtains a set of candidate points within the event based on the event interval and corresponding time segment of the drainage event. ,in, For the first The first drainage incident The time of candidate points The features of this candidate point.
[0062] Specifically, this step can use the Kneedle algorithm to extract candidate key points twice. The first step is to extract the global turning point on the line connecting the beginning and end of the time segment as the first candidate point. The second step is to extract the local turning point on the line connecting the starting point and the first candidate point as the second candidate point. The purpose of this step is to locate the position where the drainage rate suddenly slows down within the drainage event, so as to provide anchor points for subsequent semantic understanding and parameter calculation.
[0063] Step 130: Obtain the multidimensional features of the first candidate point and the second candidate point, and determine the target point corresponding to any drainage event from the first candidate point and the second candidate point based on the multidimensional features. The target point is a candidate point belonging to the field water holding capacity point.
[0064] Specifically, multidimensional features refer to a set of structured features used to comprehensively describe candidate points and their corresponding drainage event environments from at least two dimensions, such as overall attributes, local geometry, drainage rate changes, and cross-depth collaboration.
[0065] This step classifies and constrains the first and second candidate points, and uses classification models such as XGBoost to identify whether the first and second candidate points belong to the target point.
[0066] Specifically, the multidimensional features of the candidate points and their local context windows are input into XGBoost to obtain the set of candidate points with class labels output by XGBoost. ,in, The candidate point has a category label, which is used to determine whether the candidate point is a target point belonging to the field water holding capacity point. The candidate points include the first candidate point and the second candidate point. All candidate points can be input into XGBoost in parallel as needed, or they can be input independently.
[0067] The purpose of this step is to determine the candidate points as meaningful process nodes and to use logical constraints to eliminate false points, such as non-real points caused by insufficient irrigation, thereby enhancing robustness.
[0068] Step 140: Determine the field capacity of the soil to be tested based on the soil moisture content at the target point corresponding to each drainage event.
[0069] Specifically, in the fitting stage, robust fitting is used to realize the in-situ dynamic calculation of FC parameters. The input is the target point and the soil moisture content time series data at the corresponding detection depth of the detection device; the output is the estimated field water holding capacity of the soil at that depth.
[0070] The goal of this step is to parametrically fit and constrain soil moisture dynamics based on key moments and long-term variation patterns during drainage events, obtaining interpretable and reusable FC-related parameters for subsequent use in determining irrigation thresholds, assessing deficit levels, and implementing precision irrigation.
[0071] Figure 2 This is the second flowchart illustrating the field water holding capacity acquisition method provided in this application embodiment. Key points are also candidate points; key point A is the first candidate point, key point B is the second candidate point, the event is a drainage event, and key point discrimination is the determination of the target point. Figure 2 As shown, this application embodiment constructs a monitoring, localization, discrimination, and fitting process. In the monitoring stage, BiLSTM is used to identify drainage events; in the localization stage, the Kneedle algorithm is used to extract candidate points twice; in the discrimination stage, XGBoost is used to complete the semantic classification of candidate points; in the fitting stage, robust fitting is used to realize in-situ dynamic calculation of FC parameters, which can filter the time segment corresponding to the drainage event in the long sequence, significantly narrowing the scope of subsequent processing; within the time segment, key change positions are further located and semantic discrimination is performed, and finally, the event process is parametrically fitted to output the field water holding capacity value for agricultural applications. This method improves interpretability and engineering deployability while ensuring accuracy.
[0072] The field water holding capacity acquisition method provided in this application can accurately locate key locations where the drainage rate slows down under different irrigation conditions by extracting global and local turning points within the time segment corresponding to the drainage event, thus solving the problem that a single threshold cannot capture dynamic changes. By combining multi-dimensional features to perform machine learning semantic discrimination on candidate points, it can effectively use logical constraints to eliminate false field water holding capacity points caused by factors such as insufficient irrigation, greatly enhancing the robustness of the model in real-world environments. By parametrically fitting and solving the soil moisture content of multiple target points, it can overcome the random errors of single observation data and achieve in-situ, high-precision dynamic acquisition of the field water holding capacity of the soil to be measured without manual sampling.
[0073] It should be noted that each implementation method of this application can be freely combined, rearranged, or executed individually, and does not need to rely on or depend on a fixed execution order.
[0074] In some embodiments, step 110 includes: The original soil moisture content, event start information, and event end information of the soil moisture time series data are concatenated to construct the combined input features of the time series. Extract the probability of drainage events corresponding to the combined input features at each time step; Aggregating consecutive time periods where the probability of a drainage event is greater than a preset probability threshold yields a drainage event.
[0075] Specifically, the soil moisture content time series data of the soil to be tested is non-stationary and has obvious changing trends due to interference from rainfall, irrigation, evapotranspiration and noise from the testing equipment. When performing point-by-point regression or end-to-end identification on the entire soil moisture content time series data, the classification model used to extract the probability of occurrence must learn how to distinguish between background fluctuations and the actual drainage event patterns. This is a challenge for the model and makes it difficult to obtain meaningful results. Therefore, this embodiment proposes an event-driven time series analysis method, which divides the task into two stages: event detection and event parsing, thereby enabling the automatic generation of structured drainage event information from the raw data.
[0076] Define the time series data of soil moisture content at a certain measurement depth using a certain detection device. for: ,in, This represents the serial number of the testing equipment. Represents the depth measurement. It is the sampling time. This is the original water content at the time of sampling. This represents the total number of sampling points in the soil moisture content time series data. The time series includes several drainage events triggered by irrigation or rainfall. Here, the first... Secondary drainage incident Represented as: ,in, It is the sampling time number. and These are the start and end indices of the drainage event, respectively.
[0077] To enhance the robustness of subsequent drainage event detection, the following data preprocessing operations were performed on the soil moisture content time-series data at different depths: Unified temporal resolution resampling: All soil moisture content time-series data were uniformly resampled to a 2-hour time step to mitigate time scale issues caused by varying sampling rates between different detection devices; Missing value handling: For smaller gaps, linear interpolation was used to fill them based on time; For longer gaps exceeding the upper limit, values were taken forward and backward to ensure continuity; Outlier detection and imputation: The 3σ criterion was used to identify abnormal peaks or abrupt changes in the soil moisture content time-series data, i.e.: ,in, and These represent the mean and standard deviation, respectively. It is a moment For soil moisture content, outliers are set to null values before time interpolation and boundary filling to eliminate the impact of sudden anomalies on the sequence. For smoothing and noise reduction, the main algorithm uses Savitzky-Golay filtering for time series smoothing with a window length of 11 and a third-order polynomial. This effectively suppresses high-frequency random noise while preserving the overall low-frequency variation trend of the soil moisture content time series data. For special scenarios where the soil moisture content time series data is too short or the filtering fails, a fallback mechanism is set up to automatically switch to a 5-window center-moving mean filter to ensure the robustness of the preprocessing process. For normalization, the cleaned and smoothed one-dimensional time series is normalized using Min-Max. To make it fall within the range [0,1], the transformation formula is: in, and These are the minimum and maximum values in the current soil moisture content time series data, respectively. Normalization can eliminate the influence of different data units caused by different detection equipment and different soil depths, improve the contrast between samples, and help the subsequent classification model training to converge faster and more stably.
[0078] On a graph of soil moisture content versus time, drainage events following each irrigation or rainfall can be marked, including points in the event and the starting point of the event. Figure 3 This is the third flowchart illustrating the method for obtaining field water holding capacity provided in this application embodiment, as shown below. Figure 3 As shown, relevant information about drainage events can be recorded.
[0079] In the model inference and event extraction stages, when constructing combined input features, the event start-up prompt information refers to auxiliary feature channel data used to characterize a sharp increase in soil moisture content, indicating the possible start of irrigation or rainfall; the event end-of-event prompt information refers to auxiliary feature channel data used to characterize the rate of change in moisture content approaching a plateau, indicating the end of gravity drainage. The combined input features adopt a three-channel format, consisting of the original moisture content values from the soil moisture time series data. Event start prompt information and event end notification message The concatenation is recorded as a combined input feature. , denoted as: This method allows the model to learn continuous water dynamics while enhancing its sensitivity to morphological changes near the start and end of drainage events using boundary cues.
[0080] The monitoring of drainage events aims to automatically extract drainage events following irrigation or rainfall from continuous soil moisture content time-series data and output time-series segments of these events. This embodiment models this task as a sequence labeling problem and uses a trained deep learning model to extract probabilities time-by-time: given a combined input feature sequence of length T and feature dimension C. The model outputs time-series logits. The probability sequence of drainage events is obtained by using the sigmoid function. : Where t is the time step index, logical value The probability value after being mapped by the activation function.
[0081] After the model outputs the probability sequence of drainage events at each time point, it performs thresholding and connected segment aggregation. A preset probability threshold τ = 0.5 is set to obtain a binary sequence. : Where I represents an indicator function that groups consecutive 1s into a single event segment. While suppressing unnecessary detections caused by small-amplitude signals generated by noise, a minimum event length constraint L is set. min =3, where L min To determine the minimum allowed event time period length, only events with a time period length greater than or equal to 3 are aggregated to obtain the final drainage event set. .
[0082] It should be noted that the training and selection process of the classification model used to extract the probability of occurrence is as follows: To ensure temporal consistency, after reading and cleaning the files, the collection time is converted into a timestamp and then sorted in ascending order of time. Because the sequence length in a file is relatively long and the frequency of drainage events is low, this embodiment uses a sliding window method to truncate long sequences during model training to obtain several shorter sequences as a set of training sample pairs (x(n), y(n)). The window size is L=256 and the step size is s=64, i.e.: ,in, It is the first At the start of each window, this sampling method increases the number of samples while preserving the local event pattern, and utilizes overlapping windows to enhance the coverage of event edges, thereby improving the learning effect on short-term events and their surrounding areas. To examine the model's generalization ability to unseen files, all target files that meet the conditions are randomly shuffled and proportionally divided into training and test sets, with a training ratio of 0.8. During training, only training files are used to generate window samples to avoid information leakage due to window overlap. Combined input features are standardized to reduce the impact of differences in file scales. The standardized parameters μ and σ are fitted only on the training set samples and reused in test set evaluation and full sequence inference. ,in, The original combined input features, These are the standardized combined input features.
[0083] In extracting probabilities, this embodiment uses four typical sequence labeling models as candidate architectures. Figure 4 This is a schematic diagram of the BiLSTM structure provided in an embodiment of this application. Figure 5 This is a schematic diagram of the structure of the multi-scale dilated convolutional network provided in the embodiments of this application. Figure 6 This is a schematic diagram of the structure of a lightweight temporal Transformer network provided in an embodiment of this application. Figure 7 This is a schematic diagram of the structure of a one-dimensional U-shaped network provided in an embodiment of this application. Figures 4 to 7 The number of substructures in the structure is only an example, such as Figures 4 to 7 As shown, BiLSTM captures contextual dependencies, outputs the hidden state at each time step, and maps it to a logistic value through a linear layer, which is beneficial for utilizing the trend differences before and after an event and recovering the pattern. The multi-scale dilated convolutional network (TCN) uses multiple layers of dilated residual blocks stacked together, with the dilation rate increasing exponentially to expand the receptive field, and finally uses 1×1 convolution to obtain the occurrence probability. The lightweight temporal transformer network uses sinusoidal position encoding and encoder to learn long-distance relationships and applies causal masks to prevent information leakage. The one-dimensional U-Net (1D U-Net) uses encoder-decoder and skip connections to fuse multi-scale temporal information, and uses linear interpolation to make the output consistent with the original time length. By training the above four candidate architectures respectively and calculating the loss on the validation set, the architecture with the smallest loss on the validation set is finally selected as the sequence labeling model used in this embodiment.
[0084] For the training process of candidate architectures, event monitoring is a time-by-time binary classification sequence labeling problem, and the supervision signal is manually labeled drainage event labels. in, The duration is For the real event label sequence, this embodiment uses binary cross-entropy loss with logits (BCEWithLogitsLoss) as the loss function to optimize the model. As shown below: ; in, Let be the category of the real event label at time step t. The model uses a sigmoid function, the optimizer is Adam, the learning rate is 1×10^-3, the batch size is 32, and the number of training epochs is 30. The optimal weights are saved based on minimizing the validation loss (Val Loss).
[0085] To better evaluate the model's performance in event monitoring, the model was evaluated at both the point and event levels, including calculating Val Loss, point-level classification accuracy MicroAcc, in-event accuracy EventAcc(in), and crossover ratio (CRR). Pair up: Here, A and B represent the prediction time interval and the actual event interval, respectively, thus obtaining event-level Precision, Recall, F1, and the average boundary matching degree mIoU, preventing problems caused by only looking at point-level accuracy.
[0086] Specifically, Val Loss is calculated on the validation set using the BCE loss, which is used to select the model and determine whether it has converged; MicroAcc is calculated by converting the probability into binary predictions and then calculating the classification accuracy at each time step to measure the recognition performance of the entire sequence for each point; EventAcc(in) is calculated by averaging the prediction accuracy of each point within the real event interval, using the interval as the unit, to represent the robustness of detection within the event; and mIoU is calculated by averaging the IoU for each pair of successfully matched events to evaluate the degree of matching at the event boundary.
[0087] The field water holding capacity acquisition method provided in this application significantly enhances the sensitivity of the sequence labeling model to changes in the morphology of the start and end boundaries of drainage events by constructing a combined input feature by splicing the original water content value with the event start and end prompt information. By extracting probabilities time-by-time and using thresholding and minimum length constraints for time-time aggregation, background random fluctuations and extremely short noise can be effectively filtered out, thereby extracting structured drainage events from non-stationary soil water content time-series data with high robustness and high accuracy.
[0088] In some embodiments, prior to step 120, the following is included: If the maximum water content of a drainage event is less than the first preset water content, the water content at the end of the drainage event is greater than the second preset water content, or the duration of the drainage event is less than the preset duration, the drainage event will be excluded as an interference event. The first preset moisture content and the second preset moisture content are both determined based on the maximum moisture content in the time series data of soil moisture content at the depth corresponding to the drainage event, and the first preset moisture content is greater than the second preset moisture content.
[0089] Step 120 includes: Obtain the first connection between the start and end points of the time sequence segment; Obtain the vertical distance from each data point in the time segment to the first connecting line, and determine the data point with the largest vertical distance as the first candidate point; Obtain the second line connecting the starting point and the first candidate point; Obtain the vertical distance from each data point between the starting point and the first candidate point to the second line, and determine the data point with the largest vertical distance as the second candidate point.
[0090] Specifically, Figure 8 This is the fourth flowchart illustrating the method for obtaining field water holding capacity provided in this application embodiment. Point A in the diagram is the first candidate point, and point B is the second candidate point. Figure 8 As shown, due to the varying quality of generated drainage events, some drainage events may lack readily available field capacity points. Therefore, it is necessary to screen drainage events before extracting candidate points. This embodiment sets the following three screening rules to eliminate interfering events: R1: If the maximum water content of the drainage event is less than the first preset water content, then the drainage event is determined to be an interference event and is removed. The first preset water content is 70% of the maximum water content in the time series data of soil water content at the corresponding depth of the drainage event collected by the same detection equipment.
[0091] R2: If the moisture content at the end of the drainage event is greater than the second preset moisture content, then the drainage event is determined to be an interfering event and is discarded. The second preset moisture content is defined as 95% of the maximum moisture content among the time-series soil moisture data at the corresponding depth collected by the same detection equipment for that drainage event. R3: If the duration of a drainage event is less than the preset duration, the drainage event is determined to be an interference event and is removed. The preset duration is 12 hours. The aforementioned preset ratios of 70% and 95% and the preset duration of 12 hours are all optimal empirical values set based on a large amount of historical field experimental data and the experience of experts in the field.
[0092] Table 1 contains statistics on the relevant information for each rule, as shown in Table 1 below: Table 1 Event Filtering Rules
[0093] After filtering using the R1, R2, and R3 rules, a dataset of drainage events is obtained after removing interfering events. Then, the candidate point extraction stage within the event is entered. The goal is to find candidate points during the occurrence of each drainage event by analyzing the time series and to provide information such as their location and value.
[0094] The input for this stage is: event data, which is continuous, numerical data representing the temporal development of a drainage event; and event intervals, which assign start and end times to each drainage event to obtain information within the effective time period of the drainage event. The output is a set of candidate points to be labeled. : ;in Indicates the first The first drainage incident timestamps of candidate points It provides the numerical value at that moment and can also output a visual image of the drainage event, generating an image for each drainage event and marking important locations, which plays a role in manual review and subsequent work.
[0095] At this stage, this embodiment uses a method similar to Kneedle detection, transforming the complex calculus problem of finding the maximum curvature into finding the maximum perpendicular distance between the normalized data point and the line connecting the two ends. This allows for the identification of geometric abrupt changes in the curve within noisy and unstable data. For each time segment, the following two candidate points are extracted: First candidate point: The line connecting the start point to the end point of the event within the time segment corresponding to the drainage event is taken as the first line. The data point with the largest vertical distance to the first line in the time segment is the position with the largest change in the entire drainage event, and this data point is taken as the first candidate point.
[0096] Second candidate point: The line connecting the starting point of the event within the time segment corresponding to the drainage event and the first candidate point is taken as the second line. The data point with the largest vertical distance from the starting point and the first candidate point to the second line is the point with the largest change in the early stage of the drainage event, and this data point is taken as the second candidate point.
[0097] The following geometric formula was used to calculate the coordinates of the above candidate points: Point-to-line distance formula: ,in For the data points to be determined, and These are the two endpoints of the line.
[0098] Linear interpolation formula: This formula is used to calculate points. Corresponding line value The vertical distance is calculated based on the coordinates of the candidate points.
[0099] The field water holding capacity acquisition method provided in this application can effectively avoid interference from invalid or low-quality data to subsequent analysis by setting rules to eliminate interfering events; by using the geometric catastrophe algorithm twice to extract global and local turning points, it can accurately lock the candidate positions where the drainage rate changes significantly, thereby providing reliable data anchors for field water holding capacity discrimination in complex environments.
[0100] In some embodiments, step 130 includes: By inputting multidimensional features into the classification model, the class labels corresponding to the first and second candidate points output by the classification model are obtained. The target point is determined from the first and second candidate points based on the category label; Multidimensional features include at least two of the following dimensions: Global attribute features used to characterize the overall duration of a drainage event and the magnitude of changes in water content; Local attribute features used to characterize the relative time span and water content ratio of the first and second candidate points in the time segment; Drainage rate features used to characterize the slope of the connection between the first candidate point and the second candidate point and the slope ratio of the time segment; Cross-depth collaborative features used to characterize the temporal overlap of drainage events at different depths of the same detection equipment and the temporal distribution of the first and second candidate points.
[0101] Step 140 includes: Obtain the interquartile range of soil moisture content at multiple target points corresponding to the soil to be tested; Abnormal soil moisture content is removed based on interquartile range, and the remaining soil moisture content after removing abnormal moisture content is taken as the effective moisture content. The value at the preset percentile of the effective water content is determined as the field water holding capacity of the soil to be tested; The preset percentile is determined based on the total number of samples with effective water content.
[0102] Specifically, Figure 9 The fifth flowchart illustrates the method for obtaining field water holding capacity provided in this application embodiment. An irrigation event is a drainage event triggered by irrigation, such as... Figure 9As shown, this embodiment will split the semantic classification and parameter value fitting of candidate points into two connected tasks. The first subtask uses a machine learning classifier to identify the identity of all candidate points in each drainage event. Based on this, the second subtask performs robust aggregation of different FC observation results at the same detection device location to obtain the predicted soil field water holding capacity corresponding to each pair of devices and depths.
[0103] Specifically, each drainage event corresponds to a first candidate point and a second candidate point. However, the location of these candidate points may not directly reflect the actual physical meaning of soil moisture. Therefore, it is necessary to use a classification model to determine which one is the real FC point, i.e. the target point. The determination of the target point is relatively complex, and its complexity stems from the difference in irrigation sufficiency.
[0104] Figure 10 This is a schematic diagram of a candidate point with sufficient irrigation provided in an embodiment of this application. Figure 11 This is a schematic diagram of candidate points for insufficient irrigation provided in the embodiments of this application, as shown below. Figure 10 and Figure 11 As shown, in drainage events caused by sufficient irrigation, there is a distinct gravity drainage segment where the drainage rate suddenly decreases near field capacity. In this case, the first candidate point A is the true FC point. However, in drainage events caused by insufficient irrigation, the drainage curve also shows a rate change. But this rate change is only a process of natural consumption of a small amount of water rather than a change in field capacity. In this case, the second candidate point B is closer to the actual field capacity, and the significance of the first candidate point has changed. Therefore, a single geometric feature cannot effectively distinguish between these two situations, and multidimensional features need to be combined for identification.
[0105] This embodiment models target point identification as a binary classification task, given a drainage event. and its extracted candidate point set { , In the case of}, the classifier needs to do the following: ,in, As the first candidate point, As the second candidate point, Number the drainage incident. To the drainage incident Extracted from d Multidimensional feature vectors, i.e., multidimensional features. For the output category labels, =0 indicates that the second candidate point is the target point. =1 indicates that the first candidate point is the target point.
[0106] The performance of a classification model is determined by the ability of its multidimensional input features to represent the target task. Based on this, and using abrupt changes in drainage rate as the primary physical characteristic of field water holding capacity, this embodiment proposes four types of features totaling 38 dimensions to describe the curve shape of drainage events, ranging from coarse to fine, and from a single level to a combination of multiple levels, providing the classification model with more layers of distinguishing criteria: (1) Global attribute features, belonging to the Event Features (EF) category, have 9 dimensions: They reflect the overall properties of a drainage event, such as event duration, maximum water content, initial value, termination value, overall reduction, and the location of the detection equipment. Among these, the ratio of the maximum value of the soil moisture content in the time series data of the drainage event to its maximum value in the entire sequence is an important indicator used to determine whether the irrigation that triggered the drainage event was sufficient. The larger this ratio is, the more sufficient the irrigation was, and the more likely the soil moisture content is to reach or exceed the field capacity. In this case, the first candidate point is more likely to be the real FC point. The depth of the location of the detection equipment contains certain land information. Different soil layers have different textures and water holding capacities, so their drainage methods are also different.
[0107] (2) Local attribute features, belonging to the candidate point geometric position and value (Point Features, PF) category, have 15 dimensions: used to characterize the position of the selected candidate points in the drainage event and their properties, which is the highest dimension feature type. The time distance between candidate points, such as ARP, takes a value from 0 to 1, indicating the proportion of the main turning point. When irrigation is sufficient, gravity drainage lasts for a long time, so the first candidate point appears later and the ARP is larger; while when irrigation is insufficient, it quickly enters the slow descent phase, so the first candidate point appears earlier. The ratio of water content of each point to its maximum value, such as AVR, reflects the water content at the turning point. The water content difference between two adjacent candidate points, VBA, measures the height difference between each drainage segment. In addition, BEX indicates whether the candidate point exists, providing the model with information on the completeness of the event morphology.
[0108] (3) Drainage rate characteristics, which belong to the segmented drainage rate change (Rate Features, RF) category, have 11 dimensions: the group most closely related to the physical nature of the field water holding capacity point. The field water holding capacity point is the point on the drainage curve where the drainage rate suddenly changes. In this embodiment, the average slope between two adjacent candidate points is used to characterize it. For example, S_BA is the average drainage rate from point B to point A. Point B is the second candidate point and point A is the first candidate point. The ratio of the slopes of the two parts before and after the point B, SRF, can reflect the degree of speed change. That is, the larger the value, the greater the difference in drainage speed before and after point B. The local slope LSA at each candidate point is obtained by linear fitting of ±5 data points near the point, which can obtain a more accurate drainage speed at the moment of drainage.
[0109] (4) Cross-Depth Features (CDF) are 3-dimensional features. A very important physical constraint is adopted: under the same drainage event caused by rainfall or irrigation, the sensors at different depths of the same device should reach the field capacity at approximately the same time. Therefore, in this embodiment, drainage events that have occurred at other depth sensors of the device are searched within 24 hours before and after the current drainage event to obtain the number of nearby events, the average position of point A relative to the event, and the average duration of the event. If the position of the FC candidate point of a drainage event at a certain depth has the same trend as the same timestamp depth on other devices, then the judgment is more reliable. The CDF class adds cross-sensor cooperation information that cannot be obtained by considering a drainage event alone, overcoming the disadvantage of generalization.
[0110] In terms of training and selecting classification models, in order to systematically compare the performance of different types of learners on the field water holding capacity point classification task, this embodiment selects the following four representative machine learning classification models as candidates: Logistic Regression (LR), as a linear baseline model, assesses the degree of linear separability in a feature space. Its main hyperparameter is the maximum number of iterations, T. max =2000.
[0111] Random Forest (RF) reduces variance by ensemble voting across multiple decision trees. Its main hyperparameters are the number of decision trees (Nest = 200) and the maximum tree depth (D). max =10.
[0112] XGBoost, through a gradient boosting framework, progressively fits the residuals and excels at handling nonlinear interactions between features. Its main hyperparameters are the number of iterations (Nest=200) and the maximum tree depth (D). max=5, learning rate η=0.1, log loss EvalMetric=logloss.
[0113] Support Vector Machine (SVM) maps data to a high-dimensional space through the radial basis function (RBF) to find the optimal decision boundary. The main hyperparameter is the radial basis kernel (kernel=rbf), and probability estimation is enabled (probability=True).
[0114] For LR and SVM that require standardization, the standardization steps are encapsulated with the classifier as a pipeline to ensure that the standardized parameters are estimated only from training trade-offs, thus avoiding information leakage.
[0115] The main hyperparameter settings for each model are shown in Table 3: Table 3 Classification Model and Hyperparameter Configuration
[0116] For the selection of cross-validation method, the GroupKFold (k=5) method based on device grouping was used.
[0117] Given a dataset ,in It is an eigenvector. It is a class tag. It is a sample If the device number is assigned to a device, GroupKFold will randomly divide all devices into k=5 disjoint subsets. The verification set of the kth fold Defined as: The training set is defined as: This ensures that there are no samples from the same device in the training and validation sets. This is because multiple drainage events on the same device have the same soil type, installation status, and detection device attributes. If a drainage event can appear in the training set while another drainage event from the same device appears in the validation set, the model may remember device-specific features instead of learning general classification rules about field capacity points, thus obtaining a higher validation score. GroupKFold avoids data leakage between devices, thereby making cross-validation more fairly evaluate the model's performance on unseen devices.
[0118] For binary classification problems, based on true positives (TP), false positives (FP), true negatives (TN), and false negatives (FN), three mutually exclusive evaluation criteria are used: F1 score, which is the harmonic average of the two, achieving a balance between precision and recall, and is an important standard for comprehensively evaluating classification performance; accuracy, which measures the overall classification correctness; and AUC, which measures the model's ranking ability at different classification thresholds. Finally, the model with the best evaluation performance is selected as the final classification model.
[0119] The classification model addresses the question of which candidate point is the field capacity (FC) point. In practical applications, we need the field capacity value at the corresponding depth for each detection device. After the classification model finds the FC point in a drainage event, it can obtain the soil moisture content corresponding to this FC point, which is a field capacity observation. However, the FC values observed by the same detection device under different drainage events are different, for two reasons: insufficient irrigation may cause the water content corresponding to the inflection point on the drainage curve to be lower than the true FC; the impact of the installation or reinstallation of the detection device on the soil may cause the soil moisture to be too high at certain times. Since the true FC is a characteristic of the soil itself, it should be consistent at the same location and depth. Therefore, it is necessary to further fit the obtained FC to the field capacity and obtain a more accurate and true FC among multiple noisy observation results.
[0120] Based on the characteristics of the two types of interference mentioned above, this embodiment proposes a two-step robust estimation method that first removes high-order interference and then selects high-order interference.
[0121] Figure 12 This is the sixth flowchart illustrating the method for obtaining field water holding capacity provided in this application embodiment, as shown below. Figure 12 As shown, the interquartile range (IQR) method is used to remove excessively high outliers. The first quartile (Q1) and third quartile (Q3) of all soil moisture content are calculated. Soil moisture content above the upper limit (Q3 + 1.5 × (Q3 - Q1)) is considered as an artifact of the detection equipment installation and is discarded as anomaly. The remaining soil moisture content is taken as the effective moisture content. After removing the outlier, the higher percentile of the remaining effective moisture content is taken as the estimated field capacity (FC). The higher percentile is chosen instead of the median because drainage events caused by insufficient irrigation are more common than those caused by excessive irrigation, which will lead to a smaller overall value. The median will be lowered by these small values. The 75th percentile is closer to the actual FC location. When the total number of samples is small, the percentile can be appropriately lowered to reduce the impact of extreme values in small samples. Therefore, the preset percentile can be set according to the total number of samples.
[0122] For example, the effective water content set after removing abnormal water content at a certain depth from the soil moisture content measured by a certain testing device is: The total number of samples with effective water content is Then its estimated field water holding capacity The calculation formula is as follows: ; in, This represents the 75th percentile. This represents the 70th percentile, and median is the median.
[0123] To characterize the reliability of the estimation results, within an effective sample size... and coefficient of variation Based on this, a confidence level is assigned to each estimate, where The standard deviation of effective water content, when ≥10 and A value <0.10 is considered high confidence, indicating that there are sufficient consistent observations to support the position; when ≥5 and A value less than 0.20 is considered a medium confidence level; all other values are considered low confidence levels, indicating that the estimated value may need further confirmation through field verification.
[0124] The field water holding capacity acquisition method provided in this application combines multi-dimensional features such as global, local, rate, and depth-crossing features to perform machine learning semantic discrimination on candidate points, which can effectively overcome the interference caused by differences in irrigation conditions and accurately identify the real physical turning points. By introducing a robust fitting strategy that removes outliers by introducing interquartile range and dynamically and adaptively extracts preset percentiles based on the total number of samples, it can effectively eliminate environmental interference from detection equipment and single observation errors, thereby achieving high-precision and highly robust in-situ dynamic acquisition of soil field water holding capacity in a field environment.
[0125] In some embodiments, the effectiveness of the field water holding capacity acquisition method provided in this application is demonstrated by the following experimental data. Most of the experimental data used in this embodiment comes from single-clove garlic experimental fields in Dali Bai Autonomous Prefecture and Lijiang City, Yunnan Province. Soil moisture content time series data at multiple depths are collected by installing PGnH series soil moisture IoT sensors. The sensor monitoring depths are 10 cm, 20 cm, 30 cm, 40 cm and 50 cm. The sampling interval is generally between 0.5 and 2 hours. The recording time of each detection device is between 3 and 5 months. However, since the sampling interval, missing degree and noise level are different between each detection device, in order to facilitate subsequent event detection work, we performed the same preprocessing operation on each detection device and depth combination and output time series data with consistent structure.
[0126] After preprocessing such as time alignment, outlier removal, missing value imputation, and smoothing and noise reduction, a dataset containing 554 valid drainage events was obtained using manual annotation. The number of events in the two categories of sufficient irrigation and insufficient irrigation is basically the same, with a ratio of 281:273, which can be used for subsequent training and testing.
[0127] This embodiment uses Python 3.9 and leverages PyTorch, Scikit-learn, and XGBoost for model building. The hardware configuration is an Intel Core i7-12700H CPU, 32 GB of RAM, and an NVIDIA GeForce GTX 1650 Ti graphics card. Model training is GPU-accelerated, and device-level grouping (GroupKFold, k=5) is used for cross-validation during training to prevent data leakage between devices. The model optimizer uses Adam with a learning rate of 1×10⁻⁶. -3 The batch size was 32, the training epochs were 30, and the lowest loss in the validation set was used as the criterion for the final selection of the model.
[0128] For the multiple steps of field water holding capacity identification, monitoring, location, discrimination, and fitting, multi-level evaluation criteria were formulated. The algorithm was comprehensively evaluated in all aspects of drainage event detection, candidate point selection, candidate point semantic classification, and field water holding capacity numerical fitting. The main evaluation indicators for each part are shown in Table 4. Table 4. Core Evaluation Indicators for Water Holding Capacity Identification at Multiple Stages
[0129] First, four sequence labeling models were selected as candidate architectures. Table 5 shows the comparison of the results of the four models on the validation set under the same training and test set partitioning, input features, and subsequent processing methods. Table 5 Performance comparison of different models on the validation set
[0130] In terms of overall performance, BiLSTM is the best in several key metrics: it has the lowest Val Loss, the highest MicroAcc and EventACC(in), and the highest event-level Precision, Recall, F1, and mIoU, indicating that it performs more stably in event detection and boundary overlap. In comparison, TCN's event-level F1 is 0.7275, Transformer's is 0.7426, and 1DU-Net's is 0.7070, all of which are lower than BiLSTM. Moreover, the corresponding Val Loss is higher and the MicroAcc is lower. Considering the detection accuracy, convergence stability, and reliability of subsequent system deployment, this embodiment selects BiLSTM as the final application model in the event monitoring stage, and uses its output event segments as the input constraint range for candidate point extraction and semantic discrimination. Figure 13 This is one of the soil moisture content versus time curves provided in the embodiments of this application. Figure 14 This is the second graph of soil moisture content versus time provided in the embodiments of this application. Irrigation data events are drainage events caused by irrigation, and predicted events are drainage events predicted by the model, such as... Figure 13 and Figure 14 As shown, the predictions of the BiLSTM model are basically consistent with the results of manual annotation, proving that the BiLSTM has a good effect on drainage event recognition.
[0131] After identifying drainage events, it is necessary to remove interfering events. R1 is used to remove drainage events with a magnitude less than 70% of the maximum moisture content in the soil moisture time series data; R2 is used to remove drainage events with an end value greater than 95% of the maximum moisture content in the soil moisture time series data; and R3 is used to remove drainage events with a duration of less than 12 hours. The effective drainage events obtained account for approximately 78%. The drainage events that are removed are all noise events that have no actual significance for identifying field points, such as small-scale water changes caused by micro-irrigation or short-term rainfall. This step can greatly speed up the extraction of candidate points and improve accuracy, while reducing the impact of unnecessary noise on the extraction results.
[0132] Using manually labeled real field points as a reference standard, the accuracy of the first candidate point A and the second candidate point B obtained by the Kneedle algorithm was analyzed. The results show that the average time deviation of the candidate points is 2.1 hours, and the average deviation of the water content value is 1.2% vol. This indicates that this method can effectively identify the location of rate changes on the drainage curve, which is beneficial to subsequent semantic classification. At the same time, the error of point A is smaller than that of point B because point A is the point of greatest curvature on the entire drainage curve, marking the process of soil moisture changing from fast gravity drainage to slow evaporation, which is more obvious. Point B is a local curvature point in the early stage of the drainage event. Due to the large water change in the early stage of irrigation and the influence of instantaneous noise of the detection equipment, the recognition rate of point B is lower, but the overall error is still within an acceptable range.
[0133] To facilitate subsequent manual annotation and analysis, an image is generated for each drainage event during this process. Figure 15 This is one of the schematic diagrams of a drainage event provided in an embodiment of this application. Figure 16 This is the second schematic diagram of a drainage event provided in an embodiment of this application. Figure 17 The third illustration is a picture of a drainage event provided in the embodiments of this application. Figure 18 The fourth illustration of a drainage event provided in the embodiments of this application is shown below. Figures 15 to 18 As shown, the drainage event image contains the following: the original timeline of the drainage event, the start point of the event, the end point of the event, candidate points A and B, the line connecting the start point to the end point of the event, and the line connecting the start point to point A.
[0134] This embodiment utilizes the geometric principles of the Kneedle algorithm, simplifying the complex calculus curvature calculation into a simple point-to-line segment distance calculation. This solves the problem of finding suitable candidate points due to the large noise in soil moisture time series data and the diverse curve shapes. Moreover, it can obtain global and local feature points in a hierarchical manner, which is beneficial for further determining whether it is an FC point under conditions of sufficient or insufficient irrigation. Compared with the traditional method of taking only one inflection point, it is more in line with the complex rainfall situation in farmland.
[0135] All candidate points were saved to a CSV file, and the FC point in each drainage event was labeled as a candidate point on the visualization image. The labeled dataset contains 554 real events manually labeled, with roughly equal numbers of samples in the two classes (281:273). Table 6 summarizes the relevant information for this data. Table 6 Basic Information of the FC Classification Dataset
[0136] Table 7 lists the results (mean ± standard deviation) of GroupKFold cross-validation for the four models based on 38-dimensional features. As shown in Table 7, XGBoost leads in all three metrics, with the smallest mean ± standard deviation of AUC, indicating that this model is consistent across different device groups. RF ranks second, and LR ranks third, which means that even nonlinear models can learn some discriminative ability. This also shows that the multidimensional features we extracted have a certain effect. SVM is the worst and has a large standard deviation, which varies greatly across different device groups. This may be because the RBF kernel is more sensitive to noise in the high-dimensional sparse feature space.
[0137] Table 7. Cross-validation results of the GroupKFold classification model (k=5)
[0138] Figure 19 This is a schematic diagram of the GroupKFold cross-validation confusion matrix of the XGBoost model provided in this application embodiment. The True label is the true label, and the Predicted label is the predicted label. Figure 19 As shown, this matrix is obtained by summarizing the results obtained from the test set at each fold using cross_val_predict. Therefore, the predicted value corresponding to each sample is based on the prediction made by the model excluding the device where the sample is located, which better reflects the generalization ability. In this confusion matrix, the misclassification of samples of the two categories is roughly the same, indicating that the model does not have a significant preference for samples of one category, and the classification is relatively fair.
[0139] To quantify the impact of the four types of features on the classifier, an ablation experiment was conducted. Based on all 38 features, each group of features was removed sequentially for comparison, and each type of feature was used for prediction alone. Other conditions were the same as the XGBoost model parameters and GroupKFold (k=5) cross-validation method in the previous section. The results were evaluated using the F1 score.
[0140] Figure 20 This is one of the schematic diagrams showing the results of an ablation experiment provided in an embodiment of this application. Figure 21 This is the second schematic diagram of the ablation experiment results provided in the embodiments of this application. Table 8 summarizes the results of the ablation experiment.
[0141] Table 8 Ablation Experiment Results
[0142] According to Table 8, Figure 20 and Figure 21It can be seen that removing the RF class has the greatest impact on the F1 score of the model, indicating that the way the drainage rate changes is the main feature for judging the field water holding capacity. Removing the PF class will reduce the F1 score by 0.025, ranking second among all removed classes, indicating that the spatial location and numerical characteristics of the candidate points are also important reference factors for the model. Removing the EF class will reduce the F1 score by 0.017, indicating that the overall nature of the drainage event also has some reference value. Removing the CDF class only reduces the F1 score by 0.003, which is a small impact, but since this group only has three features, it still has a positive effect.
[0143] The single-group prediction experiments also demonstrated the individual discriminative power of each group. The F1 scores for the PF and RF classes were 0.694 and 0.688, respectively, far exceeding those of the EF and CDF classes. This means that these two classes of features alone can meet the basic requirements. Furthermore, the combined performance of all four classes is still better than any single class. This indicates that the information between the different classes is not redundant but complementary. The EF class's judgment on irrigation status and the CDF class's verification of cross-depth consistency provide the contextual background needed for the PF and RF classes to make the main distinction.
[0144] The above method was applied to all valid FC point classification events, resulting in field water holding capacity estimates for different depths of 100 different detection devices. Among these, there were 10 groups with high confidence, 38 groups with medium confidence, and 52 groups with low confidence. Figure 22 This is one of the device depth curves provided in the embodiments of this application. Figure 23 This is the second device depth curve provided in the embodiments of this application. Figure 22 and Figure 23 Several representative (device, depth) combinations of reference curves are presented to evaluate the results. The thin gray line in the figure represents the time series of this sensor, and the blue part represents the time period of drainage events. During this period, the red dots are the FC points detected by the model, and the red horizontal dashed line is our estimated true field capacity. It can be seen that under sufficient irrigation, the FC point is located near the red line, indicating the consistency between model identification and numerical calculation. Under insufficient irrigation, the dividing line is below the red dashed line, which explains why the high percentile estimation method is used. The FC standard line remains horizontal throughout the observation period, which is consistent with the fact that field capacity is an inherent physical property of the soil.
[0145] The field water holding capacity acquisition method provided in this application is compared with traditional field water holding capacity measurement methods and related in-situ sensing methods in terms of measurement speed, spatial heterogeneity detection capability, flexibility, numerical accuracy, and application scenarios. The comparison results are shown in Table 9. Table 9. Performance Comparison of Different Field Water Holding Capacity Measurement Methods
[0146] This application addresses core issues in the automatic identification of field water holding capacity, such as non-stationary soil moisture time series, variable drainage curve morphology, unknown irrigation adequacy, and unreliable single observations. It proposes a multi-stage field water holding capacity acquisition method based on multi-depth moisture response characteristics, which involves event-driven monitoring, localization, discrimination, and fitting. The method was validated and its performance analyzed using time series data of measured soil moisture content in multiple regions, ultimately achieving accurate and automated identification of field water holding capacity.
[0147] The field water holding capacity acquisition method provided in this application constructs a hierarchical, multi-stage identification framework, which decomposes field water holding capacity identification into four sub-tasks: drainage event monitoring, field water holding capacity candidate point extraction, candidate point semantic classification, and field water holding capacity numerical fitting. By first screening events, then extracting features, and finally discriminating and fitting, the interference of background noise and complex field factors is significantly reduced. At the same time, the decoupled design of each module of the framework has both interpretability and engineering scalability. Each link can be independently optimized and replaced to adapt to the needs of different field monitoring scenarios. However, the framework is currently only designed for the single data dimension of soil moisture content and does not integrate physical and chemical properties such as soil texture and organic matter content, as well as meteorological data. In plots with significant differences in soil types, there is still room for improvement in generalization ability.
[0148] The field water holding capacity acquisition method provided in this application optimizes training samples through three-channel input feature construction and sliding window sampling strategy. The performance of four sequence labeling models, namely BiLSTM, TCN, Transformer and 1D U-Net, was compared and verified. BiLSTM was determined to be the optimal model, which performed outstandingly in event detection accuracy and boundary localization quality. It defined accurate event intervals for subsequent tasks and effectively avoided interference from invalid data.
[0149] The field water holding capacity acquisition method provided in this application is based on the geometric idea of the Kneedle algorithm, which transforms curvature calculation into locating the point of maximum change in the descent speed of the curve. This achieves accurate extraction of the first and second candidate points. Furthermore, it eliminates interference events with no identification value through three event screening rules. The time offset error and water content numerical error of the candidate points are both controlled within the acceptable range for agriculture, providing high-quality feature anchors for semantic classification and solving the problem of difficulty in extracting feature points of drainage curves under complex noise.
[0150] The field water holding capacity (FC) acquisition method provided in this application design a 38-dimensional feature system from multiple dimensions, including global events, candidate point locations, segmented slopes, and cross-depth collaboration, to comprehensively characterize the discriminative features of FC points. Through GroupKFold cross-validation comparison of four types of machine learning models, XGBoost was determined as the optimal classification model, demonstrating balanced discriminative ability for both sufficient and insufficient irrigation scenarios, with an F1 score of 0.7421. The proposed robust fitting strategy of first eliminating high-level points and then selecting high-level points effectively eliminates systematic errors caused by equipment disturbances and insufficient irrigation. The field water holding capacity fitting values for 100 equipment and depth combinations closely match the measured values. 2 With an accuracy of 0.89, the method meets the requirements for irrigation decision-making. Comparative experiments show that the method provided in this application has significant advantages over traditional laboratory methods and existing in-situ sensing methods in terms of measurement efficiency, spatial heterogeneity capture, and dynamic adaptability. It can realize in-situ, real-time, and automated identification of soil field holding capacity at multiple depths, and can accurately reflect the spatial heterogeneity of soil in the field, providing refined quantitative parameters for setting irrigation upper limits and calculating irrigation quotas.
[0151] The field water holding capacity acquisition method provided in this application realizes the automated conversion from multi-depth soil moisture content time series data to precise field water holding capacity parameters, solving the pain points of traditional methods being time-consuming, labor-intensive, and difficult to dynamically identify. At the same time, its event-driven time series parsing approach also provides a reference technical solution for the parsing and application of multi-source time series data in agricultural IoT.
[0152] The field water holding capacity acquisition device provided in the embodiments of this application is described below. The field water holding capacity acquisition device described below and the field water holding capacity acquisition method described above can be referred to in correspondence.
[0153] Figure 24 This is a schematic diagram of the field water holding capacity acquisition device provided in the embodiments of this application, as shown below. Figure 24 As shown, the device includes an identification module 2410, a candidate module 2420, an acquisition module 2430, and a determination module 2440.
[0154] The identification module is used to identify multiple drainage events of the soil under test based on soil moisture content time series data; The candidate module is used to select the global turning point in the time segment corresponding to any drainage event as the first candidate point, and the local turning point between the start point of the time segment and the first candidate point as the second candidate point. The acquisition module is used to acquire the multi-dimensional features of the first candidate point and the second candidate point, and to determine the target point corresponding to any drainage event from the first candidate point and the second candidate point based on the multi-dimensional features. The target point is a candidate point belonging to the field water holding capacity point. The determination module is used to determine the field water holding capacity of the soil to be tested based on the soil moisture content at the target point corresponding to each drainage event.
[0155] Specifically, according to embodiments of this application, any number of modules among the identification module, candidate module, acquisition module, and determination module can be merged into one module, or any one of these modules can be split into multiple modules.
[0156] Alternatively, at least some of the functionality of one or more of these modules can be combined with at least some of the functionality of other modules and implemented in a single module.
[0157] According to embodiments of this application, at least one of the identification module, candidate module, acquisition module, and determination module can be at least partially implemented as hardware circuitry, such as a Field Programmable Gate Array (FPGA), Programmable Logic Array (PLA), System-on-a-Chip, System-on-a-Substrate, System-on-Package, Application Specific Integrated Circuit (ASIC), or any other reasonable means of integrating or packaging the circuitry, or implemented in hardware or firmware, or in any one of the three implementation methods of software, hardware, and firmware, or in a suitable combination of any of them.
[0158] Alternatively, at least one of the identification module, candidate module, acquisition module, and determination module can be implemented at least partially as a computer program module, which can perform corresponding functions when the computer program module is run.
[0159] It should be noted that the field water holding capacity acquisition device provided in this application embodiment can realize all the method steps implemented in the above-mentioned field water holding capacity acquisition method embodiment, and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiment and the beneficial effects will not be described in detail.
[0160] Figure 25 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application, such as... Figure 25 As shown, the electronic device may include: a processor 2510, a communication interface 2520, a memory 2530, and a communication bus 2540, wherein the processor 2510, the communication interface 2520, and the memory 2530 communicate with each other through the communication bus 2540. The processor 2510 can call the computer program in the memory 2530 to execute the above-described method.
[0161] Furthermore, the logical instructions in the aforementioned memory can be implemented as software functional modules and sold or used as independent products, and can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to related technologies, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0162] On the other hand, this application also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can perform the methods provided in the above embodiments.
[0163] On the other hand, embodiments of this application also provide a non-transitory computer-readable storage medium storing a computer program for causing a processor to execute the methods provided in the above embodiments.
[0164] The non-transitory computer-readable storage medium can be any available medium or data storage device that the processor can access, including but not limited to magnetic memory (e.g., floppy disk, hard disk, magnetic tape, magneto-optical disk (MO)), optical memory (e.g., CD, DVD, BD, HVD), and semiconductor memory (e.g., ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)).
[0165] The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0166] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of software products. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0167] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for obtaining field water holding capacity, characterized in that, include: Identify multiple drainage events of the soil under test based on soil moisture content time series data; The global turning point in the time segment corresponding to any drainage event is taken as the first candidate point, and the local turning point between the start point of the time segment and the first candidate point is taken as the second candidate point. The multidimensional features of the first candidate point and the second candidate point are obtained, and the target point corresponding to any drainage event is determined from the first candidate point and the second candidate point based on the multidimensional features. The target point is a candidate point belonging to the field water holding capacity point. The field capacity of the soil to be tested is determined based on the soil moisture content at the target point corresponding to each drainage event.
2. The method for obtaining field water holding capacity according to claim 1, characterized in that, The identification of multiple drainage events of the soil under test based on soil moisture content time-series data includes: The original soil moisture content, event start information, and event end information of the soil moisture content time series data are concatenated to construct a combined input feature of the time series. Extract the probability of drainage events corresponding to the combined input features at each time step; The drainage event is obtained by aggregating consecutive time periods in which the probability of the drainage event occurring is greater than a preset probability threshold.
3. The method for obtaining field water holding capacity according to claim 1, characterized in that, The step of selecting a global inflection point in a time segment corresponding to any drainage event as a first candidate point and a local inflection point between the start point of the time segment and the first candidate point as a second candidate point includes: Obtain the first connection between the start and end points of the time segment; Obtain the vertical distance from each data point in the time segment to the first connecting line, and determine the data point with the largest vertical distance as the first candidate point; Obtain the second line connecting the starting point and the first candidate point; Obtain the vertical distance from each data point between the starting point and the first candidate point to the second line, and determine the data point with the largest vertical distance as the second candidate point.
4. The method for obtaining field water holding capacity according to claim 1, characterized in that, Before selecting the global inflection point in the time segment corresponding to any drainage event as the first candidate point, the method further includes: If the maximum water content of the drainage event is less than the first preset water content, the water content at the end of the drainage event is greater than the second preset water content, or the duration of the drainage event is less than the preset duration, the drainage event will be excluded as an interference event. The first preset moisture content and the second preset moisture content are both determined based on the maximum moisture content in the soil moisture content time series data at the depth corresponding to the drainage event, and the first preset moisture content is greater than the second preset moisture content.
5. The method for obtaining field water holding capacity according to claim 1, characterized in that, Determining the target point corresponding to any drainage event from the first candidate point and the second candidate point based on the multidimensional features includes: The multidimensional features are input into the classification model to obtain the category labels corresponding to the first candidate point and the second candidate point output by the classification model. The target point is determined from the first candidate point and the second candidate point based on the category label; The multidimensional features include at least two of the following dimensions: Global attribute features used to characterize the overall duration of the drainage event and the magnitude of water content changes; Local attribute features used to characterize the relative time span and water content ratio of the first candidate point and the second candidate point in the time segment; Drainage rate features used to characterize the slope of the connection between the first candidate point and the second candidate point and the slope ratio of the time segment; This is used to characterize the temporal overlap of drainage events at different depths of the same detection device and the cross-depth collaborative features of the temporal distribution of the first and second candidate points.
6. The method for obtaining field water holding capacity according to claim 1, characterized in that, Determining the field capacity of the soil to be tested based on the soil moisture content at the target point corresponding to each drainage event includes: Obtain the interquartile range of soil moisture content at multiple target points corresponding to the soil to be tested; Based on the interquartile range, abnormal water content in the soil moisture content is removed, and the remaining soil moisture content after removing the abnormal water content is taken as the effective water content. The value at a preset percentile of the effective water content is determined as the field water holding capacity of the soil to be tested; The preset percentile is determined based on the total number of samples with the effective water content.
7. A field water holding capacity measurement device, characterized in that, include: The identification module is used to identify multiple drainage events of the soil under test based on soil moisture content time series data; The candidate module is used to select the global turning point in the time segment corresponding to any drainage event as the first candidate point, and the local turning point between the start point of the time segment and the first candidate point as the second candidate point. The acquisition module is used to acquire multi-dimensional features of the first candidate point and the second candidate point, and determine the target point corresponding to any drainage event from the first candidate point and the second candidate point based on the multi-dimensional features. The target point is a candidate point belonging to the field water holding capacity point. The determination module is used to determine the field water holding capacity of the soil to be tested based on the soil moisture content at the target point corresponding to each drainage event.
8. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the field water holding capacity acquisition method according to any one of claims 1 to 6 through the computer program.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the field water holding capacity acquisition method as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the field water holding capacity acquisition method as described in any one of claims 1 to 6.