A rapid detection method and system for herbicide active ingredients by near-infrared spectroscopy

By acquiring near-infrared spectral data and soil texture parameters, piecewise and nonlinear functions were constructed, and combined with ambient light correction, the influence of soil texture differences on herbicide detection was resolved, enabling rapid and accurate detection of herbicide components and improving detection accuracy and reliability.

CN120446046BActive Publication Date: 2026-05-05NANJING HUAZHOU PHARMA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANJING HUAZHOU PHARMA
Filing Date
2025-06-06
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing technologies lack methods for rapidly and accurately detecting herbicide components and concentrations in soils of different areas in the field, making it difficult to overcome the impact of soil texture differences on the accuracy of herbicide detection.

Method used

By acquiring near-infrared spectral data, moisture content, and compaction values, a piecewise function for moisture content and a nonlinear function for compaction are constructed. Combined with an ambient light intensity correction model, spectral correction is performed to eliminate the distortion of the spectrum caused by soil texture differences, thereby enabling rapid and accurate detection of the active ingredients in herbicides.

Benefits of technology

Under complex soil texture conditions, rapid and accurate detection of herbicide active ingredients has been achieved, improving detection accuracy and reliability and providing technical support for precision application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120446046B_ABST
    Figure CN120446046B_ABST
Patent Text Reader

Abstract

The application provides a rapid detection method and system for herbicide effective components based on near-infrared spectroscopy, which is applied to the field of agricultural detection technology, and the near-infrared spectroscopy data of a soil region to be detected, the water content and the compactness values reflecting the soil texture differences are obtained, based on the preset interval to which the water content value belongs, the corresponding preset scattering correction parameter is selected, the actual scattering correction parameter is calculated through the compactness value, the fine adjustment of the scattering correction parameter is realized, the quality and reliability of the spectral data are improved through spectral correction; the corrected spectrum is analyzed, and the real situation of the herbicide in the soil can be more accurately reflected. Therefore, the application effectively overcomes the interference of the complex soil texture in the field on the near-infrared spectroscopy herbicide detection, and realizes the beneficial effect of rapid and accurate detection of the herbicide effective components under the complex soil condition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of agricultural testing technology, and in particular to a rapid near-infrared spectroscopy method and system for detecting the active ingredient in herbicides. Background Technology

[0002] Modern agriculture places higher demands on the precise application of herbicides, aiming to minimize pesticide residues and reduce environmental pollution while ensuring healthy crop growth. However, the complexity of field soil environments, particularly the diversity of soil textures, presents significant challenges to precise application. Even within the same field, various texture types often exist, such as sandy soil, loam, and clay. These texture differences significantly affect the physicochemical properties of the soil, leading to variations in the adsorption, migration, and degradation of herbicides. For example, sandy soil has poor water and fertilizer retention capacity, making herbicide leaching more likely; while clay soil has strong adsorption capacity, potentially reducing the bioavailability of herbicides. This unevenness in herbicide efficacy and residue levels caused by soil texture differences makes traditional uniform application strategies difficult to implement effectively, easily resulting in localized insufficient or excessive application.

[0003] Current technology lacks a method for quickly and accurately determining the composition and actual concentration of herbicides in soils of different areas in a field. Therefore, to achieve precision application, there is an urgent need for a method that can overcome the influence of soil texture differences and quickly and accurately detect the concentration of the active ingredient in herbicides.

[0004] To address the aforementioned issues, existing technologies urgently need improvement. Summary of the Invention

[0005] In view of the shortcomings of the prior art, this application provides a rapid near-infrared spectroscopy method and system for detecting the active ingredient of herbicides, which has the beneficial effect of overcoming the influence of soil texture differences and realizing rapid and accurate detection of the concentration of active ingredient of herbicides.

[0006] Firstly, a rapid near-infrared spectroscopy method for detecting the active ingredient of a herbicide is provided for rapidly detecting the concentration of the active ingredient in herbicides under complex soil texture conditions in the field. The method includes the following steps:

[0007] S1: Obtain near-infrared spectral data of the soil area to be tested, as well as moisture content and compaction values ​​to characterize the differences in soil texture;

[0008] S2: Select the corresponding preset scattering correction parameter according to the preset moisture content range to which the moisture content value belongs, and calculate the actual scattering correction parameter according to the compactness value.

[0009] S3: Perform spectral correction on the near-infrared spectral data according to the preset scattering correction parameters and the actual scattering correction parameters to obtain the corrected spectral data;

[0010] S4: Based on the corrected spectral data, the effective components of the herbicide in the soil area to be tested are analyzed.

[0011] This application proposes a rapid near-infrared spectroscopy method for detecting active ingredients in herbicides, aiming to address the impact of complex soil texture on the accuracy of herbicide detection. By acquiring near-infrared spectral data of the soil area to be tested, along with moisture content and compaction values ​​reflecting soil texture differences, the influence of soil texture on the spectral data is quantified. Based on the preset range of moisture content values, corresponding preset scattering correction parameters are selected. Then, considering the influence of compaction, the actual scattering correction parameters are calculated using compaction values, achieving fine-tuning of the scattering correction parameters and more accurately reflecting the scattering situation under actual soil texture conditions. Spectral correction aims to eliminate or reduce spectral distortion caused by soil texture differences, improving the quality and reliability of spectral data and laying the foundation for subsequent accurate analysis of herbicide components. Analyzing the corrected spectrum can more accurately reflect the true situation of herbicides in the soil. Therefore, this application, by comprehensively considering the two key texture parameters of soil moisture content and compaction and designing corresponding scattering correction steps, effectively overcomes the interference of complex soil texture on near-infrared spectral herbicide detection, achieving rapid and accurate detection of active ingredients in herbicides under complex soil conditions.

