Foundation pit prediction model training method and foundation pit monitoring method and system
By introducing federated learning and physical constraint loss, combined with geological feature clustering, the accuracy and precision of the foundation pit prediction model are improved, solving the problem of insufficient prediction accuracy in existing technologies and ensuring engineering safety.
Patent Information
- Application Number
- CN202610137087.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-30
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2046-01-30
AI Technical Summary
Existing foundation pit prediction models have limited accuracy in complex engineering environments, making it difficult to meet the requirements for reliability and accuracy.
A federated learning-based method for training foundation pit prediction models is adopted. By introducing physical constraint loss and geological feature clustering, and combining the collaborative work of cloud and edge devices, the model is trained and monitored.
It improved the accuracy and precision of foundation pit prediction, reduced the false alarm rate, ensured that the model prediction results conformed to the laws of geotechnical mechanics, and enhanced the safety of the project.
Smart Images

Figure CN121615722A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of federated learning, and more specifically, relates to a method for training a foundation pit prediction model, a method for monitoring foundation pits, and a system for such monitoring. Background Technology
[0002] Foundation pit monitoring is a crucial step in ensuring the safety of engineering construction. By continuously collecting and analyzing multi-source data such as foundation pit displacement, settlement, and stress, future deformation trends and potential risks can be predicted, allowing for proactive preventative measures to avoid engineering accidents. Currently, some technologies have attempted to introduce large-scale models or deep learning methods to handle foundation pit monitoring tasks, improving the automation level of data processing to some extent and reducing the cost and time of manual analysis. However, in practical applications, these methods still have several significant drawbacks, resulting in limited predictive accuracy and making it difficult to fully meet the reliability and accuracy requirements of complex engineering environments.
[0003] Therefore, how to effectively improve the accuracy of foundation pit prediction while maintaining the advantages of automation and efficient processing remains a key issue that urgently needs to be addressed in this field. Summary of the Invention
[0004] In view of the above-mentioned defects or improvement needs of the existing technology, the present invention provides a method for training a foundation pit prediction model, a method for monitoring foundation pits, and a system, the purpose of which is to improve the accuracy of foundation pit prediction.
[0005] To achieve the above objectives, the following technical solution is proposed.
[0006] According to a first aspect of the present invention, a method for training a pit prediction model based on federated learning is provided, wherein each round of federated training includes the following steps: The cloud server distributes global model update parameters to the edge device; The edge device determines the local model based on the received global model update parameters and trains it locally using local data. This enables the model to predict the state of the foundation pit in future periods based on the current foundation pit information, thus obtaining the local model update parameters. The foundation pit state includes the horizontal displacement and lateral earth pressure of the foundation pit. The local training loss is a comprehensive loss that considers data fitting loss and physical constraint loss. The data fitting loss characterizes the similarity deviation between the prediction result and the true label, while the physical constraint loss characterizes the degree to which the foundation pit support structure calculated based on the prediction result violates mechanical equilibrium. The edge device also maps the foundation pit geological information extracted during the local data collection period into geological embedding vectors and sends the local model update parameters and geological embedding vectors to the cloud device. The cloud server clusters all edge devices based on the similarity of their geological embedding vectors. It then aggregates the local model update parameters of edge devices belonging to the same cluster to obtain the global model update parameters for that cluster. During the aggregation calculation, the data quality assessment score of the edge device is used as the weighting coefficient for the corresponding local model update parameters. The data quality assessment score of the edge device is the sum of its local data integrity score during the current round of local training, its geological matching score with the cluster center of its cluster, and its physical constraint consistency score obtained by validating its trained local model using its local validation set. A lower physical constraint loss results in a higher physical constraint consistency score. The resulting global model update parameters are then distributed to the edge devices during the next round of federated training. Furthermore, the global model update parameters corresponding to different clusters are distributed to the edge devices belonging to their respective clusters.
[0007] According to a second aspect of the present invention, a method for monitoring foundation pits based on cloud-edge collaboration is provided, comprising: The edge device acquires the current period's foundation pit information from the acquisition terminal and inputs it into its local lightweight model to obtain the prediction results of the foundation pit's state in future periods. The foundation pit state includes the horizontal displacement and lateral earth pressure of the foundation pit. The local lightweight model is a local foundation pit monitoring model obtained using the training method described above. The local foundation pit monitoring model outputs the probability of different predicted values of the foundation pit state, and the predicted value corresponding to the highest probability is used as the prediction result of the foundation pit state. The edge device also calculates the information entropy H(x) of the foundation pit state x based on the probability of different predicted values of the foundation pit state x output by the local foundation pit monitoring model. If either the information entropy H(x) or the prediction result exceeds its corresponding threshold, it is judged that there is a risk and triggers risk emergency operation. The risk emergency operation includes informing the acquisition terminal to increase the acquisition frequency and sending the high-frequency foundation pit monitoring data collected by the acquisition terminal to the cloud server. The high-frequency foundation pit monitoring data is the data collected after increasing the acquisition frequency.
[0008] The cloud server runs its deployed full physical language model to perform in-depth analysis of the received high-frequency foundation pit monitoring data and generates risk reports based on the analysis results.
[0009] According to a third aspect of the present invention, a cloud-edge collaborative foundation pit monitoring system is provided, comprising an edge device and a cloud server, wherein the edge device and the cloud server are used to collaboratively implement the above method.
[0010] In summary, compared with the prior art, the technical solutions conceived in this invention have the following main advantages: 1. During local model training, this invention incorporates physical constraint loss, which generates a high penalty gradient. This forces the model parameters to converge to a physical manifold that conforms to the "force-deformation coordination" principle during backpropagation. This allows the model to learn the essential laws of geotechnical mechanics, rather than merely performing statistical fitting at the numerical level. Specifically, it ensures that the predicted cumulative displacement and earth pressure changes conform as closely as possible to the equilibrium equations of an elastic foundation beam, reducing predictions that violate physical principles and thus improving prediction accuracy. Furthermore, during cloud aggregation, this invention first aggregates edge devices based on geological features, grouping foundation pits with similar geological characteristics into the same cluster. Then, it aggregates the local model update parameters within each cluster to obtain global model update parameters corresponding to that cluster. These global model update parameters are then distributed to each edge device within that cluster. This avoids interference from heterogeneous geological data, facilitating model learning and improving prediction accuracy. Furthermore, when performing cloud aggregation, this invention uses the cumulative score of local data integrity, geological matching, and physical constraint consistency as the weight coefficients for the corresponding local model update parameters. This dynamic adaptive weight fusion strategy allows high-quality, highly matching construction sites to gain greater influence, thereby accelerating model convergence and improving prediction accuracy. Overall, the federated learning-based foundation pit prediction model training method proposed in this invention can effectively improve model prediction accuracy.
[0011] 2. Further, in a specific embodiment, a multimodal encoding vector of "work condition text - collected data" is constructed as an input sample. By inputting the construction work condition text, the model will comprehensively consider the impact of the construction work condition when making predictions, and identify that the anomaly may come from external factors such as construction disturbance rather than the occurrence of danger, thereby reducing the false alarm rate and improving the prediction accuracy. Attached Figure Description
[0012] Figure 1 This is a flowchart illustrating the steps of a pit prediction model training method based on federated learning in one embodiment of the present invention.
[0013] Figure 2 This is a flowchart of the steps of a foundation pit monitoring method based on cloud-edge collaboration in one embodiment of the present invention.
[0014] Figure 3 This is a system architecture diagram of cloud-edge collaboration in one embodiment of the present invention.
[0015] Figure 4 This is an information interaction diagram of the training and application stages of the cloud-edge collaborative combined model in one embodiment of the present invention.
[0016] Figure 5 This is a flowchart of data processing performed by an edge device in one embodiment of the present invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0018] In a first aspect, the present invention claims a method for training a pit prediction model based on federated learning.
[0019] like Figure 1 The diagram shows a flowchart of a method for training a foundation pit prediction model based on federated learning according to an embodiment of the present invention. The order of steps in the diagram is only one possible approach and is not limited thereto. The following is in conjunction with... Figure 1 This method will be described in detail.
[0020] S11. The cloud server issues global model update parameters to the edge device.
[0021] S12. The edge device determines the local model based on the global model update parameters it receives, and trains it locally using local data. The model predicts the state of the foundation pit in future periods based on the foundation pit information in the current period, and obtains the local model update parameters. The foundation pit state includes the horizontal displacement of the foundation pit and the lateral earth pressure of the foundation pit. The local training loss is a comprehensive loss that considers the data fitting loss and the physical constraint loss. The data fitting loss represents the similarity deviation between the prediction result and the true label, and the physical constraint loss represents the degree to which the foundation pit support structure calculated based on the prediction result violates the mechanical equilibrium. The edge device also maps the foundation pit geological information extracted during the local data collection into a geological embedding vector, and sends the local model update parameters and the geological embedding vector to the cloud device.
[0022] At the edge device, two types of operations need to be performed. The first type of operation is to acquire local data to train the local model and obtain the local model update parameters. The second type of operation is to extract the geological information of the foundation pit from the same period and map it into a geological embedding vector. After obtaining the local model update parameters and the geological embedding vector, they are packaged and sent to the remote server.
[0023] The process of obtaining the geological embedding vector is as follows.
[0024] Specifically, the edge device can extract geological information about the foundation pit by parsing the geological survey report of the current period. This geological information includes cohesion, internal friction angle, compression modulus, water content, and lithological coding. Then, it maps this information into geological embedding vectors using a pre-trained geological encoder. The pre-trained geological encoder can employ a multilayer perceptron (MLP) or variational autoencoder (VAE), pre-trained using publicly available geological survey datasets. This enables it to map discrete geological parameters into a high-dimensional continuous vector space, where samples with similar geological properties are closer together. Taking a foundation pit located in a coastal soft soil area as an example, the edge device extracts geological feature information by parsing the geological survey report: ; In the formula, g represents geological feature information.
[0025] Then, the above geological feature information G is mapped into a standardized embedding vector using a pre-trained geological encoder, which is the geological embedding vector.
[0026] The process of acquiring local data and training a local model is as follows.
[0027] Specifically, the data acquisition terminals act as the sensing antennas of the Internet of Things (IoT). Edge devices can acquire local data by obtaining the foundation pit monitoring data collected by various local acquisition terminals. Foundation pit monitoring data includes, for example, foundation pit displacement, earth pressure, and soil inclination angle.
[0028] Edge devices communicate with the acquisition terminal to obtain the collected foundation pit monitoring data, thereby constructing local data for local training. The goal of training the local model is to enable the local model to predict the foundation pit information in future periods based on the foundation pit information in the current period, so as to carry out risk management in advance and avoid causing major problems.
[0029] In one embodiment, the pit information of the current time period input to the model is a multimodal encoding vector, and the process of constructing the multimodal encoding vector includes: Acquire the foundation pit monitoring data collected by the acquisition terminal for the current time period, and encode the foundation pit monitoring data at each acquisition moment into a sensor time series token sequence according to the three elements of numerical value, rate of change and time interval; Obtain the text information of the construction conditions for the current time period and convert it into a context vector using a pre-trained text encoder; The context vector is concatenated as a prefix to the sensor time-series token sequence to obtain the multimodal coding vector.
[0030] In practical operation, the system first encodes the parsed sensor time-series data into a time-series token sequence based on three elements: numerical value, rate of change, and time interval. Then, it converts the acquired construction condition text, including excavation depth, support erection status, and surrounding load conditions, into a context vector using a pre-trained text encoder. Subsequently, the context vector is appended as a prefix prompt to the sensor time-series token sequence to obtain a multimodal encoded vector, which is then input into the local model for local training. Understandably, during training, the multimodal encoded vector of the current time period is used as the input sample. Each input sample corresponds to a sample label. In this invention, the sample label represents the foundation pit status in future time periods, including the horizontal displacement and lateral earth pressure of the foundation pit in future time periods. During training, the future time period is relative to the current time period; both the current time period input samples and the future time period sample labels are derived from historical data.
[0031] In the above embodiments, a multimodal encoding vector of "work condition text-collected data" is constructed as an input sample. By inputting the construction work condition text, the model will comprehensively consider the impact of the construction work condition when making predictions, and identify that the anomaly may come from external factors such as construction disturbance rather than the occurrence of danger, thereby reducing the false alarm rate and improving the prediction accuracy.
[0032] In this invention, the local training loss is a comprehensive loss that considers both data fitting loss and physical constraint loss. Compared to traditional model training loss, this invention considers physical constraint loss specifically for the scenario of foundation pit monitoring. Physical constraint loss characterizes the degree to which the foundation pit support structure calculated based on the prediction results violates mechanical equilibrium. This invention considers physical constraint loss when training the local model. Physical constraint loss generates a high penalty gradient, forcing the model parameters to converge to a physical manifold that conforms to the "force-deformation coordination" principle during backpropagation. This allows the model to learn the essential laws of geotechnical mechanics, rather than merely performing statistical fitting at the numerical level. In other words, it ensures that the predicted cumulative displacement and earth pressure changes conform as closely as possible to the equilibrium equations of an elastic foundation beam, reducing predictions that violate physical principles and thus improving prediction accuracy. In other words, by explicitly embedding the elastic foundation beam equilibrium differential equation as a strong constraint during model training and constructing a composite loss function to force the AI model output to conform to the basic laws of geotechnical mechanics, this mechanism can effectively prevent the traditional "black box" model from outputting absurd predictions that violate physical common sense under extreme working conditions (such as support failure and piping) (e.g., "severe deformation under no external force"), significantly reducing the risk of missed and false alarms and ensuring the safety boundary of the project.
[0033] In one embodiment, the formula for calculating the overall loss is: ; In the formula, To account for the overall losses, For data fitting loss, Let λ represent the physical constraint loss, and λ be the weighting coefficient for the physical constraint loss. When the model's prediction results violate this mechanical equilibrium condition, Increasing the size forces the model to converge within a latent space that conforms to physical laws.
[0034] Among them, physical constraint loss The calculation formula is: ; In the formula, T represents the number of moments within the future time period predicted by the model, and t represents the time. , These represent the horizontal displacement of the foundation pit and the lateral earth pressure on the foundation pit at time t predicted by the model, respectively. This is a differential operator for the equilibrium of foundation pit support structures, constructed based on the theory of elastic foundation beams. For any horizontal displacement u and lateral earth pressure p of the foundation pit, the equilibrium differential operator of the foundation pit support structure is... The calculation formula is:
[0035] In the formula, EI is the bending stiffness of the retaining pile, k is the horizontal reaction coefficient of the soil, and b is the pile spacing in the foundation pit. This represents the derivative of the horizontal displacement u of the foundation pit along the depth z of the foundation pit.
[0036] Based on the local data and local training loss, the local model can be fine-tuned, and the parameter update increment Δθ can be calculated as the local model update parameter to be uploaded to the cloud server.
[0037] After obtaining the geological embedding vector and local model update parameters, the local model update parameters and the encrypted geological embedding vector are packaged and uploaded to the cloud via the MQTT protocol. The original sensor values and engineering drawings are not included in the upload, effectively protecting project privacy.
[0038] S13. The cloud server clusters all edge devices based on the similarity of their geological embedding vectors. It then aggregates the local model update parameters of edge devices belonging to the same cluster set to obtain the global model update parameters corresponding to that cluster set. During the aggregation calculation, the data quality assessment score of the edge device is used as the weight coefficient of the corresponding local model update parameter. The data quality assessment score of the edge device is the sum of its local data integrity score during the current round of local training, its geological matching score with the cluster center of its cluster set, and its physical constraint consistency score obtained by validating its trained local model using its local validation set. The smaller the physical constraint loss, the higher the physical constraint consistency score. The resulting global model update parameters are used as the global model update parameters distributed to the edge devices in the next round of federated training. Furthermore, the global model update parameters corresponding to different cluster sets are distributed to the edge devices belonging to the corresponding cluster sets.
[0039] On the cloud server, two main types of operations are performed: first, the edge devices are clustered, and then the edge devices belonging to the same category are aggregated according to the clustering results.
[0040] Specifically, after receiving the geological embedding vectors uploaded by each edge device, the cloud server calculates the cosine similarity between each pair of geological embedding vectors to achieve clustering of the edge devices. In one embodiment, a clustering threshold can be set. Cosine similarity values higher than the clustering threshold are considered. Edge devices are clustered into the same cluster. In practice, the clustering threshold can be set to... =0.85.
[0041] Among them, any two geological embedding vectors , Cosine similarity between The calculation formula is: .
[0042] Clustering operations can group foundation pits with similar geological characteristics into the same category. For example, all foundation pits can be classified into "high water-bearing soft soil group" or "dense sand and gravel group". This avoids interference from heterogeneous geological data.
[0043] After clustering, the local model update parameters of edge devices belonging to the same cluster set are aggregated to obtain the global model update parameters corresponding to that cluster set.
[0044] In traditional technologies, cloud servers directly aggregate the local model update parameters uploaded by each edge device to obtain global model update parameters before distributing them to each edge device. The drawback of this approach is that heterogeneous geological data may interfere with each other, hindering model learning.
[0045] In this application, edge devices are first aggregated based on geological features, grouping foundation pits with similar geological features into the same cluster set. Then, the local model update parameters in each cluster set are aggregated to obtain the global model update parameters corresponding to that cluster set. Finally, the global model update parameters obtained from the cluster aggregation are distributed to each edge device in that cluster set. This avoids interference from heterogeneous geological data and is beneficial for model learning.
[0046] In traditional techniques, when performing aggregation calculations, the update parameters of the local models being aggregated are directly weighted and summed, with each local model update parameter having the same weight coefficient. The drawback of this approach is that it cannot fully utilize high-quality model parameters.
[0047] In this application, the data quality assessment score of the edge device is used as the weight coefficient of the corresponding local model update parameters. The data quality assessment score of the edge device is the sum of the local data integrity score during the current round of local training, the geological matching score between the edge device and the cluster center of its cluster set, and the physical constraint consistency score obtained by the edge device using its local validation set to validate the trained local model. A higher local data integrity score indicates more complete data during local training, a higher physical constraint consistency score indicates that the local model better conforms to mechanical equilibrium constraints, and these indicators show that the reliability of the local model update parameters is higher. A higher geological matching score indicates that the corresponding local model update parameters are more consistent with the prediction of this type of geological feature. Therefore, using the sum of the local data integrity score, geological matching score, and physical constraint consistency score as the weight coefficient of the corresponding local model update parameters, this dynamic adaptive weight fusion strategy can give high-quality, high-matching construction sites more say, thereby accelerating the model convergence speed and improving the model prediction accuracy.
[0048] In practical operation, the data quality evaluation score of the local model update parameters of the i-th edge device is used. The expression can be represented as: ; In the formula, , , These represent the local data integrity score, geological matching score, and physical constraint consistency score of the i-th edge device, respectively. , , They represent , , The weighted summation coefficient.
[0049] For example, the coefficients α=0.4, β=0.4, γ=0.2, and α+β+γ=1.
[0050] Among them, the local data integrity score The formula for representing the integrity of local data can be expressed as: ; In the formula, MR represents the data missing rate of the i-th edge device in the current training period.
[0051] Among them, the geological matching score The similarity between the i-th edge device and its cluster center can be represented by the following formula: ; In the formula, Let i be the geological embedding vector of the i-th edge device. It is the cluster center of the cluster to which the i-th edge device belongs.
[0052] Among them, the physical constraint consistency score Related to physical constraint loss, the smaller the physical constraint loss, the higher the physical constraint consistency score. Its calculation formula can be expressed as: ; In the formula, Let be the physical constraint loss of the local model of the i-th edge device on the local validation set.
[0053] Based on the above data quality assessment scores Then, the local model update parameters in each cluster set can be aggregated. The aggregation formula is: ; In the formula, in the formula, Update parameters for the global model. This represents the data quality assessment score of the i-th edge device. Let represent the local model update parameters of the i-th edge device, that is, the parameter increment of the local model of the i-th edge device, and C represent the cluster set to which the i-th edge device belongs.
[0054] After obtaining the global model update parameters, they are distributed to each edge device in the corresponding cluster set. The edge device can update its local model based on the received global model update parameters, and the update formula is as follows: ; In the formula, η is the learning rate, which can be, for example, 0.1. These are the local model parameters before updating based on the global model update parameters. These are the local model parameters updated based on the global model update parameters.
[0055] In one embodiment, the cloud server has a full physical language model. In the early stages of federated learning, the initial local model of the edge device is obtained by knowledge distillation of the full physical language model as the teacher model.
[0056] Based on the above steps, one federated training is completed. By performing multiple federated training sessions and completing federated learning, each edge device can obtain the final trained local model, which is the trained local foundation pit prediction model.
[0057] Then, the obtained local foundation pit prediction model can be put into practical reasoning applications.
[0058] Secondly, this invention claims protection for a foundation pit monitoring method based on cloud-edge collaboration.
[0059] like Figure 2 The diagram shows a flowchart of the steps of a cloud-edge collaborative foundation pit monitoring method according to an embodiment of the present invention. Figure 3 The diagram shown is a system architecture diagram of cloud-edge collaboration in one embodiment of the present invention, as follows: Figure 4 The diagram shown illustrates the information interaction between the training and application phases of a cloud-edge collaborative model in one embodiment of the present invention. The following is combined with... Figures 2-4 This monitoring method will be introduced.
[0060] S21. The edge device obtains the current period's foundation pit information from the acquisition terminal and inputs it into its local lightweight model to obtain the prediction result of the foundation pit state in the future period. The foundation pit state includes the horizontal displacement of the foundation pit and the lateral earth pressure of the foundation pit. The local lightweight model is the local foundation pit monitoring model. The local foundation pit monitoring model outputs the probability of different predicted values of the foundation pit state. The predicted value corresponding to the highest probability is used as the prediction result of the foundation pit state. The edge device also calculates the information entropy H(x) of the foundation pit state x based on the probability of different predicted values of the foundation pit state x output by the local foundation pit monitoring model. If either the information entropy H(x) or the prediction result exceeds its corresponding threshold, it is judged that there is a risk and triggers the risk emergency operation. The risk emergency operation includes informing the acquisition terminal to increase the acquisition frequency and sending the high-frequency foundation pit monitoring data collected by the acquisition terminal to the cloud server. The high-frequency foundation pit monitoring data is the data collected after increasing the acquisition frequency.
[0061] Specifically, the edge device is connected to the data acquisition terminal, which collects the foundation pit monitoring data of the corresponding foundation pit in real time and transmits it to the edge device.
[0062] In one embodiment, the acquisition terminal may include a multi-source heterogeneous sensor group, an acquisition control module, and a signal transmission module.
[0063] A multi-source heterogeneous sensor array can include displacement gauges, earth pressure cells, and inclinometers. The displacement gauges can be magnetostrictive displacement sensors, using the RT1010 protocol for communication, with a range of 0-50mm and an accuracy of ±0.1mm. They are deployed around the perimeter of the foundation pit, on the capping beams, and on top of the retaining piles to capture millimeter-level horizontal and vertical displacement variations. The earth pressure cells can be vibrating wire earth pressure gauges, using the Modbus-RTU protocol for communication, with a range of 0-1000kPa and an accuracy of ±1% FS. They are embedded at the contact surface between the retaining piles and the soil (depths of -5m, -10m, and -15m) to monitor lateral earth pressure in real time. The inclinometers can be MEMS dual-axis inclinometers, using the RS485 protocol for communication, with a range of ±5° and an accuracy of ±0.01°. They are installed on the sidewall beams of the foundation pit to monitor the inclination angle of the deep soil.
[0064] The acquisition control module (MCU) can be equipped with a low-power ARM Cortex-M4 processor and supports "dual-mode" acquisition logic. In the default mode, it performs timed acquisition at the normal frequency of the first-level pit (1 time / 1 hour); at the same time, it keeps a listening state and receives switching instructions from the edge at any time. Once the instruction is received, it immediately switches to the high-frequency acquisition mode (up to 1 time / 1 minute).
[0065] The signal transmission module can adopt a dual-mode signal transmission module, integrating the SX1278 (LoRa) and ESP32 (WiFi) dual-mode communication chips. It has a "service adaptive" protocol switching function. When the monitored data is a statistical value (such as a single displacement floating-point number) and the number of bytes is <1024 bytes (approximately 64 bytes), it automatically locks into LoRa mode. Operating in the 470-510MHz frequency band with a transmission interval of 100ms, it utilizes its strong penetration to solve the signal blind zone problem at the -2 level underground of the foundation pit. When it receives a waveform feedback command triggered by "high information entropy" at the edge end, requiring the upload of uncompressed raw vibration waveform data (number of bytes >1024 bytes, approximately 2048 bytes / second), it automatically wakes up WiFi mode. Utilizing a high transmission rate of 150Mbps, it achieves millisecond-level upload of large-capacity data, providing analysis material for the full physical model in the cloud.
[0066] Specifically, the edge device has a multimodal interface. In addition to acquiring the foundation pit monitoring data from the acquisition terminal, it can also pull electronic construction log text (such as "excavator operation" and "support erection") in real time to provide context for the model and form the construction condition text information for the current period.
[0067] Specifically, the edge device has a parsing module that processes the acquired foundation pit monitoring data. This parsing module can be developed based on an NVIDIA Jetson or high-performance NPU embedded platform. The parsing module has protocol parsing and data standardization functions. Its built-in feature-matching-based protocol recognition algorithm can automatically identify the sensor protocol type by scanning the frame header structure of the input signal (such as Modbus address code, RT1010 start character), baud rate characteristics, and CRC / LRC check method. Then, it uniformly encapsulates the parsed heterogeneous data into a standard JSON format containing device_id (device ID), timestamp (timestamp accurate to milliseconds), type (physical quantity type), value (numerical value), and unit (unit) for subsequent model calls.
[0068] For example, the edge device parses the Modbus message [02 04 00 00 00 01 31 CA] uploaded by the earth pressure cell into a stress value of 120 kPa, and converts the JSON data returned by the inclinometer into a standard format. At the same time, it synchronously acquires the electronic construction log text information of the current foundation pit, such as the current working condition text "Excavator is excavating soil in the south area, depth -5m", thus preparing semantic context data for subsequent multimodal analysis.
[0069] Specifically, the edge device has a data preprocessing module, which fills in missing values and corrects outliers in the standard format data output by the parsing module, and then converts the construction condition text information and foundation pit monitoring data of the current period into a multimodal coding vector to obtain the foundation pit information of the current period. The specific conversion process can be referred to the previous introduction.
[0070] like Figure 5The diagram shows a flowchart of data processing performed by the edge device in one embodiment of the present invention. Taking a municipal foundation pit monitoring project as an example, the soil layer where the foundation pit is located is silty clay. The analysis module receives a set of raw monitoring data containing different protocols at time t. Specifically, the sequence uploaded by the displacement gauge using the RT1010 protocol is [10.5, 11.0, -, -, 12.0, 13.5] (unit: mm), and there are consecutive data loss at times 3 and 4. At the same time, the sequence uploaded by the earth pressure cell using the Modbus protocol is [105, 108, 190, 112, 115] (unit: kPa), and the value at time 3 deviates significantly from the normal range. The data preprocessing module first performs missing value imputation. For the two consecutive missing points at time 3 and 4 in the displacement gauge data sequence, since the number of missing points is small (3 points), the system uses a linear interpolation algorithm for repair: based on the effective value of 11.0 mm at time 2 and 12.0 mm at time 5, the time step increment is calculated, and then the value of the third missing point is calculated to be 11.0 + (12.0 - 11.0) / 3 = 11.33 mm, and the value of the fourth missing point is 11.0 + 2 × (12.0 - 11.0) / 3 = 11.67 mm, thus completing the continuity of the time series data. Subsequently, the system performs outlier correction based on physical sensing. For the 190 kPa value collected by the earth pressure cell at time 3, the system no longer relies solely on simple threshold judgment, but calls the built-in physical constraint module for verification. The system, combining the physical properties of silty clay and analyzing it according to the soil ultimate stress constraint equation, found that the sudden increase in stress at that moment (from 108 kPa to 190 kPa) was not accompanied by a corresponding displacement abrupt change, severely violating the physical constitutive relationship of stress-strain compatibility. Therefore, it was determined that this value was an anomaly caused by electromagnetic interference from the sensor, rather than a real emergency. The preprocessing module then selected the average of the effective values (108 kPa and 112 kPa) at adjacent moments before and after the anomaly point, correcting the value at that point to 110 kPa. After data cleaning, the system standardized the data to ensure uniform distribution. For the displacement gauge sequence [10.5, 11.0, 11.33, 11.67, 13.5], the system converts it into a Z-score sequence based on historical statistical distribution, resulting in [-1.0, -0.5, -0.17, 0.17, 2.0]. For the earth pressure cell sequence [105, 108, 110, 112, 115], the system calculates the median as 110 and the interquartile range (IQR) as 7, and after processing with a robust normalization formula, the sequence is [-0.71, -0.29, 0, 0.29, 0.71]. Finally, the system executes a dual-modal cue-based fine-tuning code for the "working condition-data" condition.The preprocessing module does not simply encode the time-series data into pseudo-text. Instead, it obtains the current construction log text "excavator operating near the monitoring point" through an interface and uses a pre-trained text encoder to convert this text into a context vector (Context Embedding). Simultaneously, it encodes the standardized sensor numerical sequence into a time-series token sequence. The system concatenates and fuses the context vector as a prefix prompt with the time-series token sequence. For example, for the displacement mutation value of 13.5mm (standardized value 2.0) at time t_5, because the prefix prompt contains the semantic feature of "excavator operating," the model's attention mechanism automatically identifies the high correlation between this mutation and construction vibration. Therefore, in subsequent analysis, it correctly attributes it to construction disturbance, effectively eliminating abnormal interference and ensuring the quality and physical interpretability of the model input.
[0071] Specifically, the edge device has a model operation module, which deploys a local foundation pit monitoring model. This model is used to input the current construction condition text information into the local foundation pit monitoring model to obtain predictions of the foundation pit's state in future periods. Specifically, the predicted foundation pit state includes the horizontal displacement and lateral earth pressure of the foundation pit in future periods, and may also include the predicted inclination angle of the foundation pit.
[0072] Specifically, the edge device has a risk assessment module. The local foundation pit monitoring model outputs the probabilities of different predicted values of the foundation pit state, and the predicted value corresponding to the highest probability is taken as the prediction result of the foundation pit state. The risk assessment module is used to calculate the information entropy H(x) of the foundation pit state x based on the probabilities of different predicted values of the foundation pit state x output by the local foundation pit monitoring model. If either the information entropy H(x) or the prediction result exceeds its corresponding threshold, it is judged that there is a risk, triggering a risk emergency operation. Among them, if the information entropy H(x) is too large, it indicates that the prediction result has strong uncertainty and the model's understanding of the current working condition is insufficient, requiring the activation of a risk emergency operation; if the predicted value of the foundation pit state exceeds the threshold specified by industry standards, it indicates that there is a risk, and a risk emergency operation also needs to be activated. The risk emergency operation includes informing the acquisition terminal to increase the acquisition frequency and sending the foundation pit monitoring data acquired after increasing the acquisition frequency to the cloud server.
[0073] For example, the risk assessment module calculates the entropy of the model's prediction results in real time. If the predicted entropy output by the model exceeds a preset threshold (e.g., H(x)>1.0), or if the displacement rate exceeds a safety threshold (e.g., 0.5 mm / h) according to the specifications, the system will immediately trigger a risk emergency operation, sending instructions to the field terminal to increase the sampling frequency of the risk point and its nearby sensors from once per hour to once per minute, and continue high-frequency collection until the entropy falls back or the risk is eliminated, in order to capture the dynamic evolution trend of minor risks. The high-frequency data collected is uploaded to the cloud server by the communication module of the edge device based on the MQTT protocol.
[0074] S22, the cloud server runs its deployed full physical language model to perform in-depth analysis of the received high-frequency foundation pit monitoring data, and generates a risk report based on the analysis results.
[0075] Specifically, after the acquisition terminal increases its acquisition frequency, the high-frequency data it acquires is transmitted to the edge device. The edge device does not process the data but forwards it directly to the cloud server for in-depth analysis. Because the cloud server has more storage resources and stronger computing power, it can handle heavy computing tasks, thus enabling the deployment of a large-scale physical language model with a massive number of parameters capable of comprehensive analysis and reasoning. In one embodiment, the loss function used to train the large-scale physical language model is a comprehensive loss that considers both data fitting loss and physical constraint loss; the specific form of this loss can be found in the description above.
[0076] After receiving high-frequency data uploaded by edge devices, a full-scale physical language model is run for in-depth attribution analysis to verify the physical consistency of the initial judgment results from the edge devices. For example, if the edge device analysis shows that the displacement rate at a certain location reaches 75% of the warning value and is accompanied by abnormal earth pressure distribution, triggering a risk emergency operation, the cloud server then calls the full-scale physical language model to make more accurate and detailed predictions. Based on the prediction results, a risk report can be generated. For example, a structured risk report can be generated that includes the risk location (e.g., the middle of the south side of the foundation pit), the risk level, the abnormal indicators (excessive displacement), and the physical attribution analysis. The structured risk report further includes natural language explanation text, generated by the cloud full-scale model based on the geotechnical mechanics attribution chain. For example, "The displacement at point CX-05 on the south side of the foundation pit is accelerating, mainly due to a 30% decrease in the axial force of the support at -10m, resulting in excessive elastic deformation of the support piles. It is recommended to immediately tighten the piles and strengthen monitoring." The report is then pushed to the project manager's mobile app within one minute via API, enabling rapid transmission of risk information.
[0077] In one embodiment, the edge device can periodically train a local model using newly collected data. The training method is the federated learning method described above, which will not be repeated here.
[0078] Thirdly, the present invention also relates to a cloud-edge collaborative foundation pit monitoring system, which includes an edge device and a cloud server, the edge device and the cloud server being used to collaboratively implement the methods mentioned in the first and second aspects above.
[0079] In summary, this invention considers two main aspects. First, physical constraint loss generates a high penalty gradient, forcing model parameters to converge towards a physical manifold that conforms to the "force-deformation coordination" principle during backpropagation. This allows the model to learn the essential laws of geotechnical mechanics, rather than merely performing statistical fitting at the numerical level. Specifically, it ensures that the predicted cumulative displacement and earth pressure changes conform as closely as possible to the equilibrium equations of an elastic foundation beam, reducing predictions that violate physical principles and thus improving prediction accuracy. Second, during cloud aggregation, this invention first aggregates edge devices based on geological features, grouping foundation pits with similar geological characteristics into the same cluster. Then, it aggregates the local model update parameters within each cluster to obtain global model update parameters corresponding to that cluster. Finally, it distributes these global model update parameters to each edge device within that cluster. This avoids interference from heterogeneous geological data, facilitates model learning, and improves prediction accuracy. Furthermore, when performing cloud aggregation, this invention uses the cumulative score of local data integrity, geological matching, and physical constraint consistency as the weight coefficients for the corresponding local model update parameters. This dynamic adaptive weight fusion strategy allows high-quality, highly matched construction sites to gain greater influence, thereby accelerating model convergence and improving prediction accuracy. Therefore, the federated learning-based foundation pit prediction model training method proposed in this invention can effectively improve model prediction accuracy. Using the foundation pit prediction model obtained through this training method as a lightweight large model for each edge device can improve the accuracy of local predictions, thus enabling more precise identification of foundation pit risks.
[0080] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification. It should be noted that the terms "in one embodiment," "for example," and "again" are intended to illustrate the present invention and are not intended to limit the present invention.
[0081] The above embodiments merely illustrate several implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention.
Claims
1. A method for training a foundation pit prediction model based on federated learning, characterized in that, Each round of federated training thereof comprises the following steps: The cloud server sends global model update parameters to the edge device; The edge device determines a local model based on the global model update parameters received by it, and performs local training on the local model using local data, so that the model predicts the foundation pit state in the future period based on the foundation pit information in the current period, and obtains local model update parameters; the foundation pit state includes foundation pit horizontal displacement and foundation pit lateral earth pressure; the local training loss is a comprehensive loss considering data fitting loss and physical constraint loss, wherein the data fitting loss represents the similarity deviation between the prediction result and the true label, and the physical constraint loss represents the degree of violation of mechanical equilibrium of the foundation pit support structure based on the prediction result; The edge device also maps the foundation pit geological information extracted during the collection of local data into a geological embedding vector, and sends the local model update parameters and the geological embedding vector to the cloud device; The cloud server clusters all edge devices based on the similarity of the geological embedding vectors of the edge devices, and aggregates the local model update parameters of the edge devices belonging to the same cluster set to obtain the global model update parameters corresponding to the cluster set; when performing aggregation calculation, the data quality evaluation score of the edge device is used as the weight coefficient of the corresponding local model update parameter, and the data quality evaluation score of the edge device is the cumulative of the local data integrity score when the edge device performs local training in the current round, the geological matching degree score between the edge device and the cluster center of the cluster set to which the edge device belongs, and the physical constraint consistency score obtained by the edge device when verifying the local model trained by it using its local verification set; the smaller the physical constraint loss, the higher the physical constraint consistency score, and the obtained global model update parameters are used as the global model update parameters sent to the edge device in the next round of federated training, and the global model update parameters corresponding to different cluster sets are distributed to the edge devices belonging to the corresponding cluster set. 2.The foundation pit prediction model training method of claim 1, wherein, At the edge device, the calculation formula of the comprehensive loss is: ; In the formula, is a comprehensive loss, is a data fitting loss, is a physical constraint loss, and λ is a weight coefficient of the set physical constraint loss; wherein the physical constraint loss is calculated as: ; In the formula, T is the number of time periods in the future period predicted by the model, t is the time, , are the horizontal displacement of the foundation pit and the lateral earth pressure of the foundation pit at time t predicted by the model, respectively, is the balance differential operator of the foundation pit support structure based on the elastic foundation beam theory; For any foundation pit horizontal displacement u and lateral earth pressure p, the balance differential operator of the foundation pit supporting structure is The calculation formula is: In the formula, EI is the bending stiffness of the support pile, k is the horizontal reaction force coefficient of the soil, b is the distance between the piles in the foundation pit, denotes the derivative of the horizontal displacement u of the foundation pit along the depth direction z of the foundation pit. 3.The foundation pit prediction model training method of claim 1, wherein, At the edge device, the current period foundation pit information input into the model is a multi-modal encoding vector, and the construction process of the multi-modal encoding vector comprises: Obtain the foundation pit monitoring data collected by the collection terminal in the current period, and encode the foundation pit monitoring data at each collection time into a sensor time Token sequence according to three elements of value, rate of change and time interval; Obtain the construction working condition text information in the current period and convert it into a context vector through a pre-trained text encoder; The context vector is concatenated as a prefix prompt before the sensor time Token sequence to obtain a multi-modal encoding vector. 4.The foundation pit prediction model training method of claim 3, wherein, The foundation pit monitoring data collected by the collection terminal includes foundation pit displacement, earth pressure and soil inclination. 5.The foundation pit prediction model training method of claim 1, wherein, The foundation pit geological information includes cohesion, internal friction angle, compression modulus, water content and lithology code. 6.The foundation pit prediction model training method of claim 1, wherein, At the cloud server, all edge devices are clustered based on the similarity of the geological embedding vectors of the edge devices, comprising: The cosine similarity between the geological embedding vectors is calculated two by two, and the edge devices whose cosine similarity is higher than a set clustering threshold are clustered into the same class. The cosine similarity between the geological embedding vectors is calculated two by two, and the edge devices whose cosine similarity is higher than a set clustering threshold are clustered into the same class. 7.The foundation pit prediction model training method of claim 1, wherein, At the cloud server, the local model update parameters of the edge devices belonging to the same cluster set are aggregated to obtain the global model update parameters corresponding to the cluster set, and the aggregation formula is: ; In the formula, is a global model update parameter, denotes the data quality evaluation score of the i-th edge device, denotes the local model update parameter of the i-th edge device, and C denotes the cluster set to which the i-th edge device belongs. wherein the score is calculated by the formula: ; , , are the local data integrity score, the geology matching score, the physical constraint consistency score of the i-th edge device, respectively, , , denote the weighted sum coefficients of , , , respectively. Score The formula for the calculation is: ; In the formula, MR represents the data missing rate of the i-th edge device in the current training period; Score The formula for the calculation is: ; In the formula, is a geological embedding vector of the ith edge device, is a cluster center of a cluster to which the ith edge device belongs. Score The formula for the calculation is: ; In the formula, is the physical constraint loss of the local model of the ith edge device on the local validation set. 8.The foundation pit prediction model training method of claim 1, wherein, The cloud server has a full-amount physical large language model, and in the initial stage of federated learning, the initial local model of the edge device is obtained by knowledge distillation from the full-amount physical large language model as a teacher model.
9. A cloud-edge collaboration based foundation pit monitoring method, characterized in that, The method comprises the following steps: The edge device obtains the foundation pit information of the current period from the collection terminal and inputs it into the local lightweight model to obtain the prediction result of the foundation pit state in the future period. The foundation pit state includes the horizontal displacement of the foundation pit and the lateral earth pressure of the foundation pit. The local lightweight model is a local foundation pit monitoring model obtained by using the training method according to any one of claims 1 to 7. The local foundation pit monitoring model outputs the probability of different prediction values of the foundation pit state. The prediction value corresponding to the maximum probability is taken as the prediction result of the foundation pit state. The edge device also calculates the information entropy H(x) of the foundation pit state x based on the probability of different prediction values of the foundation pit state x output by the local foundation pit monitoring model. If any of the information entropy H(x) or the prediction result exceeds the corresponding threshold value, it is judged that there is a risk, and a risk emergency operation is triggered. The risk emergency operation includes informing the collection terminal to increase the collection frequency and sending the high-frequency foundation pit monitoring data collected by the collection terminal to the cloud server. The high-frequency foundation pit monitoring data are the data collected after increasing the collection frequency. The cloud server runs the full-amount physical large language model deployed by it to perform deep analysis on the received high-frequency foundation pit monitoring data, and generates a risk report based on the analysis result.
10. A cloud-edge collaborative foundation pit monitoring system, characterized in that, The method comprises the following steps: The edge device comprises a first processor, a first communication module and a first memory. The first memory stores a computer program. The first processor executes the program to realize the edge-side steps of any one of claims 1-8. The cloud server comprises a second processor, a second communication module and a second memory. The second processor executes the program to realize the cloud-side steps of any one of claims 1-8. The edge device and the cloud server perform data interaction through a network.
Citation Information
Patent Citations
Deep foundation pit deformation prediction method and system based on neural network and rough set classification
CN120822099A
Method for predicting and updating groundwater level in foundation pit dewatering area based on deep neural network
LU502989B1
Prediction method, and terminal and server
WO2019090954A1
Model training method and apparatus based on federated learning, and device and storage medium
WO2025256098A1