Freeze-Thaw Soil Spectrum Calibration Method and Device, Storage Medium, Computer Equipment

Through smooth denoising treatment and random forest model correction, the problem of freeze-thaw soil spectral changes interfering with soil parameter estimation is solved, and the accuracy of freeze-thaw soil spectral correction and the generalization ability of soil parameter estimation model are improved.

CN119862490BActive Publication Date: 2025-06-27NORTHEASTERN UNIV CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510347721.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-06-27
Estimated Expiration
2045-03-24

AI Technical Summary

Technical Problem

The reflectivity spectrum changes in frozen-thaw soil during freeze-thawing, resulting in a decrease in the prediction accuracy of soil parameter estimation model.

Method used

By obtaining the in-situ spectral reflectivity curve of frozen and thawing soil, performing smooth denoising processing, determining the spectral reflectivity group to be corrected for each band, and constructing a spectral reflectivity correction model of frozen and thawing soil based on a random forest model, reducing the spectral reflectivity to obtain the corrected spectral reflectivity curve.

Benefits of technology

The sensitivity of abnormal information capture of frozen-thaw soil spectra is improved, the complex nonlinear relationship between frozen-thaw soil spectra and soil spectra under ideal conditions is identified, and the impact of the freeze-thaw process on the information loss of the spectral response band is reduced, thereby improving the generalization ability of the soil parameter estimation model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119862490B_ABST
    Figure CN119862490B_ABST
Patent Text Reader

Abstract

The present application relates to the technical fields of spectral analysis and computer technology, and discloses a freeze-thaw soil spectral correction method, device, storage medium, and computer equipment. The method includes: obtaining the in-situ spectral reflectance curve of freeze-thaw soil and determining the spectral reflectance group to be corrected corresponding to each band; based on the freeze-thaw soil spectral reflectance correction model and the spectral reflectance group to be corrected, restoring and correcting the spectral reflectance of each band within a preset band range to obtain a corrected spectral reflectance curve. The freeze-thaw soil spectral reflectance correction model is a transfer function model implemented based on a random forest model. Aiming at the problem of spectral information distortion caused by multi-factor changes during the freeze-thaw process of soil, the freeze-thaw soil spectral reflectance correction model can effectively correct the in-situ spectral reflectance curve of freeze-thaw soil, thereby improving the estimation accuracy of surface soil parameters in the freeze-thaw season.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical fields of spectral analysis and computer technology, and in particular, to a method and device for correcting the spectrum of frozen-thawed soil, a storage medium, and a computer device. Background Art

[0002] China has the third largest permafrost area in the world. Seasonal permafrost is mainly located north of 30°N, accounting for about 53.5% of the national land area. The soil freeze-thaw process is the most common change in soil state of seasonal permafrost. Freeze-thaw is a physical texture action and phenomenon of freezing and melting of soil layers due to the temperature dropping below 0°C and rising above 0°C. It is a repeated freezing-thawing soil process formed at a certain depth below the surface layer of permafrost due to seasonal or diurnal heat changes. As a natural phenomenon, it exists widely in high-latitude, high-altitude regions, and most mid-latitude regions.

[0003] In recent years, due to the advantages of low cost, easy acquisition, fast and non-destructive of the visible-near infrared (Vis-NIR, Visible and Near Infra-red) technology, it has been widely used in the investigation and monitoring of soil property contents. The Vis-NIR spectral characteristics of soil are the comprehensive manifestation of its internal physical and chemical properties, and are closely related to the particle size distribution, organic matter content, etc. of the soil. As a complex physical process, the freeze-thaw effect will have a significant impact on the physical and chemical properties, structure and texture of the soil, resulting in changes in the reflectance spectrum of the soil during the freeze-thaw process. This change will interfere with the prediction accuracy of the soil parameter estimation model constructed under the ideal state of the laboratory. Summary of the Invention

[0004] In view of this, the present application provides a method and device for correcting the spectrum of frozen-thawed soil, a storage medium, and a computer device. Based on the reflectance spectrum data of the soil during the freeze-thaw process and its ideal state (normal temperature and dry), the spectrum is constructed by moving window for each band to correct the soil spectrum under different freeze-thaw states, improving the sensitivity of the conventional method to capture abnormal soil spectrum information through global or fixed window, and constructing a freeze-thaw soil spectral reflectance correction model with a transfer function as the input-output structure through a machine learning algorithm (random forest model), breaking through the limitations of traditional linear models. In the process of identifying the complex non-linear relationship between the freeze-thaw soil spectrum under the influence of multiple factors and the soil spectrum in the ideal state, the identification accuracy is improved, and the soil ideal state (i.e., the corrected) spectrum under various freeze-thaw conditions can be generated, thereby effectively reducing the influence of the freeze-thaw process on the loss of spectral response band information, and thus providing a theoretically feasible way to improve the generalization ability of the subsequent soil parameter estimation model in practical applications.

[0005] According to one aspect of the present application, a method for correcting the spectrum of freeze-thaw soil is provided. The method includes:

[0006] Obtain the in-situ spectral reflectance curve of the freeze-thaw soil, where the in-situ spectral reflectance curve is composed of the in-situ spectral reflectances of multiple bands within a preset band range;

[0007] Perform smoothing and denoising processing on the in-situ spectral reflectance curve to obtain a spectral reflectance curve to be corrected;

[0008] Based on the spectral reflectance curve to be corrected, determine the spectral reflectance groups to be corrected corresponding to each band;

[0009] Based on the freeze-thaw soil spectral reflectance correction model, perform reduction correction on the spectral reflectances of the bands corresponding to the spectral reflectance groups to be corrected to obtain a corrected spectral reflectance curve, where the corrected spectral reflectance curve is composed of the corrected spectral reflectances of multiple bands within a preset band range. The freeze-thaw soil spectral reflectance correction model is obtained by using a random forest model as a transfer function model, and the transfer function model is trained based on a pre-constructed spectral reflectance reduction correction training data set.

[0010] According to another aspect of the present application, a device for correcting the spectrum of freeze-thaw soil is provided. The device includes:

[0011] A spectral reflectance acquisition module for obtaining the in-situ spectral reflectance curve of the freeze-thaw soil, where the in-situ spectral reflectance curve is composed of the in-situ spectral reflectances of multiple bands within a preset band range;

[0012] A smoothing and denoising processing module for performing smoothing and denoising processing on the in-situ spectral reflectance curve to obtain a spectral reflectance curve to be corrected;

[0013] A spectral reflectance grouping module for determining the spectral reflectance groups to be corrected corresponding to each band based on the spectral reflectance curve to be corrected;

[0014] A spectral reflectance reduction correction module for performing reduction correction on the spectral reflectances of the bands corresponding to the spectral reflectance groups to be corrected based on the freeze-thaw soil spectral reflectance correction model to obtain a corrected spectral reflectance curve, where the corrected spectral reflectance curve is composed of the corrected spectral reflectances of multiple bands within a preset band range. The freeze-thaw soil spectral reflectance correction model is obtained by using a random forest model as a transfer function model, and the transfer function model is trained based on a pre-constructed spectral reflectance reduction correction training data set.

[0015] According to another aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned freeze-thaw soil spectral correction method is implemented.

[0016] According to still another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and operable on the processor, and when the processor executes the program, the above-mentioned freeze-thaw soil spectral correction method is implemented.

[0017] By means of the above technical solutions, a freeze-thaw soil spectral correction method and device, a storage medium, and a computer device provided by the present application obtain an in-situ spectral reflectance curve of freeze-thaw soil, perform smoothing and denoising processing to obtain a spectral reflectance curve to be corrected, and determine a group of spectral reflectances to be corrected corresponding to each band; based on the freeze-thaw soil spectral reflectance correction model and the group of spectral reflectances to be corrected, the spectral reflectances of each band within a preset band range are restored and corrected to obtain a corrected spectral reflectance curve, and the freeze-thaw soil spectral reflectance correction model is a transfer function model implemented based on a random forest model. Aiming at the problem of spectral information distortion caused by multi-factor changes during the freeze-thaw process of soil, based on a machine learning algorithm (random forest model) combined with a transfer function, the estimation accuracy of surface soil parameters in the freeze-thaw season can be improved.

