Freeze-thaw soil spectrum correction method and device, storage medium and computer equipment

By combining smooth denoising treatment and random forest model, a freeze-thaw soil spectral reflectivity correction model was constructed, which solved the impact of freeze-thaw soil spectral changes on the soil parameter estimation model, and improved the recognition accuracy and generalization ability of the model.

CN119862490AActive Publication Date: 2025-04-22NORTHEASTERN UNIV CHINA

Patent Information

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

AI Technical Summary

Technical Problem

The reflectivity spectrum of frozen-thaw soil changes during freeze-thawing, resulting in a decrease in the prediction accuracy of soil parameter estimation model, and it is difficult for the prior art to effectively correct this change.

Method used

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

Benefits of technology

The sensitivity of abnormal information of frozen and thawed soil spectral is improved, the limitations of traditional linear models are broken, the complex nonlinear relationship between frozen and thawed soil spectra and soil spectra under ideal conditions is identified, and the generalization ability of soil parameter estimation model is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119862490A_ABST
    Figure CN119862490A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of spectral analysis and the technical field of computers, and discloses a freeze-thaw soil spectrum correction method and device, a storage medium and computer equipment, and the method comprises the steps: obtaining an in-situ spectral reflectivity curve of freeze-thaw soil, and determining a to-be-corrected spectral reflectivity group corresponding to each wave band; based on a frozen-thawed soil spectral reflectivity correction model and the spectral reflectivity group to be corrected, the spectral reflectivity of each wave band in a preset wave band range is restored and corrected, a corrected spectral reflectivity curve is obtained, and the frozen-thawed soil spectral reflectivity correction model is a transfer function model realized based on a random forest model. Aiming at the problem of spectral information distortion caused by multi-factor change in the freezing and thawing process of the soil, the frozen and thawed soil spectral reflectivity correction model can effectively correct the in-situ spectral reflectivity curve of the frozen and thawed soil, so that the estimation precision of the surface soil parameters in the freezing and thawing season is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] China's permafrost area ranks third in the world, of which seasonal frozen soil is mainly located north of 30°N, accounting for about 53.5% of the country's land area. The freezing and thawing process of soil is the most common soil state change of seasonal frozen soil. Freeze-thaw is a physical texture effect and phenomenon of freezing and melting of soil layers due to temperature dropping below 0℃ and rising above 0℃. It is a repeated freezing-thawing soil process formed at a certain depth below the surface of frozen soil due to seasonal or diurnal heat changes. As a natural phenomenon, it is common in high-latitude, high-altitude areas and most mid-latitude areas.

[0003] In recent years, Visible and Near Infra-red (Vis-NIR) technology has been widely used in the investigation and monitoring of soil property content due to its advantages of low cost, easy collection, rapidity and non-destructiveness. The Vis-NIR spectral characteristics of soil are a comprehensive reflection of its intrinsic physical and chemical properties, and are closely related to the particle size distribution and organic matter content of the soil. Freeze-thaw, as a complex physical process, will have a significant impact on the physical and chemical properties, structure and texture of the soil, causing the reflectance spectrum of the soil to change during the freeze-thaw process. This change will interfere with the prediction accuracy of the soil parameter estimation model constructed under ideal laboratory conditions. Summary of the invention

[0004] In view of this, the present application provides a freeze-thaw soil spectrum correction method and device, storage medium, and computer equipment. Based on the reflectance spectral data of the soil during the freeze-thaw process and in its ideal state (normal temperature and drying), the spectrum is constructed band by band through a moving window to correct the soil spectrum under different freeze-thaw states, thereby improving the sensitivity of conventional methods in capturing soil spectral abnormal information through a global or fixed window, and constructing a freeze-thaw soil spectral reflectance correction model with a transfer function as an input and output structure through a machine learning algorithm (random forest model), breaking through the limitations of traditional linear models, and in the process of identifying the complex nonlinear relationship between the freeze-thaw soil spectrum under the influence of multiple factors and the soil spectrum under the ideal state, the recognition accuracy is improved, and the ideal state (i.e., corrected) spectrum of the soil under various freeze-thaw conditions can be generated, thereby effectively reducing the impact of the freeze-thaw process on the information loss of the spectral response band, thereby 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 freeze-thaw soil spectrum correction method is provided, the method comprising: 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; Based on the spectral reflectance curve to be corrected, determining the spectral reflectance groups to be corrected corresponding to each band; 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.

