A method and apparatus for soil salinity inversion based on hybrid generative adversarial networks

By constructing high-quality synthetic spectral samples and conducting multiple adversarial training sessions based on a hybrid generative adversarial network for soil salinity inversion, the problems of low soil salinity prediction accuracy and weak model generalization ability in traditional remote sensing methods are solved, and high-precision soil salinity prediction and spatial distribution map generation are achieved.

CN121306302BActive Publication Date: 2026-05-26INNER MONGOLIA NORMAL UNIVERSITY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INNER MONGOLIA NORMAL UNIVERSITY
Filing Date
2025-09-23
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Traditional remote sensing methods have low prediction accuracy when estimating soil salinity at different depths under crop cover in agricultural areas. They are easily affected by factors such as soil moisture, vegetation cover, and soil texture. Furthermore, the number of synthetic spectral samples generated is insufficient, resulting in weak model generalization ability.

Method used

A soil salinity inversion method based on hybrid generative adversarial networks was adopted. Two-band and three-band systems were constructed through the optimal band selection algorithm. The hybrid generative adversarial network was combined with multiple adversarial trainings to generate high-quality and diverse synthetic spectral samples. Soil salinity was then predicted using random forest models and other regression models.

Benefits of technology

It improves the accuracy of soil salinity prediction and the generalization ability of the model, reduces interference from factors such as soil moisture, vegetation cover and soil texture, and generates high-quality spatial distribution maps of soil salinity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121306302B_ABST
    Figure CN121306302B_ABST
Patent Text Reader

Abstract

This invention discloses a method and apparatus for soil salinity inversion based on a hybrid generative adversarial network (GAN). The method includes: constructing dual-band and tri-band features for each soil sample, and calculating a second spectral index for each dual-band and a third spectral index for each tri-band; selecting dual-band features based on a first Pearson correlation coefficient and a preset threshold, and selecting tri-band features based on a second Pearson correlation coefficient and a preset threshold; training the hybrid GAN using single-band features, a first coordinate, and a first spectral index; and generating multiple first synthetic spectral samples and second coordinates based on the selected dual-band features, second spectral index, first coordinate, selected tri-band features, and third spectral index. This invention improves the quality, diversity, and quantity of the second synthetic spectral samples, solves the problem of weak generalization ability of the best-performing soil salinity prediction model, and improves the accuracy of soil salinity prediction by the best-performing model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of soil parameter inversion technology, and in particular to a method and apparatus for soil salinity inversion based on a hybrid generative adversarial network. Background Technology

[0002] Rapidly and accurately assessing soil salinity at different depths under crop cover in agricultural areas is of great significance for fully understanding soil salinity during crop growth, improving soil salinization, and increasing crop yield.

[0003] Traditional remote sensing methods typically use simple spectral indices (such as two-band spectral indices) to estimate salinity. These spectral indices are not specific enough and are easily affected by other factors such as soil moisture, vegetation cover, and soil texture, resulting in low prediction accuracy. Furthermore, the use of simple spectral indices in traditional remote sensing methods leads to insufficient second synthetic spectral samples, data redundancy, and weak model generalization ability, and they cannot generate high-quality, diverse second synthetic spectral samples. Summary of the Invention

[0004] The purpose of this invention is to provide a method and apparatus for soil salinity inversion based on hybrid generative adversarial networks, which improves the quality, diversity and quantity of second synthetic spectral samples, as well as the stability and effectiveness of training the feature hybrid generative adversarial network. It solves the problem of weak generalization ability of the best soil salinity prediction model and improves the soil salinity prediction accuracy of the best soil salinity prediction model.

[0005] This invention is implemented by the following technical solution: a soil salinity inversion method based on a hybrid generative adversarial network, comprising:

[0006] Step S1: Collect multiple soil samples from the salinized area and obtain multiple single bands, first coordinates, first spectral index and salinity index for each soil sample;

[0007] Step S2: Construct two-band and three-band arrays for each soil sample using the optimal band selection algorithm, and calculate the second spectral index for each two-band array and the third spectral index for each three-band array.

[0008] Step S3: Select two bands based on the second spectral index and the salinity index of the soil sample, and select three bands based on the third spectral index and the salinity index of the soil sample.

[0009] Step S4: Utilize a feature-mixing generative adversarial network (GAN) to generate a real spectral sample and a first confidence level based on the single band, first coordinate, and first spectral index. Generate a first synthetic spectral sample and a second coordinate based on the selected dual band, second spectral index, selected three band, third spectral index, first coordinate, and random vector. Output a first sub-confidence level based on the first synthetic spectral sample and the second coordinate. Optimize the difference between the first confidence level and the first sub-confidence level using an adversarial loss function, and generate a first difference signal. Optimize the first synthetic spectral sample and the second coordinate based on the first difference signal to generate a second sub-synthetic spectral sample and a third coordinate. Output a second sub-confidence level based on the second sub-synthetic spectral sample and the third coordinate. Optimize the difference between the first confidence level and the second sub-confidence level using an adversarial loss function, and generate a second difference signal. Optimize the second sub-synthetic spectrum and the third coordinate based on the second difference signal until n adversarial training iterations are performed, generating a second synthetic spectral sample, a fourth coordinate, and a second confidence level.

[0010] Step S5: Using a random forest model, predict the salt content value of the second synthetic spectral sample based on its dual-band, second spectral index, three-band, third spectral index, and second coordinates.

[0011] Step S6: Select a preset threshold from multiple first confidence levels, and obtain an optimal second synthetic spectrum sample based on the preset threshold and the second confidence level;

[0012] Step S7: Determine the real spectral sample corresponding to each preferred second synthetic spectral sample based on each first coordinate and fourth coordinate, and filter the preferred second synthetic spectral samples based on the spectral vector of the preferred second synthetic spectral sample and the spectral vector of the corresponding real spectral sample to obtain an enhanced spectral sample set;

[0013] Step S8: Use the enhanced spectral sample set and corresponding salinity values ​​to train and validate the partial least squares regression model, random forest regression model, support vector machine regression model, and backpropagation neural network regression model. Based on the evaluation indicators of the coefficient of determination, root mean square error, and mean absolute error, estimate the performance of the partial least squares regression model, random forest regression model, support vector machine regression model, and backpropagation neural network regression model, and determine the model with the best soil salinity prediction performance.