[0018] The above description is only an overview of the technical solutions of the present application. In order to be able to understand the technical means of the present application more clearly, it can be implemented according to the content of the description. And in order to make the above and other purposes, features, and advantages of the present application more obvious and understandable, the specific embodiments of the present application are specifically given below. Description of the Drawings

[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation of the present application. In the drawings:

[0020] Figure 1 A flowchart showing a freeze-thaw soil spectral correction method provided by an embodiment of the present application is shown;

[0021] Figure 2 A schematic diagram of a spectral reflectance provided by an embodiment of the present application is shown;

[0022] Figure 3 A flowchart showing a method for grouping spectral reflectances provided by an embodiment of the present application is shown;

[0023] Figure 4 A flowchart showing another freeze-thaw soil spectral correction method provided by an embodiment of the present application is shown;

[0024] Figure 5 It shows a schematic flowchart of another freeze-thaw soil spectral correction method provided by an embodiment of the present application;

[0025] Figure 6 It shows a schematic structural diagram of a freeze-thaw soil spectral correction device provided by an embodiment of the present application;

[0026] Figure 7 It shows a schematic structural diagram of another freeze-thaw soil spectral correction device provided by an embodiment of the present application. Detailed implementation manners

[0027] The present application will be described in detail below with reference to the drawings and in combination with embodiments. It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.

[0028] In this embodiment, a freeze-thaw soil spectral correction method is provided. As Figure 1 shown, the method includes:

[0029] Step 101: Obtain the in-situ spectral reflectance curve of the freeze-thaw soil, where the in-situ spectral reflectance curve is composed of the in-situ spectral reflectances of multiple bands within a preset band range.

[0030] Step 102: Perform smoothing and denoising processing on the in-situ spectral reflectance curve to obtain a spectral reflectance curve to be corrected.

[0031] In the above embodiment of the present application, an SVC-HR1024 spectrometer can be used to obtain the in-situ spectral reflectance curve of the freeze-thaw soil. The in-situ spectral reflectance curve is composed of the in-situ spectral reflectances of multiple bands within a preset band range. After performing smoothing and denoising processing on the in-situ spectral reflectance curve, the spectral reflectance curve to be corrected obtained is, for example, Figure 2 shown. The preset band range is, for example, 400 to 2500 nm. At the same time, within the preset band range, every 10 nm can be determined as a band. For example, if the bands in the obtained in-situ spectral reflectance curve are every 3 or 4 nm, then through resampling operations, the bands can be changed to every 10 nm. Specifically, it can be achieved through specific data processing software or programming tools. These tools allow users to define a new wavelength interval (i.e., 10 nm) and resample the in-situ spectral reflectance curve accordingly, so that in the resampled in-situ spectral reflectance curve, the bands are every 10 nm. In particular, the resampled data will contain fewer data points, but each data point will represent a wider wavelength range. Resampling may cause loss of spectral information, especially in regions where spectral features change rapidly. Therefore, when performing resampling, the impact on the integrity and accuracy of spectral information can be carefully evaluated.

[0032] When performing smoothing and denoising processing on the in-situ spectral reflectance curve to obtain the spectral reflectance curve to be corrected, for example, the moving average method, Fourier transform smoothing method, wavelet denoising, Percentile Filter smoothing method, and derivative spectral technique can be used. Specifically, for example:

[0033] Regarding the moving average method: Select the average value of a certain wavelength range before and after the measurement point on the in-situ spectral reflectance curve as the value of this point. It is simple to implement and has a fast calculation speed, but it may cause loss of detailed information in some bands.

[0034] Regarding the Fourier transform smoothing method: Convert the spectral data (in-situ spectral reflectance curve) to the frequency domain, remove high-frequency noise through a filter, and then convert it back to the spatial domain. It is suitable for removing periodic noise, but may introduce artifacts such as Gibbs phenomenon.

[0035] Regarding wavelet denoising: Use wavelet transform to decompose the spectral data (in-situ spectral reflectance curve) into frequency bands of different scales, remove noise through threshold processing, and then reconstruct the signal. It can separate signals and noise at different scales, but has a high computational complexity and requires selecting appropriate wavelet bases and thresholds.

[0036] Regarding the Percentile Filter smoothing method: Determine the smoothing value according to the percentage of data points within a specified window, such as taking the median or a specified percentile. It is insensitive to outliers, and the smoothing effect may not be as fine as other methods.

[0037] Regarding the derivative spectral technique: Although not a direct smoothing method, the derivative spectral technique (such as the first derivative and second derivative) helps to eliminate the influence of low-frequency noise on the target spectrum and highlight spectral features.

[0038] In actual operation, the appropriate method can be selected according to the characteristics of the spectral data (in-situ spectral reflectance curve) and the type of noise. Usually, multiple methods need to be combined for comprehensive processing to achieve the best smoothing and denoising effect. In addition, professional spectral processing software or programming tools can be used to implement these smoothing and denoising algorithms.

[0039] In particular, the smoothing and denoising processing is an iterative and adjustment process. Therefore, the parameters and methods need to be continuously optimized according to the processing results to obtain the spectral reflectance curve to be corrected that meets the requirements.

[0040] Step 103, based on the spectral reflectance curve to be corrected, determine the group of spectral reflectances to be corrected corresponding to each band.

[0041] Next, based on the spectral reflectance curve to be corrected, determine the spectral reflectance groups corresponding to each band respectively, so that the reflectance of the corrected spectral curve of different bands can be restored and corrected according to different spectral reflectance groups to be corrected later.

[0042] Optionally, the spectral reflectance groups to be corrected include the spectral reflectance group of the starting band to be corrected, the spectral reflectance group of the ending band to be corrected, and multiple spectral reflectance groups of the intermediate bands to be corrected. Step 103 determines the spectral reflectance groups corresponding to each band respectively based on the spectral reflectance curve to be corrected. Referring to Figure 3 as shown, specifically includes:

[0043] Step 1031, according to the spectral reflectance to be corrected of each band arranged in ascending order of band size in the spectral reflectance curve to be corrected, determine the spectral reflectance sequence to be corrected.

[0044] Step 1032, divide the first two spectral reflectances to be corrected in the spectral reflectance sequence to be corrected into the spectral reflectance group of the starting band to be corrected, and divide the last two spectral reflectances to be corrected into the spectral reflectance group of the ending band to be corrected. Among them, in the spectral reflectance group of the starting band to be corrected, the band where the spectral reflectance to be corrected at the starting position is located is the band corresponding to the spectral reflectance group of the starting band to be corrected. In the spectral reflectance group of the ending band to be corrected, the band where the spectral reflectance to be corrected at the ending position is located is the band corresponding to the spectral reflectance group of the ending band to be corrected.

[0045] Step 1033, starting from the first spectral reflectance to be corrected in the spectral reflectance sequence to be corrected, divide the spectral reflectance sequence to be corrected based on a sliding window with a preset window size to obtain multiple spectral reflectance groups of the intermediate bands to be corrected. Among them, in the spectral reflectance group of the intermediate band to be corrected, the band where the spectral reflectance to be corrected at the intermediate position is located is the band corresponding to the spectral reflectance group of the intermediate band to be corrected. The sliding step of the sliding window is 1, and the preset window size is an odd number other than 1 and less than the threshold of the total number of spectral reflectances within the preset group limit.

[0046] Step 1034, based on the random forest model, construct a transfer function model with the spectral reflectance group to be corrected corresponding to the band as the input and the corrected spectral reflectance corresponding to the band as the output to obtain the spectral reflectance correction model of the freeze-thaw soil. Among them, the constructed spectral reflectance correction model of the freeze-thaw soil is implemented based on the random forest model. The spectral reflectance correction model of the freeze-thaw soil is:

[0047] ,

[0048] is the The calibrated spectral reflectance of each band, is the total number of bands within the preset band range, is the transfer function model of the th band, is the th calibrated spectral reflectance in the group of spectral reflectances to be calibrated corresponding to the th band.

[0049] In the above embodiments of the present application, according to the spectral reflectances to be calibrated of each band arranged in the order of band size in the spectral reflectance curve to be calibrated, a sequence of spectral reflectances to be calibrated is determined. Next, the first two spectral reflectances to be calibrated in the sequence of spectral reflectances to be calibrated are divided into a starting band spectral reflectance group to be calibrated, and the last two spectral reflectances to be calibrated are divided into an ending band spectral reflectance group to be calibrated.

[0050] Then, starting from the first spectral reflectance to be calibrated in the sequence of spectral reflectances to be calibrated, based on a sliding window with a preset window size, each spectral reflectance to be calibrated is divided to obtain multiple intermediate band spectral reflectance groups to be calibrated. The preset window size is an odd number and less than the total number limit threshold of spectral reflectances within the preset group. The total number limit threshold of spectral reflectances within the preset group can be set to 7. Then the preset window size can be set to 3 or 5 or 7, for example. In particular, when performing the division operation based on the sliding window, the sliding step of the sliding window is 1, and the window size used in the same reduction and calibration process is unified. Specifically, for example, if the sequence of spectral reflectances to be calibrated is: {1, 2, 3, 4, 5, 6}, then the starting band spectral reflectance group to be calibrated is {1, 2}, the ending band spectral reflectance group to be calibrated is {5, 6}, and the intermediate band spectral reflectance groups to be calibrated are respectively {1, 2, 3}, {2, 3, 4}, {3, 4, 5}, {4, 5, 6}. Correspondingly, the band corresponding to the starting band spectral reflectance group {1, 2} to be calibrated is the band where 1 is located, the band corresponding to the ending band spectral reflectance group {5, 6} to be calibrated is the band where 6 is located, and the bands corresponding to the intermediate band spectral reflectance groups {1, 2, 3}, {2, 3, 4}, {3, 4, 5}, {4, 5, 6} to be calibrated are the bands where 2, 3, 4, and 5 are located respectively.

[0051] Then, for multiple bands within the preset band range, a random forest model with "transfer function as the input-output structure" is constructed for each band to obtain a freeze-thaw soil spectral reflectance calibration model. For example, when using the freeze-thaw soil spectral reflectance calibration model for reduction and calibration, for the first band, it is equivalent to , at this time, with the transfer function as the input-output structure, that is .

[0052] Step 104: Based on the spectral reflectance correction model for frozen-thawed soil, perform reduction correction on the spectral reflectances of the corresponding bands of the to-be-corrected spectral reflectance group to obtain a corrected spectral reflectance curve. Among them, the corrected spectral reflectance curve is composed of the corrected spectral reflectances of multiple bands within a preset band range. The spectral reflectance correction model for frozen-thawed soil is obtained by using a random forest model as a transfer function model, and the transfer function model is trained based on a pre-constructed spectral reflectance reduction correction training dataset.

[0053] Next, based on the spectral reflectance correction model for frozen-thawed soil and the to-be-corrected spectral reflectance group, perform reduction correction on the spectral reflectances of each band within the preset band range to obtain a corrected spectral reflectance curve.

[0054] Optionally, Step 104 performs reduction correction on the spectral reflectances of the corresponding bands of the to-be-corrected spectral reflectance group based on the spectral reflectance correction model for frozen-thawed soil to obtain a corrected spectral reflectance curve, which specifically includes:

[0055] Step 1041: Based on the spectral reflectance correction model for frozen-thawed soil, perform reduction correction on the spectral reflectances of the corresponding bands of the to-be-corrected spectral reflectance group to obtain a to-be-processed corrected spectral reflectance curve.

[0056] Step 1042: Based on the Savizky–Golay filtering method, perform smoothing and denoising processing on the to-be-processed corrected spectral reflectance curve to obtain a corrected spectral reflectance curve.

[0057] In the above embodiments of the present application, before obtaining the corrected spectral reflectance curve, the SG method (Savizky–Golay filtering method) can also be used for smoothing and denoising processing to obtain the final corrected spectral reflectance curve.

[0058] Optionally, for Step 104, regarding how to "train the transfer function model based on the pre-constructed spectral reflectance reduction correction training dataset", refer to Figure 4 , which specifically includes:

[0059] Step 201: Respectively obtain spectral reflectance curve samples of various soil samples under various preset environmental conditions. Among them, the preset environmental conditions include the environmental conditions when the soil sample is in an ideal state, and the environmental conditions when the soil sample is in various frozen-thawed states. Different preset environmental conditions are respectively based on different preset soil water contents and different preset environmental temperatures for environmental simulation. The spectral reflectance curve samples include frozen-thawed spectral reflectance curve samples and ideal spectral reflectance curve samples.

[0060] In the above embodiments of the present application, specifically, when obtaining the spectral reflectance curve samples of various soil samples under various preset environmental conditions respectively, for example:

[0061] Select representative sample points in high-latitude and alpine regions, collect surface soil samples of 0-20 cm, dry, grind, and screen the soil samples (≤2 mm), and put them into black sample boxes.

[0062] Next, conduct a soil freeze-thaw simulation experiment, that is, place the "black sample boxes" containing various soil samples separately under different preset environmental conditions for static placement. The different preset environmental conditions are respectively based on different preset soil water contents and different preset environmental temperatures for environmental simulation. Regarding the preset environmental conditions, for example, based on local meteorological data, the environmental temperature can be set by simulating the freezing (-20°C) and thawing temperatures (20°C) in the natural environment, and adjusting different soil water contents. Then the different preset environmental conditions are, for example:

[0063] The environmental conditions when the soil sample is in an ideal state are:

[0064] Environmental temperature is 20 degrees, and soil water content is 0%;

[0065] The environmental conditions when the soil sample is in various freeze-thaw states are respectively:

[0066] The first freeze-thaw state (freeze): environmental temperature is -20 degrees, and soil water content is 0%;

[0067] The second freeze-thaw state (freeze): environmental temperature is -20 degrees, and soil water content is 5%;

[0068] The third freeze-thaw state (freeze): environmental temperature is -20 degrees, and soil water content is 10%;

[0069] The fourth freeze-thaw state (freeze): environmental temperature is -20 degrees, and soil water content is 15%;

[0070] The fifth freeze-thaw state (thaw): environmental temperature is 20 degrees, and soil water content is 5%;

[0071] The sixth freeze-thaw state (thaw): environmental temperature is 20 degrees, and soil water content is 10%;

[0072] The seventh freeze-thaw state (thaw): environmental temperature is 20 degrees, and soil water content is 15%.

[0073] Next, set the freezing and thawing time to 12 hours each time to ensure that the soil samples are completely frozen and thawed. Obtain the Vis-NIR spectral reflectance data during the freeze-thaw process of the soil samples when the soil samples are in an ideal state and when the soil samples are in various freeze-thaw states (spectral reflectance curve samples obtained using an SVC-HR1024 spectrometer in a darkroom environment).

[0074] After obtaining the Vis-NIR spectral reflectance data (spectral reflectance curve samples) for the frozen and melted states of the soil under different moisture conditions (soil water content), 10 spectral reflectance data (spectral reflectance curve samples) are repeatedly obtained for each soil sample treatment, and the average is taken as the final spectral reflectance data (spectral reflectance curve samples) at this angle to ensure the reliability of the results.

[0075] For the processing of freeze-thaw soil spectral data, each soil spectral reflectance data set can be smoothed and denoised based on the Savizky-Golay filtering method, with the window length set to 11 and the polynomial order set to 2.

[0076] In particular, to reduce noise, the spectral reflectance information in the range of 400 - 2500 nm can be retained, and to reduce processing time and avoid information redundancy in adjacent bands, the spectral interval can also be resampled to 10 nm.

[0077] Step 202: Select any one soil sample. For the selected soil sample in various freeze-thaw states, obtain the freeze-thaw spectral reflectance groups corresponding to the respective freeze-thaw spectral reflectance curve samples in each freeze-thaw state, and the ideal spectral reflectance corresponding to the ideal spectral reflectance curve sample when the selected soil sample is in an ideal state.

[0078] Step 203: For the selected soil sample, construct a spectral reflectance reduction and correction data group with the freeze-thaw spectral reflectance group corresponding to the band as the input and the ideal spectral reflectance corresponding to the band as the output.

[0079] Then, select any one soil sample and preprocess the freeze-thaw spectral reflectance curve samples and ideal spectral reflectance curve samples collected from the selected soil sample, including denoising, smoothing, correction, etc., to improve the data quality.

[0080] Then, based on the transfer function, obtain the freeze-thaw spectral reflectance group corresponding to the freeze-thaw spectral reflectance curve sample and the ideal spectral reflectance corresponding to the ideal spectral reflectance curve sample respectively. For example, for the first band, it is equivalent to , at this time, with the transfer function as the input-output structure, the obtained freeze-thaw spectral reflectance group and the ideal spectral reflectance can be expressed as , is the ideal spectral reflectance of the first band, is the first freeze-thaw spectral reflectance in the freeze-thaw spectral reflectance group corresponding to the first band. The foregoing formula also represents a set of spectral reflectance reduction and correction data groups.

[0081] More specifically, when obtaining the spectral reflectance reduction and correction data group, characteristic points of each sample, such as peaks, valleys, inflection points, etc., can be extracted from the preprocessed freeze-thaw spectral reflectance curve sample and the ideal spectral reflectance curve sample respectively. These characteristic points contain a large amount of information and can describe the shape and characteristics of the curve. The extraction of peaks and valleys can be achieved by comparing the reflectance values of adjacent points, and a threshold is set to distinguish true characteristic points from fluctuations caused by noise. An inflection point is a point where the slope of the spectral curve changes significantly and can be identified by calculating the first or second derivative. The extracted characteristic points are combined into a feature vector for subsequent classification or regression tasks. For this purpose, for each freeze-thaw state and ideal state, a corresponding spectral reflectance curve feature vector (including the freeze-thaw spectral reflectance curve feature vector and the ideal spectral reflectance curve feature vector) can be obtained, so that the feature vectors of the freeze-thaw spectral reflectance curves corresponding to the selected soil samples are used as the input of the spectral reflectance reduction and correction data group, and the feature vectors of the ideal spectral reflectance curves corresponding to the selected soil samples are used as the output of the spectral reflectance reduction and correction data group to train a random forest model.

[0082] Step 204, based on the spectral reflectance reduction and correction data groups of various soil samples, construct a spectral reflectance reduction and correction data set, and divide the spectral reflectance reduction and correction data set into a spectral reflectance reduction and correction training data set and a spectral reflectance reduction and correction test data set.

[0083] Step 205: Train the transfer function model based on the spectral reflectance reduction and correction training dataset until, when the transfer function model performs reduction and correction on the to-be-corrected freeze-thaw spectral reflectance group used as input in the spectral reflectance reduction and correction training dataset, calculating the first deviation between the corrected spectral reflectance curve obtained and the ideal spectral reflectance curve sample, and the second deviation between the freeze-thaw spectral reflectance curve sample corresponding to the to-be-corrected freeze-thaw spectral reflectance group and the ideal spectral reflectance curve sample, and determining that the transfer function model meets the training standard based on the first deviation and the second deviation. Among them, when the first deviation is less than the second deviation, the transfer function model meets the test standard. The first deviation and the second deviation are of the same type of deviation, and the deviation is calculated based on at least one of the mean squared deviation sum, spectral angle, and root mean square error.

[0084] Specifically, when training the transfer function model based on the spectral reflectance reduction and correction training dataset until the transfer function model meets the training standard based on the spectral reflectance reduction and correction test dataset, it is specifically to start training the transfer function model from the to-be-corrected freeze-thaw spectral reflectance group corresponding to the first band until the transfer function model of the last band is trained.

[0085] After obtaining the spectral reflectance reduction and correction data group corresponding to the selected soil sample, based on the spectral reflectance reduction and correction data groups of various soil samples, construct a spectral reflectance reduction and correction dataset, and divide it into a spectral reflectance reduction and correction training dataset (e.g., 70%) and a spectral reflectance reduction and correction test dataset (e.g., 30%), and train the transfer function model until it meets the training standard.

[0086] Specifically, when constructing the spectral reflectance reduction and correction data group, the extracted freeze-thaw spectral reflectance curve feature vectors can also be added with the corresponding ideal spectral reflectance curve feature vector labels, so as to use the feature vectors and labels to train the freeze-thaw soil spectral reflectance correction model. The transfer function model used to "predict" the corrected spectral reflectance in the freeze-thaw soil spectral reflectance correction model is implemented by a random forest model. Random forest regression is an algorithm based on ensemble learning. It performs regression tasks by constructing multiple decision trees and integrating their prediction results to improve the accuracy and stability of the model. In a random forest, each decision tree is independent and trained on a randomly selected subsample, which can effectively reduce the risk of overfitting. The random forest obtains the final regression result by averaging or weighted averaging the prediction results of multiple decision trees. The basic principle of random forest regression is as follows:

[0087] Randomly select samples: Randomly select a part of the samples from the original training set to form a sub-sample set. This can enable each decision tree to be trained on a different sample set, thereby increasing the diversity of the model.

[0088] Randomly select features: For each node of each decision tree, only consider a randomly selected part of the features when choosing the best splitting feature. This can prevent some features from having too much influence on the entire model, thereby improving the robustness of the model.

[0089] Construct decision trees: Use a certain decision tree algorithm (such as the CART algorithm) to construct a decision tree on each sub-sample set. During the growth process of the decision tree, usually recursively select the best splitting feature to divide the data set into subsets with the minimum impurity.

[0090] Integrated prediction: For new input samples, obtain the final regression result by averaging or weighted averaging the prediction results of multiple decision trees.

[0091] The advantages of random forests include: being able to handle high-dimensional data and large-scale data sets. Having good generalization performance and being able to effectively reduce the risk of overfitting. Being able to handle missing values and outliers. Having strong fitting ability for data with non-linear relationships.

[0092] The steps of random forest regression generally include the following main steps: Data preparation: First, a dataset for training and testing the model needs to be prepared. The dataset should contain features and corresponding target variables. Features are the attributes or characteristics used to predict the target variable, while the target variable is the value to be predicted by regression. Usually, the dataset needs to be divided into a training set and a test set, where the training set is used to train the model and the test set is used to evaluate the performance of the model. Building the random forest: For example, in the Scikit-learn library, the RandomForestRegressor class can be used to build a random forest regression model. Some parameters can be set to control the behavior of the random forest, such as the number of decision trees, the way of feature selection, the way of decision tree growth, etc. The parameters can be adjusted according to the actual problem and requirements. Training the model: Use the training set to train the random forest regression model. The model will build multiple decision trees based on the samples and target variable values in the training set, and perform feature selection and splitting on each tree. Predicting the results: Use the trained random forest regression model to predict the samples in the test set. The model will average or weight-average the prediction results of each decision tree to obtain the final regression prediction result. Model evaluation: Evaluate the performance of the model by comparing it with the true target variable. Various regression performance metrics can be used, such as Mean Squared Error (MSE), Mean Absolute Error (MAE), R-squared, etc. to evaluate the accuracy and generalization ability of the model. Model tuning: According to the results of model evaluation, the random forest regression model can be tuned. Parameters of the random forest can be tried to be adjusted, such as increasing or decreasing the number of decision trees, adjusting the way of feature selection, adjusting the way of decision tree growth, etc., so as to improve the performance of the model. Model application: After model evaluation and tuning, the trained random forest regression model can be used for actual prediction. New input samples can be input into the model to obtain the corresponding regression prediction results. In the specific training process of the above embodiments of the present application, the random forest will perform row sampling and column sampling on the input data to increase the diversity and generalization ability of the model. For each decision tree, it will be split based on the information in the feature vector until the stopping condition is met (such as reaching the maximum depth, the number of samples in the node is less than the threshold, etc.).

[0093] Finally, the test set can be used to evaluate the performance of the model and make adjustments and optimizations as needed. In the above embodiments of the present application, the mean squared deviation, spectral angle, and root mean square error can be selected for calculation to evaluate. In particular, the random forest model can also provide feature importance information to help understand which features have the greatest impact on the classification result, which is helpful for subsequent feature selection and model optimization.

[0094] Specifically, obtain the reduction and correction results. For example, in the transfer function model to be tested, the model will output the corresponding reduced and corrected spectral reflectance (corrected spectral reflectance curve) according to the input spectral reflectance data (spectral reflectance group to be corrected).

[0095] Next, calculate each evaluation index:

[0096] 1. Sum of squared mean deviations, that is, the sum of the squares of the differences between each data point and the mean value of the data set. That is, the sum of the squared deviations between the predicted value and the true value.

[0097] 2. Spectral angle, that is, the angle formed by two spectral vectors with the same wavelength range in the spectral space.

[0098] 3. Root mean square error (RMSE), that is, the root mean square of the difference between the predicted value and the true value.

[0099] When using the sum of squared mean deviations, spectral angle matching (SAM), and root mean square error (RMSE) to evaluate the similarity between the spectra before and after correction, the lower the value, the higher the performance of the constructed spectrum with the transfer function as the input-output structure.

[0100] In the above embodiments of the present application, regarding the sum of squared mean deviations (ASDS), spectral angle (SAM), and root mean square error (RMSE), when calculating the first deviation between the corrected spectral reflectance curve and the ideal spectral reflectance curve sample, it can be calculated by the following formula:

[0101] ;

[0102] ;

[0103] ;

[0104] Among them, n is the number of samples (total number of bands); is the ideal spectral reflectance of the band, is the corrected spectral reflectance of the band, is the value of the corrected spectral reflectance of this band; is the value of the ideal spectral reflectance of the band, is the ideal spectral reflectance vector of the band, is the corrected spectral reflectance vector of the band, is the modulus of the ideal spectral reflectance vector of the band, is the modulus of the corrected spectral reflectance vector for the band, and the second deviation between the freeze-thaw spectral reflectance curve sample and the ideal spectral reflectance curve sample is the same as above.

[0105] Therefore, the trained transfer function model outputs the corrected spectral reflectance by inputting the spectral reflectance group to be corrected. After the transfer function model is trained, the spectral reflectance curve to be corrected input, the corrected spectral reflectance curve output, and the ideal spectral reflectance curve sample for training comparison are as Figure 2 shown.

[0106] By applying the technical solution of this embodiment, by compensating for the spectral loss under different freeze-thaw states, the influence of the freeze-thaw process on the loss of spectral response band information can be effectively reduced, the best spectral reflectance information of the soil under different freeze-thaw states can be obtained, the universality and accuracy of the soil parameter estimation model can be improved, and further the accuracy and reliability of the subsequent soil parameter estimation model in the prediction of freeze-thaw soil can be improved.

[0107] Further, as a refinement and extension of the specific implementation manner of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another freeze-thaw soil spectral correction method is provided, as Figure 5 shown, and this method includes:

[0108] Step 301: Obtain the in-situ spectral reflectance curve of the freeze-thaw soil, where the in-situ spectral reflectance curve is composed of the in-situ spectral reflectances of multiple bands within a preset band range.

[0109] Step 302: Perform smoothing and denoising processing on the in-situ spectral reflectance curve based on the Savizky-Golay filtering method to obtain the spectral reflectance curve to be corrected.

[0110] In the above embodiment of the present application, the spectral reflectance curve of the freeze-thaw soil obtained is subjected to smoothing and denoising processing based on the Savizky-Golay filtering method to obtain the spectral reflectance curve to be corrected. The Savitzky-Golay smoothing method (i.e., the Savizky-Golay filtering method) smooths the data through polynomial fitting, can maintain the shape and high-frequency information of the data while smoothing, and can better maintain the characteristics of the spectral curve, but it is necessary to select appropriate window size and polynomial order. In the embodiment of the present application, the window length can be set to 11 and the polynomial order can be set to 2 to reduce the obvious difference between bands and improve the signal-to-noise ratio of the corrected spectrum.

[0111] Step 303: Based on the spectral reflectance curve to be corrected, determine the spectral reflectance group corresponding to each band.

[0112] Step 304: For any wavelength band, based on the freeze-thaw soil spectral reflectance correction model and the group of spectral reflectances to be corrected corresponding to the wavelength band, perform reduction correction on the spectral reflectance of the wavelength band to obtain the corrected spectral reflectance of the wavelength band.

[0113] Step 305: Based on the corrected spectral reflectance of each wavelength band and the formula for constructing the corrected spectral reflectance curve, obtain the corrected spectral reflectance curve, where the formula for constructing the corrected spectral reflectance curve is:

[0114] ,

[0115] is the corrected spectral reflectance curve, is the corrected spectral reflectance of the th wavelength band. The corrected spectral reflectance curve is composed of the corrected spectral reflectances of multiple wavelength bands within a preset wavelength band range. The freeze-thaw soil spectral reflectance correction model is obtained using a random forest model as the transfer function model, and the transfer function model is trained based on a pre-constructed spectral reflectance reduction correction training dataset.

[0116] Next, based on the spectral reflectance curve to be corrected, determine the group of spectral reflectances to be corrected corresponding to each wavelength band. For any wavelength band, based on the freeze-thaw soil spectral reflectance correction model and the group of spectral reflectances to be corrected corresponding to the wavelength band, perform reduction correction on the spectral reflectance of the wavelength band to obtain the corrected spectral reflectance corresponding to the wavelength band. Finally, use the formula for constructing the corrected spectral reflectance curve to obtain the corrected spectral reflectance curve.

[0117] By applying the technical solution of this embodiment, the influence of the freeze-thaw process on the loss of spectral response band information can be reduced, and the optimal spectral reflectance information of the soil under different freeze-thaw states can be obtained, so as to improve the universality and accuracy of the soil parameter estimation model in practical applications.

[0118] Further, as a Figure 1 specific implementation of the method, an embodiment of the present application provides a freeze-thaw soil spectral correction device, as Figure 6 shown. The device includes:

[0119] A spectral reflectance acquisition module 401, configured to acquire the in-situ spectral reflectance curve of the freeze-thaw soil, where the in-situ spectral reflectance curve is composed of the in-situ spectral reflectances of multiple wavelength bands within a preset wavelength band range;

[0120] A smoothing and denoising processing module 402, configured to perform smoothing and denoising processing on the in-situ spectral reflectance curve to obtain a spectral reflectance curve to be corrected;

[0121] The spectral reflectance grouping module 403 is configured to determine, based on the spectral reflectance curve to be corrected, the spectral reflectance groups corresponding to each band respectively;

[0122] The spectral reflectance reduction and correction module 404 is configured to perform reduction and correction on the spectral reflectance of the corresponding band of the spectral reflectance group to be corrected based on the freeze-thaw soil spectral reflectance correction model, so as to obtain a corrected spectral reflectance curve, where the corrected spectral reflectance curve is composed of the corrected spectral reflectances of multiple bands within a preset band range, and the freeze-thaw soil spectral reflectance correction model is obtained by using a random forest model as a transfer function model, and the transfer function model is trained based on a pre-constructed spectral reflectance reduction and correction training data set.

[0123] Optionally, the spectral reflectance group to be corrected includes a starting band spectral reflectance group to be corrected, an ending band spectral reflectance group to be corrected, and multiple intermediate band spectral reflectance groups to be corrected. The spectral reflectance grouping module 403 is further configured to:

[0124] Determine a spectral reflectance sequence to be corrected according to the spectral reflectances to be corrected of each band arranged in ascending order of band size in the spectral reflectance curve to be corrected;

[0125] Divide the first two spectral reflectances to be corrected in the spectral reflectance sequence to be corrected into the starting band spectral reflectance group to be corrected, and divide the last two spectral reflectances to be corrected into the ending band spectral reflectance group to be corrected, where, within the starting band spectral reflectance group to be corrected, the band where the spectral reflectance to be corrected at the starting position is located is the band corresponding to the starting band spectral reflectance group to be corrected, and within the ending band spectral reflectance group to be corrected, the band where the spectral reflectance to be corrected at the ending position is located is the band corresponding to the ending band spectral reflectance group to be corrected;

[0126] Starting from the first spectral reflectance to be corrected in the spectral reflectance sequence to be corrected, divide the spectral reflectance sequence to be corrected based on a sliding window with a preset window size, so as to obtain multiple intermediate band spectral reflectance groups to be corrected, where, within the intermediate band spectral reflectance group to be corrected, the band where the spectral reflectance to be corrected at the intermediate position is located is the band corresponding to the intermediate band spectral reflectance group to be corrected, the sliding step of the sliding window is 1, and the preset window size is an odd number other than 1 and less than a preset threshold for the total number of spectral reflectances within a group.

[0127] Optionally, the spectral reflectance reduction and correction module 404 is further configured to:

[0128] For any wavelength band, based on the freeze-thaw soil spectral reflectance correction model and the group of spectral reflectances to be corrected corresponding to the wavelength band, perform reduction correction on the spectral reflectance of the wavelength band to obtain the corrected spectral reflectance of the wavelength band;

[0129] Based on the corrected spectral reflectance and the formula for constructing the corrected spectral reflectance curve of each wavelength band, obtain the corrected spectral reflectance curve, where the formula for constructing the corrected spectral reflectance curve is:

[0130] ,

[0131] is the corrected spectral reflectance curve, is the corrected spectral reflectance of the

[0132] Optionally, the smoothing and denoising processing module 402 is further configured to:

[0133] Perform smoothing and denoising processing on the in-situ spectral reflectance curve based on the Savizky-Golay filtering method to obtain the spectral reflectance curve to be corrected.

[0134] Optionally, the smoothing and denoising processing module 402 is further configured to:

[0135] Perform smoothing and denoising processing on the spectral reflectance curve to be processed and corrected based on the Savizky-Golay filtering method to obtain the corrected spectral reflectance curve.

[0136] Furthermore, an embodiment of the present application provides another freeze-thaw soil spectral correction device, as Figure 7 shown, the device includes:

[0137] A spectral reflectance acquisition module 401, configured to acquire the in-situ spectral reflectance curve of freeze-thaw soil, where the in-situ spectral reflectance curve is composed of the in-situ spectral reflectances of multiple wavelength bands within a preset wavelength band range;

[0138] A smoothing and denoising processing module 402, configured to perform smoothing and denoising processing on the in-situ spectral reflectance curve to obtain the spectral reflectance curve to be corrected;

[0139] A spectral reflectance grouping module 403, configured to determine the group of spectral reflectances to be corrected corresponding to each wavelength band based on the spectral reflectance curve to be corrected;

[0140] The spectral reflectance reduction and correction module 404 is used to perform reduction and correction on the spectral reflectance of the corresponding bands of the to-be-corrected spectral reflectance group based on the freeze-thaw soil spectral reflectance correction model, so as to obtain a corrected spectral reflectance curve. Among them, the corrected spectral reflectance curve is composed of the corrected spectral reflectances of multiple bands within a preset band range. The freeze-thaw soil spectral reflectance correction model is obtained by using a random forest model as a transfer function model, and the transfer function model is trained based on a pre-constructed spectral reflectance reduction and correction training data set;

[0141] The correction model construction module 405 is used to construct a transfer function model with the to-be-corrected spectral reflectance group corresponding to the band as the input and the corrected spectral reflectance corresponding to the band as the output based on the random forest model, so as to obtain a freeze-thaw soil spectral reflectance correction model. Among them, the constructed freeze-thaw soil spectral reflectance correction model is implemented based on the random forest model, and the freeze-thaw soil spectral reflectance correction model is:

[0142] ,

[0143] is the corrected spectral reflectance of the th band, is the total number of bands within the preset band range, is the th transfer function model of the band, is the th to-be-corrected spectral reflectance in the to-be-corrected spectral reflectance group corresponding to the th band.

[0144] Optionally, the to-be-corrected spectral reflectance group includes a to-be-corrected starting band spectral reflectance group, a to-be-corrected ending band spectral reflectance group, and multiple to-be-corrected intermediate band spectral reflectance groups. The spectral reflectance grouping module 403 is further used for:

[0145] Determine a to-be-corrected spectral reflectance sequence according to the to-be-corrected spectral reflectances of each band arranged in ascending order of band size in the to-be-corrected spectral reflectance curve;

[0146] Divide the first two to-be-corrected spectral reflectances in the to-be-corrected spectral reflectance sequence into a to-be-corrected starting band spectral reflectance group, and divide the last two to-be-corrected spectral reflectances into a to-be-corrected ending band spectral reflectance group. Among them, within the to-be-corrected starting band spectral reflectance group, the band where the to-be-corrected spectral reflectance at the starting position is located is the band corresponding to the to-be-corrected starting band spectral reflectance group, and within the to-be-corrected ending band spectral reflectance group, the band where the to-be-corrected spectral reflectance at the ending position is located is the band corresponding to the to-be-corrected ending band spectral reflectance group;

[0147] Starting from the first spectral reflectance to be corrected in the sequence of spectral reflectances to be corrected, divide the sequence of spectral reflectances to be corrected based on a sliding window with a preset window size, obtaining multiple intermediate spectral reflectance groups to be corrected. Among them, within an intermediate spectral reflectance group to be corrected, the band where the spectral reflectance to be corrected located in the middle position is the band corresponding to the intermediate spectral reflectance group to be corrected. The sliding step of the sliding window is 1, and the preset window size is an odd number other than 1 and less than the threshold of the total number of spectral reflectances within a preset group limit.

[0148] Optionally, the correction model construction module 405 is further configured to:

[0149] Respectively obtain spectral reflectance curve samples of various soil samples under various preset environmental conditions. Among them, the preset environmental conditions include the environmental conditions when the soil sample is in an ideal state, and the environmental conditions when the soil sample is in various freeze-thaw states. Different preset environmental conditions are respectively based on different preset soil water contents and different preset environmental temperatures for environmental simulation. The spectral reflectance curve samples include freeze-thaw spectral reflectance curve samples and ideal spectral reflectance curve samples;

[0150] Select any one soil sample. For the selected soil sample in various freeze-thaw states, the freeze-thaw spectral reflectance curve samples respectively corresponding to various freeze-thaw states, and the ideal spectral reflectance curve sample corresponding to the selected soil sample in the ideal state, respectively obtain the freeze-thaw spectral reflectance groups corresponding to the freeze-thaw spectral reflectance curve samples and the ideal spectral reflectance corresponding to the ideal spectral reflectance curve sample based on the transfer function;

[0151] For the selected soil sample, construct a spectral reflectance reduction and correction data group with the freeze-thaw spectral reflectance group corresponding to the band as the input and the ideal spectral reflectance corresponding to the band as the output;

[0152] Based on the spectral reflectance reduction and correction data groups of various soil samples respectively, construct a spectral reflectance reduction and correction data set, and divide the spectral reflectance reduction and correction data set into a spectral reflectance reduction and correction training data set and a spectral reflectance reduction and correction test data set;

[0153] Train a random forest model based on the spectral reflectance reduction and correction training data set until the random forest model tested based on the spectral reflectance reduction and correction test data set meets the training standard. Among them, the trained random forest model outputs the corrected spectral reflectance corresponding to the spectral reflectance group to be corrected by inputting the spectral reflectance group to be corrected.

[0154] Optionally, the correction model construction module 405 is further configured to:

[0155] When obtaining the corrected spectral reflectance curve obtained by performing reduction and correction on the to-be-corrected freeze-thaw spectral reflectance group as the input in the spectral reflectance reduction and correction training dataset using the transfer function model, calculate the first deviation between the corrected spectral reflectance curve and the ideal spectral reflectance curve sample, and the second deviation between the freeze-thaw spectral reflectance curve sample corresponding to the to-be-corrected freeze-thaw spectral reflectance group and the ideal spectral reflectance curve sample, where the first deviation and the second deviation are of the same type of deviation, and the deviation is calculated based on at least one of the mean squared deviation sum, spectral angle, and root mean square error;

[0156] Judge whether the transfer function model meets the training standard based on the first deviation and the second deviation, where when the first deviation is less than the second deviation, the transfer function model meets the test standard.

[0157] Optionally, the spectral reflectance reduction and correction module 404 is further configured to:

[0158] For any wavelength band, based on the freeze-thaw soil spectral reflectance correction model and the to-be-corrected spectral reflectance group corresponding to the wavelength band, perform reduction and correction on the spectral reflectance of the wavelength band to obtain the corrected spectral reflectance of the wavelength band;

[0159] Based on the corrected spectral reflectance of each wavelength band and the formula for constructing the corrected spectral reflectance curve, obtain the corrected spectral reflectance curve, where the formula for constructing the corrected spectral reflectance curve is:

[0160] ,

[0161] is the corrected spectral reflectance curve, is the corrected spectral reflectance of the

[0162] Optionally, the smoothing and denoising processing module 402 is further configured to:

[0163] Perform smoothing and denoising processing on the in-situ spectral reflectance curve based on the Savizky-Golay filtering method to obtain the to-be-corrected spectral reflectance curve.

[0164] Optionally, the smoothing and denoising processing module 402 is further configured to:

[0165] Perform reduction and correction on the spectral reflectance of the wavelength band corresponding to the to-be-corrected spectral reflectance group based on the freeze-thaw soil spectral reflectance correction model to obtain the to-be-processed corrected spectral reflectance curve;

[0166] The Savizky-Golay filtering method is used to perform smoothing and denoising processing on the to-be-processed corrected spectral reflectance curve, and a corrected spectral reflectance curve is obtained.

[0167] It should be noted that for other corresponding descriptions of each functional unit involved in the freeze-thaw soil spectral correction device provided in the embodiments of the present application, reference can be made to Figure 1 、 Figures 3 to 5 the corresponding descriptions in the method, which will not be elaborated here.

[0168] Based on the above-mentioned method as Figure 1 、 Figures 3 to 5 shown, correspondingly, the embodiments of the present application also provide a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the freeze-thaw soil spectral correction method as Figure 1 、 Figures 3 to 5 shown is implemented.

[0169] Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various implementation scenarios of the present application.

[0170] Based on the above-mentioned method as Figure 1 、 Figures 3 to 5 shown, and Figure 6 、 Figure 7 shown in the virtual device embodiments, in order to achieve the above purpose, the embodiments of the present application also provide a computer device, which can specifically be a personal computer, a server, a network device, etc. The computer device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to implement the freeze-thaw soil spectral correction method as Figure 1 、 Figures 3 to 5 shown.

[0171] Optionally, the computer device may further include a user interface, a network interface, a camera, a radio frequency (RF) circuit, sensors, an audio circuit, a WI-FI module, etc. The user interface may include a display screen (Display), an input unit such as a keyboard (Keyboard), etc. Optionally, the user interface may further include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a Bluetooth interface, a WI-FI interface), etc.

