A ground subsidence prediction method and system based on a swarm intelligence optimization algorithm
By employing a land subsidence prediction method based on swarm intelligence optimization algorithms, utilizing a hydrostatic level and a deep forest model, and combining environmental characteristic data, the accuracy and applicability issues of existing land subsidence prediction technologies have been resolved, enabling rapid and accurate prediction and automated monitoring.
Patent Information
- Application Number
- CN202411040920.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2044-07-31
AI Technical Summary
Existing methods for predicting land subsidence require multiple parameters and are prone to assumption failure, making it difficult to make fast and accurate real-time predictions, especially due to their limited applicability in different subsidence zones.
A ground subsidence prediction method based on swarm intelligence optimization algorithm is adopted. Data is collected using a hydrostatic level, and a dataset is established by combining environmental characteristics. Prediction is performed using a deep forest model, and hyperparameters are optimized using the WPA-SA algorithm. An edge-cloud collaborative architecture is built to achieve automated data processing and real-time early warning.
It enables rapid and accurate prediction of ground subsidence in different subsidence zones, improves the efficiency of model parameter spatial exploration, provides accurate prediction results at different geographical locations and time scales, and supports remote monitoring and automated data processing.
Smart Images

Figure CN118982107B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of geological disaster monitoring and prediction, and in particular to a method and system for predicting ground subsidence based on a swarm intelligence optimization algorithm. Background Technology
[0002] Due to natural factors such as tectonic subsidence, earthquakes, volcanic activity, climate change, changes in geostress, and natural soil consolidation, as well as human factors such as the development and utilization of underground fluid resources (groundwater, geothermal energy, etc.), mining of solid minerals, karst collapse, and consolidation settlement related to engineering construction in soft soil areas, safety accidents and natural disasters caused by land subsidence have been increasing in recent years. Currently, all sectors of society are paying increasing attention to the dynamic monitoring and forecasting of land subsidence in order to promptly grasp the magnitude of land subsidence, assess its trends, and effectively avoid or reduce the hazards caused by land subsidence.
[0003] Currently, methods for predicting land subsidence trends generally employ physics-based approaches. These methods start from the internal physical evolution of subsidence and obtain a series of complex physical parameters, including soil and hydrological characteristics, through field testing and experiments. Common models include seepage models, soil deformation models, and water-soil coupling models. However, because these methods require the application of multiple parameters, strict assumptions are often necessary. The parameters used also differ for different subsidence zones, and these assumptions may sometimes fail. For example, due to the complex causes of land subsidence, it is difficult to quickly and accurately predict land subsidence data in real time. Summary of the Invention
[0004] In view of this, the present invention provides a land subsidence prediction method and system based on swarm intelligence optimization algorithm. Based on directly collected land subsidence data and environmental feature data, the method uses a deep forest model to predict land subsidence. It can be directly applied to the prediction of different subsidence areas, quickly and accurately obtain prediction results, and realize remote monitoring and automated data processing.
[0005] The technical solution adopted by the embodiments of the present invention to solve its technical problem is as follows:
[0006] A ground subsidence prediction method based on swarm intelligence optimization algorithm, comprising:
[0007] Step S1: Collect ground settlement data using a hydrostatic level and environmental characteristic data of the location of the hydrostatic level. Establish a dataset based on the ground settlement data and the environmental characteristic data. The ground settlement data includes latitude and longitude, timestamp, and settlement reading. The environmental characteristic data includes daily rainfall, groundwater level, and soil type. Each time series sample in the dataset consists of longitude, latitude, current settlement value, time characteristics, statistical characteristics, lag characteristics, and environmental characteristic data. The time characteristics include the year, month, and day of the collection time. The statistical characteristics include the average settlement value, maximum settlement value, and minimum settlement value. The lag characteristic is the settlement value of the previous day.
[0008] Step S2: Establish a deep forest model and initialize its hyperparameters. Optimize the hyperparameters of the deep forest model using WPA-SA. The deep forest model uses mean squared error (MSE) as the loss function. The hyperparameters include the number of forests in each cascade layer, the number of trees in each forest, the maximum depth of each tree, the Gini coefficient of the tree, the maximum number of layers in each cascade layer, the subsampling ratio, the minimum number of sample splits for a tree, the minimum number of sample leaves for a tree, the maximum number of features for a tree, the number of trees in a completely random forest, and the maximum depth of a tree in a completely random forest.
[0009] Step S3: Initialize the deep forest model using hyperparameters optimized by the WPA-SA algorithm, optimize the deep forest model using the dataset and store it, wherein the correlation coefficient COR, root mean square error RMSE and mean absolute error MAE are applied to evaluate the model.
[0010] Step S4: Deploy the deep forest model to the cloud and encapsulate the model using container technology;
[0011] Step S5: Establish a monitoring and sensing system in the subsidence area. The monitoring and sensing system includes a hydrostatic level, a GPS receiver, a rain gauge, a groundwater level gauge, a data acquisition device, a data transmission device, an edge computing device, and a cloud monitoring platform. Regularly monitor various indicators of ground subsidence and transmit the data, and build an edge-cloud collaborative architecture. Based on the automated process set in the cloud, the data from each monitoring point is preprocessed in real time and then input into the deep forest model for batch prediction.
[0012] Step S6: Post-process the predicted data, set the data range corresponding to the warning level according to the settlement threshold, integrate the predicted data, warning level and map, and create a dynamic monitoring dashboard to realize real-time monitoring and warning.
[0013] Step S7: Periodically establish an updated dataset based on historical intraday ground subsidence data and environmental characteristic data, retrain the deep forest model using the updated dataset, and update the model on the cloud monitoring platform.
[0014] Preferably, step S1, which establishes a dataset based on the ground subsidence data and the environmental characteristic data, includes:
[0015] Step S11: Perform data preprocessing on the ground subsidence data and the environmental feature data, using linear interpolation to handle missing values and using the IQR method to handle outliers.
[0016] Step S12: Extract time features from the timestamp, calculate statistical features, create lag features, and standardize the time features, statistical features, lag features, and environmental features using a min-max standardization method. The time features include the year, month, and day of the data collection time; the statistical features include the average, maximum, and minimum settlement values within the corresponding statistical period; and the lag features are the settlement values from the previous day.
[0017] Step S13: Using the time series samples composed of longitude, latitude, current settlement value, time characteristics, statistical characteristics, lag characteristics, and environmental characteristics, apply the sliding window algorithm, specify the window size and sliding step size, with the sliding step size being the same as the number of predicted days, and gradually slide the window over all time series samples to extract subsequence samples, which are used to construct the dataset.
[0018] Preferably, step S2, which optimizes the hyperparameters of the deep forest model using WPA-SA, includes:
[0019] Step S21, initialize the wolf pack's position X i And the number of wolves N, the maximum number of iterations T max The wolf detection scaling factor ε, distance determination factor ω, step size factor S, and update scaling factor μ; let the position of wolf i be X. i ={x i1 ,x i2 ,...,x id ,...,x iD}, where D represents the dimension of the search space, d represents a specific dimension in the search space, and x id Let represent the position of the i-th wolf in the d-th dimension of the search space, 1≤d≤D, 1≤i≤N, and the initial position of each dimension is initialized by random assignment:
[0020]
[0021] In the formula, This represents the initial position of the i-th wolf in the d-th dimension of the search space. and represent the upper and lower bounds of the search space in the d-th dimension, respectively, and r represents a random number between [0,1].
[0022] Step S22: Calculate the objective function value Y for each wolf:
[0023] Y = ω RMSE ·RMSE+ω MAE ·MAE-ω COR ·COR
[0024]
[0025] In the formula, ω RMSE ω MAE and ω COR The weights of RMSE, MAE, and COR are respectively. These three indicators are calculated based on the dataset using K-fold cross-validation. The dataset is evenly divided into K subsets, and K training and validation cycles are performed. Each time, one subset is selected as the validation set, and the remaining K-1 subsets are selected as the training set. The RMSE, MAE, and COR values of the K validation cycles are calculated, and the average of the three indicators is calculated as the final RMSE, MAE, and COR values of the hyperparameter combination.
[0026] The wolf with the smallest objective function value is selected as the alpha wolf. The alpha wolf does not perform any roaming, running, or attacking actions and proceeds directly to the next iteration until a wolf with an even smaller objective function value appears. The position of the alpha wolf is denoted as x. lead The objective function value is represented by Y. lead ;
[0027] Step S23, assign the S with the smallest objective function value other than the alpha wolf. num Sekiro as a scout, S num It is from the interval ε is a random integer, where ε represents the wolf-probe scaling factor; the wolf-probe performs a walking behavior in the search space according to the walking formula:
[0028]
[0029] In the formula, x id It is the current position of the i-th wolf in the d-th dimension of the search space. The next position is where p is the direction the wolf moves, and h is the number of possible directions to move in, where p∈[1,h]. Indicates the stride length of a wolf when it walks;
[0030]
[0031] In the formula, S represents the step size factor, rand represents a random number between [0,1], and x id Indicates the current position of Detective i, x lead This indicates the current position of the alpha wolf; norm() represents the Euclidean norm.
[0032] Repeat the walking behavior in step 23 until the objective function value Y of a certain wolf i is reached. i <Y lead This makes the first one to meet Y i <Y lead The scout wolf became the alpha wolf, making Y lead =Y i Alternatively, each wolf may reach the maximum number of iterations T by making all its moves. max Then, proceed to step S24;
[0033] Step S24: Randomly select M from the wolves other than the alpha wolf. num Only one wolf, of which M num =NS num -1, the wolf responds to the alpha wolf's call according to the sprint formula and performs a sprint towards the alpha wolf's location:
[0034]
[0035] In the formula, Let represent the position of wolf i in the (k+1)th iteration along the d-th dimension of the search space. This represents the position of wolf i in the d-th dimension of the search space during the k-th iteration. This represents the position of the alpha wolf of the k-th generation pack in the d-th dimension of the search space. Indicates the stride length of a sprint.
[0036] If wolf i is running towards the alpha wolf, its objective function value Y i <Y lead Then let Y lead =Y i Wolf i takes the place of the alpha wolf and summons the other wolves, then performs a sprint attack on itself; if Y i ≥Y lead The wolf will continue its attack until d is ≤d near Proceed to step S25; where d is This represents the distance between wolf i and alpha wolf s. ω represents the distance decision factor, max d and min d These represent the maximum and minimum values of the d-th dimension of the search space, respectively, which are the maximum and minimum values of the hyperparameters corresponding to the d-th dimension.
[0037] Step S25, the scout wolf and the fierce wolf execute the attack behavior according to the attack formula:
[0038]
[0039] Where λ is a random number between [-1, 1]. This represents the position of the prey in the d-th dimension of the search space for the k-th generation wolf pack, where the prey refers to the optimal solution in the search space. Indicates the attack step size.
[0040] During an attack, if the wolf's objective function value is greater than the objective function value at its original position, the wolf's position is updated; otherwise, the wolf's position remains unchanged.
[0041] Step S26: Update the alpha wolf's position and the wolf pack, that is, remove the R wolves with the largest objective function value and randomly add R new wolves; R is in Randomly selected values, where μ represents the update scaling factor;
[0042] Step S27: The optimal solution obtained by the wolf pack algorithm is used as the initial solution for the simulated annealing algorithm. The current iteration count K and the maximum iteration count K are set. max Initial annealing temperature T o Minimum temperature T min Given the cooling rate α and standard deviation σ, calculate the objective function value Y of the initial solution. o ;
[0043] Step S28: Apply Gaussian perturbation to the current solution, generate random numbers for each dimension of the current solution using a normal distribution with a mean of 0 and a standard deviation of σ, and add each of the generated random numbers to each dimension of the current solution to generate a new solution in the neighborhood of the current solution, and calculate the objective function value Y′ corresponding to the new solution;
[0044] Step S29: Determine whether the new objective function value Y′ is less than the initial objective function value Y. o If yes, accept the new solution and proceed to step S210; otherwise, calculate the probability P of accepting the new solution. Generate a random number r between [0,1]. If r < p, accept the new solution. If r < p, reject the new solution and retain the current solution. Proceed to step S210.
[0045] Step S210: Increment the current loop count K by 1, and determine whether the current loop count K has reached the maximum loop count K. max If yes, proceed to step S211; otherwise, proceed to step S28.
[0046] Step S211: Determine whether the current temperature T is less than the minimum temperature T. min If T≤T min Then proceed to step S212. If T≤T is not satisfied... min Then retain the current solution, reset the current cycle number K, calculate the updated temperature T′ according to the cooling formula T′=α×T, set T=T′, and proceed to step S212;
[0047] Step S212: The calculation is complete, and the optimal combination of hyperparameters is obtained as the hyperparameters of the deep forest model.
[0048] Preferably, step S3 initializes the deep forest model using hyperparameters optimized by the WPA-SA algorithm, and optimizes the deep forest model using the dataset, including:
[0049] Step S31: Based on the dataset, randomly divide it into training set, validation set and test set according to the proportion;
[0050] Step S32: Input the sample data in the training set into the first layer of the deep forest model; wherein, in the first layer of the deep forest model, each decision tree independently processes the sample data, performs regression analysis on the sample data according to the training rules of the deep forest model, generates new features of the sample data, and concatenates the generated new features with the original features of the sample data to obtain the first layer of new features, which are then passed to the next layer.
[0051] Step S33: After the (n+1)th layer of the deep forest model generates new features for the (n+1)th layer based on the new features generated by the nth layer, these features are passed to the (n+2)th layer, where n ≥ 1, thus forming a feature propagation layer by layer. Simultaneously, after calculating the (n+1)th layer's new features, the model performance Y is calculated using the validation set, where Y = ω. RMSE ·RMSE+ω MAE ·MAE-ω COR • COR; When the Y value of the new layer is less than that of the previous layer, stop increasing the number of layers and proceed to step S34;
[0052] Step S34: Calculate the average value of all decision tree outputs in the last layer as the prediction result for future ground subsidence;
[0053] Preferably, the monitoring and sensing system in step S5:
[0054] The hydrostatic level, the GPS receiver, the rain gauge, and the groundwater level gauge are arranged at the measurement positions in the settlement area of the monitoring point and are all connected to the data acquisition device. The data acquisition device is connected to the data transmission device, which transmits the collected data to the cloud monitoring platform via wired or wireless signal transmission. The cloud monitoring platform performs data analysis based on the deep forest model. The edge computing device is used for data preprocessing and transmission to the cloud monitoring platform.
[0055] Preferably, step S6, post-processing the predicted data includes: setting the data range corresponding to the warning level according to the settlement threshold, integrating the predicted data, warning level and map, creating a dynamic monitoring dashboard, and realizing real-time monitoring and warning.
[0056] Preferably, the expression for linear interpolation is:
[0057]
[0058] The IQR method is used to handle outliers as follows: First, determine the lower quartile Q1 and upper quartile Q3 of the dataset; calculate the interquartile range (IQR), IQR = Q3 - Q1; determine the thresholds for outliers: lower bound = Q1 - 1.5 × IQR, upper bound = Q3 + 1.5 × IQR; identify values below the lower bound or above the upper bound as outliers and replace them with the mean.
[0059] The expression for the min-max normalization method is:
[0060]
[0061] The dataset was created using the sliding window algorithm, with a window size of 14 days and a sliding step size of 3 days.
[0062] Preferably, the expression for the MSE loss function is:
[0063]
[0064] Where n represents the number of samples in the training set, y i Represents the true value. This represents the predicted value.
[0065] This invention provides a monitoring and sensing system, characterized in that it includes a hydrostatic level, a GPS receiver, a rain gauge, a groundwater level gauge, a data acquisition device, a data transmission device, an edge computing device, and a cloud monitoring platform, for executing the aforementioned method.
[0066] As can be seen from the above technical solution, the ground subsidence prediction method and system based on swarm intelligence optimization algorithm provided in this embodiment of the invention first collects ground subsidence data using a hydrostatic level and environmental characteristic data of the location of the hydrostatic level, and establishes a dataset based on the ground subsidence data and the environmental characteristic data; establishes a deep forest model and initializes the model hyperparameters, and optimizes the hyperparameters of the deep forest model using WPA-SA; initializes the deep forest model using the hyperparameters optimized by the WPA-SA algorithm, optimizes the deep forest model using the dataset and stores it, wherein the correlation coefficient (COR), root mean square error (RMSE), and mean absolute error (MAE) are applied to evaluate the model; and the deep forest model is deployed. The model is encapsulated in the cloud using container technology; a monitoring and sensing system is established in the subsidence area to regularly monitor various indicators of ground subsidence and transmit data, building an edge-cloud collaborative architecture; based on the automated process set in the cloud, the data from each monitoring point is preprocessed in real time and then input into the deep forest model for batch prediction; the predicted data is post-processed, and data intervals corresponding to the warning levels are set according to the subsidence threshold; the predicted data, warning levels, and maps are integrated to create a dynamic monitoring dashboard for real-time monitoring and warning; an updated dataset is regularly established based on historical A-day ground subsidence data and environmental characteristic data, and the deep forest model is retrained using the updated dataset, with model updates performed on the cloud monitoring platform. Through this invention, the efficiency of model parameter space exploration can be improved, the prediction accuracy of subsidence values can be increased, accurate prediction results can be provided at different geographical locations and time scales, and remote monitoring and automated data processing can be achieved. Attached Figure Description
[0067] Figure 1 This is a flowchart of the ground subsidence prediction method based on swarm intelligence optimization algorithm of the present invention.
[0068] Figure 2 This is a schematic diagram illustrating the linear interpolation principle of the present invention.
[0069] Figure 3 This is a schematic diagram illustrating the principle of the IQR method of the present invention.
[0070] Figure 4 This is the deep forest model architecture of the present invention.
[0071] Figure 5 This is a schematic diagram of the wolf pack algorithm of the present invention.
[0072] Figure 6 This is a flowchart of the wolf pack algorithm of the present invention.
[0073] Figure 7 This is a flowchart of the simulated annealing algorithm of the present invention.
[0074] Figure 8 This is a schematic diagram of the K-fold cross-validation principle of the present invention. Detailed Implementation
[0075] The technical solution and effects of the present invention will be further described in detail below with reference to the accompanying drawings.
[0076] This invention provides a land subsidence prediction method based on a swarm intelligence optimization algorithm. It is implemented using a monitoring and sensing system, which consists of a hydrostatic level, a GPS receiver, a rain gauge, a groundwater level gauge, a data acquisition unit, a data transmission device, an edge computing device, and a cloud monitoring platform. The hydrostatic level, GPS receiver, rain gauge, and groundwater level gauge are positioned at the measurement locations in the subsidence area of the monitoring point and are all connected to the data acquisition unit. The data acquisition unit is connected to the data transmission device, which transmits the collected data to the cloud monitoring platform via wired or wireless signal transmission. The cloud monitoring platform then performs data analysis based on a deep forest model. The edge computing device is used for data preprocessing and transmission to the cloud monitoring platform. Wired transmission refers to using network cables or optical fibers to transmit data to dedicated on-site storage devices, such as solid-state drives (SSDs) or network attached storage (NAS) systems. Wireless transmission refers to sending data to the cloud monitoring platform via Wi-Fi or cellular networks (5G / 4G).
[0077] refer to Figure 1 As shown, the implementation steps include:
[0078] Step S1: Collect ground settlement data using a hydrostatic level and environmental characteristic data of the location of the hydrostatic level. Establish a dataset based on the ground settlement data and environmental characteristic data. The ground settlement data includes latitude and longitude, timestamp, and settlement reading. The environmental characteristic data includes daily rainfall, groundwater level, and soil type. Each time series sample in the dataset consists of longitude, latitude, current settlement value, time characteristics, statistical characteristics, lag characteristics, and environmental characteristic data. The time characteristics include the year, month, and day of the collection time. The statistical characteristics include the average settlement value, maximum settlement value, and minimum settlement value. The lag characteristic is the settlement value of the previous day.
[0079] Step S2: A deep forest model is built using Python and the scikit-learn library, and the model hyperparameters are initialized. WPA-SA is then used to optimize the hyperparameters of the deep forest model. The deep forest model uses mean squared error (MSE) as the loss function. Hyperparameters include the number of forests in each cascade layer, the number of trees in each forest, the maximum depth of each tree, the Gini coefficient of the tree, the maximum number of layers in each cascade layer, the subsampling ratio, the minimum number of sample splits for a tree, the minimum number of sample leaves for a tree, the maximum number of features for a tree, the number of trees in a completely random forest, and the maximum depth of a tree in a completely random forest.
[0080] Step S3: Initialize the deep forest model using hyperparameters optimized by the WPA-SA algorithm, optimize the deep forest model using the dataset and store it, and evaluate the model using correlation coefficient (COR), root mean square error (RMSE), and mean absolute error (MAE).
[0081] Step S4: Deploy the deep forest model to the cloud and encapsulate the model using container technology;
[0082] Step S5: Establish a monitoring and sensing system in the subsidence area. The monitoring and sensing system includes a hydrostatic level, GPS receiver, rain gauge, groundwater level gauge, data acquisition device, data transmission device, edge computing device, and cloud monitoring platform. Regularly monitor various indicators of ground subsidence and transmit the data, and build an edge-cloud collaborative architecture. Based on the automated process set in the cloud, the data from each monitoring point is preprocessed in real time and then input into the deep forest model for batch prediction.
[0083] Step S6: Post-process the predicted data, set the data range corresponding to the warning level according to the settlement threshold, integrate the predicted data, warning level and map, and create a dynamic monitoring dashboard to realize real-time monitoring and warning.
[0084] Step S7: Regularly establish an updated dataset based on historical intraday ground subsidence data and environmental characteristic data, retrain the deep forest model using the updated dataset, and update the model on the cloud monitoring platform.
[0085] The specific implementation method for step S1, which establishes a dataset based on ground subsidence data and environmental characteristic data, is as follows:
[0086] Step S11: Perform data preprocessing on ground subsidence data and environmental characteristic data, using linear interpolation to handle missing values and using the IQR method to handle outliers.
[0087] The expression for linear interpolation is:
[0088]
[0089] In the formula, (x0, y0) are the coordinates of the first known point, (x1, y1) are the coordinates of the first known point, x is the x-coordinate of the position to be interpolated, and y is the y-coordinate estimated at position x;
[0090] The IQR method is used to handle outliers as follows: First, determine the lower quartile Q1 (25th percentile) and upper quartile Q3 (75th percentile) of the dataset; calculate the interquartile range (IQR), IQR = Q3 - Q1; determine the thresholds for outliers: lower bound = Q1 - 1.5 × IQR, upper bound = Q3 + 1.5 × IQR; values below the lower bound or above the upper bound are identified as outliers and replaced with the mean.
[0091] Step S12: Extract time features from the timestamps, calculate statistical features, create lag features, and standardize the time features, statistical features, lag features, and environmental features using the min-max standardization method. Time features include the year, month, and day of the data collection time; statistical features include the average, maximum, and minimum settlement values within the corresponding statistical period (week or month); lag features are the settlement values from the previous day (if multiple settlement measurements were taken on the previous day, the average is used); the expression for the min-max standardization method is:
[0092]
[0093] In the formula, x min It is the minimum value, x max It is the maximum value, x norm It is the result after standardization;
[0094] Step S13: Using time series samples composed of longitude, latitude, current settlement value, time characteristics, statistical characteristics, lag characteristics, and environmental characteristics, apply the sliding window algorithm, specify the window size and sliding step size, with the sliding step size being the same as the number of prediction days, and gradually slide the window over all time series samples to extract subsequence samples, which are then used to construct the dataset.
[0095] The dataset was created using the sliding window algorithm, with a window size of 14 days and a sliding step of 3 days. The dataset was then randomly divided into training, validation, and test sets in a ratio of 70%:15%:15%.
[0096] Deep forest model architecture such as Figure 4 As shown, the deep forest model consists of an ensemble of multiple decision trees. The first layer contains multiple independently trained decision trees, responsible for initial data processing and feature extraction. Each subsequent layer receives the output of the previous layer as input and further refines the feature representation. The model also employs multi-granularity scanning technology to generate features at different scales for analysis by the decision trees. The number of layers in the deep forest is adaptively adjusted based on the performance during training, and the number of layers stops increasing when a new layer no longer improves performance. The output of the final layer is used to obtain the final prediction result through an ensemble method.
[0097] The WPA-SA algorithm is a hybrid swarm intelligence algorithm that combines the Wolf Pack Algorithm (WPA) and Simulated Annealing (SA) algorithms. Its principle is as follows: Figure 5 , Figure 6 and Figure 7 As shown.
[0098] Step S2 involves optimizing the hyperparameters of the deep forest model using WPA-SA, including:
[0099] Step S21, initialize the wolf pack's position X i And the number of wolves N, the maximum number of iterations T max The wolf detection scaling factor ε, distance determination factor ω, step size factor S, and update scaling factor μ; let the position of wolf i be X. i ={x i1 ,x i2 ,...,x id ,...,x iD}, where D represents the dimension of the search space (i.e., the number of hyperparameters), d represents a specific dimension in the search space, and x id Let represent the position of the i-th wolf in the d-th dimension of the search space, 1≤d≤D, 1≤i≤N, and the initial position of each dimension is initialized by random assignment:
[0100]
[0101] in, This represents the initial position of the i-th wolf in the d-th dimension of the search space. and represent the upper and lower bounds of the search space in the d-th dimension, respectively, and r represents a random number between [0,1].
[0102] Step S22: Calculate the objective function value Y for each wolf (i.e., the performance of the deep forest model using the hyperparameter combination pointed to by that wolf on the validation set):
[0103] Y = ω RMSE ·RMSE+ω MAE ·MAE-ω COR ·COR (4)
[0104]
[0105]
[0106] Where, ω RMSE ω MAE and ω CORThe weights of RMSE, MAE, and COR represent the three metrics, calculated using K-fold cross-validation on the dataset. The dataset is evenly divided into K subsets of 3, and training and validation are performed K times. Each time, one subset is selected as the validation set, and the remaining K-1 subsets are used as the training set. The RMSE, MAE, and COR values are calculated after K validations, and the average of the three metrics is used as the final RMSE, MAE, and COR values for the hyperparameter combination. (e.g.) Figure 8 As shown, the dataset is divided into K subsets (K=5). For each subset, the model is trained using the remaining K-1 subsets, and the current subset is used for validation. Finally, the average performance of K validations is calculated. Based on the results of K-fold cross-validation, the hyperparameter combination with the best performance is selected as the final choice and recorded for subsequent training.
[0107] The wolf with the smallest objective function value is selected as the alpha wolf. The alpha wolf does not perform any roaming, running, or attacking actions and proceeds directly to the next iteration until a wolf with an even smaller objective function value appears. The position of the alpha wolf is denoted as x. lead The objective function value is represented by Y. lead ;
[0108] Step S23, select the wolf other than the alpha wolf that has the smallest objective function value. num Sekiro as a scout, S num It is from the interval ε is a random integer, where ε represents the wolf-probe scaling factor; the wolf-probe performs a walking behavior in the search space according to the walking formula:
[0109]
[0110] In the formula, x id It is the current position of the i-th wolf in the d-th dimension of the search space. The next position is where p is the direction the wolf moves, and h is the number of possible directions to move in, where p∈[1,h]. Indicates the stride length of a wolf when it walks;
[0111]
[0112] Where S represents the step size factor, rand represents a random number between [0,1], and x id Indicates the current position of Detective i, x lead This indicates the current position of the alpha wolf; norm() represents the Euclidean norm, which is the distance between two position vectors.
[0113] Repeat the walking behavior in step 23 until the objective function value Y of a certain wolf i is reached. i <Y lead This makes the first one to meet Y i <Ylead The scout wolf became the alpha wolf, making Y lead =Y i Alternatively, each wolf may reach the maximum number of iterations T by making all its moves. max Then, proceed to step S24;
[0114] Step S24: Randomly select M from the wolves other than the alpha wolf. num Only one wolf, of which M num =NS num -1, the wolf responds to the alpha wolf's call according to the sprint formula and performs a sprint towards the alpha wolf's location:
[0115]
[0116] In the formula, Let represent the position of wolf i in the (k+1)th iteration along the d-th dimension of the search space. This represents the position of wolf i in the d-th dimension of the search space during the k-th iteration. This represents the position of the alpha wolf of the k-th generation pack in the d-th dimension of the search space. Indicates the stride length of a sprint.
[0117] If wolf i is running towards the alpha wolf, its objective function value Y i <Y lead Then let Y lead =Y i Wolf i takes the place of the alpha wolf and summons the other wolves, then performs a sprint attack on itself; if Y i ≥Y lead The wolf will continue its attack until d is ≤d near Proceed to step S25; where d is This represents the distance between wolf i and alpha wolf s. ω represents the distance decision factor, max d and min d These represent the maximum and minimum values of the d-th dimension of the search space, respectively, which are the maximum and minimum values of the hyperparameters corresponding to the d-th dimension.
[0118] Step S25, the scout wolf and the fierce wolf execute the attack behavior according to the attack formula:
[0119]
[0120] In the formula, λ is a random number between [-1, 1]. This represents the position of the prey in the d-th dimension of the search space for the k-th generation wolf pack, where the prey refers to the optimal solution in the search space. Indicates the attack step size.
[0121] If a wolf's objective function value is greater than its original position during an attack, the wolf's position is updated; otherwise, the wolf's position remains unchanged.
[0122] Step S26: Update the alpha wolf's position and the wolf pack, that is, remove the R wolves with the largest objective function value and randomly add R new wolves; R is in Randomly selected values, where μ represents the update scaling factor;
[0123] Step S27: The optimal solution obtained by the wolf pack algorithm is used as the initial solution for the simulated annealing algorithm. The current iteration count K and the maximum iteration count K are set. max Initial annealing temperature T o Minimum temperature T min Given the cooling rate α and standard deviation σ, calculate the objective function value Y of the initial solution. o ;
[0124] Step S28: Apply Gaussian perturbation to the current solution, generate random numbers for each dimension of the current solution using a normal distribution with a mean of 0 and a standard deviation of σ, and add each generated random number to each dimension of the current solution to generate a new solution in the neighborhood of the current solution. Calculate the objective function value Y′ corresponding to the new solution.
[0125] Step S29: Determine whether the new objective function value Y′ is less than the initial objective function value Y. o If yes, accept the new solution and proceed to step S210; otherwise, calculate the probability P of accepting the new solution. Generate a random number r between [0,1]. If r < p, accept the new solution; otherwise, reject the new solution, retain the current solution, and proceed to step S210.
[0126] Step S210: Increment the current loop count K by 1, and determine whether the current loop count K has reached the maximum loop count K. max If yes, proceed to step S211; otherwise, proceed to step S28.
[0127] Step S211: Determine whether the current temperature T is less than the lowest temperature T. min If T≤T min Then proceed to step S212. If T≤T is not satisfied... min Then retain the current solution, reset the current loop count K, calculate the updated temperature T′ according to the cooling formula T′=α×T, where α represents the cooling rate and T represents the current temperature, let T=T′, and go to step S212;
[0128] Step S212: The calculation is complete, and the optimal combination of hyperparameters is obtained as the hyperparameters of the deep forest model.
[0129] The expression for the MSE loss function used in step S2 is as follows:
[0130]
[0131] Where n represents the number of samples in the training set, y i Represents the true value. This represents the predicted value.
[0132] Step S3 uses the hyperparameters optimized by the WPA-SA algorithm to initialize the deep forest model. The specific implementation of optimizing the deep forest model using the dataset is as follows:
[0133] Step S31: Based on the dataset, randomly divide it into training set, validation set and test set according to the proportion;
[0134] Step S32: Input the sample data in the training set into the first layer of the deep forest model, and set the training batch to 128; In the first layer of the deep forest model, each decision tree independently processes the sample data, performs regression analysis on the sample data according to the training rules of the deep forest model, generates new features of the sample data, and concatenates the generated new features with the original features of the sample data to obtain the new features of the first layer, which are then passed to the next layer.
[0135] Step S33: After the (n+1)th layer of the deep forest model generates new features for the (n+1)th layer based on the new features generated by the nth layer, these features are passed to the (n+2)th layer, where n ≥ 1, thus forming a feature propagation layer by layer. Simultaneously, after calculating the new features for the (n+1)th layer, the model performance Y is calculated using the validation set, where Y = ω. RMSE ·RMSE+ω MAE ·MAE-ω COR • COR; When the Y value of the new layer is less than that of the previous layer, stop increasing the number of layers and proceed to step S34; (The new features generated by the first layer are passed as input to the next layer to generate more advanced and complex new features, and the new features are passed layer by layer.)
[0136] Step S34: Calculate the average value of all decision tree outputs in the last layer as the prediction result for future ground subsidence;
[0137] Step S6 involves post-processing the predicted data as follows: setting data intervals corresponding to different warning levels based on multiple settlement thresholds, for example, setting three warning levels: red, orange, and yellow based on settlement thresholds; and using ArcGIS or QGIS to integrate the predicted data and maps (i.e., displaying the same color as the settlement warning level in the predicted area) to create a dynamic monitoring dashboard for real-time monitoring and early warning.
[0138] This invention deploys a trained deep forest model to the cloud, encapsulates the model using Docker, and manages and extends it through Kubernetes. A monitoring and sensing system is established in the subsidence area to regularly monitor various ground subsidence indicators and transmit data via wired and wireless methods. Wired methods use network cables or fiber optic cables to transmit data to dedicated on-site storage devices, such as solid-state drives (SSDs) or network-attached storage (NAS) systems. Wireless methods transmit data to the cloud via Wi-Fi or cellular networks (5G / 4G), establishing an edge-cloud collaborative architecture. Based on automated processes set up in the cloud, the data is preprocessed and then input into the deep forest model for batch prediction. Furthermore, the predicted data can be post-processed, and three warning levels (red, orange, and yellow) can be set according to the subsidence threshold. ArcGIS or QGIS is used to integrate the predicted data and maps to create a dynamic monitoring dashboard for real-time monitoring and early warning. An automated pipeline is established to introduce new datasets to update the model.
[0139] The present invention has the following advantages:
[0140] First, the deep forest model used in this method can adapt to changes in data characteristics and performs well in dynamic and complex geological environments. Therefore, this method can handle and adapt to various emergencies and environmental changes, and provide accurate prediction results at different geographical locations and time scales.
[0141] 2. This method uses the WPA-SA optimization algorithm to optimize the hyperparameters of the deep forest model, improve the efficiency of parameter space exploration, and enhance the model's prediction accuracy.
[0142] Third, this method adopts an "edge-cloud" collaborative solution to achieve remote monitoring and automated data processing, and visualize real-time prediction results to provide data support for relevant decision-making.
[0143] The above-disclosed embodiments are merely preferred embodiments of the present invention and should not be construed as limiting the scope of the invention. Those skilled in the art will understand that implementing all or part of the above-described embodiments and making equivalent changes in accordance with the claims of the present invention are still within the scope of the invention.
Claims
1. A method for predicting land subsidence based on a swarm intelligence optimization algorithm, characterized in that, include: Step S1: Collect ground settlement data using a hydrostatic level and environmental characteristic data of the location of the hydrostatic level. Establish a dataset based on the ground settlement data and the environmental characteristic data. The ground settlement data includes latitude and longitude, timestamp, and settlement reading. The environmental characteristic data includes daily rainfall, groundwater level, and soil type. Each time series sample in the dataset consists of longitude, latitude, current settlement value, time characteristics, statistical characteristics, lag characteristics, and environmental characteristic data. The time characteristics include the year, month, and day of the collection time. The statistical characteristics include the average settlement value, maximum settlement value, and minimum settlement value. The lag characteristic is the settlement value of the previous day. Step S2: Establish a deep forest model and initialize its hyperparameters. Optimize the hyperparameters of the deep forest model using WPA-SA. The deep forest model uses mean squared error (MSE) as the loss function. The hyperparameters include the number of forests in each cascade layer, the number of trees in each forest, the maximum depth of each tree, the Gini coefficient of the tree, the maximum number of layers in each cascade layer, the subsampling ratio, the minimum number of sample splits for a tree, the minimum number of sample leaves for a tree, the maximum number of features for a tree, the number of trees in a completely random forest, and the maximum depth of a tree in a completely random forest. Step S3, initializing the deep forest model using hyperparameters optimized by the WPA-SA algorithm, optimizing the deep forest model using the dataset, and storing it, specifically includes: Step S31: Based on the dataset, randomly divide it into training set, validation set and test set according to the proportion; Step S32: Input the sample data in the training set into the first layer of the deep forest model; wherein, in the first layer of the deep forest model, each decision tree independently processes the sample data, performs regression analysis on the sample data according to the training rules of the deep forest model, generates new features of the sample data, and concatenates the generated new features with the original features of the sample data to obtain the first layer of new features, which are then passed to the next layer. Step S33: After the (n+1)th layer of the deep forest model generates new features for the (n+1)th layer based on the new features generated by the nth layer, these features are passed to the (n+2)th layer, where n ≥ 1, thus forming a feature propagation layer by layer. Simultaneously, after calculating the (n+1)th layer's new features, the objective function value Y is calculated using the validation set. ; ; ; ; In the formula, , and They represent , and The weights of these three indicators; The number of layers in a deep forest model is determined using the objective function value Y. If the value is less than the previous level, stop increasing the number of levels and proceed to step S34. Step S34: Calculate the average value of all decision tree outputs in the last layer as the prediction result for future ground subsidence; Step S4: Deploy the deep forest model to the cloud and encapsulate the model using container technology; Step S5: Establish a monitoring and sensing system in the subsidence area. The monitoring and sensing system includes a hydrostatic level, a GPS receiver, a rain gauge, a groundwater level gauge, a data acquisition device, a data transmission device, an edge computing device, and a cloud monitoring platform. Regularly monitor various indicators of ground subsidence and transmit the data, and build an edge-cloud collaborative architecture. Based on the automated process set in the cloud, the data from each monitoring point is preprocessed in real time and then input into the deep forest model for batch prediction. Step S6: Post-process the predicted data, set the data range corresponding to the warning level according to the settlement threshold, integrate the predicted data, warning level and map, and create a dynamic monitoring dashboard to realize real-time monitoring and warning. Step S7: Periodically establish an updated dataset based on historical intraday ground subsidence data and environmental characteristic data, retrain the deep forest model using the updated dataset, and update the model on the cloud monitoring platform.
2. The land subsidence prediction method based on swarm intelligence optimization algorithm as described in claim 1, characterized in that, Step S1, which establishes a dataset based on the ground subsidence data and the environmental characteristic data, includes: Step S11: Perform data preprocessing on the ground subsidence data and the environmental feature data, using linear interpolation to handle missing values and using the IQR method to handle outliers. Step S12: Extract time features from the timestamp, calculate statistical features, create lag features, and standardize the time features, statistical features, lag features, and environmental features using a min-max standardization method. The time features include the year, month, and day of the data collection time; the statistical features include the average settlement value, maximum settlement value, and minimum settlement value within the corresponding statistical period; and the lag features are the settlement values from the previous day. Step S13: Using the time series samples composed of longitude, latitude, current settlement value, time characteristics, statistical characteristics, lag characteristics, and environmental characteristics, apply the sliding window algorithm, specify the window size and sliding step size, with the sliding step size being the same as the number of predicted days, and gradually slide the window over all time series samples to extract subsequence samples, which are used to construct the dataset.
3. The land subsidence prediction method based on swarm intelligence optimization algorithm as described in claim 2, characterized in that, Step S2, which optimizes the hyperparameters of the deep forest model using WPA-SA, includes: Step S21, initialize the wolf pack's position X i And the number of wolves N, the maximum number of iterations T max Wolf detection ratio factor Distance criterion factor Step size factor and update scaling factor ; Let the wolf The position is X i ={x i1 ,x i2 ,...,x id ,...,x iD }, where D represents the dimension of the search space. This represents a specific dimension in the search space. Indicates the first Sekiro in the search space The positions in each dimension are 1≤d≤D, 1≤i≤N, and the initial positions in each dimension are randomly assigned: ; In the formula, Indicates the first Sekiro in the search space Initial position in dimension and These represent the search space in the th order. The upper and lower bounds in the dimension, where r represents a random number between [0,1]; Step S22, calculate the objective function value Y for each wolf. In the formula, , and They represent , and The weights of these three indicators are calculated based on the dataset using K-fold cross-validation. The dataset is evenly divided into K subsets, and K training and validation cycles are performed. Each time, one subset is selected as the validation set, and the remaining K-1 subsets are selected as the training set. The RMSE, MAE, and COR values of the K validation cycles are calculated, and the average of the three indicators is calculated as the final RMSE, MAE, and COR values of the hyperparameter combination. The wolf with the smallest objective function value is selected as the alpha wolf. The alpha wolf does not perform any roaming, running, or attacking actions and proceeds directly to the next iteration until a wolf with an even smaller objective function value appears. The position of the alpha wolf is denoted as... The objective function value is expressed as ; Step S23, assign the S with the smallest objective function value other than the alpha wolf. num Sekiro as a scout, S num It is from the interval random integers, This represents the wolf-probe scaling factor; the wolf-probe performs a walking behavior in the search space according to the walking formula: ; In the formula, It is the first Sekiro in the Search Space Current position in dimension The next position is where p is the direction the wolf moves, and h is the number of possible directions to move in, where p∈[1,h]. Indicates the stride length of a wolf when it walks; ; In the formula, S represents the step size factor, rand represents a random number between [0,1], and x id Indicates the current position of Detective i, x lead This indicates the current position of the alpha wolf; norm() represents the Euclidean norm. Repeat the roaming behavior in step 23 until a scout wolf is spotted. The objective function value Y i <Y lead This makes the first one to meet Y i <Y lead The scout wolf became the alpha wolf, making Y lead =Y i Alternatively, each wolf may reach the maximum number of iterations T by making all its moves. max Then, proceed to step S24; Step S24: Randomly select M from the wolves other than the alpha wolf. num Only one wolf, of which M num =NS num -1, the wolf responds to the alpha wolf's call according to the sprint formula and performs a sprint towards the alpha wolf's location: ; In the formula, This indicates that the wolf i is in the search space during the (k+1)th iteration. Position in dimensions This represents the position of wolf i in the d-th dimension of the search space during the k-th iteration. This represents the position of the alpha wolf of the k-th generation pack in the d-th dimension of the search space. Indicates the stride length of a sprint. ; If wolf i is running towards the alpha wolf, its objective function value Y i <Y lead Then let Y lead =Y i Wolf i takes the place of the alpha wolf and summons the other wolves, then performs a sprint attack on itself; if Y i ≥Y lead The wolf will continue its attack until d is ≤d near Step S25; where d is This represents the distance between wolf i and alpha wolf s. , Represents the distance decision factor. and These represent the maximum and minimum values of the d-th dimension of the search space, respectively, which are the maximum and minimum values of the hyperparameters corresponding to the d-th dimension. Step S25, the scout wolf and the fierce wolf execute the attack behavior according to the attack formula: ; In the formula, λ is a random number between [-1, 1]. Indicates for the first In the context of a wolf pack, the prey's position in the d-th dimension of the search space refers to the optimal solution within that search space. Indicates the attack step size. ; During the attack process, if the wolf's objective function value is greater than the objective function value at its original position, the wolf's position is updated; otherwise, the wolf's position remains unchanged. Step S26: Update the alpha wolf's position and the wolf pack, that is, remove the R wolves with the largest objective function value and randomly add R new wolves; R is in Randomly selected values, where μ represents the update scaling factor; Step S27: The optimal solution obtained by the wolf pack algorithm is used as the initial solution for the simulated annealing algorithm. The current iteration count K and the maximum iteration count K are set. max Initial annealing temperature Minimum temperature Cooling rate and standard deviation Calculate the objective function value of the initial solution. ; Step S28: Apply a Gaussian perturbation to the current solution, using a mean of 0 and a standard deviation of... A normal distribution is used to generate random numbers for each dimension of the current solution, and each of the generated random numbers is added to each dimension of the current solution to generate a new solution in the neighborhood of the current solution. The objective function value corresponding to the new solution is then calculated. ; Step S29: Determine the new objective function value Is it less than the initial objective function value? If yes, accept the new solution and proceed to step S210; otherwise, calculate the probability of accepting the new solution. , Generate a random number between [0, 1]. If r < p is satisfied, the new solution is accepted; if r < p is not satisfied, the new solution is rejected, the current solution is retained, and the process proceeds to step S210. Step S210, current loop count Add 1 to determine the current loop count. Has the maximum number of iterations been reached? If yes, proceed to step S211; otherwise, proceed to step S28. Step S211, determine the current temperature Is it less than the minimum temperature? If satisfied Then proceed to step S212. If the condition is not met... Then retain the current solution and reset the current loop count. According to the cooling formula Calculate the updated temperature ,make Proceed to step S212; Step S212: The calculation is complete, and the optimal combination of hyperparameters is obtained as the hyperparameters of the deep forest model.
4. The land subsidence prediction method based on swarm intelligence optimization algorithm as described in claim 3, characterized in that, The monitoring and sensing system in step S5: The hydrostatic level, the GPS receiver, the rain gauge, and the groundwater level gauge are arranged at the measurement positions in the settlement area of the monitoring point and are all connected to the data acquisition device. The data acquisition device is connected to the data transmission device, which transmits the collected data to the cloud monitoring platform via wired or wireless signal transmission. The cloud monitoring platform then performs data analysis based on the deep forest model. The edge computing device is used for data preprocessing and transmission to the cloud monitoring platform.
5. The land subsidence prediction method based on swarm intelligence optimization algorithm as described in claim 4, characterized in that, Step S6 involves post-processing the predicted data, including setting the data range corresponding to the warning level based on the settlement threshold, integrating the predicted data, warning level, and map, and creating a dynamic monitoring dashboard to achieve real-time monitoring and warning.
6. The land subsidence prediction method based on swarm intelligence optimization algorithm as described in claim 5, characterized in that: The expression for linear interpolation is: ; The IQR method is used to handle outliers as follows: First, determine the lower quartile Q1 and upper quartile Q3 of the dataset; calculate the interquartile range (IQR), IQR = Q3 - Q1; determine the threshold for outliers: lower bound = Q1 - 1.5 × IQR, upper bound = Q3 + 1.5 × IQR; identify values below the lower bound or above the upper bound as outliers and replace them with the mean. The expression for the min-max normalization method is: ; The dataset was created using the sliding window algorithm, with a window size of 14 days and a sliding step size of 3 days.
7. The land subsidence prediction method based on swarm intelligence optimization algorithm as described in claim 6, characterized in that, The expression for the MSE loss function is: ; In the formula, This indicates the number of samples in the training set. Represents the actual value. This represents the predicted value.
8. A monitoring and sensing system, characterized in that, The device includes a hydrostatic level, a GPS receiver, a rain gauge, a groundwater level gauge, a data acquisition device, a data transmission device, an edge computing device, and a cloud monitoring platform, used to execute the ground subsidence prediction method based on swarm intelligence optimization algorithm as described in any one of claims 1-7.