[0014] Step S9: Predict the salt content of the soil to be tested using the best-performing model for predicting soil salinity, and generate a spatial distribution map of soil salinity.

[0015] Furthermore, the feature-hybrid generative adversarial network includes a generator and a discriminator, and step S4 includes:

[0016] Step S40: Input the single band, first coordinate, and first spectral index of each soil sample into the generator. The generator generates multiple real spectral samples according to the generator feature mixing formula. Input the multiple real spectral samples into the discriminator. The discriminator generates the features of the real spectral samples according to the discriminator feature mixing formula. Output multiple first confidence scores based on the features of the real spectral samples.

[0017] Step S41: Input the selected dual-band, second spectral index, first coordinate, three-band, third spectral index and random noise vector into the generator. The generator generates multiple first synthetic spectral samples according to the generator feature mixing formula, and the generator generates the first coordinate offset according to the coordinate loss function.

[0018] Step S42: Utilize the coordinate loss function, generate a first coordinate offset based on the first coordinate, and generate a second coordinate based on the first coordinate and the first coordinate offset;

[0019] Step S43: Input the first synthesized spectral sample and the second coordinates into the discriminator. The discriminator generates features of the first synthesized spectral sample according to the discriminator feature mixing formula, and generates a first sub-confidence based on the features of the first synthesized spectral sample and the second coordinates. The discriminator optimizes the difference between the first confidence and the first sub-confidence using an adversarial loss function, and transmits the first difference signal to the generator. The generator optimizes the first synthesized spectral sample and the second coordinates according to the first difference signal, generates a second sub-synthetic spectral sample and a second coordinate sub-offset, and generates a third coordinate based on the second coordinate sub-offset and the second coordinate. The second sub-synthetic spectral sample and the third coordinate are transmitted to the discriminator. The discriminator generates features of the second sub-synthetic spectral sample according to the discriminator feature mixing formula, and generates a second sub-confidence based on the features of the second sub-synthetic spectral sample and the third coordinate. The discriminator optimizes the difference between the first confidence and the second sub-confidence using an adversarial loss function, and transmits the second difference signal to the generator. The generator optimizes the second sub-synthetic spectral sample and the third coordinate based on the second difference signal until n adversarial training cycles. The generator outputs the second synthetic spectral sample and the fourth coordinate, and the discriminator outputs the second confidence.

[0020] Furthermore, step S43 includes:

[0021] When the generator optimizes the first synthetic spectrum sample once based on the first difference signal, the discriminator optimizes the difference between the first confidence and the second sub-confidence m times using the adversarial loss function;

[0022] Where m is set to 5, and n is less than or equal to 2 and greater than or equal to 5.

[0023] Furthermore, step S6 includes:

[0024] When the second confidence level is greater than the preset threshold, the second synthetic spectrum sample corresponding to the second confidence level is retained; when the second confidence level is less than or equal to the preset threshold, the second synthetic spectrum sample corresponding to the second confidence level is removed.

[0025] Furthermore, step S7 includes:

[0026] Step S70: Determine the difference between the first coordinate and the fourth coordinate based on each first coordinate and the fourth coordinate, and determine the real spectral sample corresponding to each preferred second synthetic spectral sample based on the difference and the preset difference threshold.

[0027] Step S71: Determine the spectral angle based on the spectral vector of the preferred second synthetic spectral sample and the spectral vector of the real spectral sample that corresponds one-to-one with the synthetic spectral sample, and filter the preferred second synthetic spectral sample based on the spectral angle and the spectral angle threshold to obtain an enhanced spectral sample set.

[0028] Furthermore, step S70 includes:

[0029] If the difference is less than or equal to a preset difference threshold, then the preferred second synthetic spectrum sample is determined to correspond to the real spectrum sample; if the difference is greater than the preset difference threshold, then the preferred second synthetic spectrum sample is determined not to correspond to the real spectrum sample; when the spectral angle is greater than the spectral angle threshold, the preferred second synthetic spectrum sample corresponding to the spectral angle is removed; when the spectral angle is less than or equal to the spectral angle threshold, the second synthetic spectrum sample is retained.

[0030] Furthermore, step S2 includes:

[0031] Step S21: Create a preset array null matrix based on the number of single bands for each soil sample;

[0032] Step S22: Calculate possible wavelength combinations from a single band using a nested loop method;

[0033] Step S23: The calculated possible wavelength combination results will be normalized and placed into the array null matrix;

[0034] Step S24: Calculate the second spectral index of the two-band spectrum and the third spectral index of the three-band spectrum using the spectral index formula.

[0035] Furthermore, step S3 includes:

[0036] Step S30: Calculate the first Pearson correlation coefficient based on the second spectral index and the salinity index of the soil sample, and calculate the second Pearson correlation coefficient based on the third spectral index and the salinity index of the soil sample;

[0037] Step S31: Select two bands based on the first Pearson correlation coefficient and the preset coefficient threshold, and select three bands based on the second Pearson correlation coefficient and the preset coefficient threshold.

[0038] Furthermore, step S31 includes:

[0039] When the first Pearson correlation coefficient is greater than or equal to the preset coefficient threshold, the dual band corresponding to the first Pearson correlation coefficient is retained; when the first Pearson correlation coefficient is less than the preset coefficient threshold, the dual band corresponding to the first Pearson correlation coefficient is removed.

[0040] When the second Pearson correlation coefficient is greater than or equal to the preset coefficient threshold, the three bands corresponding to the second Pearson correlation coefficient are retained; when the second Pearson correlation coefficient is less than the preset coefficient threshold, the three bands corresponding to the second Pearson correlation coefficient are removed.

[0041] On the other hand, embodiments of the present invention disclose a soil salinity inversion method apparatus based on a hybrid generative adversarial network, comprising:

[0042] The module includes: acquisition module, band construction module, Pearson correlation coefficient calculation module, band screening module, second confidence level determination module, salinity content prediction module, second synthetic spectrum sample screening module, enhanced spectrum sample set determination module, salinity prediction optimal model determination module, and salinity spatial distribution generation module.