[0172] Those skilled in the art can understand that the structure of a computer device provided in this embodiment does not limit the computer device, and it may include more or fewer components, or combine certain components, or have different component arrangements.

[0173] The storage medium may also include an operating system and a network communication module. The operating system is a program for managing and storing the hardware and software resources of the computer device, and supports the operation of information processing programs and other software and / or programs. The network communication module is used to implement communication between components inside the storage medium, as well as communication between other hardware and software in the entity device.

[0174] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform, or can also obtain the in-situ spectral reflectance curve of frozen-thawed soil through hardware, and determine the group of spectral reflectances to be corrected corresponding to each band; based on the frozen-thawed soil spectral reflectance correction model and the group of spectral reflectances to be corrected, restore and correct the spectral reflectances of each band within the preset band range to obtain the corrected spectral reflectance curve. The frozen-thawed soil spectral reflectance correction model is a transfer function model implemented based on a random forest model. Aiming at the problem of spectral information distortion caused by multi-factor changes during the freezing and thawing process of soil, the frozen-thawed soil spectral reflectance correction model can effectively correct the in-situ spectral reflectance curve of frozen-thawed soil, and thus improve the estimation accuracy of surface soil parameters in the freezing and thawing seasons.

[0175] Those skilled in the art can understand that the drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the drawings are not necessarily essential for implementing the present application. Those skilled in the art can understand that the modules in the device in the implementation scenario can be distributed in the device in the implementation scenario according to the description of the implementation scenario, or can be correspondingly changed and located in one or more devices different from the present implementation scenario. The modules in the above implementation scenario can be combined into one module, or further split into multiple sub-modules.