[0012] Furthermore, step S1 includes:

[0013] S11: Use a near-infrared spectrometer to scan the soil area to be tested, obtain raw spectral data in the wavelength range of 400nm-2500nm, record the reflectance values ​​at each wavelength, and obtain near-infrared spectral data;

[0014] S12: The moisture content of the soil area to be tested is measured using a soil moisture sensor;

[0015] S13: Use a soil compaction meter to measure the soil penetration resistance in the soil area to be tested, and obtain the compaction value.

[0016] This application proposes a rapid near-infrared spectroscopy method for detecting the active ingredient in herbicides. By making the data acquisition process more specific and operable, it ensures that near-infrared spectral data, moisture content values, and compaction values ​​can be effectively and accurately acquired, laying a data foundation for subsequent spectral correction and analysis of the active ingredient in herbicides.

[0017] Furthermore, step S2 includes:

[0018] S21: Construct a piecewise function for water content, divide the water content into low water content range, medium water content range and high water content range, and preset different scattering correction parameters for different water content ranges;

[0019] S23: Determine the moisture content range to which the moisture content value of the soil area to be tested belongs, and select the corresponding preset scattering correction intensity parameter;

[0020] S24: Construct a nonlinear compactness function, which is an exponential function, to characterize the nonlinear relationship between compactness and scattering correction parameters;

[0021] S25: Substitute the compaction value of the soil to be tested into the compaction nonlinear function to calculate the actual scattering correction parameter.

[0022] This application proposes a rapid near-infrared spectroscopy method for detecting the active ingredient in herbicides. By constructing a piecewise function of moisture content and a nonlinear function of compactness, and combining them with actual measurement data, the method achieves refined and accurate acquisition of scattering correction parameters. This effectively solves the problem of the generalized method for determining parameters in step S2, improves the accuracy of spectral correction, and lays the foundation for subsequent accurate detection of the active ingredient in herbicides.

[0023] Furthermore, step S24 includes:

[0024] S241: Obtain the soil compaction and corresponding scattering correction parameters from historical data, and construct an initial database;

[0025] S242: The least squares method was used to fit the soil compaction and scattering correction parameters in the initial database to obtain multiple exponential functions;

[0026] S243: Select the exponential function with the smallest root mean square error in the initial database as the compactness nonlinear function.

[0027] This application proposes a rapid near-infrared spectroscopy method for detecting active ingredients in herbicides. By constructing an initial database, a data foundation is provided for subsequent function fitting. The least squares method is used to fit the soil compaction and scattering correction parameters in the initial database, resulting in multiple exponential functions that allow for the selection of the optimal function. The exponential function with the smallest root mean square error is chosen, ensuring that the nonlinear compaction function best fits historical data. This more accurately characterizes the nonlinear relationship between compaction and scattering correction parameters, improving the accuracy and reliability of scattering correction and thus enhancing the precision of herbicide active ingredient detection.

[0028] Furthermore, step S3 includes:

[0029] S31: Construct an ambient light intensity correction model;

[0030] S32: Obtain ambient light intensity data of the soil area to be tested, and calculate ambient light interference spectral data based on the ambient light intensity data and the ambient light intensity correction model;

[0031] S33: Remove ambient light interference spectral data from the near-infrared spectral data to obtain near-infrared spectral data without ambient light interference;

[0032] S34: Based on the preset scattering correction parameters and the actual scattering correction parameters, perform spectral correction on the near-infrared spectral data to eliminate ambient light interference, and obtain the corrected spectral data.

[0033] Furthermore, step S31 includes:

[0034] S311: Under experimental conditions, collect the first near-infrared spectral data of a standard reflector in a dark environment;

[0035] S312: Collect second near-infrared spectral data of a standard reflector under different ambient light intensities;

[0036] S313: Subtract the first near-infrared spectral data from the second near-infrared spectral data under different ambient light intensities to obtain the net spectral data under each ambient light intensity.

[0037] S314: Using ambient light intensity as the independent variable and the corresponding net spectral data as the dependent variable, a multiple linear regression method is used to construct an ambient light intensity correction model.

[0038] Furthermore, step S32 includes:

[0039] S321: Based on the ambient light intensity correction model, establish the functional relationship between ambient light intensity and ambient light interference spectrum;

[0040] S322: Real-time acquisition of ambient light intensity data for the soil area to be tested;

[0041] S323: Substitute the acquired ambient light intensity data into the functional relationship between ambient light intensity and ambient light interference spectrum to calculate the ambient light interference spectrum.

[0042] Furthermore, step S321 includes:

[0043] S3211: Based on the ambient light intensity correction model, extract the multivariate linear regression coefficient matrix and intercept vector;

[0044] S3212: Construct the functional relationship between ambient light intensity and ambient light interference spectrum: Ambient light interference spectrum = Ambient light intensity data × Multiple linear regression coefficient matrix + Intercept vector.

[0045] Furthermore, step S4 includes:

[0046] S41: Construct a database of herbicide spectral characteristics, which contains standard near-infrared spectral data of various common herbicides and their corresponding characteristic wavelengths and absorption intensity information;

[0047] S42: Preprocess the corrected spectral data of the soil area to be tested, including smoothing filtering and noise reduction, to obtain a clear spectral curve;

[0048] S43: Based on the herbicide spectral characteristic database, identify the characteristic wavelengths in the corrected spectral curves and calculate their corresponding absorption intensities;