[0043] The acquisition module is used to collect multiple soil samples from salinized areas and acquire multiple single bands, first coordinates, first spectral index and salinity index for each soil sample;

[0044] The band construction module is used to acquire the single bands collected by the acquisition module, construct two-band and three-band samples for each soil sample using the optimal band selection algorithm, and calculate the second spectral index for each two-band sample and the third spectral index for each three-band sample.

[0045] The band selection module is used to obtain the second and third spectral indices calculated by the band construction module, and select two bands based on the second spectral index and the salinity index of the soil sample, and select three bands based on the third spectral index and the salinity index of the soil sample.

[0046] The second confidence level determination module is used to acquire the dual-band and tri-band samples selected by the band selection module, and uses a feature-mixing generative adversarial network to generate a real spectral sample and a first confidence level based on a single band, a first coordinate, and a first spectral index. It then generates a first synthetic spectral sample and a second coordinate based on the selected dual-band and tri-band samples, the second and third spectral indices calculated by the band construction module, the first coordinate, and a random vector. Based on the first synthetic spectral sample and the second coordinate, it outputs a first sub-confidence level. An adversarial loss function is used to optimize the difference between the first confidence level and the first sub-confidence level, generating a first difference signal. This first difference signal is then used to optimize the first synthetic spectral sample and the second coordinate, generating a second sub-synthetic spectral sample and a third coordinate. Based on the second sub-synthetic spectral sample and the third coordinate, it outputs a second sub-confidence level. The adversarial loss function is then used to optimize the difference between the first confidence level and the second sub-confidence level, generating a second difference signal. This second difference signal is then used to optimize the second sub-synthetic spectrum and the third coordinate, until n adversarial training iterations are performed, generating a second synthetic spectral sample, a fourth coordinate, and a second confidence level.

[0047] The salt content prediction module is used to obtain the second synthetic spectral sample generated by the second confidence determination module. It uses a random forest model and predicts the salt content value of the second synthetic spectral sample based on the dual-band, second spectral index, three-band, third spectral index and second coordinate of the second synthetic spectral sample generated by the second confidence determination module.

[0048] The second synthetic spectrum sample screening module is used to select a preset threshold from multiple first confidence levels generated by the second confidence level determination module, and to obtain a preferred second synthetic spectrum sample based on the preset threshold and the second confidence level generated by the second confidence level determination module.

[0049] The enhanced spectral sample set determination module is used to obtain the preferred second synthetic spectral samples from the second synthetic spectral sample screening module. Based on each first coordinate and fourth coordinate, it determines the real spectral sample corresponding to each preferred second synthetic spectral sample. Based on the spectral vector of the preferred second synthetic spectral sample and the spectral vector of the corresponding real spectral sample, it screens the preferred second synthetic spectral samples obtained by the second synthetic spectral sample screening module to obtain the enhanced spectral sample set.

[0050] The optimal model determination module for salinity prediction is used to obtain the enhanced spectral sample set obtained by the enhanced spectral sample set determination module. It uses the enhanced spectral sample set and the corresponding salinity content values ​​to train and validate the partial least squares regression model, random forest regression model, support vector machine regression model, and backpropagation neural network regression model. It also estimates the performance of the partial least squares regression model, random forest regression model, support vector machine regression model, and backpropagation neural network regression model based on the evaluation indicators of the coefficient of determination, root mean square error, and mean absolute error, and determines the optimal model for soil salinity prediction.

[0051] The salinity spatial distribution generation module is used to obtain the optimal model for salinity prediction. The optimal model for soil salinity prediction is obtained by the optimal model for soil salinity prediction, and the salinity content of the soil to be tested is predicted using the optimal model for soil salinity prediction, thereby generating a spatial distribution map of soil salinity.

[0052] The advantages of this invention are:

[0053] In this invention, an optimal band selection algorithm is used to construct dual-band and tri-band systems. The second spectral index corresponding to the dual-band system and the third spectral index corresponding to the tri-band system are calculated, increasing the data such as bands and spectral indices. Dual-band systems are selected based on the second spectral index and the salinity index of the soil sample, and tri-band systems are selected based on the third spectral index and the salinity index of the soil sample, reducing data redundancy. Simultaneously, a second synthetic spectral sample is generated through n adversarial training cycles using a feature-mixed generative adversarial network (GAN), improving the quality, diversity, and quantity of the second synthetic spectral sample, as well as the stability and effectiveness of the GAN training. Based on the first and second coordinates, a real spectral sample corresponding one-to-one with the second synthetic spectral sample is determined. The second synthetic spectral sample is then further selected based on the spectral vector of the second synthetic spectral sample and the spectral vector of its corresponding real spectral sample, resulting in an enhanced spectral sample set. This avoids interference from factors such as soil moisture, vegetation cover, and soil texture. The enhanced spectral sample set is used to train the optimal soil salinity prediction model, solving the problem of weak generalization ability of the optimal soil salinity prediction model and improving its accuracy in predicting soil salinity. Attached Figure Description

[0054] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0055] Figure 1This is a flowchart of a soil salinity inversion method based on a hybrid generative adversarial network provided in an embodiment of the present invention;

[0056] Figure 2 This is a schematic diagram of a soil salinity inversion device based on a hybrid generative adversarial network provided in an embodiment of the present invention. Detailed Implementation

[0057] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0058] Figure 1 This is a flowchart of a soil salinity inversion method based on a hybrid generative adversarial network provided in an embodiment of the present invention, as shown below. Figure 1 As shown, the soil salinity inversion method based on hybrid generative adversarial networks includes the following specific steps:

[0059] Step S1: Collect multiple soil samples from the salinized area and obtain multiple single bands, first coordinates, first spectral index and salinity index for each soil sample.

[0060] In this embodiment of the invention, a total of 60 soil samples were collected. Specifically, using a hyperspectral sensor mounted on a drone, hyperspectral image data in the range of 450nm-950nm was collected under stable lighting conditions and wind speeds less than 3m / s. At the same time, the soil electrical conductivity was measured and converted into the electrical conductivity of the saturated extract as an indicator of soil salinity. The hyperspectral image data included multiple single bands for each soil sample in the salinized area, a first coordinate, and a first spectral index. A single band refers to each band in the range of 450nm-950nm collected by the hyperspectral sensor, divided at 4nm intervals. There were a total of 125 single bands.

