A method of soil detection based on environmental variables
Patent Information
- Application Number
- CN202611075676.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-20
- Publication Date
- 2026-10-09
AI Technical Summary
现有土壤肥力分析方法多依赖单一类型指标(如化学养分指标),指标体系缺乏系统性,难以全面反映土壤物理、化学、生物属性的协同作用;在指标权重确定上,常依赖主观经验赋值,易导致评价结果偏差;同时,现有方法对环境因素的影响考虑不足,缺乏针对性的环境校正机制,难以准确表征不同区域土壤肥力的真实水平;此外,传统方法多侧重于静态评价,对土壤肥力的动态演变趋势预测能力较弱,无法为长期土壤管理提供有效的前瞻性指导
[0041]与现有技术相比,本发明的有益效果是:通过构建包含物理、化学、生物指标分支的三层分析模块,实现了土壤肥力多维度指标的系统整合,克服了传统方法指标单一的局限;基于指标变异系数确定权重,减少了主观经验对权重赋值的影响,提高了权重分析的客观性和准确性;通过地理加权回归模型引入环境协变量进行校正,有效消除了环境因素对肥力评价的干扰,使评价结果更贴合区域实际土壤状况;结合熵权 - TOPSIS 模型计算综合肥力指数并划分等级,提升了肥力评价的综合性和精准度;基于马尔可夫链转移概率矩阵对肥力等级趋势进行预测,实现了从静态评价到动态预测的延伸,为土壤肥力的长期管理和优化提供了科学依据。
Smart Images