[0049] S44: Based on the identified characteristic wavelengths and absorption intensities, and combined with the preset herbicide concentration calculation model, the types and concentrations of effective herbicide components in the soil area to be tested are calculated.

[0050] Secondly, a rapid near-infrared spectroscopy detection system for active ingredients in herbicides, characterized in that, when applied to the steps of any of the methods described above, the system comprises:

[0051] Acquisition module: Acquires near-infrared spectral data of the soil area to be tested, as well as moisture content and compaction values ​​that characterize soil texture differences;

[0052] Calculation module: Based on the preset moisture content range to which the moisture content value belongs, select the corresponding preset scattering correction parameter, and calculate the actual scattering correction parameter based on the compactness value;

[0053] Spectral correction module: Based on the preset scattering correction parameters and the actual scattering correction parameters, performs spectral correction on the near-infrared spectral data to obtain the corrected spectral data;

[0054] Analysis module: Based on the corrected spectral data, the effective components of herbicides in the soil area to be tested are analyzed.

[0055] Beneficial Effects: This application proposes a rapid near-infrared spectral detection method and system for herbicide active ingredients, aiming to address the impact of complex soil texture on the accuracy of herbicide detection. By acquiring near-infrared spectral data of the soil area to be tested, along with moisture content and compaction values ​​reflecting soil texture differences, the influence of soil texture on spectral data is quantified. Based on the preset range of moisture content values, corresponding preset scattering correction parameters are selected. Then, considering the influence of compaction, the actual scattering correction parameters are calculated using compaction values, achieving fine-tuning of the scattering correction parameters and more accurately reflecting the scattering situation under actual soil texture conditions. Spectral correction aims to eliminate or reduce spectral distortion caused by soil texture differences, improving the quality and reliability of spectral data and laying the foundation for subsequent accurate analysis of herbicide components. Analyzing the corrected spectrum can more accurately reflect the true situation of herbicides in the soil. Therefore, by comprehensively considering the two key texture parameters of soil moisture content and compaction, and designing corresponding scattering correction steps, this application effectively overcomes the interference of complex soil texture in the field on the detection of herbicides by near-infrared spectroscopy, and achieves the beneficial effect of rapid and accurate detection of herbicide active ingredients under complex soil conditions. Attached Figure Description

[0056] Figure 1 This is a flowchart of a rapid near-infrared spectroscopy method for detecting the active ingredient in herbicides proposed in this application.

[0057] Figure 2 This is a structural diagram of a near-infrared spectroscopy rapid detection system for the active ingredient in herbicides proposed in this application.

[0058] Labeling descriptions: 201, Acquisition module; 202, Calculation module; 203, Spectral correction module; 204, Analysis module. Detailed Implementation

[0059] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. The components of the embodiments of this application described and marked in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0060] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0061] Please refer to Figure 1 A rapid near-infrared spectroscopy method for detecting the active ingredient of herbicides is disclosed, which is used to rapidly detect the concentration of the active ingredient of herbicides under complex soil texture conditions in the field. The method includes the following steps:

[0062] S1: Obtain near-infrared spectral data of the soil area to be tested, as well as moisture content and compaction values ​​to characterize the differences in soil texture;

[0063] S2: Select the corresponding preset scattering correction parameter according to the preset moisture content range to which the moisture content value belongs, and calculate the actual scattering correction parameter according to the compactness value.

[0064] S3: Perform spectral correction on the near-infrared spectral data according to the preset scattering correction parameters and the actual scattering correction parameters to obtain the corrected spectral data;

[0065] S4: Based on the corrected spectral data, the effective components of the herbicide in the soil area to be tested are analyzed.

[0066] Step S1 involves acquiring spectral data and soil texture parameters. Specifically, a near-infrared spectrometer can be used to scan the soil area to be tested to obtain near-infrared spectral data, a soil moisture sensor can be used to measure soil moisture content, and a soil compaction meter can be used to measure soil compaction. By simultaneously acquiring spectral data and soil texture parameters, a data foundation is provided for subsequent spectral calibration.

[0067] Step S2 refers to the process of determining the scattering correction parameters. Specifically, firstly, based on the preset moisture content range to which the moisture content value belongs, a preset scattering correction parameter is initially selected. Then, considering the influence of soil compaction on scattering, the preset scattering correction parameter is adjusted using the compaction value to calculate the actual scattering correction parameter. In this way, the determination of the scattering correction parameter comprehensively considers the influence of moisture content and compaction, which can more accurately reflect the differences in soil texture and provide more refined parameters for subsequent spectral correction.

[0068] Step S3 refers to the spectral correction step. Specifically, it involves correcting the near-infrared spectral data obtained in step S1 using the preset scattering correction parameters and the actual scattering correction parameters obtained in step S2. Spectral correction aims to eliminate or reduce spectral scattering bias caused by differences in soil texture, improve the quality and accuracy of spectral data, and lay the foundation for subsequent analysis of the active ingredients in herbicides.

[0069] Step S4 refers to the analysis of the active ingredient in herbicides. Specifically, based on the spectral correction in step S3, the corrected spectral data is analyzed to obtain information on the type and concentration of the active ingredient in the herbicide in the soil area to be tested. The spectral analysis method can employ spectral feature matching. By analyzing the corrected spectral data, the active ingredient in the herbicide can be detected quickly and accurately, enabling precise application of herbicides.

[0070] Specifically, this application provides a rapid near-infrared spectroscopy method for detecting the active ingredient in herbicides, aiming to address the impact of complex and diverse soil textures on the accuracy of herbicide detection. The principle of this method is as follows:

[0071] First, in step S1, near-infrared spectral data of the soil area to be tested, along with moisture content and compaction values ​​characterizing soil texture differences, are acquired simultaneously, comprehensively considering soil texture factors. Then, in step S2, a preset scattering correction parameter is selected based on the moisture content value, and the actual scattering correction parameter is calculated in conjunction with the compaction value, achieving dynamic adjustment of the scattering correction parameter and more precisely reflecting the influence of soil texture on the spectrum. Step S3 uses the scattering correction parameter to correct the near-infrared spectral data, eliminating or reducing spectral deviations caused by soil texture differences, obtaining more accurate spectral data. Finally, step S4 analyzes the corrected spectral data to obtain the types and concentrations of herbicide active ingredients in the soil area to be tested, ensuring the reliability of the detection results. The scattering correction mechanism based on soil moisture content and compaction introduced in steps S2 and S3 effectively overcomes the interference of soil texture differences on the near-infrared spectral detection of herbicide active ingredient concentrations, achieving rapid and accurate detection under complex field soil conditions.

[0072] Through the above technical solution, this application enables rapid and accurate detection of herbicide active ingredient concentrations under complex soil texture conditions in the field. This method considers the impact of soil texture differences on spectral detection, and corrects the spectral data using moisture content and compaction parameters, thereby improving the quality of the spectral data, ensuring the accuracy of herbicide active ingredient detection, and providing technical support for achieving precise herbicide application.

[0073] Furthermore, step S1 includes:

[0074] S11: Use a near-infrared spectrometer to scan the soil area to be tested, obtain raw spectral data in the wavelength range of 400nm-2500nm, record the reflectance values ​​at each wavelength, and obtain near-infrared spectral data;

[0075] S12: The moisture content of the soil area to be tested is measured using a soil moisture sensor;

[0076] S13: Use a soil compaction meter to measure the soil penetration resistance in the soil area to be tested, and obtain the compaction value.

[0077] In step S11, a near-infrared spectrometer is used to scan the soil area to be tested in order to obtain raw spectral data. The scanning wavelength range is set to 400 nm–2500 nm, which covers the typical region of the near-infrared spectrum and can reflect the spectral characteristics of soil and herbicide molecules. The reflectance values ​​at each wavelength are recorded to obtain near-infrared spectral data for subsequent analysis.

[0078] In step S12, a soil moisture sensor is used to directly measure the moisture content of the soil area to be tested. The soil moisture sensor can be a capacitive sensor, a time-domain reflectometry sensor, or a frequency-domain reflectometry sensor, etc. These sensors can quickly and accurately measure the moisture content in the soil.

[0079] In step S13, soil compaction can be uniformly measured for different soil types. Therefore, this application uses a soil compaction meter to measure soil penetration resistance, thereby characterizing the degree of soil compaction. The soil compaction meter can be a mechanical compaction meter or an electronic compaction meter, and the measurement unit can be kilopascal or megapascal. Through steps S11, S12, and S13, the near-infrared spectral data, moisture content values, and compaction values ​​of the soil area to be tested can be effectively obtained, providing a data basis for subsequent steps and ensuring the accuracy and standardization of the data acquisition process.

[0080] Furthermore, step S2 includes:

[0081] S21: Construct a piecewise function for water content, divide the water content into low water content range, medium water content range and high water content range, and preset different scattering correction parameters for different water content ranges;

[0082] S22: Determine the moisture content range to which the moisture content value of the soil area to be tested belongs, and select the corresponding preset scattering correction intensity parameter;

[0083] S23: Construct a nonlinear compactness function, which is an exponential function, to characterize the nonlinear relationship between compactness and scattering correction parameters;

[0084] S24: Substitute the compaction value of the soil to be tested into the compaction nonlinear function to calculate the actual scattering correction parameters.

[0085] In step S21, constructing the piecewise function of moisture content refers to pre-setting several moisture content intervals based on the degree of influence of soil moisture content on scattering, and discretizing the continuously changing moisture content into a finite number of interval ranges. For example, it can be divided into a low moisture content interval with a moisture content of less than 10%, a medium moisture content interval with a moisture content of 10%-20%, and a high moisture content interval with a moisture content of more than 20%. For each moisture content interval, a scattering correction parameter is preset to be adapted to it. The scattering correction parameter can be the coefficient value used for the spectral correction model.

[0086] In step S22, determining the moisture content range to which the moisture content value of the soil area to be tested belongs means comparing the moisture content value of the soil to be tested measured by the humidity sensor with the moisture content range divided in step S21 to determine the specific range in which the moisture content value falls. For example, if the moisture content of a certain soil area to be tested is 15%, it is determined to belong to the medium moisture content range. Selecting the corresponding preset scattering correction intensity parameter means selecting the preset scattering correction parameter corresponding to the range determined in step S23 based on the moisture content range determined in step S21. For example, if it is determined to be the medium moisture content range, the preset scattering correction parameter corresponding to the medium moisture content range is selected.

[0087] In step S23, considering that the effect of soil compaction on scattering is not a simple linear relationship but has nonlinear characteristics, an exponential function can better fit this nonlinear relationship. For example, the exponential function can be set to the form y=a*exp(b*x), where x represents soil compaction, y represents the scattering correction parameter, and a and b are model parameters obtained by fitting experimental data. The exponential function is chosen because it can reflect the nonlinear amplification effect of increased compaction on the scattering correction parameter and more accurately describe the relationship between the two.

