Large-area soil rapid detection method and system based on Raman spectrum
By combining Raman spectroscopy and the K-nearest neighbor algorithm, a spatial distribution map of soil components is generated, which solves the problems of long time consumption and high cost in traditional soil testing, and realizes rapid and accurate large-area soil testing, improving testing efficiency and intelligence level.
Patent Information
- Application Number
- CN202510117601.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-03-04
AI Technical Summary
Traditional soil testing methods rely on chemical analysis, which requires specialized equipment and personnel, is costly and time-consuming, and is difficult to fully reflect the spatial variability of soil in large-area sites.
By employing Raman spectroscopy combined with the K-nearest neighbor algorithm, a model is trained using synthetic simulated soil and real soil sample data to generate a spatial distribution map of soil components. GIS software is then used for interpolation or fitting to achieve rapid and accurate soil component detection.
It improves the efficiency and accuracy of soil testing, enables intelligent analysis and spatial distribution prediction of soil components, provides more comprehensive data support, and enhances the automation and intelligence level of testing.
Smart Images

Figure CN119555664A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of soil detection, and in particular relates to a large-area soil rapid detection method based on Raman spectroscopy and a system thereof. Background Art
[0002] Soil testing is an important part of construction, agriculture, environmental science and land management. Traditional soil testing methods usually rely on chemical analysis. Although accurate, they require professional laboratory equipment and professionals, and the testing cost is high. It usually takes days or even weeks from sample collection to result reporting. In addition, traditional methods can usually only provide limited sample point data, which makes it difficult to fully reflect the spatial variability of soil in large areas. Summary of the invention
[0003] The purpose of the present invention is to overcome the deficiencies in the prior art and provide a large-area soil rapid detection method and system based on Raman spectroscopy, which can improve the efficiency and accuracy of soil detection.
[0004] To achieve the above object, the present invention is implemented by adopting the following technical solutions.
[0005] In one aspect, the present invention provides a method for rapid detection of large-area soil based on Raman spectroscopy, comprising the steps of: Using a Raman spectrometer to obtain Raman spectral data of a plurality of synthetic simulated soil samples in a laboratory as a first spectral data sample set; Acquire Raman spectrum data of a plurality of real soil samples on a soil site to be tested as a second spectrum data sample set; respectively obtaining Raman spectral characteristic data of organic matter, minerals and water and merging them into a third spectral data sample set; Inputting the first spectral data sample set and the third spectral data sample set into a K nearest neighbor algorithm for training to obtain an intermediate soil assessment model; The first spectral data sample set and the second spectral data sample set are combined according to a preset ratio and input into an intermediate soil evaluation model to obtain a KNN soil evaluation model; Sampling a number of soil samples to be tested at uniform intervals and with spatial position numbers marked in sequence over the entire area of the soil site to be tested, and obtaining spectral data of the soil to be tested marked with spatial position numbers, The predicted values of soil composition of organic matter, minerals and water in the soil at each sampling point were input into the obtained KNN soil assessment model; The predicted soil composition values of each sampling point marked with a spatial location number in the soil site to be tested are interpolated or fitted, and GIS software is used to generate a complete soil composition spatial distribution prediction map of the soil site to be tested.
[0006] Furthermore, the plurality of synthetic simulated soil samples include at least two soil samples containing organic matter, minerals and water in different proportions.
[0007] Furthermore, the multiple real soil samples include at least one soil sample located in the middle of the soil site to be tested, at least two soil samples located at the edge of the soil site to be tested, and at least two soil samples located between the middle and the edge of the soil site to be tested.
[0008] Furthermore, the Raman spectrum characteristic data of organic matter, minerals and water at least include the position, intensity and shape of the spectrum characteristic peaks.
[0009] Furthermore, the first spectral data sample set and the second spectral data sample set are combined in a preset ratio of 1:(2-4).
[0010] Furthermore, on the soil site to be tested, samples are taken evenly spaced and sequentially labeled with spatial position numbers by grid sampling, random grid sampling, staggered grid sampling, spiral sampling or systematic sampling.
[0011] Furthermore, the predicted value of soil composition corresponding to each sampling point marked with a spatial position number is interpolated or fitted using Kriging interpolation, nearest neighbor interpolation or polynomial fitting.
[0012] Furthermore, the KNN soil assessment model is trained, including the following steps: Combining the first spectral data sample set and the third spectral data sample set to form an initial training data set; Select an appropriate value of the number of nearest neighbor samples K, use the initial training data set to input the K nearest neighbor algorithm to train the KNN model, and calculate the Euclidean distance between each sample and all samples in the initial training data set to obtain K nearest neighbor samples; The predicted label is determined by majority voting or weighted average according to the labels of K nearest neighbor samples to obtain the intermediate soil assessment model; The first spectral data sample set and the second spectral data sample set are merged again in a preset ratio of 1: (2-4) to form a complete training data set, and are divided into a verification sample set and a training sample set in a ratio of 2:8; The merged training sample set is input into the intermediate soil assessment model for training again to obtain the KNN soil assessment model, and the validation sample set is used to evaluate the KNN soil assessment model. This is repeated multiple times to calculate the accuracy, recall rate, and mean square error used to evaluate the KNN soil assessment model.
[0013] Furthermore, the grid sampling adopts a grid of 5 meters × 5 meters or 10 meters × 10 meters, and the grids are numbered in sequence, and the spatial position number includes the sampling number and the plot number; The sampling depths of the soil samples to be tested include at least one of 0.1 m to 0.25 m, 0.25 m to 0.5 m, and 0.5 m to 1 m.
[0014] In a second aspect, the present invention provides a large-area soil rapid detection system based on Raman spectroscopy, comprising modules: A first sample set acquisition module, used to use a Raman spectrometer to acquire Raman spectrum data of a plurality of synthetic simulated soil samples in a laboratory as a first spectrum data sample set; A second sample set acquisition module, used to obtain Raman spectrum data of multiple real soil samples on the soil site to be tested as a second spectrum data sample set; A third sample set acquisition module, used to respectively acquire Raman spectral characteristic data of organic matter, minerals and water and combine them as a third spectral data sample set; A first model module is used to input the first spectral data sample set and the third spectral data sample set into a K nearest neighbor algorithm for training to obtain an intermediate soil assessment model; The second model module is used to combine the first spectral data sample set and the second spectral data sample set according to a preset ratio to obtain an intermediate soil evaluation model for training to obtain a KNN soil evaluation model; The data acquisition module is used to sample a number of soil samples to be tested at uniform intervals and with spatial position numbers marked in sequence over the entire area of the soil site to be tested, and obtain the spectral data of the soil to be tested marked with spatial position numbers. The first prediction module is used to input the obtained KNN soil assessment model to predict the soil composition prediction values of organic matter, minerals and water in the soil at each sampling point; The second prediction module is used to interpolate or fit the soil composition prediction value corresponding to each sampling point marked with a spatial position number in the soil site area to be tested and use GIS software to generate a complete soil composition spatial distribution prediction map of the soil site to be tested.
[0015] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: the large-area soil rapid detection method and system based on Raman spectroscopy provided by the present invention uniquely combines synthetic simulated soil samples and real soil samples, etc., to form a variety of data samples and use the KNN algorithm to train the soil evaluation model, and generate a spatial distribution map of soil components through interpolation or fitting methods, which can fully reflect the spatial variability of soil in a large area, is convenient, fast and easy to operate, and provides more comprehensive data support for soil management and decision-making. It improves the accuracy of soil component prediction; it also realizes the intelligent analysis of soil components and spatial distribution prediction to a certain extent, and improves the automation and intelligence level of soil detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A flowchart of a large-area soil rapid detection method based on Raman spectroscopy provided in an embodiment of the present invention.
[0017] Figure 2 A Raman spectroscopy detection diagram provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0018] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention. Example
[0019] like Figure 1 As shown, an embodiment of the present invention provides a large-area soil rapid detection method based on Raman spectroscopy, comprising the steps of: Step S1: using a Raman spectrometer to obtain Raman spectral data of a plurality of synthetic simulated soil samples in a laboratory as a first spectral data sample set; Step S2: obtaining Raman spectrum data of a plurality of real soil samples on a soil site to be tested as a second spectrum data sample set; Step S3: respectively obtaining the Raman spectral characteristic data of the organic matter, minerals and water and merging them into a third spectral data sample set; Step S4: inputting the first spectral data sample set and the third spectral data sample set into a K nearest neighbor algorithm for training to obtain an intermediate soil assessment model; Step S5: merging the first spectral data sample set and the second spectral data sample set according to a preset ratio and inputting the obtained intermediate soil evaluation model for training to obtain a KNN soil evaluation model; Step S6: sampling a number of soil samples to be tested at uniform intervals and with spatial position numbers marked in sequence over the entire area of the soil site to be tested, and obtaining spectral data of the soil to be tested marked with spatial position numbers, Step S7: input the predicted values of soil components of organic matter, minerals and water in the soil at each sampling point obtained in the KNN soil assessment model; Step S8: The predicted soil composition values of each sampling point corresponding to the spatial position number in the soil site area to be tested are interpolated or fitted, and GIS software is used to generate a complete soil composition spatial distribution prediction map of the soil site to be tested.
[0020] In this embodiment, multiple synthetic soil samples are generated in the laboratory through physical simulation, which may contain different proportions of organic matter, minerals, and water to simulate different types of soil. The experimenter uses a Raman spectrometer to obtain Raman spectral data of these synthetic soil samples, records the Raman spectral characteristics of each sample, and associates it with the corresponding soil component label (such as organic matter content, mineral content, water content) to form a first spectral data sample set.
[0021] On the soil site to be tested, multiple real soil samples are collected, which can cover different types of soil. A Raman spectrometer is used to obtain Raman spectral data of real soil samples, record the Raman spectral characteristics of each sample, and associate it with the corresponding soil component label (such as organic matter content, mineral content, water content) to form a second spectral data sample set.
[0022] In the laboratory or based on theoretical research, the Raman spectral characteristics of pure organic matter, minerals and water are obtained respectively, which can be used as a reference to help identify and quantify different components in the soil. The Raman spectral characteristics of different components are stored in a feature library to form a third spectral data sample set. Among them, the spectral characteristics of each component can include information such as the position, intensity and shape of the characteristic peak.
[0023] Organic compounds usually show the following characteristics in Raman spectroscopy: -1 In the range of 1600–1700 cm, it corresponds to the stretching vibrations of methyl (CH3) and methylene (CH2); -1 In the range of 1000-1300 cm -1 In the range of 1400-1600 cm -1 range, corresponding to the skeleton vibration of the aromatic ring.
[0024] Minerals usually show the following characteristics in Raman spectroscopy: -1 In the range of 1000-1500 cm -1 In the range, corresponding to CO3 2-Symmetric and antisymmetric stretching vibrations; at 300-800cm -1 In the range of 1000-1200 cm -1 range, corresponding to SO4 2- stretching vibration.
[0025] Water usually exhibits the following characteristics in Raman spectroscopy: -1 In the range of 1600-1700 cm -1 In the range of 1000-3000 cm -1 range, corresponding to the stretching vibration of the OH bond of bound water.
[0026] In this embodiment, after the sampling data set is obtained, data preprocessing is also performed, such as data clarity, feature extraction, normalization, etc. Specifically, the noise and outliers in the data are removed to ensure the accuracy and consistency of the data; characteristic peaks are extracted from the Raman spectrum data, corresponding to different components in the soil, and the position and intensity of the characteristic peaks can be extracted using a peak detection algorithm; the intensity of the characteristic peaks is normalized to the same range (such as 0 to 1) to eliminate the dimensional differences between different samples.
[0027] In this embodiment, the plurality of synthetic simulated soil samples include at least two soil samples containing organic matter, minerals and water in different proportions, wherein the Raman spectrum characteristic data of the organic matter, minerals and water at least include the position, intensity and shape of the spectrum characteristic peaks.
[0028] In this embodiment, a representative soil sample is collected using appropriate tools (such as a shovel, soil drill, etc.) at the soil site to be tested, and multiple samples are collected from multiple locations to ensure the comprehensiveness of the data. At the same time, the collected soil samples are pre-treated, such as removing impurities, drying, grinding, etc., to ensure the uniformity and consistency of the samples, and the pre-treated samples can be placed in sample bags or sample bottles for subsequent test measurements.
[0029] Among them, the multiple real soil samples include at least one soil sample located in the middle of the soil site to be tested, at least two soil samples located at the edge of the soil site to be tested, and at least two soil samples located between the middle and the edge of the soil site to be tested.
[0030] At the soil site to be tested, samples are taken evenly spaced and sequentially marked with spatial position numbers using grid sampling, random grid sampling, staggered grid sampling, spiral sampling or systematic sampling methods.
[0031] Determine the boundaries and area of the soil site to be tested, and divide the sampling area into uniform grids, where the size of the grid can be determined according to the sampling purpose and the variability of the soil. Set a sampling point at the center of each grid or a fixed position (such as the upper left corner of the grid), and collect soil samples at each sampling point, ensuring that the depth and collection method of the samples are consistent.
[0032] For example, grid sampling uses a 5m × 5m or 10m × 10m grid, and the grids are numbered sequentially. The spatial position number includes the sampling number and the plot number.
[0033] The sampling depths of the soil samples to be tested include at least one of 0.1m~0.25m, 0.25m~0.5m, and 0.5m~1m.
[0034] In soil prediction, soil properties often have spatial heterogeneity, that is, soil properties at different locations may vary significantly. The spatial location number is an identifier used to uniquely identify the location where the soil sample was collected. The identifier can be a geographic coordinate (such as latitude and longitude), a plot number, a sampling point number, or any other information that can accurately describe the location where the sample was collected.
[0035] When collecting samples, a handheld GPS instrument can be used to accurately obtain the geographic coordinates of the soil sample collection location and record the latitude and longitude information of the point. In addition, GIS software can be used to record the location information of the sampling point on a map and generate a detailed sampling point distribution map, which can be exported to CSV or Shapefile format.
[0036] Before sampling, a sampling point numbering system can be designed in advance according to the site grid division, each sampling point is assigned a unique number, and the number of each sample and the corresponding plot number are recorded.
[0037] In this embodiment, a portable Raman spectrometer and a laboratory Raman spectrometer can be used. Among them, the portable Raman spectrometer is suitable for field measurement, and has the advantages of simple operation, small size, and light weight; the soil sample can be measured directly on site without bringing the sample back to the laboratory. For example, Ocean Optics' portable Raman spectrometer can quickly obtain Raman spectral data of the soil on site. Laboratory Raman spectrometers usually have higher resolution and sensitivity, and are suitable for occasions requiring high-precision measurements, and usually require soil samples to be brought back to the laboratory for measurement. For example, Renishaw's laboratory Raman spectrometer can provide high-resolution Raman spectral data, which is suitable for detailed soil composition analysis.
[0038] Raman spectrometers need to be calibrated before measurement to ensure the accuracy of the measurement results. Calibration usually includes wavelength calibration and intensity calibration. For example, the experimenter places the pre-treated soil sample at the measurement position; for portable Raman spectrometers, the probe can be directly aimed at the soil sample for measurement; for laboratory Raman spectrometers, the sample needs to be placed in the sample pool. Start the measurement program to automatically obtain the Raman spectrum data of the soil sample; during the measurement, parameters such as laser power and integration time can also be adjusted to optimize the measurement results. After the measurement is completed, the experimenter will record the obtained Raman spectrum data, usually saved in the form of a spectrum graph, and can be exported to CSV, TXT and other formats for subsequent predictive analysis.
[0039] In this embodiment, the parameters of the Raman spectrometer can be an excitation wavelength of 785 nm and a spectral range of 0-4000 cm -1 , spectral resolution 1 cm -1 , laser power 50 mW, integration time 1000 ms, number of scans 10 times, intensity 0~1200, etc.
[0040] In this embodiment, the training to obtain the KNN soil assessment model includes the following steps: Step S5 - 1 : Combining the first spectral data sample set and the third spectral data sample set to form an initial training data set.
[0041] Step S5-2: Select an appropriate value of the number of nearest neighbor samples K, use the initial training data set to input the K nearest neighbor algorithm to train the KNN model, calculate the Euclidean distance between each sample and all samples in the initial training data set to obtain K nearest neighbor samples; Step S5-3: Determine the predicted label by majority voting or weighted average according to the labels of the K nearest neighbor samples to obtain an intermediate soil assessment model; Step S5-4: merging the first spectral data sample set and the second spectral data sample set again in a preset ratio of 1:(2-4) to form a complete training data set, and dividing them into a verification sample set and a training sample set in a ratio of 2:8; Step S5-5: Input the merged training sample set into the intermediate soil evaluation model for training again to obtain the KNN soil evaluation model, and use the validation sample set to evaluate the KNN soil evaluation model. Repeat this process multiple times to calculate the accuracy, recall rate, and mean square error used to evaluate the KNN soil evaluation model.
[0042] In this embodiment, Raman spectroscopy measurement data is associated with spatial position numbers to form a complete data set. For example, each Raman spectroscopy measurement data record contains a spatial position number, which indicates the sampling point location corresponding to the data. Data from different sources (such as Raman spectroscopy measurement data, chemical analysis data, topographic data, etc.) are integrated together to form a comprehensive data set. Among them, the spatial position number can be used as a key field for data integration to ensure the correspondence between different data.
[0043] Based on the soil property data of known sampling points, predict the soil properties of unknown site locations. The predicted soil composition values of each sampling point corresponding to the spatial location number are interpolated or fitted using Kriging interpolation, nearest neighbor interpolation, or polynomial fitting. Use the spatial location number to perform spatial statistical analysis to evaluate the spatial variability and correlation of soil properties. For example, calculate the spatial autocorrelation coefficient of soil properties, evaluate the correlation of soil properties at different distances, and so on. Specifically, you can use GIS software, Surfer software, or MATLAB software to generate a sampling point distribution map, and perform operations such as spatial interpolation and spatial statistical analysis.
[0044] In this embodiment, Kriging interpolation is used to calculate the semivariance between sampling points and construct a semivariance model to estimate the soil properties of unknown points. For example, the semivariance between sampling points is calculated to generate a semivariance map, a suitable semivariance model (such as linear, spherical, exponential, etc.) is selected to fit the semivariance map, and the fitted semivariance model is used to interpolate each point in the area to be detected to generate a soil property map.
[0045] In the sample prediction process, the spatial location number is used as one of the input features of the machine learning model to improve the prediction accuracy of the model. For example, latitude, longitude, plot number, etc. are used as input features to train the machine learning model and generate prediction results of soil properties.
[0046] In this embodiment, the K-nearest neighbor algorithm (KNN) or other machine learning models are used to obtain the predicted value of soil composition at each sampling point. The machine learning model uses the K-nearest neighbor algorithm, and can also use principal component analysis (PCA) combined with linear regression, random forest (RF), convolutional neural network (CNN) and its variant models.
[0047] The embodiment of the present invention provides a large-area soil rapid detection system based on Raman spectroscopy, including modules: A first sample set acquisition module, used to use a Raman spectrometer to acquire Raman spectrum data of a plurality of synthetic simulated soil samples in a laboratory as a first spectrum data sample set; A second sample set acquisition module, used to obtain Raman spectrum data of multiple real soil samples on the soil site to be tested as a second spectrum data sample set; A third sample set acquisition module, used to respectively acquire Raman spectral characteristic data of organic matter, minerals and water and combine them as a third spectral data sample set; A first model module is used to input the first spectral data sample set and the third spectral data sample set into a K nearest neighbor algorithm for training to obtain an intermediate soil assessment model; The second model module is used to combine the first spectral data sample set and the second spectral data sample set according to a preset ratio to obtain an intermediate soil evaluation model for training to obtain a KNN soil evaluation model; The data acquisition module is used to sample a number of soil samples to be tested at uniform intervals and with spatial position numbers marked in sequence over the entire area of the soil site to be tested, and obtain the spectral data of the soil to be tested marked with spatial position numbers. The first prediction module is used to input the obtained KNN soil assessment model to predict the soil composition prediction values of organic matter, minerals and water in the soil at each sampling point; The second prediction module is used to interpolate or fit the soil composition prediction value corresponding to each sampling point marked with a spatial position number in the soil site area to be tested and use GIS software to generate a complete soil composition spatial distribution prediction map of the soil site to be tested.
[0048] An embodiment of the present invention further provides an electronic device, including: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the large-area rapid soil detection method based on Raman spectroscopy as described above.
[0049] A computer-readable storage medium is also provided in an embodiment of the present invention. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the above-mentioned large-area soil rapid detection method based on Raman spectroscopy.
[0050] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A large-area soil rapid detection method based on Raman spectroscopy, characterized in that: Includes steps: Using a Raman spectrometer to obtain Raman spectral data of a plurality of synthetic simulated soil samples in a laboratory as a first spectral data sample set; Acquire Raman spectrum data of a plurality of real soil samples on a soil site to be tested as a second spectrum data sample set; respectively obtaining Raman spectral characteristic data of organic matter, mineral matter and water and merging them into a third spectral data sample set; Inputting the first spectral data sample set and the third spectral data sample set into a K nearest neighbor algorithm for training to obtain an intermediate soil assessment model; The first spectral data sample set and the second spectral data sample set are combined according to a preset ratio and input into an intermediate soil assessment model to obtain a KNN soil assessment model; Sampling a number of soil samples to be tested at uniform intervals and with spatial position numbers marked in sequence over the entire area of the soil site to be tested, and obtaining spectral data of the soil to be tested marked with spatial position numbers, The predicted values of soil composition of organic matter, minerals and water in the soil at each sampling point were input into the obtained KNN soil assessment model; The predicted soil composition values of each sampling point marked with a spatial location number in the soil site to be tested are interpolated or fitted, and GIS software is used to generate a complete soil composition spatial distribution prediction map of the soil site to be tested.
2. The method for rapid detection of large-area soil based on Raman spectroscopy according to claim 1 is characterized in that: The plurality of synthetic simulated soil samples include at least two soil samples containing organic matter, minerals and water in different proportions.
3. The method for rapid detection of large-area soil based on Raman spectroscopy according to claim 2 is characterized in that: The multiple real soil samples include at least one soil sample located in the middle of the soil site to be tested, at least two soil samples located at the edge of the soil site to be tested, and at least two soil samples located between the middle and the edge of the soil site to be tested.
4. The method for rapid detection of large-area soil based on Raman spectroscopy according to claim 3 is characterized in that: The Raman spectrum characteristic data of organic matter, minerals and water at least include the position, intensity and shape of the spectrum characteristic peak.
5. The method for rapid detection of large-area soil based on Raman spectroscopy according to claim 4 is characterized in that: The first spectral data sample set and the second spectral data sample set are combined according to a preset ratio of 1:(2-4).
6. The method for rapid detection of large-area soil based on Raman spectroscopy according to claim 5 is characterized in that: At the soil site to be tested, samples are taken evenly spaced and sequentially marked with spatial position numbers using grid sampling, random grid sampling, staggered grid sampling, spiral sampling or systematic sampling methods.
7. The method for rapid detection of large-area soil based on Raman spectroscopy according to claim 6 is characterized in that: The predicted soil composition value of each sampling point corresponding to the spatial location number is interpolated or fitted using Kriging interpolation, nearest neighbor interpolation or polynomial fitting.
8. The method for rapid detection of large-area soil based on Raman spectroscopy according to claim 7 is characterized in that: Training to obtain the KNN soil assessment model includes the following steps: Combining the first spectral data sample set and the third spectral data sample set to form an initial training data set; Select an appropriate value of the number of nearest neighbor samples K, use the initial training data set to input the K nearest neighbor algorithm to train the KNN model, and calculate the Euclidean distance between each sample and all samples in the initial training data set to obtain K nearest neighbor samples; The predicted label is determined by majority voting or weighted average according to the labels of K nearest neighbor samples to obtain the intermediate soil assessment model; The first spectral data sample set and the second spectral data sample set are merged again in a preset ratio of 1: (2-4) to form a complete training data set, and are divided into a verification sample set and a training sample set in a ratio of 2:8; The merged training sample set is input into the intermediate soil assessment model for training again to obtain the KNN soil assessment model, and the validation sample set is used to evaluate the KNN soil assessment model. This is repeated multiple times to calculate the accuracy, recall rate, and mean square error used to evaluate the KNN soil assessment model.
9. The method for rapid detection of large-area soil based on Raman spectroscopy according to claim 8, characterized in that: The grid sampling adopts a grid of 5 meters × 5 meters or 10 meters × 10 meters, and the grids are numbered in sequence, and the spatial position number includes a sampling number and a plot number; the sampling depth of the several soil samples to be tested includes at least one of 0.1 meters to 0.25 meters, 0.25 meters to 0.5 meters, and 0.5 meters to 1 meter.
10. Raman spectroscopy-based soil rapid detection system, characterized in that: Included modules: A first sample set acquisition module, used to use a Raman spectrometer to acquire Raman spectrum data of a plurality of synthetic simulated soil samples in a laboratory as a first spectrum data sample set; A second sample set acquisition module, used to obtain Raman spectrum data of multiple real soil samples on the soil site to be tested as a second spectrum data sample set; A third sample set acquisition module, used to respectively acquire Raman spectral characteristic data of organic matter, minerals and water and combine them as a third spectral data sample set; A first model module is used to input the first spectral data sample set and the third spectral data sample set into a K nearest neighbor algorithm for training to obtain an intermediate soil assessment model; The second model module is used to combine the first spectral data sample set and the second spectral data sample set according to a preset ratio to obtain an intermediate soil evaluation model for training to obtain a KNN soil evaluation model; The data acquisition module is used to sample a number of soil samples to be tested at uniform intervals and with spatial position numbers marked in sequence over the entire area of the soil site to be tested, and obtain the spectral data of the soil to be tested marked with spatial position numbers. The first prediction module is used to input the obtained KNN soil assessment model to predict the soil composition prediction values of organic matter, minerals and water in the soil at each sampling point; The second prediction module is used to interpolate or fit the soil composition prediction value corresponding to each sampling point marked with a spatial position number in the soil site area to be tested and use GIS software to generate a complete soil composition spatial distribution prediction map of the soil site to be tested.
Citation Information
Patent Citations
Method and system for identifying and detecting colored micro-plastics in soil based on deep learning
CN116363440A
Digital soil mapping method and device based on soil space neighborhood information
CN118537441A
Soil heavy metal stabilization effect prediction method based on machine learning
CN118606705A
Method and equipment for acquiring mesoscale soil organic matter spatial distribution diagram
CN118762198A
Structural parameter determination method
CN118999351A