[0176] The above serial numbers of the present application are only for description and do not represent the advantages or disadvantages of the implementation scenarios. The above disclosure is only several specific implementation scenarios of the present application. However, the present application is not limited thereto, and any changes that can be made by those skilled in the art should fall within the protection scope of the present application.

Claims

1. A freeze-thaw soil spectrum correction method, characterized in that: The method comprises: Obtaining an in-situ spectral reflectance curve of the frozen-thawed soil, wherein the in-situ spectral reflectance curve is composed of in-situ spectral reflectances of multiple bands within a preset band range; Performing smoothing and denoising processing on the in-situ spectral reflectance curve to obtain a spectral reflectance curve to be corrected; Determine a sequence of spectral reflectances to be corrected according to the spectral reflectances to be corrected of each band arranged in order of band size in the spectral reflectance curve to be corrected; The first two spectral reflectances to be corrected in the spectral reflectance sequence to be corrected are divided into a spectral reflectance group of a starting band to be corrected, and the last two spectral reflectances to be corrected are divided into a spectral reflectance group of an ending band to be corrected, wherein, in the spectral reflectance group of the starting band to be corrected, the spectral reflectance to be corrected at the starting position is located in a band corresponding to the spectral reflectance group of the starting band to be corrected, and in the spectral reflectance group of the ending band to be corrected, the spectral reflectance to be corrected at the ending position is located in a band corresponding to the spectral reflectance group of the ending band to be corrected; Starting with the first spectral reflectance to be corrected in the spectral reflectance sequence to be corrected, the spectral reflectance sequence to be corrected is divided based on a sliding window of a preset window size to obtain a plurality of intermediate band spectral reflectance groups to be corrected, wherein, in the intermediate band spectral reflectance group to be corrected, the band where the spectral reflectance to be corrected at the middle position is located is the band corresponding to the intermediate band spectral reflectance group to be corrected, the sliding step of the sliding window is 1, the preset window size is an odd number other than 1 and is less than a limiting threshold value of the total number of spectral reflectances in the preset group, wherein the spectral reflectance group to be corrected includes a spectral reflectance group of a starting band to be corrected, a spectral reflectance group of an ending band to be corrected, and a plurality of intermediate band spectral reflectance groups to be corrected; Based on the freeze-thaw soil spectral reflectance correction model, the spectral reflectance of the corresponding band of the spectral reflectance group to be corrected is restored and corrected to obtain a corrected spectral reflectance curve, wherein the corrected spectral reflectance curve is composed of the corrected spectral reflectances of multiple bands within a preset band range, and the freeze-thaw soil spectral reflectance correction model is obtained by using a random forest model as a transfer function model, and the transfer function model is trained based on a pre-constructed spectral reflectance restoration correction training data set.