[0088] In step S24, the compaction value of the soil to be tested is substituted into the compaction nonlinear function to calculate the actual scattering correction parameter. This means that the compaction value of the soil to be tested measured by the compaction meter is substituted into the compaction nonlinear function constructed in step S23, and the actual scattering correction parameter corresponding to the compaction value is obtained through function calculation. This parameter is obtained after nonlinear adjustment based on the soil compaction on the basis of the preset parameters in the moisture content range, which can more accurately reflect the influence of soil texture on scattering.

[0089] Therefore, by combining the piecewise function of water content and the nonlinear function of compaction, the scattering correction parameters can be calculated more precisely, and the scattering correction parameters applicable to complex soil textures can be obtained more accurately. This approach, which considers both the water content range and the nonlinear effect of compaction, can more comprehensively capture the complex influence of soil texture differences on spectral scattering compared to using only a single parameter or linear adjustment. The synergistic effect between steps S21, S23, S24, and S25 makes the calculation of the scattering correction parameters more refined and accurate.

[0090] Furthermore, step S24 includes:

[0091] S241: Obtain the soil compaction and corresponding scattering correction parameters from historical data, and construct an initial database;

[0092] S242: The least squares method was used to fit the soil compaction and scattering correction parameters in the initial database to obtain multiple exponential functions;

[0093] S243: Select the exponential function with the smallest root mean square error in the initial database as the compactness nonlinear function.

[0094] Specifically, step S241 involves collecting data on the correspondence between soil compaction and scattering correction parameters from historical experimental records, field test data, or publicly available databases. This historical data may include compaction values ​​and corresponding scattering correction parameter values ​​under different soil types and moisture contents. The collected data is organized and stored in a database, which may be in the form of a spreadsheet, relational database, or data file.

[0095] Specifically, step S242 involves selecting a suitable exponential function form, such as a single exponential function, a double exponential function, or a more complex exponential function form. Then, using the least squares method, with the compactness data in the initial database as the independent variable and the scattering correction parameter data as the dependent variable, the selected exponential function is fitted to obtain the function's parameter values. The fitting process aims to minimize the sum of squared residuals between the predicted values ​​of the exponential function and the actual scattering correction parameter values, thereby obtaining the exponential function that best matches the historical data. By adjusting the parameters of the exponential function, several different exponential functions can be obtained.

[0096] Specifically, step S243 involves calculating the root mean square error (RMSE) of each exponential function obtained in step S242 on the initial database. The RMSE quantifies the deviation between the predicted value and the actual scattering correction parameter value of the exponential function. The calculation method can be as follows: first, calculate the residual for each data point, i.e., the difference between the actual and predicted values; then, average the squared residuals and finally take the square root. A smaller RMSE indicates a higher degree of fit between the exponential function and the historical data. By comparing the RMSEs of multiple exponential functions, the exponential function with the smallest RMSE is selected as the final compactness nonlinear function.

[0097] Furthermore, step S3 includes:

[0098] S31: Construct an ambient light intensity correction model;

[0099] S32: Obtain ambient light intensity data for the soil area to be tested, and calculate ambient light interference spectral data based on the ambient light intensity data and the ambient light intensity correction model;

[0100] S33: Remove ambient light interference from the near-infrared spectral data to obtain near-infrared spectral data without ambient light interference;

[0101] S34: Based on the preset scattering correction parameters and the actual scattering correction parameters, perform spectral correction on the near-infrared spectral data to eliminate ambient light interference, and obtain the corrected spectral data.

[0102] Specifically, in the spectral calibration process, an ambient light intensity calibration model is first constructed to quantify the relationship between ambient light intensity and ambient light interference spectra. Then, ambient light intensity data for the soil area to be tested is acquired, and combined with the ambient light intensity calibration model, ambient light interference spectral data is calculated, representing the specific amount of interference caused by ambient light on the spectral data. Next, ambient light interference spectral data is removed from the original near-infrared spectral data to obtain near-infrared spectral data free from ambient light interference, improving the purity of the spectral data. Finally, based on the spectral data free from ambient light interference, spectral calibration is performed according to preset scattering calibration parameters and actual scattering calibration parameters to obtain the final calibrated spectral data, ensuring the quality of the spectral data and providing data support for the subsequent accurate analysis of herbicide active ingredients. By adding an ambient light intensity calibration model and an ambient light interference removal step, the influence of ambient light on near-infrared spectral data is effectively reduced, allowing subsequent spectral calibration and herbicide component analysis to be performed based on more accurate spectral data, thus improving the reliability and accuracy of the herbicide detection method. The introduction of an ambient light interference correction model enhances the adaptability and effectiveness of herbicide detection methods in field applications, taking into account the complex and variable nature of actual field lighting conditions.

[0103] Furthermore, step S31 includes:

[0104] S311: Under experimental conditions, collect the first near-infrared spectral data of a standard reflector in a dark environment;

[0105] S312: Collect second near-infrared spectral data of a standard reflector under different ambient light intensities;

[0106] S313: Subtract the first near-infrared spectral data from the second near-infrared spectral data under different ambient light intensities to obtain the net spectral data under each ambient light intensity.

[0107] S314: Using ambient light intensity as the independent variable and the corresponding net spectral data as the dependent variable, a multiple linear regression method is used to construct an ambient light intensity correction model.

[0108] The ambient light intensity correction model is a model that was pre-established under experimental conditions.