[0006] According to another aspect of the present application, a freeze-thaw soil spectrum correction device is provided, the device comprising: 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; A spectral reflectance grouping module, used for determining the spectral reflectance groups to be corrected corresponding to each band based on the spectral reflectance curve to be corrected; The spectral reflectance restoration and correction module restores and corrects 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.

[0007] 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 spectrum correction method is implemented.

[0008] According to 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 executable on the processor, wherein the processor implements the above-mentioned freeze-thaw soil spectrum correction method when executing the program.

[0009] Through the above technical solution, the present application provides a method and device for spectral correction of frozen-thawed soil, a storage medium, and a computer device, which obtains the in-situ spectral reflectance curve of the frozen-thawed soil, performs smoothing and denoising to obtain the spectral reflectance curve to be corrected, and determines the spectral reflectance group to be corrected corresponding to each band; based on the spectral reflectance correction model of frozen-thawed soil and the spectral reflectance group to be corrected, the spectral reflectance of each band within the preset band range is restored and corrected to obtain the corrected spectral reflectance curve, and the spectral reflectance correction model of frozen-thawed soil is a transfer function model implemented based on the random forest model. In view of the problem of spectral information distortion caused by multi-factor changes in soil during the freeze-thaw process, the estimation accuracy of surface soil parameters in the freeze-thaw season can be improved based on the machine learning algorithm (random forest model) combined with the transfer function.

[0010] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 A schematic flow chart of a freeze-thaw soil spectrum correction method provided in an embodiment of the present application is shown; Figure 2 A schematic diagram of spectral reflectance provided in an embodiment of the present application is shown; Figure 3 A schematic diagram of a process of a spectral reflectance grouping method provided in an embodiment of the present application is shown; Figure 4 A schematic flow chart of another freeze-thaw soil spectrum correction method provided in an embodiment of the present application is shown; Figure 5 A schematic flow chart of another freeze-thaw soil spectrum correction method provided in an embodiment of the present application is shown; Figure 6 A schematic structural diagram of a freeze-thaw soil spectrum correction device provided in an embodiment of the present application is shown; Figure 7A schematic structural diagram of another freeze-thaw soil spectrum correction device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

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

[0013] In this embodiment, a freeze-thaw soil spectrum correction method is provided. Figure 1 As shown, the method includes: Step 101: 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.

[0014] Step 102: Smoothing and denoising the in-situ spectral reflectance curve to obtain a spectral reflectance curve to be corrected.

[0015] In the above embodiment of the present application, the SVC-HR1024 spectrometer can be used to obtain the in-situ spectral reflectance curve of the frozen-thawed soil. The in-situ spectral reflectance curve is composed of the in-situ spectral reflectances of multiple bands within a preset band range. The in-situ spectral reflectance curve is smoothed and denoised to obtain a spectral reflectance curve to be corrected, such as Figure 2 As shown, the preset band range is, for example, 400 to 2500 nm. At the same time, within the preset band range, each 10 nm can be determined as a band. For example, if the band in the acquired in-situ spectral reflectance curve is every 3 or 4 nm, the band can be changed to one every 10 nm through resampling operation. Specifically, it can be achieved through specific data processing software or programming tools. These tools allow users to define new wavelength intervals (i.e., 10 nm) and resample the in-situ spectral reflectance curve accordingly, so that in the resampled in-situ spectral reflectance curve, the band is one 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 result in the loss of spectral information, especially in areas where the spectral characteristics change rapidly. Therefore, when resampling, the impact on the integrity and accuracy of the spectral information can be carefully evaluated.

