Soil waterlogging detection method based on SPI anomaly classification and automatic encoder
Through the two -step training method based on SPI -based abnormal classification and automatic encoder, it is difficult to achieve high -scale continuous monitoring and cost -high problems of the detection method of traditional soil waterlogging. Improve detection efficiency and accuracy.
Patent Information
- Application Number
- CN202410780014.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2025-01-28
AI Technical Summary
Traditional soil waterlogging detection methods are difficult to achieve large-scale continuous monitoring, which is expensive, and the existing remote sensing monitoring methods have challenges in data processing and model calibration, and their adaptability is limited.
Using soil waterlogging detection methods based on SPI abnormal classification and automatic encoder, build data sets through the SPI index marking soil site data, build a data set, and use the two -step training method of the automatic encoder to detect Waterlogging situation.
The accurate assessment of soil waterlogging and the detection of waterlogging during a specific time cycle, improved the detection efficiency and accuracy, reduced costs, and adapted to different regions and vegetation coverage conditions.
Smart Images

Figure CN119377583A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to soil waterlogging detection, automatic encoder, and SPI clustering analysis technology, and more particularly to a soil waterlogging detection method based on SPI anomaly classification and automatic encoder. Background Art
[0002] Soil waterlogging is one of the important factors affecting agricultural production. It will cause excessive soil moisture, hinder the normal breathing of crop roots, and then affect crop growth or even cause crop death. Traditional methods for detecting soil waterlogging mainly rely on direct measurements of soil physical and chemical properties, such as ground detection, soil profile analysis, and soil moisture monitoring. These methods usually require a lot of manual sampling and laboratory analysis on site, which is time-consuming and labor-intensive. Although these methods can provide accurate local data, they often cannot achieve continuous monitoring over a large area and are difficult to adapt to rapidly changing environmental conditions. In addition, these methods are costly and are not conducive to large-scale promotion and use.
[0003] In recent years, research on soil waterlogging detection has made significant progress in the fields of computer science and data science, especially in the application of remote sensing technology, machine learning and artificial intelligence. Remote sensing technology allows the collection of large-scale land images from satellites or drones, and then uses machine learning and deep learning methods to analyze satellite image data, making it possible to detect large-scale soil waterlogging. However, existing remote sensing monitoring methods usually rely on complex physical models and a large amount of ground-based measured data. These methods have great challenges in data processing and model calibration, and have limited adaptability to different regions and different vegetation cover conditions.
[0004] Soil waterlogging detection belongs to the category of anomaly detection research in computer science. Deep learning models are currently an effective technology in the field of anomaly data detection. Their training process relies on a large amount of continuous soil site environmental monitoring information. The model can capture subtle changes and greatly improve the efficiency and accuracy of detection. Models based on deep learning have been applied to supervised, semi-supervised, and unsupervised modes. In the supervised mode, the model is trained by using normal data, and the trained model is used for anomaly detection. The key issue of this mode is to obtain accurate labels for the inliers and anomaly data classes in each domain. In the semi-supervised mode for anomaly detection, the category labels are only available for the inliers. The unsupervised mode is widely used because it can process unlabeled data sets. In this mode, the deep learning-based network attempts to reconstruct the input at the output end, and measures the reconstruction error to rank the outliers of all data in the data set.
[0005] Many deep learning techniques, such as Adaptive Resonance Theory (ART), Generative Adversarial Networks (GAN), and Restricted Boltzmann Machines (RBM), have been applied to the field of anomaly detection. In addition to the above networks, methods such as Recurrent Neural Network (RNN) are also very popular. The core method of unsupervised deep learning models is the autoencoder, which is mainly divided into 3 layers: encoder, compression (hidden), and decoder. In the encoder stage, the autoencoder compresses the data to find useful information (compression layer); the decoder works in the opposite way to the encoder, and it reconstructs the input features as closely as possible. Later, scholars made a series of improvements to the autoencoder, and developed models such as the variational autoencoder (VAE), Gaussian mixture autoencoder (GMVAE), autoencoder ensemble network (Randomized Neighbor Network, RandNet), enhanced autoencoder ensemble (Bayesian Autoencoder, BAE), and graph-based autoencoders (Graph Autoencoders, GAE), which are widely used in anomaly detection.
[0006] When using an autoencoder for anomaly detection tasks, reconstruction error is the judgment criterion. The traditional autoencoder training method uses all data for model training. This approach often leads to an overestimation of the reconstruction error of normal data and an underestimation of the reconstruction error of abnormal data. As a result, the real abnormal data is easily missed. Specifically in soil waterlogging detection, the amount of non-waterlogging data is much larger than the amount of waterlogging data, which makes it difficult for the data features of waterlogging to be effectively learned by the model. In order to make the autoencoder more suitable for anomaly detection tasks, not only high-quality and large-scale historical data is needed to train the model, but also the training process of the model needs to be improved to more accurately calculate the data reconstruction error. In addition, when processing time series data, the existing autoencoder model often ignores the seasonal and periodic changes that may exist in the data, which affects the accuracy and robustness of the model. The present invention intends to use the autoencoder as the core technology to accurately evaluate and estimate the soil waterlogging situation within a specific time period by learning data from a large number of soil monitoring stations. Summary of the invention
[0007] The present invention proposes a soil waterlogging detection method based on Standardized Precipitation Index (SPI) anomaly classification and autoencoder (AE), aiming to accurately evaluate and identify soil waterlogging conditions within a specific time period. First, the present invention proposes to use the SPI index to mark the precipitation anomaly of soil site data, obtain the classification of soil drought, normal and waterlogging conditions, and divide and construct a data set based on whether it is marked as waterlogging. Secondly, the present invention proposes a two-step training method based on an autoencoder to realize soil waterlogging detection: the autoencoder model is trained and saved on a non-waterlogged data set; then the trained soil waterlogging detection autoencoder model (SoilFloodingAutoencoder, SFAE) is applied to the overall data set containing waterlogging and other conditions. Finally, the reconstruction error of the autoencoder is calculated, and the data with TOP-N reconstruction errors is judged as abnormal data.
[0008] The specific steps are as follows:
[0009] S1 obtains CLDAS data and performs data preprocessing, including:
[0010] S11, CLDAS series data contains daily 0-20cm soil relative humidity data from 2021 to 2023, which includes multiple environmental parameters (wind speed, wind direction, PM2.5, PM10, air temperature, relative humidity, light, soil moisture, soil temperature, rainfall and voltage). The calculation of SPI value mainly focuses on rainfall data.
[0011] S12, processing of missing values and outliers. For missing values with a short time span, linear interpolation or quadratic interpolation is used to fill in the missing values; for missing values with a long time span, data of the same time period in the adjacent dates are used to fill in the missing values; data with obvious anomalies are replaced or deleted.
[0012] S13, converting some data types and converting numerical information into dates to facilitate subsequent processing.
[0013] S2 calculates the SPI index and obtains classification marks for soil drought, normal and waterlogged conditions, including:
[0014] S21, Initial Definition: Each region Soil relative moisture data over a continuous period of time middle, Indicates Items of data, The Chinese Communist Party The soil relative moisture data is expressed as follows after SPI classification: The waterlogged soil dataset is represented as , the other soil datasets (dry and normal) are represented as .
[0015] S22, Set time scale: Determine the time scale for SPI calculation to be a three-month cycle to assess seasonal hydrological changes.
[0016] S23, cumulative rainfall calculation: For a three-month period, calculate the total rainfall to provide basic data for subsequent probability distribution fitting. The cumulative rainfall R can be expressed as the sum of all rainfall in the period:
[0017]
[0018] in, It is The daily rainfall, is the number of days in the cycle.
[0019] S24, probability distribution fitting: The rainfall data may not strictly follow the normal distribution, so the gamma distribution model is selected to fit the non-zero rainfall data to obtain the distribution parameters. Special treatment is given to the case of no rainfall during the period to ensure the comprehensiveness of the analysis. The probability density function PDF of the gamma distribution is defined as:
[0020]
[0021] in, , is the shape parameter, is the scale parameter, is the gamma function. The calculation of SPI fits the distribution of cumulative rainfall R to the gamma distribution and determines the best distribution by maximum likelihood estimation MLE or other methods. and parameter.
[0022] S25, SPI value generation: The cumulative rainfall in each period is converted into the SPI value under the standard normal distribution through the gamma distribution cumulative distribution function CDF. The gamma distribution cumulative distribution function CDF is used to convert the cumulative rainfall in each period into cumulative probability:
[0023]
[0024] The SPI value is calculated by dividing the cumulative probability Convert to a standard normal distribution and calculate the Z-score:
[0025]
[0026] in, It is the inverse cumulative distribution function (quantile function) of the standard normal distribution and is used to map the cumulative probability to the Z score, i.e., the SPI value.
[0027] S26, Data classification and labeling: Based on the calculated SPI value, the hydrological conditions of each time period are classified into one of the following three types:
[0028] Drought (Label 1): The SPI value is less than -1, indicating that the drought level in this period is higher than the average level of the same season.
[0029] Normal (Label 0): SPI values are between -1 and 1, indicating that the rainfall during this period is close to the average level of the same season.
[0030] Waterlogging (Label 2): The SPI value is greater than 1, indicating that the rainfall in this period is much higher than the average level of the same season.
[0031] S3 divides the soil waterlogging detection dataset into two types according to whether it is marked as waterlogging:
[0032] Soil waterlogging detection dataset Subtract waterlogged soil dataset drought Deriving other soil datasets ,Right now .
[0033] S4 Based on data other than waterlogging data , build and train the autoencoder model, including:
[0034] S41, build an autoencoder model: The autoencoder consists of two parts: the encoder (Eecoder) and the decoder (Decoder). The encoder compresses the input data into a low-dimensional representation, and the decoder restores this low-dimensional representation to the original data, which is expressed by the following formula:
[0035]
[0036] in, For input data, From the input data The encoding mapping to the hidden layer, is the decoding mapping from the hidden layer to the output layer. Is the input data A refactored version of .
[0037] The learning process of the encoder and decoder is expressed using the following formula:
[0038]
[0039] in, is a low-dimensional representation, and is the weight matrix, and is the bias vector, is the activation function.
[0040] S42, uses rectified linear unit (ReLU) and hyperbolic tangent (tanh) as the activation function of the autoencoder.
[0041]
[0042]
[0043] in Represents the input vector.
[0044] S43, using mean absolute error (MAE) and root mean square error as the loss function of the model, the specific calculation formulas of MAE, RMSE and objective function are as follows:
[0045]
[0046]
[0047] in, Indicates the input A multidimensional data vector, Indicates output vector (reconstructed input), yes The length of the dataset.
[0048] S44, train the autoencoder model: use the gradient descent algorithm and back propagation algorithm to optimize the model parameters (weights and biases) to minimize the reconstruction error. Reconstruction error Use the following formula to calculate:
[0049]
[0050] S45, save the trained soil waterlogging detection automatic encoder, i.e., SFAE model.
[0051] S5 uses the SFAE model to detect soil waterlogging in the area, including:
[0052] S51, based on the soil waterlogging detection dataset, applies the SFAE model to calculate and output the reconstruction error of each data.
[0053] S52, sorting the data in descending order according to the calculated reconstruction error, and judging the first N data as waterlogging data. The selection of N here follows the "3σ principle" of normal distribution test, that is, data points exceeding 3σ are considered to be outliers, where σ represents the standard deviation of the reconstruction error of the data.
[0054] Compared with the prior art, the present invention proposes to use the SPI index to mark the abnormal precipitation of soil site data, obtain the classification of soil drought, normal and waterlogging conditions, and divide and construct a data set based on whether it is marked as waterlogging. Secondly, the present invention proposes a two-step training method based on an autoencoder to realize soil waterlogging detection: train the autoencoder model on a non-waterlogged data set and save it; then use the trained soil waterlogging detection autoencoder model (SoilFloodingAutoencoder, SFAE) on the overall data set containing waterlogging and other conditions. Finally, calculate the reconstruction error of the autoencoder, and judge the data with TOP-N reconstruction errors as abnormal data. Soil waterlogging detection can be classified as an abnormality detection problem. The autoencoder model is a popular unsupervised learning technology in deep learning models. It can fully learn existing data through encoders and decoders to obtain a relatively accurate reconstruction of the original data. In the soil waterlogging detection task, waterlogging occurs less frequently than normal conditions. During the learning process, the autoencoder will produce a larger reconstruction error for waterlogging data than normal conditions. Based on the above principle, the present invention uses the reconstruction error of the autoencoder to judge the abnormal waterlogging of soil data. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 This is the basic structure diagram of the soil flooding detection autoencoder model (SoilFloodingAutoencoder, SFAE).
[0056] Figure 2 It is a framework diagram of the soil waterlogging detection method based on SPI anomaly classification and autoencoder. DETAILED DESCRIPTION
[0057] The present invention is described in detail below with reference to the accompanying drawings and embodiments.
[0058] like Figure 1 Shown is the basic structure diagram of the soil waterlogging detection automatic encoder model SFAE.
[0059] like Figure 2 Shown is a framework diagram of the soil waterlogging detection method based on SPI anomaly classification and autoencoder.
[0060] The technical solution adopted by the present invention is a soil waterlogging detection method based on SPI anomaly classification and automatic encoder, which comprises the following steps:
[0061] 1. Obtain CLDAS data and perform data preprocessing, including:
[0062] (1) The CLDAS series data contains daily 0-20 cm soil relative humidity data from 2021 to 2023, which includes multiple environmental parameters (wind speed, wind direction, PM2.5, PM10, air temperature, relative humidity, light, soil moisture, soil temperature, rainfall and voltage). The calculation of SPI value mainly focuses on rainfall data.
[0063] (2) Processing of missing values and outliers. For missing values with a short time span, linear interpolation or quadratic interpolation is used to fill in the missing values; for missing values with a long time span, data from the same time period in the adjacent dates are used to fill in the missing values; data with obvious anomalies are replaced or deleted.
[0064] (3) Convert some data types and convert numerical information into dates to facilitate subsequent processing.
[0065] 2. Calculate the SPI index and obtain classification marks for soil drought, normal and waterlogged conditions, including:
[0066] (1) Initial definition: Each region Soil relative moisture data over a continuous period of time middle, Indicates Items of data, The Chinese Communist Party The soil relative moisture data is expressed as follows after SPI classification: The waterlogged soil dataset is represented as , the other soil datasets (dry and normal) are represented as .
[0067] (2) Setting the time scale: The present invention determines the time scale of SPI calculation as a three-month cycle to evaluate seasonal hydrological changes.
[0068] (3) Calculation of cumulative rainfall: For a three-month period, calculate the total rainfall to provide basic data for subsequent probability distribution fitting. The cumulative rainfall R can be expressed as the sum of all rainfall in the period:
[0069]
[0070] in, It is The daily rainfall, is the number of days in the cycle.
[0071] (4) Probability distribution fitting: The rainfall data may not strictly follow the normal distribution, so the present invention selects the gamma distribution model to fit the non-zero rainfall data to obtain the distribution parameters. Special treatment is given to the case of no rainfall in the period to ensure the comprehensiveness of the analysis. The probability density function (PDF) of the gamma distribution is defined as:
[0072]
[0073] in, , is the shape parameter, is the scale parameter, is the gamma function. The calculation of SPI fits the distribution of cumulative rainfall R to the gamma distribution and determines the best and parameter.
[0074] (5) SPI value generation: The cumulative rainfall in each period is converted into the SPI value under the standard normal distribution through the gamma distribution cumulative distribution function (CDF). The CDF of the gamma distribution is used to convert the cumulative rainfall in each period into the cumulative probability:
[0075]
[0076] The SPI value is calculated by dividing the cumulative probability Convert to a standard normal distribution and calculate the Z-score:
[0077]
[0078] in, It is the inverse cumulative distribution function (quantile function) of the standard normal distribution and is used to map the cumulative probability to a Z score (i.e., SPI value).
[0079] (6) Data classification and labeling: Based on the calculated SPI value, the hydrological conditions of each time period are classified into one of the following three types:
[0080] Drought (Label 1): The SPI value is less than -1, indicating that the drought level in this period is higher than the average level of the same season.
[0081] Normal (Label 0): SPI values are between -1 and 1, indicating that the rainfall during this period is close to the average level of the same season.
[0082] Waterlogging (Label 2): The SPI value is greater than 1, indicating that the rainfall in this period is much higher than the average level of the same season.
[0083] 3. The soil waterlogging detection dataset is divided according to whether it is marked as waterlogging, including:
[0084] Subtract the waterlogged soil dataset from the waterlogged soil dataset to get the other soil dataset, that is .
[0085] 4. Based on data other than waterlogging data , build and train the autoencoder model, including:
[0086] (1) Constructing an autoencoder model: The autoencoder consists of two parts: an encoder (Eecoder) and a decoder (Decoder). The encoder compresses the input data into a low-dimensional representation, and the decoder restores this low-dimensional representation to the original data, which can be expressed by the following formula:
[0087]
[0088] in, For input data, From the input data The encoding mapping to the hidden layer, is the decoding mapping from the hidden layer to the output layer. Is the input data A refactored version of .
[0089] The learning process of the encoder and decoder is expressed using the following formula:
[0090]
[0091] in, is a low-dimensional representation, and is the weight matrix, and is the bias vector, is the activation function.
[0092] (2) Use rectified linear unit (ReLU) and hyperbolic tangent (tanh) as the activation function of the autoencoder.
[0093]
[0094]
[0095] in Represents the input vector.
[0096] (3) Use mean absolute error (MAE) and root mean square error as the loss function of the model. The specific calculation formulas of MAE, RMSE and objective function are as follows:
[0097]
[0098]
[0099] in, Indicates the input A multidimensional data vector, Indicates output vector (reconstructed input), yes The length of the dataset.
[0100] (4) Train the autoencoder model: Use the gradient descent algorithm and back propagation algorithm to optimize the model parameters (weights and biases) to minimize the reconstruction error. The reconstruction error can be calculated using the following formula:
[0101]
[0102] (5) Save the trained soil waterlogging detection automatic encoder, i.e., the SFAE model.
[0103] 5. Apply the SFAE model to detect soil waterlogging in the region, including:
[0104] (1) Based on the soil waterlogging detection dataset, the SFAE model is applied to calculate and output the reconstruction error of each data.
[0105] (2) According to the calculated reconstruction error, the data are sorted in descending order, and the first N data are judged as waterlogging data. The selection of N here follows the "3σ principle" of normal distribution test, that is, data points exceeding 3σ are considered outliers, where σ represents the standard deviation of the reconstruction error of the data.
[0106] So far, various embodiments of the present disclosure have been described in detail. In order to avoid obscuring the concept of the present disclosure, some details known in the art are not described.
[0107] According to the above description, those skilled in the art can fully understand how to implement the technical solutions disclosed herein. Although some specific embodiments of the present invention have been described in detail by examples, those skilled in the art should understand that the above examples are only for illustration, not for limiting the scope of the present invention. Those skilled in the art should understand that the above embodiments may be modified or some technical features may be replaced by equivalents without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.
Claims
1. A soil waterlogging detection method based on SPI anomaly classification and autoencoder, characterized in that: The method comprises the following steps: S1, obtain soil relative humidity data, namely CLDAS data, from the land surface data assimilation system of the Meteorological Bureau, preprocess it, and form a regional soil waterlogging detection data set; S2, calculate the SPI index based on precipitation data in different regions to obtain classification labels for soil drought, normal, and waterlogged conditions; S3, dividing the soil waterlogging detection data set into waterlogging data and other data according to whether it is marked as waterlogging; S4, based on other data except the waterlogging data, construct and train an autoencoder model to obtain a trained soil waterlogging detection autoencoder model; S5, based on the soil waterlogging detection dataset, applies the trained soil waterlogging detection autoencoder model SFAE to perform soil waterlogging detection in the region.
2. A soil waterlogging detection method based on SPI anomaly classification and automatic encoder according to claim 1, characterized in that: S1 obtains CLDAS data and performs data preprocessing, including: S11, CLDAS series data includes daily 0-20cm soil relative humidity data, which includes multiple environmental parameters, including wind speed, wind direction, PM2.5, PM10, air temperature, relative humidity, light, soil moisture, soil temperature, rainfall and voltage. The SPI value is calculated with attention to rainfall data; S12, processing of missing values and outliers; for missing values with a short time span, linear interpolation or quadratic interpolation is used to fill in the missing values; for missing values with a long time span, data of the same time period in the adjacent dates are used to fill in the missing values; data with obvious anomalies are replaced or deleted; S13, converting some data types and converting numerical information into date.
3. The soil waterlogging detection method based on SPI anomaly classification and automatic encoder according to claim 1 is characterized in that: S2 calculates the SPI index and obtains classification marks for soil drought, normal and waterlogged conditions, including: S21, initial definition: The soil relative moisture data X = {x1, x2, ..., x i ,…x n }, x i ∈R d Represents the i-th data, R d There are n data in total. The soil relative humidity data is represented by C after SPI classification. j ; The waterlogged soil dataset is represented by X drought ∈X, other soil datasets are denoted as X regular ∈X; S22, Set time scale: Determine the time scale for SPI calculation to be a three-month cycle to assess seasonal hydrological changes; S23, cumulative rainfall calculation: For a three-month period, the total rainfall is calculated to provide basic data for subsequent probability distribution fitting; the cumulative rainfall R is expressed as the sum of all rainfall in the period: Among them, P i is the rainfall on the i-th day, n is the number of days in the period; S24, probability distribution fitting: Select the gamma distribution model to fit the non-zero rainfall data and obtain the distribution parameters; the probability density function PDF of the gamma distribution is defined as: Where x>0, α is the shape parameter, β is the scale parameter, and Γ(α) is the gamma function. The calculation of SPI fits the distribution of cumulative rainfall R to the gamma distribution, and determines the optimal α and β parameters by maximum likelihood estimation MLE or other methods. S25, SPI value generation: The cumulative rainfall in each period is converted into the SPI value under the standard normal distribution through the gamma distribution cumulative distribution function CDF; the gamma distribution cumulative distribution function CDF is used to convert the cumulative rainfall in each period into the cumulative probability: The SPI value is calculated by converting the cumulative probability f(x; α, β) into the Z score of the standard normal distribution: SPI=Φ -1 (F(x;α,β)) (4) Among them, Φ -1 It is the inverse cumulative distribution function of the standard normal distribution, which is used to map the cumulative probability to the Z score, i.e., the SPI value; S26, Data classification and labeling: Based on the calculated SPI value, the hydrological conditions of each time period are classified into one of the following three types: Drought Label1: The SPI value is less than -1, indicating that the drought degree in this period is higher than the average level of the same season; Normal Label0: SPI values are between -1 and 1, indicating that the rainfall in this period is close to the average level of the same season; Waterlogging Label2: The SPI value is greater than 1, indicating that the rainfall in this period is much higher than the average level of the same season.
4. The soil waterlogging detection method based on SPI anomaly classification and automatic encoder according to claim 1 is characterized in that: S3 divides the soil waterlogging detection dataset into two types according to whether it is marked as waterlogging: Subtract the waterlogged soil dataset X from the soil waterlogged detection dataset X drought Get other soil data sets X regular , that is, X regular =XX drought .
5. The soil waterlogging detection method based on SPI anomaly classification and automatic encoder according to claim 1 is characterized in that: S4 Based on data other than waterlogging data X regular , build and train the autoencoder model, including: S41, build an autoencoder model: The autoencoder consists of two parts: the encoder Eecoder and the decoder Decoder; the encoder compresses the input data into a low-dimensional representation, and the decoder restores this low-dimensional representation to the original data, which is expressed by the following formula: Among them, X is the input data, E is the encoding mapping from the input data X to the hidden layer, and D is the decoding mapping from the hidden layer to the output layer; is the reconstructed version of the input data X; The learning process of the encoder and decoder is expressed using the following formula: h=f active (w1*X+b1) (6) Among them, h is the low-dimensional representation, w1 and w2 are weight matrices, b1 and b2 are bias vectors, and f active is the activation function; S42, uses rectified linear unit ReLU and hyperbolic tangent tanh as the activation function of the autoencoder; ReLU:f(x)=max{0,x} (8) Where x represents the input vector; S43, using mean absolute error MAE and root mean square error as the loss function of the model, the specific calculation formulas of MAE, RMSE and objective function are as follows: Among them, x i represents the i-th multidimensional data vector of the input, represents the i-th output vector, n1 is X regular The length of the dataset; S44, train and autoencoder model: use gradient descent algorithm and back propagation algorithm to optimize model parameters to minimize reconstruction error; reconstruction error Reconstruction_error is calculated using the following formula: S45, save the trained soil waterlogging detection automatic encoder, i.e., SFAE model.
6. The soil waterlogging detection method based on SPI anomaly classification and automatic encoder according to claim 1 is characterized in that: S5 uses the SFAE model to detect soil waterlogging in the area, including: S51, based on the soil waterlogging detection dataset, the SFAE model is applied to calculate and output the reconstruction error of each data; S52, sorting the data in descending order according to the calculated reconstruction error, and judging the first N data as waterlogging data; the selection of N follows the "3σ principle" of normal distribution test, that is, data points exceeding 3σ are considered to be outliers, where σ represents the standard deviation of the reconstruction error of the data.