Farmland soil health detection method and system based on deep learning
By decoupling soil spectral signals through a deep learning-based dual-branch feature decoupling network, chemical and physical characteristics are obtained, solving the problem of interference between soil physical state and chemical composition detection. This achieves quantitative fusion of soil health and soil moisture status, generates differentiated agricultural regulation strategies, and improves detection accuracy and management efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-23
- Publication Date
- 2026-03-27
AI Technical Summary
In existing technologies for soil health testing, changes in soil physical state, especially moisture content, significantly interfere with the detection of chemical components, affecting the accuracy of the tests. Furthermore, the lack of effective integration between soil fertility assessment and irrigation decisions leads to fragmented management practices, making it difficult to achieve synergistic optimization of water and fertilizer resources.
A deep learning-based dual-branch feature decoupling network is used to obtain chemical and physical feature vectors by decoupling soil spectral signals. Combined with predicted chemical composition and soil moisture content, a comprehensive health index and soil moisture anomaly index are calculated to generate differentiated agricultural regulation strategies.
It significantly improves the accuracy and robustness of soil chemical composition detection, realizes the quantitative integration of soil health and soil moisture status, constructs a unified comprehensive decision-making risk factor, generates differentiated intelligent agricultural regulation strategies, and realizes the automation, precision and on-demand precise allocation of resources in farmland management.
Smart Images