[0061] The drone used was a DJI Motrice 300RTK, and the hyperspectral sensor used was an S18 hyperspectral sensor. The hyperspectral sensor had a spectral range of 450nm-950nm, a spectral resolution of 8nm@532nm, a preset interval (using an interval) of 4nm, 126 channels, an observation time of 0.1-1000ms, a digital resolution of 12bit, a hyperspectral imaging speed of 5Cubes / s, a SiCCD area array detector, and a weight of 490g.

[0062] For example, single bands include: 450-454nm, 454-458nm, 458-462nm, 462-466nm, 466-470nm, ... 918-922nm, 922-926nm, 926-930nm, 930-934nm, 934-938nm, 938-942nm, 942-946nm and 946-950nm.

[0063] Step S2: Construct two-band and three-band arrays for each soil sample using the optimal band selection algorithm, and calculate the second spectral index for each two-band array and the third spectral index for each three-band array.

[0064] Among them, dual-band includes any combination of two single-bands, and tri-band includes any combination of three single-bands; for example, dual-band includes (450-454nm, 454-458nm) and (450-454nm, 458-462nm); tri-band includes (450-454nm, 454-458nm, 458-462nm) and (462-466nm, 466-470nm, 470-474nm).

[0065] Specifically, the optimal band selection algorithm includes: creating a preset array of null values ​​based on the number of single bands for each soil sample; calculating possible wavelength combinations from single bands using a nested loop method; normalizing the calculated wavelength combination results and placing them into the array of null values; and calculating the second spectral index for two bands and the third spectral index for three bands using the spectral index formula.

[0066] The spectral index formula includes the second spectral index formula and the third spectral index formula;

[0067] The formula for calculating the second spectral index is:

[0068] ;

[0069] ;

[0070] The formula for calculating the third spectral index is:

[0071] ;

[0072] ;

[0073] ;

[0074] ;

[0075] ;

[0076] ;

[0077] In the formula, , and This indicates a single band. and Indicates the second spectral index; , , , , and This indicates the third spectral index.

[0078] Step S3: Select two bands based on the second spectral index and the salinity index of the soil sample, and select three bands based on the third spectral index and the salinity index of the soil sample.

[0079] A correlation study was conducted between possible wavelength combinations and salinity indicators, and the optimal wavelength combination with the highest correlation value with salinity was selected.

[0080] Specifically, the first Pearson correlation coefficient is calculated based on the second spectral index and the salinity index of the soil sample, and the second Pearson correlation coefficient is calculated based on the third spectral index and the salinity index of the soil sample; dual bands are selected based on the first Pearson correlation coefficient and a preset coefficient threshold, and three bands are selected based on the second Pearson correlation coefficient and a preset coefficient threshold.

[0081] Pearson correlation coefficient calculation formula:

[0082]

[0083] Where n Sample size No. Spectral index of each sample No. The salt content value of each sample. The average of the spectral index values ​​of all samples This is the average of the spectral index values ​​for all samples. The formula calculates the strength of the linear correlation between the spectral index and salinity. The correlation coefficient r ranges between -1 and 1.

[0084] When the first Pearson correlation coefficient is greater than or equal to a preset threshold, the dual-band corresponding to that first Pearson correlation coefficient is retained; when the first Pearson correlation coefficient is less than the preset threshold, the dual-band corresponding to that first Pearson correlation coefficient is removed; when the second Pearson correlation coefficient is greater than or equal to the preset threshold, the three-band corresponding to that second Pearson correlation coefficient is retained; when the second Pearson correlation coefficient is less than the preset threshold, the three-band corresponding to that second Pearson correlation coefficient is removed. The preset threshold is set to 0.6.

[0085] For example,

[0086] Table 1. Optimal dual-band second spectral index and first Pearson correlation coefficient values.

[0087]

[0088] In Table 1, R1 and R2 represent the optimal dual-band; B522 represents the dual-band combination of the 5th and 22nd single-band; B686 represents the dual-band combination of the 6th and 86th single-band; B546 represents the dual-band combination of the 5th and 46th single-band; and Pearson R represents the first Pearson correlation coefficient value. As can be seen from Table 1, the first Pearson correlation coefficient values ​​of the optimal dual-bands B522, B686, and B546 are all greater than or equal to the preset coefficient threshold.

[0089] Table 2. Optimal three-band third spectral index and second Pearson correlation coefficient values.

[0090]

[0091] In Table 2, R1, R2, and R3 represent the optimal three bands, and Pearson R2 represents the second Pearson correlation coefficient. From Table 2, it can be seen that the second Pearson correlation coefficient values ​​of the optimal three bands B494, B534, B934, B518, B534, B510, B574, B646, B490, B606, B694, and B490 are greater than or equal to the preset coefficient threshold.

[0092] Therefore, the selected three bands are B494, B510, B518, B534, B574, B606, B646, B694 and B934, and the selected two bands are B522, B686 and B546.

[0093] Step S4: Utilize a feature-mixing generative adversarial network (GAN) to generate real spectral samples and a first confidence level based on a single band, a first coordinate, and a first spectral index. Generate a first synthetic spectral sample and a second coordinate based on selected dual bands, a second spectral index, selected three bands, a third spectral index, the first coordinate, and a random vector. Output a first sub-confidence level based on the first synthetic spectral sample and the second coordinate. Optimize the difference between the first confidence level and the first sub-confidence level using an adversarial loss function, generating a first difference signal. Optimize the first synthetic spectral sample and the second coordinate based on the first difference signal to generate a second sub-synthetic spectral sample and a third coordinate. Output a second sub-confidence level based on the second sub-synthetic spectral sample and the third coordinate. Optimize the difference between the first confidence level and the second sub-confidence level using an adversarial loss function, generating a second difference signal. Optimize the second sub-synthetic spectrum and the third coordinate based on the second difference signal. Continue this process until n adversarial training iterations are completed, generating a second synthetic spectral sample, a fourth coordinate, and a second confidence level.

[0094] Here, the random vector represents the humidity, temperature, or wind speed of the sampled soil, which is set manually. The feature-mixed generative adversarial network includes a generator and a discriminator. The first confidence and the second confidence are important indicators for measuring the reliability of statistical inference. They represent the probability of the true value of the true spectral sample in multiple repeated samplings.