[0016] When the in-situ spectral reflectance curve is smoothed and denoised to obtain the spectral reflectance curve to be corrected, for example, a moving average method, a Fourier transform smoothing method, a wavelet denoising method, a Percentile Filter smoothing method and a derivative spectroscopy technique may be used, for example: For the moving average method: the average value of a certain band range before and after the test point on the in-situ spectral reflectance curve is selected as the value of the point. It is simple to implement and has a fast calculation speed, but it may cause loss of detail information in some bands.

[0017] For the Fourier transform smoothing method: the spectral data (in-situ spectral reflectance curve) is converted to the frequency domain, the high-frequency noise is removed by a filter, and then converted back to the spatial domain. It is suitable for removing periodic noise, but may introduce artifacts such as the Gibbs phenomenon.

[0018] For wavelet denoising: use wavelet transform to decompose 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 the computational complexity is high, and it is necessary to select a suitable wavelet basis and threshold.

[0019] Percentile Filter smoothing method: The smoothing value is determined based on the percentage of data points in the specified window, such as the median or the specified percentile. It is not sensitive to outliers, and the smoothing effect may not be as precise as other methods.

[0020] For derivative spectroscopy techniques: Although not a direct smoothing method, derivative spectroscopy techniques (such as first-order derivative, second-order derivative) can help eliminate the impact of low-frequency noise on the target spectrum and highlight the spectral features.

[0021] 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, it is necessary to combine multiple methods for comprehensive processing to achieve the best smoothing and denoising effect. In addition, professional spectral processing software or programming tools can also be used to implement these smoothing and denoising algorithms.

[0022] In particular, the smoothing and denoising process is an iterative and adjustment process, so it is necessary to continuously optimize the parameters and methods according to the processing results to obtain the spectral reflectance curve to be corrected that meets the requirements.

[0023] Step 103: Determine the spectral reflectance groups to be corrected corresponding to the respective wavebands based on the spectral reflectance curve to be corrected.

[0024] Next, based on the spectral reflectance curve to be corrected, the spectral reflectance groups to be corrected corresponding to each band are determined, so that the reflectance of the corrected spectral curves of different bands can be restored and corrected according to different spectral reflectance groups to be corrected.

[0025] Optionally, 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 spectral reflectance groups of intermediate bands to be corrected. Step 103 determines the spectral reflectance group to be corrected corresponding to each band based on the spectral reflectance curve to be corrected, referring to Figure 3 As shown, specifically including: Step 1031 : determining 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.

[0026] Step 1032, divide the first two spectral reflectances to be corrected in the spectral reflectance sequence to be corrected into a spectral reflectance group of a starting band to be corrected, and divide the last two spectral reflectances to be corrected into a spectral reflectance group of an ending band to be corrected, wherein, within 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 within 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.

[0027] Step 1033, starting with the first spectral reflectance to be corrected in the spectral reflectance sequence to be corrected, dividing the spectral reflectance sequence to be corrected based on a sliding window of a preset window size to obtain a plurality of intermediate-band spectral reflectance groups to be corrected, wherein, within 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 size of the sliding window is 1, and the preset window size is an odd number other than 1 and is less than a threshold value limiting the total number of spectral reflectances in the preset group.

[0028] 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 input and the spectral reflectance after correction corresponding to the band as output, and obtain a freeze-thaw soil spectral reflectance correction model, wherein 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: , 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.

[0029] In the above-mentioned embodiment of the present application, a sequence of spectral reflectances to be corrected is determined 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. Next, the first two spectral reflectances to be corrected in the sequence of spectral reflectances 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.