Figure CN122889151A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of soil fertility analysis technology, specifically a soil testing method based on environmental variables. Background Technology
[0002] Soil fertility is a core indicator measuring the soil's ability to provide the nutrients, water, and air necessary for plant growth. Accurate analysis of soil fertility is crucial for optimizing agricultural production, managing land resources, and protecting the ecosystem. Existing soil fertility analysis methods often rely on single-type indicators (such as chemical nutrient indicators), lacking a systematic approach and failing to comprehensively reflect the synergistic effects of soil physical, chemical, and biological properties. Furthermore, the determination of indicator weights often depends on subjective experience, easily leading to biased evaluation results. Simultaneously, existing methods insufficiently consider the impact of environmental factors and lack targeted environmental correction mechanisms, making it difficult to accurately characterize the true level of soil fertility in different regions. Moreover, traditional methods primarily focus on static evaluation, exhibiting weak predictive ability for the dynamic evolution of soil fertility, and failing to provide effective forward-looking guidance for long-term soil management. There is an urgent need for a soil fertility analysis method that can systematically integrate multi-dimensional indicators, objectively quantify weights, incorporate environmental correction, and achieve dynamic trend prediction. Therefore, this paper presents a soil testing method based on environmental variables. Summary of the Invention
[0003] To address the aforementioned technical problems, the present invention aims to provide a soil testing method based on environmental variables.
[0004] To achieve the above objectives, the present invention provides the following technical solution: a soil detection method based on environmental variables, the method comprising:
[0005] Collect basic soil data and environmental covariates for the region, and perform data preprocessing on the basic soil data and environmental covariates to obtain preprocessed basic soil data and preprocessed environmental covariates.
[0006] Based on the preprocessed soil data, a three-layer analysis module is constructed. Based on the coefficient of variation of the indicators, weight analysis is performed on the corresponding branches in the three-layer analysis module to obtain the corresponding indicator weights. Based on the indicator weights, the indicator factors of the corresponding branches are obtained. Based on the Pearson correlation coefficient, the correlation coefficients of the indicators of the corresponding branches in the three-layer analysis module are obtained, and then the corresponding indicator correlation coefficient matrix is obtained. Based on the indicator correlation coefficient matrix, the corresponding indicator heat map is drawn.
[0007] Based on the preprocessed environmental covariates, a geographically weighted regression model is constructed. The index factors of the corresponding branches in the three-level analysis module are imported into the geographically weighted regression model to obtain the environmentally corrected index correction factor matrix.
[0008] Based on the environmentally corrected index correction factor matrix, the corresponding comprehensive fertility index is obtained using the entropy weight-TOPSIS model; fertility levels are then classified according to the comprehensive fertility index to obtain corresponding fertility level labels, thereby improving the accuracy of soil fertility.
[0009] Based on the fertility level labels of historical collection periods and the Markov chain transition probability matrix, a trend prediction curve for the fertility level of the soil in this region is obtained.
[0010] Furthermore, the process of collecting basic soil data and environmental covariates for the region, and performing data preprocessing, includes:
[0011] Sampling grids were divided according to the soil properties of the area. Multi-point mixed sampling was used in each sampling grid to collect basic soil data and environmental covariates of the area. A collection cycle was set, and each collection cycle included several collection times.
[0012] The preprocessing of soil baseline data and environmental covariates within the collection period requires sequential cleaning, missing value imputation, and standardization to obtain preprocessed soil baseline data and preprocessed environmental covariates.
[0013] Furthermore, based on the preprocessed soil baseline data, the process of constructing the three-layer analysis module includes:
[0014] The three-layer analysis module includes physical index branches, chemical index branches, and biological index branches. The physical index branches include soil bulk density, soil clay content, soil porosity, and soil moisture content. The chemical index branches include pH value, organic matter, nitrogen nutrient content, phosphorus nutrient content, and potassium nutrient content. The biological index branches include microbial biomass carbon, microbial biomass nitrogen, urease activity, and sucrase activity.
[0015] Based on the index weights of the corresponding indicators in the physical, chemical, and biological index branches, the index factors of the corresponding branches are obtained. The index factors are then environmentally corrected, and the soil fertility of the region is analyzed based on the environmentally corrected index factors.
[0016] Furthermore, the process of performing weight analysis on the corresponding branches in the three-layer analysis module to obtain the corresponding indicator weights includes:
[0017] When obtaining indicator weights based on the coefficient of variation of the indicators, the branch judgment matrix is first constructed for the physical indicator branch, chemical indicator branch, and biological indicator branch. The construction process is as follows:
[0018] Obtain the coefficient of variation of the corresponding indicator within the corresponding branch; standardize the coefficient of variation to obtain the standardized coefficient of variation;
[0019] Based on any two indicators in the branch, and using the complementary branch judgment matrix corresponding to the indicator variation coefficients, the indicator weights in the corresponding branch are obtained based on the branch judgment matrix.
[0020] Furthermore, based on the indicator weights of the indicators in the corresponding branches and the corresponding data in the preprocessed soil basic data, the indicator factors of the corresponding branches are obtained.
[0021] Furthermore, based on the Pearson correlation coefficient, the process of obtaining the correlation coefficients of the corresponding branch indicators in the three-level analysis module, and then obtaining the corresponding indicator correlation coefficient matrix, includes:
[0022] Based on the Pearson correlation coefficient, the correlation coefficient of the indicator factors of any two branches is obtained, and the corresponding indicator correlation coefficient matrix is constructed according to the correlation coefficient.
[0023] Furthermore, the process of drawing the corresponding indicator heatmap based on the indicator correlation coefficient matrix includes:
[0024] When drawing an indicator heatmap based on the correlation coefficient matrix, the correlation coefficient matrix is used as the data basis and a visualization tool is used. The horizontal and vertical axes are the names of the indicators in the corresponding branches. The color depth of each cell is determined by the absolute value of the correlation coefficient of the corresponding indicator factor, and the specific value of the correlation coefficient of the indicator factor is marked in the cell. The indicator heatmap can intuitively show the strength of the correlation between different branches, help to judge the redundancy of indicators in different branches, and optimize the three-layer analysis module structure.
[0025] Furthermore, based on the environmentally corrected index correction factor matrix and the entropy-weighted TOPSIS model, the process of obtaining the corresponding comprehensive fertility index includes:
[0026] Based on the index correction factor matrix, calculate the information entropy of the corresponding branch index correction factor; based on the information entropy of the corresponding branch index correction factor, obtain the entropy weight of the corresponding branch index correction factor.
[0027] Construct positive and negative ideal solutions for the TOPSIS model, including: positive ideal solution and negative ideal solution; calculate the positive weighted distance between each sample and the positive ideal solution based on the positive ideal solution and entropy weight; calculate the negative weighted distance between each sample and the negative ideal solution based on the negative ideal solution and entropy weight.
[0028] Based on the positive weighted distance and the negative weighted distance, the comprehensive fertility index of the soil in the corresponding region is obtained.
[0029] Furthermore, the process of obtaining the soil fertility level trend prediction curve for the region based on fertility level labels from historical collection periods and using a Markov chain transition probability matrix includes:
[0030] Obtain fertility level labels from several historical collection periods, and construct a Markov chain transition probability matrix. The construction process is as follows:
[0031] Based on the fertility level label, the soil fertility status is set, and then the corresponding soil fertility status transition probability is calculated.
[0032] Based on the transition probabilities, a transition probability matrix is formed; several state vectors of historical acquisition cycles are preset, and the state vectors of future acquisition cycles are obtained based on the state vectors.
[0033] Using the collection period as the horizontal axis and the corresponding historical collection period as the starting point, and the sample proportion of each soil fertility state as the vertical axis, a curve is plotted to obtain the trend prediction curve of soil fertility level in this region.
[0034] A second aspect of the present invention also provides a soil testing system based on environmental variables, the system comprising: a data acquisition module, a data preprocessing module, a three-layer analysis module construction module, a model calibration module, a soil fertility calculation module, and a fertility dynamic trend prediction module;
[0035] The data acquisition module is used to collect basic soil data and environmental covariates for the region.
[0036] The data preprocessing module is used to preprocess the soil baseline data and environmental covariance of the region to obtain preprocessed soil baseline data and preprocessed environmental covariance.
[0037] The three-layer analysis module is constructed based on preprocessed soil data. It performs weight analysis on corresponding branches within the module based on the coefficient of variation of the indicators to obtain the corresponding indicator weights. Based on these weights, it obtains the indicator factors for each branch. Using the Pearson correlation coefficient, it obtains the correlation coefficients of the indicators in each branch within the three-layer analysis module, thereby generating the corresponding indicator correlation coefficient matrix. Finally, it draws the corresponding indicator heatmap based on the correlation coefficient matrix.
[0038] The model calibration module constructs a geographically weighted regression model based on preprocessed environmental covariates, imports the indicator factors of the corresponding branches in the three-level analysis module into the geographically weighted regression model, and obtains the environmentally calibrated indicator calibration factor matrix.
[0039] The soil fertility calculation module obtains the corresponding comprehensive fertility index based on the environmentally corrected index correction factor matrix and the entropy weight-TOPSIS model; it then classifies fertility levels according to the comprehensive fertility index to obtain the corresponding fertility levels, thereby improving the accuracy of soil fertility calculation.
[0040] The soil fertility dynamic trend prediction module obtains the soil fertility trend prediction curve for the region based on the fertility level labels of historical collection periods and the Markov chain transition probability matrix.
[0041] Compared with existing technologies, the beneficial effects of this invention are as follows: By constructing a three-layer analysis module that includes physical, chemical, and biological indicators, a systematic integration of multi-dimensional soil fertility indicators is achieved, overcoming the limitations of traditional methods with single indicators; weights are determined based on the coefficient of variation of indicators, reducing the influence of subjective experience on weight assignment and improving the objectivity and accuracy of weight analysis; environmental covariates are introduced for correction through a geographically weighted regression model, effectively eliminating the interference of environmental factors on fertility evaluation and making the evaluation results more consistent with the actual soil conditions in the region; the comprehensive fertility index is calculated and classified by combining the entropy weight-TOPSIS model, improving the comprehensiveness and accuracy of fertility evaluation; and the trend of fertility level is predicted based on the Markov chain transition probability matrix, realizing the extension from static evaluation to dynamic prediction, providing a scientific basis for the long-term management and optimization of soil fertility. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0043] Figure 1 This is a schematic diagram illustrating the steps of a soil testing method based on environmental variables.
[0044] Figure 2 This is a schematic diagram of a soil testing system based on environmental variables. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be described in detail below. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other implementation methods obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0046] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0047] like Figure 1 As shown, a soil testing method based on environmental variables includes the following steps:
[0048] Step S1: Collect basic soil data and environmental covariates for the region, and perform data preprocessing on the basic soil data and environmental covariates to obtain preprocessed basic soil data and preprocessed environmental covariates;
[0049] Step S2: Based on the preprocessed soil basic data, construct a three-layer analysis module. Based on the coefficient of variation of the indicators, perform weight analysis on the corresponding branches in the three-layer analysis module to obtain the corresponding indicator weights. Based on the indicator weights, obtain the indicator factors of the corresponding branches. Based on the Pearson correlation coefficient, obtain the correlation coefficients of the indicators of the corresponding branches in the three-layer analysis module, and then obtain the corresponding indicator correlation coefficient matrix. Based on the indicator correlation coefficient matrix, draw the corresponding indicator heat map.
[0050] Step S3: Based on the preprocessed environmental covariates, construct a geographically weighted regression model, import the index factors of the corresponding branches in the three-level analysis module into the geographically weighted regression model, and obtain the environmentally corrected index correction factor matrix.
[0051] Step S4: Based on the environmentally corrected index correction factor matrix, obtain the corresponding comprehensive fertility index using the entropy weight-TOPSIS model; classify fertility levels according to the comprehensive fertility index to obtain corresponding fertility level labels, thereby improving the accuracy of soil fertility.
[0052] Step S5: Based on the fertility level labels of historical collection periods and the Markov chain transition probability matrix, obtain the soil fertility level trend prediction curve for this region.
[0053] It should be further explained that, in the specific implementation process, the collection of basic soil data and environmental covariates for this region includes:
[0054] Optionally, in this embodiment of the application, sampling grids are divided according to the soil properties of the area, and a multi-point mixed sampling method is used to collect data in each sampling grid to collect basic soil data and environmental covariates of the area, and a collection cycle is set, with each collection cycle including several collection times.
[0055] It should be noted that the size of the sampling grid is set according to the area and accuracy requirements, usually ranging from 100m×100m to 1km×1km; in the multi-point mixed sampling method, each sampling point takes 0-50cm of topsoil, and 3-5 replicates are mixed into one sample, and the basic information such as latitude, longitude and altitude of the sampling point is recorded; the basic soil data includes but is not limited to physical index data, chemical index data and biological index data; the environmental covariates include but are not limited to temperature data, humidity data and annual precipitation.
[0056] To further clarify, the physical indicators include, but are not limited to, soil bulk density, soil clay content, soil porosity, and soil moisture content; the chemical indicators include, but are not limited to, pH value, organic matter, nitrogen nutrient content, phosphorus nutrient content, and potassium nutrient content; the biological indicators include, but are not limited to, microbial biomass carbon, microbial biomass nitrogen, urease activity, and sucrase activity; the microbial biomass carbon refers to the total amount of carbon in the cells of all surviving microorganisms (bacteria, fungi, actinomycetes, etc.) in the soil; the total amount of nitrogen in the soil microorganisms; and urease refers to a key enzyme in the soil that can catalyze the hydrolysis of urea, mainly secreted by bacteria (such as Bacillus), fungi, and other microorganisms, used to convert urea in the soil into a nitrogen source that can be used by plants.
[0057] It should be further explained that, in the specific implementation process, the preprocessing of the aforementioned soil baseline data and environmental covariates to obtain preprocessed soil baseline data and preprocessed environmental covariates includes:
[0058] Optionally, in this embodiment, the preprocessing of soil baseline data and environmental covariates within the collection period needs to sequentially complete cleaning, missing value imputation, and standardization. During data cleaning, outlier identification uses the Z-score method, and correction is achieved by replacing or deleting the mean of the nearest corresponding data. Missing value imputation uses the K-nearest neighbor (KNN) method to fill in missing data. Standardization uses the min-max method to standardize the processed data, eliminating dimensional differences, thereby obtaining preprocessed soil baseline data and preprocessed environmental covariates. The specific preprocessing procedures are not detailed in this application.
[0059] It should be further explained that, in the specific implementation process, the process of constructing the three-layer analysis module based on the pre-processed soil baseline data includes:
[0060] Optionally, in this embodiment, the three-layer analysis module includes a physical indicator branch, a chemical indicator branch, and a biological indicator branch; the physical indicator branch includes, but is not limited to, soil bulk density, soil clay content, soil porosity, and soil moisture content; the chemical indicator branch includes, but is not limited to, pH value, organic matter, nitrogen nutrient content, phosphorus nutrient content, and potassium nutrient content; the biological indicator branch includes, but is not limited to, microbial biomass carbon, microbial biomass nitrogen, urease activity, and sucrase activity.
[0061] Based on the index weights of the corresponding indicators in the physical index branch, chemical index branch, and biological index branch, the index factors of the corresponding branches are obtained. The index factors are then subjected to environmental correction, and the soil fertility of the region is analyzed based on the environmentally corrected index factors.
[0062] It should be further explained that, in the specific implementation process, the specific process of performing weight analysis on the corresponding branches in the three-layer analysis module to obtain the corresponding indicator weights includes:
[0063] Optionally, in this embodiment of the application, when obtaining the index weight based on the index variation coefficient, a branch judgment matrix is first constructed for the physical index branch, the chemical index branch, and the biological index branch, specifically as follows:
[0064] The indicators in the physical indicator branch, chemical indicator branch, and biological indicator branch are labeled as follows: , as well as ;in, Indicates soil bulk density; Indicates the proportion of clay particles in the soil; Indicates soil porosity; Indicates soil moisture content; Indicates pH value; Indicates organic matter; Indicates nitrogen nutrient content; Indicates phosphorus nutrient content; Indicates potassium nutrient content; Indicates microbial biomass carbon; Indicates microbial biomass nitrogen; Indicates urease activity; Indicates sucrase activity;
[0065] Obtain the coefficients of variation of n indicators within the corresponding branch. ;in, This represents the standard deviation of the i-th indicator. This represents the mean of the i-th indicator;
[0066] It should be noted that, The larger the value, the stronger the resolution of the corresponding indicator.
[0067] coefficient of variation Standardization is performed to eliminate the influence of dimensions and obtain the standardized coefficient of variation. ;in, m These are the minimum coefficient of variation, maximum coefficient of variation, and standardized coefficient of variation for the corresponding indicators within each branch. ;
[0068] Let any two indices in the branch be labeled t and j, and use the branch judgment matrix corresponding to the complementary coefficients of the indices' variation. ;in, Indicators The degree of importance of indicator j ; Indicates the number of indicators.
[0069] It should be noted that the branch judgment matrix includes the physical index branch judgment matrix, the chemical index branch judgment matrix, and the biological index branch judgment matrix.
[0070] To further explain the degree of importance ;in, This represents the maximum absolute value of the standardized coefficients of variation for any two indicators; when hour, This indicates that they are equally important; when hour, This indicates that indicator t is more important than indicator j; when hour, This indicates that indicator j is more important than indicator t;
[0071] In an exemplary embodiment, if This indicates that indicator t is more important than indicator j; if This indicates that indicator j is more important than indicator t; if ; then it means the same index t; if ; then it indicates that the same index j.
[0072] In an exemplary embodiment, assuming there are three indicators in the physical properties of soil: soil bulk density, soil clay content, and soil porosity, the standardized coefficient of variation obtained based on the preprocessed data is as follows:
[0073] ; represents the standardized coefficient of variation of soil bulk density;
[0074] ; represents the standardized coefficient of variation of the proportion of soil clay particles;
[0075] ; represents the standardized coefficient of variation of soil porosity;
[0076] Obtain the standardized coefficient of variation difference for all indicator pairs:
[0077] ;
[0078] ;
[0079] ;
[0080] ;
[0081] ;
[0082] ;
[0083] Therefore, the maximum absolute value of the standardized coefficient of variation for any two indicators is 0.6.
[0084] Optionally, in the embodiments of this application, based on the branch judgment matrix The corresponding indicator weights in the branch are obtained as follows: ;in, This represents the weight of the t-th indicator; This indicates the number of indicators for that branch;
[0085] In an exemplary embodiment, it is assumed that there are three indicators in the physical index branch of soil: soil bulk density, soil clay content, and soil porosity; the physical index branch judgment matrix is obtained by... ;
[0086] The weighting of the index soil bulk density is as follows:
[0087] ;
[0088] Similarly, the weight of the soil clay content index is 0.383; the weight of the soil porosity index is 0.334.
[0089] It should be further explained that, in the specific implementation process, the process of obtaining the indicator factors for the corresponding branch based on the aforementioned indicator weights includes:
[0090] Optionally, in this embodiment, the calculation formula for the index factor of the corresponding branch is obtained based on the index weight of the index in the corresponding branch and the corresponding data in the preprocessed soil basic data:
[0091] ;in, This indicates the indicator weight in the corresponding branch; This represents the preprocessed soil baseline data corresponding to the indicators in the corresponding branch;
[0092] It should be noted that the above-mentioned indicator factors include physical indicator factors, chemical indicator factors, and biological indicator factors.
[0093] It should be further explained that, in the specific implementation process, the process of obtaining the correlation coefficients of the corresponding branch indicators in the three-level analysis module based on the Pearson correlation coefficient, and then obtaining the corresponding indicator correlation coefficient matrix, includes:
[0094] Optionally, in this embodiment of the application, a 3×3 index correlation coefficient matrix is constructed. ;in, , Indicates different branches; The Pearson correlation coefficient represents the relationship between the index factors of branch p and the index factors of branch q.
[0095] It should be noted that the correlation coefficient formula for the indicator factors of two branches p and q is as follows:
[0096] ;in, This represents the total number of samples. Let p be the index factor of the branch p of the a-th sample; The mean of the index factors for all samples in branch p; Let q be the index factor of the branch q of the a-th sample; Let be the mean of the index factors for all samples in branch q.
[0097] It should be further explained that, in the specific implementation process, the process of drawing the corresponding indicator heatmap based on the aforementioned indicator correlation coefficient matrix includes:
[0098] Optionally, in this embodiment, when drawing an indicator heatmap based on the correlation coefficient matrix, the correlation coefficient matrix is used as the data basis, and a visualization tool is employed. The horizontal and vertical axes represent the names of indicators within the corresponding branches. The color depth of each cell is determined by the absolute value of the correlation coefficient of the corresponding indicator factor (e.g., using a red-blue gradient, where red indicates a strong positive correlation, blue indicates a strong negative correlation, and white indicates a weak correlation). The specific numerical value of the correlation coefficient of the indicator factor is also labeled within the cell. The indicator heatmap can visually display the strength of the correlation between different branches, assisting in determining indicator redundancy in different branches and optimizing the three-layer analysis module structure.
[0099] It should be further explained that, in the specific implementation process, the specific process of constructing a geographically weighted regression model based on preprocessed environmental covariates includes:
[0100] Optionally, in this embodiment of the application, a geographically weighted regression model is constructed based on preprocessed environmental covariates to quantify the spatial impact of environmental factors on branch indicator factors. The specific model is as follows: ;in, Represents the spatial coordinates of the sampling point; This represents the environmental impact deviation index of the indicator factors at that branch point. Indicates the first Spatial variation coefficients of pre-processed environmental covariates; Indicates the number of preprocessed environmental covariates; Indicates the first One preprocessing environment covariate; This represents random error.
[0101] It should be noted that the spatial variation coefficients are... The solution is obtained by the least squares method. For each sampling point, the spatial variation coefficient of that sampling point is obtained by minimizing the weighted sum of squared residuals. The specific solution process will not be described in detail in this application.
[0102] It should be further explained that, in the specific implementation process, the process of importing the indicator factors of the corresponding branches in the three-layer analysis module into the geographically weighted regression model to obtain the environmentally corrected indicator correction factor matrix includes:
[0103] Optionally, in this embodiment, the indicator factors of the corresponding branch are imported into the geographically weighted regression model to obtain the environmentally corrected indicator correction factors of the corresponding branch. Specifically:
[0104] ;
[0105] It should be noted that the corresponding branch environment-corrected index correction factors include physical index correction factors, chemical index correction factors, and biological index correction factors.
[0106] Environmentally corrected indicator factors Composition index correction factor matrix ;in, Indicates the physical index correction factor; Indicates the chemical indicator correction factor; Indicates the biological indicator correction factor;
[0107] To further explain, the index correction factor matrix eliminates the interference of environmental factors on fertility evaluation and is closer to the intrinsic properties of the soil.
[0108] It should be further explained that, in the specific implementation process, the specific process of obtaining the corresponding comprehensive fertility index based on the entropy weight-TOPSIS model, according to the environmentally corrected index correction factor matrix, includes:
[0109] Optionally, in this embodiment of the application, the information entropy of the corresponding branch indicator correction factor is calculated based on the indicator correction factor matrix, specifically as follows:
[0110] ;in, This represents the total number of samples. This represents the index correction factor for the a-th sample branch k;
[0111] It should be noted that k can take the value of , as well as These correspond to the physical index correction factor, chemical index correction factor, and biological index correction factor, respectively.
[0112] Information entropy based on the corresponding branch indicator correction factor To obtain the entropy weight of the corresponding branch indicator correction factor, specifically:
[0113] ;
[0114] It should be noted that when hour, The entropy weight represents the physical index correction factor; when hour, The entropy weight represents the correction factor for chemical indicators; when hour, Entropy weights representing biological indicator correction factors;
[0115] The positive and negative ideal solutions of the TOPSIS model are constructed as follows:
[0116] Positive ideal solution: ;in, This represents the maximum value among all samples in the physical index correction factor for the physical index branch. This represents the maximum value among all samples in the chemical indicator correction factor for the chemical indicator branch. This represents the maximum value among all samples in the biometrics branch for the biometrics correction factor.
[0117] Negative ideal solution: ;in, This represents the minimum value of the physical index correction factor among all samples in the physical index branch. This represents the minimum value of the chemical indicator correction factor among all samples in the chemical indicator branch. This represents the minimum value of the biometric correction factor among all samples in the biometrics branch.
[0118] According to the positive ideal solution and entropy weight Calculate the positive ideal solution for each sample. The positive weighted distance is as follows:
[0119] ;in, This is the positive weighted distance between the corresponding samples;
[0120] According to the negative ideal solution and entropy weight Calculate the negative ideal solution for each sample. The negative weighted distance is as follows:
[0121] ;in, This is the negative weighted distance of the corresponding sample;
[0122] According to the positive weighted distance and negative weighted distance The comprehensive fertility index of the soil in the corresponding region is obtained, specifically:
[0123] ;in, The comprehensive fertility index, , A higher value indicates higher fertility.
[0124] It should be further explained that, in the specific implementation process, the process of classifying fertility levels based on the comprehensive fertility index and obtaining the corresponding fertility level labels includes:
[0125] Optionally, in this embodiment of the application, based on the comprehensive fertility index The fertility levels were determined using the natural breakpoint method, resulting in five levels: extremely poor, poor, medium, relatively fertile, and extremely fertile. The comprehensive fertility index was then statistically analyzed. Based on the distribution characteristics, a threshold is set. When satisfied When it is, it indicates extreme poverty; when it meets the requirements... When, it indicates poverty; when satisfied When, it indicates the middle; when it satisfies When it is, it indicates that the person is relatively fat; when it meets the following conditions... When the value is zero, it indicates extremely fertile soil. The final output is a fertility level label for each sampling point.
[0126] It should be noted that the above threshold calculation can be obtained by the cumulative frequency method or adjusted in combination with regional soil background values.
[0127] It should be further explained that, in the specific implementation process, the process of obtaining the soil fertility level trend prediction curve for the region based on the fertility level labels of historical collection periods and the Markov chain transition probability matrix includes:
[0128] Optionally, in this embodiment of the application, fertility level labels from m historical collection cycles are obtained, and a Markov chain transition probability matrix is constructed, specifically as follows:
[0129] Based on the fertility level label, the soil fertility status level is set to 5, i.e., soil fertility status... , , , as well as ;
[0130] It should be noted that, This indicates a state of extreme poverty; Indicates a state of poverty; Indicates the current state; Indicates a relatively plump state; Indicates an extremely fat state;
[0131] Calculate the transition probability ;in, This indicates that the t-th historical data collection period is in The total number of samples.
[0132] According to the transition probability To form the transition probability matrix ;
[0133] Let the state vector for m historical acquisition cycles be:
[0134] ;in, Indicates soil fertility status The percentage of samples; Indicates soil fertility status The percentage of samples; Indicates soil fertility status The percentage of samples; Indicates soil fertility status The percentage of samples; Indicates soil fertility status The percentage of samples;
[0135] According to the state vector To obtain the future The state vector for each acquisition cycle is:
[0136] ;in, Indicates the future The transition probability matrix for each acquisition cycle.
[0137] Using the acquisition period as the horizontal axis, the first... Starting from a historical data collection period, a curve is plotted with the sample proportion of each soil fertility state as the vertical axis, thereby obtaining the trend prediction curve of soil fertility level in the region.
[0138] like Figure 2 As shown, a soil testing system based on environmental variables is disclosed. The system includes: a data acquisition module, a data preprocessing module, a three-layer analysis module construction module, a model calibration module, a soil fertility calculation module, and a fertility dynamic trend prediction module.
[0139] The data acquisition module is used to collect basic soil data and environmental covariates for the region.
[0140] The data preprocessing module is used to preprocess the soil baseline data and environmental covariance of the region to obtain preprocessed soil baseline data and preprocessed environmental covariance.
[0141] The three-layer analysis module is constructed based on preprocessed soil data. It performs weight analysis on corresponding branches within the module based on the coefficient of variation of the indicators to obtain the corresponding indicator weights. Based on these weights, it obtains the indicator factors for each branch. Using the Pearson correlation coefficient, it obtains the correlation coefficients of the indicators in each branch within the three-layer analysis module, thereby generating the corresponding indicator correlation coefficient matrix. Finally, it draws the corresponding indicator heatmap based on the correlation coefficient matrix.
[0142] The model calibration module constructs a geographically weighted regression model based on preprocessed environmental covariates, imports the indicator factors of the corresponding branches in the three-level analysis module into the geographically weighted regression model, and obtains the environmentally calibrated indicator calibration factor matrix.
[0143] The soil fertility calculation module obtains the corresponding comprehensive fertility index based on the environmentally corrected index correction factor matrix and the entropy weight-TOPSIS model; it then classifies fertility levels according to the comprehensive fertility index to obtain the corresponding fertility levels, thereby improving the accuracy of soil fertility calculation.
[0144] The soil fertility dynamic trend prediction module obtains the soil fertility trend prediction curve for the region based on the fertility level labels of historical collection periods and the Markov chain transition probability matrix.
[0145] Optionally, in this embodiment, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The corresponding program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0146] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0147] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solutions of this application, in essence, or the parts that contribute to the prior art, or all or part of the corresponding technical solutions, can be embodied in the form of software products. The corresponding computer software products are stored in storage media, including several instructions to cause one or more electronic devices to execute all or part of the steps of the methods described in the various embodiments of this application.
[0148] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0149] In the embodiments provided in this application, it should be understood that the disclosed application can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between units or modules may be electrical or other forms.
[0150] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0151] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0152] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A soil testing method based on environmental variables, characterized in that, The method includes: Collect basic soil data and environmental covariates for the corresponding region, and perform data preprocessing on the basic soil data and environmental covariates to obtain preprocessed basic soil data and preprocessed environmental covariates. Based on the preprocessed soil data, a three-layer analysis module is constructed. Based on the coefficient of variation of the indicators, weight analysis is performed on the corresponding branches in the three-layer analysis module to obtain the corresponding indicator weights. Based on the indicator weights, the indicator factors of the corresponding branches are obtained. Based on the Pearson correlation coefficient, the correlation coefficients of the indicators of the corresponding branches in the three-layer analysis module are obtained, and then the corresponding indicator correlation coefficient matrix is obtained. Based on the indicator correlation coefficient matrix, the corresponding indicator heat map is drawn. Based on the preprocessed environmental covariates, a geographically weighted regression model is constructed. The index factors of the corresponding branches in the three-level analysis module are imported into the geographically weighted regression model to obtain the environmentally corrected index correction factor matrix. Based on the environmentally corrected index correction factor matrix, the corresponding comprehensive fertility index is obtained using the entropy weight-TOPSIS model; fertility levels are then classified according to the comprehensive fertility index to obtain corresponding fertility level labels, thereby improving the accuracy of soil fertility. Based on the fertility level labels of historical collection periods and the Markov chain transition probability matrix, the trend prediction curve of soil fertility level in the corresponding region is obtained.
2. The soil testing method based on environmental variables according to claim 1, characterized in that, The process of collecting basic soil data and environmental covariates for the corresponding region and performing data preprocessing includes: Sampling grids were divided according to the soil properties of the corresponding region. Multi-point mixed sampling was used in each sampling grid to collect basic soil data and environmental covariates of the corresponding region. A collection cycle was set, and each collection cycle included several collection times. The preprocessing of soil baseline data and environmental covariates within the collection period requires sequential cleaning, missing value imputation, and standardization to obtain preprocessed soil baseline data and preprocessed environmental covariates.
3. The soil testing method based on environmental variables according to claim 2, characterized in that, The process of constructing a three-layer analysis module based on preprocessed soil baseline data includes: The three-layer analysis module includes physical index branches, chemical index branches, and biological index branches. The physical index branches include soil bulk density, soil clay content, soil porosity, and soil moisture content. The chemical index branches include pH value, organic matter, nitrogen nutrient content, phosphorus nutrient content, and potassium nutrient content. The biological index branches include microbial biomass carbon, microbial biomass nitrogen, urease activity, and sucrase activity. Based on the index weights of the corresponding indicators in the physical, chemical, and biological index branches, the index factors of the corresponding branches are obtained. The index factors are then environmentally corrected, and the soil fertility of the corresponding region is analyzed based on the environmentally corrected index factors.
4. The soil testing method based on environmental variables according to claim 3, characterized in that, The process of performing weight analysis on the corresponding branches in the three-layer analysis module to obtain the corresponding indicator weights includes: When obtaining indicator weights based on the coefficient of variation of the indicators, the branch judgment matrix is first constructed for the physical indicator branch, chemical indicator branch, and biological indicator branch. The construction process is as follows: Obtain the coefficient of variation of the corresponding indicator within the corresponding branch; standardize the coefficient of variation to obtain the standardized coefficient of variation; Based on any two indicators in the branch, and using the complementary branch judgment matrix corresponding to the indicator variation coefficients, the indicator weights in the corresponding branch are obtained based on the branch judgment matrix.
5. The soil testing method based on environmental variables according to claim 4, characterized in that, Based on the index weights of the corresponding branches and the corresponding data in the preprocessed soil basic data, the index factors of the corresponding branches are obtained.
6. The soil testing method based on environmental variables according to claim 5, characterized in that, The process of obtaining the correlation coefficients of corresponding branch indicators in the three-level analysis module based on the Pearson correlation coefficient, and then obtaining the corresponding indicator correlation coefficient matrix, includes: Based on the Pearson correlation coefficient, the correlation coefficient of the indicator factors of any two branches is obtained, and the corresponding indicator correlation coefficient matrix is constructed according to the correlation coefficient.
7. The soil testing method based on environmental variables according to claim 6, characterized in that, The process of drawing the corresponding indicator heatmap based on the indicator correlation coefficient matrix includes: When drawing an indicator heatmap based on the correlation coefficient matrix, the correlation coefficient matrix is used as the data basis and a visualization tool is used. The horizontal and vertical axes are the names of the indicators in the corresponding branches. The color depth of each cell is determined by the absolute value of the correlation coefficient of the corresponding indicator factor, and the specific value of the correlation coefficient of the indicator factor is marked in the cell. The indicator heatmap can intuitively show the strength of the correlation between different branches, help to judge the redundancy of indicators in different branches, and optimize the three-layer analysis module structure.
8. The soil testing method based on environmental variables according to claim 7, characterized in that, The process of obtaining the corresponding comprehensive fertility index based on the environmentally corrected index correction factor matrix and the entropy weight-TOPSIS model includes: Based on the index correction factor matrix, calculate the information entropy of the corresponding branch index correction factor; based on the information entropy of the corresponding branch index correction factor, obtain the entropy weight of the corresponding branch index correction factor. Construct positive and negative ideal solutions for the TOPSIS model, including: positive ideal solution and negative ideal solution; calculate the positive weighted distance between each sample and the positive ideal solution based on the positive ideal solution and entropy weight; calculate the negative weighted distance between each sample and the negative ideal solution based on the negative ideal solution and entropy weight. Based on the positive weighted distance and the negative weighted distance, the comprehensive fertility index of the soil in the corresponding region is obtained.
9. A soil testing method based on environmental variables according to claim 8, characterized in that, The process of obtaining the soil fertility level trend prediction curve for a corresponding region based on the fertility level labels of historical collection periods and the Markov chain transition probability matrix includes: Obtain fertility level labels from several historical collection periods, and construct a Markov chain transition probability matrix. The construction process is as follows: Based on the fertility level label, the soil fertility status is set, and then the corresponding soil fertility status transition probability is calculated. Based on the transition probabilities, a transition probability matrix is formed; several state vectors of historical acquisition cycles are preset, and the state vectors of future acquisition cycles are obtained based on the state vectors. Using the collection period as the horizontal axis and the corresponding historical collection period as the starting point, and the sample proportion of each soil fertility state as the vertical axis, a curve is plotted to obtain the trend prediction curve of soil fertility level in the corresponding region.
10. A soil testing system based on environmental variables, implementing the soil testing method based on environmental variables as described in any one of claims 1 to 9, characterized in that, The system includes: a data acquisition module, a data preprocessing module, a three-layer analysis module construction module, a model calibration module, a soil fertility calculation module, and a fertility dynamic trend prediction module. The data acquisition module is used to collect basic soil data and environmental covariates for the corresponding region; The data preprocessing module is used to preprocess the soil baseline data and environmental covariance of the corresponding region to obtain preprocessed soil baseline data and preprocessed environmental covariance. The three-layer analysis module is constructed based on preprocessed soil data. It performs weight analysis on corresponding branches within the module based on the coefficient of variation of the indicators to obtain the corresponding indicator weights. Based on these weights, it obtains the indicator factors for each branch. Using the Pearson correlation coefficient, it obtains the correlation coefficients of the indicators in each branch within the three-layer analysis module, thereby generating the corresponding indicator correlation coefficient matrix. Finally, it draws the corresponding indicator heatmap based on the correlation coefficient matrix. The model calibration module constructs a geographically weighted regression model based on preprocessed environmental covariates, imports the indicator factors of the corresponding branches in the three-level analysis module into the geographically weighted regression model, and obtains the environmentally calibrated indicator calibration factor matrix. The soil fertility calculation module obtains the corresponding comprehensive fertility index based on the environmentally corrected index correction factor matrix and the entropy weight-TOPSIS model; it then classifies fertility levels according to the comprehensive fertility index to obtain the corresponding fertility levels, thereby improving the accuracy of soil fertility calculation. The fertility dynamic trend prediction module obtains the fertility level trend prediction curve of the soil in the corresponding region based on the fertility level labels of the historical collection period and the Markov chain transition probability matrix.