[0109] In step S311, the construction of the light-free environment can be passive or active. Passive methods include collecting spectral data in a dark room or under a light shield, while active methods include using the light shielding device built into the spectrometer to eliminate the influence of ambient light, ensuring that the collected first near-infrared spectral data is not interfered with by ambient light, and truly reflecting the spectral characteristics of the standard reflector under light-free conditions, serving as a benchmark for subsequent quantification and elimination of ambient light interference.

[0110] In step S312, different ambient light intensities can be achieved by adjusting the natural light intensity of the experimental site or by using an artificial light source and adjusting its intensity. For example, an adjustable illuminator can be used to gradually adjust the illuminator's intensity in a dark or semi-dark room environment, and at each set illuminance, the second near-infrared spectral data of the standard reflector can be collected.

[0111] In step S313, by subtracting the first near-infrared spectral data collected in step S311 from the second near-infrared spectral data collected in step S312, the influence of the standard reflector's own spectral characteristics can be effectively eliminated, and the net spectral data caused purely by ambient light under different ambient light intensities can be obtained. This net spectral data is the ambient light interference spectral data.

[0112] In step S314, specifically, ambient light intensity is used as the independent variable, which can be measured by instruments such as a lux meter. Net spectral data is used as the dependent variable, which is the reflectance value at each wavelength calculated in step S313. Through multiple linear regression analysis, the regression coefficient matrix and intercept vector can be obtained. These parameters determine the specific form of the ambient light intensity correction model. After the model is constructed, it can be used for subsequent calculation and elimination of ambient light interference spectra. Thus, through the above steps, an ambient light intensity correction model is constructed to accurately quantify and eliminate ambient light interference spectra.

[0113] Furthermore, step S32 includes:

[0114] S321: Based on the ambient light intensity correction model, establish the functional relationship between ambient light intensity and ambient light interference spectrum;

[0115] S322: Real-time acquisition of ambient light intensity data for the soil area to be tested;

[0116] S323: Substitute the acquired ambient light intensity data into the functional relationship between ambient light intensity and ambient light interference spectrum to calculate the ambient light interference spectrum.

[0117] In step S3211, after the ambient light intensity correction model is constructed, the multiple linear regression coefficient matrix and intercept vector contained in the model are extracted. These parameters are the core components of the model. The multiple linear regression coefficient matrix reflects the degree of influence of ambient light intensity on spectral data at different wavelengths, while the intercept vector represents the spectral baseline at zero ambient light intensity.

[0118] In step S3212, the ambient light interference spectrum is converted into an ambient light intensity spectrum using the multiple linear regression coefficient matrix and intercept vector extracted in step S3211. Specifically, multiplying the ambient light intensity data with the multiple linear regression coefficient matrix quantifies the wavelength dependence of the ambient light intensity on the spectral data. Adding the intercept vector takes into account the influence of the spectral baseline, thus enabling accurate calculation of the ambient light interference spectrum.

[0119] Furthermore, step S321 includes:

[0120] S3211: Extract the multivariate linear regression coefficient matrix and intercept vector based on the ambient light intensity correction model;

[0121] S3212: Construct the functional relationship between ambient light intensity and ambient light interference spectrum: Ambient light interference spectrum = Ambient light intensity data × Multiple linear regression coefficient matrix + Intercept vector.

[0122] Specifically, addressing the issue of unclear construction process for the functional relationship between ambient light intensity and ambient light interference spectrum, this solution provides a clear construction method by reusing the existing multiple linear regression coefficient matrix and intercept vector in the ambient light intensity correction model. The ambient light intensity correction model already contains quantitative information about the relationship between ambient light intensity and spectral data. By extracting the multiple linear regression coefficient matrix and intercept vector from the model, the functional relationship between ambient light intensity and ambient light interference spectrum can be directly constructed, avoiding uncertainties in the functional relationship construction process and ensuring the accuracy and reliability of ambient light interference spectrum calculation. The linear function form simplifies the calculation process, facilitating the rapid acquisition of ambient light interference spectrum and meeting the needs of rapid detection.

[0123] Furthermore, step S4 includes:

[0124] S41: Construct a database of herbicide spectral characteristics, which contains standard near-infrared spectral data of various common herbicides and their corresponding characteristic wavelengths and absorption intensity information;

[0125] S42: Preprocess the corrected spectral data of the soil area to be tested, including smoothing filtering and noise reduction, to obtain a clear spectral curve;

[0126] S43: Based on the herbicide spectral characteristic database, identify the characteristic wavelengths in the corrected spectral curves and calculate their corresponding absorption intensities;

[0127] S44: Based on the identified characteristic wavelengths and absorption intensities, and combined with the preset herbicide concentration calculation model, the types and concentrations of effective herbicide components in the soil area to be tested are calculated.

[0128] In step S41, the construction of the herbicide spectral characteristic database can be implemented as follows: First, standard samples of various common herbicides are collected. Each herbicide sample is then scanned multiple times using a high-precision near-infrared spectrometer to obtain its respective standard near-infrared spectral data. Next, the standard spectral data of each herbicide is analyzed to determine its characteristic wavelengths, i.e., the wavelength positions corresponding to absorption peaks or troughs on the spectral curve, and the absorption intensity information at these characteristic wavelengths is recorded. Finally, the herbicide name, standard near-infrared spectral data, characteristic wavelengths, and absorption intensities are stored in the database, which can be constructed using either a relational or non-relational database.

[0129] In step S42, various methods can be used for spectral data preprocessing. For example, smoothing filtering can be used, such as moving average filtering or Savitzky-Golay filtering, to eliminate high-frequency noise in the spectral data. Denoising processing can be used, such as wavelet thresholding or empirical mode decomposition, to remove baseline drift and scattering noise in the spectral data, resulting in a smooth spectral curve with a high signal-to-noise ratio.