[0030] Next, starting with the first spectral reflectance to be corrected in the spectral reflectance sequence to be corrected, each spectral reflectance 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, the preset window size is an odd number and is less than a total spectral reflectance limit threshold in the preset group, the total spectral reflectance limit threshold in 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 the division operation is performed based on the sliding window, the sliding step size of the sliding window is 1, and the window size used in the same restoration correction process is uniform. Specifically, for example, the spectral reflectance sequence to be corrected is: {1, 2, 3, 4, 5, 6}, then the spectral reflectance group of the starting band to be corrected is {1, 2}, the spectral reflectance group of the ending band to be corrected is {5, 6}, and the spectral reflectance groups of the intermediate bands to be corrected are {1, 2, 3}, {2, 3, 4}, {3, 4, 5}, {4, 5, 6} respectively. Accordingly, the band corresponding to the spectral reflectance group of the starting band to be corrected {1, 2} is the band where 1 is located, the band corresponding to the spectral reflectance group of the ending band to be corrected {5, 6} is the band where 6 is located, and the bands corresponding to the spectral reflectance groups of the intermediate bands to be corrected {1, 2, 3}, {2, 3, 4}, {3, 4, 5}, {4, 5, 6} are the bands where 2, 3, 4 and 5 are located respectively.

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

[0032] Step 104, 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.

[0033] Next, based on the freeze-thaw soil spectral reflectance correction model and the spectral reflectance group to be corrected, the spectral reflectance of each band within the preset band range is restored and corrected to obtain the corrected spectral reflectance curve.

[0034] Optionally, step 104 performs restoration 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 to obtain a corrected spectral reflectance curve, specifically including: Step 1041, 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.

[0035] Step 1042: Smoothing and denoising the corrected spectral reflectance curve to be processed based on the Savizky-Golay filtering method to obtain a corrected spectral reflectance curve.

[0036] In the above-mentioned embodiment of the present application, before obtaining the corrected spectral reflectance curve, the SG method (Savizky-Golay filtering method) may be used to perform smoothing and denoising processing to obtain the final corrected spectral reflectance curve.

[0037] Optionally, for step 104, how to “train the transfer function model based on the pre-constructed spectral reflectance restoration correction training data set”, refer to Figure 4 , specifically including: Step 201, respectively obtain spectral reflectance curve samples of multiple soil samples under multiple 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 multiple 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.

[0038] In the above embodiments of the present application, specifically, when obtaining spectral reflectance curve samples of various soil samples under various preset environmental conditions, for example: Representative sample points were selected in high-latitude and alpine areas to collect 0-20 cm surface soil samples. The soil samples were dried, ground, sieved (≤2 mm), and placed in black sample boxes.

[0039] Next, a soil freeze-thaw simulation experiment was carried out, that is, the "black sample boxes" containing various soil samples were placed under different preset environmental conditions for static use. Different preset environmental conditions were based on different preset soil moisture contents and different preset ambient temperatures for environmental simulation. For example, based on local meteorological data, the freezing (-20°C) and thawing temperatures (20°C) in the natural environment can be simulated to set the ambient temperature, and different soil moisture contents can be adjusted. Then different preset environmental conditions are as follows: The environmental conditions that make the soil sample in an ideal state are: The ambient temperature is 20 degrees and the soil moisture content is 0%; The environmental conditions that caused the soil samples to be in various freeze-thaw states were: The first freeze-thaw state (frozen): ambient temperature -20 degrees, soil moisture content is 0%; The second freeze-thaw state (frozen): ambient temperature -20 degrees, soil moisture content is 5%; The third freeze-thaw state (frozen): ambient temperature -20 degrees, soil moisture content is 10%; The fourth freeze-thaw state (frozen): ambient temperature -20 degrees, soil moisture content is 15%; The fifth freeze-thaw state (thaw): the ambient temperature is 20 degrees and the soil moisture content is 5%; The sixth freeze-thaw state (thaw): the ambient temperature is 20 degrees and the soil moisture content is 10%; The seventh freeze-thaw state (thaw): the ambient temperature is 20 degrees and the soil moisture content is 15%.

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

[0041] After obtaining the Vis-NIR spectral reflectance data (spectral reflectance curve samples) of the soil freezing and melting states under different moisture conditions (soil moisture content), 10 spectral reflectance data (spectral reflectance curve samples) were repeatedly obtained for each soil sample processing, and the average was taken as the final spectral reflectance data (spectral reflectance curve sample) at that angle to ensure the reliability of the results.

