Near infrared spectrum rapid detection method and system for effective components of herbicide
By obtaining near-infrared spectral data and soil texture parameters in field soil, building segmented functions and nonlinear functions, combined with the light intensity correction model, the impact of soil texture differences on herbicide detection is solved, and fast and accurate herbicide composition detection is achieved, supporting precise drug application.
Patent Information
- Application Number
- CN202510751649.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-06-06
AI Technical Summary
The prior art lacks a method for quickly and accurately detecting the herbicide components and their concentrations in soils in different areas of the field, especially under complex soil texture conditions, which makes it difficult for traditional uniform drug application strategies to achieve precise application, and it is prone to insufficient or excessive drug efficacy.
By obtaining the near-infrared spectral data, moisture content value and compaction value of the soil area to be tested, a moisture content segmentation function and compaction nonlinear function are constructed, combined with the ambient light intensity correction model, scattering correction parameters are selected and calculated, spectral correction is performed, and the interference of soil texture differences on the spectrum is eliminated, so as to achieve rapid and accurate detection of herbicide components.
Under complex soil conditions, rapid and accurate detection of the active ingredients of herbicides is achieved, the interference of soil texture differences on spectral detection is overcome, detection accuracy and reliability are improved, and technical support is provided for precise drug application.
Smart Images

