A regional-scale method for assessing soil nitrogen emissions from farmland based on transfer learning
Through a transfer learning method, a random forest model is constructed using existing data, and the parameters are optimized for evaluation of nitrogen emissions in farmland, solving the problem of inaccurate nitrogen emissions assessment in the existing technology, and achieving more accurate and reliable evaluation results.
Patent Information
- Application Number
- CN202410774351.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2025-04-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
It is difficult to accurately assess the nitrogen emissions of farmland soil, especially in specific situations under different geographical locations, soil types, crop types and nitrogen fertilizer use strategies.
Using a regional-scale farmland soil nitrogen emission assessment method based on transfer learning, an emission database is constructed by obtaining existing nitrogen, nitric oxide and nitrous oxide data, and a coupled field adaptive and random forest regression model is established to optimize model parameters for global emission prediction.
Accurate assessment of nitrogen emissions in farmland soil is achieved, improving the accuracy and reliability of the assessment, especially in areas where data is scarce or expensive.
Smart Images

Figure CN119783054A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of agricultural nitrogen emission assessment and intelligent agricultural technology, and in particular to a method for assessing farmland soil nitrogen emissions at a regional scale based on transfer learning. Background Art
[0002] Although nitrogen loss from farmland does not pose a strong environmental risk, it will reduce the efficiency of nitrogen fertilizer use in farmland and affect the sustainable development of agriculture. The lack of accurate assessment of nitrogen loss will affect the nitrogen cycle in farmland and reduce the benefits of precision nitrogen fertilizer management.
[0003] Currently, both nitrous oxide and nitric oxide in farmland soils have been widely evaluated based on extensive field measurement data. Nitrogen, nitrous oxide and nitric oxide have the same production pathways, but due to the high atmospheric background value of nitrogen, it is difficult to measure, resulting in few global nitrogen observation tests. In new or understudied farmland environments, there is a lack of sufficient data to accurately predict nitrogen emissions, resulting in inaccurate or unreliable assessment results. Traditional methods or existing technologies (such as simple linear regression or fixed loss ratio) may have limitations in accurately assessing nitrogen emissions from farmland soils, especially in specific scenarios under different geographical locations, soil types, crop varieties and nitrogen fertilizer use strategies. Summary of the invention
[0004] In order to solve the above technical problems, the present invention provides a method for evaluating farmland soil nitrogen emissions at a regional scale based on transfer learning, the method comprising:
[0005] Obtain existing data on nitrogen, nitric oxide and nitrous oxide in farmland soil and build an emission database based on the existing data;
[0006] building coupled domain adaptive and random forest regression models based on data from the emissions database;
[0007] Using farmland soil nitrogen emission observation data to adjust the parameters of the coupled domain adaptation and random forest regression model, an optimized random forest regression model is obtained;
[0008] The optimized model was used to predict global emissions of farmland soil nitrogen data and obtain regional-scale farmland soil nitrogen emission assessment results.
[0009] Optionally, the content of establishing the coupled domain adaptive and random forest regression model based on the data in the emission database specifically includes:
[0010] The management variables, soil variables, and climate variables in the farmland soil nitrogen, nitric oxide, and nitrous oxide data were used to construct a random forest model:
[0011] Emissions = f(soil variables * climate variables * management variables)
[0012] Among them, f is the random forest model.
[0013] Optionally, the soil variables include soil sand, silt, clay content, soil bulk density, soil pH, soil organic carbon content, soil total nitrogen content, and soil carbon-nitrogen ratio; the climate variables include annual rainfall and annual average temperature; and the management variables include nitrogen application amount and irrigation amount.
[0014] Optionally, the content of using the optimized model to predict global farmland emissions from farmland soil nitrogen data includes:
[0015] Mixing the agricultural soil nitrogen, nitric oxide, nitrous oxide data and nitrogen data in the emission database;
[0016] The optimized model is trained using the emissions corresponding to the mixed farmland soil nitrogen, nitric oxide and nitrous oxide data in the emission database to obtain a trained emission prediction model;
[0017] The target domain data is input into the emission prediction model, and the predicted emission of the target domain is output.
[0018] Optionally, the target domain data is farmland soil nitrogen data.
[0019] Optionally, the method for predicting emission assessment includes:
[0020] The coefficient of determination and root mean square error were used for evaluation;
[0021] Coefficient of determination:
[0022]
[0023] Root Mean Square Error:
[0024]
[0025] Among them, n represents the amount of data, y i represents the actual observed value, represents the model prediction value, Represents the average of all observations.
[0026] Optionally, the results of the regional-scale farmland soil nitrogen emission assessment may include:
[0027] The output target domain predicted emissions are evaluated with the emissions corresponding to the target domain data in the emission database to obtain an evaluation result.
[0028] Compared with the prior art, the present invention has the following beneficial effects:
[0029] The present invention uses transfer learning to enable the model to apply knowledge learned from one task to new but related tasks, which is particularly valuable in areas where data is scarce or costly. The purpose of the present invention is to construct a random forest model using field measured data of nitrous oxide and nitric oxide, which have the same production pathway as nitrogen, and then, based on transfer learning technology and ideas, use limited nitrogen field observation data to calibrate the constructed model to meet the needs of large-scale assessment of farmland soil nitrogen emissions, thereby achieving farmland soil nitrogen emission assessment. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0031] Figure 1 A method step diagram of a method for assessing farmland soil nitrogen emissions at a regional scale based on domain adaptive transfer learning technology according to an embodiment of the present invention;
[0032] Figure 2 A diagram showing prediction results using a coupled domain adaptation and random forest regression model according to an embodiment of the present invention;
[0033] Figure 3 This is a schematic diagram of global nitrous oxide observation points in an embodiment of the present invention;
[0034] Figure 4 This is a schematic diagram of global nitric oxide observation points in an embodiment of the present invention;
[0035] Figure 5 Schematic diagram of global nitrogen observation points in an embodiment of the present invention. DETAILED DESCRIPTION
[0036] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0037] A regional-scale method for assessing soil nitrogen emissions from farmland based on transfer learning. Figure 1 As shown, the method includes:
[0038] Step 1: Obtain existing farmland soil nitrogen, nitric oxide and nitrous oxide data, and build an emission database based on the existing data. In this embodiment, a global-scale farmland soil nitrogen, nitric oxide and nitrous oxide emission database is constructed by searching for published experimental articles on nitrogen, nitric oxide and nitrous oxide emissions in databases such as Web of Science and China National Knowledge Infrastructure. Figure 3 , Figure 4 , Figure 5 shown.
[0039] Step 2: Establishing a coupled domain adaptive and random forest regression model based on the data in the emission database. The content of establishing a coupled domain adaptive and random forest regression model based on the data in the emission database specifically includes: matching the soil, climate and management variables in the nitric oxide, nitrous oxide and nitrogen databases with the corresponding nitric oxide, nitrous oxide and nitrogen emissions, and establishing a random forest model using the randomForest package in the R language, namely:
[0040] Emissions = f(soil variables * climate variables * management variables).
[0041] In this implementation, soil variables, climate variables, and management variables are input into the random forest model as independent variables, and emissions are used as dependent variables to train the random forest model. Because the random forest model consists of multiple decision trees, each decision tree predicts the input data and combines the results by voting or averaging to produce the final prediction result. During the training process, each decision tree is trained using different data subsets and feature subsets, which are obtained by random sampling. Random forests also introduce randomness to reduce the risk of overfitting.
[0042] Soil variables include: soil sand, silt, clay content, soil bulk density, soil pH, soil organic carbon content, soil total nitrogen content, soil carbon-nitrogen ratio; climate variables include: annual rainfall, annual average temperature; management variables include: nitrogen application amount, irrigation amount.
[0043] Step 3: Use farmland soil nitrogen emission observation data to adjust the parameters of the random forest model to obtain an optimized random forest model.
[0044] The model is fine-tuned using available farmland soil nitrogen emission observation data, mainly adjusting the ntree and mtry parameters of the random forest regression to reduce the difference between the source domain and the target domain. For the initial random forest model, the input data mainly uses the source domain data, but when predicting the target domain, there will inevitably be differences. The observation data is 20% of the target domain nitrogen data. When the target domain is added to the model, the predicted data will inevitably be more accurate, narrowing the difference between the source domain and the target domain.
[0045] Test the performance of the model on the target domain and adjust it as needed. If the prediction accuracy is low, repeat the parameter adjustment and re-verify. If it is still not satisfied, iterate the model until the prediction is more accurate.
[0046] When adjusting parameters, when the random forest model performs poorly (R2 is less than 0.60 or RMSE is greater than 50%), you need to adjust the mtry and ntree parameters. The best mtry is 1 / 3 of the total number of input variables, and ntree can be appropriately increased to 1000-2000, with a default value of 500; when the adjusted model still performs poorly, that is, R2 is less than 0.60 or RMSE is greater than 50%, iterate the model until the prediction result is more accurate.
[0047] In this embodiment, the source domain is the existing knowledge, which in this embodiment refers to nitrous oxide and nitric oxide data; the target domain is the new knowledge that needs to be learned, which in this embodiment refers to nitrogen data.
[0048] In this embodiment, the steps of constructing the emission model include:
[0049] A1. Mix all the farmland soil nitrogen, nitric oxide, and nitrous oxide data in the emission database with 20% nitrogen data;
[0050] A2. Use the emissions corresponding to the mixed farmland soil nitrogen, nitric oxide and nitrous oxide data in the emission database to train the optimized model to obtain a trained emission prediction model;
[0051] A3. Input the target domain data (the remaining 80% nitrogen data) into the emission prediction model, and output the target domain predicted emission. The target domain data is farmland soil nitrogen data.
[0052] B. The content of obtaining the regional-scale farmland soil nitrogen emission assessment results specifically includes: evaluating the output target domain predicted emissions with the emissions corresponding to the target domain data in the emission database to obtain the assessment results.
[0053] Methods for conducting the assessment include: evaluation using the coefficient of determination and root mean square error;
[0054] Coefficient of determination:
[0055]
[0056] Root Mean Square Error:
[0057]
[0058] Among them, n represents the amount of data, yi represents the actual observed value, represents the model prediction value, Represents the average of all observations.
[0059] The prediction results using the coupled domain adaptation and random forest regression model are shown in Figure 2 As shown, Figure 2 (a) shows the model performance of the coupled domain adaptation and random forest regression method (DATL-RF). Figure 2 (b) is the performance of the random forest regression model built directly using nitrogen data. From the figure, we can see that the DATL-RF model has a higher R2, a slope value closer to 1, and a lower RMSE, which can significantly improve the effect of the model.
[0060] Step 4: Use the optimized model to predict global farmland emissions from farmland soil nitrogen data and obtain regional-scale farmland soil nitrogen emission assessment results.
[0061] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.
Claims
1. A regional-scale farmland soil nitrogen emission assessment method based on transfer learning, characterized in that: The method comprises: Obtain existing data on nitrogen, nitric oxide and nitrous oxide in farmland soil and build an emission database based on the existing data; building coupled domain adaptive and random forest regression models based on data from the emissions database; Using farmland soil nitrogen emission observation data to adjust the parameters of the coupled domain adaptation and random forest regression model, an optimized random forest regression model is obtained; The optimized model was used to predict global emissions of farmland soil nitrogen data and obtain regional-scale farmland soil nitrogen emission assessment results.
2. The method for assessing farmland soil nitrogen emissions at a regional scale based on transfer learning according to claim 1, characterized in that: The contents of establishing coupled domain adaptive and random forest regression models based on the data in the emission database specifically include: The management variables, soil variables, and climate variables in the farmland soil nitrogen, nitric oxide, and nitrous oxide data were used to construct a random forest model: Emissions = f(soil variables * climate variables * management variables) Among them, f is the random forest model.
3. The method for assessing farmland soil nitrogen emissions at a regional scale based on transfer learning according to claim 2, characterized in that: The soil variables include soil sand, silt, clay content, soil bulk density, soil pH, soil organic carbon content, soil total nitrogen content, and soil carbon-nitrogen ratio; the climate variables include annual rainfall and annual average temperature; and the management variables include nitrogen application amount and irrigation amount.
4. The method for assessing farmland soil nitrogen emissions at a regional scale based on transfer learning according to claim 1, characterized in that: The content of using the optimized model to predict global farmland emissions based on farmland soil nitrogen data includes: Mixing the agricultural soil nitrogen, nitric oxide, nitrous oxide data and nitrogen data in the emission database; The optimized model is trained using the emissions corresponding to the mixed farmland soil nitrogen, nitric oxide and nitrous oxide data in the emission database to obtain a trained emission prediction model; The target domain data is input into the emission prediction model, and the predicted emission of the target domain is output.
5. The method for assessing farmland soil nitrogen emissions at a regional scale based on transfer learning according to claim 4, characterized in that: The target domain data is farmland soil nitrogen data.
6. The method for assessing farmland soil nitrogen emissions at a regional scale based on transfer learning according to claim 4, characterized in that: The method for predicting emission assessment includes: The coefficient of determination and root mean square error were used for evaluation; Coefficient of determination: Root Mean Square Error: Among them, n represents the amount of data, y i represents the actual observed value, represents the model prediction value, Represents the average of all observations.
7. The method for assessing farmland soil nitrogen emissions at a regional scale based on transfer learning according to claim 4, characterized in that: The results of the regional-scale farmland soil nitrogen emission assessment include: The output target domain predicted emissions are evaluated with the emissions corresponding to the target domain data in the emission database to obtain an evaluation result.
Citation Information
Cited By
Comprehensive environmental nitrogen threshold evaluation method and system
CN120600152A
An integrated environmental nitrogen threshold assessment method and system
CN120600152B