Soil nutrient prediction method based on CatBoost model with dynamic weighted multi-objective regression
Through the CatBoost model of dynamically weighted multi-objective regression, soil nutrient prediction is combined with multi-source data, and the limitations of single spectral characteristics and single-objective regression method are solved, achieving high-precision and high-stability SOC and N content prediction.
Patent Information
- Application Number
- CN202510646636.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2045-05-20
AI Technical Summary
The existing soil nutrient prediction methods rely on single spectral characteristics, lack geographical and environmental information, and fail to fully utilize the intrinsic correlation between SOC and N, resulting in limited model applicability and reduced prediction accuracy.
The CatBoost model of dynamically weighted multi-objective regression is adopted, combining multi-source data (such as spectral data, land classification data and remote sensing data), and joint prediction of SOC and N is performed through feature extraction and shared loss function strategies, and the optimal feature combination is screened using multi-feature fusion and competitive adaptive weighted sampling algorithm.
It improves the accuracy and stability of soil nutrient prediction, achieves fast and accurate SOC and N content prediction, and meets the needs of precise agricultural management.
Smart Images

Figure CN120162557B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of agricultural prediction, and in particular to a soil nutrient prediction method based on a CatBoost model of dynamic weighted multi-objective regression. Background Art
[0002] Currently, most predictions of SOC and N rely on two main approaches: wet chemical methods based on traditional laboratory analysis, which, while highly accurate, suffer from long detection cycles and high costs, making them difficult to implement across large farmland or ecosystems. The other is rapid detection methods based on hyperspectral technology, such as visible-near-infrared hyperspectral analysis, which achieves rapid predictions by establishing regression models between hyperspectral data and SOC and N content. Visible-near-infrared hyperspectral data, with its convenient acquisition and high detection efficiency, has become an important tool for soil nutrient prediction.
[0003] Existing hyperspectral analysis methods primarily rely on a single spectral feature for prediction, failing to incorporate multi-source information such as remote sensing data and land classification. They also lack geographic and environmental information. A single spectral feature cannot fully reflect the physical and chemical properties of soils, particularly under different soil types or environmental conditions. The model's applicability is limited, making it difficult to adapt to regional soil variability, reducing its stability and generalizability. Furthermore, existing methods do not fully utilize the inherent correlation between SOC and N. SOC and N have a strong coupling relationship during soil formation, but traditional single-target regression methods, when used to predict SOC and N separately, result in limited prediction accuracy and reduced timeliness. Summary of the Invention
[0004] The purpose of this section is to summarize some aspects of the embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the abstract and title of this application to avoid blurring the purpose of this section, the abstract and the title of the invention, and such simplifications or omissions should not be used to limit the scope of the present invention.
[0005] Therefore, the purpose of the present invention is to provide a soil nutrient prediction method based on the CatBoost model of dynamic weighted multi-objective regression, which can quickly and accurately predict soil organic carbon (SOC) and nitrogen (N) contents.
[0006] To solve the above technical problems, according to one aspect of the present invention, the present invention provides the following technical solutions:
[0007] The soil nutrient prediction method based on the CatBoost model of dynamic weighted multi-objective regression is as follows:
[0008] S1. Acquire multi-source data, including soil data, spectral data, and land classification data using the LUCAS2015 dataset, and collect multi-source remote sensing data from the Google Earth Engine platform;
[0009] S2. Processing and feature extraction of acquired data, including spectral data processing, classification data processing, multi-source remote sensing data processing and feature selection;
[0010] S3. Use the CatBoost model of dynamic weighted multi-objective regression for training, standardize the target variables SOC and N, introduce a dynamic weighted loss function, adopt a shared loss function strategy, and perform cross-validation;
[0011] S4. In the model application stage, hyperspectral data of the target area is collected, and multi-source remote sensing data and land classification information are combined for data fusion and feature extraction. The key features are input into the trained model for soil nutrient prediction.
[0012] As a preferred solution of the soil nutrient prediction method based on the CatBoost model of dynamic weighted multi-objective regression described in the present invention, the multi-source remote sensing data includes climate data, Landsat-8 band data, MODIS data and terrain data.
[0013] As a preferred embodiment of the soil nutrient prediction method based on the CatBoost model of dynamic weighted multi-objective regression described in the present invention, in step S2, the spectral data processing steps are as follows:
[0014] Spectral data within the range of 1052-1148 nm and spectral data within the range of 400-500 nm were excluded;
[0015] The spectral data is then smoothed using a Savitzky-Golay filter to remove high-frequency noise while retaining the main trend characteristics of the spectrum;
[0016] Then the principal component analysis algorithm was used to retain 99.5% of the variance and finally the spectral features were obtained.
[0017] As a preferred solution of the soil nutrient prediction method of the CatBoost model based on dynamic weighted multi-objective regression described in the present invention, in step S2, the classification data processing step is as follows: the classification data is processed using one-hot encoding, and the classification features are obtained after it is converted into binary variables.
[0018] As a preferred solution of the soil nutrient prediction method of the CatBoost model based on dynamic weighted multi-objective regression described in the present invention, the multi-source remote sensing data processing steps are as follows: atmospheric correction, radiation correction and spatial alignment are performed on the multi-source remote sensing data in sequence, and then the mean filling method is used to obtain multi-source remote sensing features.
[0019] As a preferred embodiment of the soil nutrient prediction method based on the CatBoost model of dynamic weighted multi-objective regression described in the present invention, in step S2, the feature selection step is as follows: integrating the spectral features, classification features and multi-source remote sensing features obtained after processing, and then performing feature selection using the CARS algorithm;
[0020] Among them, in each iteration of the CARS algorithm, some features are randomly eliminated, and the number of retained features is gradually reduced. The performance of each feature combination is evaluated using the partial least squares regression model, with the total RMSE of SOC and N as the optimization target.
[0021]
[0022] in, For the The variable ratio of the iteration, is the initial number of variables, is the total number of iterations.
[0023] As a preferred embodiment of the soil nutrient prediction method based on the CatBoost model of dynamic weighted multi-objective regression described in the present invention, in the step of training the CatBoost model of dynamic weighted multi-objective regression, the weights are calculated based on the Gaussian membership function, and the calculation formula is:
[0024]
[0025] in is the error, is the standard deviation, which is used to adjust the width of the membership function, Set to 0.3;
[0026] Then, based on the prediction error of each fold validation set in each cycle, the membership of each target is dynamically calculated and added. The dynamic weights of SOC and N are expressed as follows:
[0027]
[0028]
[0029] in, is the number of cross-validation folds;
[0030] Finally, the shared weighted loss function is as follows:
[0031]
[0032] in, represents the number of samples, and They are SOC The true and predicted values of the target.
[0033] As a preferred solution of the soil nutrient prediction method based on the CatBoost model of dynamic weighted multi-objective regression described in the present invention, the steps of collecting hyperspectral data of the target area, combining multi-source remote sensing data and land classification information for data fusion and feature extraction, and inputting key features into the trained model for soil nutrient prediction are as follows:
[0034] First, a drone or ground-based device carrying a VNIR hyperspectral sensor collects hyperspectral data along a preset route in the target farmland area, while recording the GPS coordinates of each sampling point.
[0035] Subsequently, multi-source remote sensing data and land classification information are combined, and data fusion is performed through radiation correction, atmospheric correction and spatial registration to extract spectral features, remote sensing features and land classification features;
[0036] Next, the selected key features were used as input and imported into the trained CatBoost model based on dynamic weighted multi-objective regression to predict SOC and N content, and finally the SOC and N content prediction results of the farmland area were generated.
[0037] Compared with the existing technology, the present invention has the following beneficial effects: by introducing multi-feature fusion and multi-target regression methods, the present invention overcomes the defects of the existing technology, such as the limited expression ability of single spectral features, the failure to utilize the intrinsic correlation between SOC and N, and the lack of geographical and environmental information. By fusing visible-near infrared spectral features, land classification features, and remote sensing features, and using a competitive adaptive weighted sampling algorithm to screen the optimal feature combination, the present invention improves the accuracy of soil nutrient prediction. At the same time, the MTR-CatBoost model uses the correlation between SOC and N for joint prediction, which improves the stability and generalization ability of the model, achieves higher prediction accuracy and timeliness, and meets the needs of rapid soil nutrient detection and precision agricultural management. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and detailed embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be derived from these drawings without inventive effort. Among them:
[0039] Figure 1 Flowchart of the soil nutrient prediction method based on the CatBoost model of dynamic weighted multi-objective regression of the present invention;
[0040] Figure 2 The CARS algorithm process provided by the present invention;
[0041] Figure 3 This is a training flow chart of the CatBoost model based on dynamic weighted multi-objective regression in the present invention. DETAILED DESCRIPTION
[0042] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0043] The present invention provides a soil nutrient prediction method based on the CatBoost model of dynamic weighted multi-objective regression, which can quickly and accurately predict soil organic carbon (SOC) and nitrogen (N) contents.
[0044] like Figure 1 As shown in the figure, the soil nutrient prediction method based on the CatBoost model of dynamic weighted multi-objective regression is as follows:
[0045] S1. Acquire multi-source data, including soil data, spectral data, and land classification data using the LUCAS2015 dataset, and collect multi-source remote sensing data from the Google Earth Engine platform;
[0046] S2. Processing and feature extraction of acquired data, including spectral data processing, classification data processing, multi-source remote sensing data processing and feature selection;
[0047] S3, such as Figure 3 As shown in the figure, the CatBoost model of dynamic weighted multi-objective regression (WMTR-CatBoost model) is used for training, the target variables SOC and N are standardized, the dynamic weighted loss function is introduced, the shared loss function strategy is adopted, and cross-validation is performed;
[0048] S4. In the model application stage, hyperspectral data of the target area is collected, and multi-source remote sensing data and land classification information are combined for data fusion and feature extraction. The key features are input into the trained model for soil nutrient prediction.
[0049] In the above step S1, the multi-source remote sensing data includes climate data, Landsat-8 band data, MODIS data and terrain data. The integration of this multi-source data not only makes up for the limitations of single hyperspectral data in reflecting environmental and geographic information, but also can improve the model's ability to predict soil properties under complex environmental conditions.
[0050] In step S2, the spectra were affected by a step in the absorbance values of the two spectrometer sensors at 1100 nm. Therefore, the spectral data within the 1052-1148 nm range were excluded from the analysis. Furthermore, instrument artifacts were present in the 400-500 nm spectral region; these artifacts were also excluded from the analysis. The spectral data were then smoothed using a Savitzky-Golay filter (window size 18, third-order polynomial, first-order derivative) to remove high-frequency noise while retaining the main spectral trend features. To further reduce dimensionality and retain key information, this study used a principal component analysis algorithm, retaining 99.5% of the variance, to obtain the final spectral features.
[0051] The present invention integrates the land use and land cover classification data of LUCAS2015. Since the regression model involved in the present invention cannot directly process categorical variables, the categorical data is processed using one-hot encoding and converted into binary variables to obtain classification features.
[0052] After acquiring the data, preprocessing is required, including atmospheric correction, radiometric correction, and spatial registration. Because some sample points contain missing values in the remote sensing data, simply deleting samples can lead to data distribution shifts and reduced sample size. Therefore, this paper employs a mean-filling method to obtain multi-source remote sensing features, maintaining data integrity and minimizing the impact on model performance.
[0053] In step S2, the feature selection steps are as follows: the spectral features, classification features and multi-source remote sensing features obtained after processing are integrated, and then the CARS algorithm is used for feature selection. The CARS algorithm process is as follows: Figure 2 As shown;
[0054] Among them, in each iteration of the CARS algorithm, some features are randomly eliminated, and the number of retained features is gradually reduced. The performance of each feature combination is evaluated using the partial least squares regression model, with the total RMSE of SOC and N as the optimization target.
[0055]
[0056] in, For the The variable ratio of the iteration, is the initial number of variables, is the total number of iterations. This formula defines how the proportion of retained variables in each iteration decreases exponentially with the number of iterations, thereby gradually eliminating features with weaker adaptability and ultimately screening out the optimal feature combination.
[0057] In step S3, to ensure the reliability and consistency of the experimental results, we divided the data in the same dataset in a ratio of 9:1, where 90% of the data was used as a training set for model parameter learning and feature weight optimization, and 10% of the data was used as a test set for evaluating the generalization ability and prediction accuracy of the model. In the step of training the CatBoost model of dynamic weighted multi-objective regression, the weights were calculated based on the Gaussian membership function, and the calculation formula was:
[0058]
[0059] in is the error, is the standard deviation, which is used to adjust the width of the membership function, Set to 0.3;
[0060] Then, based on the prediction error of each fold validation set in each cycle, the membership of each target is dynamically calculated and added. The dynamic weights of SOC and N are expressed as follows:
[0061]
[0062]
[0063] in, is the number of cross-validation folds;
[0064] Finally, the shared weighted loss function is as follows:
[0065]
[0066] in, represents the number of samples, and They are SOC The true and predicted values of the target.
[0067] In step S4, hyperspectral data of the target area is collected, and data fusion and feature extraction are performed by combining multi-source remote sensing data and land classification information. The key features are input into the trained model for soil nutrient prediction as follows:
[0068] First, a drone or ground-based device carrying a VNIR hyperspectral sensor collects hyperspectral data along a preset route in the target farmland area, while recording the GPS coordinates of each sampling point.
[0069] Subsequently, multi-source remote sensing data and land classification information are combined, and data fusion is performed through radiation correction, atmospheric correction and spatial registration to extract spectral features, remote sensing features and land classification features;
[0070] Next, the selected key features were used as input and imported into the trained CatBoost model based on dynamic weighted multi-objective regression to predict SOC and N content, and finally the SOC and N content prediction results of the farmland area were generated.
[0071] Although the present invention has been described above with reference to embodiments, various modifications may be made thereto and equivalent components may be substituted without departing from the scope of the present invention. In particular, as long as there are no structural conflicts, the various features of the embodiments disclosed herein may be combined with each other in any manner, and the omission of an exhaustive description of such combinations in this specification is solely for the sake of space and resource conservation. Therefore, the present invention is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.
Claims
1. A soil nutrient prediction method based on the CatBoost model of dynamic weighted multi-objective regression, characterized in that: Here are the steps: S1. Acquire multi-source data, including soil data, spectral data, and land classification data using the LUCAS2015 dataset, and collect multi-source remote sensing data from the Google Earth Engine platform; S2. Processing and feature extraction of acquired data, including spectral data processing, land classification data processing, multi-source remote sensing data processing and feature selection; S3. Use the CatBoost model of dynamic weighted multi-objective regression for training, standardize the target variables SOC and N, introduce a dynamic weighted loss function, adopt a shared loss function strategy, and perform cross-validation; S4. In the model application stage, hyperspectral data of the target area is collected, and data fusion and feature extraction are performed by combining multi-source remote sensing data and land classification information. The key features are input into the trained model for soil nutrient prediction; In the step of training the CatBoost model for dynamic weighted multi-objective regression, the weights are calculated based on the Gaussian membership function, and the calculation formula is: ; in is the error, is the standard deviation, which is used to adjust the width of the membership function, Set to 0.3; Then, based on the prediction error of each fold validation set in each cycle, the membership of each target is dynamically calculated and added. The dynamic weights of SOC and N are expressed as follows: ; ; in, is the number of cross-validation folds; Finally, the shared weighted loss function is as follows: ; in, represents the number of samples, and They are SOC The true and predicted values of the target.
2. The soil nutrient prediction method based on the CatBoost model of dynamic weighted multi-objective regression according to claim 1, characterized in that: In step S1, the multi-source remote sensing data includes climate data, Landsat-8 band data, MODIS data and terrain data.
3. The soil nutrient prediction method based on the CatBoost model of dynamic weighted multi-objective regression according to claim 1, characterized in that: In step S2, the spectral data processing steps are as follows: Spectral data within the range of 1052-1148 nm and spectral data within the range of 400-500 nm were excluded; The spectral data is then smoothed using a Savitzky-Golay filter to remove high-frequency noise while retaining the main trend characteristics of the spectrum; Then the principal component analysis algorithm was used to retain 99.5% of the variance and finally the spectral features were obtained.
4. The soil nutrient prediction method based on the CatBoost model of dynamic weighted multi-objective regression according to claim 1, characterized in that: In step S2, the land classification data processing steps are as follows: the land classification data is processed using one-hot encoding, and the classification features are obtained after converting it into binary variables.
5. The soil nutrient prediction method based on the CatBoost model of dynamic weighted multi-objective regression according to claim 1, characterized in that: The steps for processing multi-source remote sensing data are as follows: atmospheric correction, radiation correction and spatial registration are performed on the multi-source remote sensing data in sequence, and then the mean filling method is used to obtain the multi-source remote sensing features.
6. The soil nutrient prediction method based on the CatBoost model of dynamic weighted multi-objective regression according to claim 1, characterized in that: In step S2, the feature selection steps are as follows: integrating the spectral features, classification features and multi-source remote sensing features obtained after processing, and then using the CARS algorithm for feature selection; Among them, in each iteration of the CARS algorithm, some features are randomly eliminated, and the number of retained features is gradually reduced. The performance of each feature combination is evaluated using the partial least squares regression model, with the total RMSE of SOC and N as the optimization target. ; in, For the The variable ratio of the iteration, is the initial number of variables, is the total number of iterations.
7. The soil nutrient prediction method based on the CatBoost model of dynamic weighted multi-objective regression according to claim 1, characterized in that: The steps for collecting hyperspectral data of the target area, combining multi-source remote sensing data and land classification information for data fusion and feature extraction, and inputting key features into the trained model for soil nutrient prediction are as follows: First, a drone or ground-based device carrying a VNIR hyperspectral sensor collects hyperspectral data along a preset route in the target farmland area, while recording the GPS coordinates of each sampling point. Subsequently, multi-source remote sensing data and land classification information were combined, and data fusion was performed through radiation correction, atmospheric correction and spatial registration to extract spectral features, remote sensing features and land classification features; then, the screened key features were used as input and imported into the trained CatBoost model based on dynamic weighted multi-objective regression to predict SOC and N content, and finally the SOC and N content prediction results of the farmland area were generated.
Citation Information
Patent Citations
Soil total nitrogen content detection method and device, electronic equipment and storage medium
CN113203689A
Soil nutrient dynamic prediction system based on satellite remote sensing and multi-source data fusion
CN118606645A