[0095] Specifically, the first coordinate, multiple single bands, and the first spectral index are input into the generator, which generates a real spectral sample using the generator feature mixing formula; the real spectral sample is input into the discriminator, which extracts the features of the real spectral sample using the discriminator feature mixing formula, and outputs a first confidence score based on the features of the real spectral sample, which represents the authenticity of the real spectral sample;

[0096] The generator inputs dual-band, second spectral index, first coordinates, three-band, random vector, and third spectral index. Multiple first synthetic spectral samples are generated according to the generator's feature mixing formula. The generator calculates the first coordinate offset using a coordinate loss function and derives the second coordinate based on the first coordinate and the first coordinate offset. The first synthetic spectral samples and the second coordinate are then input into a discriminator. The discriminator generates features of the first synthetic spectral samples according to its feature mixing formula and generates a first sub-confidence based on the features and the second coordinate. Furthermore, the discriminator optimizes the difference between the first confidence and the first sub-confidence using an adversarial loss function, making the difference between the first confidence and the first sub-confidence larger (i.e., the first confidence is larger, and the first sub-confidence is smaller), and transmits the first difference signal to the generator. The generator then optimizes the interpolation function based on the first difference signal. The process involves generating a second sub-synthetic spectral sample and a second coordinate offset. Based on the second coordinate offset and the second coordinate, a third coordinate is generated. The second sub-synthetic spectral sample and the third coordinate are then transmitted to the discriminator. The discriminator generates features of the second sub-synthetic spectral sample according to its feature mixing formula. Furthermore, the discriminator generates a second sub-confidence score based on these features and the third coordinate. The discriminator optimizes the difference between the first confidence score and the second sub-confidence score using an adversarial loss function, making the difference between them larger (i.e., a larger first confidence score and a smaller second sub-confidence score). This second difference signal is then transmitted to the generator, which optimizes the interpolation function based on the second difference signal. The generator generates a second sub-synthetic spectrum sample and a third coordinate sub-offset. The generator then generates a fourth coordinate based on the third coordinate and the third coordinate sub-offset. This process continues until the generator and the discriminator undergo n adversarial training iterations. The generator outputs the second synthesized spectrum sample and the fourth coordinate, and the discriminator outputs the second confidence score. Here, n is greater than or equal to 2 and less than or equal to 5.

[0097] Generator Feature Mixing Formula:

[0098]

[0099] Where, in the formula This represents the characteristics resulting from the combination of bands, spectral indices, coordinates, and random noise vectors. For interpolation functions, The combination of bands, spectral indices, and coordinates represents the characteristics generated. Features representing the generation of random noise vectors; This indicates parameters such as combined bands, spectral indices, and coordinates. This represents a random noise vector.

[0100] Discriminator Feature Mixing Formula:

[0101] In the formula, Indicates the characteristics of the spectral sample, and Represents the mixing coefficient. Describes a fractional differential operator. and This represents the characteristics of synthetic spectral samples of different orders.

[0102] Coordinate loss function:

[0103] In the formula, This represents the predicted coordinate offset. Indicates the first coordinate. Represents the square of the norm. E represents the coordinate offset; E represents the expected value (the average expected value is calculated for the coordinate offsets in parentheses).

[0104] Adversarial loss function:

[0105]

[0106] In the formula, This represents the difference between the real spectral sample and the synthetic spectral sample; Indicates the confidence level of a true spectral sample. Indicates the confidence level of the synthesized spectral sample. This represents the optimization term representing the difference between the confidence levels of the real spectral samples and the synthetic spectral samples. This represents the difference between the confidence levels of the real spectral sample and the synthetic spectral sample. Represents the square norm.

[0107] Step S5: Using a random forest model, predict the salt content value of the second synthetic spectral sample based on its dual-band, second spectral index, three-band, third spectral index, and second coordinates.

[0108] First, the random forest model is trained using a single band, first coordinate, first spectral index, and salinity index as the training set. The trained random forest model is then input into the trained random forest model using the dual band, second spectral index, three band, third spectral index, and third coordinate of the second synthetic spectral sample. The model outputs the salinity of each second synthetic spectral sample, thus enabling the prediction of the salinity value of the second synthetic spectral sample.

[0109] Step S6: Select a preset threshold from multiple first confidence levels, and obtain a preferred spectral sample based on the preset threshold and the second confidence level of the second synthesized light.

[0110] For example, in this embodiment of the invention, there are 60 soil samples. A feature-mixed generative adversarial network is used to generate 60 first confidence levels. The 60 first confidence levels are sorted from high to low. The 10th first confidence level is selected as a preset threshold. The second synthetic spectral sample is selected based on the preset threshold and the second confidence level. In this embodiment of the invention, the preset threshold is 0.75.

[0111] When the second confidence level is greater than the preset threshold, the second synthetic spectrum sample corresponding to the second confidence level is retained; when the second confidence level is less than or equal to the preset threshold, the second synthetic spectrum sample corresponding to the second confidence level is removed.

[0112] Step S7: Determine the real spectral sample corresponding to each preferred second synthetic spectral sample based on each first coordinate and fourth coordinate, and filter the preferred second synthetic spectral samples based on the spectral vector of the preferred second synthetic spectral sample and the spectral vector of the real spectral sample to obtain an enhanced spectral sample set.

[0113] Specifically, the difference between the first coordinate and the fourth coordinate is determined based on each first coordinate and the fourth coordinate. The real spectral sample corresponding to each preferred second synthetic spectral sample is determined based on the difference and a preset difference threshold. The spectral angle is determined using the spectral angle formula and based on the spectral vector of the preferred second synthetic spectral sample and the spectral vector of the real spectral sample. The preferred second synthetic spectral samples are then filtered based on the spectral angle and the spectral angle threshold to obtain an enhanced spectral sample set. In this embodiment of the invention, the preset difference threshold is 0.1 and the spectral angle threshold is 0.2.