[0042] For the freeze-thaw soil spectral data processing process, 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.

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

[0044] Step 202, select any soil sample, and for the selected soil sample in multiple freeze-thaw states, obtain freeze-thaw spectral reflectance curve samples corresponding to each freeze-thaw state, and obtain an ideal spectral reflectance curve sample corresponding to the selected soil sample in an ideal state, respectively. Obtain a freeze-thaw spectral reflectance group corresponding to the freeze-thaw spectral reflectance curve sample, and an ideal spectral reflectance corresponding to the ideal spectral reflectance curve sample.

[0045] Step 203, for the selected soil sample, construct a spectral reflectance restoration correction data set that takes the freeze-thaw spectral reflectance group corresponding to the band as input and takes the ideal spectral reflectance corresponding to the band as output.

[0046] Next, any soil sample is selected, and the freeze-thaw spectral reflectance curve samples and ideal spectral reflectance curve samples collected from the selected soil sample are preprocessed, including denoising, smoothing, correction, etc., to improve data quality.

[0047] Next, based on the transfer function, 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 are obtained respectively. For example, for the first band, it is equivalent to At this time, with the transfer function as the input and 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 above formula also represents a set of spectral reflectance restoration correction data group.

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

[0049] Step 204: construct a spectral reflectance restoration correction data set based on the spectral reflectance restoration correction data sets of various soil samples, and divide the spectral reflectance restoration correction data set into a spectral reflectance restoration correction training data set and a spectral reflectance restoration correction test data set.

[0050] Step 205, training the transfer function model based on the spectral reflectance restoration and correction training data set until obtaining the 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 and correction training data set, calculating 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 freeze-thaw spectral reflectance group to be corrected and the ideal spectral reflectance curve sample, and judging whether the transfer function model meets the training standard based on the first deviation and the second deviation, wherein 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 the same deviation, and the deviation is calculated based on at least one of the mean square deviation sum, the spectral angle and the root mean square error.

[0051] In particular, 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 and meets the training criteria. Specifically, the transfer function model is trained starting from the freeze-thaw spectral reflectance group to be corrected corresponding to the first band until the transfer function model of the last band is trained.

[0052] After obtaining the spectral reflectance restoration correction data group corresponding to the selected soil sample, a spectral reflectance restoration correction data set is constructed based on the spectral reflectance restoration correction data groups of various soil samples, and divided into a spectral reflectance restoration correction training data set (e.g., 70%) and a spectral reflectance restoration correction test data set (e.g., 30%), and the transfer function model is trained until it meets the training criteria.

[0053] Specifically, when constructing a spectral reflectance restoration correction data set, the extracted freeze-thaw spectral reflectance curve feature vectors can also be added with the corresponding ideal spectral reflectance curve feature vector labels, so that the feature vectors and labels can be used 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 through 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 randomly selected subsamples, which can effectively reduce the risk of overfitting. Random forests obtain the final regression result by averaging or weighted averaging the prediction results of multiple decision trees. The basic principles of random forest regression are as follows: Randomly select samples: Randomly select a part of the samples from the original training set to form a sub-sample set. This allows each decision tree to be trained on a different sample set, thereby increasing the diversity of the model.

[0054] Randomly select features: For each node of each decision tree, only a portion of the randomly selected features are considered when selecting the best splitting features. This can prevent certain features from having too much influence on the entire model, thereby improving the robustness of the model.

[0055] Construct a decision tree: Use a decision tree algorithm (such as the CART algorithm) on each sub-sample set to construct a decision tree. In the process of growing a decision tree, the best partitioning features are usually selected recursively to divide the data set into subsets with the least impurity.

[0056] Ensemble prediction: For new input samples, the prediction results of multiple decision trees are averaged or weighted averaged to obtain the final regression result.