2. The method according to claim 1, characterized in that Before restoring and correcting the spectral reflectance of the corresponding band of the spectral reflectance group to be corrected based on the freeze-thaw soil spectral reflectance correction model to obtain a corrected spectral reflectance curve, the method includes: Based on the random forest model, a transfer function model is constructed with the spectral reflectance group to be corrected corresponding to the band as input and the corrected spectral reflectance corresponding to the band as output, and the freeze-thaw soil spectral reflectance correction model is obtained. Among them, the constructed freeze-thaw soil spectral reflectance correction model is implemented based on the random forest model. The freeze-thaw soil spectral reflectance correction model is: , For the The corrected spectral reflectance of each band is is the total number of bands within the preset band range, For the The transfer function model of the band, For the In the spectral reflectance group to be corrected corresponding to the band, The spectral reflectance to be corrected.

3. The method according to claim 2, characterized in that Train the transfer function model based on a pre-built spectral reflectance restoration correction training dataset, including: Respectively obtaining spectral reflectance curve samples of the various soil samples under various preset environmental conditions, wherein the preset environmental conditions include environmental conditions when the soil samples are in an ideal state, and environmental conditions when the soil samples are in various freeze-thaw states, and different preset environmental conditions are respectively based on different preset soil moisture contents and different preset environmental temperatures for environmental simulation, and the spectral reflectance curve samples include freeze-thaw spectral reflectance curve samples and ideal spectral reflectance curve samples; Select any soil sample, and for the freeze-thaw spectral reflectance curve samples corresponding to the various freeze-thaw states when the selected soil sample is in multiple freeze-thaw states, and the ideal spectral reflectance curve sample corresponding to the selected soil sample in an ideal state, respectively obtain the freeze-thaw spectral reflectance group corresponding to the freeze-thaw spectral reflectance curve sample, and the ideal spectral reflectance corresponding to the ideal spectral reflectance curve sample; For the selected soil samples, a spectral reflectance restoration correction data set is constructed with the freeze-thaw spectral reflectance group corresponding to the band as input and the ideal spectral reflectance corresponding to the band as output; Based on the spectral reflectance restoration correction data groups of various soil samples, a spectral reflectance restoration correction data set is constructed, and the spectral reflectance restoration correction data set is divided into a spectral reflectance restoration correction training data set and a spectral reflectance restoration correction test data set; The transfer function model is trained based on the spectral reflectance restoration and correction training data set until the transfer function model is tested based on the spectral reflectance restoration and correction test data set to meet the training standard, wherein the trained transfer function model inputs the spectral reflectance group to be corrected and outputs the corrected spectral reflectance corresponding to the spectral reflectance group to be corrected.