[0114] If the difference is less than or equal to a preset difference threshold, then the preferred second synthetic spectrum sample corresponds to the real spectrum sample; if the difference is greater than the preset difference threshold, then the preferred second synthetic spectrum sample does not correspond to the real spectrum sample; when the spectral angle is greater than the spectral angle threshold, the preferred second synthetic spectrum sample corresponding to the spectral angle is removed; when the spectral angle is less than or equal to the spectral angle threshold, the preferred second synthetic spectrum sample is retained.

[0115] Formula for spectral angle:

[0116]

[0117] In the formula, The angle between the spectral vector of the real spectral sample and the spectral vector of the preferred second synthetic spectral sample is represented; x represents the spectral vector of the real spectral sample, and y represents the spectral vector of the second synthetic spectral sample. The dot product of two spectral vectors is represented; ||x|| represents the magnitude of the spectral vector of the real spectral sample, and ||y|| represents the magnitude of the spectral vector of the preferred second synthetic spectral sample.

[0118] Step S8: Use the enhanced spectral sample set and corresponding salinity values ​​to train and validate the partial least squares regression model, random forest regression model, support vector machine regression model, and backpropagation neural network regression model. Based on the evaluation indicators of coefficient of determination, root mean square error, and mean absolute error, estimate the performance of the partial least squares regression model, random forest regression model, support vector machine regression model, and backpropagation neural network regression model, and determine the model with the best soil salinity prediction performance.

[0119] Among them, 80% of the enhanced spectral sample set and the corresponding salt content were used as the training set, and 20% were used as the validation set data to train and validate the partial least squares regression model, random forest regression model, support vector machine regression model and backpropagation neural network regression model. The model with the best soil salinity prediction performance was selected based on the evaluation index of coefficient of determination, root mean square error and mean absolute error.

[0120] Step S9: Predict the salt content of the soil to be tested using the best-performing model for predicting soil salinity, and generate a spatial distribution map of soil salinity.

[0121] Example 2

[0122] Figure 2 This is a flowchart of a soil salinity inversion device based on a hybrid generative adversarial network provided in an embodiment of the present invention, as shown below. Figure 2 As shown, the soil salinity inversion device based on a hybrid generative adversarial network includes:

[0123] The module includes: module 20, band construction module 21, Pearson correlation coefficient calculation module 22, band screening module 23, second confidence level determination module 24, salinity content prediction module 25, synthetic spectrum sample screening module 26, enhanced spectrum sample set determination module 27, salinity prediction optimal model determination module 28, and salinity spatial distribution generation module 29.

[0124] The acquisition module 20 is used to collect multiple soil samples from salinized areas and acquire multiple single bands, first coordinates, first spectral index and salinity index for each soil sample;

[0125] The band construction module 21 is used to acquire the single band acquired by the acquisition module 20, construct the dual-band and triple-band of each soil sample using the optimal band selection algorithm, and calculate the second spectral index of each dual-band and the third spectral index of each triple-band.

[0126] The band selection module 23 is used to obtain the second spectral index and the third spectral index calculated by the band construction module 21, and to select two bands based on the second spectral index and the salinity index of the soil sample, and to select three bands based on the third spectral index and the salinity index of the soil sample.

[0127] The second confidence level determination module 24 is used to acquire the dual-band and tri-band selected by the band selection module 23, and uses feature mixing to generate an adversarial network. It generates real spectral samples and a first confidence level based on a single band, a first coordinate, and a first spectral index. Based on the selected dual-band and tri-band, the second spectral index and a third spectral index calculated by the band construction module 21, as well as the first coordinate and a random vector, it generates a first synthetic spectral sample and a second coordinate. Based on the first synthetic spectral sample and the second coordinate, it outputs a first sub-confidence level. It uses an adversarial loss function to optimize the difference between the first confidence level and the first sub-confidence level, and generates a first difference signal. Based on the first difference signal, it optimizes the first synthetic spectral sample to generate a second sub-synthetic spectral sample and a third coordinate. Based on the second sub-synthetic spectral sample and the third coordinate, it outputs a second sub-confidence level. It uses an adversarial loss function to optimize the difference between the first confidence level and the second sub-confidence level, and generates a second difference signal. Based on the second difference signal, it optimizes the second sub-synthetic spectrum, until after n adversarial training iterations, it generates a second synthetic spectral sample and a second confidence level.

[0128] The salt content prediction module 25 is used to obtain the second synthetic spectral sample generated by the second confidence determination module 24, and predict the salt content value of the second synthetic spectral sample based on the two-band, second spectral index, three-band, third spectral index and second coordinate of the second synthetic spectral sample generated by the second confidence determination module 24 using a random forest model.

[0129] The second synthetic spectrum sample screening module 26 is used to select a preset threshold from a plurality of first confidence levels generated by the second confidence level determination module 24, and to obtain a preferred second synthetic spectrum sample based on the preset threshold and the second confidence level generated by the second confidence level determination module 24.

[0130] The enhanced spectral sample set determination module 27 is used to obtain the preferred second synthetic spectral samples obtained by the second synthetic spectral sample screening module 26. Based on each first coordinate and third coordinate, the module determines the real spectral sample corresponding to each preferred second synthetic spectral sample, and filters the preferred second synthetic spectral samples obtained by the second synthetic spectral sample screening module 26 according to the spectral vector of the preferred second synthetic spectral sample and the spectral vector of the real spectral sample corresponding to it, thereby obtaining the enhanced spectral sample set.

[0131] The optimal model determination module 28 for salinity prediction is used to obtain the enhanced spectral sample set obtained by the enhanced spectral sample set determination module 27, and to train and validate the partial least squares regression model, random forest regression model, support vector machine regression model, and backpropagation neural network regression model using the enhanced spectral sample set and the corresponding salinity content values. Furthermore, the performance of the partial least squares regression model, random forest regression model, support vector machine regression model, and backpropagation neural network regression model is estimated based on the evaluation indicators of the coefficient of determination, root mean square error, and mean absolute error, and the optimal model for soil salinity prediction is determined.

[0132] The salinity spatial distribution generation module 29 is used to obtain the optimal model for salinity prediction from the optimal model determination module 28, and to use the optimal model for salinity prediction to predict the salinity content of the soil to be tested, thereby generating a spatial distribution map of soil salinity.

