Dam safety monitoring and prediction method, device and equipment under small sample condition, medium and product
Patent Information
- Application Number
- CN202611040706.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-14
- Publication Date
- 2026-09-25
AI Technical Summary
[0004]本申请的目的是提供一种小样本条件下大坝安全监测预测方法、装置、设备、介质及产品,可以有效克服数据样本不足导致的大坝效应量预测精度不足的问题,为大坝安全评估提供更多决策支持
本申请提供了一种小样本条件下大坝安全监测预测方法、装置、设备、介质及产品,针对小样本条件下的大坝监测数据进行采集,并构建数据集,便于克服小样本条件下由于数据量不足产生的问题;构建的FCN-Transformer数据驱动模型,结合全卷积网络和Transformer模型能够同时学习大坝监测数据中的时序特征和复杂非线性特征,有利于提升预测准确性;采用ZOA优化算法优化FCN-Transformer数据驱动模型的超参数,实现超参数自动寻优,避免人工调参的盲目性,提升模型收敛效率;基于大坝经典统计模型构建物理驱动模型,能够遵循大坝变形的基本物理规律,对数据量要求低,有利于在小样本条件下弥补数据驱动模型的不足;通过引入物理信息神经网络,将ZOA-FCN-Transformer数据驱动模型与物理驱动模型融合,得到ZOA-FCN-Transformer-PINN模型,通过ZOA-FCN-Transformer-PINN模型得到效应量的预测结果,有效弥补了数据驱动模型在数据量不足时容易出现过拟合、泛化能力差的问题,显著提高了模型在小样本条件下的预测精度和鲁棒性。
Smart Images

