Ground subsidence prediction method and system based on swarm intelligence optimization algorithm
Through the ground settlement prediction method based on the group intelligent optimization algorithm, the deep forest model and cloud monitoring system are used to solve the problems of rapid, accuracy and parameter differences in ground settlement prediction in the existing technology, and realize the different geographical locations and time scales. Accurate prediction and real-time monitoring.
Patent Information
- Application Number
- CN202411040920.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-07-31
AI Technical Summary
The existing ground settlement trend prediction methods require a variety of complex physical parameters, making it difficult to quickly and accurately predict real-time, especially when there are parameter differences in different settlement areas, assumptions are invalid.
Using the ground settlement prediction method based on the group intelligent optimization algorithm, data is collected through static level, combined with environmental characteristics, data sets are established, and deep forest models are used to predict, optimize hyperparameters to improve model performance, and deployed in the cloud for real-time monitoring and Early warning.
Accurate prediction results on different geographical locations and time scales are realized, the efficiency of model parameter space exploration is improved, the ability to remote monitoring and automated data processing is provided, and prediction accuracy and real-time monitoring are enhanced.
Smart Images

Figure BDA0004972362830000041 
Figure BDA0004972362830000045 
Figure BDA0004972362830000052
Abstract
Description
Technical Field
[0001] The present invention relates to the field of geological disaster monitoring and prediction, and in particular to a ground subsidence prediction method and system based on a swarm intelligence optimization algorithm. Background Art
[0002] In recent years, there have been more and more safety accidents and natural disasters caused by ground subsidence due to natural factors such as structural subsidence, earthquakes, volcanic activities, climate change, ground stress changes and natural consolidation of soil, as well as human factors such as the development and utilization of underground fluid resources (groundwater, geothermal, etc.), mining of solid minerals, karst collapse, and consolidation settlement related to engineering construction in soft soil areas. At present, all sectors of society are paying more and more attention to the dynamic monitoring and prediction of ground subsidence, so as to timely grasp the size of ground subsidence, judge the trend of ground subsidence, and effectively avoid or reduce the harm caused by ground subsidence.
[0003] At present, the method for predicting the trend of land subsidence generally adopts a method based on physical mechanism. Starting from the physical evolution process inside the subsidence, a series of complex physical parameters including soil characteristics and hydrological characteristics are obtained through field detection and experiments, and then the land subsidence is simulated and predicted. Common models include seepage model, soil deformation model, water-soil coupling model, etc. However, due to the need to apply multiple parameters, in many cases, strict assumptions need to be made for such methods before they can be applied. There are also differences in the parameters used in different subsidence areas, 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 ground subsidence prediction method and system based on a swarm intelligence optimization algorithm. Based on directly collected ground subsidence data and environmental characteristic data, a deep forest model is used to predict ground subsidence. The method and system can be directly applied to the prediction of different subsidence areas, and the prediction results can be obtained quickly and accurately, thereby realizing remote monitoring and automated data processing.
[0005] The technical solution adopted by the embodiment of the present invention to solve the technical problem is:
[0006] A land subsidence prediction method based on swarm intelligence optimization algorithm, comprising:
[0007] Step S1, using a static level to collect ground subsidence data, collecting environmental characteristic data of the location of the static level, and establishing a data set based on the ground subsidence data and the environmental characteristic data; the ground subsidence data includes longitude and latitude, timestamp and subsidence readings, and the environmental characteristic data includes daily rainfall, groundwater level, and soil type; a single time series sample in the data set is composed of longitude, latitude, current subsidence 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 subsidence value, the maximum subsidence value, and the minimum subsidence value, and the lag characteristics are the subsidence value of the previous day;
[0008] Step S2, establish a deep forest model and initialize the model hyperparameters, and use WPA-SA to optimize the hyperparameters of the deep forest model; the deep forest model uses mean square 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 of the tree, the minimum number of sample leaves of the tree, the maximum number of features of the tree, the number of trees in the completely random forest, and the maximum depth of the trees in the completely random forest;
[0009] Step S3, using the hyperparameters optimized by the WPA-SA algorithm to initialize the deep forest model, using the data set to optimize the deep forest model and store it, wherein the correlation coefficient COR, root mean square error RMSE and mean absolute error MAE indicators are used to evaluate the model;
[0010] Step S4, deploying the deep forest model to the cloud and encapsulating the model using container technology;
[0011] Step S5, establishing a monitoring and sensing system in the subsidence area, the monitoring and sensing system includes a static level, a GPS receiver, a rain gauge, a groundwater level meter, a data collector, a data transmission device, an edge computing device, and a cloud monitoring platform, regularly monitoring various indicators of ground subsidence and transmitting data, and building an end-edge-cloud collaborative architecture; based on the automated process set up in the cloud, pre-processing the data of each monitoring point in real time and inputting it into the deep forest model for batch prediction;
[0012] Step S6, post-processing the predicted data, setting the data interval 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;
[0013] Step S7, regularly establish an updated data set based on the historical ground subsidence data and environmental characteristic data within A days, retrain the deep forest model using the updated data set, and update the model on the cloud monitoring platform.
[0014] Preferably, the step S1 of establishing a data set based on the land subsidence data and the environmental characteristic data comprises:
[0015] Step S11, performing data preprocessing on the land subsidence data and the environmental characteristic data, processing missing values using linear interpolation, and processing abnormal values using the IQR method;
[0016] Step S12, extracting time features from the timestamp, calculating statistical features, creating hysteresis features, and adopting the minimum-maximum standardization method to standardize the time features, the statistical features, the hysteresis features, and the environmental feature data; the time features include the year, month, and day of the collection time, and the statistical features include the average settlement value, the maximum settlement value, and the minimum settlement value in the corresponding statistical period; the hysteresis feature is the settlement value of the previous day
[0017] Step S13, using the time series samples consisting of longitude, latitude, current sedimentation value, the time characteristics, statistical characteristics, lag characteristics, and environmental characteristics data, applying a sliding window algorithm, specifying the window size and sliding step length, the sliding step length is the same as the predicted number of days, and gradually sliding the window on all time series samples to extract subsequence samples, and the subsequence samples are used to construct the data set.
[0018] Preferably, the step S2 of optimizing the hyper parameters of the deep forest model using WPA-SA includes:
[0019] Step S21, initializing the position X of the wolf pack i , as well as the number of wolves N, the maximum number of iterations T max , wolf detection scale factor ε, distance determination factor ω, step size factor S and update scale 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 represents the position of the i-th wolf in the d-th dimension in 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, represents the initial position of the ith wolf in the dth dimension of the search space, and They represent the upper and lower bounds of the search space in the dth dimension, and r represents a random number between [0,1];
[0022] Step S22: Calculate the objective function value Y of each wolf:
[0023] Y=ω RMSE RMSE+ω MAE MAE-ω COR ·COR
[0024]
[0025] In the formula, ω RMSE ,ω MAE and ω COR Respectively represent the weights of the three indicators RMSE, MAE and COR, the three indicators are calculated based on the data set by applying K-fold cross validation, the data set is evenly divided into K subsets, K training and validation are performed, one of the subsets is selected as the validation set each time, and the remaining K-1 subsets are used as the training set, the RMSE, MAE and COR values of the K validations are calculated, and the average values of the three indicators are calculated respectively 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 wandering, rushing, or attacking behaviors and directly enters the next iteration until a wolf with a smaller objective function value appears. The position of the alpha wolf is represented by x lead , the objective function value is expressed as Y lead ;
[0027] Step S23: select the S with the smallest objective function value other than the alpha wolf num As a wolf explorer, S num is a range from A random integer, ε represents the scale factor of the search wolf; the search wolf performs wandering behavior in the search space according to the wandering formula:
[0028]
[0029] In the formula, x id is the current position of the ith wolf in the dth dimension of the search space, is the next position, p is the direction the wolf will move, h is the number of directions the wolf can move in, p∈[1,h], Indicates the stride length of the wolf;
[0030]
[0031] In the formula, S represents the step size factor, rand represents a random number between [0,1], and x id represents the current position of the wolf i, x lead Indicates the current position of the wolf leader; norm() indicates the Euclidean norm;
[0032] Repeat the wandering behavior in step 23 until the objective function value Y of a certain scout i reaches i <Y lead , let the first one that meets Y i <Y lead The wolf scout becomes the leader, making Y lead =Y i ; Or, the number of wanderings of each wolf reaches the maximum number of iterations T max When , go to step S24;
[0033] Step S24, randomly select M from the wolves other than the alpha wolf num wolves, among which M num =NS num -1, the wolf responds to the call of the alpha wolf according to the charging formula and charges towards the alpha wolf's location:
[0034]
[0035] In the formula, represents the position of wolf i in the dth dimension in the search space at the k+1th iteration, represents the position of wolf i in the dth dimension in the search space at the kth iteration, represents the position of the k-th generation group leader in the d-th dimension of the search space, Indicates the running stride length,
[0036] If wolf i is rushing towards the leader wolf, its objective function value Y i <Y lead , then let Y lead =Y i , wolf i replaces the alpha wolf and summons other wolves and executes the charge behavior on itself; if Y i ≥Y lead , the wolf continues to run until d is ≤d near , go to step S25; wherein, d is represents the distance between the fierce wolf i and the leader wolf s, ω represents the distance determination factor, max d and min d They represent the maximum and minimum values of the dth dimension of the search space, that is, the maximum and minimum values of the hyperparameters corresponding to the dth dimension;
[0037] Step S25, the exploratory wolf and the fierce wolf perform attack behaviors according to the attack formula:
[0038]
[0039] Among them, λ is a random number between [-1,1], represents the position of the prey in the dth dimension in the search space for the kth generation wolf pack, where the prey refers to the optimal solution in the search space, represents the attack step length,
[0040] When the wolf is performing an attack, if the wolf's objective function value is greater than the objective function value at the original position, the wolf's position is updated, otherwise, the wolf's position remains unchanged.
[0041] Step S26, update the position of the alpha wolf and the wolf pack, that is, remove the R wolves with the largest objective function value and randomly add R new wolves; Random value, where μ represents the update scale factor;
[0042] Step S27: The optimal solution obtained by the wolf pack algorithm is used as the initial solution of the simulated annealing algorithm, and the current number of cycles K and the maximum number of cycles K are set. max , initial annealing temperature T o , minimum temperature T min , cooling rate α and standard deviation σ, calculate the objective function value Y of the initial solution o ;
[0043] Step S28, applying Gaussian perturbation to the current solution, using a normal distribution with a mean of 0 and a standard deviation of σ to generate a random number for each dimension of the current solution, and adding each of the generated random numbers to each dimension of the current solution, generating a new solution in the neighborhood of the current solution, and calculating 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 go to step S210; otherwise, calculate the probability P of accepting the new solution. Generate a random number r between [0,1], if r<p is satisfied, accept the new solution, if not, reject the new solution, retain the current solution, and go to step S210;
[0045] Step S210, the current number of loops K is increased by 1, and it is determined whether the current number of loops K has reached the maximum number of loops K. max , if yes, go to step S211; otherwise, go 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 go to step S212. If T≤T is not satisfied min The current solution is retained, the current number of cycles K is reset, and the updated temperature T′ is calculated according to the cooling formula T′=α×T, and T=T′ is set, and the process goes to step S212;
[0047] Step S212, the calculation is completed, and the optimal hyperparameter combination is obtained as the hyperparameter of the deep forest model.
[0048] Preferably, the step S3 uses hyperparameters optimized by the WPA-SA algorithm to initialize the deep forest model, and optimizing the deep forest model using the data set includes:
[0049] Step S31, randomly dividing the data set into a training set, a validation set and a test set in proportion;
[0050] Step S32, inputting 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 layer of the deep forest model generates the n+1 layer new features based on the n layer new features generated by the n layer, it is transferred to the n+2 layer, n≥1, so that the features are transferred layer by layer. At the same time, after calculating the n+1 layer new features, the model performance Y is calculated using the validation set, 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, calculating the average value of the output values of all decision trees in the last layer as the prediction result of future land subsidence;
[0053] Preferably, the monitoring and sensing system in step S5:
[0054] The static level, the GPS receiver, the rain gauge, and the groundwater level meter are arranged at the measuring position of the settlement area of the monitoring point and are all connected to the data collector. The data collector is connected to the data transmission device. The data transmission device transmits the collected data to the cloud monitoring platform through 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 preprocessing data and transmitting it to the cloud monitoring platform.
[0055] Preferably, step S6, post-processing the predicted data includes: setting a data interval 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 of linear interpolation is:
[0057]
[0058] The way to deal with outliers using the IQR method is as follows: first determine the lower quartile Q1 and upper quartile Q3 of the data set; calculate the interquartile range IQR, IQR = Q3-Q1; determine the threshold of outliers: lower limit = Q1-1.5×IQR, upper limit = Q3+1.5×IQR; identify values below the lower limit or above the upper limit as outliers and replace them with the mean;
[0059] The expression of the min-max normalization method is:
[0060]
[0061] The data set was created using a sliding window algorithm with a window size of 14 days and a sliding step of 3 days.
[0062] Preferably, the expression of the MSE loss function is:
[0063]
[0064] Among them, n represents the number of training set samples, y i represents the true value, Represents the predicted value.
[0065] The present invention provides a monitoring and sensing system, characterized in that it includes a static level, a GPS receiver, a rain gauge, a groundwater level meter, a data collector, a data transmission device, an edge computing device, and a cloud monitoring platform, which are used to execute the aforementioned method.
[0066] It can be seen from the above technical scheme that the ground subsidence prediction method and system based on the swarm intelligence optimization algorithm provided by the embodiment of the present invention first use a static level to collect ground subsidence data, collect environmental characteristic data of the location of the static level, and establish a data set based on the ground subsidence data and the environmental characteristic data; establish a deep forest model and initialize the model hyperparameters, and use WPA-SA to optimize the hyperparameters of the deep forest model; use the hyperparameters optimized by the WPA-SA algorithm to initialize the deep forest model, use the data set to optimize the deep forest model and store it, wherein the correlation coefficient COR, root mean square error RMSE and mean absolute error MAE indicators are used to evaluate the model; deploy the deep forest model To the cloud and use container technology to encapsulate the model; establish a monitoring and sensing system in the settlement area, regularly monitor various indicators of ground settlement and transmit data, and build an end-edge cloud collaborative architecture; based on the automated process set up in the cloud, pre-process the data of each monitoring point in real time and input it into the deep forest model for batch prediction; post-process the predicted data, set the data interval corresponding to the warning level according to the settlement threshold, integrate the predicted data, warning level and map, create a dynamic monitoring dashboard, and realize real-time monitoring and warning; regularly establish an updated data set based on the historical ground settlement data and environmental feature data within A days, and use the updated data set to retrain the deep forest model, and update the model on the cloud monitoring platform. Through the scheme of the present invention, the efficiency of model parameter space exploration can be improved, the prediction accuracy of settlement values can be improved, accurate prediction results can be provided at different geographical locations and time scales, and remote monitoring and automated data processing can be realized. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 The present invention is a flow chart of the method for predicting ground subsidence based on a swarm intelligence optimization algorithm.
[0068] Figure 2 It is a schematic diagram of the linear interpolation principle of the present invention.
[0069] Figure 3 Schematic diagram of the IQR method principle 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 flow chart of the wolf pack algorithm of the present invention.
[0073] Figure 7 It is a flow chart 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 DESCRIPTION
[0075] The technical scheme and technical effects of the present invention are further elaborated in detail below in conjunction with the accompanying drawings of the present invention.
[0076] The present invention provides a ground subsidence prediction method based on a swarm intelligence optimization algorithm, which is implemented based on a monitoring and sensing system. The monitoring and sensing system consists of a static level, a GPS receiver, a rain gauge, a groundwater level meter, a data collector, a data transmission device, an edge computing device, and a cloud monitoring platform; the static level, the GPS receiver, the rain gauge, and the groundwater level meter are arranged at the measuring position of the settlement area of the monitoring point and are all connected to the data collector, the data collector is connected to the data transmission device, the data transmission device transmits the collected data to the cloud monitoring platform through wired or wireless signal transmission, and the cloud monitoring platform performs data analysis based on a deep forest model; the edge computing device is used for preprocessing data and transmitting it to the cloud monitoring platform; the wired method refers to using a network cable or a communication optical fiber to transmit data to an on-site dedicated storage device, such as a solid state drive (SSD) or a network attached storage (NAS) system, and the wireless method refers to sending data to the cloud monitoring platform through Wi-Fi or a cellular network (5G / 4G).
[0077] refer to Figure 1 As shown, the implementation steps include:
[0078] Step S1, using a static level to collect ground subsidence data, collect environmental characteristic data of the location of the static level, and establish a data set based on the ground subsidence data and environmental characteristic data; the ground subsidence data includes longitude and latitude, timestamp and subsidence readings, and the environmental characteristic data includes daily rainfall, groundwater level, and soil type; a single time series sample in the data set is composed of longitude, latitude, current subsidence 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 subsidence value, the maximum subsidence value, and the minimum subsidence value, and the lag characteristics are the subsidence value of the previous day;
[0079] Step S2, using Python language and based on the scikit-learn library to build a deep forest model and initialize the model hyperparameters, and using WPA-SA to optimize the hyperparameters of the deep forest model; the deep forest model uses the mean square 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 of the tree, the minimum number of sample leaves of the tree, the maximum number of features of the tree, the number of trees in the completely random forest, and the maximum depth of the trees in the completely random forest;
[0080] Step S3, using the hyperparameters optimized by the WPA-SA algorithm to initialize the deep forest model, using the data set to optimize the deep forest model and store it, wherein the correlation coefficient COR, root mean square error RMSE and mean absolute error MAE indicators are used to evaluate the model;
[0081] Step S4, deploying the deep forest model to the cloud and encapsulating 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 static level, a GPS receiver, a rain gauge, a groundwater level gauge, a data collector, a data transmission device, an edge computing device, and a cloud monitoring platform. Regularly monitor various indicators of ground subsidence and transmit data, and build an end-edge-cloud collaborative architecture. Based on the automated process set up in the cloud, pre-process the data of each monitoring point in real time and input it into the deep forest model for batch prediction.
[0083] Step S6, post-processing the predicted data, setting the data interval 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;
[0084] Step S7, regularly establish an updated data set based on the historical ground subsidence data and environmental characteristic data within A days, retrain the deep forest model using the updated data set, and update the model on the cloud monitoring platform.
[0085] The specific implementation method of step S1 to establish a data set based on land subsidence data and environmental characteristic data is as follows:
[0086] Step S11, preprocessing the land subsidence data and environmental characteristic data, using linear interpolation to process missing values, and using the IQR method to process abnormal values;
[0087] The expression of linear interpolation is:
[0088]
[0089] Where (x0, y0) is the coordinate of the first known point, (x1, y1) is the coordinate of the second known point, x is the horizontal coordinate of the position to be interpolated, and y is the estimated vertical coordinate at position x;
[0090] The way to deal with outliers using the IQR method is as follows: first determine the lower quartile Q1 (25th percentile) and upper quartile Q3 (75th percentile) of the data set; calculate the interquartile range IQR, IQR = Q3-Q1; determine the threshold of outliers: lower limit = Q1-1.5×IQR, upper limit = Q3+1.5×IQR; identify values below the lower limit or above the upper limit as outliers and replace them with the average;
[0091] Step S12, extracting time features from the timestamp, calculating statistical features, creating hysteresis features, and adopting the minimum-maximum standardization method to standardize the time features, statistical features, hysteresis features, and environmental feature data; the time features include the year, month, and day of the collection time, and the statistical features include the average settlement value, the maximum settlement value, and the minimum settlement value in the corresponding statistical period, and the statistical period is the current week or the current month; the hysteresis feature is the settlement value of the previous day (if the settlement value is measured multiple times on the previous day, the average value is taken as the settlement value of the previous day); the expression of the minimum-maximum standardization method is:
[0092]
[0093] In the formula, x min is the minimum value, x max is the maximum value, x norm It is the result after standardization;
[0094] Step S13, using the time series samples consisting of longitude, latitude, current sedimentation value, time characteristics, statistical characteristics, lag characteristics, and environmental characteristics data, applying the sliding window algorithm, specifying the window size and sliding step length, the sliding step length is the same as the number of predicted days, and gradually sliding the window on all time series samples to extract subsequence samples, and the subsequence samples are used to construct the data set.
[0095] The data set was created using a sliding window algorithm with a window size of 14 days and a sliding step of 3 days. The training set, validation set, and test set were randomly divided into training set, validation set, and test set in a ratio of 70%:15%:15%.
[0096] The deep forest model architecture is as follows Figure 4 As shown in the figure: The deep forest model is composed of a multi-layer decision tree ensemble. The first layer contains multiple independently trained decision trees, which are responsible for preliminary 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 uses multi-granularity scanning technology to generate features of different scales for decision tree analysis. The number of layers of the deep forest is adaptively adjusted according to the performance during the training process, and stops increasing when the new layer no longer improves the performance. The output of the final layer is integrated to obtain the final prediction result.
[0097] The WPA-SA algorithm is a hybrid swarm intelligence algorithm that combines the WolfPack Algorithm (WPA) and the Simulated Annealing Algorithm (SA). Figure 5 , Figure 6 and Figure 7 shown.
[0098] Step S2 uses WPA-SA to optimize the hyperparameters of the deep forest model, including:
[0099] Step S21, initializing the position X of the wolf pack i , as well as the number of wolves N, the maximum number of iterations T max , wolf detection scale factor ε, distance determination factor ω, step size factor S and update scale 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 represents the position of the i-th wolf in the d-th dimension in the search space, 1≤d≤D, 1≤i≤N, and the initial position of each dimension is initialized by random assignment:
[0100]
[0101] in, represents the initial position of the ith wolf in the dth dimension of the search space, and They represent the upper and lower bounds of the search space in the dth dimension, and r represents a random number between [0,1];
[0102] Step S22: Calculate the objective function value Y of each wolf (i.e., the performance of the deep forest model using the hyperparameter combination indicated by the wolf on the validation set):
[0103] Y=ω RMSE RMSE+ω MAE MAE-ω COR ·COR (4)
[0104]
[0105]
[0106] Among them, ω RMSE ,ω MAE and ω CORRepresents the weights of the three indicators RMSE, MAE and COR, which are calculated based on the K-fold cross validation of the data set. The data set is evenly divided into K subsets, and K training and validation are performed. Each time, one of the subsets is selected as the validation set, and the remaining K-1 subsets are used as the training set. The RMSE, MAE and COR values of the K validations are calculated, and the average values of the three indicators are calculated as the final RMSE, MAE and COR values of the hyperparameter combination; (such as Figure 8 As shown, the data set is divided into K subsets (K=5). For each subset, the remaining K-1 subsets are used for model training, the current subset is validated, and finally the average performance of K validations is calculated; based on the results of K-fold cross-validation, the best performing hyperparameter combination 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 wandering, rushing, or attacking behaviors and directly enters the next iteration until a wolf with a smaller objective function value appears. The position of the alpha wolf is represented by x lead , the objective function value is expressed as Y lead ;
[0108] Step S23: select the S with the smallest objective function value other than the alpha wolf. num As a wolf explorer, S num is a range from A random integer, ε represents the scale factor of the search wolf; the search wolf performs wandering behavior in the search space according to the wandering formula:
[0109]
[0110] In the formula, x id is the current position of the ith wolf in the dth dimension of the search space, is the next position, p is the direction the wolf will move, h is the number of directions the wolf can move in, p∈[1,h], Indicates the stride length of the wolf;
[0111]
[0112] Among them, S represents the step size factor, rand represents a random number between [0,1], and x id represents the current position of the wolf i, x lead Indicates the current position of the leader; norm() represents the Euclidean norm, that is, the distance between two position vectors;
[0113] Repeat the wandering behavior in step 23 until the objective function value Y of a certain scout i reaches i <Y lead , let the first one that meets Y i <Ylead The wolf scout becomes the leader, making Y lead =Y i ; Or, the number of wanderings of each wolf reaches the maximum number of iterations T max When , go to step S24;
[0114] Step S24, randomly select M from the wolves other than the alpha wolf num wolves, among which M num =NS num -1, the wolf responds to the call of the alpha wolf according to the charging formula and charges towards the alpha wolf's location:
[0115]
[0116] In the formula, represents the position of wolf i in the dth dimension in the search space at the k+1th iteration, represents the position of wolf i in the dth dimension in the search space at the kth iteration, represents the position of the k-th generation group leader in the d-th dimension of the search space, Indicates the running stride length,
[0117] If wolf i is rushing towards the leader wolf, its objective function value Y i <Y lead , then let Y lead =Y i , wolf i replaces the alpha wolf and summons other wolves and executes the charge behavior on itself; if Y i ≥Y lead , the wolf continues to run until d is ≤d near , go to step S25; wherein, d is represents the distance between the fierce wolf i and the leader wolf s, ω represents the distance determination factor, max d and min d They represent the maximum and minimum values of the dth dimension of the search space, that is, the maximum and minimum values of the hyperparameters corresponding to the dth dimension;
[0118] Step S25, the exploratory wolf and the fierce wolf perform attack behaviors according to the attack formula:
[0119]
[0120] In the formula, λ is a random number between [-1,1], represents the position of the prey in the dth dimension in the search space for the kth generation of wolves. The prey refers to the optimal solution in the search space. represents the attack step length,
[0121] When the wolf is performing an attack, if its objective function value is greater than the objective function value at its original position, the position of the wolf is updated; otherwise, the position of the wolf remains unchanged.
[0122] Step S26, update the position of the alpha wolf and the wolf pack, that is, remove the R wolves with the largest objective function value and randomly add R new wolves; Random value, where μ represents the update scale factor;
[0123] Step S27: The optimal solution obtained by the wolf pack algorithm is used as the initial solution of the simulated annealing algorithm, and the current number of cycles K and the maximum number of cycles K are set. max , initial annealing temperature T o , minimum temperature T min , cooling rate α and standard deviation σ, calculate the objective function value Y of the initial solution o ;
[0124] Step S28, applying Gaussian perturbation to the current solution, using a normal distribution with a mean of 0 and a standard deviation of σ to generate random numbers for each dimension of the current solution, and adding each generated random number to each dimension of the current solution, generating a new solution in the neighborhood of the current solution, and calculating 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 go to step S210; otherwise, calculate the probability P of accepting the new solution. Generate a random number r between [0,1], if r<p is satisfied, accept the new solution, if not, reject the new solution, keep the current solution, and go to step S210;
[0126] Step S210, the current loop number K is increased by 1 to determine whether the current loop number K has reached the maximum loop number K max If yes, go to step S211; otherwise, go to step S28;
[0127] Step S211, determine whether the current temperature T is less than the minimum temperature T min , if T≤T min Then go to step S212. If T≤T is not satisfied min The current solution is retained, the current number of cycles K is reset, and the updated temperature T′ is calculated according to the cooling formula T′=α×T, where α represents the cooling rate and T represents the current temperature. Let T=T′ and proceed to step S212;
[0128] Step S212, the calculation has been completed, and the optimal hyperparameter combination is obtained as the hyperparameter of the deep forest model.
[0129] The expression of the MSE loss function used in step S2 is:
[0130]
[0131] Among them, n represents the number of training set samples, y i represents the true value, 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 data set is as follows:
[0133] Step S31, randomly dividing the data set into a training set, a validation set and a test set in proportion;
[0134] Step S32, input the sample data in the training set into the first layer of the deep forest model, and the training batch is set to 128; 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;
[0135] Step S33, after the n+1 layer of the deep forest model generates the n+1 layer new features based on the n layer new features generated by the n layer, it is transferred to the n+2 layer, n≥1, forming a layer-by-layer feature transfer. At the same time, after calculating the n+1 layer new features, the model performance Y is calculated using the validation set, 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 further generate more advanced and complex new features, and the new features are passed layer by layer)
[0136] Step S34, calculating the average value of the output values of all decision trees in the last layer as the prediction result of future land subsidence;
[0137] Step S6 performs post-processing on the predicted data, specifically: setting data intervals corresponding to different warning levels according to multiple settlement thresholds, for example, setting red, orange and yellow warning levels according to the settlement thresholds; based on the data intervals and the corresponding warning levels, 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), creating a dynamic monitoring dashboard, and realizing real-time monitoring and early warning.
[0138] The present invention deploys the trained deep forest model to the cloud, uses Docker to encapsulate the model, and manages and expands it through Kubernetes services; establishes a monitoring and sensing system in the subsidence area, regularly monitors various ground subsidence indicators and adopts wired and wireless methods for data transmission. The wired method refers to the use of network cables or communication optical fibers to transmit data to on-site dedicated storage devices, such as solid-state drives (SSDs) or network-attached storage (NAS) systems, and the wireless method refers to sending data to the cloud via Wi-Fi or cellular networks (5G / 4G) to build an end-edge-cloud collaborative architecture; based on the automated process set up in the cloud, the data is pre-processed and then input into the deep forest model for batch prediction; in addition, the predicted data can be post-processed, and red, orange, and yellow warning levels can be set according to the settlement threshold. The predicted data and maps are integrated using ArcGIS or QGIS to create a dynamic monitoring dashboard to achieve real-time monitoring and early warning; an automated pipeline is established to introduce new data sets 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 perform 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 in different geographical locations and time scales;
[0141] Second, 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 improve the accuracy of model prediction;
[0142] 3. This method adopts an "end-edge-cloud" collaborative solution to achieve remote monitoring and automated data processing, and visualize real-time prediction results to provide data support for relevant decisions.
[0143] What is disclosed above is only a preferred embodiment of the present invention, which certainly cannot be used to limit the scope of rights of the present invention. A person skilled in the art can understand that all or part of the processes of the above embodiments and equivalent changes made according to the claims of the present invention still fall within the scope of the invention.
Claims
1. A land subsidence prediction method based on swarm intelligence optimization algorithm, characterized in that: include: Step S1, using a static level to collect ground subsidence data, collecting environmental characteristic data of the location of the static level, and establishing a data set based on the ground subsidence data and the environmental characteristic data; the ground subsidence data includes longitude and latitude, timestamp and subsidence readings, and the environmental characteristic data includes daily rainfall, groundwater level, and soil type; a single time series sample in the data set is composed of longitude, latitude, current subsidence 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 subsidence value, the maximum subsidence value, and the minimum subsidence value, and the lag characteristics are the subsidence value of the previous day; Step S2, establish a deep forest model and initialize the model hyperparameters, and use WPA-SA to optimize the hyperparameters of the deep forest model; the deep forest model uses mean square 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 of the tree, the minimum number of sample leaves of the tree, the maximum number of features of the tree, the number of trees in the completely random forest, and the maximum depth of the trees in the completely random forest; Step S3, using the hyperparameters optimized by the WPA-SA algorithm to initialize the deep forest model, using the data set to optimize the deep forest model and store it, wherein the correlation coefficient COR, root mean square error RMSE and mean absolute error MAE indicators are used to evaluate the model; Step S4, deploying the deep forest model to the cloud and encapsulating the model using container technology; Step S5, establishing a monitoring and sensing system in the subsidence area, the monitoring and sensing system includes a static level, a GPS receiver, a rain gauge, a groundwater level meter, a data collector, a data transmission device, an edge computing device, and a cloud monitoring platform, regularly monitoring various indicators of ground subsidence and transmitting data, and building an end-edge-cloud collaborative architecture; based on the automated process set up in the cloud, pre-processing the data of each monitoring point in real time and inputting it into the deep forest model for batch prediction; Step S6, post-processing the predicted data, setting the data interval 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; Step S7, regularly establish an updated data set based on the historical ground subsidence data and environmental characteristic data within A days, retrain the deep forest model using the updated data set, and update the model on the cloud monitoring platform.
2. The land subsidence prediction method based on swarm intelligence optimization algorithm according to claim 1 is characterized in that: The step S1 of establishing a data set based on the ground subsidence data and the environmental characteristic data comprises: Step S11, performing data preprocessing on the land subsidence data and the environmental characteristic data, processing missing values using linear interpolation, and processing abnormal values using the IQR method; Step S12, extracting time features from the timestamp, calculating statistical features, creating hysteresis features, and adopting the minimum-maximum standardization method to standardize the time features, the statistical features, the hysteresis features, and the environmental feature data; the time features include the year, month, and day of the collection time, and the statistical features include the average settlement value, the maximum settlement value, and the minimum settlement value in the corresponding statistical period; the hysteresis feature is the settlement value of the previous day Step S13, using the time series samples consisting of longitude, latitude, current sedimentation value, the time characteristics, statistical characteristics, lag characteristics, and environmental characteristics data, applying a sliding window algorithm, specifying the window size and sliding step length, the sliding step length is the same as the predicted number of days, and gradually sliding the window on all time series samples to extract subsequence samples, and the subsequence samples are used to construct the data set.
3. The land subsidence prediction method based on swarm intelligence optimization algorithm according to claim 2 is characterized in that: The step S2 uses WPA-SA to optimize the hyper parameters of the deep forest model, including: Step S21, initializing the position X of the wolf pack i , as well as the number of wolves N, the maximum number of iterations T max , wolf detection scale factor ε, distance determination factor ω, step size factor S and update scale 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 represents the position of the i-th wolf in the d-th dimension in the search space, 1≤d≤D, 1≤i≤N, and the initial position of each dimension is initialized by random assignment: In the formula, represents the initial position of the ith wolf in the dth dimension of the search space, and They represent the upper and lower bounds of the search space in the dth dimension, and r represents a random number between [0,1]; Step S22, calculate the objective function value Y of each wolf: Y=ω RMSE ·RMSE+ω MAE ·MAE-oh COR ·COR In the formula, ω RMSE ,ω MAE and ω COR Respectively represent the weights of the three indicators RMSE, MAE and COR, the three indicators are calculated based on the data set by applying K-fold cross validation, the data set is evenly divided into K subsets, K training and validation are performed, one of the subsets is selected as the validation set each time, and the remaining K-1 subsets are used as training sets, the RMSE, MAE and COR values of the K validations are calculated, and the average values of the three indicators are calculated respectively 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 wandering, rushing, or attacking behaviors and directly enters the next iteration until a wolf with a smaller objective function value appears. The position of the alpha wolf is represented by x lead , the objective function value is expressed as Y lead ; Step S23: select the S with the smallest objective function value other than the alpha wolf num As a wolf explorer, S num is a range from A random integer, ε represents the scale factor of the search wolf; the search wolf performs wandering behavior in the search space according to the wandering formula: In the formula, x id is the current position of the ith wolf in the dth dimension of the search space, is the next position, p is the direction the wolf will move, h is the number of directions the wolf can move in, p∈[1,h], Indicates the stride length of the wolf; In the formula, S represents the step size factor, rand represents a random number between [0,1], and x id represents the current position of the wolf i, x lead Indicates the current position of the wolf leader; norm() indicates the Euclidean norm; Repeat the wandering behavior in step 23 until the objective function value Y of a certain scout i reaches i <Y lead , let the first one that meets Y i <Y lead The wolf scout becomes the leader, making Y lead =Y i ; Or, the number of wanderings of each wolf reaches the maximum number of iterations T max When , go to step S24; Step S24, randomly select M wolves from the wolves other than the leader num wolves, among which M num =NS num -1, the wolf responds to the call of the alpha wolf according to the charging formula and charges towards the alpha wolf's location: In the formula, represents the position of wolf i in the dth dimension in the search space at the k+1th iteration, represents the position of wolf i in the dth dimension in the search space at the kth iteration, represents the position of the k-th generation group leader in the d-th dimension of the search space, Indicates the running stride length, If wolf i is rushing towards the leader wolf, its objective function value Y i <Y lead , then let Y lead =Y i , wolf i replaces the alpha wolf and summons other wolves and executes the charge behavior on itself; if Y i ≥Y lead , the wolf continues to run until d is ≤d near , go to step S25; wherein, d is represents the distance between the fierce wolf i and the leader wolf s, ω represents the distance determination factor, max d and min d They represent the maximum and minimum values of the dth dimension of the search space, that is, the maximum and minimum values of the hyperparameters corresponding to the dth dimension; Step S25, the exploratory wolf and the fierce wolf perform attack behaviors according to the attack formula: In the formula, λ is a random number between [-1,1], represents the position of the prey in the dth dimension in the search space for the kth generation wolf pack, where the prey refers to the optimal solution in the search space, represents the attack step length, When the wolf is performing an attack, if the objective function value of the wolf is greater than the objective function value at the original position, the position of the wolf is updated, otherwise, the position of the wolf remains unchanged; Step S26, update the position of the alpha wolf and the wolf pack, that is, remove the R wolves with the largest objective function value and randomly add R new wolves; Random value, where μ represents the update scale factor; Step S27: The optimal solution obtained by the wolf pack algorithm is used as the initial solution of the simulated annealing algorithm, and the current number of cycles K and the maximum number of cycles K are set. max , initial annealing temperature T o , minimum temperature T min , cooling rate α and standard deviation σ, calculate the objective function value Y of the initial solution o ; Step S28, applying Gaussian perturbation to the current solution, using a normal distribution with a mean of 0 and a standard deviation of σ to generate a random number for each dimension of the current solution, and adding each of the generated random numbers to each dimension of the current solution, generating a new solution in the neighborhood of the current solution, and calculating the objective function value Y′ corresponding to the new solution; 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 go to step S210; otherwise, calculate the probability P of accepting the new solution. Generate a random number r between [0,1], if r<p is satisfied, accept the new solution, if not, reject the new solution, retain the current solution, and go to step S210; Step S210, the current number of loops K is increased by 1, and it is determined whether the current number of loops K has reached the maximum number of loops K. max If yes, go to step S211; otherwise, go to step S28; Step S211, determine whether the current temperature T is less than the minimum temperature T min , if T≤T min Then go to step S212. If T≤T is not satisfied min The current solution is retained, the current number of cycles K is reset, and the updated temperature T′ is calculated according to the cooling formula T′=α×T, and T=T′ is set, and the process goes to step S212; Step S212, the calculation is completed, and the optimal hyperparameter combination is obtained as the hyperparameter of the deep forest model.
4. The method for predicting land subsidence based on swarm intelligence optimization algorithm according to claim 3, characterized in that: The step S3 uses the hyperparameters optimized by the WPA-SA algorithm to initialize the deep forest model, and the optimization of the deep forest model using the data set includes: Step S31, randomly dividing the data set into a training set, a validation set and a test set in proportion; Step S32, inputting 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 layer of the deep forest model generates the n+1 layer new features based on the n layer new features generated by the n layer, it is transferred to the n+2 layer, n≥1, so that the features are transferred layer by layer. At the same time, after calculating the n+1 layer new features, the model performance Y is calculated using the validation set, 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; Step S34, calculating the average value of the output values of all decision trees in the last layer as the prediction result of future ground subsidence.
5. The method for predicting land subsidence based on swarm intelligence optimization algorithm according to claim 4, characterized in that: The monitoring and sensing system of step S5: The static level, the GPS receiver, the rain gauge, and the groundwater level meter are arranged at the measurement position of the settlement area of the monitoring point and are all connected to the data collector, the data collector is connected to the data transmission device, and the data transmission device transmits the collected data to the cloud monitoring platform through wired or wireless signal transmission, and the cloud monitoring platform performs data analysis based on the deep forest model; The edge computing device is used for preprocessing data and transmitting it to the cloud monitoring platform.
6. The method for predicting land subsidence based on swarm intelligence optimization algorithm according to claim 5, characterized in that: Step S6 post-processes the predicted data, including: setting a data interval 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.
7. The method for predicting land subsidence based on swarm intelligence optimization algorithm according to claim 6, characterized in that: The expression of linear interpolation is: The way to deal with outliers using the IQR method is as follows: first determine the lower quartile Q1 and upper quartile Q3 of the data set; calculate the interquartile range IQR, IQR = Q3-Q1; determine the threshold of outliers: lower limit = Q1-1.5×IQR, upper limit = Q3+1.5×IQR; identify values below the lower limit or above the upper limit as outliers and replace them with the mean; The expression of the min-max normalization method is: The data set was created using a sliding window algorithm with a window size of 14 days and a sliding step of 3 days.
8. The method for predicting land subsidence based on swarm intelligence optimization algorithm according to claim 7, characterized in that: The expression of the MSE loss function is: In the formula, n represents the number of training set samples, y i represents the true value, Represents the predicted value.
9. A monitoring and sensing system, characterized in that: It includes a static level, a GPS receiver, a rain gauge, a groundwater level meter, a data collector, a data transmission device, an edge computing device, and a cloud monitoring platform, and is used to execute the ground subsidence prediction method based on the swarm intelligence optimization algorithm described in any one of claims 1-8.
Citation Information
Patent Citations
Wavelet weighted multi-modulus blind equalization method based on simulated annealing wolf pack optimization
CN107070825A
Orthogonal wavelet constant modulus blind equalization method based on IWPA (Improved Wolf Pack optimization Algorithm)
CN107124379A
Verification method of ship relative collision risk degree model
CN111061165A
Hybrid swarm intelligence deep learning model hyper-parameter optimization method
CN113128653A
Flexible job shop scheduling method based on improved wolf pack algorithm
CN113902173A
Cited By
Artificial forest carbon sink monitoring report automatic generation system and method
CN119691167A