[0133] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for soil salinity inversion based on hybrid generative adversarial networks, characterized in that, include: Step S1: Collect multiple soil samples from the salinized area and obtain multiple single bands, first coordinates, first spectral index and salinity index for each soil sample; Step S2: Construct two-band and three-band arrays for each soil sample using the optimal band selection algorithm, and calculate the second spectral index for each two-band array and the third spectral index for each three-band array. Step S3: Select two bands based on the second spectral index and the salinity index of the soil sample, and select three bands based on the third spectral index and the salinity index of the soil sample. Step S4: Utilize a feature-mixing generative adversarial network (GAN) to generate a real spectral sample and a first confidence level based on the single band, the first coordinate, and the first spectral index. Generate a first synthetic spectral sample and a second coordinate based on the selected dual band, the second spectral index, the selected three band, the third spectral index, the first coordinate, and a random vector. Output a first sub-confidence level based on the first synthetic spectral sample and the second coordinate. Optimize the difference between the first confidence level and the first sub-confidence level using an adversarial loss function, and generate a first difference signal. Optimize the first synthetic spectral sample and the second coordinate based on the first difference signal to generate a second sub-synthetic spectral sample and a third coordinate. Output a second sub-confidence level based on the second sub-synthetic spectral sample and the third coordinate. Optimize the difference between the first confidence level and the second sub-confidence level using an adversarial loss function, and generate a second difference signal. Optimize the second sub-synthetic spectrum and the third coordinate based on the second difference signal until n adversarial training iterations are performed, generating a second synthetic spectral sample, a fourth coordinate, and a second confidence level. Step S5: Using a random forest model, and based on the dual-band, second spectral index, three-band, third spectral index, and second coordinate of the second synthetic spectral sample, predict the salt content value of the second synthetic spectral sample. Step S6: Select a preset threshold from multiple first confidence levels, and obtain a preferred second synthetic spectrum sample based on the preset threshold and the second confidence level; Step S7: Determine the real spectral sample corresponding to each preferred second synthetic spectral sample based on each first coordinate and fourth coordinate, and filter the preferred second synthetic spectral samples based on the spectral vector of the preferred second synthetic spectral sample and the spectral vector of the corresponding real spectral sample to obtain an enhanced spectral sample set; Step S8: Use the enhanced spectral sample set and the corresponding salinity values ​​to train and validate the partial least squares regression model, random forest regression model, support vector machine regression model, and backpropagation neural network regression model. Based on the evaluation indicators of the coefficient of determination, root mean square error, and mean absolute error, estimate the performance of the partial least squares regression model, random forest regression model, support vector machine regression model, and backpropagation neural network regression model, and determine the model with the best soil salinity prediction performance. Step S9: Predict the salt content of the soil to be tested using the best-performing model for predicting soil salinity, and generate a spatial distribution map of soil salinity.

2. The soil salinity inversion method based on hybrid generative adversarial networks according to claim 1, characterized in that... The feature-mixed generative adversarial network includes a generator and a discriminator, and step S4 includes: Step S40: Input the single band, first coordinate, and first spectral index of each soil sample into the generator. The generator generates multiple real spectral samples according to the generator feature mixing formula. Input the multiple real spectral samples into the discriminator. The discriminator generates features of the real spectral samples according to the discriminator feature mixing formula. Output multiple first confidence levels based on the features of the real spectral samples. Step S41: Input the selected dual-band, second spectral index, first coordinate, three-band, third spectral index and random noise vector into the generator, and the generator generates multiple first synthetic spectral samples according to the generator feature mixing formula; Step S42: Utilize the coordinate loss function, generate a first coordinate offset based on the first coordinate, and generate the second coordinate based on the first coordinate and the first coordinate offset; Step S43: Input the first synthesized spectral sample and the second coordinates into the discriminator. The discriminator generates features of the first synthesized spectral sample according to the discriminator feature mixing formula, and generates a first sub-confidence based on the features of the first synthesized spectral sample and the second coordinates. The discriminator optimizes the difference between the first confidence and the first sub-confidence using an adversarial loss function, and transmits the first difference signal to the generator. The generator optimizes the first synthesized spectral sample and the second coordinates according to the first difference signal, generates a second sub-synthetic spectral sample and a second coordinate sub-offset, and generates a third coordinate based on the second coordinate sub-offset and the second coordinates. The second sub-synthetic spectral sample and the third coordinate are transmitted to the discriminator. The discriminator generates features of the second sub-synthetic spectral sample according to the discriminator feature mixing formula, and generates a second sub-confidence based on the features of the second sub-synthetic spectral sample and the third coordinate. The discriminator optimizes the difference between the first confidence and the second sub-confidence using an adversarial loss function, and transmits the second difference signal to the generator. The generator optimizes the second sub-synthetic spectral sample and the third coordinate based on the second difference signal until n adversarial training iterations. The generator outputs the second synthetic spectral sample and the fourth coordinate, and the discriminator outputs the second confidence.

3. The soil salinity inversion method based on hybrid generative adversarial networks according to claim 2, characterized in that... Step S43 includes: When the generator optimizes the first synthesized spectral sample once based on the first difference signal, the discriminator optimizes the difference between the first confidence and the second sub-confidence m times using the adversarial loss function; Where m is set to 5, and n is greater than or equal to 2 and less than or equal to 5.

4. The soil salinity inversion method based on hybrid generative adversarial networks according to claim 1, characterized in that... Step S6 includes: When the second confidence level is greater than the preset threshold, the second synthetic spectrum sample corresponding to the second confidence level is retained; when the second confidence level is less than or equal to the preset threshold, the second synthetic spectrum sample corresponding to the second confidence level is removed.

5. The soil salinity inversion method based on hybrid generative adversarial networks according to claim 1, characterized in that... Step S7 includes: Step S70: Determine the difference between the first coordinate and the fourth coordinate based on each first coordinate and the fourth coordinate, and determine the real spectral sample corresponding to each preferred second synthetic spectral sample based on the difference and a preset difference threshold. Step S71: Determine the spectral angle based on the spectral vector of the preferred second synthetic spectral sample and the spectral vector of the real spectral sample that corresponds one-to-one with the synthetic spectral sample, and filter the preferred second synthetic spectral sample according to the spectral angle and the spectral angle threshold to obtain an enhanced spectral sample set.