Figure CN122817873A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of dam safety monitoring, and in particular to a method, device, equipment, medium, and product for dam safety monitoring and prediction under small sample conditions. Background Technology
[0002] Dam projects, as core hubs in the development and utilization of water resources, play an irreplaceable role in flood control, power generation, and irrigation. Dam safety monitoring is a crucial technical means to quantitatively evaluate dam operational performance and ensure its safe and stable operation. With the rapid development of artificial intelligence technology, especially the widespread application of deep learning algorithms in dam safety monitoring, utilizing models to extract nonlinear relationships between input and output quantities from massive monitoring data has become an effective way to obtain high-precision prediction results. Accurate prediction of dam effect quantities is of paramount engineering significance for assessing dam health and mitigating potential risks.
[0003] However, most AI-based dam safety monitoring models rely on large datasets. In practical engineering applications, due to limitations such as short monitoring periods and low monitoring frequency requirements for some large-scale projects, and insufficient investment and equipment for small and medium-sized water conservancy projects, the acquired dam monitoring data generally exhibits significant "small sample" characteristics. Under small sample data conditions, conventional deep learning algorithms struggle to fully capture the deep patterns within the data, easily falling into overfitting traps. This leads to decreased stability and poor generalization ability of the prediction model, severely limiting prediction accuracy and failing to meet the actual needs of engineering safety monitoring. Summary of the Invention
[0004] The purpose of this application is to provide a method, device, equipment, medium and product for dam safety monitoring and prediction under small sample conditions, which can effectively overcome the problem of insufficient prediction accuracy of dam effect quantities caused by insufficient data samples, and provide more decision support for dam safety assessment.
[0005] To achieve the above objectives, this application provides the following solution: Firstly, this application provides a method for dam safety monitoring and prediction under small sample conditions, including: Dam monitoring data under small sample conditions were collected and a dataset was constructed; the dam monitoring data included influencing factor data and dam effect sizes; the dataset included a training set, a test set, and a validation set.
[0006] An FCN-Transformer data-driven model is constructed, and the hyperparameters of the FCN-Transformer data-driven model are optimized using the ZOA optimization algorithm to obtain the ZOA-FCN-Transformer data-driven model; the FCN-Transformer data-driven model includes a fully convolutional network and a Transformer model.
[0007] By using data from the training set, we solve for the regression coefficients in the classical statistical model of dams and construct a physical driving model.
[0008] Based on the physical information neural network, the ZOA-FCN-Transformer data-driven model and the physical-driven model are fused to obtain the ZOA-FCN-Transformer-PINN model.
[0009] The data from the test set were input into the ZOA-FCN-Transformer-PINN model to obtain the predicted effect size.
[0010] In one implementation, the hyperparameters of the FCN-Transformer data-driven model are optimized using the ZOA optimization algorithm to obtain the ZOA-FCN-Transformer data-driven model, specifically including: Initialize a zebra population, wherein the individual zebras in the population are a set of hyperparameter combinations of the FCN-Transformer data-driven model.
[0011] The FCN-Transformer data-driven model is configured for each zebra individual in the zebra population, and forward propagation computation is performed on the training set to obtain the predicted value of the FCN-Transformer data-driven model.
[0012] The fitness value is calculated based on the predicted values of the FCN-Transformer data-driven model and the actual values of the dam's effect size. The formula for calculating the fitness value is as follows: .
[0013] in, It is the first The fitness value of a single zebra. It is the total number of data samples. It is the first monitoring The true value of the dam's effect size for each data sample. It is the index number of the data sample. It is the FCN-Transformer data-driven model for the first The predicted value of a data sample.
[0014] The zebra with the lowest fitness value is selected as the current pioneer zebra.
[0015] The positions of individual zebras in a zebra population were updated by simulating their foraging and defense strategies, resulting in an updated population.
[0016] Based on the updated population configuration of the FCN-Transformer data-driven model, repeat the above steps until the set maximum number of iterations is reached to obtain the final pioneer zebra and the corresponding ZOA-FCN-Transformer data-driven model.
[0017] In one embodiment, the update formula for the foraging strategy is: .
[0018] .
[0019] .
[0020] in, It is the first The zebra's new state in the nth dimension based on the foraging strategy stage. It was the pioneer zebra in the first Values in the dimension It is the state value of the m-th zebra in the n-th dimension. It is a random number. It is an adjustment parameter that controls the degree of influence of the current position. This represents the current overall state of the m-th zebra. It is the first The zebra is in a new state based on its foraging strategy phase. It is the first The zebra's fitness value is based solely on its foraging strategy phase. It is the fitness value corresponding to the current state of the m-th zebra. It is the index number of the individual zebra. It is a dimension.
[0021] In one embodiment, the update formula for the defense strategy is: .
[0022] in, It is the first The zebra's new state based on its defense strategy in the nth dimension. It is an escape strategy when facing attacks from large predators. It is a defensive strategy against small predators. It is the state value of the m-th zebra in the n-th dimension. It is a constant. It is a random number. It is the number of iterations. It is the maximum number of iterations. It is the probability of switching between escape and defense strategies. That's the location of the zebra that was attacked. It is an adjustment parameter that controls the degree of influence of the current position. It is the index number of the individual zebra. It is a dimension.
[0023] In one embodiment, the classical statistical model for the dam includes the HST model, the HTT model, and the HT model. A At least one of the T models.
[0024] The expression for the HST model is: .
[0025] The expression for the HTT model is: .
[0026] The HT A The expression for the T-model is: .
[0027] in, It is a constant term. , , , , , , It is the regression coefficient. It is the upstream water head. It is the upstream head of the water. Power of 1 It is the order index of the water pressure component polynomial. It is the order of the polynomial. It is the cumulative number of days since the initial monitoring day from the current monitoring day. It is the item number index for the temperature component. It is the first The regression coefficients corresponding to each temperature factor It is the first Data from one thermometer, It refers to the number of thermometers. This is the daily average temperature for the current monitoring day. The current monitoring day The average temperature of the day It is HT A Number of temperature factors in the T-model It is the cumulative number of days since the initial monitoring day divided by 100.
[0028] In one embodiment, based on the physical information neural network, the ZOA-FCN-Transformer data-driven model and the physical-driven model are fused to obtain the ZOA-FCN-Transformer-PINN model, specifically including: A data loss function is constructed, which is the mean squared error between the predicted values of the ZOA-FCN-Transformer data-driven model on the training set and the actual effect size of the dam; the calculation formula is: .
[0029] in, It is a data loss function. It is the total number of data samples. It is the first The true value of the dam's effect size for each data sample. The ZOA-FCN-Transformer data-driven model is for the first The predicted value of a data sample.
[0030] A physical loss function is constructed, which is the mean squared error between the predicted values of the ZOA-FCN-Transformer data-driven model on the training set and the predicted values calculated by the physical driving model; the calculation formula is as follows: .
[0031] in, It is the physical loss function. It is the total number of data samples. The ZOA-FCN-Transformer data-driven model is for the first Predicted values for each data sample It is a physics-driven model for the first The predicted value of a data sample.
[0032] The total loss function is obtained by weighted summation of the data loss function and the physical loss function.
[0033] The total loss function is calculated using the validation set. When the total loss function reaches the preset convergence threshold or the preset maximum number of iterations, parameter updates are stopped, resulting in the ZOA-FCN-Transformer-PINN model.
[0034] Secondly, this application provides a dam safety monitoring and prediction device under small sample conditions, including: a data acquisition module, a data-driven model module, a physical-driven model module, a fusion module, and a prediction module.
[0035] The data acquisition module is used to collect dam monitoring data under small sample conditions and construct a dataset; the dam monitoring data includes influencing factor data and dam effect size; the dataset includes a training set, a test set and a validation set.
[0036] The data-driven model module is used to construct the FCN-Transformer data-driven model. The hyperparameters of the FCN-Transformer data-driven model are optimized using the ZOA optimization algorithm to obtain the ZOA-FCN-Transformer data-driven model. The FCN-Transformer data-driven model includes a fully convolutional network and a Transformer model.
[0037] The physics-driven model module is used to solve for the regression coefficients in the classic statistical model of dams using data from the training set, and to construct a physics-driven model.
[0038] The fusion module is used to fuse the ZOA-FCN-Transformer data-driven model and the physics-driven model based on the physical information neural network to obtain the ZOA-FCN-Transformer-PINN model.
[0039] The prediction module is used to input data from the test set into the ZOA-FCN-Transformer-PINN model to obtain the predicted effect size.
[0040] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the dam safety monitoring and prediction method under small sample conditions as described in any one of the above applications.
[0041] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the dam safety monitoring and prediction method under small sample conditions described above.
[0042] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the dam safety monitoring and prediction method under small sample conditions described above.
[0043] According to the specific embodiments provided in this application, the following technical effects are disclosed: This application provides a method, device, equipment, medium, and product for dam safety monitoring and prediction under small sample conditions. It collects dam monitoring data under small sample conditions and constructs a dataset to overcome the problem of insufficient data volume. The constructed FCN-Transformer data-driven model, combining a fully convolutional network and a Transformer model, can simultaneously learn the temporal features and complex nonlinear features in the dam monitoring data, which helps improve prediction accuracy. The ZOA optimization algorithm is used to optimize the hyperparameters of the FCN-Transformer data-driven model, achieving automatic hyperparameter optimization, avoiding the blindness of manual parameter tuning, and improving model convergence efficiency. By constructing a physical-driven model based on the classic statistical model of dams, we can follow the basic physical laws of dam deformation, have low data requirements, and make it easier to compensate for the shortcomings of data-driven models under small sample conditions. By introducing a physical information neural network, we fuse the ZOA-FCN-Transformer data-driven model with the physical-driven model to obtain the ZOA-FCN-Transformer-PINN model. The effect size prediction results obtained through the ZOA-FCN-Transformer-PINN model effectively make up for the problems of overfitting and poor generalization ability that data-driven models are prone to when there is insufficient data, and significantly improve the prediction accuracy and robustness of the model under small sample conditions. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 A flowchart illustrating a method for dam safety monitoring and prediction under small sample conditions, provided as an embodiment of this application; Figure 2 A flowchart illustrating a method for monitoring and predicting dam safety under small sample conditions, provided in one embodiment of this application; Figure 3 A schematic diagram of the horizontal displacement of the PL3-1 measuring point as provided in an embodiment of this application; Figure 4 A schematic diagram of the predicted curve and measured value of the horizontal displacement of the PL3-1 measuring point provided in an embodiment of this application using the ZOA-FCN-Transformer data-driven model. Figure 5 A schematic diagram of the regression curve and measured values of the HST model for the horizontal displacement of the PL3-1 measuring point provided in an embodiment of this application; Figure 6 A schematic diagram of the predicted curve and measured value of the horizontal displacement of the PL3-1 measuring point provided in an embodiment of this application using the ZOA-FCN-Transformer-PINN model; Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0046] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0047] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0048] First, the technical terms used in this application will be explained.
[0049] Currently popular methods for predicting dam effects can be broadly categorized into two types: data-driven models and physics-driven models. The finite element method (FEM) within physics-driven models is based on structural mechanics principles and has a solid theoretical foundation. However, it has extremely high requirements for material physical parameters and complex boundary conditions, making it difficult to accurately obtain these parameters in practical modeling, often leading to significant deviations between simulation results and measured values. Classical statistical models for dams can derive and analyze the quantitative relationship between effects and environmental quantities based on mechanical theory. Conversely, while pure data-driven models do not require detailed understanding of physical mechanisms, under small sample conditions, without the constraints of physical laws, simply relying on data training often lacks physical interpretability and exhibits poor robustness.
[0050] To address the limited prediction accuracy of single models under small sample conditions, incorporating physical mechanisms into deep learning models is a key approach. Physical Information Neural Networks (PINNs) embed physical equations as constraints into the loss function of the neural network. This allows them to leverage data-driven methods to uncover nonlinear features while using physical mechanisms for regularization, effectively overcoming the overfitting risk associated with small sample sizes. In conclusion, to fully integrate the advantages of data-driven models (ZOA-FCN-Transformer) and classical statistical models for dams, constructing a prediction model based on physical information neural networks suitable for small sample conditions is essential for improving the prediction accuracy of dam safety monitoring.
[0051] like Figure 1 As shown, a method for dam safety monitoring and prediction under small sample conditions is provided, including the following steps 201 to 205.
[0052] Step 201: Collect dam monitoring data under small sample conditions and construct a dataset; the dam monitoring data includes influencing factor data and dam effect size; the dataset includes a training set, a test set, and a validation set.
[0053] Step 202: Construct the FCN-Transformer data-driven model, and use the ZOA optimization algorithm to optimize the hyperparameters of the FCN-Transformer data-driven model to obtain the ZOA-FCN-Transformer data-driven model; the FCN-Transformer data-driven model includes a fully convolutional network and a Transformer model.
[0054] Step 203: Use the data in the training set to solve for the regression coefficients in the classical statistical model of the dam and construct a physical driving model.
[0055] Step 204: Based on the physical information neural network, the ZOA-FCN-Transformer data-driven model and the physical-driven model are fused to obtain the ZOA-FCN-Transformer-PINN model.
[0056] Step 205: Input the data from the test set into the ZOA-FCN-Transformer-PINN model to obtain the predicted effect size.
[0057] By implementing steps 201 to 205 above, this application collects dam monitoring data under small sample conditions and constructs a dataset to overcome the problem of insufficient data volume under small sample conditions. The constructed FCN-Transformer data-driven model, combining a fully convolutional network and a Transformer model, can simultaneously learn the temporal features and complex nonlinear features in the dam monitoring data, which is beneficial to improving prediction accuracy. The ZOA optimization algorithm is used to optimize the hyperparameters of the FCN-Transformer data-driven model, realizing automatic hyperparameter optimization, avoiding the blindness of manual parameter tuning, and improving model convergence efficiency. Based on the classic statistical model of dams. Constructing a physics-driven model can follow the basic physical laws of dam deformation, has low data requirements, and is beneficial for compensating for the shortcomings of data-driven models under small sample conditions. By introducing a physical information neural network, the ZOA-FCN-Transformer data-driven model is fused with the physics-driven model to obtain the ZOA-FCN-Transformer-PINN model. The effect size prediction results are obtained through the ZOA-FCN-Transformer-PINN model, which effectively makes up for the problems of overfitting and poor generalization ability that data-driven models are prone to when there is insufficient data. It significantly improves the prediction accuracy and robustness of the model under small sample conditions.
[0058] In another exemplary embodiment of this application, the hyperparameters of the FCN-Transformer data-driven model are optimized using the ZOA optimization algorithm to obtain the ZOA-FCN-Transformer data-driven model, including the following steps 301 to 306.
[0059] Step 301: Initialize the zebra population, wherein the individual zebras in the zebra population are a set of hyperparameter combinations of the FCN-Transformer data-driven model.
[0060] Step 302: Configure the FCN-Transformer data-driven model for each zebra individual in the zebra population, and perform forward propagation calculation on the training set to obtain the predicted value of the FCN-Transformer data-driven model.
[0061] Step 303: Calculate the fitness value based on the predicted value of the FCN-Transformer data-driven model and the actual value of the dam's effect. The formula for calculating the fitness value is as follows: .
[0062] in, It is the first The fitness value of a single zebra. It is the fitness value. It is the total number of data samples (or the number of measurement points). It is the first monitoring The true value of the dam's effect size in the first data sample (or the first... (The actual dam effect monitoring value of each data point). It is the true value of the dam's effect quantity monitored (or the true value of the dam's effect quantity monitored). These are predictions from the FCN-Transformer data-driven model. It is the index number of the data sample. It is the FCN-Transformer data-driven model for the first The predicted value of a data sample.
[0063] Step 304: Select the zebra individual with the lowest fitness value as the current pioneer zebra.
[0064] Step 305: The positions of individual zebras in the zebra population are updated by simulating the foraging and defense strategies of zebras, resulting in the updated population.
[0065] Step 306: Based on the updated population configuration of the FCN-Transformer data-driven model, repeat the above steps until the set maximum number of iterations is reached to obtain the final pioneer zebra and the corresponding ZOA-FCN-Transformer data-driven model.
[0066] In another exemplary embodiment of this application, the update formula for the foraging strategy is: .
[0067] .
[0068] .
[0069] in, It is the first The zebra's new state in the nth dimension based on the foraging strategy stage. It's the pioneer zebra, It was the pioneer zebra in the first Values in the dimension It is the state value of the m-th zebra in the n-th dimension. It is a random number. It is an adjustment parameter that controls the degree of influence of the current position. This represents the current overall state of the m-th zebra. It is the first The zebra is in a new state based on its foraging strategy phase. It is the first The zebra's fitness value is based solely on its foraging strategy phase. It is the fitness value corresponding to the current state of the m-th zebra. It is the index number of the individual zebra. It is a dimension.
[0070] In another exemplary embodiment of this application, the update formula for the defense strategy is: .
[0071] in, It is the first The zebra's new state based on its defense strategy in the nth dimension. It is an escape strategy when facing attacks from large predators. It is a defensive strategy against small predators. It is the state value of the m-th zebra in the n-th dimension. It is a constant. It is a random number. It is the number of iterations. It is the maximum number of iterations. It is the probability of switching between escape and defense strategies. That's the location of the zebra that was attacked. It is an adjustment parameter that controls the degree of influence of the current position. It is the index number of the individual zebra. It is a dimension.
[0072] In another exemplary embodiment of this application, the classical statistical model for the dam includes the HST model, the HTT model, and the HT model. A At least one of the T models.
[0073] The expression for the HST model is: .
[0074] The expression for the HTT model is: .
[0075] The HT A The expression for the T-model is: .
[0076] in, It is a constant term. , , , , , , It is the regression coefficient. It is the upstream water head. It is the upstream head of the water. Power of 1 It is the order index of the water pressure component polynomial. It is the order of the polynomial. It is the cumulative number of days since the initial monitoring day from the current monitoring day. It is the item number index for the temperature component. It is the first The regression coefficients corresponding to each temperature factor It is the first Data from one thermometer, It refers to the number of thermometers. This is the daily average temperature for the current monitoring day. The current monitoring day The average temperature of the day It is HT A Number of temperature factors in the T-model It is the cumulative number of days since the initial monitoring day divided by 100.
[0077] In another exemplary embodiment of this application, step 204 is replaced by steps 401 to 404: Step 401, construct the data loss function, which is the mean squared error between the predicted values of the ZOA-FCN-Transformer data-driven model on the training set and the true effect size of the dam; the calculation formula is: .
[0078] in, It is a data loss function. It is the total number of data samples. It is the first The true value of the dam's effect size for each data sample. The ZOA-FCN-Transformer data-driven model is for the first The predicted value of a data sample.
[0079] Step 402, construct the physical loss function, which is the mean squared error between the predicted values of the ZOA-FCN-Transformer data-driven model on the training set and the predicted values calculated by the physical driving model; the calculation formula is: .
[0080] in, It is the physical loss function. It is the total number of data samples. The ZOA-FCN-Transformer data-driven model is for the first Predicted values for each data sample It is a physics-driven model for the first The predicted value of a data sample.
[0081] Step 403: The data loss function and the physical loss function are weighted and summed to obtain the total loss function.
[0082] Step 404: Calculate the value of the total loss function using the validation set. When the value of the total loss function reaches the preset convergence threshold or the preset maximum number of iterations, stop parameter updates and obtain the ZOA-FCN-Transformer-PINN model.
[0083] This application abandons the complex finite element partial differential equations and innovatively adopts the classical statistical model of dams (HST, HTT, HT). A The T-model provides the physical priors. By using actual monitoring data from the training set, the regression coefficients of the statistical model are solved using multiple linear regression analysis, thereby constructing a physical driving model that quantitatively describes the physical evolution of environmental quantities and dam effects under the current operating conditions.
[0084] This application employs a strictly defined Physical Information Neural Network (PINN) architecture, with fusion occurring at the loss function level. The data-driven model (ZOA-FCN-Transformer) maintains an independent forward propagation structure, while the theoretical predictions calculated by the physics-driven model (statistical model) are used to calculate the "physical loss." The final fusion is achieved by constructing a total loss function that includes both data loss and physical loss, and by dynamically optimizing the weights of the dual losses using the ZOA algorithm.
[0085] This application creatively replaces the difficult-to-solve partial differential equations in traditional PINN with a classical statistical model of dams as the physical mechanism, and deeply integrates it with the FCN-Transformer backbone network designed for small samples at the loss function level. Combined with the ZOA optimization algorithm, it achieves adaptive optimization of global parameters and loss weights. This combined approach achieves extremely high-precision prediction with lower computational costs and data requirements.
[0086] The following section provides a detailed explanation of the dam safety monitoring and prediction method under small sample conditions described in this application.
[0087] like Figure 2 As shown, the dam safety monitoring and prediction method under small sample conditions in this application specifically includes the following steps: Step 1: Determine the model input factor set based on the actual engineering situation (i.e., the model input factor set includes influencing factor data, for example...). , , , , , , , , , The effect sizes and their impact factor monitoring data (or impact factor data) of the corresponding monitoring points are used as the dataset for building the model, and are divided into training set, validation set, and test set. The effect sizes refer to those of dam monitoring points with small sample sizes.
[0088] Step 2: Import the training set obtained in Step 1 into the FCN-Transformer data-driven model. The FCN-Transformer data-driven model in this application is an improved model that adds FCN to the Transformer model, which helps to improve the prediction accuracy of the FCN-Transformer data-driven model under small sample conditions.
[0089] Step 3: Use the ZOA optimization algorithm to optimize the parameters in the FCN-Transformer data-driven model and construct the ZOA-FCN-Transformer data-driven model.
[0090] Step 4: Select a suitable classical statistical model for the dam, import the training set from Step 1 into the model, and use multiple linear regression analysis to obtain the regression coefficients of each item in the model to construct a physical driving model.
[0091] Step 5: Through the PINN model mechanism, the ZOA-FCN-Transformer data-driven model in Step 3 and the physical-driven model in Step 4 are deeply integrated to construct the ZOA-FCN-Transformer-PINN dam safety monitoring and prediction model (i.e., the ZOA-FCN-Transformer-PINN model).
[0092] Step 6: Import the test set obtained in Step 1 into the ZOA-FCN-Transformer-PINN model constructed in Step 5, and make predictions on the test set through forward propagation of the model.
[0093] Step 2 specifically includes the following steps: Step 2.1: Input the training set divided in Step 1 into a Fully Convolutional Network (FCN) to generate a high-dimensional feature sequence. The update formula is as follows: .
[0094] In the formula: It is an activation function. It is the connection of the first The input feature map and the first The weight matrix of each output feature map. It is a feature map. It is the d-th output feature map generated after computation by the fully convolutional layer. It is the initial bias. It is the number of features. It is the number of the output feature map. It is the number of the input feature map.
[0095] Step 2.2: Input the high-dimensional feature sequence generated in Step 2.1 into the Transformer model, where dual positional encoding is performed. The encoder processes the input sequence, and the decoder generates the output sequence.
[0096] Step 2.3: For the encoder and decoder in Step 2.2, the high-dimensional feature sequence (temporal features extracted by FCN) is input into the position encoder, which outputs sequence features with positional information. The sequence features with positional information are input into the encoder, where they undergo multi-head self-attention mechanism and feedforward neural network computation, outputting global context-encoded features. The global context-encoded features are input into the cross-attention layer of the decoder (in conjunction with the target sequence), and after processing, decoded features are output. The decoded features are input into the linear layer, outputting the final effect size prediction result. Each layer of the encoder and decoder contains a multi-head self-attention mechanism and a feedforward neural network. The operation process of the multi-head self-attention mechanism is as follows: .
[0097] .
[0098] .
[0099] In the formula: It is a query matrix. It is a key matrix. It is a value matrix. This is the dimension of the key vector, used to scale clicks and prevent the gradient vanishing problem. It is a weight matrix for a multi-head attention mechanism. It's the number of heads that attract attention. It is the final output matrix of the multi-head attention mechanism. It's a concatenation operation, which connects the outputs of all individual attention heads along the feature dimension. This is the output of the first attention head. This is the output of the h-th attention head. This is the output of the u-th attention head. It is a scaled dot product attention calculation function. It is the linear mapping weight matrix of the u-th attention head's query. It is the linear mapping weight matrix of the key for the u-th attention head. It is a linear mapping weight matrix of the value of the u-th attention head. It is the index of the attention head, with a value range from 1 to h.
[0100] This application specifically addresses "small sample data conditions" (such as low-frequency monitoring and short sequences). For deep learning feature extraction, an FCN-Transformer architecture is employed. The local connectivity and weight-sharing characteristics of fully convolutional networks (FCNs) significantly reduce model parameters, and the multi-head self-attention mechanism of the Transformer model captures the global dependencies of long sequence sequences.
[0101] In low-frequency monitoring scenarios with small sample sizes, using overly complex feature extraction methods can easily lead to the "curse of dimensionality" and severe overfitting. This application's FCN-Transformer architecture utilizes FCN to limit the number of local parameters, mitigating the risk of overfitting, while ensuring long-range capture of hysteresis effects (such as slow thermal deformation caused by temperature changes). This application helps address the industry pain point of deep learning models easily falling into overfitting and exhibiting poor generalization ability under conditions of small sample monitoring data.
[0102] Step 3 specifically includes the following steps: Step 3.1: The Zebra Optimization Algorithm (ZOA) is a novel metaheuristic optimization algorithm inspired by the natural behavior of zebras. It simulates the migration process of zebra herds in nature and updates positions based on the interactions between individuals. Its population initialization formula is shown below: .
[0103] In the formula: It is the value (or state value) of the m-th zebra in the n-th dimension. It is about finding the optimal lower boundary. It is about finding the optimal upper boundary. It is the index number representing an individual zebra (or an individual zebra). It is the dimension (i.e., the index number of the specific hyperparameter). It is a random number in the range [0,1].
[0104] In this model, individual zebras within the zebra population represent a set of hyperparameters for the FCN-Transformer data-driven model. These zebra hyperparameters include: 1) Transformer network structure parameters: d_model: the dimension of the hidden layers for features (e.g., 8, 16, 32, 64). nhead: the number of heads for multi-head attention (e.g., 1, 2, 4, 8). num_layers: the number of layers in the Transformer encoder (e.g., 1, 2, 3). dim_feedforward: the dimension of the feedforward neural network (e.g., 32, 64, 128, 256). dropout: the random deactivation rate of neurons (0.0 to 0.5). 2) FCN network structure parameters: conv_hidden: the number of hidden channels in the convolutional layers (e.g., 32, 64, 96, 128). conv_blocks: the number of causal convolutional blocks (e.g., 1, 2, 3, 4). patch_size: the feature segmentation window / convolutional kernel stride (e.g., 1, 2, 3, 4, 6). 3) Model training and hyperparameter optimization: lr_main: Learning rate of the backbone network (1e-5 to 1e-2). lr_alpha: Specific scaling parameter in the PINN model (…). , The learning rate. `weight_decay`: Weight decay coefficient (L2 regularization term). `grad_clip`: Gradient clipping threshold (to prevent gradient explosion). `batch_size`: Batch size (e.g., 4, 8, 16, 32). 4) PINN loss function weights: `Ldata`: Weights for data-driven loss. `Lphysics`: Weights for physics-driven loss.
[0105] The FCN-Transformer data-driven model is configured for each individual zebra in the zebra population, and forward propagation computation is performed on the training set to obtain the predicted value of the FCN-Transformer data-driven model.
[0106] The fitness value is calculated based on the predicted values of the FCN-Transformer data-driven model and the actual values of the dam's effect size. The formula for calculating the fitness value is as follows: .
[0107] in, It is the first The fitness value of a single zebra. It is the fitness value. It is the total number of data samples. It is the first monitoring The true value of the dam's effect size in the first data sample (or the first... (The actual dam effect monitoring value of each data point). It is the true value of the dam's effect quantity monitored (or the true value of the dam's effect quantity monitored). These are the predictions from the FCN-Transformer model. It is the index number of the data sample. It is the FCN-Transformer data-driven model for the first The predicted value of a data sample.
[0108] Step 3.2: By simulating the foraging and defense strategies of zebras, the optimal individual search and update are achieved. The specific optimization method is as follows: .
[0109] .
[0110] .
[0111] In the formula: It is the first Only zebras are based on the new state of the first stage (i.e., the first stage) (The zebra is in a new state based on its foraging strategy phase). It is the first The state value of the dimension (i.e., the first dimension) (Only the zebra's new state in the nth dimension based on the foraging strategy stage). It is its objective function value (i.e., the first) (Based on the fitness value of zebras during the foraging strategy phase). It is the best individual pioneer zebra. It is its first The value of dimension (i.e., the value of the pioneer zebra in the th dimension) (values on the dimension) It is the value of the m-th zebra in the n-th dimension (i.e., the state value of the m-th zebra in the n-th dimension). It is a random number in the range [0,1]. It is an adjustment parameter / indicator that controls the degree of influence of the current position. It is the current overall state / position vector of the m-th zebra. It is the objective function value / fitness value corresponding to the current state of the m-th zebra. It is the identifier / label of the optimal individual. It is the index number of an individual zebra (i.e., the index number of an individual zebra). It is the dimension (i.e., the index number of the specific hyperparameter).
[0112] Step 3.3: After searching for the optimal individual in Step 3.2, the individual's position needs to be updated. The individual update formula is: .
[0113] In the formula: It is the first Only zebras are based on the new state of the second stage (i.e., the first stage). (A new state based on defensive strategies for zebras). It is the first The state value of the dimension (i.e., the first dimension) (Only the zebra in the nth dimension is in a new state based on its defense strategy). It is the number of iterations. It is the maximum number of iterations. It represents the switching probability between two strategies (i.e., the switching probability between escape and defense strategies), and its value is a random number between [0,1]. It is a constant of 0.01. It is an escape strategy when facing attacks from large predators. It is a defensive strategy against small predators. That's the location of the zebra that was attacked. It is the index number representing an individual zebra (i.e., the index number of an individual zebra). It is the dimension (i.e., the index number of the specific hyperparameter).
[0114] Step 3.4: Repeat the above steps until the algorithm has run a certain number of times. The update process terminates naturally when the maximum number of iterations is reached. Output the optimal parameters in the FCN-Transformer data-driven model to construct the ZOA-FCN-Transformer data-driven model.
[0115] Step 4 specifically includes the following steps: Step 4.1: Construct a classical statistical model of the dam, representing the dam effect as three components: water pressure component, temperature component, and time-dependent component. .
[0116] In the formula: It is the dam effect quantity. It is the water pressure component. It is a temperature component. It refers to the time-sensitive component.
[0117] Step 4.2: Based on the classical statistical model of the dam in Step 4.1, the following three models can be constructed: (1) HST model: .
[0118] (2) HTT model: .
[0119] (3) HT A T-model: .
[0120] In the formula: It is a constant term; , , , , , , It is the regression coefficient; It is the upstream water head; It is the upstream head of the water. The power is used to characterize the nonlinear effect of water pressure on the dam effect; It is the order index of the water pressure component polynomial; It is the order of the polynomial; 3 is taken for gravity dams and 4 is taken for arch dams. It is the cumulative number of days since the initial monitoring day from the current monitoring day; It is the item number index for the temperature component; It is the first The regression coefficients corresponding to each temperature factor; It is the first Data from one thermometer; It refers to the number of thermometers; It is the daily average temperature of the current monitoring day; The current monitoring day The average temperature of the day; It is HT A Number of temperature factors in the T-model; It is the cumulative number of days from the monitoring date to the initial monitoring date divided by 100 (or the cumulative number of days from the current monitoring date to the initial monitoring date divided by 100), that is... .
[0121] Step 4.3: Based on the actual operating conditions of the dam, select a suitable classical statistical model for the dam. The selection process comprehensively considers the thermodynamic evolution stage of the dam, the temporal characteristics of the monitoring data, and the sensitivity of the dam structure to short-term temperature anomalies. Specific selection rules are as follows: When the dam is in operation and the heat of hydration has been completely dissipated, and the dam temperature exhibits regular seasonal changes, the HST model is selected. In operating conditions where it is necessary to reveal the detailed characteristics of thermal deformation caused by interannual differences in ambient temperature and short-term dynamic fluctuations, the HTT model is selected. In operating conditions where the internal temperature of a large-volume concrete structure is affected by the external air temperature and there is a significant heat conduction hysteresis effect, the HT model is selected. A The T-model was used, and multiple linear regression analysis was employed to evaluate the parameters of the model. , , , , , , , The analysis is performed, the final parameters are selected, and the data from the training set in step 1 are substituted into the selected classical statistical model of the dam. After determining the final parameters, the parameters are substituted back into the selected classical statistical model of the dam to construct a physical driving model that quantitatively describes the physical evolution of environmental quantities and dam effects under the current working conditions, so as to provide physical prior knowledge and constraint mechanisms for the subsequent physical information neural network (PINN).
[0122] This application substitutes the training set data from step 1 into the selected classical statistical model of the dam. After determining the final parameters, the regression coefficients are substituted back into the original model equation to generate a deterministic quantitative expression between the dam effect and each environmental component, thereby constructing a physical driving model that quantitatively describes the physical change law of environmental quantities and dam effect under the current working conditions.
[0123] In traditional PINN models, physical constraints are typically provided by partial differential equations (PDEs). However, dam boundary conditions are complex, making direct solutions to PDEs difficult. Therefore, this application uses the output of a classical statistical model of dams (i.e., a physics-driven model) to replace traditional PDEs as physical mechanism constraints. The physical model provides a predictive benchmark that conforms to the dam's mechanical mechanisms. During training, the neural network, in addition to fitting real monitoring data (data loss), must also strive to make the output conform to the laws of this physical model (physical loss). This architecture, which embeds the physical model into the neural network's loss function for joint training, constitutes the PINN model.
[0124] Step 5 specifically includes the following steps: Step 5.1: For the ZOA-FCN-Transformer data-driven model established in Step 3.4, calculate the error between the model's predicted values and the actual monitored values on the training set through forward propagation, and construct the data loss function. ,Right now: .
[0125] In the formula: It is the total number of data samples. It is the first The true value of the dam's effect size for each data sample. The ZOA-FCN-Transformer data-driven model is for the first The predicted value of a data sample.
[0126] Step 5.2: For the classical statistical model of the dam established in Step 4.3, input the various environmental impact factors from the training set divided in Step 1 into the physical driving model to calculate the predicted values of the dam effect from the physical driving model. The predicted values were calculated using the ZOA-FCN-Transformer data-driven model. Predictions from the physics-driven model between MSE, construct the physical loss function ,Right now: .
[0127] In the formula: It is the total number of data samples. The ZOA-FCN-Transformer data-driven model is for the first Predicted values for each data sample It is a physics-driven model for the first The predicted value of a data sample.
[0128] Step 5.3: Multiply the data loss function and physical loss function from Steps 5.1 and 5.2 by the corresponding loss weights. , Then add them together to get the total loss. The total loss function is as follows: .
[0129] In the formula: , These are the weights of the data loss term and the physical loss term.
[0130] Step 5.4: Calculate the total loss function value obtained in Step 5.3 using the validation set data, and evaluate whether the network training meets the convergence condition: If the total loss function value on the validation set decreases and is less than the preset convergence threshold (e.g., 10), then... -4 ~10 -6 If the mean square error (on the order of magnitude) is less than or equal to the set maximum number of iterations, the model is considered to have converged, and the final trained ZOA-FCN-Transformer-PINN dam safety monitoring and prediction model is output; otherwise, network training iterations continue, or the process returns to step 3 for global parameter optimization using the Zebra Optimization Algorithm (ZOA).
[0131] Finite element simulation is highly dependent on physical parameters of dam materials, such as the elastic modulus and thermal diffusivity, and requires extremely precise boundary condition settings. In actual engineering projects (especially small and medium-sized water conservancy projects or old dams), these parameters are often difficult to accurately invert, leading to significant deviations in finite element simulations. This application uses a classical statistical model based on measured data to replace partial differential equations as the physical constraint mechanism, greatly lowering the threshold for physical modeling, avoiding errors caused by complex boundary conditions and unknown material parameters, and making the computation more lightweight and agile. It is particularly suitable for dam projects lacking detailed geological and material parameter data.
[0132] The PINN fusion architecture of this application directly uses physical laws as regularization penalties for neural network updates. This means that while the model autonomously learns hidden features from the data, it is always "guided and constrained" by the mechanical laws of the dam. In situations where small sample data is extremely scarce and conventional neural networks are prone to overfitting, the PINN fusion architecture of this application can strictly adhere to the physical baseline, exhibiting high overfitting prevention capabilities and robustness.
[0133] The beneficial effects of this application are: (1) The dam safety monitoring and prediction method under small sample conditions in this application uses the FCN-Transformer data-driven model for data-driven prediction and uses the ZOA optimization algorithm to optimize the various parameters of the model, which provides an important basis for the subsequent construction of the data physics-driven model.
[0134] (2) The dam safety monitoring and prediction method constructed under small sample conditions in this application constructs a classical statistical model of dams, which replaces the original partial differential equation with explicit equations, effectively overcoming the difficulties in constructing the original physical model and the poor prediction accuracy under small sample conditions.
[0135] (3) The dam safety monitoring and prediction method under small sample conditions of this application realizes the combination of data-driven model and physical-driven model through PINN model to predict the dam effect under small sample conditions, and uses various evaluation indicators of the model for analysis, which has broad application prospects.
[0136] The following specific embodiments illustrate the dam safety monitoring and prediction method under small sample conditions of this application.
[0137] The method for dam safety monitoring and prediction based on physical information neural networks under small sample conditions, as described in this application, is used to identify horizontal displacement anomalies in a hydropower station dam. The specific steps include: Step 1: Determine the model input factor set based on the actual engineering situation, and use the effect size and its influencing factor monitoring data (or influencing factor data) of the corresponding measuring points as the dataset for building the model. In this embodiment, the water-retaining structure of a hydropower station is a concrete double-curvature arch dam with a maximum dam height of 250m. The PL3-1 measuring point, which is close to the dam body and has typical small sample characteristics, is selected as the analysis object. Water level and temperature environmental factors (input factor set) of the dam from July 1, 2011 to July 1, 2021 are collected. , , , , , , , , , The dataset includes the corresponding horizontal displacement monitoring data of the dam (i.e., effect size), monitored monthly, with 121 small sample data sets acquired for each measuring point. This dataset is divided into training, validation, and test sets in a 7:1:2 ratio. The horizontal displacement curve of measuring point PL3-1 is shown below. Figure 3 As shown.
[0138] Step 2: Import the training set obtained in Step 1 into the FCN-Transformer data-driven model. In this embodiment, the training set of the divided PL3-1 measurement points (i.e., the time series containing environmental factors such as water level and temperature, and the corresponding measured values of horizontal displacement) is sequentially input into the FCN-Transformer data-driven model; firstly, the sliding time window of the fully convolutional network (FCN) is used to extract multi-scale local features, and then the generated high-dimensional feature sequence is input into the Transformer encoder, which captures the global dependencies in the long sequence of monitoring data through a multi-head self-attention mechanism.
[0139] Step 3: The ZOA optimization algorithm is used to optimize various parameters in the FCN-Transformer data-driven model, constructing the ZOA-FCN-Transformer data-driven model. In this embodiment, aiming to reduce the prediction error of the model on the validation set, the Zebra Optimization Algorithm (ZOA) is used to simulate the foraging and defense strategies of a zebra, performing global adaptive optimization on key hyperparameters such as learning rate, weight decay coefficient, Transformer hidden layer dimension, number of multi-head attention heads, number of network layers, and dropout rate in the FCN-Transformer data-driven model. After iterative optimization using the ZOA optimization algorithm, the optimal parameter combination (or optimal hyperparameter combination) of the model is obtained. The initial parameter combination (or initial hyperparameter combination) and optimal parameters (or optimal hyperparameters) used to construct the data-driven model at PL3-1 measurement point are shown in Table 1. The prediction curve and measured value of the horizontal displacement of the PL3-1 measurement point using the ZOA-FCN-Transformer data-driven model are shown in Table 1. Figure 4 As shown.
[0140] Table 1 Optimal Parameters for the ZOA-FCN-Transformer Data-Driven Model
[0141] Step 4: Select a suitable classical statistical model for the dam, import the training set from Step 1 into this model, and construct a physical driving model using multiple linear regression analysis. In this embodiment, considering the long monitoring data sequence of this project (up to 10 years), the HST model can better characterize the long-term thermal effect periodic fluctuations caused by seasonal changes in dam temperature; therefore, the HST model is selected as the physical driving model. The training set data is substituted into the HST model for multiple linear regression to obtain the regression coefficients. The regression curve and measured values of the horizontal displacement of the PL3-1 measuring point using the HST model are shown below. Figure 5 As shown. The expression for the HST model is: .
[0142] Table 2 Final Regression Coefficients of the Statistical Model for Horizontal Displacement at PL3-1 Measuring Point
[0143] Step 5: Using the PINN model, the data loss function of the ZOA-FCN-Transformer data-driven model in Step 3 and the physical loss function of the physical-driven model in Step 4 are combined to construct the total loss function and build the ZOA-FCN-Transformer-PINN model. To achieve the best balance between data-driven and physical constraints, the ZOA algorithm is also used to adaptively optimize the weights in the total loss function. The initial parameter combination and optimal parameters of the PL3-1 measurement point loss function are shown in Table 3.
[0144] Table 3 Optimal Parameters for the Loss Function
[0145] Step Six: Import the environmental factors (i.e., influencing factor data) from the test set obtained in Step One into the ZOA-FCN-Transformer-PINN model constructed in Step Five. Through forward propagation of the model, predict the test set and output the predicted horizontal displacement values of the dam at the corresponding measuring points, such as... Figure 6 As shown. Therefore, this model achieves adaptive global optimization of model hyperparameters and loss weights through the ZOA optimization algorithm. With the help of the FCN-Transformer architecture, it efficiently captures local features and long-range dependencies of monitoring data in small sample scenarios. At the same time, it innovatively adopts the classical statistical model of dams to replace complex partial differential equations as physical constraints, which greatly reduces the threshold of physical modeling and the difficulty of parameter acquisition. It can effectively overcome the risk of overfitting under small sample data conditions, accurately explore the complex nonlinear interaction law between dam effect quantities and their influencing factors, and reliably predict the evolution trend of dam operation performance. In this way, it provides solid technical support and decision-making basis for quantitative evaluation of dam health status, early warning and prevention of safety risks, and ultimately achieves the engineering management goal of safe and stable operation of dams throughout their entire life cycle.
[0146] Based on the same inventive concept, this application also provides a device for implementing the dam safety monitoring and prediction method under small sample conditions as described above. The solution provided by this device is similar to the implementation scheme described in the above method. Therefore, the specific limitations of one or more embodiments of the dam safety monitoring and prediction device under small sample conditions provided below can be found in the limitations of the dam safety monitoring and prediction method under small sample conditions described above, and will not be repeated here.
[0147] In one exemplary embodiment, a dam safety monitoring and prediction device under small sample conditions is provided, comprising: a data acquisition module, a data-driven model module, a physical-driven model module, a fusion module, and a prediction module.
[0148] The data acquisition module is used to collect dam monitoring data under small sample conditions and construct a dataset; the dam monitoring data includes influencing factor data and dam effect size; the dataset includes a training set, a test set and a validation set.
[0149] The data-driven model module is used to construct the FCN-Transformer data-driven model. The hyperparameters of the FCN-Transformer data-driven model are optimized using the ZOA optimization algorithm to obtain the ZOA-FCN-Transformer data-driven model. The FCN-Transformer data-driven model includes a fully convolutional network and a Transformer model.
[0150] The physics-driven model module is used to solve for the regression coefficients in the classic statistical model of dams using data from the training set, and to construct a physics-driven model.
[0151] The fusion module is used to fuse the ZOA-FCN-Transformer data-driven model and the physics-driven model based on the physical information neural network to obtain the ZOA-FCN-Transformer-PINN model.
[0152] The prediction module is used to input data from the test set into the ZOA-FCN-Transformer-PINN model to obtain the predicted effect size.
[0153] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 7 As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores dam safety monitoring and prediction data under small sample conditions. The I / O interfaces are used for information exchange between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a dam safety monitoring and prediction method under small sample conditions.
[0154] Those skilled in the art will understand that Figure 7The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0155] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0156] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0157] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0158] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0159] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0160] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0161] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0162] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for monitoring and predicting dam safety under small sample conditions, characterized in that, include: Dam monitoring data under small sample conditions were collected and a dataset was constructed; the dam monitoring data included influencing factor data and dam effect sizes; the dataset included a training set, a test set, and a validation set. An FCN-Transformer data-driven model is constructed, and the hyperparameters of the FCN-Transformer data-driven model are optimized using the ZOA optimization algorithm to obtain the ZOA-FCN-Transformer data-driven model; the FCN-Transformer data-driven model includes a fully convolutional network and a Transformer model; Using data from the training set, we solve for the regression coefficients in the classical statistical model of dams and construct a physical driving model. Based on the physical information neural network, the ZOA-FCN-Transformer data-driven model and the physical-driven model are fused to obtain the ZOA-FCN-Transformer-PINN model; The data from the test set were input into the ZOA-FCN-Transformer-PINN model to obtain the predicted effect size.
2. The method for monitoring and predicting dam safety under small sample conditions according to claim 1, characterized in that, The hyperparameters of the FCN-Transformer data-driven model are optimized using the ZOA optimization algorithm to obtain the ZOA-FCN-Transformer data-driven model, which specifically includes: Initialize a zebra population, wherein the individual zebras in the population are a set of hyperparameter combinations of the FCN-Transformer data-driven model; The FCN-Transformer data-driven model is configured for each zebra individual in the zebra population, and forward propagation calculation is performed on the training set to obtain the predicted value of the FCN-Transformer data-driven model. The fitness value is calculated based on the predicted values of the FCN-Transformer data-driven model and the actual values of the dam's effect size. The formula for calculating the fitness value is as follows: ; in, It is the first The fitness value of a single zebra. It is the total number of data samples. It is the first monitoring The true value of the dam's effect size for each data sample. It is the index number of the data sample. It is the FCN-Transformer data-driven model for the first Predicted values for each data sample; Select the zebra with the lowest fitness value as the current pioneer zebra; The location of individual zebras in a zebra population was updated by simulating their foraging and defense strategies, resulting in an updated population. Based on the updated population configuration of the FCN-Transformer data-driven model, repeat the above steps until the set maximum number of iterations is reached to obtain the final pioneer zebra and the corresponding ZOA-FCN-Transformer data-driven model.
3. The method for monitoring and predicting dam safety under small sample conditions according to claim 2, characterized in that, The update formula for the foraging strategy is: ; ; ; in, It is the first The zebra's new state in the nth dimension based on the foraging strategy stage. It was the pioneer zebra in the first Values in the dimension It is the state value of the m-th zebra in the n-th dimension. It is a random number. It is an adjustment parameter that controls the degree of influence of the current position. This represents the current overall state of the m-th zebra. It is the first The zebra is in a new state based on its foraging strategy phase. It is the first The zebra's fitness value is based solely on its foraging strategy phase. It is the fitness value corresponding to the current state of the m-th zebra. It is the index number of the individual zebra. It is a dimension.
4. The method for monitoring and predicting dam safety under small sample conditions according to claim 2, characterized in that, The update formula for the defense strategy is: ; in, It is the first The zebra's new state based on its defense strategy in the nth dimension. It is an escape strategy when facing attacks from large predators. It is a defensive strategy against small predators. It is the state value of the m-th zebra in the n-th dimension. It is a constant. It is a random number. It is the number of iterations. It is the maximum number of iterations. It is the probability of switching between escape and defense strategies. That's the location of the zebra that was attacked. It is an adjustment parameter that controls the degree of influence of the current position. It is the index number of the individual zebra. It is a dimension.
5. The method for monitoring and predicting dam safety under small sample conditions according to claim 1, characterized in that, The classical statistical models for dams include the HST model, the HTT model, and the HT model. A At least one of the T models; The expression for the HST model is: ; The expression for the HTT model is: ; The HT A The expression for the T-model is: ; in, It is a constant term. , , , , , , It is the regression coefficient. It is the upstream water head. It is the upstream head of the water. Power of 1 It is the order index of the water pressure component polynomial. It is the order of the polynomial. It is the cumulative number of days since the initial monitoring day from the current monitoring day. It is the item number index for the temperature component. It is the first The regression coefficients corresponding to each temperature factor It is the first Data from one thermometer, It refers to the number of thermometers. This is the daily average temperature for the current monitoring day. The current monitoring day The average temperature of the day It is HT A Number of temperature factors in the T-model It is the cumulative number of days since the initial monitoring day divided by 100.
6. The method for monitoring and predicting dam safety under small sample conditions according to claim 1, characterized in that, Based on the physical information neural network, the ZOA-FCN-Transformer data-driven model and the physical-driven model are fused to obtain the ZOA-FCN-Transformer-PINN model, which specifically includes: A data loss function is constructed, which is the mean squared error between the predicted values of the ZOA-FCN-Transformer data-driven model on the training set and the actual effect size of the dam; the calculation formula is: ; in, It is a data loss function. It is the total number of data samples. It is the first The true value of the dam's effect size for each data sample. The ZOA-FCN-Transformer data-driven model is for the first Predicted values for each data sample; A physical loss function is constructed, which is the mean squared error between the predicted values of the ZOA-FCN-Transformer data-driven model on the training set and the predicted values calculated by the physical driving model; the calculation formula is as follows: ; in, It is the physical loss function. It is the total number of data samples. The ZOA-FCN-Transformer data-driven model is for the first Predicted values for each data sample It is a physics-driven model for the first Predicted values for each data sample; The total loss function is obtained by weighted summing of the data loss function and the physical loss function; The total loss function is calculated using the validation set. When the total loss function reaches the preset convergence threshold or the preset maximum number of iterations, parameter updates are stopped, resulting in the ZOA-FCN-Transformer-PINN model.
7. A dam safety monitoring and prediction device under small sample conditions, characterized in that, include: The data acquisition module is used to collect dam monitoring data under small sample conditions and construct a dataset; the dam monitoring data includes influencing factor data and dam effect sizes; the dataset includes a training set, a test set, and a validation set. The data-driven model module is used to construct the FCN-Transformer data-driven model. The hyperparameters of the FCN-Transformer data-driven model are optimized using the ZOA optimization algorithm to obtain the ZOA-FCN-Transformer data-driven model. The FCN-Transformer data-driven model includes a fully convolutional network and a Transformer model. The physics-driven model module is used to solve the regression coefficients in the classical statistical model of dams using data in the training set, and to construct a physics-driven model. The fusion module is used to fuse the ZOA-FCN-Transformer data-driven model and the physics-driven model based on the physical information neural network to obtain the ZOA-FCN-Transformer-PINN model. The prediction module is used to input data from the test set into the ZOA-FCN-Transformer-PINN model to obtain the predicted effect size.
8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the dam safety monitoring and prediction method under small sample conditions as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the dam safety monitoring and prediction method under small sample conditions as described in any one of claims 1-6.
10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the dam safety monitoring and prediction method under small sample conditions as described in any one of claims 1-6.