Figure CN121745489A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart agriculture and soil health testing technology, specifically to a method and system for testing farmland soil health based on deep learning. Background Technology
[0002] With the continuous advancement of precision agriculture technology, real-time and accurate monitoring of farmland soil health has become a key link. Soil health involves multiple dimensions such as chemical, physical and biological aspects, among which chemical fertility and physical moisture are two core dynamic variables affecting crop growth.
[0003] Current technologies primarily utilize spectral analysis to detect soil chemical components, but they generally face a major challenge: changes in soil physical state, especially moisture content, can significantly interfere with spectral signals, severely impacting the accuracy of chemical component detection. Furthermore, existing farmland management systems typically treat soil fertility assessment and irrigation decisions as two independent processes, lacking an effective integration mechanism. This fragmented management approach leads to biased decision-making and hinders the synergistic optimization of water and fertilizer resources. Therefore, eliminating the coupling interference of soil physical state on chemical component detection to improve accuracy, and on this basis, integrating soil health and moisture status to construct an integrated intelligent decision-making and closed-loop control strategy, are urgent technical problems that need to be solved in the field of smart agriculture. Summary of the Invention
[0004] The purpose of this invention is to provide a method and system for detecting farmland soil health based on deep learning. It aims to improve detection accuracy by decoupling soil spectral signals to eliminate interference from physical states such as soil moisture content on chemical component detection. Simultaneously, it effectively integrates the decoupled chemical health status with the physical soil moisture status to generate an integrated comprehensive decision-making risk assessment. Based on this assessment, it generates closed-loop, differentiated intelligent agricultural regulation strategies, solving the problems of low detection accuracy and the disconnect between health assessment and irrigation decisions in existing technologies. Specifically, the technical solution of this invention is as follows:
[0005] A deep learning-based method for detecting farmland soil health includes:
[0006] S1, based on the collected farmland soil spectral signals, chemical feature vectors and physical feature vectors are obtained through a preset dual-branch feature decoupling network;
[0007] S2, based on chemical feature vectors, predicts the chemical composition of soil.
[0008] S3, combining the predicted values of chemical components with the preset ideal values and tolerable deviations of chemical components, calculates the comprehensive health index;
[0009] S4. Determine the soil health level based on the comprehensive health index and the preset health level threshold.
[0010] S5, based on physical feature vectors, inverts soil moisture content;
[0011] S6, based on soil moisture content, calculate the soil moisture anomaly index;
[0012] S7, combining the comprehensive health index and the soil moisture abnormality index, determines the comprehensive decision-making risk factors;
[0013] S8 generates differentiated agricultural regulation strategies by matching a pre-set regulatory strategy library with comprehensive decision-making risk factors.
[0014] Preferred dual-branch feature decoupling network processing includes:
[0015] The spectral signal is deconstructed into chemical feature vectors and physical feature vectors through a network structure that includes an encoder, a chemical feature branch, a physical feature branch, and a decoder.
[0016] The network structure is trained using a pre-defined joint loss function to separate chemical and physical features. The joint loss function includes: reconstruction loss, chemical prediction loss, physical prediction loss, and orthogonal loss.
[0017] Preferably, the calculation of the comprehensive health index includes:
[0018] Based on the predicted values of chemical components, the ideal values of chemical components, and the tolerable deviations, the individual health scores of each chemical component are calculated using a Gaussian function.
[0019] The individual health scores are weighted and summed to generate a comprehensive health index.
[0020] Preferably, the calculation of soil moisture anomaly index includes:
[0021] Calculate the average moisture content and standard deviation of moisture content for all plots within the monitoring area;
[0022] By combining the soil moisture content, average moisture content, and standard deviation of moisture content for each plot unit, the soil moisture anomaly index is calculated using the standardized fraction method.
[0023] Preferably, the comprehensive decision-making risk factors are determined, including:
[0024] Convert the comprehensive health index into a health risk measure;
[0025] Obtain the absolute value of the soil moisture anomaly index as a measure of soil moisture risk;
[0026] A weighted sum of health risk measures and soil moisture risk measures is used to generate a comprehensive decision-making risk factor.
[0027] Preferred, differentiated agricultural regulation strategies include:
[0028] If the comprehensive decision-making risk factor is less than the preset first-level control risk threshold, it is determined to be a normal state.
[0029] If the comprehensive decision-making risk factor is greater than the primary control risk threshold but less than or equal to the preset secondary control risk threshold, a refined control strategy is generated.
[0030] If the comprehensive decision-making risk factor exceeds the secondary regulation risk threshold, an emergency intervention strategy is generated.
[0031] A deep learning-based farmland soil health monitoring system includes:
[0032] The feature extraction module is used to obtain chemical and physical feature vectors based on the collected farmland soil spectral signals through a preset dual-branch feature decoupling network.
[0033] The chemical prediction module is used to predict the chemical composition of soil based on chemical feature vectors.
[0034] The health assessment module is used to calculate a comprehensive health index by combining the predicted values of chemical components with the preset ideal values and tolerable deviations of chemical components.
[0035] The grading module is used to determine the soil health level based on the comprehensive health index and preset health level thresholds;
[0036] The moisture inversion module is used to invert soil moisture content based on physical feature vectors.
[0037] The soil moisture diagnosis module is used to calculate the soil moisture anomaly index based on soil moisture content;
[0038] The risk fusion module is used to combine the comprehensive health index and the soil moisture abnormality index to determine the comprehensive decision-making risk factors.
[0039] The decision generation module is used to generate differentiated agricultural regulation strategies by matching a pre-set regulatory strategy library with comprehensive decision risk factors.
[0040] The preferred health assessment module includes:
[0041] The scoring unit is used to calculate the individual health score of each chemical component based on the predicted chemical component value, the ideal chemical component value, and the tolerable deviation using a Gaussian function.
[0042] The index generation unit is used to weight and sum the individual health scores to generate a comprehensive health index.
[0043] Compared with the prior art, the present invention has the following beneficial effects:
[0044] 1. This invention effectively separates the coupled chemical and physical information in soil spectral signals through deep learning networks, eliminating the interference of changes in physical states such as soil moisture content on the detection of chemical components, and significantly improving the accuracy and robustness of soil chemical component detection.
[0045] 2. This invention quantitatively integrates soil chemical health assessment and physical moisture diagnosis to construct a unified comprehensive decision-making risk factor, breaking down the barriers between traditional soil health management and water resource management, realizing the synergistic consideration of the two core risk sources of nutrients and water, and providing a decision-making core for integrated intelligent management;
[0046] 3. This invention constructs a complete technical solution from data collection and intelligent analysis to closed-loop regulation. By comprehensively assessing soil health and moisture, it can automatically match and generate differentiated agricultural regulation strategies, realizing a complete closed loop from accurate detection to intelligent decision-making, and providing efficient technical support for the automated and precise management of farmland.
[0047] 4. By establishing a graded response mechanism based on comprehensive risk, this invention can intelligently match different levels of agricultural strategies, from routine monitoring and fine-tuning to emergency compound intervention, according to the severity of the risk. This differentiated decision-making model enables the precise and on-demand allocation of production resources such as water and fertilizer, effectively controlling risks while maximizing the management efficiency and resource utilization efficiency of agricultural production. Attached Figure Description
[0048] The present invention will be further explained below with reference to the accompanying drawings and embodiments:
[0049] Figure 1 This is a flowchart of the method of the present invention;
[0050] Figure 2 This is a structural diagram of the system of the present invention. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments.
[0052] Example 1:
[0053] Please see Figure 1 A comprehensive method for detecting farmland soil health based on deep learning, comprising:
[0054] S1, based on the collected farmland soil spectral signals, chemical feature vectors and physical feature vectors are obtained through a preset dual-branch feature decoupling network;
[0055] S2, based on chemical feature vectors, predicts the chemical composition of soil.
[0056] S3, combining the predicted values of chemical components with the preset ideal values and tolerable deviations of chemical components, calculates the comprehensive health index;
[0057] S4. Determine the soil health level based on the comprehensive health index and the preset health level threshold.
[0058] S5, based on physical feature vectors, inverts soil moisture content;
[0059] S6, based on soil moisture content, calculate the soil moisture anomaly index;
[0060] S7, combining the comprehensive health index and the soil moisture abnormality index, determines the comprehensive decision-making risk factors;
[0061] S8 generates differentiated agricultural regulation strategies by matching a pre-set regulatory strategy library with comprehensive decision-making risk factors.
[0062] This embodiment provides a comprehensive detection method for farmland soil health based on deep learning. The method aims to achieve synchronous and accurate assessment of soil chemical health status and physical moisture status through deep analysis of farmland soil spectral signals, and further generate a closed-loop intelligent agricultural regulation strategy, thereby solving the problems of low accuracy in chemical component detection caused by soil physical status, especially moisture interference, and the disconnect between health assessment and irrigation decision-making in the existing technology.
[0063] In a complete business process, this method includes the following steps:
[0064] S1. Based on the collected farmland soil spectral signals, chemical and physical feature vectors are obtained through a pre-defined dual-branch feature decoupling network. The dual-branch feature decoupling network is a specially designed deep learning model whose technical purpose is to effectively separate the coupled soil chemical and physical state information contained in a single spectral signal. In this embodiment, the network extracts a hybrid feature vector from the original spectral signal through a shared encoder. This hybrid feature vector is fed into two parallel dedicated branches: a chemical feature branch and a physical feature branch, which are used to extract chemical feature vectors that are highly correlated with the soil chemical composition but do not change with the physical state. And physical feature vectors that are highly correlated with soil physical states such as moisture content but are unaffected by chemical composition. The innovation of this design lies in the fact that it does not simply perform multi-task prediction, but forces the features learned by the two branches to be mathematically independent or orthogonal through a special loss function, thereby eliminating the interference of physical state on chemical detection.
[0065] S2, Based on chemical feature vectors, predict the chemical composition of the soil; the purpose of this step is to use the pure chemical feature vectors obtained in the previous step, which have been freed from interference from physical state, for accurate quantitative analysis; chemical feature vectors It is input into a subsequent chemical composition predictor. In the middle; the predictor is one or more regression models, such as a fully connected network, which are trained to build from... Mapping relationships to specific chemical components such as organic matter, total nitrogen, available phosphorus, and available potassium concentrations; due to input Due to its purity, this predictor can output more stable and accurate chemical composition predictions than existing technologies. ,in The indicator is numbered; for example, the predictor can be specifically implemented as a feedforward neural network with two hidden layers, each with 64 neurons and using the ReLU activation function, whose output layer has the same number of neurons as the chemical component to be predicted.
[0066] S3, combining the predicted chemical composition values with the preset ideal chemical composition values and tolerable deviations, calculates the comprehensive health index; this step aims to transform multidimensional and complex chemical composition data into a single, intuitive health measure; the comprehensive health index... It is a dimensionless scalar used for macroscopic evaluation of overall soil fertility; its calculation not only considers current predicted values of chemical composition. It also introduced two key agronomical prior parameters: ideal values of chemical composition. and tolerable deviation The former refers to the nutrient standard most suitable for the growth of a specific crop in the current plot, while the latter defines the acceptable range of nutrient levels deviating from the ideal value. By combining these three through a specific mathematical model, a quantitative assessment of soil health status is achieved, which reflects the principle in agricultural production that too much or too little nutrient is not ideal.
[0067] S4. Determine the soil health level based on the comprehensive health index and preset health level thresholds; to facilitate user understanding and decision-making, this step will use the continuous comprehensive health index calculated in the previous step. The health level is discretized into easily interpretable levels; the health level threshold is a dividing point set based on a large amount of historical data or the experience of agricultural experts; for example, in this embodiment, the health level is divided into four levels: Excellent. ,good ,middle sum and difference These thresholds are set based on statistical analysis of historical soil data and their corresponding crop yields to find index quantiles that can significantly distinguish yield performance, thus ensuring the scientific and practical nature of the grading.
[0068] S5, based on the physical feature vector, inverts the soil moisture content; this step is parallel to S2, and its purpose is to utilize another key piece of information, the physical feature vector, separated by the feature decoupling network. To monitor the physical state of the soil; It is fed into a separate physical state predictor This predictor is also a regression model specifically designed to inversely calculate high-resolution soil moisture content. ,in The plot units are numbered; this reflects the multiple uses of spectral information, transforming physical information, which was originally a distractor, into a valuable byproduct; the structure of this regression model can be similar to that of a chemical composition predictor, but its training objective is to minimize the mean square error between the predicted water content and the actual water content.
[0069] S6, Based on soil moisture content, calculate the soil moisture anomaly index; this step aims to assess the spatial uniformity of soil moisture distribution and identify excessively dry or excessively wet local areas; soil moisture anomaly index. It is a standardized, dimensionless metric used to represent a specific land parcel. Moisture content The degree of deviation from the average level of the entire monitoring area; calculated using a statistical method, this index can eliminate the influence of the absolute moisture content value itself, intuitively reflecting the relative spatial anomalies, and providing a basis for precise irrigation or drainage;
[0070] S7, Combining the comprehensive health index and the soil moisture anomaly index, determine the comprehensive decision-making risk factor; this step is the core of this invention to achieve closed-loop regulation of health and soil moisture, and its purpose is to integrate the chemical health risk and physical moisture risk of soil into a unified decision-making indicator; comprehensive decision-making risk factor It is a quantitative, dimensionless risk score; it is constructed through a linear weighted model that integrates factors from... Transformed health risk measures and derived from The resulting measurement of soil moisture risk;
[0071] S8. Based on comprehensive decision-making risk factors, a pre-set control strategy library is matched to generate differentiated agricultural control strategies; this method is based on comprehensive decision-making risk factors. The system automatically matches and outputs corresponding management instructions based on the numerical value; the control strategy library is a predefined database containing agricultural operations at different levels; by setting different risk thresholds, the system can generate differentiated agricultural control strategies, such as no intervention required when the status is normal, initiating variable fertilization or irrigation, or issuing high-priority compound intervention alarms, thereby achieving a complete closed loop from data analysis to intelligent decision-making.
[0072] This invention, through a unified deep learning framework, achieves for the first time the effective decoupling of chemical and physical information in soil spectral signals. This improves the accuracy of chemical component detection while utilizing physical state information as a valuable resource. The method can independently assess soil chemical health and physical moisture, and integrate them into a comprehensive risk factor, thereby generating differentiated closed-loop control strategies. Compared to existing technologies, this invention solves the problem of inaccurate detection caused by moisture changes, breaks down the barriers between soil health management and water resource management, and provides a complete, efficient, and logically consistent technical solution for achieving intelligent, precise, and automated farmland management.
[0073] This method focuses on two core variable and quantifiable dimensions of soil health: chemical fertility and physical moisture. It aims to provide key decision-making basis for agricultural regulation by synchronously and accurately detecting and integrating information from these two aspects. Although a complete soil health assessment system also involves biological characteristics, this invention solves the most intractable problem of chemical-moisture information coupling interference in the current technology, which is an important advancement in achieving comprehensive intelligent management.
[0074] Example 2:
[0075] Dual-branch feature decoupling network processing includes:
[0076] The spectral signal is deconstructed into chemical feature vectors and physical feature vectors through a network structure that includes an encoder, a chemical feature branch, a physical feature branch, and a decoder.
[0077] The network structure is trained using a pre-defined joint loss function to separate chemical and physical features. The joint loss function includes: reconstruction loss, chemical prediction loss, physical prediction loss, and orthogonal loss.
[0078] This embodiment is a detailed description of the dual-branch feature decoupling network processing method described in Embodiment 1; the design of this network is the cornerstone for achieving the core technical effects of this invention;
[0079] The described dual-branch feature decoupling network adopts a variant paradigm of an autoencoder in its structure, which mainly consists of four parts:
[0080] The encoder receives the raw spectral signal. As input, it is compressed and extracted into a hybrid feature vector containing mixed chemical and physical information through a series of convolutional or recurrent layers;
[0081] The chemical feature branch, a dedicated network module such as a fully connected layer, receives mixed feature vectors and is trained to specifically extract chemical feature vectors sensitive to chemical composition. ;
[0082] The physical feature branch, another dedicated network module running parallel to the chemical branch, receives mixed feature vectors and is trained to specifically extract physical feature vectors sensitive to physical states such as moisture. ;
[0083] decoder Receive the decoupled chemical feature vector and physical feature vectors They then attempted to recombine these signals to reconstruct the original spectral signal. ;
[0084] To drive the network to effectively separate the aforementioned chemical and physical features, this embodiment designs and employs a pre-defined joint loss function for end-to-end training. This loss function is key to achieving feature decoupling; essentially, it is an optimization objective for multi-task learning, consisting of four key parts:
[0085] in: The total loss is a dimensionless scalar and represents the ultimate goal of the entire network optimization.
[0086] The weight coefficients are dimensionless scalars that serve as model hyperparameters. They are determined using well-known model tuning methods, such as grid search, on the validation set and are used to balance the importance of each loss term.
[0087] The joint loss function includes:
[0088] Reconstruction loss Its purpose is to ensure the decoupled feature vectors and Together, they retain all the information sufficient to reconstruct the original signal, preventing information loss during decoupling; it calculates the decoder output. Compared with the original spectral signal The mean squared error between the two values is defined by the L2 norm; to eliminate dimensions, this loss uses the variance of the spectral signals in the training dataset. Perform normalization;
[0089] Chemical Predicted Loss This is a standard supervised learning loss term, designed to drive the chemical feature branch to learn features that truly predict chemical composition; it calculates the chemical composition predictor... Output and true chemical composition values Defined by the mean square error between them, and using the variance of the true chemical values. Perform normalization;
[0090] Physical prediction loss Similar to chemical prediction loss, its purpose is to drive the physical feature branch to learn features that can predict physical states; it calculates the physical state predictor. Output and physical state true value Defined by the mean square error between them, and using the variance of the physical true value. Perform normalization;
[0091] Orthogonal loss This is the core innovative design for achieving feature decoupling; its concept of orthogonalizing the feature space is that if two vectors are orthogonal to each other, they are linearly independent; this loss minimizes the chemical eigenvectors. With physical eigenvectors absolute value of the dot product This is achieved by penalizing the correlation between two vectors; the loss function forces the network to fully assign chemistry-related features during the learning process. Completely assigning physical-related features to This achieves the purpose of decoupling; since the feature vector itself is a normalized abstract representation, the loss term is naturally dimensionless and requires no additional processing.
[0092] Compared to traditional multi-task learning networks that are trained solely on their respective prediction losses, this embodiment creatively introduces orthogonal loss and reconstruction loss to construct a four-in-one joint loss function. This design not only ensures the prediction accuracy of each branch, but more importantly, it mathematically enforces the orthogonality of feature vectors with different physical meanings in the feature space, thereby obtaining pure, interference-free chemical and physical features. This greatly improves the accuracy and robustness of subsequent chemical composition prediction, making it unaffected by changes in physical states such as soil moisture. It successfully separates physical information as a usable resource, providing high-quality data input for subsequent soil moisture monitoring and realizing value-added utilization of information. It should be noted that forcing feature orthogonality is an effective approximation and engineering simplification of complex physical coupling relationships. Its core goal is not to perfectly reproduce the physical interaction process, but to maximize the elimination of linear interference of physical states on chemical prediction tasks at the feature level, thereby obtaining more robust and accurate chemical composition detection results in practical applications.
[0093] Example 3:
[0094] Calculating the overall health index includes:
[0095] Based on the predicted values of chemical components, the ideal values of chemical components, and the tolerable deviations, the individual health scores of each chemical component are calculated using a Gaussian function.
[0096] The individual health scores are weighted and summed to generate a comprehensive health index.
[0097] This embodiment describes the calculation of the comprehensive health index as described in Embodiment 1. Further refinement of the method; the design of this calculation process fully integrates agronomic expertise, making it not only a combination of mathematics, but also a simulation of the laws of agricultural production;
[0098] The process consists of two steps: calculating the individual health score for each chemical component and then summing all the individual scores using a weighted average.
[0099] Calculate the individual health scores for each chemical component using the Gaussian function;
[0100] This step aims to provide the predicted value for each chemical component. This is transformed into a health score between 0 and 1; its core lies in the use of a Gaussian function, the technical motivation of which is to accurately simulate the principle of moderation in agricultural production, that is, nutrient content is not necessarily better the higher it is, but there is an optimal range, and too low or too high will have a negative impact on crop growth; the natural bell curve of the Gaussian function perfectly matches this concept; for the first... The calculation method for the individual health score of each chemical indicator is as follows:
[0101] in: For the first The individual health score for each indicator is a dimensionless scalar, calculated using this formula;
[0102] For the first The predicted value of the item, whose physical dimension is chemical concentration such as mg / kg, comes from the output of the chemical composition predictor in step S2;
[0103] For the first The ideal values of the chemical composition of each indicator are expressed in terms of chemical concentration, such as mg / kg. These values are preset based on the target crop type and local agricultural standards, and are derived from agronomic literature or local soil fertility standards.
[0104] For the first The tolerable deviation of the indicator, whose physical dimension is chemical concentration such as mg / kg, similarly defines the acceptable width of deviation from the ideal value. When setting parameters, the tolerable deviation... It must be a positive number, that is If a certain indicator is theoretically not allowed to have any deviation, it can be... Set it to a very small positive value, for example To ensure the numerical stability of the calculation;
[0105] When the predicted value Exactly equal to the ideal value When the exponent is 0, the score is... The maximum value is 1; when and When the gap widens, the score It descends smoothly in the form of a Gaussian curve, approaching 0;
[0106] The individual health scores are weighted and summed to generate a comprehensive health index;
[0107] After obtaining the individual health scores for all chemical indicators, this step combines them into an overall comprehensive health index through a weighted summation. ;
[0108] in: The comprehensive health index is a dimensionless scalar quantity, calculated by this formula, and is the final output of step S3.
[0109] The total number of chemical index types is an integer and is predefined.
[0110] For the first The weights of each indicator are dimensionless coefficients, determined by agronomic experts based on sensitivity analyses of the effects of different nutrients on the yield of specific crops, and satisfy the following conditions: This weighting method, based on expert knowledge and data analysis, is a common technique in the development of agricultural decision support systems.
[0111] Compared to the simple method of linearly adding normalized indicators, this embodiment introduces a Gaussian function to calculate individual scores. This results in an evaluation model that more closely reflects the objective laws of agricultural production. It accurately penalizes both excessively high and low nutrient levels, avoiding the flaw in traditional models where an extremely high nutrient level can erroneously inflate the overall score. Furthermore, it incorporates weighting coefficients set by expert knowledge. This allows the assessment results to highlight the decisive impact of key nutrients on crop growth, resulting in a more comprehensive health index. It is not just a mathematical score, but a more precise and scientific indicator of soil health with clear agronomic guidance.
[0112] Example 4:
[0113] The calculation of soil moisture anomaly index includes:
[0114] Calculate the average moisture content and standard deviation of moisture content for all plots within the monitoring area;
[0115] By combining the soil moisture content, average moisture content, and standard deviation of moisture content for each plot unit, the soil moisture anomaly index is calculated using the standardized fraction method.
[0116] This embodiment describes the calculation of the soil moisture anomaly index as described in Embodiment 1. The method is described in detail below. The core of this method is to use the standardized score method in statistics, namely the Z-score method. Its purpose is to provide a relative soil moisture evaluation index that is not affected by the unit and magnitude of absolute water content and has universal comparative significance.
[0117] The solution process mainly includes the following steps:
[0118] Calculate the average moisture content and standard deviation of moisture content for all plots within the monitoring area;
[0119] The entire monitoring area was scanned, and the soil moisture content of a series of plots was obtained through step S5. , ,in After determining the total number of land parcels, calculate these two global statistical parameters.
[0120] average moisture content The calculation method is as follows:
[0121] Standard deviation of moisture content The calculation method is as follows:
[0122] in: The average moisture content, compared with The units are the same, such as %, and are calculated in real time from the moisture content of all plots in the current batch;
[0123] The standard deviation of moisture content, and Units with the same dimensions, such as %, are the same as above;
[0124] For the first The soil moisture content of each plot unit, expressed in percentage (%), is obtained by inversion in step S5.
[0125] By combining the soil moisture content, average moisture content, and standard deviation of moisture content of each plot unit, the soil moisture anomaly index is calculated using the standardized fraction method.
[0126] For each plot unit Its soil moisture abnormality index The calculation formula is as follows:
[0127] The physical meaning of this formula is to calculate the land parcel. Moisture content Distance from average moisture content How many standard deviations are there from the target value; for example, This indicates that the plot of land is 2 standard deviations wetter than the average level, while This indicates that the plot of land is 1.5 standard deviations below the average level; since the numerator and denominator have the same dimensions, the final... It is a dimensionless exponent, which facilitates standardized threshold judgment; however, in practical implementation, the standard deviation of water content needs to be considered. A special case where it is zero, when When the soil moisture content is completely uniform across all plots within the monitoring area, indicating no spatial anomalies, the soil moisture anomaly index for all plots should be calculated. Set it directly to 0; in addition, to prevent... extremely small and thus Numerical explosion can be mitigated by introducing a smoothing term. For example, a very small positive number The formula is then corrected to This ensures the stability of the calculation;
[0128] Compared to directly using soil moisture content The absolute value is used for judgment. In this embodiment, the soil moisture anomaly index is calculated using a standardized fraction method. It transforms raw data from different regions and times, which may have different baseline moisture contents, into a standardized index with a uniform scale that describes the degree of relative deviation. This enables the identification of relative drought or waterlogging in local areas, even if the absolute moisture content of the entire region is at a high or low level. Furthermore, it allows for the setting of universally applicable early warning thresholds, such as... This provides the possibility for drainage early warning, enhances the model's versatility and robustness, and thus enables more scientific and accurate diagnosis of spatial soil moisture anomalies.
[0129] Example 5:
[0130] Identify comprehensive decision-making risk factors, including:
[0131] Convert the comprehensive health index into a health risk measure;
[0132] Obtain the absolute value of the soil moisture anomaly index as a measure of soil moisture risk;
[0133] A weighted sum of health risk measures and soil moisture risk measures is used to generate a comprehensive decision-making risk factor.
[0134] This embodiment describes the determination of comprehensive decision-making risk factors as described in Embodiment 1. The specific implementation of the method; its core idea is to construct a multi-factor risk assessment model, quantifying and integrating two different agricultural risks—chemical nutrient imbalance and physical water stress—into a single, actionable risk metric; this risk factor is tailored to each plot unit. Independent calculations are performed to provide a basis for subsequent spatially differentiated control strategies. When calculating the risk factors of a specific plot of land, the comprehensive health index of the region to which the plot belongs is used. As a chemical health background, and combined with the site's own abnormal soil moisture index. ;
[0135] This determination process is achieved through the following steps:
[0136] Convert the comprehensive health index into a health risk measure;
[0137] Comprehensive Health Index It is a positive indicator; the closer its value is to 1, the better the health condition and the lower the risk. To incorporate it into the risk model, a reverse transformation is required. The transformation method used in this embodiment is as follows:
[0138] Health risk measurement = Through this linear transformation, the value range of the health risk measure remains around 0,1, but its meaning changes to: the closer the value is to 1, the higher the risk caused by nutrient imbalance.
[0139] Obtain the absolute value of the soil moisture anomaly index as a measure of soil moisture risk;
[0140] Soil moisture abnormality index The positive and negative signs represent two different abnormal states: excessive moisture and excessive dryness, respectively. However, from a risk assessment perspective, both states, which significantly deviate from normal moisture content, pose stress to crops and are considered risks. Therefore, this embodiment uses the absolute value of the soil moisture anomaly index. This method will be used to uniformly measure the magnitude of risks posed by moisture issues;
[0141] Moisture risk measurement =
[0142] In this way, regardless Whether it is a large positive value or a small negative value, the larger the absolute value, the higher the measure of soil moisture risk.
[0143] A weighted sum of health risk measures and soil moisture risk measures is used to generate a comprehensive decision-making risk factor.
[0144] The two quantified risk measures mentioned above are then fused using a linear weighting method to obtain the final comprehensive decision risk factor. ;
[0145] in: The comprehensive decision-making risk factor is a dimensionless scalar, calculated by this formula, and is the final output of step S7.
[0146] The health risk weight is a dimensionless coefficient that is dynamically set by agronomic experts based on the differences in crop sensitivity to nutrient stress at different growth stages.
[0147] Soil moisture risk weight is a dimensionless coefficient that is dynamically set by agronomic experts based on the differences in crop sensitivity to water stress at different growth stages.
[0148] For example, during the critical period of crop vegetative growth, the dosage can be appropriately increased. The weight of the water requirement can be adjusted; however, during critical water-demand periods such as flowering and grain filling, the weight can be increased. The weights;
[0149] Existing technologies typically assess fertilization and irrigation needs in isolation, lacking a mechanism to consider both in a unified manner. This embodiment constructs a weighted summation model that includes health risk measures and soil moisture risk measures. Its advantage lies in achieving, for the first time, a quantitative integration of the two most critical risk sources for farmland—nutrients and water—forming a more comprehensive and macroscopic integrated risk view. Furthermore, by introducing dynamically adjustable weighting coefficients... and This endows the model with the ability to adapt to the dynamic needs of crops at different growth stages, making risk assessment more timely and targeted; the final generated comprehensive decision-making risk factors It can guide the priority and intensity of agricultural operations more accurately than any single indicator, providing a decision-making core for achieving true integrated intelligent management of health and soil moisture.
[0150] Example 6:
[0151] Generate differentiated agricultural regulation strategies, including:
[0152] If the comprehensive decision-making risk factor is less than the preset first-level control risk threshold, it is determined to be a normal state.
[0153] If the comprehensive decision-making risk factor is greater than the primary control risk threshold but less than or equal to the preset secondary control risk threshold, a refined control strategy is generated.
[0154] If the comprehensive decision-making risk factor exceeds the secondary regulation risk threshold, an emergency intervention strategy is generated.
[0155] This embodiment is a detailed logical explanation of the differentiated agricultural regulation strategy described in Embodiment 1; the core of this method is based on the comprehensive decision-making risk factors determined in the previous step. Establish a tiered response mechanism to avoid a one-size-fits-all approach to management, thereby achieving optimal resource allocation and precise risk response;
[0156] This generation logic compares... This is achieved through two preset risk thresholds, namely, the primary control risk threshold. and secondary regulation risk threshold The determination of these two thresholds is based on historical production data and corresponding risk factors. Regression analysis was performed to identify the factors that initially had a significant negative impact on yield. and cause serious negative impacts The risk threshold;
[0157] The specific rules for generating control strategies are as follows:
[0158] If the comprehensive decision-making risk factor is less than the preset first-level control risk threshold, it is determined to be in a normal state.
[0159] when When the system determines that the overall risk of the soil is within an acceptable low level, it matches the normal state instructions in the control strategy library and does not initiate any active intervention measures, but only maintains routine monitoring. This avoids unnecessary agricultural operations when there is no significant risk, saving resources such as water, fertilizer, and manpower.
[0160] If the comprehensive decision-making risk factor is greater than the primary control risk threshold but less than or equal to the preset secondary control risk threshold, a refined control strategy is generated.
[0161] when When the system determines that the risk has reached a level requiring attention and refined management, it will further analyze the risk factors. The composition of the comparative health risk items And soil moisture risk items The relative size;
[0162] If health risk factors dominate, the system will invoke the variable fertilization module and apply the predicted values based on chemical composition. Compared with ideal value Based on the differences, generate targeted fertilization recommendations;
[0163] If soil moisture risk factors dominate, the system will invoke the variable irrigation or drainage module, based on the abnormal soil moisture index. and moisture content This generates precise irrigation and drainage instructions;
[0164] This refined regulation strategy aims to address the root cause of the problem and solve the most pressing issues at the lowest possible cost.
[0165] If the comprehensive decision-making risk factor exceeds the secondary regulation risk threshold, an emergency intervention strategy is generated.
[0166] when When the system determines that the overall soil risk has exceeded the severe warning line and may pose a significant threat to crop yield, the system will activate the highest priority response procedure to generate an emergency intervention strategy. This is usually a composite solution, such as instructing emergency irrigation while also recommending the application of foliar fertilizer to quickly replenish nutrients and alleviate stress. At the same time, the system will also send a high-priority alarm to the terminal device of the management personnel, requesting manual intervention for confirmation.
[0167] Compared to the traditional binary decision-making model of alarm-no-alarm based on a single indicator and threshold, this embodiment establishes a three-level control model based on comprehensive decision-making risk factors. Its advantage lies in realizing the differentiation and hierarchy of management decisions. This method can intelligently match agricultural strategies of different intensities and types, from no operation to fine-tuning and then to emergency compound intervention, according to the severity of the risk. This not only greatly improves the intelligence and scientific nature of decision-making, but more importantly, it enables the precise allocation of agricultural production resources on demand. While effectively controlling risks and ensuring crop yields, it maximizes water and fertilizer utilization efficiency and management efficiency.
[0168] Example 7:
[0169] Please see Figure 2 A comprehensive farmland soil health monitoring system based on deep learning, comprising:
[0170] The feature extraction module is used to obtain chemical and physical feature vectors based on the collected farmland soil spectral signals through a preset dual-branch feature decoupling network.
[0171] The chemical prediction module is used to predict the chemical composition of soil based on chemical feature vectors.
[0172] The health assessment module is used to calculate a comprehensive health index by combining the predicted values of chemical components with the preset ideal values and tolerable deviations of chemical components.
[0173] The grading module is used to determine the soil health level based on the comprehensive health index and preset health level thresholds;
[0174] The moisture inversion module is used to invert soil moisture content based on physical feature vectors.
[0175] The soil moisture diagnosis module is used to calculate the soil moisture anomaly index based on soil moisture content;
[0176] The risk fusion module is used to combine the comprehensive health index and the soil moisture abnormality index to determine the comprehensive decision-making risk factors.
[0177] The decision generation module is used to generate differentiated agricultural regulation strategies by matching a pre-set regulatory strategy library with comprehensive decision risk factors.
[0178] This embodiment provides a comprehensive farmland soil health monitoring system based on deep learning. This system is the physical carrier for implementing any of the aforementioned method embodiments. The system can be an integrated hardware device or a software system deployed on a server or cloud platform. Its core is that it includes a series of functional modules that work together to complete the entire process from data input to decision output.
[0179] The system includes:
[0180] The feature extraction module is designed to perform the functions of step S1. Internally, it embeds a pre-trained dual-branch feature decoupling network. It receives farmland soil spectral signals from spectral acquisition devices such as UAV hyperspectral cameras or ground sensors, and through forward propagation calculations, outputs mutually decoupled chemical feature vectors. and physical feature vectors They are then passed to subsequent processing modules.
[0181] The chemical prediction module is designed to perform the functions of step S2; this module integrates a chemical composition predictor. It receives chemical feature vectors from the feature extraction module. Based on this, the predicted values of various soil chemical components were calculated. The results will be output to the health assessment module;
[0182] The health assessment module is designed to perform the functions of step S3; this module receives the output from the chemical prediction module. It reads preset ideal values of chemical composition from internal storage units or external databases. and tolerable deviation By executing specific computational logic, a quantitative comprehensive health index is output. ;
[0183] The grading module is designed to perform the functions of step S4; this module receives the values calculated by the health assessment module. Based on the internally stored health level thresholds such as 0.9, 0.7, and 0.5, it maps them to intuitive soil health levels such as excellent, good, medium, and poor, for visualization or report generation.
[0184] The moisture inversion module is designed to perform the functions of step S5; this module works in parallel with the chemical prediction module and integrates a physical state predictor. It receives the physical feature vector output by the feature extraction module. Based on this, the soil moisture content of each plot unit can be calculated. ;
[0185] The soil moisture diagnosis module is designed to perform the functions of step S6; this module receives a series of outputs from the moisture inversion module. The value is calculated by performing standardized score calculations to determine the soil moisture anomaly index for each plot unit. ;
[0186] The risk fusion module aims to perform the functions of step S7; this module is the core computational unit for decision-making, bringing together data from the health assessment module. and from the soil moisture diagnosis module The final comprehensive decision-making risk factor is calculated using a built-in weighted summation model. ;
[0187] The decision generation module is designed to perform the functions of step S8; this module receives the output from the risk fusion module. It compares the results with the internally stored control strategy library and corresponding risk thresholds, and finally generates and outputs differentiated agricultural control strategies to the execution equipment such as variable fertilizer applicators, intelligent irrigation systems or user management interfaces.
[0188] This system, through its modular structural design, solidifies the complex methods and processes of the invention into a workable entity or system. Each module has clear responsibilities and works collaboratively, achieving end-to-end automated processing from raw spectral data to final agricultural control strategies. Compared to the traditional method that relies on manual step-by-step operation, this system provides an integrated and intelligent solution that can achieve real-time, rapid, and accurate comprehensive detection and closed-loop control of farmland soil health, and has extremely high practicality and application value.
[0189] Example 8:
[0190] The health assessment module includes:
[0191] The scoring unit is used to calculate the individual health score of each chemical component based on the predicted chemical component value, the ideal chemical component value, and the tolerable deviation using a Gaussian function.
[0192] The index generation unit is used to weight and sum the individual health scores to generate a comprehensive health index.
[0193] This embodiment is a further refinement of the internal structure of the health assessment module in the system described in Embodiment 7; in order to achieve a comprehensive health index For precise calculations, this module is further divided into two functional units;
[0194] This health assessment module specifically includes:
[0195] The scoring calculation unit is the physical or logical carrier that implements the first step of the calculation function in the method described in Embodiment 3. Its core function is to calculate the individual health score of each chemical component based on the predicted chemical component value, the ideal chemical component value, and the tolerable deviation, using a Gaussian function. This unit receives the predicted values input from the chemical prediction module. Array, and retrieve the corresponding array from memory. and An array; its internal Gaussian function is embedded. The calculation logic is as follows: for each input chemical indicator, the unit performs this calculation once and outputs a list containing all individual health scores. Array;
[0196] The index generation unit, which follows the score calculation unit, has the core function of weighted summation of individual health scores to generate a comprehensive health index; this unit receives the output from the score calculation unit. The array is used to retrieve preset weighting coefficients from memory. An array; its internal structure contains a weighted summation formula. The calculation logic is as follows; ultimately, this unit calculates and outputs a single, final comprehensive health index. The value is used by the rating module and the risk fusion module.
[0197] By dividing the health assessment module into a score calculation unit and an index generation unit, this system clearly reflects the inherent logical hierarchy of comprehensive health index calculation in its structure. This modular design, which separates and then combines components, makes the module's functionality clearer, facilitating development, testing, and subsequent upgrades. For example, if a better single-item score calculation model is discovered in the future, only the score calculation unit needs to be upgraded, without modifying the logic of the index generation unit. This decoupled design enhances the system's maintainability and scalability, ensuring the stable and efficient execution of the core assessment algorithm.
[0198] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for detecting farmland soil health based on deep learning, characterized in that... ,include: S1, based on the collected farmland soil spectral signals, chemical feature vectors and physical feature vectors are obtained through a preset dual-branch feature decoupling network; S2, based on chemical feature vectors, predicts the chemical composition of soil. S3, combining the predicted values of chemical components with the preset ideal values and tolerable deviations of chemical components, calculates the comprehensive health index; S4. Determine the soil health level based on the comprehensive health index and the preset health level threshold. S5, based on physical feature vectors, inverts soil moisture content; S6, based on soil moisture content, calculate the soil moisture anomaly index; S7, combining the comprehensive health index and the soil moisture abnormality index, determines the comprehensive decision-making risk factors; S8 generates differentiated agricultural regulation strategies by matching a pre-set regulatory strategy library with comprehensive decision-making risk factors.
2. The method for detecting farmland soil health based on deep learning according to claim 1, characterized in that... Dual-branch feature decoupling network processing includes: The spectral signal is deconstructed into chemical feature vectors and physical feature vectors through a network structure that includes an encoder, a chemical feature branch, a physical feature branch, and a decoder. The network structure is trained using a pre-defined joint loss function to separate chemical and physical features. The joint loss function includes: reconstruction loss, chemical prediction loss, physical prediction loss, and orthogonal loss.
3. The method for detecting farmland soil health based on deep learning according to claim 1, characterized in that... Calculate the overall health index, including: Based on the predicted values of chemical components, the ideal values of chemical components, and the tolerable deviations, the individual health scores of each chemical component are calculated using a Gaussian function. The individual health scores are weighted and summed to generate a comprehensive health index.
4. The method for detecting farmland soil health based on deep learning according to claim 1, characterized in that... Calculate the soil moisture anomaly index, including: Calculate the average moisture content and standard deviation of moisture content for all plots within the monitoring area; By combining the soil moisture content, average moisture content, and standard deviation of moisture content for each plot unit, the soil moisture anomaly index is calculated using the standardized fraction method.
5. The method for detecting farmland soil health based on deep learning according to claim 1, characterized in that... Determine comprehensive decision-making risk factors, including: Convert the comprehensive health index into a health risk measure; Obtain the absolute value of the soil moisture anomaly index as a measure of soil moisture risk; A weighted sum of health risk measures and soil moisture risk measures is used to generate a comprehensive decision-making risk factor.
6. The method for detecting farmland soil health based on deep learning according to claim 1, characterized in that... Generate differentiated agricultural regulation strategies, including: If the comprehensive decision-making risk factor is less than the preset first-level control risk threshold, it is determined to be a normal state. If the comprehensive decision-making risk factor is greater than the primary control risk threshold but less than or equal to the preset secondary control risk threshold, a refined control strategy is generated. If the comprehensive decision-making risk factor exceeds the secondary regulation risk threshold, an emergency intervention strategy is generated.
7. A comprehensive farmland soil health detection system based on deep learning, based on the farmland soil health detection method based on deep learning according to any one of claims 1-6, characterized in that... ,include: The feature extraction module is used to obtain chemical and physical feature vectors based on the collected farmland soil spectral signals through a preset dual-branch feature decoupling network. The chemical prediction module is used to predict the chemical composition of soil based on chemical feature vectors. The health assessment module is used to calculate a comprehensive health index by combining the predicted values of chemical components with the preset ideal values and tolerable deviations of chemical components. The grading module is used to determine the soil health level based on the comprehensive health index and preset health level thresholds; The moisture inversion module is used to invert soil moisture content based on physical feature vectors. The soil moisture diagnosis module is used to calculate the soil moisture anomaly index based on soil moisture content; The risk fusion module is used to combine the comprehensive health index and the soil moisture abnormality index to determine the comprehensive decision-making risk factors. The decision generation module is used to generate differentiated agricultural regulation strategies by matching a pre-set regulatory strategy library with comprehensive decision risk factors.
8. A farmland soil health detection system based on deep learning according to claim 7, characterized in that... The health assessment module includes: The scoring unit is used to calculate the individual health score of each chemical component based on the predicted chemical component value, the ideal chemical component value, and the tolerable deviation using a Gaussian function. The index generation unit is used to weight and sum the individual health scores to generate a comprehensive health index.