4. The method according to claim 3, characterized in that The testing that the transfer function model meets the training standard based on the spectral reflectance restoration correction test data set includes: Obtaining a corrected spectral reflectance curve obtained when the transfer function model performs restoration correction on the freeze-thaw spectral reflectance group to be corrected as input in the spectral reflectance restoration correction training data set, calculating a first deviation between the corrected spectral reflectance curve and a sample of an ideal spectral reflectance curve, and a second deviation between the freeze-thaw spectral reflectance curve corresponding to the freeze-thaw spectral reflectance group to be corrected and the sample of the ideal spectral reflectance curve, wherein the first deviation and the second deviation are the same deviations, and the deviations are calculated based on at least one of the mean square deviation sum, the spectral angle, and the root mean square error; It is determined whether the transfer function model meets the training standard based on the first deviation and the second deviation, wherein when the first deviation is smaller than the second deviation, the transfer function model meets the test standard.

5. The method according to claim 1, characterized in that The method of restoring and correcting the spectral reflectance of the corresponding band of the spectral reflectance group to be corrected based on the freeze-thaw soil spectral reflectance correction model to obtain a corrected spectral reflectance curve includes: For any band, based on the freeze-thaw soil spectral reflectance correction model and the spectral reflectance group to be corrected corresponding to the band, the spectral reflectance of the band is restored and corrected to obtain the corrected spectral reflectance of the band; Based on the corrected spectral reflectance of each band and the corrected spectral reflectance curve construction formula, the corrected spectral reflectance curve is obtained, wherein the corrected spectral reflectance curve construction formula is: , is the spectral reflectance curve after correction, For the Corrected spectral reflectance of each band.

