Soil condition prediction method and system based on machine learning algorithm
Through a soil condition prediction method based on machine learning algorithm, combined with soil physical, chemical and biological information, the Kalman filtering algorithm is used to consider the noise covariance matrix, which solves the problem of poor prediction accuracy of soil state changes in the existing technology, and achieves higher prediction accuracy and reliability.
Patent Information
- Application Number
- CN202510021723.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-04-15
AI Technical Summary
The existing soil analysis methods cannot comprehensively and comprehensively consider the relationship between soil physical, chemical and biological information, and insufficient consideration of uncertainty in soil processes, resulting in poor prediction accuracy of soil state changes.
The soil condition prediction method based on machine learning algorithm is adopted, and the corresponding indicators are calculated by obtaining soil physical, chemical and biological information, and the observation equation and state equation are established. The noise covariance matrix is considered by Kalman filtering algorithm, and the covariance estimate is updated to achieve dynamic prediction of soil state.
It improves the accuracy and reliability of soil state changes, and can more comprehensively consider the interrelationships and uncertainties between soil information.
Smart Images

Figure CN119833031A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of soil condition prediction, and in particular to a soil condition prediction method and system based on a machine learning algorithm. Background Art
[0002] In agricultural production and soil science research, accurately understanding and predicting soil conditions is crucial for rational farmland management, crop growth optimization, and environmental protection. At the same time, with the development of artificial intelligence, it will also be applied to predicting soil conditions.
[0003] The patent application with publication number CN116562134A discloses a soil fertility prediction method and system, an electronic device and a storage medium. The method includes: determining an initial sampling point and a central sampling point of a target plot; constructing a sampling point sequence for each initial sampling point; determining preliminary average soil fertility data and preliminary soil fertility change data for each sampling point sequence based on the fertility index of the soil sample corresponding to the sampling point ranked first; performing fertility prediction on the soil samples corresponding to the sampling points not ranked first; updating the preliminary average soil fertility data and the preliminary soil fertility change data based on the prediction results to obtain target average soil fertility data and target soil fertility change data; obtaining soil fertility prediction data for the target plot based on the target average soil fertility data of all sampling point sequences.
[0004] However, some existing soil analysis methods are one-sided and cannot comprehensively consider the relationship between soil physical, chemical and biological information. At the same time, they do not adequately consider the uncertainties in soil physical, chemical and biological processes, and cannot accurately predict the comprehensive changes in soil states through scientific and reasonable algorithms, resulting in poor prediction accuracy. Summary of the invention
[0005] In view of the deficiencies in the prior art, the present invention provides a soil condition prediction method and system based on a machine learning algorithm, which solves the problem that the soil state changes cannot be accurately predicted through a scientific and reasonable algorithm, resulting in poor prediction accuracy.
[0006] To achieve the above objectives, the present invention is implemented by the following technical scheme: a soil condition prediction method based on a machine learning algorithm, the method specifically comprising the following steps:
[0007] Step 1: Determine the prediction area and obtain the soil information corresponding to the prediction area, and the soil information mainly includes soil physical information, soil chemical information and soil biological information;
[0008] Step 2: Calculate the soil physical indexes, soil chemical indexes and soil biological indexes corresponding to the predicted area based on the obtained soil information;
[0009] Step 3: Determine the state variables and establish the corresponding observation equations, and determine the process noise covariance matrix based on soil physical indicators, soil chemical indicators and soil biological indicators;
[0010] Step 4: Implement the Kalman filter algorithm based on the obtained noise covariance matrix, and update the covariance estimate by calculating the Kalman gain;
[0011] Step 5: Use the updated covariance estimate obtained from the above analysis to analyze the soil conditions and obtain the prediction results. At the same time, analyze the prediction results in combination with historical data to generate soil prediction analysis information.
[0012] As a further solution of the present invention, the specific method of calculating the soil physical index in step 2 is:
[0013] The soil in the prediction area is sampled and labeled as n, where n=1, 2, ..., j, where j represents the number of sampled soils;
[0014] The volume and mass of the sampled soil are obtained, and then the soil bulk density corresponding to the sampled soil n is obtained and recorded as Rn, and the soil porosity corresponding to the sampled soil n is calculated and recorded as Cn. Then the sum of the values of the soil bulk density Rn and the soil porosity Cn corresponding to all sampled soils n is calculated, and the average of the two is calculated to obtain the mean soil bulk density Rp and the mean soil porosity Cn. At the same time, the soil physical index Q1 of the predicted sampling is calculated according to the formula Q1=Rp×a1+Cp×a2, where a1 and a2 are the weight coefficients of soil bulk density and soil porosity, respectively.
[0015] As a further solution of the present invention, the specific method of calculating the soil chemical index in step 2 is:
[0016] The soil in the prediction area is sampled and labeled as n, where n=1, 2, ..., j, where j represents the number of sampled soils. The pH value corresponding to the sampled soil n is obtained and recorded as Pn. At the same time, the corresponding number of trace elements in the sampled soil n is obtained and recorded as Ln. At the same time, the unit chemical index Wn corresponding to the sampled soil n is calculated according to the formula Wn=Pn×a3+Ln×a4, where a3 and a4 are the weight coefficients of pH value and trace element number, respectively. Then, the mean of the sum of the values of all unit chemical indexes Wn is calculated and recorded as soil chemical index Q2.
[0017] As a further solution of the present invention, the specific method of calculating the soil biological index in step 2 is:
[0018] The microbial species corresponding to the sampled soil n is recorded as Fn, and the number of microbial species Fn is recorded as Fn′, and the number of all microorganisms corresponding to the sampled soil n is calculated as Fzn , and simultaneously obtain the soil enzyme activity corresponding to the sampled soil n, and determine and assign the soil enzyme activity as Hn, and the specific assignment method is to determine the corresponding activity level based on the soil enzyme activity, and assign the value according to the corresponding activity level;
[0019] At the same time, according to the formula Yn=Fz n ×a5+Hn×a6 to calculate the unit biological index Yn corresponding to the sampled soil n, where a5 and a6 are the weight coefficients assigned to the number of microorganisms and soil enzyme activity, respectively, and the mean of the sum of the unit biological index values of all sampled soils n is calculated and recorded as the soil biological index Q3.
[0020] As a further solution of the present invention, the specific method of determining the process noise covariance matrix in step 3 is:
[0021] Determine the state variables corresponding to the prediction area, and use the vector x = [x1, x2, x3] T , where x1 represents soil fertility index, x2 represents soil moisture, and x3 represents soil microbial biomass. Then, the corresponding observation equation is established based on the obtained state variables, and the observation equation can be expressed as z k =Hx k +v k , where z k =[z 1,k , z 2,k , z 3,k ] T is the observation vector, z 1,k is the observed value of soil fertility obtained through chemical analysis, z 2,k is the soil moisture observation value obtained by the humidity sensor, z 3,k is the observed value of soil microorganisms obtained through experimental analysis, x k It is represented as the state vector corresponding to time k, v k is the observation noise, including chemical analysis errors and humidity sensor measurement errors;
[0022] Analyze the uncertainties corresponding to soil physical processes, soil chemical processes, and soil biological processes, and obtain the soil moisture x1 corresponding to the soil physical process, the soil nitrogen content x2 corresponding to the soil chemical process, and the number of soil microorganisms x3 corresponding to the soil biological process. At the same time, obtain the noise standard deviations σ1, σ2, and σ3 of the corresponding processes. The further noise covariance matrix is: where σ1 2 ,σ2 2 and σ3 2 are the noise covariances respectively.
[0023] As a further solution of the present invention, the specific method of updating the covariance estimate in step 4 is:
[0024] Set the initial state estimate based on the initial soil physical indicators, soil chemical indicators and soil biological indicators Then calculate the initial covariance estimate as P0 and establish the corresponding state equation in is the estimated value of the state at the previous moment, and then according to the formula P k|k-1 =AP k-1|k-1 A T +Q updates the prior estimate of the covariance, where Q is the noise covariance matrix;
[0025] Then according to the formula K k =P k|k-1 H T (HP k|k-1 H T +R) -1 Calculate the Kalman gain, where H is the observation matrix and R is the observation noise covariance matrix. k|k-1 To calculate K k , and according to the formula P k|k =(IK k H)P k|k-1 Update the covariance estimate, where I is represented as the identity matrix.
[0026] As a further solution of the present invention, the specific method of generating soil prediction and analysis information in step 5 is:
[0027] The updated covariance estimate is used to predict and analyze the soil conditions and obtain the prediction results. Then, historical data is obtained, and the soil conditions of the prediction area are obtained with time t as the period. At the same time, the soil conditions are sorted in chronological order. Then, the prediction results and soil conditions are comprehensively analyzed to determine the changes in the prediction results and generate corresponding prediction analysis information.
[0028] A soil condition prediction system based on a machine learning algorithm includes a regional information collection unit, a model building and analysis unit, a prediction result analysis unit, and a prediction information output unit;
[0029] A regional information acquisition unit, which is used to transmit the acquired soil information of the prediction area to the model establishment and analysis unit;
[0030] A model building and analysis unit is used to calculate the soil physical index, soil chemical index and soil biological index corresponding to the prediction area according to the obtained soil information, determine the state variables, and establish the corresponding observation equations. At the same time, the process noise covariance matrix is determined according to the soil physical index, soil chemical index and soil biological index, and the Kalman filter algorithm is implemented according to the obtained noise covariance matrix. The covariance estimation value is updated by calculating the Kalman gain, and the corresponding prediction result is generated, and the prediction result is transmitted to the prediction result analysis unit;
[0031] A prediction result analysis unit, used to analyze the prediction result in combination with historical data, generate soil prediction analysis information, and transmit the prediction analysis information to the prediction information output unit;
[0032] A prediction information output unit is used to display the acquired prediction analysis information to the corresponding operator.
[0033] The present invention provides a soil condition prediction method and system based on a machine learning algorithm. Compared with the prior art, it has the following beneficial effects:
[0034] The present invention constructs a noise covariance matrix by analyzing the uncertainties corresponding to soil physical processes, chemical processes and biological processes and determining the standard deviation of noise in these processes. These uncertainty factors are fully considered in the Kalman filter algorithm, and the change of soil state can be predicted more accurately than the prior art. The Kalman filter algorithm is used to combine soil physical, chemical and biological indicators to establish observation equations and state equations. The dynamic prediction of soil state is achieved by continuously updating the covariance estimation value. By acquiring historical data and monitoring and collecting data on soil conditions at a fixed time period, the prediction results are combined with the actual soil conditions for analysis to improve the accuracy and reliability of the prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a step method diagram of the present invention;
[0036] Figure 2 This is a block diagram of the system principle of the present invention. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0038] For example, see Figure 1, the present application provides a soil condition prediction method based on a machine learning algorithm, the method specifically comprising the following steps:
[0039] Step 1: Determine the prediction area and obtain the soil information corresponding to the prediction area. The soil information mainly includes soil physical information, soil chemical information and soil biological information.
[0040] Step 2: Calculate the soil physical indexes, soil chemical indexes and soil biological indexes corresponding to the predicted area based on the obtained soil information.
[0041] First, the soil in the prediction area is sampled, and the sampling here is random sampling. At the same time, the number of samples is multiple groups, and the number is determined according to actual needs. The number is marked as n, and n=1, 2, ..., j, where j represents the number of sampled soil;
[0042] The calculation method of soil physical index is as follows: obtain the volume and soil mass corresponding to the sampled soil, then obtain the soil bulk density corresponding to the sampled soil n and record it as Rn, and the soil bulk density refers to the dry weight of the soil (including pores) in the natural state per unit volume, usually expressed in grams / cubic centimeter, and calculate the soil porosity corresponding to the sampled soil n and record it as Cn, soil porosity refers to the percentage of pore volume in the soil to the total volume of the soil, and its calculation formula is: porosity = (1-soil bulk density / soil specific gravity) × 100%, then calculate the sum of the values of soil bulk density Rn and soil porosity Cn corresponding to all sampled soils n, and calculate the average of the two to obtain the mean soil bulk density Rp and the mean soil porosity Cn, and at the same time calculate the predicted soil physical index Q1 according to the formula Q1 = Rp × a1 + Cp × a2, where a1 and a2 are the weight coefficients of soil bulk density and soil porosity, respectively;
[0043] The calculation method of soil chemical index is as follows: obtain the pH value corresponding to the sampled soil n and record it as Pn, and obtain the corresponding trace element quantity in the sampled soil n and record it as Ln. At the same time, the unit chemical index Wn corresponding to the sampled soil n is calculated according to the formula Wn=Pn×a3+Ln×a4, where a3 and a4 are the weight coefficients of the pH value and the trace element quantity, respectively. Then, the mean value of the sum of the values of all unit chemical indexes Wn is calculated and recorded as the soil chemical index Q2. The specific calculation formula is Q2=(W1+W2+…+Wn)÷n;
[0044] The calculation method of soil biological indicators is as follows: obtain the microbial species corresponding to sampled soil n, record it as Fn, obtain the number of microbial species Fn, record it as Fn′, and calculate the number of all microorganisms corresponding to sampled soil n, record it as Fz n, and the specific calculation formula is F1′+F2′+…+Fj′, and the soil enzyme activity corresponding to the sampled soil n is obtained at the same time, and the soil enzyme activity is determined and assigned a value as Hn, and the specific assignment method is to determine the corresponding activity level based on the soil enzyme activity, and specifically to determine the activity of catalase, and assign a value according to the corresponding activity level. For example, when the amount of hydrogen peroxide decomposed per gram of soil per minute is less than 1.0 ml, it is determined that the catalase activity is low, and the value is assigned H=1; when the amount of hydrogen peroxide decomposed per gram of soil per minute is between 1.0-2.0 ml, it is determined that the catalase activity is medium, and the value is assigned H=2; when the amount of hydrogen peroxide decomposed per gram of soil per minute is greater than 2.0 ml, it is determined that the catalase activity is high, and the value is assigned H=3.
[0045] At the same time, according to the formula Yn=Fz n ×a5+Hn×a6 to calculate the unit biological index Yn corresponding to the sampled soil n, where a5 and a6 are the weight coefficients assigned to the number of microorganisms and soil enzyme activity, respectively, and the mean of the sum of the unit biological index values of all sampled soils n is calculated and recorded as the soil biological index Q3.
[0046] Step 3: Determine the state variables and establish the corresponding observation equations. At the same time, determine the process noise covariance matrix based on soil physical indicators, soil chemical indicators and soil biological indicators.
[0047] Determine the state variables corresponding to the prediction area, and use the vector x = [x1, x2, x3] T , and the state variable here specifically refers to the corresponding soil chemical index Q2, where x1 represents the soil fertility index (such as the comprehensive index of the effective nitrogen, phosphorus and potassium content in the soil), x2 represents the soil moisture, and x3 represents the soil microbial biomass. Then, the corresponding observation equation is established based on the obtained state variables. Soil fertility and moisture can be observed through chemical analysis and physical measurement, and the observation equation can be expressed as z k =Hx k +v k , where z k =[z 1,k , z 2,k , z 3,k ] T is the observation vector, z 1,k is the observed value of soil fertility obtained through chemical analysis, z 2,k is the soil moisture observation value obtained by the humidity sensor, z 3,k is the observed value of soil microorganisms obtained through experimental analysis, x k It is represented as the state vector corresponding to time k, v k is the observation noise, including chemical analysis errors and humidity sensor measurement errors;
[0048] Analyze the uncertainties corresponding to soil physical processes, soil chemical processes, and soil biological processes, and obtain the soil moisture x1 corresponding to the soil physical process, the soil nitrogen content x2 corresponding to the soil chemical process, and the number of soil microorganisms x3 corresponding to the soil biological process. At the same time, obtain the noise standard deviations σ1, σ2, and σ3 of the corresponding processes. The further noise covariance matrix is: where σ1 2 ,σ2 2 and σ3 2 are the noise covariances respectively.
[0049] Step 4: Implement the Kalman filter algorithm based on the obtained noise covariance matrix, and update the covariance estimate by calculating the Kalman gain.
[0050] Set the initial state estimate based on the initial soil physical indicators, soil chemical indicators and soil biological indicators For example, if the soil fertility index x1 is 100 mg / kg, the soil moisture is x230%, and the soil microbial biomass x3 is 40 species, then Next, calculate the initial covariance estimate and record it as P0. For example, for the three variables of soil moisture, nutrient content and microbial biomass mentioned above, if we assume that the variance of the initial estimate of soil moisture is 1, the variance of the initial estimate of nutrient content is 10, and the variance of the initial estimate of microbial biomass is 5, then the corresponding At the same time, determine the state transfer matrix A and the control input matrix B, and if there is no external input, it can be ignored, and establish the corresponding state equation in is the estimated value of the state at the previous moment, and then according to the formula P k|k-1 =AP k-1|k- 1A T +Q updates the prior estimate of the covariance, where Q is the noise covariance matrix;
[0051] Then according to the formula K k =P k|k-1 H T (HP k|k-1 H T +R) -1 Calculate the Kalman gain, where H is the observation matrix and R is the observation noise covariance matrix. k|k-1 To calculate K k , and according to the formula P k|k =(IK k H)P k|k-1 Update the covariance estimate, where I is the identity matrix, e.g., for a 2×2 matrix For a 3×3 matrix And so on.
[0052] Step 5: Use the updated covariance estimate obtained from the above analysis to analyze the soil conditions and obtain the prediction results. At the same time, analyze the prediction results in combination with historical data to generate soil prediction analysis information.
[0053] The updated covariance estimate is used to predict and analyze the soil conditions and obtain the prediction results. Then, historical data is obtained, and the soil conditions of the prediction area are obtained with time t as the period. At the same time, the soil conditions are sorted in chronological order. Then, the prediction results and soil conditions are comprehensively analyzed to determine the changes in the prediction results and generate corresponding prediction analysis information.
[0054] The change of the specific prediction result represents the change of the Kalman filter value of the corresponding prediction area. The Kalman filter values corresponding to different periods are plotted as curves, and the corresponding change is determined based on the plotted curves.
[0055] Embodiment 2: This embodiment is implemented on the basis of Embodiment 1, and the difference from Embodiment 1 is as follows:
[0056] The difference from the analysis of soil chemical indicators in step 2 is that in this embodiment, the urease activity is analyzed. For example, in the laboratory, a certain amount of fresh soil sample (such as 10 grams) is taken, a certain concentration of urea solution (such as 10 ml of 0.5% urea solution) and a buffer solution are added, and cultured at 37°C for 2 hours. Then, the urease activity is calculated by measuring the amount of ammonia generated after the reaction. If the amount of ammonia generated is large, it means that the urease activity is high.
[0057] Assume that in a certain farmland soil, when the amount of ammonia produced per gram of soil per hour is less than 0.5 mg, the urease activity is judged to be low and the value is assigned H=1; when the amount of ammonia produced per gram of soil per hour is between 0.5-1.5 mg, the urease activity is judged to be medium and the value is assigned H=2; when the amount of ammonia produced per gram of soil per hour is greater than 1.5 mg, the urease activity is judged to be high and the value is assigned H=3.
[0058] Embodiment 3, as the embodiment 3 of the present invention, focuses on combining the implementation processes of embodiment 1 and embodiment 2 for implementation.
[0059] Example 4, please refer to Figure 2 The present application provides a soil condition prediction system based on a machine learning algorithm, comprising: a regional information collection unit, a model establishment and analysis unit, a prediction result analysis unit, a prediction information output unit, and a combination of Figure 2 It can be known that the above functional units are electrically connected in a unidirectional manner.
[0060] The regional information acquisition unit is used to transmit the acquired soil information of the predicted area to the model establishment and analysis unit.
[0061] A model building and analysis unit is used to calculate the soil physical index, soil chemical index and soil biological index corresponding to the prediction area according to the obtained soil information, determine the state variables at the same time, and establish the corresponding observation equation, and determine the process noise covariance matrix according to the soil physical index, soil chemical index and soil biological index, implement the Kalman filter algorithm according to the obtained noise covariance matrix, and update the covariance estimate by calculating the Kalman gain, and generate the corresponding prediction result, and transmit the prediction result to the prediction result analysis unit, and the specific processing method is the same as the processing process of step 2, step 3 and step 4 in embodiment 1;
[0062] The prediction result analysis unit is used to analyze the prediction result in combination with historical data, generate soil prediction analysis information, and transmit the prediction analysis information to the prediction information output unit. The specific processing method is the same as the processing process of step five in embodiment one.
[0063] A prediction information output unit is used to display the acquired prediction analysis information to the corresponding operator.
[0064] Some of the data in the above formulas are dimensionless and numerically calculated. Meanwhile, the contents not described in detail in this specification belong to the prior art known to those skilled in the art.
[0065] The above embodiments are only used to illustrate the technical method of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.
Claims
1. A soil condition prediction method based on a machine learning algorithm, characterized in that: The method specifically comprises the following steps: Step 1: Determine the prediction area and obtain the soil information corresponding to the prediction area, and the soil information mainly includes soil physical information, soil chemical information and soil biological information; Step 2: Calculate the soil physical indexes, soil chemical indexes and soil biological indexes corresponding to the predicted area based on the obtained soil information; Step 3: Determine the state variables and establish the corresponding observation equations, and determine the process noise covariance matrix based on soil physical indicators, soil chemical indicators and soil biological indicators; Step 4: Implement the Kalman filter algorithm based on the obtained noise covariance matrix, and update the covariance estimate by calculating the Kalman gain; Step 5: Use the updated covariance estimate obtained from the above analysis to analyze the soil conditions and obtain the prediction results. At the same time, analyze the prediction results in combination with historical data to generate soil prediction analysis information.
2. The soil condition prediction method based on machine learning algorithm according to claim 1 is characterized in that: The specific method of calculating soil physical indicators in step 2 is: The soil in the prediction area is sampled and labeled as n, where n=1, 2, ..., j, where j represents the number of sampled soils; The volume and mass of the sampled soil are obtained, and then the soil bulk density corresponding to the sampled soil n is obtained and recorded as Rn, and the soil porosity corresponding to the sampled soil n is calculated and recorded as Cn. Then the sum of the values of the soil bulk density Rn and the soil porosity Cn corresponding to all sampled soils n is calculated, and the average of the two is calculated to obtain the mean soil bulk density Rp and the mean soil porosity Cn. At the same time, the soil physical index Q1 of the predicted sampling is calculated according to the formula Q1=Rp×a1+Cp×a2, where a1 and a2 are the weight coefficients of soil bulk density and soil porosity, respectively.
3. The soil condition prediction method based on machine learning algorithm according to claim 1 is characterized in that: The specific method of calculating the soil chemical index in step 2 is: The soil in the prediction area is sampled and labeled as n, where n=1, 2, ..., j, where j represents the number of sampled soils. The pH value corresponding to the sampled soil n is obtained and recorded as Pn. At the same time, the corresponding number of trace elements in the sampled soil n is obtained and recorded as Ln. At the same time, the unit chemical index Wn corresponding to the sampled soil n is calculated according to the formula Wn=Pn×a3+Ln×a4, where a3 and a4 are the weight coefficients of pH value and trace element number, respectively. Then, the mean of the sum of the values of all unit chemical indexes Wn is calculated and recorded as soil chemical index Q2.
4. The soil condition prediction method based on machine learning algorithm according to claim 1 is characterized in that: The specific method of calculating soil biological indicators in step 2 is: The microbial species corresponding to the sampled soil n is recorded as Fn, and the number of microbial species Fn is recorded as Fn′, and the number of all microorganisms corresponding to the sampled soil n is calculated as Fz n , and simultaneously obtain the soil enzyme activity corresponding to the sampled soil n, and determine and assign the soil enzyme activity as Hn, and the specific assignment method is to determine the corresponding activity level based on the soil enzyme activity, and assign the value according to the corresponding activity level; At the same time, according to the formula Yn=Fz n ×a5+Hn×a6 to calculate the unit biological index Yn corresponding to the sampled soil n, where a5 and a6 are the weight coefficients assigned to the number of microorganisms and soil enzyme activity, respectively, and the mean of the sum of the unit biological index values of all sampled soils n is calculated and recorded as the soil biological index Q3.
5. The soil condition prediction method based on machine learning algorithm according to claim 1 is characterized in that: The specific method of determining the process noise covariance matrix in step 3 is: Determine the state variables corresponding to the prediction area, and use the vector x = [x1, x2, x3] T , where x1 represents soil fertility index, x2 represents soil moisture, and x3 represents soil microbial biomass. Then, the corresponding observation equation z is established based on the obtained state variables. k =Hx k +v k , where z k =[z 1,k , z 2,k , z 3,k ] T is the observation vector, z 1,k Observed soil fertility value, z 2,k is the observed soil moisture, z 3,k is the soil microbial observation value, x k It is represented as the state vector corresponding to time k, v k is the observation noise; Analyze the uncertainties corresponding to soil physical processes, soil chemical processes, and soil biological processes, and obtain the soil moisture x1 corresponding to the soil physical process, the soil nitrogen content x2 corresponding to the soil chemical process, and the number of soil microorganisms x3 corresponding to the soil biological process. At the same time, obtain the noise standard deviations σ1, σ2, and σ3 of the corresponding processes. The further noise covariance matrix is: where σ1 2 ,σ2 2 and σ3 2 are the noise covariances respectively.
6. The soil condition prediction method based on machine learning algorithm according to claim 1 is characterized in that: The specific method of updating the covariance estimate in step 4 is: Set the initial state estimate based on the initial soil physical indicators, soil chemical indicators and soil biological indicators Then calculate the initial covariance estimate as P0 and establish the corresponding state equation in is the estimated value of the state at the previous moment, and then according to the formula P k|k-1 =AP k-1|k-1 A T +Q updates the prior estimate of the covariance, where Q is the noise covariance matrix; Then according to the formula K k =P k|k-1 H T (HP k|k-1 H T +R) -1 Calculate the Kalman gain, where H is the observation matrix and R is the observation noise covariance matrix. k|k-1 To calculate K k , and according to the formula P k|k =(IK k H)P k|k-1 Update the covariance estimate, where I is represented as the identity matrix.
7. The soil condition prediction method based on machine learning algorithm according to claim 1 is characterized in that: The specific method of generating soil prediction and analysis information in step 5 is as follows: The updated covariance estimate is used to predict and analyze the soil conditions and obtain the prediction results. Then, historical data is obtained, and the soil conditions of the prediction area are obtained with time t as the period. At the same time, the soil conditions are sorted in chronological order. Then, the prediction results and soil conditions are comprehensively analyzed to determine the changes in the prediction results and generate corresponding prediction analysis information.
8. A soil condition prediction system based on a machine learning algorithm, used to execute the soil condition prediction method based on a machine learning algorithm according to any one of claims 1 to 7, characterized in that: It includes a regional information collection unit, a model building and analysis unit, a prediction result analysis unit and a prediction information output unit; A regional information acquisition unit, which is used to transmit the acquired soil information of the prediction area to the model establishment and analysis unit; A model building and analysis unit is used to calculate the soil physical index, soil chemical index and soil biological index corresponding to the prediction area according to the obtained soil information, determine the state variables, and establish the corresponding observation equations. At the same time, the process noise covariance matrix is determined according to the soil physical index, soil chemical index and soil biological index, and the Kalman filter algorithm is implemented according to the obtained noise covariance matrix. The covariance estimation value is updated by calculating the Kalman gain, and the corresponding prediction result is generated, and the prediction result is transmitted to the prediction result analysis unit; A prediction result analysis unit, used to analyze the prediction result in combination with historical data, generate soil prediction analysis information, and transmit the prediction analysis information to the prediction information output unit; A prediction information output unit is used to display the acquired prediction analysis information to the corresponding operator.
Citation Information
Patent Citations
Soil fertility prediction method and system, electronic equipment and storage medium
CN116562134A