[0057] The advantages of random forest include: it can handle high-dimensional data and large-scale data sets. It has good generalization performance and can effectively reduce the risk of overfitting. It can handle missing values ​​and outliers. It has strong fitting ability for data with nonlinear relationships.

[0058] The steps of random forest regression usually include the following main steps: Data preparation: First, you need to prepare a dataset for training and testing the model. The dataset should contain features and corresponding target variables. Features are attributes or characteristics used to predict the target variable, while the target variable is the value that needs 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. Build a random forest: For example, in the Scikit-learn library, you can use the RandomForestRegressor class to build a random forest regression model. You can set some parameters to control the behavior of the random forest, such as the number of decision trees, the way of feature selection, the way decision trees grow, etc. Parameters can be adjusted according to actual problems and needs. Train the model: Use the training set to train the random forest regression model. The model will build multiple decision trees based on the samples in the training set and the values ​​of the target variable, and perform feature selection and partitioning on each tree. Prediction results: Use the trained random forest regression model to predict the samples in the test set. The model will average or weighted 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 indicators, such as mean squared error (MSE), mean absolute error (MAE), coefficient of determination (R-squared), etc., can be used to evaluate the accuracy and generalization ability of the model. Model tuning: According to the results of the model evaluation, the random forest regression model can be tuned. You can try to adjust the parameters of the random forest, such as increasing or decreasing the number of decision trees, adjusting the way of feature selection, adjusting the growth method of the decision tree, 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 corresponding regression prediction results. In the specific training process of the above embodiment 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.).

[0059] Finally, the test set can be used to evaluate the performance of the model and to adjust and optimize as needed. In the above embodiment of the present application, the mean squared deviation, spectral angle and root mean square error can be selected for evaluation. In particular, the random forest model can also provide feature importance information to help understand which features have the greatest impact on the classification results, which helps with subsequent feature selection and model optimization.

[0060] Specifically, the restoration correction result is obtained. For example, in the transfer function model to be tested, the model will output the corresponding restored corrected spectral reflectance (corrected spectral reflectance curve) according to the input spectral reflectance data (spectral reflectance group to be corrected).

[0061] Next, calculate the evaluation indicators: 1. The sum of squared mean deviations, which is the sum of the squares of the differences between each data point and the mean of the data set. It is also the sum of squared deviations between the predicted value and the true value.

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

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

[0064] When the mean sum of squared deviations, spectral angle matching (SAM), and root mean square error (RMSE) were used 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 input and output structure.

[0065] In the above embodiment of the present application, regarding the average sum of squared 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, the following formula can be used for calculation: ; ; ; Where n is the number of samples (total number of bands); For the The ideal spectral reflectance of the band, For the The corrected spectral reflectance of the band, For this The corrected spectral reflectance value of the band; For the The ideal spectral reflectance value of the band, For the The ideal spectral reflectance vector of the band, For the The corrected spectral reflectance vector of the band, For the The magnitude of the ideal spectral reflectance vector of the band, For the The modulus of the corrected spectral reflectance vector of the band and the second deviation between the freeze-thaw spectral reflectance curve sample and the ideal spectral reflectance curve sample are the same as above.

[0066] To this end, the trained transfer function model inputs the spectral reflectance group to be corrected and outputs the corrected spectral reflectance. After the transfer function model is trained, the input spectral reflectance curve to be corrected, the output corrected spectral reflectance curve, and the ideal spectral reflectance curve sample for training comparison are as follows: Figure 2 shown.

[0067] By applying the technical solution of this embodiment and 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 optimal spectral reflectance information of the soil under different freeze-thaw states can be obtained, and the universality and accuracy of the soil parameter estimation model can be improved, thereby improving the accuracy and reliability of the subsequent soil parameter estimation model in freeze-thaw soil prediction.

[0068] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another freeze-thaw soil spectrum correction method is provided, such as Figure 5 As shown, the method includes: Step 301: 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.

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