[0130] In step S43, the characteristic wavelength identification can employ a peak detection algorithm. For example, a peak search window and threshold can be set, and the window can be slid across the spectral curve to detect local maxima. If a maxima exceeds the set threshold, it is identified as a characteristic wavelength. The absorption intensity can be calculated by directly reading the spectral reflectance or absorbance value at the characteristic wavelength as the absorption intensity.

[0131] In step S44, the preset herbicide concentration calculation model can be a pre-established multiple linear regression model. The input parameters of the model are the absorption intensity at the identified characteristic wavelengths, and the output is the herbicide concentration value. The model can be established by collecting spectral data of herbicide standard solutions or soil samples with known concentration gradients and training the model using chemometric methods.

[0132] Specifically, the preset herbicide concentration calculation model is as follows: , Indicates the concentration value of the herbicide; , , ... These are the regression coefficients of the model, obtained by training with spectral data of herbicide standard solutions or soil samples with known concentration gradients; This is the error term, representing the difference between the model's predicted value and the actual value; , ... The absorption intensity corresponds to the characteristic wavelength.

[0133] Please refer to Figure 2 A rapid near-infrared spectroscopy detection system for the active ingredient of herbicides, characterized in that, in the steps of any of the above methods, the system comprises:

[0134] Acquisition module 201: Acquires near-infrared spectral data of the soil area to be tested, as well as moisture content and compaction values ​​that characterize soil texture differences;

[0135] Calculation module 202: Selects the corresponding preset scattering correction parameters according to the preset moisture content range to which the moisture content value belongs, and calculates the actual scattering correction parameters according to the compactness value;

[0136] Spectral correction module 203: Performs spectral correction on near-infrared spectral data according to preset scattering correction parameters and actual scattering correction parameters to obtain corrected spectral data;

[0137] Analysis module 204: Based on the corrected spectral data, analyze the effective components of the herbicide in the soil area to be tested.

[0138] The acquisition module 201 is configured to collect raw data from the soil area to be tested, which provides a data basis for subsequent analysis steps.

[0139] The calculation module 202 is used to perform the calculation of scattering correction parameters. This calculation takes into account the differences in soil texture to ensure the accuracy of the correction process.

[0140] The spectral correction module 203, as the core processing unit, uses the parameters obtained by the calculation module 202 to correct the spectral data, with the aim of eliminating various interference factors and thus improving the quality of the spectral data.

[0141] Analysis module 204, based on calibrated spectral data and combined with a pre-established database and model, ultimately achieves the identification and quantitative analysis of the active ingredients in herbicides. The various modules work collaboratively to automate the process from data acquisition to component analysis.

[0142] In practical applications, the acquisition module 201 can consist of hardware devices such as a near-infrared spectrometer, a soil moisture sensor, and a soil compaction meter. These devices are integrated to achieve synchronous acquisition of soil information for the area to be tested. The calculation module 202 and the spectral correction module 203 can consist of a processor, a memory, and executable instructions stored in the memory. The processor runs the executable instructions to perform parameter calculations and spectral correction. The analysis module 204 can contain a pre-trained machine learning model for identifying spectral features and predicting herbicide concentrations.

[0143] Specifically, the operating principle of this system is as follows:

[0144] First, the acquisition module 201 collects near-infrared spectral data, moisture content, and compaction values ​​of the soil area to be tested. The collected moisture content values ​​are transmitted to the calculation module 202, which determines the preset moisture content range to which the values ​​belong and selects the corresponding preset scattering correction parameters accordingly. Simultaneously, the calculation module 202 receives the compaction values ​​from the acquisition module and calculates the actual scattering correction parameters based on these values. The spectral correction module 203 receives the preset and actual scattering correction parameters from the calculation module 202 and uses these parameters to correct the near-infrared spectral data collected by the acquisition module 201, obtaining corrected spectral data. Finally, the analysis module 204 receives the corrected spectral data and analyzes it to determine the type and concentration of the herbicide active ingredient in the soil area to be tested. Thus, the system completes the rapid detection of the herbicide active ingredient.

[0145] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.

[0146] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A rapid near-infrared spectroscopy method for detecting the active ingredient of a herbicide, used for rapidly detecting the concentration of the active ingredient of a herbicide under complex soil texture conditions in the field, characterized in that, The method includes the following steps: S1: Obtain near-infrared spectral data of the soil area to be tested, as well as moisture content and compaction values ​​to characterize the differences in soil texture; S2: Select the corresponding preset scattering correction parameter according to the preset moisture content range to which the moisture content value belongs, and calculate the actual scattering correction parameter according to the compactness value. Step S2 includes: S21: Construct a piecewise function for water content, divide the water content into low water content range, medium water content range and high water content range, and preset different scattering correction parameters for different water content ranges; S23: Determine the moisture content range to which the moisture content value of the soil area to be tested belongs, and select the corresponding preset scattering correction intensity parameter; S24: Construct a nonlinear compactness function, which is an exponential function, to characterize the nonlinear relationship between compactness and scattering correction parameters; S25: Substitute the compaction value of the soil to be tested into the compaction nonlinear function to calculate the actual scattering correction parameter; Step S24 includes: S241: Obtain the soil compaction and corresponding scattering correction parameters from historical data, and construct an initial database; S242: The least squares method was used to fit the soil compaction and scattering correction parameters in the initial database to obtain multiple exponential functions; S243: Select the exponential function with the smallest root mean square error in the initial database as the compactness nonlinear function; S3: Perform spectral correction on the near-infrared spectral data according to the preset scattering correction parameters and the actual scattering correction parameters to obtain the corrected spectral data; S4: Based on the corrected spectral data, the effective components of the herbicide in the soil area to be tested are analyzed.

