Organic material recommendation method based on red soil hardening reduction
By collecting and analyzing data on red soil compaction indicators, and utilizing compaction assessment algorithms and an organic material knowledge base, a scientific organic material recommendation report was generated. This solved the problem of inappropriate selection in red soil compaction improvement, and achieved soil structure improvement and enhanced agricultural production efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGXI RED SOIL & GERMPLASM RESOURCES RES INST
- Filing Date
- 2025-12-22
- Publication Date
- 2026-04-17
AI Technical Summary
Red soil compaction leads to soil structure damage, affecting crop root growth and water infiltration. Existing organic material improvement methods lack scientific data support, resulting in improper selection or unreasonable application, which fails to effectively improve the soil, causing resource waste and low production efficiency.
By collecting data on red soil compaction indicators and soil environmental parameters, a comprehensive dataset is formed. A compaction assessment algorithm is used to calculate the priority score for reduction. Combined with an organic material knowledge base, a scientific application plan is recommended, and an organic material recommendation report is generated, which includes the material name, application rate, and timing.
It enables precise quantitative assessment and targeted improvement of red soil compaction, enhances soil structure, reduces resource waste, and promotes agricultural production efficiency and sustainable development.
Smart Images

Figure CN121885013A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of red soil improvement technology, specifically to a method for recommending organic materials based on reducing red soil compaction. Background Technology
[0002] Red soil, one of the most widely distributed soil types in southern my country, covers an area of over 2 million square kilometers and plays a crucial role in agricultural production, supporting the cultivation of various important crops such as rice, corn, tea, and citrus. However, due to its inherent characteristics, such as high clay content and insufficient organic matter reserves, coupled with long-standing unreasonable farming practices, such as frequent rotary tillage leading to soil structure damage and single-fertilizer application causing nutrient imbalance, red soil compaction has become increasingly prominent, becoming one of the main bottlenecks restricting the high-quality development of agriculture in southern China.
[0003] When red soil compacts, soil particles clump together tightly, forming a hard, compacted layer. This directly hinders the extension and development of crop roots, preventing them from fully absorbing water and nutrients. Simultaneously, the compacted layer significantly reduces the soil's permeability coefficient, making it difficult for rainwater or irrigation to infiltrate quickly. This not only easily leads to surface runoff and water waste but also causes waterlogging on the soil surface, exacerbating the risk of root rot. During droughts, compacted soil struggles to retain moisture, resulting in reduced crop yields. Furthermore, compacted soil exhibits significantly decreased aeration, inhibiting microbial activity and reducing the decomposition and transformation efficiency of soil organic matter, further exacerbating soil fertility decline and creating a vicious cycle of "compaction—decreased fertility—reduced yield."
[0004] Currently, agricultural production often addresses red soil compaction by applying organic materials, leveraging their porous and loose properties to improve soil structure and fertility. However, in practice, the selection and application of organic materials largely rely on farmers' planting experience, lacking scientific data support. Farmers often arbitrarily choose organic materials such as straw, compost, and green manure based on past habits, without understanding the specific degree of soil compaction or whether the composition of the selected materials meets the current soil improvement needs. While soil testing is conducted in some areas, the testing indicators are often limited to pH value or single nutrient content, neglecting key indicators that directly reflect the degree of compaction, such as soil hardness and permeability coefficient, resulting in test results that cannot fully reflect the actual soil condition.
[0005] This experience-based operational model often suffers from problems such as inappropriate selection of organic materials, excessive deviations in application rates, or unreasonable application timing. If the selected organic materials have an unbalanced carbon-nitrogen ratio, they not only fail to effectively improve compacted soil but may also compete with crops for nutrients during decomposition. Excessive application increases agricultural production costs and may even trigger secondary soil salinization, while insufficient application fails to reduce compaction. Inappropriate application timing, such as blindly applying during critical crop growth periods, may negatively impact normal crop growth. These problems not only lead to poor results in improving red soil compaction but also waste organic resources, hindering the improvement of agricultural production efficiency. Therefore, a scientific and precise method for recommending organic materials is needed to overcome the current predicament in red soil improvement. Summary of the Invention
[0006] The purpose of this invention is to provide a method for recommending organic materials based on the reduction of red soil compaction, so as to solve the problems mentioned in the background art.
[0007] To achieve the above objectives, the present invention provides a method for recommending organic materials based on the reduction of red soil compaction, the method comprising: Data on compaction index and soil environmental parameters of red soil were collected. The compaction index data included soil hardness and permeability coefficient, and the soil environmental parameters included pH value, organic matter content and soil texture. The collected data on compaction indicators and soil environmental parameters are integrated to form a comprehensive dataset of red soil. The quality of the red soil comprehensive dataset is verified, outliers and missing values are removed, and clean soil data is generated. The clean soil data is processed using a compaction assessment algorithm to calculate the compaction reduction priority score. Based on the compaction reduction priority score, a matching list of organic materials is retrieved from the organic material knowledge base, which stores the types, composition characteristics and application ranges of organic materials. An organic material recommendation report is generated based on the search results. The organic material recommendation report includes the recommended material name, suggested application amount, and application time.
[0008] Preferably, the process of collecting data on compaction indicators and soil environmental parameters of red soil includes: deploying an intelligent soil monitoring network, with each monitoring node equipped with a miniature sensor array to measure soil hardness and permeability in real time; simultaneously accessing agricultural data cloud services to download historical soil environmental parameter datasets, including pH value, organic matter content, and soil texture records; and using a time-series alignment engine to perform timestamp matching and interpolation compensation on real-time monitoring data and historical data to generate a synchronized soil data stream.
[0009] Preferably, the process of integrating the collected compaction index data and soil environmental parameters includes: inputting soil hardness value, permeability coefficient, pH value, organic matter content and soil texture data into a spatial data integration framework; performing geographic coordinate normalization processing to unify all data into the same projected coordinate system; applying a data format conversion protocol to convert multi-source data into standard structured tables and embedding spatial location metadata to form a comprehensive red soil dataset.
[0010] Preferably, the process of quality verification of the red soil comprehensive dataset includes: running an anomaly detection routine based on cluster analysis to identify and isolate statistical outliers in the data; and using a spatial interpolation algorithm to fill and reconstruct missing spatial data blocks based on neighboring point data.
[0011] Preferably, the process of processing clean soil data using the compaction assessment algorithm includes: loading a pre-trained neural network model, inputting hardness values, permeability coefficients, pH values, organic matter content, and texture feature vectors from the clean soil data; calculating a compaction reduction priority score through a model inference engine, with the score scale set to a continuous value between zero and one; the model inference process is based on a multilayer perceptron architecture, passing features layer by layer and outputting the assessment results.
[0012] Preferably, the process of retrieving a matching list of organic materials from the organic materials knowledge base includes: activating a dynamic query builder based on the priority score for compaction reduction, generating score threshold filtering conditions; connecting to the index service of the organic materials knowledge base, performing multi-condition matching queries, and prioritizing the retrieval of organic material types compatible with soil pH and organic matter content; and returning a list of results including organic material identifiers, chemical composition summaries, and recommended application rate ranges.
[0013] Preferably, the steps for constructing the pre-trained neural network model include: obtaining red soil compaction sample data from a historical soil database, wherein the red soil compaction sample data includes soil hardness, permeability coefficient, pH value, organic matter content, and soil texture; standardizing the red soil compaction sample data to generate a training dataset; constructing a multilayer perceptron model architecture, setting the number of input layer nodes to match the feature dimension, adopting a fully connected structure for the hidden layer, and having a single node for the output layer; iteratively training the training dataset using the backpropagation algorithm and adjusting the model weight parameters; evaluating the model accuracy through a validation dataset, saving the model parameters that achieve the preset accuracy, and completing the pre-training process.
[0014] Preferably, the working steps of the model inference engine include: loading the weight parameter file of the pre-trained neural network model; inputting the feature vectors from the clean soil data into the model input layer; performing a weighted summation operation in the hidden layer and applying an activation function for nonlinear transformation; passing the output of the hidden layer to the output layer for linear combination; and generating a compaction reduction priority score between zero and one through the output layer activation function.
[0015] Preferably, the working steps of the dynamic query builder include: parsing the compaction reduction priority score and calculating the score threshold boundary value; generating range filtering conditions based on the score threshold boundary value; constructing a composite query statement by combining soil pH value and organic matter content parameters; connecting to the index service of the organic material knowledge base and performing a multi-field joint query; sorting the query results by matching degree and returning the top k optimal organic material lists.
[0016] Preferably, the method further includes a step of verifying the organic material recommendation report: simulating the application effect using an independent verification dataset, comparing the deviation between the recommended scheme and the actual reduction effect, and readjusting the compaction assessment algorithm parameters when the deviation exceeds a preset tolerance.
[0017] Compared with the prior art, the beneficial effects of the present invention are: By systematically collecting data on red soil compaction indicators and soil environmental parameters, this approach overcomes the limitations of traditional red soil improvement methods that rely solely on single indicators or empirical judgments. The collected compaction indicator data includes soil hardness and permeability coefficients, two indicators directly related to the core characteristics of soil compaction and capable of accurately capturing the actual degree of compaction in red soil. Soil environmental parameters include pH value, organic matter content, and soil texture, comprehensively reflecting the basic physicochemical properties of the soil and providing comprehensive data support for the precise matching of subsequent organic materials. This multi-dimensional data collection method transforms the understanding of red soil conditions from vague experience into quantitative evidence, laying a solid data foundation for the entire recommendation process.
[0018] The data integration and quality verification processes further enhance the reliability of soil data. By integrating various separately collected indicator data into a unified and standardized comprehensive dataset for red soil, the judgment bias caused by data fragmentation is avoided. By removing outliers and missing values to generate clean soil data, the impact of detection errors and environmental interference on data quality is effectively eliminated. The processed soil data accurately reflects the actual condition of the red soil, providing reliable input for subsequent compaction assessment and ensuring the scientific validity of the recommended results from the outset.
[0019] The application of a compaction assessment algorithm enables precise quantitative evaluation of red soil compaction. This algorithm specifically processes clean soil data, calculating a compaction reduction priority score that clearly distinguishes the severity of compaction and the urgency of remediation in different plots. This quantitative assessment method breaks away from the limitations of traditional "one-size-fits-all" approaches, allowing growers to clearly understand the different remediation needs of different plots. This provides guidance for targeted recommendations of subsequent organic materials, ensuring that remediation resources are prioritized for the most needed plots, thereby improving resource utilization efficiency.
[0020] The construction and retrieval matching mechanism of the organic materials knowledge base provides a solid guarantee for scientific recommendations. The information stored in the knowledge base, such as the types, compositional characteristics, and application ranges of organic materials, forms a systematic material resource database, avoiding the problem of farmers blindly selecting materials due to a lack of information. Precise retrieval and matching based on the priority score for reducing soil compaction can screen out organic materials whose compositional characteristics best match the current red soil conditions, ensuring that the selected materials can specifically improve soil compaction and replenish soil nutrients. For example, for red soil with high hardness and low organic matter content, compost-like materials rich in humus can be matched; for clayey red soil with low permeability, materials with good air permeability such as straw can be recommended, achieving precise matching of materials according to soil conditions.
[0021] The final organic material recommendation report includes core information such as recommended material names, suggested application rates, and application timing, making it highly practical and operable. Growers do not need professional soil improvement knowledge; they can simply follow the report's instructions to avoid problems such as improper application rates or incorrect timing. Clear material names guide farmers to make precise purchases, reasonable application rate recommendations ensure improvement effects while avoiding resource waste and increased costs, and appropriate application timing ensures that the materials fully function in the soil, creating a positive synergy with the crop growth cycle.
[0022] From a long-term application perspective, this method can promote the transformation of red soil improvement from an experience-based approach to a scientific one. Through continuous and precise improvement measures, it can gradually improve the structure of red soil and enhance soil fertility and water and fertilizer retention capacity. In this process, the rational utilization of organic materials can also promote the resource utilization of agricultural waste, reduce environmental pollution, and align with the concept of green agriculture. Simultaneously, scientific improvement methods can steadily improve crop growth quality, enhance the stability and sustainability of agricultural production, and provide tangible support for improving agricultural production efficiency in southern red soil regions. Attached Figure Description
[0023] Figure 1 This is a schematic diagram illustrating the working principle of the organic material recommendation method based on red soil compaction reduction described in this invention. Figure 2 A flowchart for collecting data on red soil compaction indicators and soil environmental parameters; Figure 3 A flowchart illustrating the process of processing clean soil data using a compaction assessment algorithm; Figure 4 This is a diagram showing the priority score distribution and threshold classification of red soil compaction. Figure 5 This is a comparison and verification chart showing the predicted and measured effects of improving the hardness of organic materials. Detailed Implementation
[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0025] Please see Figure 1 This invention provides a method for recommending organic materials based on reducing red soil compaction. This method uses a systematic process to diagnose red soil compaction problems and generate organic material application plans. Specific implementation methods are as follows: The method begins with the acquisition of red soil compaction index data and soil environmental parameters. The compaction index data includes soil hardness and permeability coefficient, while the soil environmental parameters include pH, organic matter content, and soil texture. These data were collected and recorded using standardized procedures to ensure the reliability and consistency of the data sources. Subsequently, a data integration operation was performed, aggregating multi-source data into a comprehensive red soil dataset, which serves as the basis for subsequent analysis. After data integration, a quality verification phase was initiated, where an automated algorithm identified and processed outliers and missing values, generating clean soil data. This clean soil data was then input into a compaction assessment algorithm, which calculates a compaction reduction priority score. The score reflects the severity of red soil compaction and the urgency of its reduction. Based on the compaction reduction priority score, the system accesses an organic material knowledge base, which stores information such as organic material types, compositional characteristics, and application rate ranges. A matching query retrieves a list of suitable organic materials. The final stage generates an organic material recommendation report, which includes recommended material names, suggested application rates, and application timing, providing specific guidance for red soil improvement.
[0026] Example 1: See Figure 2Deploying a smart soil monitoring network is a fundamental step in obtaining data on red soil compaction indicators. This network consists of multiple geographically dispersed monitoring nodes, each deployed in a representative red soil region. The location of these nodes considers differences in soil type, land use, and topography to achieve comprehensive spatial coverage. Each node is equipped with a miniature sensor array, a measurement unit integrating various miniaturized sensing elements, including soil hardness and soil permeability sensors. The soil hardness sensor operates based on the piezoresistive or strain principle, measuring the soil's penetration resistance in real time and outputting a digital signal. The soil permeability sensor typically uses a constant or variable head principle to monitor the seepage rate of water in the soil, thereby calculating the permeability coefficient. The miniature sensor array periodically collects data; the collection frequency can be configured according to actual needs, such as collecting data once per hour. The collected real-time data is transmitted to a data center for storage via wireless communication modules, such as LoRa or NB-IoT networks. Simultaneously, the system accesses the agricultural data cloud service, a data platform that stores historical soil environmental parameters, and downloads the historical soil environmental parameter dataset through an application programming interface (API). This dataset contains records of pH values, organic matter content, and soil texture, derived from previous soil surveys, laboratory analysis reports, or remote sensing inversion data. Each record in the dataset is precisely timestamped, identifying the specific date and time of data collection.
[0027] In some embodiments, a time-series alignment engine performs timestamp matching and interpolation compensation on real-time monitoring data and historical data. The time-series alignment engine is a data processing module whose core function is to synchronize data from different time series to a unified time base. The timestamp matching process first parses the timestamp information in the real-time monitoring data and historical data records, converting the timestamps into a unified standard time format, such as Unix timestamps or ISO8601 format. The engine then establishes a common timeline, the granularity of which depends on the frequency of data acquisition, for example, in hours or days. For each data point in the real-time monitoring data stream, the time-series alignment engine searches for the record with the closest timestamp in the historical dataset. If a record with the same timestamp exists in the historical dataset, a direct match is performed. If there is no corresponding record for a certain time point in the historical dataset, or if there is a temporary gap in the real-time monitoring data, an interpolation compensation mechanism is initiated. The interpolation compensation algorithm is based on the principle of temporal proximity, and commonly used methods include linear interpolation or spline interpolation. Linear interpolation uses the values of the two nearest known data points before and after the missing time point to calculate their arithmetic mean or a time-distance-weighted average as the filler value. Spline interpolation constructs a smooth curve through the known data points to estimate the values of missing points. Through processing by the time-series alignment engine, the previously asynchronous real-time and historical data are integrated into a continuous, time-stamp-aligned synchronized soil data stream. This synchronized soil data stream ensures that all parameters in subsequent analyses have consistent temporal attributes, avoiding analytical biases caused by time asynchrony.
[0028] In practice, the process of integrating the collected compaction index data and soil environmental parameters is accomplished through a spatial data integration framework. This framework is a software architecture responsible for processing heterogeneous data with geospatial reference information. The framework's input data includes a time-aligned, synchronized soil data stream containing soil hardness values, permeability coefficients, pH values, organic matter content, and soil texture data. This data may be in different geographic coordinate reference systems when input into the framework, such as using different map projections or geodetic datums. The framework first performs geographic coordinate normalization, which calls a coordinate transformation library, such as the PROJ library, to unify the spatial coordinates of all data points to the same projected coordinate system, such as the UTM projection or the Albers equal-area projection. This step eliminates spatial misalignment caused by coordinate system differences, ensuring that all data points can be accurately overlaid and analyzed at the same spatial level. After coordinate normalization, the framework applies a data format conversion protocol. This protocol defines the rules for converting multi-source data into standard structured tables. Multi-source data may exist in different file formats or data structures, such as sensor data in JSON format, historical tabular data in CSV format, or spatial vector data in Shapefile format. The protocol parses this raw data, extracting valid numerical fields and their corresponding spatial location information (latitude and longitude coordinates). This information is then mapped to a predefined standard data model containing fixed fields such as record ID, latitude and longitude, collection time, hardness value, permeability coefficient, pH value, organic matter content, and soil texture code. Finally, all data is assembled into a structured table, such as a PandasDataFrame or a database table. Simultaneously, spatial location metadata is embedded in this table as additional columns, explicitly recording the geographic coordinates corresponding to each data record. The final output is the Red Soil Comprehensive Dataset, a dataset containing complete soil parameters and precise spatial location information that can be directly read and analyzed by a computer.
[0029] In some embodiments, the workflow of the spatial data integration framework can be further refined. Upon receiving data, the framework performs data validity checks, verifying that each data value is within a reasonable physical range, such as whether the pH value is between 3 and 10. Values significantly outside this range are flagged as suspicious and recorded. During geographic coordinate normalization, the framework maintains a coordinate transformation parameter table, recording the transformation relationships between different original coordinate systems and the target standard coordinate system. The data format conversion protocol supports a scalable parser, adapting to new data source formats without modifying the core code. The generated standard structured tables not only contain numerical values and coordinates but also retain data source information as metadata for traceability and data quality management. The red soil integrated dataset is ultimately persistently stored in a spatial database or distributed file system, and a spatial index is built to support efficient spatial query and analysis operations. The entire data integration process achieves standardized and integrated management of multi-source, heterogeneous, and multi-temporal soil data, providing a high-quality data foundation for subsequent quality verification and compaction assessment.
[0030] It is understandable that the deployment density of the intelligent soil monitoring network and the accuracy of the micro-sensor array directly affect the spatial representativeness and accuracy of real-time data. The number of monitoring nodes is related to the size of the target area and the degree of soil heterogeneity; denser node deployment is required in areas with drastic changes in soil properties. Micro-sensor arrays require regular on-site calibration to maintain the reliability of measurement data. The quality of historical data provided by agricultural data cloud services varies; therefore, when downloading and using historical soil environmental parameter datasets, attention should be paid to their metadata information, including measurement methods, sampling depth, and data accuracy specifications. The selection of interpolation compensation algorithms in the time-series alignment engine requires a trade-off between computational complexity and interpolation accuracy. For gently changing soil parameters such as soil texture, simple linear interpolation is sufficient; for parameters with drastic changes, more complex algorithms may be needed. The successful operation of the spatial data integration framework depends on accurate spatial coordinate information; therefore, ensuring the accuracy of GPS positioning or spatial registration at the source of data acquisition is crucial.
[0031] Optionally, the communication method of the intelligent soil monitoring network can be selected based on the on-site network coverage. In areas with weak mobile network signals, satellite communication or long-distance radio can be used as backup transmission solutions. The time-series alignment engine can be configured with different synchronization strategies, such as filling missing values with previous valid values or using seasonal historical averages for filling, to adapt to different data analysis needs. In addition to supporting common projected coordinate systems, the spatial data integration framework can also support custom local coordinate systems to meet the needs of specific study areas. The generated red soil integrated dataset can be exported to various standard geographic information data formats, such as GeoJSON or GeoTIFF, facilitating interaction with other geographic information system software.
[0032] It is understood that the data acquisition and integration scheme described in this embodiment constructs a coherent data pipeline from the physical world to the digital world, ensuring the spatiotemporal consistency and machine readability of the basic data. The micro-sensor array enables real-time, automated acquisition of soil compaction indicators, reducing reliance on manual sampling. The utilization of agricultural data cloud services integrates historically accumulated data assets, enriching the temporal dimension of the data. The temporal alignment engine and spatial data integration framework jointly address the core challenge in multi-source data fusion—the inconsistency between time and space—laying a solid technical foundation for generating a high-quality comprehensive red soil dataset. The comprehensive red soil dataset is the sole and reliable data source for all subsequent advanced analyses, such as quality verification, compaction assessment, and organic material recommendations; its quality directly determines the scientific validity and practicality of the final recommendation results.
[0033] Example 2: See Figure 3 The quality verification process for the red soil comprehensive dataset begins with running an anomaly detection routine based on cluster analysis. This routine employs an unsupervised learning algorithm to group the multivariate data in the dataset. Cluster analysis algorithms such as K-means clustering or DBSCAN clustering are applied to the multivariate space composed of soil hardness, permeability coefficient, pH value, organic matter content, and soil texture. The K-means clustering algorithm pre-defines the number of clusters K and iteratively assigns each data point to the nearest cluster center. The cluster center is updated by calculating the mean of the data points within its cluster, and the Euclidean distance between a data point and its cluster center is used to measure its membership density. The DBSCAN clustering algorithm, based on the concept of density reachability, does not require a pre-determined number of clusters. By defining a neighborhood radius and a minimum number of points, high-density areas are identified as clusters, and low-density areas are marked as outliers. The anomaly detection routine calculates the distance between each data point and its cluster center or defines an outlier factor based on density. Outliers are identified as points whose distance exceeds a preset threshold or whose density is below a threshold. These outliers are isolated and moved to an isolated dataset to avoid interfering with subsequent analysis. For missing spatial data blocks—specifically, areas in the red soil integrated dataset where parameter values are missing due to sampling omissions or transmission failures—spatial interpolation algorithms are used for filling and reconstruction. Spatial interpolation algorithms are based on geostatistical principles, assuming spatial correlation between neighboring points. Inverse distance weighted interpolation (ITALI) is a commonly used method, calculating missing point values based on a weighted average of surrounding known point values, with weights inversely proportional to distance. Kriging interpolation is a more advanced spatial interpolation method, utilizing a variogram model to describe spatial autocorrelation and providing the best linear unbiased estimate. The interpolation process first identifies neighboring known points around the missing point, selecting neighboring points based on distance or quantity thresholds. Then, an interpolation algorithm is applied to calculate the estimated values, filling the missing blocks and generating complete clean soil data.
[0034] In some embodiments, the anomaly detection routine based on cluster analysis can be configured with different clustering algorithm parameters to adapt to data characteristics. For the K-means clustering algorithm, the number of clusters K can be determined by the elbow rule or the silhouette coefficient method. The elbow rule plots the sum of squared errors within clusters corresponding to different K values, and selects the K value corresponding to the inflection point of the curve. The silhouette coefficient method calculates the silhouette coefficient of each data point, measuring its tightness with its own cluster and its separation from other clusters, and selects the K value with the largest average silhouette coefficient. The neighborhood radius and minimum number of points parameters of the DBSCAN clustering algorithm are set by the trial-and-error method or based on the k-distance map. The k-distance map plots the distance from each point to its k-th nearest neighbor, and selects the distance abrupt change point as the neighborhood radius. The anomaly detection threshold is usually set based on statistical quantiles. For example, points with a distance greater than 1.5 times the interquartile range of the third quartile are defined as outliers, or points with an absolute value greater than 3 are considered anomalies based on the Z-score. The choice of spatial interpolation algorithm depends on the spatial variation characteristics of the data. Inverse distance weighted interpolation is simple and easy to use but may be overly smooth, while Kriging interpolation can better capture spatial trends but is computationally complex. For missing data blocks, if the missing range is large, co-kriging interpolation can be used. Co-kriging interpolation utilizes auxiliary variables such as elevation or remote sensing data to improve interpolation accuracy. The interpolated data needs to be cross-validated. Cross-validation temporarily treats some known points as missing, applies the interpolation, compares the estimated values with the true values, and calculates the root mean square error to evaluate the interpolation quality.
[0035] In some embodiments, the quality verification process also includes a data consistency check, which verifies the logical relationships between different parameters. For example, soil hardness and permeability coefficient are typically negatively correlated; if positively correlated outliers are found, they are flagged for inspection. Clean soil data is generated and stored as a standardized table containing valid values for all parameters and spatial coordinate metadata. Anomaly detection and missing value imputation steps can be performed iteratively; after the first imputation, anomaly detection is rerun to ensure that the imputed values do not introduce new outliers. Clean soil data serves as input to the compaction assessment algorithm. The algorithm's processing of clean soil data begins by loading a pre-trained neural network model. This model loads weight parameters and architecture definitions from the file system; the weight parameters are obtained through training on historical data. The neural network model employs a multilayer perceptron architecture, which includes an input layer, hidden layers, and an output layer. The number of nodes in the input layer matches the dimension of the feature vector. The feature vector includes hardness values, permeability coefficients, pH values, organic matter content, and texture features from the clean soil data. Texture features may be encoded as categorical variables such as sand, loam, or clay, and converted into numerical vectors through one-heat encoding. The input feature vector is first standardized, which scales the features to zero mean and unit variance or a range of zero to one, consistent with the training phase. The model inference engine performs forward propagation computation, inputting the standardized feature vector into the input layer, where the values are directly passed from the input layer nodes to the hidden layers.
[0036] Understandably, quality verification is a crucial step in ensuring data reliability. Anomaly detection based on clustering analysis can effectively identify outliers caused by measurement errors or special events, preventing these values from distorting the overall analysis results. Spatial interpolation algorithms, when handling missing data, rely on the assumption of spatial autocorrelation. Interpolation performs well in regions with smooth spatial variations in soil properties, but may require denser sampling points in highly heterogeneous areas. Clean soil data provides high-quality input for subsequent compaction assessment, reducing uncertainty caused by noise and missing data. Pre-trained neural network models can capture the complex nonlinear relationship between soil parameters and compaction degree. The multilayer perceptron architecture achieves high-order feature interaction through nonlinear transformations of hidden layers. The computational efficiency of the model inference engine enables rapid generation of compaction reduction priority scores, supporting real-time or near-real-time decision-making. Setting the score scale to continuous values between zero and one facilitates interpretation; values closer to one indicate more severe compaction and higher reduction priority, while values closer to zero indicate milder compaction.
[0037] In practice, the model inference engine's workflow involves layer-by-layer computation within a multilayer perceptron. After the input layer receives the feature vector, the hidden layers perform a weighted summation operation and apply an activation function. The weighted summation operation calculates the input to each hidden layer neuron, which is the dot product of the input vector and the weight vector plus a bias term. Activation functions introduce non-linearity; commonly used activation functions include the Sigmoid function, the Tanh function, or the ReLU function. The Sigmoid function maps the input to the range of zero and one, as shown in the formula: ,in This represents the weighted summation result; It is a natural constant; The output value is between (0,1). The Sigmoid function has a smooth output and is easy to differentiate, but it may cause the gradient vanishing problem. The Tanh function's output ranges from -1 to 1, and its formula is... ,in, This represents the net input value obtained after a weighted summation operation for a specific neuron. : Represents the natural constant; The x-th power represents the natural constant e; Represents the negative x power of the natural constant e; This represents the output value of the hyperbolic tangent activation function. The ReLU function is simple to calculate; the formula is... ,in, This represents the net input value obtained after a weighted summation operation for a specific neuron. This represents the larger of 0 and x. This represents the output value of the ReLU activation function. It is 0 when x is less than 0, and x itself when x is greater than or equal to 0.
[0038] The hidden layer output is passed to the output layer, which is typically a single neuron that performs linear combination and applies the output activation function. The output activation function constrains the values to the zero-to-one range, often using the sigmoid function. The compaction reduction priority score is generated through the output layer activation function, and the score represents the urgency of red soil compaction reduction. The model inference process is based on pre-trained weights, which are optimized during the training phase using a backpropagation algorithm to make the model output close to the real compaction label. The model inference engine can be implemented using mature deep learning frameworks, such as using the TensorFlow open-source library to build the inference engine. The inference engine loads the weight parameter file of the pre-trained neural network model by calling the TensorFlow `tf.saved_model.load` function. This file is stored in SavedModel format and contains the complete architecture of the model and the trained parameters. The loaded model is encapsulated as a callable TensorFlow graph object. To achieve batch processing, the inference engine combines clean soil data from multiple monitoring points into a two-dimensional tensor. The first dimension of the tensor represents the number of samples, and the second dimension represents the feature dimensions (hardness value, permeability coefficient, pH value, organic matter content, and soil texture encoding). This batch tensor is computed through forward propagation by calling the model's `call` function. The framework automatically performs tensor operations internally, including all weighted sums and activation function transformations from input to hidden layers, from hidden layers to hidden layers, and from hidden layers to the output layer. Ultimately, the inference engine outputs a one-dimensional tensor, where each element corresponds to the stacking reduction priority score of an input sample. This batch processing approach leverages the single-instruction multiple-data parallel computing capabilities of modern processors, improving inference efficiency for large datasets. The entire inference process is completed within a TensorFlow session, with the framework managing the computation graph's lifecycle, device allocation (CPU / GPU), and memory optimization, ensuring the stability of the computation process and efficient resource utilization.
[0039] In some embodiments, a multilayer perceptron architecture can contain multiple hidden layers, allowing the deep learning model to capture more complex feature interactions by increasing the number of hidden layers. The number of neurons in each hidden layer is a hyperparameter, which can be determined through grid search or random search; common configurations include 64, 128, or 256 neurons. Optimization algorithms used during training include stochastic gradient descent or the Adam optimizer, and loss functions commonly include mean squared error or binary cross-entropy. After loading the pre-trained model, the inference engine checks whether the input feature dimensions match; if the dimensions do not match, error handling is triggered. Soil texture features in the feature vector need to be encoded as numerical values. One-hot encoding converts each texture category into a binary vector; for example, sand is encoded as [1,0,0], loam as [0,1,0], and clay as [0,0,1]. After encoding, the feature vector dimension increases, and the number of nodes in the input layer is adjusted accordingly. During inference, intermediate results can be cached to support visualization or debugging. After the compaction reduction priority score is calculated, it is combined with spatial metadata from the clean soil data to generate a score distribution map with spatial location for visualization analysis.
[0040] Optionally, the model inference engine can be deployed on edge computing devices located near the nodes of the smart soil monitoring network, enabling localized inference and reducing data transmission latency. The inference engine supports model quantization, which converts weights from floating-point numbers to integers, reducing computational resources and memory consumption, making it suitable for resource-constrained environments. The compaction reduction priority score can be recalculated periodically, such as monthly or quarterly, to maintain the timeliness of the assessment by incorporating the latest monitoring data. Clean soil data and quality verification logs can be archived for auditing and model retraining.
[0041] It is understandable that the accuracy of the compaction assessment algorithm depends on the quality of the pre-trained neural network model. Model training requires a large amount of high-quality labeled data, which comes from historical compaction measurement experiments. The multilayer perceptron model is a type of feedforward neural network, suitable for processing tabular data, but it may ignore spatial dependencies for spatial data. Performance can be enhanced by combining it with a spatial neural network, as shown in the figure, using a convolutional network. The reliability of the model inference engine is ensured through unit testing and integration testing, with test cases covering normal input and boundary conditions. The compaction reduction priority score provides fine-grained evaluation with continuous values from zero to one, which is superior to binary classification and facilitates priority ranking and resource allocation. The entire process, from quality verification to model inference, forms an automated pipeline, minimizing manual intervention and improving the objectivity and efficiency of red soil compaction assessment.
[0042] In a red soil tea garden in a hilly area of southern China, a quality verification and compaction assessment process was implemented based on a recommended method for reducing red soil compaction. The tea garden covers an area of approximately 50 hectares and 20 soil monitoring points were set up using a grid method. At each monitoring point, soil hardness, permeability coefficient, pH value, organic matter content, and soil texture data were collected. These data together constituted a comprehensive dataset of red soil for the tea garden.
[0043] In the specific implementation, the process of quality verification of the red soil comprehensive dataset first runs an anomaly detection routine based on cluster analysis. In this example, the DBSCAN clustering algorithm is used to identify outliers in the multivariate soil data of 20 monitoring points. The algorithm parameters are set to a neighborhood radius of 0.5 and a minimum number of points of 3. After clustering calculation, 19 data points were identified as core points clustered in one cluster, while the data of monitoring point No. 7 was marked as an outlier. The soil hardness value of this point reached 4.8 MPa, far exceeding the range of 2.1-3.3 MPa of other points, and its organic matter content was only 0.5%, which is significantly inconsistent with the level of 1.2%-2.0% of other points. Upon investigation, it was found that this point is located next to the machinery passage of the tea garden, and has suffered from long-term compaction and severe organic matter loss. It is indeed a true value under special circumstances, but as a statistical outlier, it still needs to be isolated before modeling. Subsequently, it was found that the soil texture data of monitoring point No. 12 was missing due to record omission. For this missing spatial data block, the inverse distance weighted spatial interpolation algorithm was used to fill and reconstruct it. The algorithm uses point 12 as the center and searches for neighboring monitoring points within a 500-meter radius, including points 10, 11, 13, and 14. Based on the texture data of these points (all clay loam soil), the algorithm calculates the estimated texture of point 12 as clay loam soil using a weighted average of the inverse distance, thus completing the missing value imputation. After outlier isolation and missing value imputation, a clean soil dataset for the tea garden is generated.
[0044] Clean soil data is input into a compaction assessment algorithm for calculation. The algorithm loads a pre-trained neural network model with a multilayer perceptron architecture. The input layer has five nodes, corresponding to five features: hardness, permeability coefficient, pH value, organic matter content, and soil texture. Soil texture features are pre-encoded as numerical variables: clay (1), loam (2), and sandy soil (3). The hidden layer uses two fully connected layers: the first hidden layer contains 64 neurons, and the second hidden layer contains 32 neurons, both using the ReLU activation function. The output layer is a single node, using the Sigmoid activation function to output a compaction reduction priority score. The model inference engine converts the clean soil data for each monitoring point into a feature vector. For example, the feature vector for monitoring point 5 is [2.8, 0.15, 5.2, 1.6, 2], representing a hardness of 2.8 MPa, a permeability coefficient of 0.15 cm / h, a pH value of 5.2, an organic matter content of 1.6%, and a loam texture, respectively. The vector passes through the input layer into the first hidden layer, where it undergoes a weighted summation and ReLU activation. The result is then passed to the second hidden layer for further weighted summation and activation, ultimately generating a compaction reduction priority score of 0.72 at the output layer. Similarly, all 19 valid monitoring points were calculated using the model inference engine, with scores ranging from 0.35 to 0.82. Point 15, with a hardness value as high as 3.5 MPa and an organic matter content of only 1.1%, received the highest score of 0.82, indicating that compaction reduction is most urgent in this area.
[0045] Throughout the implementation process, the quality verification stage effectively identified and processed abnormal and missing data, ensuring the reliability of the input data. The compaction assessment algorithm used a pre-trained neural network model to perform nonlinear transformation and feature extraction on clean soil data. The generated compaction reduction priority score objectively quantified the severity of compaction in different areas of the tea garden, providing accurate data for subsequent organic material recommendations. All calculation processes were automated through programming, ensuring the consistency and repeatability of the results.
[0046] Example 3: The process of retrieving a matching list of organic materials from the organic materials knowledge base is as follows: A dynamic query builder is initiated based on the compaction reduction priority score. This dynamic query builder is a software component responsible for generating query conditions to filter records in the organic materials knowledge base. The compaction reduction priority score is passed as an input parameter to the dynamic query builder. The dynamic query builder parses the score value and calculates the score threshold boundary values. These threshold boundary values are determined by preset rules; for example, a score greater than 0.7 is set as a high-priority threshold, and a score between 0.3 and 0.7 is set as a medium-priority threshold. The dynamic query builder generates score threshold filtering conditions, which exist in the form of logical expressions, such as "priority score >= 0.7". The process connects to the index service of the organic materials knowledge base. The index service is part of the database management system and provides fast data retrieval functionality. The index service optimizes query performance based on B-tree or hash index structures. The system performs multi-condition matching queries, combining score threshold filtering with soil environmental parameter conditions, including pH value and organic matter content. Query conditions ensure that the retrieved organic material type is compatible with the soil pH value; for example, acidic soil is matched with acid-resistant organic materials, and the organic matter content requirement is met. Priority is given to retrieving organic material types compatible with soil pH value and organic matter content. Compatibility is based on adaptation range data stored in the organic material knowledge base; for example, organic materials with a high degree of overlap with the soil pH value are given priority. The returned results list includes an organic material identifier, a summary of chemical composition, and a recommended application rate range. The organic material identifier is a unique identification code, the chemical composition summary describes the organic matter content, nitrogen, phosphorus, and potassium ratios, etc., and the recommended application rate range provides the minimum and maximum application rates per acre.
[0047] In some embodiments, the workflow of the dynamic query builder can be further refined. The dynamic query builder supports configurable threshold rules, which can be set via configuration files or a user interface, allowing adjustment of score threshold boundary values based on different regions or crop types. When generating score threshold filtering conditions, the dynamic query builder may use range queries, such as "BETWEEN 0.5 AND 1.0", to cover multiple priority levels. When connecting to the indexing service of the organic matter knowledge base, the indexing service may utilize inverted indexes to accelerate text searches, especially for keyword matching in chemical composition summaries. The construction of multi-condition matching queries considers Boolean logic, such as AND and OR operators, for example, "(priority score > 0.5) AND (soil pH BETWEEN 5.5 AND 7.0) AND (organic matter content < 2.0)". Priority retrieval mechanisms are implemented through sorting; query results are sorted by matching score, calculated based on the degree of condition compliance, such as the reciprocal of the absolute value of the pH difference or the degree of compliance with organic matter requirements. The returned result list may limit the number of entries returned, such as the top 10 best results, to reduce data volume. The updating and maintenance of the organic materials knowledge base is an independent process. New organic material types are added regularly or application rate recommendations are revised to ensure the knowledge base is up-to-date.
[0048] In some embodiments, the pre-trained neural network model construction step obtains red soil compaction sample data from a historical soil database. This historical soil database is a repository storing historical soil data. The red soil compaction sample data includes soil hardness values, permeability coefficients, pH values, organic matter content, and soil texture. The sample data covers cases with different degrees of compaction, from slight to severe. The red soil compaction sample data undergoes standardization processing. Standardization transforms the raw data to a uniform scale. Common methods include min-max standardization or Z-score standardization. Min-max standardization maps values to the zero-to-one range, as shown in the formula: ,in It is the original value. It is the eigenminimum. It is the eigenvalue. This is a standardized value. Z-score standardization is based on the mean and standard deviation, and the formula is: ,in, Raw values representing a specific soil characteristic (such as hardness or pH). It is the characteristic mean. It is the characteristic standard deviation. This represents the new value after standardization. A training dataset is generated, containing standardized feature vectors and corresponding compaction labels. The compaction labels may be binary or continuous values, but continuous scores are commonly used as the target variable in training the compaction reduction priority score. A multilayer perceptron model architecture is constructed, with the number of input layer nodes matching the dimension of the feature vectors. The feature vectors include all soil parameters, such as hardness, permeability coefficient, pH, organic matter content, and soil texture encoding. The hidden layers use a fully connected structure; the number of hidden layers and the number of neurons per layer are hyperparameters, determined experimentally. A common configuration is two hidden layers with 64 neurons per layer. The output layer is a single node, outputting the compaction reduction priority score, with a value range of zero to one.
[0049] In practice, the backpropagation algorithm is used to iteratively train the training dataset. Backpropagation is the core algorithm for neural network training, updating weight parameters by calculating the gradient of the loss function. The iterative training process includes two stages: forward propagation and backpropagation. Forward propagation calculates the output value through the network from the input feature vector, while backpropagation adjusts the weights based on the output error. The mean squared error loss function is commonly used, measuring the difference between the predicted and true scores. Optimization algorithms such as stochastic gradient descent or the Adam optimizer are used during training. The learning rate is a crucial hyperparameter, controlling the step size for weight updates. Model accuracy is evaluated using a validation dataset, an independent subset of historical data that is not used in training. Evaluation metrics include mean absolute error or the coefficient of determination (R²). Model parameters that achieve a preset accuracy are saved. The preset accuracy is set by a threshold, such as R² greater than 0.8. Model parameters include the weight matrix and bias vector, stored as a file for inference. After completing the pre-training process, the model can be deployed to the evaluation system.
[0050] Understandably, the automated query generation of the dynamic query builder improves retrieval efficiency and avoids errors and time consumption from manually writing query statements. Score threshold filtering ensures that recommended materials match the severity of compaction, with higher priority scores corresponding to organic materials with stronger improvement effects. The organic material knowledge base's indexing service utilizes database indexes to accelerate queries and supports rapid retrieval of large-scale data. Multi-condition matching queries comprehensively consider compaction scores and soil environment, improving recommendation accuracy. The pre-trained neural network model relies on high-quality historical data; data coverage affects the model's generalization ability. Standardization ensures consistent feature scale, preventing certain features from dominating the training process. The fully connected layers of the multilayer perceptron architecture can capture complex interactions between features, but may overfit, requiring regularization techniques such as Dropout. The backpropagation algorithm optimizes weights through gradient descent, but care must be taken with the learning rate setting to avoid oscillations or slow convergence. Validation dataset evaluation provides an estimate of the model's generalization performance, preventing overfitting to training data.
[0051] It is understandable that the overall process of organic material recommendation integrates stagnation assessment and knowledge base retrieval, forming a closed-loop system. A dynamic query builder and a neural network model work collaboratively, with stagnation reduction priority scores acting as a bridge connecting the two. The quality of the pre-trained model directly determines the reliability of the scores, thus affecting the recommendation effect. The structured design of the organic material knowledge base facilitates querying and updating, supporting the dynamic addition of new knowledge. The detailed content of the returned results list provides users with sufficient information to support decision-making. The representativeness and quantity of the training dataset are crucial to the model's success, requiring continuous data collection and labeling.
[0052] Optionally, the dynamic query builder can support fuzzy query logic, handling boundary cases such as partial matching when the pH value is close to a threshold. The construction of the pre-trained neural network model can utilize cross-validation, which divides the data into multiple subsets, alternating between training and validation sets to improve model evaluation stability. An early stopping mechanism can be introduced during training, monitoring the loss on the validation set and stopping training when the loss no longer decreases to prevent overfitting.
[0053] In some embodiments, the specific implementation of the backpropagation algorithm involves calculating the gradient using the chain rule. For each weight parameter, the gradient is calculated as the partial derivative of the loss function with respect to the weights. The weight update formula is:
[0054] in It's the old weight. It's the learning rate. It is the gradient of the loss function L with respect to the weights w. These are new weights. Learning rate. It can be dynamically adjusted, such as through a learning rate decay strategy. ReLU is commonly used as the activation function in the hidden layer, and Sigmoid is used in the output layer to ensure the output range. The number of training iterations is determined experimentally to balance training time and accuracy.
[0055] Example 4: The model inference engine's operation begins with loading the weight parameter file of the pre-trained neural network model. This file is a binary or text file stored in persistent media, recording the values of the weight matrices and bias vectors for each layer of the neural network model. The loading process is completed through file input / output operations, reading the weight data into a data structure in memory, such as a multidimensional array or tensor object. Simultaneously, the model inference engine loads the architecture definition file of the neural network model. This file describes the number of layers, the type of each layer, activation functions, and other information. The two are combined to reconstruct a complete, computable model. Feature vectors from clean soil data are input into the model's input layer. Each feature vector is a one-dimensional array, with elements arranged in a fixed order, corresponding to hardness values, permeability coefficients, pH values, organic matter content, and soil texture codes. The input layer, as the first layer of the network, has the same number of nodes as the feature vector dimension. Each node receives a feature value and directly passes it to the next layer. The input layer does not perform any computational operations; it only serves as a data entry point. A weighted summation operation is performed in the hidden layer, an intermediate layer between the input and output layers. Each neuron in the hidden layer receives the output values of all neurons in the previous layer as input. The weighted summation operation calculates the net input of each hidden layer neuron, which is a linear combination of the output values of the previous layer. The coefficients of the linear combination are determined by the corresponding weight values in the weight parameter file, plus a bias term. The mathematical expression for the weighted summation operation is the sum of the inputs of each neuron. An activation function is then applied, introducing a non-linear factor that allows the neural network to fit complex relationships. Common activation functions such as ReLU set negative input values to zero while keeping positive input values unchanged. The output of the hidden layer is then passed to the output layer for linear combination. The output of the hidden layer becomes the input of the output layer, which typically has only one neuron and is used for regression tasks. The output layer performs a weighted summation operation again, multiplying the hidden layer output value by its corresponding weight, summing the results, and adding the output layer's bias term. The platen reduction priority score between zero and one is generated by the output layer activation function. The output layer activation function usually uses the Sigmoid function. The Sigmoid function maps any real number to the interval between zero and one. Its mathematical expression ensures that the output value has a probabilistic interpretation meaning. The closer the score is to one, the more urgent the need for platen reduction.
[0056] The dynamic query builder's steps include parsing the compaction reduction priority scores and calculating score threshold boundary values. The parsing process reads the score values, which are floating-point numbers output by the model inference engine. The score threshold boundary values are determined by querying a predefined rule table that maps continuous score ranges to discrete priority categories; for example, scores above 0.8 are classified as "high priority," with a lower threshold boundary of 0.8. Range filtering conditions are generated based on the score threshold boundary values, constructed using WHERE clauses in a structured query language. A compound query statement is constructed by combining soil pH and organic matter content parameters. This compound query statement uses the logical AND operator to connect multiple conditions; for example, combining the pH condition "pHBETWEEN5.5AND6.5" and the organic matter condition "organic_matter<2.5" with the score range condition. Finally, an index service is connected to the organic matter knowledge base. This index service is an optimized query component provided by the database management system, accelerating data retrieval by building B-tree or bitmap indexes. Perform a multi-field joint query, matching the query across multiple fields in the organic materials knowledge base, including the priority score adaptation range field, the pH suitability range field, and the organic matter supplementation requirement field. Sort the query results by matching degree, which is a calculated score. The scoring logic can consider the degree of condition compliance, such as the absolute difference between the actual pH value and the median of the material's suitable pH range; the smaller the difference, the higher the matching degree. Return the top k best organic materials list, where k is a preset integer constant, such as 10, meaning return the ten records with the highest matching degree.
[0057] In some embodiments, the model inference engine can be implemented using deep learning frameworks such as TensorFlow or PyTorch, which provide efficient tensor computation and automatic differentiation. Weight parameter files are typically saved in framework-specific formats, such as TensorFlow's Checkpoint files or PyTorch's PKL files. When loading weights, the framework instantiates a model object with the exact same structure as when it was saved. Feature vector preprocessing needs to be consistent with that used during model training, including the same standardized mean and standard deviation. Hidden layer computation can be vectorized, performing matrix multiplication of the entire batch of feature vectors with the weight matrix, rather than iteratively processing individual samples, greatly improving computational efficiency. The choice of activation function affects the network's learning ability and training stability; the ReLU function is widely used in hidden layers due to its simplicity and ability to mitigate the vanishing gradient effect. The output layer activation function, Sigmoid, ensures that the final output falls within a specified range, and its gradient can be used for error backpropagation during training. The rule table of the dynamic query builder can be designed to be configurable, allowing users to adjust the priority thresholds according to the actual application scenario. When constructing compound query statements, attention must be paid to SQL injection security issues; parameterized queries or ORM frameworks should be used. The choice of indexing service depends on the backend database of the organic matter knowledge base; relational databases such as PostgreSQL or MySQL provide powerful indexing capabilities. Matching degree ranking algorithms can weight the importance of different conditions, for example, assigning higher weight to pH compatibility than organic matter matching. The number of results returned, k, can be flexibly configured according to the display capabilities of the front-end interface or user needs.
[0058] Optionally, the model inference engine can be deployed as a standalone microservice, receiving clean soil data and returning compaction reduction priority scores via an application programming interface (API), achieving decoupling and easy scalability. The version of the weight parameter file must strictly correspond to the version of the model architecture definition file to avoid incompatibility errors. When deploying on resource-constrained edge devices, consider quantizing the model, converting floating-point weights to integers to reduce model size and computational overhead. The dynamic query builder can support more complex query logic, such as handling fuzzy conditions with ambiguous boundaries in fuzzy queries, or introducing seasonal factors as additional query conditions. The index of the organic materials knowledge base can be periodically rebuilt to optimize query performance, especially after significant updates to the knowledge base data. The returned organic materials list can include more detailed metadata, such as material origin, cost, and application precautions, providing users with more comprehensive decision support.
[0059] Optionally, the performance of the model inference engine can be monitored and logged, recording the processing time and input / output data for each request for performance analysis and troubleshooting. For abnormal input, such as feature vectors containing illegal or missing values, the engine should have an error handling mechanism, returning a clear error code rather than crashing. The dynamic query builder can cache frequently used query patterns and their results, reducing repeated database queries and improving system response speed. The indexing service of the organic materials knowledge base can employ full-text indexing technology, supporting keyword searches on text fields such as chemical composition summaries, enhancing retrieval flexibility.
[0060] It is understandable that the model inference engine is the core of computation, applying the trained model to new data. Its correctness and efficiency directly determine the real-time performance and reliability of soil compaction assessment. Loading the correct weight parameter file is fundamental to ensuring model performance. Correct construction and input of feature vectors are prerequisites for obtaining accurate inference results. Weighted summation and activation function application in the hidden layer are key steps in neural networks simulating complex nonlinear relationships. Linear combination and Sigmoid activation in the output layer transform the high-level feature representation of the hidden layer into intuitive priority scores. The dynamic query builder transforms numerical scores into actionable data query instructions, serving as a bridge between data analysis and knowledge retrieval. Parsing scores and calculating threshold boundary values realizes the transformation from continuous values to discrete query conditions. Generating range filtering conditions is a rule-based decision-making process. Constructing compound query statements integrates soil information from multiple dimensions. Connecting index services and executing joint queries leverages the optimization capabilities of the database system. Sorting by matching degree and returning Top-k results ensures the quality and relevance of the recommendation results. Referring to Table 1, the entire workflow automates the generation of a recommended list of organic materials from soil data.
[0061] Table 1: Structure of Neural Network Model Weight Parameter File
[0062] After loading the weight parameter file shown in the table above, the model inference engine completes its computational preparation. The propagation of feature vectors from the input layer to the output layer is a deterministic forward computation process, without involving the feedback loop during training. After generating the query, the dynamic query builder submits the query task to the database connection pool for execution to manage database connection resources and improve concurrent processing capabilities. Finally, the slab reduction priority score and the matched organic material list are passed to the report generation module to form the final organic material recommendation report.
[0063] See Figure 4In the analysis of the neural network model output for prioritizing the reduction of red soil compaction, the kernel density estimation histogram is used to visualize the distribution characteristics of the compaction reduction priority scores. Specifically, the compaction reduction priority scores are calculated using a pre-trained multilayer perceptron model. The model inputs feature vectors from clean soil data (including hardness, permeability coefficient, pH, organic matter content, and soil texture), and the output layer uses a sigmoid activation function to generate continuous scores between 0 and 1. The kernel density estimation curve smooths the score frequencies, exhibiting a bimodal distribution. The left peak corresponds to low compaction (scores 0.0-0.2), and the right peak corresponds to high compaction (scores 0.8-1.0), reflecting the dichotomy between the probability distribution characteristics of the neural network output and the degree of soil compaction. Threshold divisions are marked with red dashed lines (low / medium threshold 0.3) and green dashed lines (medium / high threshold 0.6), providing a grading basis for organic material recommendations. During parameter configuration, the bandwidth parameter for kernel density estimation is automatically optimized based on Scott's rule to ensure the unbiasedness of distribution estimation; the threshold setting is verified based on historical data to balance classification accuracy and practicality.
[0064] Example 5: Steps for validating the organic material recommendation report. An independent validation dataset was used to simulate the application effect. This dataset consisted of historical red soil data records that were not used in the training of the compaction assessment algorithm. These records fully contained initial parameters such as soil hardness, permeability coefficient, pH value, organic matter content, and soil texture. Crucially, they also recorded the changes in compaction indicators such as soil hardness and permeability coefficient after a period of time following the actual application of a specific organic material to the corresponding soil. The process of simulating the application effect involved applying the recommended scheme generated from the organic material recommendation report, including the recommended material name and suggested application rate, to each record in the independent validation dataset. Specifically, the organic material type and application rate in the recommended scheme were read and matched with the actual applied organic material type and application rate recorded in the independent validation dataset. The algorithm compares the deviation between the recommended scheme and the actual compaction reduction effect. Deviation is calculated based on changes in compaction indicators. For example, it calculates the difference between the predicted compaction reduction effect and the actual observed compaction reduction effect for the same soil plot. The predicted effect is indirectly characterized by inputting the initial soil parameters from an independent validation dataset into the compaction assessment algorithm to calculate the expected change in the compaction reduction priority score after application. The actual effect is quantified by comparing the actual measured compaction indicators (such as hardness reduction and permeability increase) before and after application. When the deviation exceeds a preset tolerance, the compaction assessment algorithm parameters are readjusted. The preset tolerance is a configurable threshold; for example, the average absolute error tolerance between the predicted value of the compaction reduction priority score and the expected value calculated based on the actual effect is set to 0.15, or the prediction error tolerance for hardness reduction is set to 15%. When the deviation assessment results indicate that the systematic prediction error exceeds this tolerance, the readjustment process of the compaction assessment algorithm parameters is triggered.
[0065] In some embodiments, the deviation can be calculated using various quantitative methods. One method focuses on state comparison, comparing the expected final soil state under the recommended scheme with the actual observed final soil state. Specifically, the initial soil parameters of a record in the independent validation dataset, along with the recommended organic matter application rate, are input into a prediction model (which can be an extended version of the compaction assessment algorithm capable of simulating the effects after application) to predict an expected soil hardness and permeability coefficient after application. These predicted values are then compared with the actual post-application measurements recorded in the independent validation dataset to calculate the absolute or relative deviation. Another method focuses on improvement degree comparison, comparing the expected degree of compaction improvement with the actual degree of compaction improvement. The degree of improvement can be defined by the change in the compaction reduction priority score (Δ score). The expected Δ score is obtained by subtracting the scores calculated by the compaction assessment algorithm for the initial state and the predicted final state, while the actual Δ score is obtained by subtracting the scores calculated by the algorithm for the initial state and the actual final state. The difference between the expected Δ score and the actual Δ score is then compared. The determination of whether the deviation exceeds the preset tolerance can be based on the statistical indicators of the entire independent validation dataset, such as whether the mean absolute error, root mean square error, or coefficient of determination R² is lower than a certain threshold.
[0066] The process of readjusting the parameters of a compaction assessment algorithm is a model optimization or retraining process. Compaction assessment algorithms are typically based on pre-trained neural network models, whose parameters include the weights and biases of each layer. One way to adjust these parameters is through incremental learning, which involves using independent validation datasets as new training samples, keeping the network structure unchanged, and fine-tuning the existing model parameters using backpropagation and an optimizer to make the model's predictions for this new batch of data closer to the actual observations. Another approach is to adjust specific thresholds or scaling factors in the model. For example, if the model systematically overestimates the improvement effect of a certain organic material, the feature weights associated with that material can be downgraded. The readjustment process may require multiple iterations. After each adjustment, the bias is re-evaluated using the same or another independent validation dataset until the bias falls within a preset tolerance. After completing the parameter adjustment, the updated model parameters need to be saved, and the original compaction assessment algorithm model needs to be replaced. Subsequent organic material recommendations will be based on the optimized algorithm.
[0067] In some embodiments, the construction of independent validation datasets needs to meet certain requirements. The samples in the independent validation datasets should be representative, covering common red soil types, compaction levels, and organic material application scenarios in the target area. Data in each record must be accurate and reliable; the methods and timing of soil parameter measurements should be consistent; and actual application records must be detailed and accurate, including the specific type of organic material, application rate, application time, and post-application management measures. The setting of preset tolerances needs to be combined with actual agronomical needs and technical feasibility. Overly lenient tolerances may lead to poor recommended solutions, while overly strict tolerances may make the model adjustment process difficult to converge or lead to overfitting. When deviations exceed the preset tolerances, in addition to readjusting the compaction assessment algorithm parameters, manual analysis can be used to check for data quality issues, whether the model is suitable for new soil types or organic materials, or whether the recommendation logic needs to be revised.
[0068] Optionally, the validation process can be executed automatically periodically, such as every six months or year, updating the independent validation dataset with newly accumulated field trial data to achieve continuous optimization of the recommendation system. A validation report can be generated, recording information about the independent validation dataset used in this validation, bias calculation results, parameter adjustment details, and performance comparisons before and after adjustments. When simulating application effects, the influence of environmental factors can be considered, such as incorporating precipitation and temperature data into the prediction model to make the simulation closer to real conditions. For individual cases with significant biases, case studies can be conducted to analyze the causes in depth and provide specific directions for model improvement.
[0069] Optionally, preset tolerances can be set with different standards based on different compaction indices or priority score ranges. For example, the prediction tolerance for severely compacted soil can be appropriately relaxed, while the prediction requirements for slightly compacted soil can be more stringent. When readjusting the compaction assessment algorithm parameters, a method of retaining a portion of the latest data as a test set can be adopted to prevent overfitting to the independent validation dataset during the adjustment process. The management of the independent validation dataset can be versioned to facilitate tracking the relationship between model performance changes and data updates.
[0070] Optionally, deviation comparison is not limited to numerical comparison; it can also be combined with statistical significance testing to determine whether the difference between the predicted and observed values is statistically significant, thereby more scientifically determining whether model adjustments are needed. For the organic materials knowledge base itself, if it is found that the actual effects of certain materials consistently deviate significantly from the descriptions in the knowledge base, the validation process can also trigger suggestions for updating the organic materials knowledge base.
[0071] It is understandable that validating the organic material recommendation report is an important feedback loop mechanism, utilizing historical practice data to test and calibrate the predictive accuracy of the recommendation system. Using a dataset independent of the model training dataset for evaluation ensures the objectivity of the validation results. Simulating application effects provides a low-cost, high-efficiency validation method, assessing the potential effects of the recommended scheme without conducting new field trials. Comparing the deviation between the recommended scheme and the actual reduction effect is a key step in quantifying the performance of the recommendation system. Preset tolerances provide clear criteria for determining whether system adjustments are needed. Readjusting the compaction assessment algorithm parameters allows the recommendation system to learn from historical experience, adapt to new data patterns, continuously improve the scientific rigor and reliability of the recommendations, and form a continuously self-improving ecosystem. This process helps enhance user trust in the recommendation results and ultimately improves the actual effectiveness of red soil improvement.
[0072] See Figure 5 In the organic material recommendation system for reducing red soil compaction, the quantitative evaluation of hardness improvement is achieved by comparing actual observed values with model predictions. Specifically, the average hardness improvement value is used as a key performance indicator, visualized in bar charts for four organic material types (manure, compost, straw, and green manure). Blue bars represent actual improvement values based on field trial measurements, while red bars represent predicted improvement values generated by the compaction assessment algorithm. The similarity in bar heights is used to verify the accuracy of the prediction model. Compost shows the most significant improvement, with an actual value of 7.48 slightly higher than the predicted value of 7.32, indicating a slight underestimation of compost by the model but overall reliability. Manure and straw show lower improvement values with minimal difference between actual and predicted values; the actual value for green manure is almost identical to the predicted value, demonstrating high accuracy of the prediction model for this material type. In the parameter configuration, the vertical axis scale range is set from 0 to 824 to cover the possible dynamic range of improvement values, but the actual data is concentrated in the range below 10, highlighting the model's robustness in the low-value region.
[0073] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for recommending organic materials based on the reduction of red soil compaction, characterized in that, The method is implemented through the following process: Data on compaction index and soil environmental parameters of red soil were collected. The compaction index data included soil hardness and permeability coefficient, and the soil environmental parameters included pH value, organic matter content and soil texture. The collected data on compaction indicators and soil environmental parameters are integrated to form a comprehensive dataset of red soil. The quality of the red soil comprehensive dataset was checked, outliers and missing values were removed, and clean soil data was generated. The clean soil data was processed using a compaction assessment algorithm to calculate the compaction reduction priority score. Based on the priority score for reducing compaction, a list of matching organic materials is retrieved from the organic materials knowledge base, which stores the types, composition characteristics, and application ranges of organic materials. An organic material recommendation report is generated based on the search results. The organic material recommendation report includes the recommended material name, suggested application amount, and application time.
2. The method for recommending organic materials based on the reduction of red soil compaction according to claim 1, characterized in that, The process of collecting data on compaction indicators and soil environmental parameters of red soil includes: deploying an intelligent soil monitoring network, with each monitoring node equipped with a miniature sensor array to measure soil hardness and permeability in real time; simultaneously accessing agricultural data cloud services to download historical soil environmental parameter datasets, including pH value, organic matter content, and soil texture records; and using a time-series alignment engine to perform timestamp matching and interpolation compensation on real-time monitoring data and historical data to generate a synchronized soil data stream.
3. The method for recommending organic materials based on red soil compaction reduction according to claim 2, characterized in that, The process of integrating the collected compaction index data and soil environmental parameters includes: inputting soil hardness, permeability coefficient, pH value, organic matter content and soil texture data into the spatial data integration framework; performing geographic coordinate normalization processing to unify all data to the same projected coordinate system; applying data format conversion protocols to convert multi-source data into standard structured tables and embedding spatial location metadata to form a comprehensive red soil dataset.
4. The method for recommending organic materials based on red soil compaction reduction according to claim 3, characterized in that, The process of quality verification of the red soil comprehensive dataset includes: running an anomaly detection routine based on cluster analysis to identify and isolate statistical outliers in the data; and using spatial interpolation algorithms to fill and reconstruct missing spatial data blocks based on neighboring point data.
5. The method for recommending organic materials based on red soil compaction reduction according to claim 4, characterized in that, The process of processing clean soil data using the compaction assessment algorithm includes: loading a pre-trained neural network model, inputting hardness values, permeability coefficients, pH values, organic matter content, and texture feature vectors from the clean soil data; calculating compaction reduction priority scores through the model inference engine, with the score scale set to continuous values between zero and one; the model inference process is based on a multilayer perceptron architecture, passing features layer by layer and outputting assessment results.
6. The method for recommending organic materials based on red soil compaction reduction according to claim 5, characterized in that, The process of retrieving a matching list of organic materials from the organic materials knowledge base includes: activating a dynamic query builder based on the priority score for compaction reduction, generating score threshold filtering conditions; connecting to the index service of the organic materials knowledge base, performing multi-condition matching queries, and prioritizing the retrieval of organic material types compatible with soil pH and organic matter content; and returning a list of results including organic material identifiers, chemical composition summaries, and recommended application rate ranges.
7. The method for recommending organic materials based on red soil compaction reduction according to claim 5, characterized in that, The steps for constructing the pre-trained neural network model include: obtaining red soil compaction sample data from a historical soil database, the red soil compaction sample data including soil hardness, permeability coefficient, pH value, organic matter content, and soil texture; standardizing the red soil compaction sample data to generate a training dataset; constructing a multilayer perceptron model architecture, setting the number of input layer nodes to match the feature dimension, adopting a fully connected structure for the hidden layer, and having a single node for the output layer; iteratively training the training dataset using the backpropagation algorithm and adjusting the model weight parameters; evaluating the model accuracy through a validation dataset, saving the model parameters that have reached the preset accuracy, and completing the pre-training process.
8. The method for recommending organic materials based on red soil compaction reduction according to claim 5, characterized in that, The working steps of the model inference engine include: loading the weight parameter file of the pre-trained neural network model; inputting the feature vectors from the clean soil data into the model input layer; performing a weighted summation operation in the hidden layer and applying an activation function for nonlinear transformation; passing the output of the hidden layer to the output layer for linear combination; and generating a compaction reduction priority score between zero and one through the output layer activation function.
9. The method for recommending organic materials based on red soil compaction reduction according to claim 6, characterized in that, The working steps of the dynamic query builder include: parsing the compaction reduction priority score and calculating the score threshold boundary value; generating range filtering conditions based on the score threshold boundary value; constructing a composite query statement by combining soil pH value and organic matter content parameters; connecting to the index service of the organic material knowledge base and performing a multi-field joint query; sorting the query results by matching degree and returning the top k optimal organic material lists.
10. The method for recommending organic materials based on red soil compaction reduction according to claim 7, characterized in that, The method also includes a step of verifying the organic material recommendation report: using an independent verification dataset to simulate the application effect, comparing the deviation between the recommended scheme and the actual reduction effect, and readjusting the compaction assessment algorithm parameters when the deviation exceeds a preset tolerance.