[0070] In the above embodiment of the present application, the spectral reflectance curve of the frozen-thawed soil obtained is smoothed and denoised based on the Savitzky-Golay filtering method to obtain the spectral reflectance curve to be corrected. The Savitzky-Golay smoothing method (also known as the Savitzky-Golay filtering method) smoothes the data by polynomial fitting, which 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 a suitable 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 differences between the bands and improve the signal-to-noise ratio of the corrected spectrum.

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

[0072] Step 304 , 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, restore and correct the spectral reflectance of the band to obtain the corrected spectral reflectance of the band.

[0073] Step 305, based on the corrected spectral reflectance of each band and the corrected spectral reflectance curve construction formula, a corrected spectral reflectance curve is obtained, wherein the corrected spectral reflectance curve construction formula is: , is the spectral reflectance curve after correction, For the The corrected spectral reflectance of a band is obtained, and 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 restoration correction training data set.

[0074] Next, based on the spectral reflectance curve to be corrected, the spectral reflectance group to be corrected corresponding to each band is determined. 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 corresponding to the band. Finally, the corrected spectral reflectance curve is used to construct a formula to obtain the corrected spectral reflectance curve.

[0075] By applying the technical solution of this embodiment, the impact 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.

[0076] Further, as Figure 1 The specific implementation of the method, the embodiment of the present application provides a freeze-thaw soil spectrum correction device, such as Figure 6 As shown, the device comprises: The spectral reflectance acquisition module 401 is 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 402 is used to perform a smoothing and denoising process on the in-situ spectral reflectance curve to obtain a spectral reflectance curve to be corrected; The spectral reflectance grouping module 403 is used to determine the spectral reflectance groups to be corrected corresponding to each band based on the spectral reflectance curve to be corrected; The spectral reflectance restoration and correction module 404 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.

[0077] Optionally, 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 spectral reflectance groups of intermediate bands to be corrected. The spectral reflectance grouping module 403 is further used to: 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, within 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, and 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.

[0078] Optionally, the spectral reflectance restoration correction module 404 is further used to: 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.

[0079] Optionally, the smoothing and denoising processing module 402 is further used to: The in-situ spectral reflectance curve is smoothed and denoised based on the Savizky-Golay filtering method to obtain the spectral reflectance curve to be corrected.

[0080] Optionally, the smoothing and denoising processing module 402 is further used to: Based on the Savizky-Golay filtering method, the corrected spectral reflectance curve to be processed is smoothed and denoised to obtain a corrected spectral reflectance curve.

[0081] Furthermore, the present application provides another freeze-thaw soil spectrum correction device, such as Figure 7 As shown, the device comprises: The spectral reflectance acquisition module 401 is 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 402 is used to perform a smoothing and denoising process on the in-situ spectral reflectance curve to obtain a spectral reflectance curve to be corrected; The spectral reflectance grouping module 403 is used to determine the spectral reflectance groups to be corrected corresponding to each band based on the spectral reflectance curve to be corrected; The spectral reflectance restoration correction module 404 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 correction training data set; The correction model construction module 405 is used to construct a transfer function model based on the random forest model, taking the spectral reflectance group to be corrected corresponding to the band as input and taking the corrected spectral reflectance corresponding to the band as output, so as to obtain the freeze-thaw soil spectral reflectance correction model, wherein 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: , 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.

[0082] Optionally, 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 spectral reflectance groups of intermediate bands to be corrected. The spectral reflectance grouping module 403 is further used to: 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, within 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, and 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.

[0083] Optionally, the correction model building module 405 is further used to: 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, 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 based on the transfer function; 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; A random forest model is trained based on the spectral reflectance restoration and correction training data set until the random forest model is tested based on the spectral reflectance restoration and correction test data set to meet the training standard, wherein the trained random forest model inputs the spectral reflectance group to be corrected and outputs the corrected spectral reflectance corresponding to the spectral reflectance group to be corrected.

[0084] Optionally, the correction model building module 405 is further used to: 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 an ideal spectral reflectance curve sample, and a second deviation between the freeze-thaw spectral reflectance curve sample corresponding to the freeze-thaw spectral reflectance group to be corrected and the ideal spectral reflectance curve sample, 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.

