A digital prediction method for surface subsidence of buildings
By combining diffusion models with quantum heuristic neural networks, multi-source data fusion and feature engineering are used to solve the shortcomings of traditional surface subsidence prediction methods, high-precision and intelligent surface subsidence prediction are achieved, and building safety assessment and engineering planning are supported.
Patent Information
- Application Number
- CN202510781454.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2045-06-12
AI Technical Summary
Traditional surface subsidence prediction methods have shortcomings in accuracy, timeliness and intelligence, and it is difficult to meet the needs of complex engineering environments.
The diffusion model is combined with quantum heuristic neural network, and accurate prediction of surface subsidence is achieved through multi-source data fusion, random forest processing anomaly data, graph neural network feature engineering and Kalman filtering.
It improves the accuracy and intelligence level of surface subsidence prediction, provides strong technical support for building safety assessment and engineering planning, and significantly improves prediction efficiency and accuracy.
Smart Images

Figure CN120296703B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the fields of mining and information technology, and specifically relates to a digital intelligent prediction method for surface subsidence of buildings. Background Art
[0002] With the rapid development of urban construction and the continued exploitation of underground resources, the problem of surface subsidence around buildings has become increasingly prominent. This surface subsidence not only poses a serious threat to the structural stability of buildings but also may pose a series of safety hazards. To mitigate the adverse effects of surface subsidence, filling techniques are commonly used to control surface subsidence. However, traditional prediction and assessment methods have significant shortcomings in accuracy, timeliness, and intelligence, making them difficult to meet the needs of complex engineering environments. Therefore, the development of a high-precision, intelligent surface subsidence prediction method has become an urgent task. Summary of the Invention
[0003] In order to solve the above problems, the present invention proposes a digital intelligent prediction method for surface subsidence of buildings, which combines the diffusion model with the quantum-inspired neural network. It aims to achieve accurate prediction of surface subsidence and comprehensive and objective evaluation of filling effects by integrating cutting-edge technologies and scientific algorithms.
[0004] The technical solutions of the present invention are as follows:
[0005] A method for predicting ground subsidence of buildings using digital intelligence, comprising the following steps:
[0006] Step 1: Collect multi-source data and perform multi-source data fusion based on the Kalman filter method;
[0007] Step 2: Process abnormal data based on random forest;
[0008] Step 3: Feature engineering and variable selection based on graph neural network;
[0009] Step 4: Predict surface subsidence based on the diffusion model and quantum-inspired neural network.
[0010] Furthermore, the specific process of step 1 is as follows:
[0011] Step 1.1. Collect data from multiple sources, including surface subsidence monitoring data, geological survey data, underground mining activity information, and detailed information about the building itself. Surface subsidence monitoring data includes the displacement of a surface point in the x, y, and z directions, as well as the rate of change of displacement. Geological survey data includes stratum structure and the physical and mechanical parameters of rock and soil. Underground mining activity information includes mining progress, mining methods, and mining depth. Detailed information about the building itself includes structural type, foundation form, and building materials.
[0012] Step 1.2: Use the Kalman filter method to integrate multi-source data and build a unified data format and coordinate system. The specific process is as follows:
[0013] Step 1.2.1: Model the surface subsidence system and determine the state equation and observation equation;
[0014] The state equation is:
[0015] ;
[0016] in, For the previous moment, For the current moment; 、 are the state vectors of the surface subsidence system at the current moment and the previous moment respectively; is the state transition matrix; is the control input matrix; is the control input vector at the previous moment; is the process noise vector at the previous moment;
[0017] The observation equation is:
[0018] ;
[0019] in, is the observation vector of all sensors at the current moment; is the observation matrix; is the observation noise vector at the current moment;
[0020] Step 1.2.2: Initialize the parameters; specifically: set the initial time The estimated state is , set the initial estimation error covariance matrix to ;
[0021] Step 1.2.3: Perform a Kalman filter iteration process at each moment. The iteration process includes a prediction step and an update step.
[0022] Step 1.2.4: Continue to iterate and complete data integration.
[0023] Furthermore, the specific process of step 1.2.3 is as follows:
[0024] The specific process of steps 1.2.3.1 and prediction step is as follows:
[0025] First, according to the state equation, calculate the prior state estimate at the current moment , the formula is:
[0026] ;
[0027] in, is the state estimate at the previous moment ;
[0028] Then, calculate the prior estimation error covariance matrix at the current moment , the formula is:
[0029] ;
[0030] in, is the error covariance matrix of the previous moment; is the transpose symbol; is the process noise covariance matrix;
[0031] The specific process of steps 1.2.3.2 and update steps is as follows:
[0032] First, calculate the Kalman gain at the current moment , the formula is:
[0033] ;
[0034] in, is the observation noise covariance matrix ;
[0035] Then, combined with the observation vector at the current moment To update the prior state estimate and obtain the optimal state estimate at the current moment , the formula is:
[0036] ;
[0037] Finally, update the estimated error covariance matrix at the current moment , the formula is:
[0038] ;
[0039] in, is the identity matrix;
[0040] In step 1.2.4, by repeating the prediction step and the update step, for each moment Perform iterative calculations. As time goes by, the Kalman filter continues to fuse the observation information of different sensors until When , we get the optimal state estimate at the final moment , That is the result of the fused data; is the total time;
[0041] Will The intermediate state estimation value in the Kalman filtering process, the original observation data of each sensor, the process and observation noise statistical information, the state transfer matrix and the related information of the observation matrix are combined to obtain the fused data set .
[0042] Furthermore, the specific process of step 2 is as follows:
[0043] Step 2.1, perform outlier detection on the fused dataset based on the box plot method to construct a training dataset;
[0044] Assume the fused dataset Include samples, each sample has features; traverse the fused dataset , mark all samples with abnormal values of features; There are samples with outliers, ; For the samples containing outliers, , will The outlier position of the feature is marked as empty;
[0045] Constructing input feature vector :
[0046] ;
[0047] in, For the The first sample containing outliers Features
[0048] At the same time, for this samples containing outliers, collect their The true value of each feature is used as the target variable when it is known that it is not missing. , build a training dataset :
[0049] ;
[0050] Step 2.2: Train the random forest model based on the training dataset.
[0051] Step 2.3: Perform outlier prediction.
[0052] Furthermore, the specific process of step 2.2 is as follows:
[0053] Step 2.2.1. For the training dataset , the self-service sampling method is used to generate the training sub-dataset for each decision tree; the process of the self-service sampling method is: for each decision tree to be constructed, Random sampling with replacement samples, and obtain the The training sub-dataset of a decision tree ;
[0054] Step 2.2.2, for A decision tree, from all Randomly select from the input features Features are used for node splitting, let A subset of features randomly selected by a decision tree for:
[0055] ;
[0056] in, For the The decision tree is used for node splitting The index of the feature, which corresponds to the first feature excluding the outliers A feature in the dataset after the feature column;
[0057] Step 2.2.3: Build a decision tree based on the training sub-dataset and the randomly selected feature subset;
[0058] If the predicted outlier is a discrete categorical data, the node splitting process uses the Gini coefficient to determine the best splitting feature and splitting point; at a certain node , let the category set be , is the number of categories, For the categories; nodes The sample set is ,node The total number of samples is , belonging to the node No. categories The number of samples is , then the node The Gini coefficient calculation formula is:
[0059] ;
[0060] in, is the Gini coefficient;
[0061] When considering feature splitting, it is assumed that the feature-based At a split point The node The sample set is divided into two parts and , the number of samples are and , then the Gini index after splitting is:
[0062] ;
[0063] in, is the Gini index after splitting;
[0064] Iterate over all randomly selected features And the corresponding split point, choose The smallest feature and split point are used as the optimal splitting method for the node. This process is repeated to split the decision tree nodes until the maximum depth is reached or the number of node samples is less than the preset sample number threshold.
[0065] If the predicted outlier is a continuous value, the mean square error is selected to determine the best splitting feature and splitting point; at the node , for the feature A split point , divide the sample into two parts and , and the corresponding means of the predicted target variables are and , then the mean square error after splitting is:
[0066] ;
[0067] in, is the mean square error after splitting; is the input feature vector; is the target variable;
[0068] Select so that The smallest feature and split point are split, and the decision tree is continuously constructed until the maximum depth is reached or the number of node samples is less than the preset sample number threshold;
[0069] Through the above process, we construct decision trees, forming a random forest model ; For the decision trees;
[0070] The specific process of step 2.3 is as follows:
[0071] First, for the first samples, and their corresponding input feature vectors Input into the trained random forest model in sequence Each decision tree in After the input feature vector reaches the leaf node, each decision tree takes the mean of the target variable corresponding to all samples in the leaf node as the predicted value of the sample;
[0072] Then, the estimated value of the outlier is determined by combining the predicted values of all decision trees for the sample. The formula is:
[0073] ;
[0074] in, For the Outlier estimate for samples; For the Decision tree The predicted value of the sample.
[0075] Furthermore, the specific process of step 3 is as follows:
[0076] Step 3.1: Build a graph neural network; node set in the graph neural network Contains multiple types of nodes, including monitoring point nodes , mining area nodes , building nodes Each monitoring point node contains its historical surface subsidence data sequence and geographic location information; the mining area node contains mining activity-related parameters and its geographic scope information; the building node contains the building's structural characteristics, weight information, and location information; the edges in the graph neural network include spatial relationship edges and temporal relationship edges;
[0077] The process of constructing spatial relationship edges is as follows:
[0078] For monitoring point nodes, if they are geographically adjacent, an undirected edge is established; the weight of the edge between monitoring point nodes is:
[0079] ;
[0080] in, For the , The weight of the edge between monitoring point nodes; It’s distance; 、 Respectively , Monitoring point nodes; is a non-zero positive number;
[0081] A directed edge is established between the mining area node and the monitoring point node within the mining influence range. The direction of the edge is from the mining area to the monitoring point, indicating the impact of mining activities on the surface subsidence of the monitoring point. The weight of the edge between the mining area node and the monitoring point node is:
[0082] ;
[0083] in, For the The mining area node and the The weight of the edge between monitoring point nodes; It is with The coefficient related to the mining characteristics of each mining area node; It is the current moment Mining Mining intensity index of each mining area node; For the mining area nodes;
[0084] The building node establishes an edge with the adjacent monitoring point node. The weight of the edge between the building node and the monitoring point node is:
[0085] ;
[0086] in, For the Building nodes With the Monitoring point nodes The weight of the edge between and It is a weight coefficient determined according to actual conditions, used to adjust the influence of building weight and foundation stiffness on edge weight; Indicates the weight of the building, represents the building foundation stiffness, Indicates the distance between the building and the monitoring point;
[0087] The construction process of the time relationship edge is as follows: a directed time edge is established between different time steps of the same monitoring point node; the weight of the edge between different time steps is set to 1;
[0088] Step 3.2: Build a spatiotemporal graph convolutional network.
[0089] Step 3.3: Construct a loss function and train the spatiotemporal graph convolutional network.
[0090] Step 3.4: Perform feature selection.
[0091] Furthermore, in step 3.2, the spatiotemporal graph convolutional network contains several layers, and the connection between layers is achieved by using the output of the previous layer as the input of the next layer; the spatiotemporal graph convolutional network includes a spatial convolution part and a temporal convolution part. The specific working process is as follows:
[0092] Step 3.2.1. For nodes In the To update the features of the layer, spatial convolution is performed first, and the formula is:
[0093] ;
[0094] in, For nodes In the Layer time step spatial characteristics; For nodes Neighbor nodes In the Layer time step spatial characteristics; For nodes In the Layer time step spatial characteristics; 、 Node , neighbor nodes The set of spatial neighbor nodes; is a node The set of temporal neighbor nodes; is a node The set of time neighbor nodes A time step identifier in ; It is The spatial weight matrix of the layer; It is The temporal weight matrix of the layer; is the activation function; let Representation node At time step The spatial characteristics of is a node Neighbor nodes At time step spatial characteristics;
[0095] Step 3.2.2, then perform time convolution, the formula is:
[0096] ;
[0097] in, Representation node In the Layer time step Temporal characteristics; is the weight of the time edge; It is The temporal convolution weight matrix of the layer; For nodes In the Layer time step Temporal characteristics;
[0098] Step 3.2.3, finally, the results of spatial convolution and temporal convolution are fused to obtain the node at the first Layer fusion features:
[0099] ;
[0100] in, For nodes In the Layer time step The fusion characteristics of is a fusion coefficient.
[0101] Furthermore, in step 3.3, a fully connected layer is connected to the output features of the spatiotemporal graph convolutional network to obtain the prediction result; The training data of graph samples is used, and the mean square error is used as the loss function :
[0102] ;
[0103] in, It is The actual surface subsidence value of each sample; It is The predicted surface subsidence value of each map sample;
[0104] Use the backpropagation algorithm to update the weights of each layer in the spatiotemporal graph convolutional network to minimize the loss function; use the gradient descent method for updating:
[0105] ;
[0106] in, For the Update weights of the layer; For the layer weights; is the learning rate;
[0107] In step 3.4, the trained spatiotemporal graph convolutional network has the output of the last layer are the extracted features related to surface subsidence, For nodes In the Layer time step The fusion characteristics of is the total number of layers; feature selection is performed by calculating the correlation between these features and the predicted surface subsidence value; the Pearson correlation coefficient is used to measure the correlation between each feature and the predicted surface subsidence value. The feature dimension obtained after calculation of the spatiotemporal graph convolutional network of the layer is No. Features and predicted surface subsidence values , the calculation formula of Pearson correlation coefficient is:
[0108] ;
[0109] in, The feature dimension is No. Features and predicted surface subsidence values Pearson correlation coefficient; For passing After the spatiotemporal graph convolutional network of the layer is calculated, the In the graph samples, the feature dimension is No. Features at time step The characteristic value when For a batch containing In the training data of graph samples, The feature dimension obtained after calculation of the spatiotemporal graph convolutional network of the layer is No. Features at time step The average value of the eigenvalues when ; For a batch containing The average value of the predicted surface subsidence value in the training data of the map samples;
[0110] Calculate the Pearson correlation coefficient between each feature and the predicted surface subsidence value, and sort the features in descending order according to the Pearson correlation coefficient. features as feature variables.
[0111] Furthermore, the specific process of step 4 is as follows:
[0112] Step 4.1: Generate the starting sample based on the forward diffusion process; the specific process is as follows:
[0113] Step 4.1.1, determine the number of forward diffusion steps and noise parameters; forward diffusion steps for:
[0114] ;
[0115] in, Indicates rounding up; The number of forward diffusion steps based on and are different adjustment factors; is the forecast time frame; is a measure of data uncertainty;
[0116] Noise scheduling parameters for:
[0117] ;
[0118] in, is the time step in the forward diffusion process; is the minimum value of the set noise scheduling parameter;
[0119] Step 4.1.2, the forward diffusion process is expressed as:
[0120] ;
[0121] in, 、 The time steps in the forward diffusion process are 、 The noise sample vector generated when The time step is Noise scheduling parameters when ; The time step is The noise vector at time ;
[0122] Repeat the forward diffusion process times, get the starting sample ;
[0123] Step 4.2: Generate a feature variable sequence using the back-diffusion process based on the quantum-inspired neural network. The specific process is as follows:
[0124] Step 4.2.1. Initialize the quantum-inspired neural network parameters.
[0125] First, The qubit representation is performed as the input feature vector; the initialization formula of the qubit state is as follows:
[0126] ;
[0127] ;
[0128] ;
[0129] in, To initialize the angular parameters of the quantum bit state; is the loop index variable; , Indicates rounding down. Reflects the dimension of Map to A grouping or partitioning parameter for qubits; for No. elements; 、 The time steps are The first , qubit states; The time step is The quantum bit state at ; represents the tensor product of quantum states;
[0130] Then, a quantum-inspired gate operation layer is constructed based on quantum rotation gates and quantum controlled NOT gates;
[0131] The formula for the effect of a quantum rotation gate on a single quantum bit is:
[0132] ;
[0133] in, It is a quantum revolving door; is the rotation angle;
[0134] The matrix representation of the quantum controlled NOT gate is:
[0135] ;
[0136] in, For the The qubit controls the A quantum control NOT gate for the states of qubits;
[0137] The first quantum-inspired gate operation layer The matrix representation of is:
[0138] ;
[0139] in, Control the first qubit The rotation angle of the quantum bit state;
[0140] The quantum-inspired gate operation layer has Layer, according to The process of building other layers; quantum-inspired gate operation layer Contains different combinations of quantum gate operations. The parameters of these gates are determined during the training process and loaded directly during prediction.
[0141] Step 4.2.2, back diffusion iteration;
[0142] from To begin, first Input into quantum-inspired neural network for noise estimation;
[0143] At the quantum bit representation level, Converted to quantum state Afterwards, feature transformation is performed through a quantum-inspired gate operation layer;
[0144] for , ,in , that is, the initial quantum bit state After the first quantum-inspired gate operation layer Get the first quantum bit state ;for , ; and so on, until , ; 、 Respectively , qubit states; For the quantum-inspired gate operation layers; the sequence number of the quantum bit state corresponds to the sequence number of the quantum gate operation layer;
[0145] In passing After a quantum-inspired gate operation layer, the quantum bit state of the last layer is measured using quantum measurement methods. Perform quantum state conversion to obtain classical probability distribution ;
[0146] Will Convert to an estimated noise vector of the same dimension as the noise vector ; Assume that the weight matrix of the fully connected layer is , the bias vector is ,but:
[0147] ;
[0148] in, is the estimated noise vector No. Quantity for No. element pairs No. The weight of each component; for No. elements; for The elements;
[0149] Then update the sample according to the back diffusion formula to obtain the predicted sample vector:
[0150] ;
[0151] in, 、 The time steps in the reverse diffusion process are 、 The prediction sample vector generated when The time step is Noise scheduling parameters when ; The time step is The estimated noise vector when ;
[0152] Repeat the above steps to Gradually decrease to , and obtain the predicted surface subsidence related characteristic variable sequence ; It is the prediction sample vector generated when the time step is 0 during the back diffusion process;
[0153] Step 4.3, extracting the predicted value of surface subsidence;
[0154] Step 4.4, training the surface subsidence prediction model;
[0155] Step 4.5: Input the real-time collected surface subsidence monitoring data, geological survey data, underground mining activity information, and detailed information of the building itself into the trained surface subsidence prediction model to predict surface subsidence.
[0156] Furthermore, the specific process of step 4.3 is as follows:
[0157] The predicted surface subsidence-related characteristic variable sequence is redefined as , build a linear regression model:
[0158] ;
[0159] in, is the predicted surface subsidence; is the regression coefficient, reflecting the characteristic variables Amount of surface subsidence the extent of the impact; is the error term;
[0160] Building a Design Matrix :
[0161] ;
[0162] in, is the sample size; For the The first sample feature variables; target vector ,in It is The actual surface subsidence corresponding to the sample;
[0163] Calculate the estimated value of the regression coefficient according to the least squares method :
[0164] ;
[0165] ;
[0166] ;
[0167] in, For the The first sample characteristic variables; For the The actual surface subsidence corresponding to the sample;
[0168] Finally Substituting into the linear regression model, we get the final predicted surface subsidence:
[0169] ;
[0170] in, is the final predicted surface subsidence;
[0171] In step 4.4, the loss function of the surface subsidence prediction model is constructed for:
[0172] ;
[0173] in, Express expectations, For different time steps , surface subsidence related characteristic variable sequence and noise vector Find the expectation of the joint distribution of; 、 The time steps are Noise vector and estimated noise vector at time ;
[0174] The Adam optimization algorithm is used to update the parameters in the quantum-inspired neural network. The update formula is as follows:
[0175] Compute first-order and second-order moment estimates of the gradient:
[0176] ;
[0177] ;
[0178] in, 、 The time steps First-order moment estimation and second-order moment estimation; 、 The time steps First-order moment estimation and second-order moment estimation; is the time step gradient; and are the decay rate hyperparameters of the first-order moment estimate and the second-order moment estimate, respectively;
[0179] Modified first-order moment estimates and second-order moment estimates:
[0180] ;
[0181] ;
[0182] in, 、 The time steps The modified first-order moment estimate and second-order moment estimate of ; 、 The time steps Decay rate hyperparameters for first-order moment estimation and second-order moment estimation;
[0183] Update the surface subsidence prediction model parameters:
[0184] ;
[0185] in, 、 The time steps , time step Parameters of surface subsidence prediction model when ; is the learning rate;
[0186] Repeat the process of forward diffusion, backward diffusion, loss calculation, and parameter update until the preset number of training rounds is reached or the loss function converges to a preset threshold, and output the trained surface subsidence prediction model.
[0187] The beneficial technical effects of the present invention include: in data processing, the Kalman filter method is used to fuse multi-source data, greatly improving data accuracy and completeness, fully integrating multi-channel data resources such as various sensors and geographic information, and laying the foundation for precise analysis; the random forest-based abnormal data processing effectively identifies and corrects outliers, ensuring the reliability of data quality and preventing erroneous data from misleading subsequent analysis. In feature engineering, feature engineering and variable selection are carried out with the help of graph neural networks to accurately extract characteristic variables that have a key impact on surface subsidence, reducing data dimensionality while improving model training efficiency and prediction accuracy. The surface subsidence prediction process based on the diffusion model and quantum-inspired neural network fully utilizes the data generation advantages of the diffusion model and the powerful feature learning and processing capabilities of the quantum-inspired neural network to achieve more accurate prediction of building surface subsidence, thereby providing valuable basis and technical support for building safety assessment, engineering planning, and disaster prevention, effectively promoting the development of related fields towards intelligence and efficiency, and significantly improving the technical level and practical results of the entire building surface subsidence prediction and related application fields. BRIEF DESCRIPTION OF THE DRAWINGS
[0188] Figure 1 The figure is a flow chart of the method for digitally predicting ground subsidence of buildings according to the present invention. DETAILED DESCRIPTION
[0189] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:
[0190] The present invention aims to accurately predict the surface subsidence of buildings and provide strong support for building safety. It proposes a surface subsidence digital prediction method based on diffusion model and quantum heuristic neural network. The specific technical ideas are as follows: first, multi-source data collection and multi-source data fusion based on Kalman filtering are carried out. By widely deploying various sensors to obtain rich data, and integrating relevant system and design parameter data, the multi-source data is fused using Kalman filtering to reduce data errors and uncertainties; then, the abnormal data processing is based on random forest, and part of the fused data is selected as the training set, and a variety of feature vectors are extracted to train the random forest. Forest model is used to determine abnormal data and perform corresponding processing to ensure data quality. Feature engineering and variable selection are then carried out based on graph neural networks. Key elements of the building and its surroundings are abstracted into graph nodes and assigned features. Edges between nodes are constructed and weights are determined. Graph neural networks are used to screen out feature variables with high correlation with surface subsidence, thereby improving model training efficiency and prediction accuracy. Finally, surface subsidence prediction is achieved based on a diffusion model and quantum-inspired neural networks. After determining relevant parameters, forward and reverse diffusion is performed. The predicted surface subsidence-related feature variable sequence is obtained through operations such as quantum measurement, and the predicted surface subsidence amount is obtained through post-processing. The present invention comprehensively utilizes multiple advanced technologies and methods to effectively and accurately predict the surface subsidence of buildings, providing a strong technical guarantee for building safety.
[0191] like Figure 1 As shown, a digital intelligent prediction method for surface subsidence of buildings includes the following steps:
[0192] Step 1: Multi-source data collection and multi-source data fusion based on Kalman filtering. Specifically includes the following steps:
[0193] Step 1.1. Multi-source data collection. Collect surface subsidence monitoring data: Deploy a high-density monitoring point around the building and in potentially affected areas. Use high-precision measuring instruments such as intelligent total stations, the BeiDou Satellite Positioning System (BDS), and synthetic aperture radar interferometry (InSAR) to conduct frequent surface subsidence monitoring. This will generate high-precision spatiotemporal data, including the displacement of a surface point in the x, y, and z directions, as well as the rate of change of displacement. Simultaneously, collect geological survey data (including stratigraphic structure, physical and mechanical parameters of rock and soil), information on underground mining activities (such as mining progress, mining methods, and mining depth), and detailed information on the building itself (such as structural type, foundation form, and building materials).
[0194] Step 1.2: Multi-source data fusion. Using the Kalman filter method, the multi-source heterogeneous data is integrated to build a unified data format and coordinate system, laying the foundation for subsequent analysis and processing.
[0195] Step 1.2.1: System Modeling: First, the dynamic system of surface subsidence under study needs to be modeled and its state equation and observation equation determined.
[0196] Step 1.2.1.1. Construct the state equation. Assume that the state vector of the surface subsidence system at the current moment is (For example It can contain state information such as the displacement of a point on the surface in the x, y, and z directions and the displacement change rate. Its state transition satisfies a linear relationship, and the state equation can be expressed as:
[0197] ;
[0198] in, It is the state transfer matrix, which describes the state change law of the system from the previous moment to the current moment. It depends on factors such as the physical characteristics of the surface subsidence system itself. For the previous moment, For the current moment. is the state vector at the previous moment. For example, if the state vector at the current moment is ( is the state vector dimension, such as ,but 、 、 and represent the displacement and displacement change rate in the x, y, and z directions respectively), then It's just one The matrix of the state transfer matrix Rank Elements of a column Reflects the previous moment State vector of the column For the current moment State vector of the row degree of impact. is the transpose symbol. It is the control input matrix. In some cases, if there are external control factors (such as some artificial measures to slow down the settlement) that affect the surface settlement, they can be regarded as control inputs. It is the control input vector at the previous moment. Generally, if there is no such control input, can be set to a zero matrix, is the zero vector. is the process noise vector of the previous moment, which is used to describe the uncertainty in the system modeling process and the errors caused by factors such as unmodeled dynamics. It is usually assumed to be Gaussian white noise with a mean of zero, and its covariance matrix is recorded as , Characterizes the variance characteristics of process noise, such as is a is a positive definite symmetric matrix, where the elements on the diagonal represent the process noise variance of the corresponding state variables.
[0199] Step 1.2.1.2, construct observation equation. Use different sensors to observe the surface subsidence system, and assume that all sensors (specifically, the present invention sets The observation vector of sensors at the current moment is (For example Each element in corresponds to the surface settlement value and other related observation information measured by a sensor), the observation equation can be expressed as:
[0200] ;
[0201] in, is the observation matrix, which transforms the state vector of the system at the current moment Mapped to the observation space, its dimension is ( is the observation vector dimension, i.e. the number of sensors, is the state vector dimension), the first Rank Elements of a column Indicates the current moment Column status variables For the current moment Observation vector of the row For example, if the first sensor mainly observes the surface settlement in the x direction, then The first row of the matrix corresponds to the elements related to the x-direction displacement state variable, which are non-zero, and the others are zero (depending on the physical relationship between the sensor observation and the state variable). is the observation noise vector at the current moment, representing the error in the sensor measurement itself. Assuming that it is Gaussian white noise with zero mean, the observation noise covariance matrix is recorded as , is a The diagonal elements represent the variance of the noise of each sensor observation, and the off-diagonal elements reflect the correlation between the noise of different sensor observations (usually when the sensor observations are assumed to be independent, the off-diagonal elements are zero).
[0202] Step 1.2.2: Before starting the Kalman filter iteration, some parameters need to be initialized. Specifically:
[0203] Step 1.2.2.1. Initial state estimation; setting the initial time State estimation at , which is usually given based on prior knowledge or preliminary measurements of the system. For example, it can be determined based on a small amount of sensor data at the initial moment or empirical values from similar historical situations. The values of each element of .
[0204] Step 1.2.2.2, initial estimation error covariance matrix; set the initial estimation error covariance matrix , which reflects the uncertainty of the initial state estimate and is also a Its initial value can be reasonably set based on the accuracy of the initial understanding of the system and experience. For example, if the initial state estimate is less accurate, then The values of each element of are relatively large; otherwise they are small.
[0205] Step 1.2.3: Perform the Kalman filter iteration process at each moment. The specific process is as follows:
[0206] Step 1.2.3.1. Prediction step (time update).
[0207] Step 1.2.3.1.1. Prior state prediction: Calculate the prior state estimate at the current moment based on the state equation , the calculation formula is:
[0208] ;
[0209] Here we use the state estimation of the previous moment And the state transition matrix and control input (if any) to predict the state at the current moment.
[0210] Step 1.2.3.1.2. Prior estimation error covariance prediction; calculate the prior estimation error covariance matrix at the current moment , the calculation formula is:
[0211] ;
[0212] This step reflects the change of the state estimation error covariance as the system evolves dynamically, taking into account the error covariance matrix of the previous moment Through the state transition matrix The propagation of the process noise covariance matrix The added uncertainty.
[0213] Step 1.2.3.2, Update step (measurement update).
[0214] Step 1.2.3.2.1, Kalman gain calculation; calculate the Kalman gain at the current moment , which is a key parameter for weighing the proportion of predicted state and observed value in the final state estimation. The calculation formula is:
[0215] ;
[0216] Kalman gain at the current moment The size depends on the prior estimation error covariance matrix at the current moment , observation matrix and the observation noise covariance matrix , which is based on the reliability of the current observation information (given by ) and the uncertainty of the predicted state (reflected by to reasonably adjust the utilization of the observation vector.
[0217] Step 1.2.3.2.2, state estimation update; use the current Kalman gain Combined with the observation vector at the current moment To update the prior state estimate and obtain the optimal state estimate at the current moment , the calculation formula is:
[0218] ;
[0219] here Represents the residual between the observation vector and the observation prediction value obtained based on the prior state prediction, Kalman gain Multiplying this residual and adding it to the prior state prediction gives us the optimal state estimate that takes both the prediction and the observation into account.
[0220] Step 1.1.2.3.2.3, update the estimated error covariance; finally, update the estimated error covariance matrix at the current moment , the calculation formula is:
[0221] ;
[0222] This step is used to update the uncertainty of the state estimate in preparation for the next iteration. is the identity matrix. Ideally, such an update can make the error covariance gradually decrease as new observation information is continuously incorporated, indicating that the estimation of the system state is becoming more and more accurate.
[0223] Step 1.2.4, continuous iteration and data integration. By repeating the above prediction steps and update steps, for each moment Perform iterative calculations. As time goes by, the Kalman filter continuously integrates the observation information of different sensors (i.e., multi-source heterogeneous data sources) until When , we get the optimal state estimate at the final moment , The data from different data sources are integrated in a reasonable way that takes into account factors such as the reliability of each data and the dynamic characteristics of the system. The total time.
[0224] Will As well as the intermediate state estimation values in the Kalman filtering process, the original observation data of each sensor, the process and observation noise statistical information, the state transfer matrix and the related information of the observation matrix, etc., through data screening, alignment, feature combination and other rules, in a table or database storage format, clarify the format of each feature data type and then organize it to obtain the fused data set At the same time, in order to build a unified data format and coordinate system, the state vector can be defined at the initial When setting relevant parameters such as x, y, and z, they are set according to a pre-set unified format and coordinate reference. For example, the displacements in the x, y, and z directions are expressed in a unified geographic coordinate system. The data of all sensors are converted to this unified coordinate system when they are collected and participate in the Kalman filter calculation. The data finally fused is naturally in a unified data format and coordinate system, laying the foundation for subsequent analysis and processing.
[0225] Step 2: Abnormal data processing based on random forest; the specific process is as follows:
[0226] The collected raw data is preprocessed, including noise removal, outlier detection and processing, missing value interpolation, etc. Outlier detection uses a box-plot-based method. If a data point exceeds the upper or lower limit of the box plot, it is considered an outlier; the calculation formulas for the upper and lower limits are:
[0227] ;
[0228] ;
[0229] in, is the upper limit; is the lower quartile; is the interquartile range; is the lower limit; The upper quartile.
[0230] For outliers (including missing values), random forests are used for interpolation based on the data distribution characteristics. Random forests are an ensemble learning algorithm that builds predictions by building multiple decision trees and combining their predictions. When dealing with outliers, the feature containing the outlier is used as the target variable, and the remaining features are used as input variables to train the model. The trained model is then used to predict the outlier.
[0231] Step 2.1, Data preparation. Dataset after fusion in step 1 Contains samples, each sample has Features, The first sample The feature is recorded as , , , marking the data columns corresponding to the features containing outliers.
[0232] Mark outlier samples and construct training set related vectors. First, traverse the dataset , mark all samples with abnormal values of features, assuming that There are samples with outliers, For the samples containing outliers, , will The outlier positions of the features are temporarily marked as empty (or with a specific symbol to indicate missing, such as NaN).
[0233] Constructing input feature vector , which is composed of The samples that contain outliers are Other than the features eigenvalues, namely:
[0234] ;
[0235] in, For the The first sample containing outliers Features
[0236] At the same time, for this samples containing outliers, collect their The true value corresponding to each feature when it is known to be non-missing (partial complete data samples can be used) is used as the target variable , build a training dataset :
[0237] ;
[0238] Step 2.2: Random forest model training.
[0239] Step 2.2.1: Bootstrap Sampling to construct sub-datasets. , using the bootstrap sampling method to generate the training sub-dataset for each decision tree. The specific operation is: for each decision tree to be built (assuming that A decision tree, ),from Random sampling with replacement samples (here The number of samples containing outliers is the same as the number of samples in the original data set. In this way, some samples may be drawn multiple times during the sampling process, and some samples may not be drawn once). The training sub-dataset of a decision tree .
[0240] Step 2.2.2, random feature selection. When constructing each decision tree, random feature selection is also required to increase the diversity of the decision tree and reduce overfitting. A decision tree, from all input features (excluding the outliers features) are randomly selected Features (usually , rounded here) is used for node splitting, let A subset of features randomly selected by a decision tree for:
[0241] ;
[0242] in, For the The decision tree is used for node splitting The index of the feature, which corresponds to the first feature excluding the outliers A feature in the dataset after the feature column;
[0243] Step 2.2.3, decision tree construction. Each decision tree is constructed based on the corresponding training sub-dataset and a randomly selected feature subset. For example, A decision tree is based on the corresponding training sub-dataset and a randomly selected subset of features Start building. Taking node splitting as an example, commonly used metrics such as the Gini Index are used to determine the optimal splitting features and splitting points.
[0244] The calculation process of the Gini coefficient is as follows: for a classification problem (assuming that the predicted outliers are discrete category data), at a certain node , let the category set be , is the number of categories, For the categories; nodes The sample set is ,node The total number of samples is , belonging to the node No. categories The number of samples is . Then the node The Gini coefficient calculation formula is:
[0245] ;
[0246] in, is the Gini coefficient;
[0247] When considering feature splitting, it is assumed that the feature-based At a split point The node The sample set is divided into two parts and (corresponding to different branches), the number of samples are and , then the Gini index after splitting is:
[0248] ;
[0249] in, is the Gini index after splitting;
[0250] Iterate over all randomly selected features And the corresponding possible split points, choose The smallest feature and split point are used as the optimal splitting method for the node. This process is repeated to split the decision tree node until the stopping condition is met. The stopping condition is that the maximum depth is reached or the number of node samples is less than the preset sample number threshold.
[0251] If the predicted outlier value is a continuous value, the commonly used measurement indicators can be selected from the mean square error (MSE). For example, at the node , for the feature A split point , divide the sample into two parts and , the means of the corresponding predicted target variables (i.e. the true values corresponding to the outliers) are and , then the mean square error after splitting is:
[0252] ;
[0253] in, is the mean square error after splitting; is the input feature vector; is the target variable;
[0254] Likewise, the selection makes The smallest feature and split point are split, and the decision tree is continuously constructed until the stopping condition is met.
[0255] Through the above process, we construct decision trees, forming a random forest model . For the A decision tree.
[0256] Step 2.3: Outlier prediction.
[0257] Step 2.3.1: Single decision tree prediction. samples, , its corresponding input feature vector Input into the trained random forest model in sequence Each decision tree in , The present invention relates to numerical prediction problems. After the input feature vector reaches a leaf node, each decision tree takes the mean of the target variable (i.e., the known true value of the outlier) corresponding to all samples in the leaf node as the predicted value for the sample.
[0258] Step 2.3.2: Determine the estimated outlier value by combining the predicted values of all decision trees for the sample. The estimated outlier value is determined by combining the predicted values of all decision trees for the sample. For numerical outlier prediction, the simple averaging method is used, that is, the predicted values of all decision trees are added and averaged to obtain the final estimated outlier value. The calculation formula is:
[0259] ;
[0260] in, For the Outlier estimate for samples; For the Decision tree The predicted value of the sample.
[0261] Step 3: Feature engineering and variable selection based on graph neural networks. The specific process involves extracting characteristic variables closely related to surface subsidence from the preprocessed data, such as stratigraphic lithology (using principal component analysis to extract the main components), mining activity characteristics (mining rate, rate of change in mining area, etc.), building characteristics (building weight, foundation stiffness, etc.), and temporal characteristics (seasonal and interannual variations). Given the complex spatial and relational relationships of surface subsidence data, such as the spatial distribution of stratigraphic structure and the geographic relationship between buildings and mining areas, graph structures can be constructed. Graph neural networks are effective in processing this type of graph-structured data, updating node features by aggregating information from neighboring nodes. This process automatically learns complex relationships within the data and extracts meaningful features.
[0262] Step 3.1: Graph neural network construction.
[0263] Step 3.1.1, Node definition. Node collection Contains multiple types of nodes, such as monitoring point nodes , mining area nodes , building nodes Each monitoring point node contains characteristics such as its historical surface subsidence data series and geographic location information; the mining area node contains mining activity-related parameters (such as mining rate series, mining depth, mining method, etc.) and its geographic scope information; the building node contains the building's structural characteristics (such as height, number of floors, foundation type, etc.), weight information, and location information.
[0264] Step 3.1.2: Edge construction. Spatial relationship edge: For monitoring point nodes, if they are geographically adjacent, an undirected edge is established. For example, 、 Respectively , monitoring point nodes, if and The distance is less than the preset distance threshold , then in and Establish an undirected edge between , Represents a set of edges. The weight of the edge between monitoring point nodes can be determined according to the inverse of the distance or other spatial attenuation functions, and the formula is:
[0265] ;
[0266] in, For the , The weight of the edge between monitoring point nodes; It’s distance; It is a non-zero positive number, usually very small, used to prevent the denominator from being zero.
[0267] A directed edge is established between the mining area node and the monitoring point node within its mining influence range. The direction of the edge is from the mining area to the monitoring point, indicating the impact of mining activities on the surface subsidence at the monitoring point. The weight of the edge between the mining area node and the monitoring point node can be determined based on factors such as the distance from the mining area to the monitoring point and the mining intensity. Specifically,
[0268] ;
[0269] in, For the The mining area node and the The weight of the edge between monitoring point nodes; It is with The coefficient related to the mining characteristics of each mining area node; It is the current moment Mining The mining intensity indicators of each mining area node, such as mining volume or mining speed. For the mining area nodes;
[0270] The building node establishes an edge with the adjacent monitoring point node. The weight of the edge between the building node and the monitoring point node can be determined comprehensively based on the distance between the building and the monitoring point and the impact of the building on the ground surface (such as building weight, foundation stiffness, etc.). Indicates the weight of the building, represents the building foundation stiffness, Indicates the distance between the building and the monitoring point. The weight calculation formula that comprehensively considers the distance and the impact of the building is:
[0271] ;
[0272] in, For the Building nodes With the Monitoring point nodes The weight of the edge between and It is a weight coefficient determined according to actual conditions, and is used to adjust the influence of building weight and foundation stiffness on edge weight.
[0273] Time relationship edge: establish a directed time edge between different time steps of the same monitoring point node. At time step and time steps Node and , establish edge , the weights of the edges between different time steps It can be set to 1 to indicate a temporal order. Similarly, time edges can be established for mining area nodes and building nodes to reflect the temporal changes of their own characteristics and their dynamic impact on surface subsidence.
[0274] Step 3.2, Spatiotemporal Graph Convolutional Network (STGCN) layer definition. In STGCN, the connection between layers is achieved by using the output of the previous layer as the input of the next layer.
[0275] Step 3.2.1, spatial convolution part; for node In the To update the features of the layer, we first consider spatial convolution. Representation node At time step The spatial characteristics of is a node Neighbor nodes At time step The spatial convolution formula is:
[0276] ;
[0277] in, For nodes In the Layer time step spatial characteristics; For nodes Neighbor nodes In the Layer time step spatial characteristics; For nodes In the Layer time step spatial characteristics; 、 Node , neighbor nodes The set of spatial neighbor nodes; is a node The set of temporal neighbor nodes, that is, the set of the same node at different time steps; is a node The set of time neighbor nodes A time step identifier in represents the same node Indexes at different time steps are used to aggregate and calculate features at different time steps; It is The spatial weight matrix of the layer; It is The temporal weight matrix of the layer; Is the activation function, the present invention can use ReLU activation function. The spatial convolution here not only aggregates the features of spatial neighbor nodes, but also considers the features of temporal neighbor nodes, achieving the initial fusion of spatiotemporal features. The specific process is: the spatial features of the upper layer node and its neighbor nodes After weighted aggregation (through the spatial weight matrix ) after fusion, after activation function Get the spatial features of the nodes in this layer , as one of the inputs of the next layer of spatial convolution.
[0278] Step 3.2.2, time convolution part; then perform the time convolution operation. Representation node In the Layer time step The time characteristics of the update formula are:
[0279] ;
[0280] in, is the weight of the time edge; It is The temporal convolution weight matrix of the layer; For nodes In the Layer time step Temporal convolution mainly focuses on the feature change relationship of the same node at different time steps, and further extracts the feature information in the time series. The specific process is: the temporal features of the same node at different time steps in the previous layer Elapsed time edge weight and the temporal convolution weight matrix After the action of the activation function Get the time characteristics of the nodes in this layer , and participate in the spatiotemporal fusion step.
[0281] Step 3.2.3, space-time fusion; finally, the results of spatial convolution and temporal convolution are fused to obtain the node at the first Layer fusion features:
[0282] ;
[0283] in, For nodes In the Layer time step The fusion characteristics of It is a fusion coefficient used to balance the contribution of spatial and temporal features and can be determined based on experiments or data characteristics.
[0284] Step 3.3, training process and loss function. Suppose there is a supervised learning task related to surface subsidence, such as predicting the future surface subsidence value of a monitoring point. A fully connected layer can be connected to the output features of STGCN to obtain the prediction results. For a batch of training data (including image samples), using mean square error (MSE) as the loss function :
[0285] ;
[0286] in, It is The actual surface subsidence value of each sample; It is The predicted surface subsidence values for each map sample.
[0287] The back-propagation algorithm is used to update the weights of each STGCN layer to minimize the loss function. Layer weights Update, according to the gradient descent method:
[0288] ;
[0289] in, For the Update weights of the layer; is the learning rate;
[0290] Step 3.4, feature selection. After training STGCN, the last layer output It is the features extracted that are related to surface subsidence. For nodes In the Layer time step The fusion characteristics of is the total number of layers. Feature selection can be performed by calculating the correlation between these features and the predicted surface subsidence value. The Pearson correlation coefficient is used to measure the correlation between each feature and the predicted surface subsidence value. The feature dimension obtained after calculation of the spatiotemporal graph convolutional network of the layer is No. Features and predicted surface subsidence values , the calculation formula of Pearson correlation coefficient is:
[0291] ;
[0292] in, The feature dimension is No. Features and predicted surface subsidence values Pearson correlation coefficient; For passing After the spatiotemporal graph convolutional network of the layer is calculated, the In the graph samples, the feature dimension is No. Features at time step The characteristic value when For a batch containing In the training data of graph samples, The feature dimension obtained after calculation of the spatiotemporal graph convolutional network of the layer is No. Features at time step The average value of the eigenvalues when ; For a batch containing The average value of the predicted surface subsidence value in the training data of the map samples;
[0293] Calculate the Pearson correlation coefficient between each feature and the predicted surface subsidence value, and sort the features in descending order according to the Pearson correlation coefficient, and select the top features with the highest correlation with the predicted surface subsidence value. The features are used as characteristic variables with a significant impact on surface subsidence prediction and are subsequently used in the construction of prediction models. The advantage of spatiotemporal graph neural networks is that they can automatically capture the spatiotemporal and correlation relationships in the data. For surface subsidence data containing complex geographical and physical relationships, they can extract more valuable features.
[0294] Step 4: Construct a surface subsidence prediction model based on the diffusion model and quantum heuristic neural network. The specific process is as follows:
[0295] Step 4.1: Generate the starting sample based on the forward diffusion process of the diffusion model.
[0296] Step 4.1.1. Determine the number of forward diffusion steps and noise parameters.
[0297] Step 4.1.1.1. Determine the number of forward diffusion steps; set the prediction time range is a variable representing the time span, and the data uncertainty measure It is a quantitative indicator of the degree of data fluctuation or change. and To determine the number of forward diffusion steps If the prediction is for the surface subsidence in the short term and the data is relatively stable, a smaller On the contrary, if the forecast time range is longer and the data fluctuates greatly, choose a larger value. Determine a basic forward diffusion step number based on experience or data feature analysis. , and then adjust the actual number of forward diffusion steps by the following method :
[0298] ;
[0299] in, Indicates rounding up. and are different adjustment coefficients, determined based on experiments or domain knowledge, Control the weight of the impact of the prediction time range on the number of steps, Reflects the weight of the impact of data uncertainty on the number of steps. For example, if the surface subsidence in the next 10 months is predicted, the standard deviation of historical data , , , ,but .
[0300] Step 4.1.1.2: Determine the noise scheduling parameters; Use cosine annealing to set:
[0301] ;
[0302] in, is the time step in the forward diffusion process, and its value range is from 1 to ; The minimum value of the noise scheduling parameter is set, for example, 0.001.
[0303] Step 4.1.2, generate the starting sample. Surface subsidence related characteristic variable sequence , It can be regarded as a high-dimensional vector, which contains information on various characteristics such as stratum lithology, mining activities, etc. in time series. In the forward diffusion process, a series of noisy samples are generated by gradually adding Gaussian noise. The noised sample vector generated at the last time step is For passing The initial sample is obtained by adding Gaussian noise in time steps. The forward diffusion process is expressed as:
[0304] ;
[0305] in, 、 The time steps in the forward diffusion process are 、 The noise sample vector generated when ; The time step is The noise scheduling parameters when , which determines the degree of noise added at each time step; The time step is The noise vector is drawn from the standard Gaussian distribution Repeat the forward diffusion process times, get the starting sample .
[0306] Step 4.2: Generate a feature variable sequence using a back-diffusion process based on a quantum-inspired neural network.
[0307] Step 4.2.1. Initialization of quantum-inspired neural network parameters.
[0308] Step 4.2.1.1, quantum bit representation layer. In order to utilize some characteristics of quantum computing (such as superposition and entanglement) to enhance the representation ability of the model, the noise sample vector in the diffusion model is transformed into Assume that the input feature vector dimension is , mapping it to qubits, Determined according to the characteristic dimension and the principles of quantum computing, e.g. The quantum bit state can be represented by the complex vector Indicates that the initial quantum bit state It can be obtained by encoding the input eigenvector, for example, using a simple linear encoding method to map the real eigenvalues to the amplitude of the quantum state. Map to The quantum state of qubits. , for No. elements; the initialization formula of the quantum bit state is as follows:
[0309] ;
[0310] ;
[0311] ;
[0312] in, To initialize the The angular parameter of the quantum bit state is based on The sum of some elements of The ratio of the total modulus length is calculated. ; Is the loop index variable, through From 1 to Take the value to calculate The sum of the elements at a specific position in ; , Indicates rounding down. Reflects the dimension of Map to A grouping or partitioning parameter for qubits; for No. elements; 、 The time steps are The first , qubit states; The time step is The quantum bit state at ; Represents the tensor product of quantum states.
[0313] Step 4.2.1.2, quantum-inspired gate operation layer. Similar to the layers in traditional neural networks, define the quantum-inspired gate operation layer. For example, use quantum rotation gates and quantum controlled NOT gates (CNOT gates) to construct the quantum-inspired gate operation layer. For quantum rotation gates, let is the rotation angle (a learnable parameter), and the quantum rotating gate operates The formula for a single quantum bit is:
[0314] ;
[0315] Set the first quantum-inspired gate operation layer right The qubits are applied , ,…, ,but The matrix representation of is:
[0316] ;
[0317] in, Control the first qubit The rotation angle of the quantum bit state;
[0318] The quantum controlled NOT gate acts on two qubits to achieve entanglement operations. By combining multiple quantum-inspired gate operation layers, complex transformations can be performed on the qubit state to extract and process features. The matrix representation of the quantum controlled NOT gate (CNOT Gate) is:
[0319] ;
[0320] in, For the The qubit controls the The quantum controlled NOT gate of the qubit state; assuming that the quantum-inspired gate operation layer has Layer, according to The process of building other layers; indivual( ) Quantum-inspired gate operation layer Contains different combinations of quantum gate operations, the parameters of these gates (such as The qubit controls the The rotation angle of the quantum bit state ) is determined during training and loaded directly during prediction.
[0321] Step 4.2.2, back diffusion iteration. After passing through multiple quantum gate layers, the quantum bit state needs to be converted back to a classical probability distribution, which is achieved through quantum measurement. After quantum measurement, a classical probability distribution vector is obtained, which is used as the subsequent estimation time step The noise vector at For example, for a The system of quantum bits is measured to obtain a length of The probability distribution vector , which can be converted into a vector with the same dimension as the noise vector through a fully connected layer , used for updates in the back diffusion process.
[0322] from To begin, first Input into quantum-inspired neural network for noise estimation. Converted to quantum state After that, feature transformation is performed through the quantum-inspired gate operation layer. , ,in , that is, the initial quantum bit state After the first quantum-inspired gate operation layer Get the first quantum bit state .for , . And so on, until , . 、 Respectively , qubit states; For the quantum heuristic gate operation layer; the sequence number of the quantum bit state corresponds to the sequence number of the quantum heuristic gate operation layer. After the quantum gate operation layer, the quantum bit state of the last layer is measured by quantum measurement method. Perform quantum state conversion to obtain classical probability distribution , whose dimensions are ,because The measurement results of the quantum bits are The specific process of quantum measurement method is: using the calculation basis to The quantum bit state consists of quantum bits It is expressed as a linear combination of ground states, and the measurement probability of each ground state is calculated. When measuring, it collapses to a certain ground state according to the probability. After multiple measurements, the frequency of occurrence of each ground state is counted to obtain the classical probability distribution. The random process of each measurement is uncertain, and a large number of repeated measurements are required to obtain an accurate classical probability distribution, which is actually achieved by quantum measurement equipment.
[0323] Then, by measuring the fully connected layer with the output layer Convert to the same dimension as the noise vector ( The estimated noise vector . Let the weight matrix of the fully connected layer be (Dimensions are ), the bias vector is (Dimensions are ),but:
[0324] ;
[0325] in, is the estimated noise vector No. components, which is the probability distribution obtained by the fully connected layer for quantum measurement Obtained by linear transformation, plus the full connection layer bias vector Then the final estimated noise vector is obtained; Used to access probability distribution vectors sequentially Each element in , so that the weight matrix of the fully connected layer It is linearly transformed to calculate the estimated noise vector The various components of for No. element pairs No. The weight of each component; for No. elements, ; for The elements; The dimension is ;
[0326] Then update the sample according to the back diffusion formula to obtain the predicted sample vector:
[0327] ;
[0328] in, 、 The time steps in the reverse diffusion process are 、 The prediction sample vector generated when The time step is The noise scheduling parameters at Subtract the estimated noise vector And it is adjusted according to a certain ratio. The time step is The estimated noise vector at .
[0329] Repeat the above steps to Gradually decrease to , and obtain the predicted surface subsidence related characteristic variable sequence . It is the prediction sample vector generated when the time step is 0 during the back diffusion process;
[0330] Step 4.3, extract the predicted value of surface subsidence. Extract the information used to predict the surface subsidence from the predicted surface subsidence related characteristic variable sequence, and obtain the predicted value of surface subsidence in the future through the linear regression layer. Redefine the predicted surface subsidence related characteristic variable sequence as (here is the sequence length), build a linear regression model:
[0331] ;
[0332] in, is the predicted surface subsidence; is the regression coefficient, reflecting the characteristic variables Amount of surface subsidence the extent of the impact; is the error term.
[0333] Building a Design Matrix :
[0334] ;
[0335] in, is the sample size; For the The first sample feature variables; each row of the matrix represents the feature data of a sample plus the constant term 1. Target vector ,in It is The actual surface subsidence corresponding to the samples.
[0336] Calculate the estimated value of the regression coefficient according to the least squares method :
[0337] ;
[0338] ;
[0339] ;
[0340] in, For the The first sample characteristic variables; For the The actual surface subsidence corresponding to the samples; here we first calculate the design matrix The product of the transpose of and design matrix The transpose and target vector The product of , and then by solving the linear equations Get the estimated value of the regression coefficient .
[0341] Finally Substituting into the linear regression model, we get the final predicted surface subsidence:
[0342] ;
[0343] in, is the final predicted surface subsidence.
[0344] Step 4.4: Surface subsidence prediction model training.
[0345] Step 4.4.1. Loss function. A reconstruction loss similar to that in the variational autoencoder (VAE) is used. In the diffusion model, the goal is to make the final sample generated by the back diffusion process as close to the original sample as possible. Therefore, the loss function of the surface subsidence prediction model is It can be defined as:
[0346] ;
[0347] in, Express expectations, For different time steps , surface subsidence related characteristic variable sequence and noise vector Find the expectation of the joint distribution of; 、 The time steps are The noise vector at time , the estimated noise vector.
[0348] Step 4.4.2, Optimization Algorithm. Use the Adaptive Moment Estimation (Adam) optimization algorithm to update the parameters of the quantum-inspired neural network (including the parameters of the quantum gates and the parameters of the fully connected layers). The parameter update formula of the Adam optimization algorithm is as follows:
[0349] Compute first-order and second-order moment estimates of the gradient:
[0350] ;
[0351] ;
[0352] in, 、 The time steps First-order moment estimation and second-order moment estimation; 、 The time steps First-order moment estimation and second-order moment estimation; is the time step gradient; and They are the decay rate hyperparameters of the first-order moment estimate and the second-order moment estimate (usually , ).
[0353] Modified first-order moment estimates and second-order moment estimates:
[0354] ;
[0355] ;
[0356] in, 、 The time steps The modified first-order moment estimate and second-order moment estimate of ; 、 The time steps Decay rate hyperparameters for first-order moment estimation and second-order moment estimation;
[0357] Update the surface subsidence prediction model parameters:
[0358] ;
[0359] in, 、 The time steps , time step Parameters of surface subsidence prediction model when ; is the learning rate.
[0360] Repeat the above process of forward diffusion, backward diffusion, loss calculation, and parameter update until the preset number of training rounds is reached or the loss function converges to a preset threshold, and output the trained surface subsidence prediction model.
[0361] Step 4.5: Input the newly acquired data into the trained surface subsidence prediction model to predict surface subsidence. This new data includes surface subsidence monitoring data, geological survey data, underground mining activity information, and detailed information about the building itself. This model, based on a diffusion model and a quantum-inspired neural network, combines the advantages of the diffusion model in generating data with the potentially powerful representation capabilities of quantum-inspired computing, providing a novel, exploratory approach to surface subsidence prediction.
[0362] Of course, the above description is not a limitation of the present invention, and the present invention is not limited to the above examples. Changes, modifications, additions or substitutions made by technicians in this technical field within the essential scope of the present invention should also fall within the scope of protection of the present invention.
Claims
1. A method for predicting ground subsidence of buildings, characterized by: The steps include: Step 1: Collect multi-source data and perform multi-source data fusion based on the Kalman filter method; Step 2: Process abnormal data based on random forest; Step 3: Feature engineering and variable selection based on graph neural network; Step 4: Predict surface subsidence based on the diffusion model and quantum-inspired neural network. The specific process is as follows: Step 4.1: Generate the starting sample based on the forward diffusion process of the diffusion model; the specific process is as follows: Step 4.1.1, determine the number of forward diffusion steps and noise parameters; forward diffusion steps for: ; in, Indicates rounding up; The number of forward diffusion steps based on and are different adjustment factors; is the forecast time frame; is a measure of data uncertainty; Noise scheduling parameters for: ; in, is the time step in the forward diffusion process; is the minimum value of the set noise scheduling parameter; Step 4.1.2, the forward diffusion process is expressed as: ; in, 、 The time steps in the forward diffusion process are 、 The noise sample vector generated when The time step is Noise scheduling parameters when ; The time step is The noise vector at time ; Repeat the forward diffusion process times, get the starting sample ; Step 4.2: Generate a feature variable sequence using the back-diffusion process based on the quantum-inspired neural network. The specific process is as follows: Step 4.2.
1. Initialize the quantum-inspired neural network parameters. First, The qubit representation is performed as the input feature vector; the initialization formula of the qubit state is as follows: ; ; ; in, To initialize the angular parameters of the quantum bit state; is the loop index variable; , Indicates rounding down. Reflects the dimension of Map to A grouping or partitioning parameter for qubits; for No. elements; 、 The time steps are The first , qubit states; The time step is The quantum bit state at ; represents the tensor product of quantum states; Then, a quantum-inspired gate operation layer is constructed based on quantum rotation gates and quantum controlled NOT gates; The formula for the effect of a quantum rotation gate on a single quantum bit is: ; in, It is a quantum revolving door; is the rotation angle; The matrix representation of the quantum controlled NOT gate is: ; in, For the The qubit controls the A quantum control NOT gate for the states of qubits; The first quantum-inspired gate operation layer The matrix representation of is: ; in, Control the first qubit The rotation angle of the quantum bit state; The quantum-inspired gate operation layer has Layer, according to The process of building other layers; quantum-inspired gate operation layer Contains different combinations of quantum gate operations. The parameters of these gates are determined during the training process and loaded directly during prediction. Step 4.2.2, back diffusion iteration; from To begin, first Input into quantum-inspired neural network for noise estimation; At the quantum bit representation level, Converted to quantum state Afterwards, feature transformation is performed through a quantum-inspired gate operation layer; for , ,in , that is, the initial quantum bit state After the first quantum-inspired gate operation layer Get the first quantum bit state ;for , ; and so on, until , ; 、 Respectively , qubit states; For the quantum-inspired gate operation layers; the sequence number of the quantum bit state corresponds to the sequence number of the quantum gate operation layer; In passing After a quantum-inspired gate operation layer, the quantum bit state of the last layer is measured using quantum measurement methods. Perform quantum state conversion to obtain classical probability distribution ; Will Convert to an estimated noise vector of the same dimension as the noise vector ; Assume that the weight matrix of the fully connected layer is , the bias vector is ,but: ; in, is the estimated noise vector No. Quantity for No. element pairs No. The weight of each component; for No. elements; for The elements; Then update the sample according to the back diffusion formula to obtain the predicted sample vector: ; in, 、 The time steps in the reverse diffusion process are 、 The prediction sample vector generated when The time step is Noise scheduling parameters when ; The time step is The estimated noise vector when ; Repeat the above steps to Gradually decrease to , and obtain the predicted surface subsidence related characteristic variable sequence ; It is the prediction sample vector generated when the time step is 0 during the back diffusion process; Step 4.3: Extract the predicted value of surface subsidence; the specific process is as follows: The predicted surface subsidence-related characteristic variable sequence is redefined as , build a linear regression model: ; in, is the predicted surface subsidence; is the regression coefficient, reflecting the characteristic variables Amount of surface subsidence the extent of the impact; is the error term; Building a Design Matrix : ; in, is the sample size; For the The first sample feature variables; target vector ,in It is The actual surface subsidence corresponding to the sample; Calculate the estimated value of the regression coefficient according to the least squares method : ; ; ; in, For the The first sample characteristic variables; For the The actual surface subsidence corresponding to the sample; Finally Substituting into the linear regression model, we get the final predicted surface subsidence: ; in, is the final predicted surface subsidence; Step 4.4, training the surface subsidence prediction model; In step 4.4, the loss function of the surface subsidence prediction model is constructed for: ; in, Express expectations, For different time steps , surface subsidence related characteristic variable sequence and noise vector Find the expectation of the joint distribution of; 、 The time steps are Noise vector and estimated noise vector at time ; The Adam optimization algorithm is used to update the parameters in the quantum-inspired neural network. The update formula is as follows: Compute first-order and second-order moment estimates of the gradient: ; ; in, 、 The time steps First-order moment estimation and second-order moment estimation; 、 The time steps First-order moment estimation and second-order moment estimation; is the time step gradient; and are the decay rate hyperparameters of the first-order moment estimate and the second-order moment estimate, respectively; Modified first-order moment estimates and second-order moment estimates: ; ; in, 、 The time steps The modified first-order moment estimate and second-order moment estimate of ; 、 The time steps Decay rate hyperparameters for first-order moment estimation and second-order moment estimation; Update the surface subsidence prediction model parameters: ; in, 、 The time steps , time step Parameters of surface subsidence prediction model when ; is the learning rate; Repeat the process of forward diffusion, backward diffusion, loss calculation, and parameter update until the preset number of training rounds is reached or the loss function converges to a preset threshold, and output the trained surface subsidence prediction model; Step 4.5: Input the real-time collected surface subsidence monitoring data, geological survey data, underground mining activity information, and detailed information of the building itself into the trained surface subsidence prediction model to predict surface subsidence.
2. The method for predicting ground subsidence of a building according to claim 1, characterized in that: The specific process of step 1 is: Step 1.
1. Collect data from multiple sources, including surface subsidence monitoring data, geological survey data, underground mining activity information, and detailed information about the building itself. Surface subsidence monitoring data includes the displacement of a surface point in the x, y, and z directions, as well as the rate of change of displacement. Geological survey data includes stratum structure and the physical and mechanical parameters of rock and soil. Underground mining activity information includes mining progress, mining methods, and mining depth. Detailed information about the building itself includes structural type, foundation form, and building materials. Step 1.2: Use the Kalman filter method to integrate multi-source data and build a unified data format and coordinate system. The specific process is as follows: Step 1.2.1: Model the surface subsidence system and determine the state equation and observation equation; The state equation is: ; in, For the previous moment, For the current moment; 、 are the state vectors of the surface subsidence system at the current moment and the previous moment respectively; is the state transition matrix; is the control input matrix; is the control input vector at the previous moment; is the process noise vector at the previous moment; The observation equation is: ; in, is the observation vector of all sensors at the current moment; is the observation matrix; is the observation noise vector at the current moment; Step 1.2.2: Initialize the parameters; specifically: set the initial time The estimated state is , set the initial estimation error covariance matrix to ; Step 1.2.3: Perform a Kalman filter iteration process at each moment. The iteration process includes a prediction step and an update step. Step 1.2.4: Continue to iterate and complete data integration.
3. The method for predicting ground subsidence of a building according to claim 2, characterized in that: The specific process of step 1.2.3 is as follows: The specific process of steps 1.2.3.1 and prediction step is as follows: First, according to the state equation, calculate the prior state estimate at the current moment , the formula is: ; in, is the state estimate at the previous moment ; Then, calculate the prior estimation error covariance matrix at the current moment , the formula is: ; in, is the error covariance matrix of the previous moment; is the transpose symbol; is the process noise covariance matrix; The specific process of steps 1.2.3.2 and update steps is as follows: First, calculate the Kalman gain at the current moment , the formula is: ; in, is the observation noise covariance matrix ; Then, combined with the observation vector at the current moment To update the prior state estimate and obtain the optimal state estimate at the current moment , the formula is: ; Finally, update the estimated error covariance matrix at the current moment , the formula is: ; in, is the identity matrix; In step 1.2.4, by repeating the prediction step and the update step, for each moment Perform iterative calculations. As time goes by, the Kalman filter continues to fuse the observation information of different sensors until When , we get the optimal state estimate at the final moment , That is the result of the fused data; is the total time; Will The intermediate state estimation value in the Kalman filtering process, the original observation data of each sensor, the process and observation noise statistical information, the state transfer matrix and the related information of the observation matrix are combined to obtain the fused data set .
4. The method for predicting ground subsidence of a building according to claim 3, characterized in that: The specific process of step 2 is: Step 2.1, perform outlier detection on the fused dataset based on the box plot method to construct a training dataset; Assume the fused dataset Include samples, each sample has Features Traverse the fused dataset , mark all samples with abnormal values of features; There are samples with outliers, ; For the samples containing outliers, , will The outlier position of the feature is marked as empty; Constructing input feature vector : ; in, For the The first sample containing outliers Features At the same time, for this samples containing outliers, collect their The true value of each feature is used as the target variable when it is known that it is not missing. , build a training dataset : ; Step 2.2: Train the random forest model based on the training dataset. Step 2.3: Perform outlier prediction.
5. The method for predicting ground subsidence of a building according to claim 4, characterized in that: The specific process of step 2.2 is as follows: Step 2.2.
1. For the training dataset , the self-service sampling method is used to generate the training sub-dataset for each decision tree; the process of the self-service sampling method is: for each decision tree to be constructed, Random sampling with replacement samples, and obtain the The training sub-dataset of a decision tree ; Step 2.2.2, for A decision tree, from all Randomly select from the input features Features are used for node splitting, let A subset of features randomly selected by a decision tree for: ; in, For the The decision tree is used for node splitting The index of the feature, which corresponds to the first feature excluding the outliers A feature in the dataset after the feature column; Step 2.2.3: Build a decision tree based on the training sub-dataset and the randomly selected feature subset; If the predicted outlier is a discrete categorical data, the node splitting process uses the Gini coefficient to determine the best splitting feature and splitting point; at a certain node , let the category set be , is the number of categories, For the categories; nodes The sample set is ,node The total number of samples is , belonging to the node No. categories The number of samples is , then the node The Gini coefficient calculation formula is: ; in, is the Gini coefficient; When considering feature splitting, it is assumed that the feature-based At a split point The node The sample set is divided into two parts and , the number of samples are and , then the Gini index after splitting is: ; in, is the Gini index after splitting; Iterate over all randomly selected features And the corresponding split point, choose The smallest feature and split point are used as the optimal splitting method for the node. This process is repeated to split the decision tree nodes until the maximum depth is reached or the number of node samples is less than the preset sample number threshold. If the predicted outlier is a continuous value, the mean square error is selected to determine the best splitting feature and splitting point; at the node , for the feature A split point , divide the sample into two parts and , and the corresponding means of the predicted target variables are and , then the mean square error after splitting is: ; in, is the mean square error after splitting; is the input feature vector; is the target variable; Select so that The smallest feature and split point are split, and the decision tree is continuously constructed until the maximum depth is reached or the number of node samples is less than the preset sample number threshold; Through the above process, we construct decision trees, forming a random forest model ; For the decision trees; The specific process of step 2.3 is as follows: First, for the first samples, and their corresponding input feature vectors Input into the trained random forest model in sequence Each decision tree in After the input feature vector reaches the leaf node, each decision tree takes the mean of the target variable corresponding to all samples in the leaf node as the predicted value of the sample; Then, the estimated value of the outlier is determined by combining the predicted values of all decision trees for the sample. The formula is: ; in, For the Outlier estimate for samples; For the Decision tree The predicted value of the sample.
6. The method for predicting ground subsidence of a building according to claim 5, characterized in that: The specific process of step 3 is as follows: Step 3.1: Build a graph neural network; node set in the graph neural network Contains multiple types of nodes, including monitoring point nodes , mining area nodes , building nodes Each monitoring point node contains its historical surface subsidence data sequence and geographical location information; the mining area node contains mining activity related parameters and its geographical scope information; Building nodes contain the building's structural characteristics, weight information, and location information; the edges in the graph neural network include spatial relationship edges and temporal relationship edges; The process of constructing spatial relationship edges is as follows: For monitoring point nodes, if they are geographically adjacent, an undirected edge is established; the weight of the edge between monitoring point nodes is: ; in, For the , The weight of the edge between monitoring point nodes; It’s distance; 、 Respectively , Monitoring point nodes; is a non-zero positive number; A directed edge is established between the mining area node and the monitoring point node within the mining influence range. The direction of the edge is from the mining area to the monitoring point, indicating the impact of mining activities on the surface subsidence of the monitoring point. The weight of the edge between the mining area node and the monitoring point node is: ; in, For the The mining area node and the The weight of the edge between monitoring point nodes; It is with The coefficient related to the mining characteristics of each mining area node; It is the current moment Mining Mining intensity index of each mining area node; For the mining area nodes; The building node establishes an edge with the adjacent monitoring point node. The weight of the edge between the building node and the monitoring point node is: ; in, For the Building nodes With the Monitoring point nodes The weight of the edge between and It is a weight coefficient determined according to actual conditions, used to adjust the influence of building weight and foundation stiffness on edge weight; Indicates the weight of the building, represents the building foundation stiffness, Indicates the distance between the building and the monitoring point; The construction process of the time relationship edge is as follows: a directed time edge is established between different time steps of the same monitoring point node; the weight of the edge between different time steps is set to 1; Step 3.2: Build a spatiotemporal graph convolutional network. Step 3.3: Construct a loss function and train the spatiotemporal graph convolutional network. Step 3.4: Perform feature selection.
7. The method for predicting ground subsidence of a building according to claim 6, characterized in that: In step 3.2, the spatiotemporal graph convolutional network contains several layers, and the connection between layers is achieved by using the output of the previous layer as the input of the next layer. The spatiotemporal graph convolutional network includes a spatial convolution part and a temporal convolution part. The specific working process is as follows: Step 3.2.
1. For nodes In the To update the features of the layer, spatial convolution is performed first, and the formula is: ; in, For nodes In the Layer time step spatial characteristics; For nodes Neighbor nodes In the Layer time step spatial characteristics; For nodes In the Layer time step spatial characteristics; 、 Node , neighbor nodes The set of spatial neighbor nodes; is a node The set of temporal neighbor nodes; is a node The set of time neighbor nodes A time step identifier in ; It is The spatial weight matrix of the layer; It is The temporal weight matrix of the layer; is the activation function; let Representation node At time step The spatial characteristics of is a node Neighbor nodes At time step spatial characteristics; Step 3.2.2, then perform time convolution, the formula is: ; in, Representation node In the Layer time step Temporal characteristics; is the weight of the time edge; It is The temporal convolution weight matrix of the layer; For nodes In the Layer time step Temporal characteristics; Step 3.2.3, finally, the results of spatial convolution and temporal convolution are fused to obtain the node at the first Layer fusion features: ; in, For nodes In the Layer time step The fusion characteristics of is a fusion coefficient.
8. The method for predicting ground subsidence of a building according to claim 7, characterized in that: In step 3.3, a fully connected layer is connected to the output features of the spatiotemporal graph convolutional network to obtain the prediction results; The training data of graph samples is used, and the mean square error is used as the loss function : ; in, It is The actual surface subsidence value of each sample; It is The predicted surface subsidence value of each map sample; Use the backpropagation algorithm to update the weights of each layer in the spatiotemporal graph convolutional network to minimize the loss function; use the gradient descent method for updating: ; in, For the Update weights of the layer; For the layer weights; is the learning rate; In step 3.4, the trained spatiotemporal graph convolutional network has the output of the last layer are the extracted features related to surface subsidence, For nodes In the Layer time step The fusion characteristics of is the total number of layers; feature selection is performed by calculating the correlation between these features and the predicted surface subsidence value; the Pearson correlation coefficient is used to measure the correlation between each feature and the predicted surface subsidence value. The feature dimension obtained after calculation of the spatiotemporal graph convolutional network of the layer is No. Features and predicted surface subsidence values , the calculation formula of Pearson correlation coefficient is: ; in, The feature dimension is No. Features and predicted surface subsidence values Pearson correlation coefficient; For passing After the spatiotemporal graph convolutional network of the layer is calculated, the In the graph samples, the feature dimension is No. Features at time step The characteristic value when For a batch containing In the training data of graph samples, The feature dimension obtained after calculation of the spatiotemporal graph convolutional network of the layer is No. Features at time step The average value of the eigenvalues when ; For a batch containing The average value of the predicted surface subsidence value in the training data of the map samples; Calculate the Pearson correlation coefficient between each feature and the predicted surface subsidence value, and sort the features in descending order according to the Pearson correlation coefficient. features as feature variables.
Citation Information
Patent Citations
Probability integral parameter prediction method for optimizing BP neural network based on MIV-GP algorithm
CN110363344A
Foundation pit pipeline settlement deformation prediction method based on heterogeneous spatio-temporal data source
CN119989915A