6. The method according to any one of claims 1 to 5, characterized in that The step of performing smoothing and denoising on the in-situ spectral reflectance curve to obtain the spectral reflectance curve to be corrected includes: Based on the Savizky-Golay filtering method, the in-situ spectral reflectance curve is smoothed and denoised to obtain the spectral reflectance curve to be corrected; Accordingly, the freeze-thaw soil spectral reflectance correction model is used to restore and correct the spectral reflectance of the corresponding band of the spectral reflectance group to be corrected to obtain a corrected spectral reflectance curve, including: Based on the freeze-thaw soil spectral reflectance correction model, the spectral reflectance of the corresponding band of the spectral reflectance group to be corrected is restored and corrected to obtain a spectral reflectance curve after correction to be processed; The corrected spectral reflectance curve to be processed is smoothed and denoised based on the Savizky-Golay filtering method to obtain a corrected spectral reflectance curve.

7. A freeze-thaw soil spectrum correction device, characterized in that: The device comprises: A spectral reflectance acquisition module, used to acquire an in-situ spectral reflectance curve of the frozen-thawed soil, wherein the in-situ spectral reflectance curve is composed of in-situ spectral reflectances of multiple bands within a preset band range; A smoothing and denoising processing module is used to perform smoothing and denoising processing on the in-situ spectral reflectance curve to obtain a spectral reflectance curve to be corrected; The spectral reflectance grouping module is used to determine a spectral reflectance sequence to be corrected according to the spectral reflectance to be corrected of each band arranged in order of band size in the spectral reflectance curve to be corrected; the first two spectral reflectances to be corrected in the spectral reflectance sequence to be corrected are divided into a spectral reflectance group of a starting band to be corrected, and the last two spectral reflectances to be corrected are divided into a spectral reflectance group of an ending band to be corrected, wherein, in the spectral reflectance group of the starting band to be corrected, the band where the spectral reflectance to be corrected at the starting position is located is the band corresponding to the spectral reflectance group of the starting band to be corrected, and in the spectral reflectance group of the ending band to be corrected, the band where the spectral reflectance to be corrected at the ending position is located is the spectral reflectance group of the ending band to be corrected. The wavelength band corresponding to the wavelength reflectance group to be corrected; starting with the first wavelength reflectance to be corrected in the wavelength reflectance sequence to be corrected, dividing the wavelength reflectance sequence to be corrected based on a sliding window of a preset window size, to obtain a plurality of wavelength reflectance groups for intermediate wavelength bands to be corrected, wherein, in the wavelength reflectance group for intermediate wavelength bands to be corrected, the wavelength band where the wavelength reflectance to be corrected at the middle position is located is the wavelength band corresponding to the wavelength reflectance group for intermediate wavelength bands to be corrected, the sliding step of the sliding window is 1, the preset window size is an odd number other than 1 and is less than a limiting threshold value of the total number of wavelength reflectances in the preset group, wherein the wavelength reflectance group to be corrected includes a wavelength reflectance group for the starting wavelength band to be corrected, a wavelength reflectance group for the ending wavelength band to be corrected, and a plurality of wavelength reflectance groups for intermediate wavelength bands to be corrected; A spectral reflectance restoration and correction module is used to restore and correct the spectral reflectance of the corresponding band of the spectral reflectance group to be corrected based on the freeze-thaw soil spectral reflectance correction model to obtain a corrected spectral reflectance curve, wherein the corrected spectral reflectance curve is composed of the corrected spectral reflectances of multiple bands within a preset band range, and the freeze-thaw soil spectral reflectance correction model is obtained by using a random forest model as a transfer function model, and the transfer function model is trained based on a pre-constructed spectral reflectance restoration and correction training data set.

8. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for freeze-thaw soil spectrum correction according to any one of claims 1 to 6 is implemented.

9. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method for freeze-thaw soil spectrum correction according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Method for monitoring soil organic carbon based on combination of FOD and optimal wave band

    CN116778228A

  • Target detection and classification method and system and storage medium

    CN117893793A