6. The soil salinity inversion method based on hybrid generative adversarial networks according to claim 5, characterized in that, Step S70 includes: If the difference is less than or equal to a preset difference threshold, then the preferred second synthetic spectrum sample corresponds to the real spectrum sample; if the difference is greater than the preset difference threshold, then the preferred second synthetic spectrum sample does not correspond to the real spectrum sample; when the spectral angle is greater than the spectral angle threshold, the preferred second synthetic spectrum sample corresponding to the spectral angle is removed; when the spectral angle is less than or equal to the spectral angle threshold, the preferred second synthetic spectrum sample is retained.

7. The soil salinity inversion method based on hybrid generative adversarial networks according to claim 1, characterized in that, Step S2 includes: Step S21: Create a preset array null matrix based on the number of single bands for each soil sample; Step S22: Calculate possible wavelength combinations from a single band using a nested loop method; Step S23: The calculated possible wavelength combination results will be normalized and placed into the array null matrix; Step S24: Calculate the second spectral index of the two-band spectrum and the third spectral index of the three-band spectrum using the spectral index formula.

8. The soil salinity inversion method based on hybrid generative adversarial networks according to claim 1, characterized in that, Step S3 includes: Step S30: Calculate the first Pearson correlation coefficient based on the second spectral index and the salinity index of the soil sample, and calculate the second Pearson correlation coefficient based on the third spectral index and the salinity index of the soil sample; Step S31: Select two bands based on the first Pearson correlation coefficient and the preset coefficient threshold, and select three bands based on the second Pearson correlation coefficient and the preset coefficient threshold.

9. The soil salinity inversion method based on hybrid generative adversarial networks according to claim 8, characterized in that, Step S31 includes: When the first Pearson correlation coefficient is greater than or equal to the preset coefficient threshold, the dual band corresponding to the first Pearson correlation coefficient is retained; when the first Pearson correlation coefficient is less than the preset coefficient threshold, the dual band corresponding to the first Pearson correlation coefficient is removed. When the second Pearson correlation coefficient is greater than or equal to the preset coefficient threshold, the three bands corresponding to the second Pearson correlation coefficient are retained; when the second Pearson correlation coefficient is less than the preset coefficient threshold, the three bands corresponding to the second Pearson correlation coefficient are removed.

10. A soil salinity inversion method and apparatus based on hybrid generative adversarial networks, characterized in that, include: The module includes: acquisition module, band construction module, Pearson correlation coefficient calculation module, band screening module, second confidence level determination module, salinity content prediction module, synthetic spectrum sample screening module, enhanced spectrum sample set determination module, salinity prediction optimal model determination module, and salinity spatial distribution generation module. The acquisition module is used to collect multiple soil samples from salinized areas and acquire multiple single bands, first coordinates, first spectral index and salinity index for each soil sample; The band construction module is used to acquire the single band acquired by the acquisition module, construct the dual-band and triple-band of each soil sample using the optimal band selection algorithm, and calculate the second spectral index of each dual-band and the third spectral index of each triple-band. The band selection module is used to obtain the second and third spectral indices calculated by the band construction module, and select two bands based on the second spectral index and the salinity index of the soil sample, and select three bands based on the third spectral index and the salinity index of the soil sample. The second confidence level determination module is used to acquire the dual-band and triple-band selected by the band selection module, and generate an adversarial network using feature mixing. It generates a real spectral sample and a first confidence level based on the single band, the first coordinate, and the first spectral index. It generates a first synthetic spectral sample and a second coordinate based on the selected dual-band and triple-band, the second spectral index calculated by the band construction module, the third spectral index, the first coordinate, and a random vector. It outputs a first sub-confidence level based on the first synthetic spectral sample and the second coordinate. It optimizes the difference between the first confidence level and the first sub-confidence level using an adversarial loss function, generating a first difference signal. It then optimizes the first synthetic spectral sample and the second coordinate based on the first difference signal, generating a second sub-synthetic spectral sample and a third coordinate. It outputs a second sub-confidence level based on the second sub-synthetic spectral sample and the third coordinate. It further optimizes the difference between the first confidence level and the second sub-confidence level using an adversarial loss function, generating a second difference signal. Finally, it optimizes the second sub-synthetic spectrum and the third coordinate based on the second difference signal, until n adversarial training iterations are performed, generating a second synthetic spectral sample, a fourth coordinate, and a second confidence level. The salt content prediction module is used to obtain the second synthetic spectral sample generated by the second confidence determination module, and uses a random forest model to predict the salt content value of the second synthetic spectral sample based on the dual-band, second spectral index, three-band, third spectral index and second coordinate of the second synthetic spectral sample generated by the second confidence determination module. The second synthetic spectrum sample screening module is used to select a preset threshold from multiple first confidence levels generated by the second confidence level determination module, and to obtain a preferred second synthetic spectrum sample based on the preset threshold and the second confidence level generated by the second confidence level determination module. The enhanced spectral sample set determination module is used to obtain the preferred second synthetic spectral samples from the second synthetic spectral sample screening module. Based on each first coordinate and fourth coordinate, it determines the real spectral sample corresponding to each preferred second synthetic spectral sample. Based on the spectral vector of the preferred second synthetic spectral sample and the spectral vector of the corresponding real spectral sample, it screens the preferred second synthetic spectral samples obtained by the second synthetic spectral sample screening module to obtain the enhanced spectral sample set. The optimal model determination module for salinity prediction is used to obtain the enhanced spectral sample set obtained by the enhanced spectral sample set determination module. It uses the enhanced spectral sample set and the corresponding salinity content values ​​to train and validate the partial least squares regression model, random forest regression model, support vector machine regression model, and backpropagation neural network regression model. It also estimates the performance of the partial least squares regression model, random forest regression model, support vector machine regression model, and backpropagation neural network regression model based on the evaluation indicators of the coefficient of determination, root mean square error, and mean absolute error, and determines the optimal model for soil salinity prediction. The salinity spatial distribution generation module is used to obtain the optimal model for salinity prediction. The optimal model for soil salinity prediction is obtained by the optimal model for soil salinity prediction, and the salinity content of the soil to be tested is predicted using the optimal model for soil salinity prediction, thereby generating a spatial distribution map of soil salinity.