[0085] Optionally, the spectral reflectance restoration correction module 404 is further used to: 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.

[0086] Optionally, the smoothing and denoising processing module 402 is further used to: The in-situ spectral reflectance curve is smoothed and denoised based on the Savizky-Golay filtering method to obtain the spectral reflectance curve to be corrected.

[0087] Optionally, the smoothing and denoising processing module 402 is further used to: 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.

[0088] It should be noted that for other corresponding descriptions of the functional units involved in the freeze-thaw soil spectrum correction device provided in the embodiment of the present application, reference can be made to Figure 1 , Figures 3 to 5 The corresponding description in the method will not be repeated here.

[0089] Based on the above Figure 1 , Figures 3 to 5 The method shown in the embodiment of the present application accordingly provides a storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned Figure 1 , Figures 3 to 5 The freeze-thaw soil spectral correction method is shown.

[0090] Based on this 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 a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.

[0091] Based on the above Figure 1 , Figures 3 to 5 The method shown, and Figure 6 , Figure 7In order to achieve the above-mentioned purpose, the embodiment of the present application further provides a computer device, which can 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 achieve the above-mentioned Figure 1 , Figures 3 to 5 The freeze-thaw soil spectral correction method is shown.

[0092] Optionally, the computer device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also 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.

[0093] Those skilled in the art will appreciate that the computer device structure provided in this embodiment does not limit the computer device, and may include more or fewer components, or a combination of certain components, or different component arrangements.

[0094] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages and saves 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 realize communication between the components inside the storage medium, and communication with other hardware and software in the physical device.

[0095] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware platforms, or by hardware to obtain the in-situ spectral reflectance curve of the frozen-thawed soil, and determine 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, the spectral reflectance of each band within the preset band range is restored and corrected to obtain the corrected spectral reflectance curve, and the freeze-thaw soil spectral reflectance correction model is a transfer function model implemented based on the random forest model. In view of the problem of spectral information distortion caused by multi-factor changes in soil during the freeze-thaw process, the freeze-thaw soil spectral reflectance correction model can effectively correct the in-situ spectral reflectance curve of the frozen-thawed soil, thereby improving the estimation accuracy of surface soil parameters during the freeze-thaw season.

[0096] Those skilled in the art will appreciate that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily necessary for implementing the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the description of the implementation scenario, or can be changed accordingly and located in one or more devices different from the present implementation scenario. The modules of the above-mentioned implementation scenario can be combined into one module, or can be further split into multiple submodules.

[0097] The above serial numbers of this application are only for description and do not represent the advantages and disadvantages of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of this application, but this application is not limited to them, and any changes that can be made by technicians in this field should fall within the scope of protection of this 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; Based on the spectral reflectance curve to be corrected, determining the spectral reflectance groups to be corrected corresponding to each band; 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 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 spectral reflectance groups of intermediate bands to be corrected. The spectral reflectance group to be corrected corresponding to each band is determined based on the spectral reflectance curve to be corrected, including: 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, within 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, and 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.

3. The method according to claim 2, 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.

4. The method according to claim 3, 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.

5. The method according to claim 4, 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.

6. 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.

7. The method according to any one of claims 1 to 6, 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.

8. 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; A spectral reflectance grouping module, used for determining the spectral reflectance groups to be corrected corresponding to each band based on the spectral reflectance curve 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.

9. 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 7 is implemented.

10. 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 7 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

  • Soil heavy metal estimation method, device and equipment based on multi-angle reflectivity

    CN118980668A

  • Soil organic matter content monitoring model training method and device based on hyperspectral data

    CN119167096A

Cited By

  • Unfrozen water content prediction method and system based on polarization spectrum, medium and terminal

    CN121994717A

  • Polarization spectrum-based unfrozen water content prediction method and system, medium and terminal

    CN121994717B

  • Lead-zinc grade prediction method based on LIBS (Laser-induced Breakdown Spectroscopy)

    CN122448825A