2. The method for rapid near-infrared spectroscopy detection of active ingredients in herbicides according to claim 1, characterized in that, Step S1 includes: S11: Use a near-infrared spectrometer to scan the soil area to be tested, obtain raw spectral data in the wavelength range of 400nm-2500nm, record the reflectance values ​​at each wavelength, and obtain near-infrared spectral data; S12: The moisture content of the soil area to be tested is measured using a soil moisture sensor; S13: Use a soil compaction meter to measure the soil penetration resistance in the soil area to be tested, and obtain the compaction value.

3. The method for rapid near-infrared spectroscopy detection of active ingredients in herbicides according to claim 1, characterized in that, Step S3 includes: S31: Construct an ambient light intensity correction model; S32: Obtain ambient light intensity data of the soil area to be tested, and calculate ambient light interference spectral data based on the ambient light intensity data and the ambient light intensity correction model; S33: Remove ambient light interference spectral data from the near-infrared spectral data to obtain near-infrared spectral data without ambient light interference; S34: Based on the preset scattering correction parameters and the actual scattering correction parameters, perform spectral correction on the near-infrared spectral data to eliminate ambient light interference, and obtain the corrected spectral data.

4. The rapid near-infrared spectroscopy detection method for the active ingredient of herbicides according to claim 3, characterized in that, Step S31 includes: S311: Under experimental conditions, collect the first near-infrared spectral data of a standard reflector in a dark environment; S312: Collect second near-infrared spectral data of a standard reflector under different ambient light intensities; S313: Subtract the first near-infrared spectral data from the second near-infrared spectral data under different ambient light intensities to obtain the net spectral data under each ambient light intensity. S314: Using ambient light intensity as the independent variable and the corresponding net spectral data as the dependent variable, a multiple linear regression method is used to construct an ambient light intensity correction model.

5. The method for rapid near-infrared spectroscopy detection of active ingredients in herbicides according to claim 4, characterized in that, Step S32 includes: S321: Based on the ambient light intensity correction model, establish the functional relationship between ambient light intensity and ambient light interference spectrum; S322: Real-time acquisition of ambient light intensity data for the soil area to be tested; S323: Substitute the acquired ambient light intensity data into the functional relationship between ambient light intensity and ambient light interference spectrum to calculate the ambient light interference spectrum.

6. The method for rapid near-infrared spectroscopy detection of active ingredients in herbicides according to claim 5, characterized in that, Step S321 includes: S3211: Based on the ambient light intensity correction model, extract the multivariate linear regression coefficient matrix and intercept vector; S3212: Construct the functional relationship between ambient light intensity and ambient light interference spectrum: Ambient light interference spectrum = Ambient light intensity data × Multiple linear regression coefficient matrix + Intercept vector.

7. The method for rapid near-infrared spectroscopy detection of active ingredients in herbicides according to claim 1, characterized in that, Step S4 includes: S41: Construct a database of herbicide spectral characteristics, which contains standard near-infrared spectral data of various common herbicides and their corresponding characteristic wavelengths and absorption intensity information; S42: Preprocess the corrected spectral data of the soil area to be tested, including smoothing filtering and noise reduction, to obtain a clear spectral curve; S43: Based on the herbicide spectral characteristic database, identify the characteristic wavelengths in the corrected spectral curves and calculate their corresponding absorption intensities; S44: Based on the identified characteristic wavelengths and absorption intensities, and combined with the preset herbicide concentration calculation model, the types and concentrations of effective herbicide components in the soil area to be tested are calculated.

8. A rapid near-infrared spectroscopy detection system for the active ingredient in herbicides, characterized in that, The system, applied in the steps of the method according to any one of claims 1-7, comprises: Acquisition module: Acquires near-infrared spectral data of the soil area to be tested, as well as moisture content and compaction values ​​that characterize soil texture differences; Calculation module: Based on the preset moisture content range to which the moisture content value belongs, select the corresponding preset scattering correction parameter, and calculate the actual scattering correction parameter based on the compactness value; The calculation module is also used to: construct a piecewise function for moisture content, dividing the moisture content into low moisture content intervals, medium moisture content intervals, and high moisture content intervals, and preset different scattering correction parameters for different moisture content intervals; determine the moisture content interval to which the moisture content value of the soil area to be tested belongs, and select the corresponding preset scattering correction intensity parameter; construct a nonlinear compaction function, which is an exponential function used to characterize the nonlinear relationship between compaction and scattering correction parameters; and substitute the compaction value of the soil to be tested into the nonlinear compaction function to calculate the actual scattering correction parameter. The calculation module is also used to obtain the soil compaction and corresponding scattering correction parameters from historical data and construct an initial database; the least squares method is used to fit the soil compaction and scattering correction parameters in the initial database to obtain multiple exponential functions; the exponential function with the smallest root mean square error in the initial database is selected as the nonlinear function of compaction. Spectral correction module: Based on the preset scattering correction parameters and the actual scattering correction parameters, performs spectral correction on the near-infrared spectral data to obtain the corrected spectral data; Analysis module: Based on the corrected spectral data, the effective components of herbicides in the soil area to be tested are analyzed.

Citation Information

Patent Citations

  • Method for quickly detecting stable carbon isotope ratio of soil with near-infrared spectra

    CN105699322A

  • Soil compactness and moisture composite measuring method and device

    CN106053330A