Figure CN120446046A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of agricultural detection technology, and in particular to a method and system for rapid near-infrared spectroscopy detection of active ingredients of herbicides. Background Art
[0002] Modern agriculture places higher demands on the precise application of herbicides, hoping to minimize pesticide residues and reduce environmental pollution while ensuring healthy crop growth. However, the complexity of field soil environments, especially the diversity of soil textures, poses a huge challenge to precision application. Even within the same field, there are often multiple texture types such as sand, loam, and clay. These texture differences can significantly affect the physical and chemical properties of the soil, leading to differences in the adsorption, migration, and degradation behavior of herbicides in the soil. For example, sandy soil has a weak water and fertilizer retention capacity, making herbicides prone to leaching; clay, on the other hand, has strong adsorption, which may reduce the bioavailability of herbicides. This uneven herbicide efficacy and residue levels caused by differences in soil texture makes traditional uniform application strategies difficult to implement effectively, and is prone to localized insufficient or excessive efficacy.
[0003] However, current technology lacks a method that can quickly and accurately determine the composition and actual concentration of herbicides in soil across different areas of a field. Therefore, to achieve precise pesticide application, a method that can overcome the influence of soil texture differences and quickly and accurately measure the concentration of herbicide active ingredients is urgently needed.
[0004] In view of the above problems, the existing technology is in urgent need of improvement. Summary of the Invention
[0005] In view of the above-mentioned deficiencies in the prior art, the present application provides a method and system for rapid detection of herbicide active ingredients by near-infrared spectroscopy, which has the beneficial effect of overcoming the influence of soil texture differences and achieving rapid and accurate detection of the concentration of herbicide active ingredients.
[0006] In a first aspect, a method for rapid detection of herbicide active ingredients using near-infrared spectroscopy is provided for rapidly detecting the concentration of herbicide active ingredients under complex soil texture conditions in the field. The method comprises the following steps: S1: Obtain near-infrared spectral data of the soil area to be tested, as well as moisture content and compaction values that characterize soil texture differences; S2: selecting a corresponding preset scattering correction parameter according to the preset moisture content range to which the moisture content value belongs, and calculating an actual scattering correction parameter according to the compactness value; S3: performing spectral correction on the near-infrared spectral data according to the preset scattering correction parameter and the actual scattering correction parameter to obtain corrected spectral data; S4: Analyze and obtain the active ingredients of the herbicide in the soil area to be tested based on the corrected spectral data.
[0007] This application proposes a method for rapid near-infrared spectroscopy detection of herbicide active ingredients, designed to address the impact of complex field soil texture on herbicide detection accuracy. By acquiring near-infrared spectral data from the soil region under test, along with moisture content and compaction values that reflect soil texture differences, the method quantifies the impact of soil texture on the spectral data. Based on the preset interval within which the moisture content value falls, a corresponding scattering correction parameter is selected. Furthermore, the effect of compaction is further considered, and the actual scattering correction parameter is calculated based on the compaction value. This allows for fine-tuning of the scattering correction parameter, more accurately reflecting the scattering under actual soil texture conditions. Spectral correction aims to eliminate or mitigate 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. Analysis of the corrected spectra can more accurately reflect the true presence of herbicides in the soil. Therefore, by comprehensively considering two key texture parameters, soil moisture content and compaction, and designing corresponding scattering correction steps, this method effectively overcomes the interference of complex field soil texture on near-infrared spectroscopy herbicide detection, enabling rapid and accurate detection of herbicide active ingredients under complex soil conditions.
[0008] Furthermore, step S1 includes: S11: Scan the soil area to be tested using a near-infrared spectrometer to obtain original spectral data in the wavelength range of 400nm-2500nm, record the reflectance value of each wavelength, and obtain near-infrared spectral data; S12: using a soil moisture sensor to measure the moisture content of the soil area to be tested; S13: Use a soil compaction meter to measure the soil penetration resistance of the soil area to be tested to obtain a compaction value.
[0009] The present application proposes a method for rapid near-infrared spectroscopy detection of herbicide active ingredients. By making the data acquisition process more specific and operational, it ensures that near-infrared spectral data, moisture content values, and compaction values can be acquired effectively and in a standard manner, laying a data foundation for subsequent spectral calibration and herbicide active ingredient analysis.
[0010] Furthermore, step S2 includes: S21: constructing a piecewise moisture content function to divide the moisture content into a low moisture content interval, a medium moisture content interval, and a high moisture content interval, and presetting different scattering correction parameters for different moisture content intervals; S23: Determine the moisture content range to which the moisture content value of the soil area to be measured belongs, and select a corresponding preset scattering correction intensity parameter; S24: constructing a compactness nonlinear function, which is an exponential function and is used to characterize the nonlinear relationship between compactness and scattering correction parameters; S25: Substituting the compactness value of the soil to be tested into the compactness nonlinear function to calculate the actual scattering correction parameter.
[0011] The present application proposes a method for rapid detection of herbicide active ingredients using near-infrared spectroscopy. 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, effectively solving the problem of the vague parameter determination method in step S2, improving the accuracy of spectral correction, and laying the foundation for subsequent accurate detection of herbicide active ingredients.
[0012] Furthermore, step S24 includes: S241: Obtain soil compaction and corresponding scattering correction parameters from historical data, and construct an initial database; S242: fitting the soil compaction and scattering correction parameters in the initial database using the least squares method to obtain multiple exponential functions; S243: Selecting an exponential function with the smallest root mean square error in the initial database as the compactness nonlinear function.
[0013] The present application proposes a method for rapid detection of herbicide active ingredients by near-infrared spectroscopy. The method constructs an initial database to provide a data basis for subsequent function fitting, and uses the least squares method to fit the soil compaction and scattering correction parameters in the initial database to obtain multiple exponential functions, which provides the possibility for subsequent selection of the optimal function. The exponential function with the smallest root mean square error is selected to ensure that the compaction nonlinear function can best fit the historical data, thereby more accurately characterizing the nonlinear relationship between compaction and scattering correction parameters, improving the accuracy and reliability of scattering correction, and thereby improving the accuracy of herbicide active ingredient detection.
[0014] Furthermore, step S3 includes: S31: Constructing an ambient light intensity correction model; S32: Acquire ambient light intensity data of the soil area to be tested, and calculate ambient light interference spectrum data based on the ambient light intensity data and the ambient light intensity correction model; S33: removing ambient light interference spectrum data from the near-infrared spectrum data to obtain near-infrared spectrum data with ambient light interference eliminated; S34: performing spectral correction on the near-infrared spectral data from which ambient light interference is eliminated according to the preset scattering correction parameter and the actual scattering correction parameter to obtain corrected spectral data.
[0015] Furthermore, step S31 includes: S311: Under experimental conditions, collecting first near-infrared spectrum data of a standard reflector in a dark environment; S312: Collecting second near-infrared spectrum data of the standard reflector under different ambient light intensities; S313: Subtracting the first near-infrared spectrum data from the second near-infrared spectrum data under different ambient light intensities to obtain net spectrum data under each ambient light intensity; S314: Taking the 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.
[0016] Furthermore, step S32 includes: S321: Establishing a functional relationship between ambient light intensity and ambient light interference spectrum based on an ambient light intensity correction model; S322: Acquire ambient light intensity data of the soil area to be tested in real time; S323: Substituting the acquired ambient light intensity data into the functional relationship between the ambient light intensity and the ambient light interference spectrum to calculate the ambient light interference spectrum.
[0017] Furthermore, step S321 includes: S3211: Extracting a multivariate linear regression coefficient matrix and an intercept vector according to the ambient light intensity correction model; S3212: Construct a functional relationship between ambient light intensity and ambient light interference spectrum: ambient light interference spectrum = ambient light intensity data × multivariate linear regression coefficient matrix + intercept vector.
[0018] Furthermore, step S4 includes: S41: Construct a herbicide spectral feature database, which contains standard near-infrared spectral data of various common herbicides and their corresponding characteristic wavelengths and absorption intensity information; S42: preprocessing the corrected spectral data of the soil area to be tested, including smoothing filtering and denoising, to obtain a clear spectral curve; S43: identifying characteristic wavelengths in the corrected spectral curve according to the herbicide spectral characteristic database, and calculating corresponding absorption intensities; S44: Based on the identified characteristic wavelength and absorption intensity, combined with a preset herbicide concentration calculation model, the type and concentration of the herbicide active ingredient in the soil area to be tested are calculated.
[0019] In a second aspect, a near-infrared spectroscopy rapid detection system for herbicide active ingredients is provided, characterized in that it is applied to the steps of any of the above methods, and the system 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: selects a corresponding preset scattering correction parameter according to the preset moisture content interval to which the moisture content value belongs, and calculates the actual scattering correction parameter according to the compactness value; Spectral correction module: performs spectral correction on the near-infrared spectral data according to the preset scattering correction parameters and the actual scattering correction parameters to obtain corrected spectral data; Analysis module: Based on the corrected spectral data, the active ingredients of the herbicide in the soil area to be tested are analyzed.
[0020] Beneficial effects: The present application proposes a method and system for rapid detection of herbicide active ingredients by near-infrared spectroscopy, which aims to address the impact of complex soil texture in the field on the accuracy of herbicide detection. By acquiring near-infrared spectral data of the soil area to be tested and the moisture content and compaction values that reflect the differences in soil texture, the influence of soil texture on the spectral data is quantified. Based on the preset interval to which the moisture content value belongs, the corresponding preset scattering correction parameter is selected, and then, the influence of compaction is further considered, and the actual scattering correction parameter is obtained by calculating the compaction value, thereby achieving fine adjustment of the scattering correction parameter and more accurately reflecting the scattering situation under actual soil texture conditions. Spectral correction aims to eliminate or weaken the spectral distortion caused by differences in soil texture, improve the quality and reliability of spectral data, and lay the foundation for subsequent accurate analysis of herbicide components; analysis of the corrected spectrum can more accurately reflect the actual situation of herbicides in the soil. Therefore, this application effectively overcomes the interference of complex soil texture in the field on near-infrared spectroscopy herbicide detection by comprehensively considering the two key texture parameters of soil moisture content and compactness, and designs corresponding scattering correction steps, thereby achieving the beneficial effect of rapid and accurate detection of herbicide active ingredients under complex soil conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 This is a flow chart of a method for rapid detection of herbicide active ingredients by near-infrared spectroscopy proposed in this application.
[0022] Figure 2 This is a structural diagram of a near-infrared spectroscopy rapid detection system for herbicide active ingredients proposed in this application.
[0023] Description of the markings: 201, acquisition module; 202, calculation module; 203, spectrum correction module; 204, analysis module. DETAILED DESCRIPTION
[0024] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and marked in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work fall within the scope of protection of the present application.
[0025] It should be noted that similar reference numerals and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined or explained in subsequent figures. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and should not be understood as indicating or implying relative importance.
[0026] Please refer to Figure 1 A method for rapid detection of herbicide active ingredients by near-infrared spectroscopy is provided for rapidly detecting the concentration of herbicide active ingredients under complex soil texture conditions in the field. The method comprises the following steps: S1: Obtain near-infrared spectral data of the soil area to be tested, as well as moisture content and compaction values that characterize soil texture differences; S2: Selecting a corresponding preset scattering correction parameter according to the preset moisture content range to which the moisture content value belongs, and calculating the actual scattering correction parameter according to the compactness value; S3: performing spectral correction on the near-infrared spectral data according to the preset scattering correction parameters and the actual scattering correction parameters to obtain corrected spectral data; S4: Analyze and obtain the active ingredients of the herbicide in the soil area to be tested based on the corrected spectral data.
[0027] Step S1 involves acquiring spectral data and soil texture parameters. Specifically, a near-infrared spectrometer can be used to scan the soil area 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. The simultaneous acquisition of spectral data and soil texture parameters provides a data foundation for subsequent spectral calibration.
[0028] Step S2 is the process of determining the scattering correction parameter. Specifically, a pre-set scattering correction parameter is initially selected based on the preset moisture content range to which the moisture content value belongs. Then, considering the impact of soil compaction on scattering, the pre-set scattering correction parameter is adjusted using the soil compaction value to calculate the actual scattering correction parameter. This method comprehensively considers the effects of moisture content and compaction, more accurately reflecting soil texture differences and providing more refined parameters for subsequent spectral correction.
[0029] Step S3 is the spectral correction step. Specifically, the near-infrared spectral data acquired in step S1 is corrected using the preset and actual scattering correction parameters obtained in step S2. Spectral correction aims to eliminate or mitigate spectral scattering deviations caused by soil texture differences, improving the quality and accuracy of the spectral data and laying the foundation for subsequent analysis of the herbicide's active ingredients.
[0030] Step S4 is the herbicide active ingredient analysis step. Specifically, based on the spectral correction performed in step S3, the corrected spectral data is analyzed to determine the type and concentration of the herbicide active ingredient in the soil being tested. The spectral analysis method can employ spectral feature matching. By analyzing the corrected spectral data, the herbicide active ingredient can be quickly and accurately detected, enabling precise herbicide application.
[0031] Specifically, this application provides a method for rapid near-infrared spectroscopy detection of herbicide active ingredients, which aims to address the problem of the impact of complex and diverse field soil textures on herbicide detection accuracy. The principle of this method is: First, step S1 is used to synchronously obtain the near-infrared spectral data of the soil area to be tested and the moisture content and compactness values that characterize the differences in soil texture, taking the soil texture factor into full consideration. Then, in step S2, the preset scattering correction parameters are selected according to the moisture content value, and the actual scattering correction parameters are calculated in combination with the compactness value, thereby realizing the dynamic adjustment of the scattering correction parameters and more finely reflecting the influence of soil texture on the spectrum. Step S3 uses the scattering correction parameters to correct the near-infrared spectral data, eliminates or weakens the spectral deviation caused by the differences in soil texture, and obtains more accurate spectral data. Finally, step S4 analyzes the spectral data after correction to obtain the type and concentration of the herbicide active ingredient in the soil area to be tested, thereby ensuring the reliability of the test results. The scattering correction mechanism based on soil moisture content and compactness introduced by steps S2 and S3 effectively overcomes the interference of soil texture differences on the near-infrared spectral detection of the concentration of the herbicide active ingredient, thereby realizing rapid and accurate detection under complex field soil conditions.
[0032] Through the above technical solution, this application can quickly and accurately detect the concentration of herbicide active ingredients under complex soil texture conditions in the field. This method considers the impact of soil texture differences on spectral detection and corrects spectral data using moisture content and compaction parameters, improving spectral data quality and ensuring the accuracy of herbicide active ingredient detection, providing technical support for the precise application of herbicides.
[0033] Furthermore, step S1 includes: S11: Scan the soil area to be tested using a near-infrared spectrometer to obtain original spectral data in the wavelength range of 400nm-2500nm, record the reflectance value of each wavelength, and obtain near-infrared spectral data; S12: using a soil moisture sensor to measure the moisture content of the soil area to be tested; S13: Use a soil compaction meter to measure the soil penetration resistance of the soil area to be tested to obtain a compaction value.
[0034] In step S11, a near-infrared spectrometer is used to scan the soil area to obtain raw spectral data. The scanning wavelength range is set to 400nm-2500nm, 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.
[0035] In step S12, a soil moisture sensor is used to directly measure the moisture content of the soil area to be measured. The soil moisture sensor can be a capacitive sensor, a time domain reflectometry sensor, or a frequency domain reflectometry sensor, which can quickly and accurately measure the moisture content in the soil.
[0036] In step S13, different types of soil can be uniformly measured using compaction. Therefore, this application uses a soil compaction meter to measure soil penetration resistance to characterize the compaction degree of the soil. The soil compaction meter can be a mechanical compaction meter or an electronic compaction meter, and the measurement unit can be kilopascals or megapascals. Through steps S11, S12, and S13, the near-infrared spectral data, moisture content value, and compaction value of the soil area to be measured can be effectively obtained, providing a data basis for subsequent steps and ensuring the accuracy and standardization of the data acquisition process.
[0037] Furthermore, step S2 includes: S21: constructing a piecewise moisture content function to divide the moisture content into a low moisture content interval, a medium moisture content interval, and a high moisture content interval, and presetting different scattering correction parameters for different moisture content intervals; S22: Determine the moisture content range to which the moisture content value of the soil area to be measured belongs, and select a corresponding preset scattering correction intensity parameter; S23: constructing a compactness nonlinear function, which is an exponential function and is used to characterize the nonlinear relationship between compactness and scattering correction parameters; S24: Substitute the compactness value of the soil to be tested into the compactness nonlinear function to calculate the actual scattering correction parameter.
[0038] Among them, in step S21, constructing a piecewise moisture content function means pre-setting several moisture content intervals according to the degree of influence of soil moisture content on scattering, and discretizing the continuously changing moisture content into a finite range of intervals. For example, it can be divided into a low moisture content interval with a moisture content 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 greater than 20%; for each moisture content interval, a corresponding scattering correction parameter is preset, and the scattering correction parameter can be a coefficient value used for the spectral correction model.
[0039] Among them, in step S22, determining the moisture content interval to which the moisture content value of the soil area to be tested belongs refers to comparing the moisture content value of the soil to be tested measured by the humidity sensor with the moisture content interval divided in step S21 to determine the specific interval into which the moisture content value falls. For example, if the moisture content of a certain soil area to be tested is measured to be 15%, it is determined that it belongs to the medium moisture content interval; selecting the corresponding preset scattering correction intensity parameter refers to selecting the scattering correction parameter corresponding to the interval preset in step S21 according to the moisture content interval determined in step S23. For example, if it is determined to be a medium moisture content interval, the preset scattering correction parameter corresponding to the medium moisture content interval is selected.
[0040] Among them, in step S23, considering that the influence of soil compaction on scattering is not a simple linear relationship, but has nonlinear characteristics, the exponential function can better fit this nonlinear relationship. For example, the exponential function can be set to the form of 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 selected 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.
[0041] Among them, 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, which 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 according to the soil compaction on the basis of the preset parameters of the moisture content range, and can more accurately reflect the influence of soil texture on scattering.
[0042] Therefore, by combining the moisture content piecewise function and the compactness nonlinear function, the scattering correction parameters can be calculated more precisely, and the scattering correction parameters suitable for complex soil textures can be obtained more accurately. This method of combining the consideration of the moisture content range and the nonlinear influence of compactness 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.
[0043] Furthermore, step S24 includes: S241: Obtain soil compaction and corresponding scattering correction parameters from historical data, and construct an initial database; S242: fitting the soil compaction and scattering correction parameters in the initial database using the least squares method to obtain multiple exponential functions; S243: Selecting an exponential function with the smallest root mean square error in the initial database as the compactness nonlinear function.
[0044] Specifically, step S241 may include 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 soil compaction values and corresponding scattering correction parameter values for 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, a relational database, or a data file.
[0045] Specifically, step S242 may include selecting an appropriate exponential function, such as a single exponential function, a double exponential function, or a more complex exponential function. Then, using the least squares method, the selected exponential function is fitted using the compactness data in the initial database as the independent variable and the scatter correction parameter data as the dependent variable to obtain the function's parameter values. The fitting process aims to minimize the sum of squared residuals between the exponential function's predicted values and the actual scatter correction parameter values, thereby obtaining an exponential function that best matches the historical data. By adjusting the exponential function's parameters, multiple different exponential functions can be obtained.
[0046] Specifically, step S243 may include calculating the root mean square error (RMS) of each exponential function obtained in step S242 on the initial database. The RMS error can quantify the degree of deviation between the predicted value of the exponential function and the actual scatter correction parameter value. The calculation method may be to first calculate the residual of each data point, i.e., the difference between the actual value and the predicted value, then average the squared residuals, and finally take the square root. The smaller the RMS error, the better the fit of the exponential function to the historical data. By comparing the RMS errors of multiple exponential functions, the exponential function with the smallest RMS error is selected as the final compactness nonlinear function.
[0047] Furthermore, step S3 includes: S31: Constructing an ambient light intensity correction model; S32: Acquire ambient light intensity data of the soil area to be tested, and calculate ambient light interference spectrum data based on the ambient light intensity data and an ambient light intensity correction model; S33: Eliminating ambient light interference spectrum data from the near-infrared spectrum data to obtain near-infrared spectrum data with ambient light interference eliminated; S34: performing spectral correction on the near-infrared spectral data from which ambient light interference is eliminated according to the preset scattering correction parameters and the actual scattering correction parameters to obtain corrected spectral data.
[0048] Specifically, during the spectral correction process, an ambient light intensity correction model is first constructed to quantify the relationship between ambient light intensity and the ambient light interference spectrum. Then, ambient light intensity data for the soil area to be tested is obtained and, combined with the ambient light intensity correction model, ambient light interference spectrum data is calculated, representing the specific amount of interference caused by ambient light on the spectral data. Subsequently, the ambient light interference spectrum data is removed from the original near-infrared spectral data to obtain near-infrared spectral data with ambient light interference eliminated, thereby improving the purity of the spectral data. Finally, based on the spectral data with ambient light interference eliminated, spectral correction is performed according to preset scattering correction parameters and actual scattering correction parameters to obtain the final corrected spectral data, ensuring the quality of the spectral data and providing data support for subsequent accurate analysis of the herbicide active ingredients. By adding the ambient light intensity correction model and the ambient light interference elimination steps, the impact of ambient light on the near-infrared spectral data is effectively reduced, allowing subsequent spectral correction and herbicide component analysis to be performed based on more accurate spectral data, thereby improving the reliability and accuracy of the herbicide detection method. The introduction of the ambient light interference correction model has improved the adaptability and effectiveness of herbicide detection methods in field applications, taking into account the complex and changeable lighting conditions in actual field environments.
[0049] Furthermore, step S31 includes: S311: Under experimental conditions, collecting first near-infrared spectrum data of a standard reflector in a dark environment; S312: Collecting second near-infrared spectrum data of the standard reflector under different ambient light intensities; S313: Subtracting the first near-infrared spectrum data from the second near-infrared spectrum data under different ambient light intensities to obtain net spectrum data under each ambient light intensity; S314: Taking the 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.
[0050] The ambient light intensity correction model is a model pre-established in an experimental environment.
[0051] In step S311, the dark environment can be established passively or actively. Passive methods include collecting spectral data in a darkroom or under a light shield, while active methods include using the spectrometer's built-in light shielding device to eliminate the influence of ambient light, ensuring that the collected first near-infrared spectral data is free from ambient light interference and truly reflects the spectral characteristics of the standard reflector under dark conditions, serving as a benchmark for subsequent quantification and elimination of ambient light interference.
[0052] In step S312, varying ambient light intensities can be achieved by adjusting the natural light intensity in the experimental location, or by using an artificial light source and adjusting the light intensity. For example, a lamp with adjustable illumination can be used in a dark or semi-dark environment, with the light intensity of the lamp gradually adjusted. At each set light intensity, the second near-infrared spectrum data of the standard reflector is collected.
[0053] 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 spectral characteristics of the standard reflector itself 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.
[0054] Specifically, in step S314, ambient light intensity serves as the independent variable, which can be measured using an instrument such as a illuminometer. Net spectral data serves as the dependent variable, representing the reflectance values at each wavelength calculated in step S313. Multiple linear regression analysis yields a regression coefficient matrix and intercept vector. These parameters determine the specific form of the ambient light intensity correction model. Once the model is constructed, it can be used to subsequently calculate and eliminate the ambient light interference spectrum. Thus, through the above steps, an ambient light intensity correction model is constructed, which can be used to accurately quantify and eliminate the ambient light interference spectrum.
[0055] Furthermore, step S32 includes: S321: Establishing a functional relationship between ambient light intensity and ambient light interference spectrum based on an ambient light intensity correction model; S322: Acquire ambient light intensity data of the soil area to be tested in real time; S323: Substituting the acquired ambient light intensity data into the functional relationship between the ambient light intensity and the ambient light interference spectrum to calculate the ambient light interference spectrum.
[0056] 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 to which ambient light intensity at different wavelengths affects the spectral data, while the intercept vector represents the spectral baseline at zero ambient light intensity.
[0057] In step S3212, the ambient light interference spectrum function uses the multivariate linear regression coefficient matrix and intercept vector extracted in step S3211 to convert the ambient light intensity data into an ambient light interference spectrum. Specifically, the ambient light intensity data is multiplied by the multivariate linear regression coefficient matrix to quantify the wavelength-dependent effect of ambient light intensity on the spectral data. The addition of the intercept vector accounts for the influence of the spectral baseline, thereby accurately calculating the ambient light interference spectrum.
[0058] Furthermore, step S321 includes: S3211: Extract the multivariate linear regression coefficient matrix and intercept vector based on the ambient light intensity correction model; S3212: Construct a functional relationship between ambient light intensity and ambient light interference spectrum: ambient light interference spectrum = ambient light intensity data × multivariate linear regression coefficient matrix + intercept vector.
[0059] Specifically, to address the unclear process of constructing the functional relationship between ambient light intensity and the 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 relationship information 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 the ambient light interference spectrum can be directly constructed, avoiding the uncertainty in the functional relationship construction process and ensuring the accuracy and reliability of the ambient light interference spectrum calculation. The linear function form simplifies the calculation process, facilitates the rapid acquisition of the ambient light interference spectrum, and meets the needs of rapid detection.
[0060] Furthermore, step S4 includes: S41: Construct a herbicide spectral feature database, which contains standard near-infrared spectral data of various common herbicides and their corresponding characteristic wavelengths and absorption intensity information; S42: preprocessing the corrected spectral data of the soil area to be tested, including smoothing filtering and denoising, to obtain a clear spectral curve; S43: identifying characteristic wavelengths in the corrected spectral curve according to the herbicide spectral characteristic database, and calculating corresponding absorption intensities; S44: Based on the identified characteristic wavelength and absorption intensity, combined with a preset herbicide concentration calculation model, the type and concentration of the herbicide active ingredient in the soil area to be tested are calculated.
[0061] In step S41, the herbicide spectral signature database can be constructed by first collecting standard samples of various common herbicides and scanning each sample multiple times using a high-precision near-infrared spectrometer to obtain the corresponding standard near-infrared spectral data. Next, the standard spectral data for each herbicide is analyzed to determine its characteristic wavelength (i.e., the wavelength corresponding to the absorption peak or valley on the spectral curve), and the absorption intensity information at these characteristic wavelengths is recorded. Finally, information such as the herbicide name, standard near-infrared spectral data, characteristic wavelength, and absorption intensity is stored in a database. The database can be constructed using either a relational or non-relational database.
[0062] In step S42, spectral data preprocessing can be performed using a variety of methods. Smoothing filtering, for example, moving average filtering or Savitzky-Golay filtering, can be used to eliminate high-frequency noise in the spectral data. Denoising processing, for example, wavelet threshold denoising or empirical mode decomposition can be used to remove baseline drift and scattering noise in the spectral data to obtain a smooth spectral curve with a high signal-to-noise ratio.
[0063] In step S43, 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 spectrum curve to detect local maxima. If the maxima exceed the set threshold, the characteristic wavelength is identified. Absorption intensity calculation can directly read the spectral reflectance or absorbance value at the characteristic wavelength as the absorption intensity.
[0064] In step S44, the preset herbicide concentration calculation model can be a pre-established multiple linear regression model, where the model input parameter is the absorption intensity at the identified characteristic wavelength, 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.
[0065] Specifically, the preset herbicide concentration calculation model is: , Indicates the concentration value of the herbicide; , , ... is the regression coefficient of the model, which is obtained by training the spectral data of herbicide standard solutions or soil samples with known concentration gradients; is the error term, which represents the difference between the model's predicted value and the actual value; , ... is the absorption intensity corresponding to the characteristic wavelength.
[0066] Please refer to Figure 2 A near-infrared spectroscopy rapid detection system for herbicide active ingredients, characterized in that, when applied to the steps of any of the above methods, the system comprises: Acquisition module 201: Acquisition of near infrared spectrum data of the soil area to be tested, as well as moisture content and compaction values representing differences in soil texture; Calculation module 202: Selects a corresponding preset scattering correction parameter according to the preset moisture content range to which the moisture content value belongs, and calculates the actual scattering correction parameter according to the compactness value; Spectral correction module 203: performs spectral correction on the near-infrared spectral data according to the preset scattering correction parameters and the actual scattering correction parameters to obtain corrected spectral data; Analysis module 204: Analyze and obtain the active ingredients of the herbicide in the soil area to be tested based on the corrected spectral data.
[0067] The acquisition module 201 is configured to collect raw data of the soil area to be tested, which provides a data basis for subsequent analysis steps.
[0068] The calculation module 202 is used to calculate the scatter correction parameters. This calculation takes into account the differences in soil texture to ensure the accuracy of the correction process.
[0069] The spectrum correction module 203 serves as a core processing unit and uses the parameters obtained by the calculation module 202 to correct the spectrum data in order to eliminate various interference factors and thus improve the quality of the spectrum data.
[0070] The analysis module 204 uses the calibrated spectral data, combined with pre-established databases and models, to identify and quantify the active ingredients in the herbicide. The modules work together to automate the entire process from data collection to component analysis.
[0071] In practical applications, the acquisition module 201 can be composed of hardware devices such as a near-infrared spectrometer, a soil moisture sensor, and a soil compaction meter. These devices are integrated to achieve simultaneous collection of soil information in the test area. The calculation module 202 and the spectral correction module 203 can be composed of a processor, a memory, and executable instructions stored in the memory. The processor executes the executable instructions to perform parameter calculation and spectral correction. The analysis module 204 can include a pre-trained machine learning model to identify spectral features and predict herbicide concentration.
[0072] Specifically, the system operates as follows: First, the acquisition module 201 collects near-infrared spectral data, moisture content values, and compaction values for the soil area to be tested. The collected moisture content values are passed to the calculation module, which determines the preset moisture content interval to which the moisture content values belong and selects the corresponding preset scattering correction parameters accordingly. At the same time, the calculation module 202 receives the compaction value from the acquisition module and calculates the actual scattering correction parameters based on the compaction value. The spectrum correction module 203 receives the preset scattering correction parameters 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 to obtain corrected spectrum data. Finally, the analysis module 204 receives the corrected spectrum data and analyzes the spectrum data to determine the type and concentration of the herbicide active ingredient in the soil area to be tested. In this way, the system completes the rapid detection of the herbicide active ingredient.
[0073] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any actual relationship or order between these entities or operations.
[0074] The foregoing is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. Persons skilled in the art will readily appreciate that the present application may be modified and altered in various ways. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.
Claims
1. A method for rapid detection of herbicide active ingredients by near-infrared spectroscopy, which is used to rapidly detect the concentration of herbicide active ingredients under complex soil texture conditions in the field, characterized in that: The method comprises the steps of: S1: Obtain near-infrared spectral data of the soil area to be tested, as well as moisture content and compaction values that characterize soil texture differences; S2: selecting a corresponding preset scattering correction parameter according to the preset moisture content range to which the moisture content value belongs, and calculating an actual scattering correction parameter according to the compactness value; S3: performing spectral correction on the near-infrared spectral data according to the preset scattering correction parameter and the actual scattering correction parameter to obtain corrected spectral data; S4: Analyze and obtain the active ingredients of the herbicide in the soil area to be tested based on the corrected spectral data.
2. The method for rapid detection of herbicide active ingredients by near-infrared spectroscopy according to claim 1, characterized in that: Step S1 includes: S11: Scan the soil area to be tested using a near-infrared spectrometer to obtain original spectral data in the wavelength range of 400nm-2500nm, record the reflectance value of each wavelength, and obtain near-infrared spectral data; S12: using a soil moisture sensor to measure the moisture content of the soil area to be tested; S13: Use a soil compaction meter to measure the soil penetration resistance of the soil area to be tested to obtain a compaction value.
3. The method for rapid detection of herbicide active ingredients by near-infrared spectroscopy according to claim 1, characterized in that: Step S2 includes: S21: constructing a piecewise moisture content function to divide the moisture content into a low moisture content interval, a medium moisture content interval, and a high moisture content interval, and presetting different scattering correction parameters for different moisture content intervals; S23: Determine the moisture content range to which the moisture content value of the soil area to be measured belongs, and select a corresponding preset scattering correction intensity parameter; S24: constructing a compactness nonlinear function, which is an exponential function and is used to characterize the nonlinear relationship between compactness and scattering correction parameters; S25: Substituting the compactness value of the soil to be tested into the compactness nonlinear function to calculate the actual scattering correction parameter.
4. The method for rapid detection of herbicide active ingredients by near-infrared spectroscopy according to claim 3, characterized in that: Step S24 includes: S241: Obtain soil compaction and corresponding scattering correction parameters from historical data, and construct an initial database; S242: fitting the soil compaction and scattering correction parameters in the initial database using the least squares method to obtain multiple exponential functions; S243: Selecting an exponential function with the smallest root mean square error in the initial database as the compactness nonlinear function.
5. The method for rapid detection of herbicide active ingredients by near-infrared spectroscopy according to claim 1, characterized in that: Step S3 includes: S31: Constructing an ambient light intensity correction model; S32: Acquire ambient light intensity data of the soil area to be tested, and calculate ambient light interference spectrum data based on the ambient light intensity data and the ambient light intensity correction model; S33: removing ambient light interference spectrum data from the near-infrared spectrum data to obtain near-infrared spectrum data with ambient light interference eliminated; S34: performing spectral correction on the near-infrared spectral data from which ambient light interference is eliminated according to the preset scattering correction parameter and the actual scattering correction parameter to obtain corrected spectral data.
6. The method for rapid detection of herbicide active ingredients by near-infrared spectroscopy according to claim 5, characterized in that: Step S31 includes: S311: Under experimental conditions, collecting first near-infrared spectrum data of a standard reflector in a dark environment; S312: Collecting second near-infrared spectrum data of the standard reflector under different ambient light intensities; S313: Subtracting the first near-infrared spectrum data from the second near-infrared spectrum data under different ambient light intensities to obtain net spectrum data under each ambient light intensity; S314: Taking the 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.
7. The method for rapid detection of herbicide active ingredients by near-infrared spectroscopy according to claim 6, characterized in that: Step S32 includes: S321: Establishing a functional relationship between ambient light intensity and ambient light interference spectrum based on an ambient light intensity correction model; S322: Acquire ambient light intensity data of the soil area to be tested in real time; S323: Substituting the acquired ambient light intensity data into the functional relationship between the ambient light intensity and the ambient light interference spectrum to calculate the ambient light interference spectrum.
8. The method for rapid detection of herbicide active ingredients by near-infrared spectroscopy according to claim 7, characterized in that: Step S321 includes: S3211: Extracting a multivariate linear regression coefficient matrix and an intercept vector according to the ambient light intensity correction model; S3212: Construct a functional relationship between ambient light intensity and ambient light interference spectrum: ambient light interference spectrum = ambient light intensity data × multivariate linear regression coefficient matrix + intercept vector.
9. The method for rapid detection of herbicide active ingredients by near-infrared spectroscopy according to claim 1, characterized in that: Step S4 includes: S41: Construct a herbicide spectral feature database, which contains standard near-infrared spectral data of various common herbicides and their corresponding characteristic wavelengths and absorption intensity information; S42: preprocessing the corrected spectral data of the soil area to be tested, including smoothing filtering and denoising, to obtain a clear spectral curve; S43: identifying characteristic wavelengths in the corrected spectral curve according to the herbicide spectral characteristic database, and calculating corresponding absorption intensities; S44: Based on the identified characteristic wavelength and absorption intensity, combined with a preset herbicide concentration calculation model, the type and concentration of the herbicide active ingredient in the soil area to be tested are calculated.
10. A near-infrared spectroscopy rapid detection system for herbicide active ingredients, characterized in that: In the steps of the method according to any one of claims 1 to 9, the system 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: selects a corresponding preset scattering correction parameter according to the preset moisture content interval to which the moisture content value belongs, and calculates the actual scattering correction parameter according to the compactness value; Spectral correction module: performs spectral correction on the near-infrared spectral data according to the preset scattering correction parameters and the actual scattering correction parameters to obtain corrected spectral data; Analysis module: Based on the corrected spectral data, the active ingredients of the herbicide 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
Near-infrared-spectrum citrus yellow shoot disease field detection method
CN106018332A
Soil compactness and moisture composite measuring method and device
CN106053330A
Method for detecting glyphosate product and byproduct thereof based on near infrared spectrum
CN118777255A
Targeted interference subtraction applied to near-infrared measurement of analytes
US20030023148A1
Cited By
Method, equipment and system for rapidly detecting heavy metal pollution of land
CN121762597A
Rapid detection and analysis method for soil nutrients
CN121978037A
A water quality fluorescence fingerprint database construction method and system based on scattering correction
CN122468685A