





技术领域technical field
本发明涉及混凝土坝变形预测技术领域,具体涉及一种混凝土坝变形预测方法、计算机设备及存储介质。The invention relates to the technical field of concrete dam deformation prediction, in particular to a concrete dam deformation prediction method, computer equipment and storage media.
背景技术Background technique
在水库工程中,大坝是与防洪、发电等相关的重要建筑物。然而在大坝运行过程中,由于外部荷载及自身内部材料老化等不良作用的综合影响,使得大坝的局部和整体的性能随着使用时间的增加而降低。大坝健康监测系统是大坝安全评估和早期预警的有效途径。大坝变形监测是大坝健康监测系统的重要组成,并且是反映混凝土坝综合状态的有效指标,准确的预测大坝变形对于大坝健康监测具有重要意义。In reservoir engineering, a dam is an important building related to flood control and power generation. However, during the operation of the dam, due to the combined influence of external loads and the aging of internal materials, the local and overall performance of the dam decreases with the increase of service time. Dam health monitoring system is an effective way for dam safety assessment and early warning. Dam deformation monitoring is an important component of the dam health monitoring system, and it is an effective indicator to reflect the comprehensive state of the concrete dam. Accurate prediction of dam deformation is of great significance for dam health monitoring.
目前广泛采用的大坝变形预测模型可分为物理驱动模型和数据驱动模型。物理驱动模型通常采用有限元方法计算各荷载作用下大坝变形场。虽然这种方法能够解释大坝的变形机理,但是物理驱动模型需要详细的大坝结构数据和高昂的计算代价,这限制了物理驱动模型在实际工程中的大规模应用。此外,目前长期的大坝健康监测系统为实现数据驱动的大坝变形预测模型提供了海量的数据支持。基于多元线性回归的统计模型,由于其公式简单、可解释性好,是工程中常用的数据驱动模型。但是线性回归模型由于其固有的线性假设而不适用拟合非线性关系,这极大地限制了线性模型在大坝变形预测上的结果精度。近年来随着人工智能的发展,机器学习模型在大坝健康监测领域引起了广泛关注:如人工神经网络、支持向量机、极限学习机等。这些方法大多能够实现大坝某一位置变形的准确预测。然而目前应用于大坝变形预测的机器学习方法大多属于静态建模方法,很难实现从长期监测的历史数据中动态学习混凝土坝的变形特征。除此之外,机器学习方法由于其“黑箱”的特性,缺乏对实际问题的物理解释,这限制了机器学习方法在实际工程中的应用。Currently widely used dam deformation prediction models can be divided into physics-driven models and data-driven models. The physical driving model usually uses the finite element method to calculate the deformation field of the dam under various loads. Although this method can explain the deformation mechanism of the dam, the physical driving model requires detailed dam structure data and high computational cost, which limits the large-scale application of the physical driving model in practical engineering. In addition, the current long-term dam health monitoring system provides massive data support for the realization of the data-driven dam deformation prediction model. The statistical model based on multiple linear regression is a commonly used data-driven model in engineering because of its simple formula and good interpretability. However, the linear regression model is not suitable for fitting nonlinear relationships due to its inherent linear assumptions, which greatly limits the accuracy of linear models in dam deformation prediction. In recent years, with the development of artificial intelligence, machine learning models have attracted widespread attention in the field of dam health monitoring: such as artificial neural networks, support vector machines, extreme learning machines, etc. Most of these methods can realize accurate prediction of deformation at a certain position of the dam. However, most of the machine learning methods currently applied to dam deformation prediction are static modeling methods, and it is difficult to dynamically learn the deformation characteristics of concrete dams from long-term monitoring historical data. In addition, due to its "black box" characteristics, machine learning methods lack physical explanations for practical problems, which limits the application of machine learning methods in practical engineering.
为了提高大坝变形预测模型的动态学习能力和精确性,急需一种合适的混凝土坝变形预测方法。In order to improve the dynamic learning ability and accuracy of the dam deformation prediction model, a suitable concrete dam deformation prediction method is urgently needed.
发明内容Contents of the invention
针对现有技术存在的不足,本发明提出一种混凝土坝变形预测方法、计算机设备及存储介质,以解决现有技术中存在的大坝变形预测模型的缺乏动态学习能力和精确性低的技术问题。Aiming at the deficiencies in the prior art, the present invention proposes a concrete dam deformation prediction method, computer equipment and storage media to solve the technical problems of lack of dynamic learning ability and low accuracy of the dam deformation prediction model existing in the prior art .
一种混凝土坝变形预测方法,包括:基于时间序列采集混凝土坝的历史变形数据及所述历史变形数据对应的外部环境因素数据,构造描述外部环境变化规律的特征数据;根据时间序列分割所述历史变形数据和所述特征数据,得到样本数据集,并将所述样本数据集划分为训练集、验证集和测试集;在长短期记忆神经网络中引入注意力机制,所述注意力机制包括因子注意力机制和时间注意力机制,得到基于注意力机制的初始网络模型;将所述训练集作为输入,训练所述初始网络模型的参数,并采用验证集进行验证,得到混凝土坝变形预测模型;采用所述混凝土坝变形预测模型对混凝土坝进行变形预测。A method for predicting deformation of a concrete dam, comprising: collecting historical deformation data of a concrete dam based on a time series and external environmental factor data corresponding to the historical deformation data, constructing characteristic data describing changes in the external environment; segmenting the historical data according to the time series Deformation data and described feature data, obtain sample data set, and described sample data set is divided into training set, verification set and test set; Introduce attention mechanism in long short-term memory neural network, described attention mechanism comprises factor attention mechanism and time attention mechanism, obtain the initial network model based on attention mechanism; use described training set as input, train the parameter of described initial network model, and adopt verification set to verify, obtain concrete dam deformation prediction model; The concrete dam deformation prediction model is used to predict the deformation of the concrete dam.
在其中一个实施例中,所述历史变形数据和所述外部环境因素数据采集时,采用相同的采样时间和采样间距。In one of the embodiments, when the historical deformation data and the external environmental factor data are collected, the same sampling time and sampling interval are adopted.
在其中一个实施例中,在得到样本数据集步骤之后,并将所述样本数据集划分为训练集、验证集和测试集步骤之前,还包括:对所述样本数据集进行标准化处理,公式如下,In one of the embodiments, after the step of obtaining the sample data set, and before the step of dividing the sample data set into a training set, a verification set and a test set, it also includes: standardizing the sample data set, the formula is as follows ,
其中,x是原始数据,u和σ分别是所述特征数据的均值和方差。Wherein, x is the original data, u and σ are the mean and variance of the feature data, respectively.
在其中一个实施例中,所述因子注意力机制中的因子注意力计算公式如下,In one of the embodiments, the factor attention calculation formula in the factor attention mechanism is as follows,
其中对于某一输入时刻t,输入数据xt具有m个因子,αt为该输入时刻的因子权重,FA为因子权重生成模块,x't为因子权重加权之后的输入数据。For a certain input time t, the input data xt has m factors, αt is the factor weight at this input time, FA is the factor weight generation module, and x't is the input data after factor weight weighting.
在其中一个实施例中,所述时间注意力机制中的时间注意力计算公式如下,In one of the embodiments, the temporal attention calculation formula in the temporal attention mechanism is as follows,
H=[h1,h2,…,hk]k×sH=[h1 ,h2 ,…,hk ]k×s
β=TA(H)=[β1,β2,…,βk]1×kβ=TA(H)=[β1 ,β2 ,…,βk ]1×k
其中H为长短期记忆神经网络隐藏层的状态输出,β为时间权重参数,TA为时间权重生成模块,k为隐藏层时间步长,s为每个时间步长的维度,hat为时间权重加权之后的隐藏层输出。Where H is the state output of the hidden layer of the long-short-term memory neural network, β is the time weight parameter, TA is the time weight generation module, k is the time step of the hidden layer, s is the dimension of each time step, and hat is the time weight Weighted hidden layer output.
在其中一个实施例中,将所述训练集作为输入,训练所述初始网络模型的参数步骤,还包括:引入损失函数修正所述初始网络模型,所述损失函数计算公式如下,In one of the embodiments, the step of using the training set as input and training the parameters of the initial network model further includes: introducing a loss function to correct the initial network model, and the calculation formula of the loss function is as follows,
其中Si和分别是监测值和模型预测值;n为预测值的个数。where Si and are the monitoring value and model prediction value respectively; n is the number of prediction values.
在其中一个实施例中,得到混凝土坝变形预测模型步骤之后,还包括:采用JAYA算法优化所述混凝土坝变形预测模型中的超参数,所述JAYA算法公式如下,In one of the embodiments, after obtaining the concrete dam deformation prediction model step, it also includes: using the JAYA algorithm to optimize the hyperparameters in the concrete dam deformation prediction model, and the JAYA algorithm formula is as follows,
uj+1,k=uj,k+r1,j(uj,best-|uj,k|)-r2,j(uj,worst-|uj,k|)uj+1,k =uj,k +r1,j (uj,best -|uj,k |)-r2,j (uj,worst -|uj,k |)
其中uj,best是第j次迭代过程中评价效果最好的超参数组合,uj,worst第j次迭代过程中评价效果最差的超参数组合,uj+1,k是uj,k的更新值,r1,j和r2,j是两个0到1之间的随机数。Among them, uj,best is the hyperparameter combination with the best evaluation effect in the j-th iteration process, uj,worst is the worst-evaluated hyper-parameter combination in the j-th iteration process, uj+1,k is uj, The update value ofk ,r1,j and r2,j are two random numbers between 0 and 1.
一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现上述各个实施例中所述的一种混凝土坝变形预测方法的步骤。A computer device, comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, when the processor executes the program, the deformation prediction of a concrete dam described in each of the above embodiments is realized method steps.
一种存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述各个实施例中所述的一种混凝土坝变形预测方法的步骤。A storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of a method for predicting deformation of a concrete dam described in the above-mentioned embodiments are implemented.
由上述技术方案可知,本发明的有益技术效果如下:As can be seen from the above technical solutions, the beneficial technical effects of the present invention are as follows:
1.本方案通过采用由历史变形数据和外部环境数据构成的训练集来训练长短期记忆神经网络学,相较于传统的静态机器学习方法,本方案能够从训练集中捕捉大坝变形的时序特征,具有动态学习的能力。1. This program uses a training set consisting of historical deformation data and external environment data to train long-term and short-term memory neural networks. Compared with traditional static machine learning methods, this program can capture the temporal characteristics of dam deformation from the training set , with the ability of dynamic learning.
2.本方案采用了基于因子注意力和时间记忆力注意力的双注意力机制方法,在大坝变形预测模型训练的过程中可以自适应地确定不同因子和时间的权重,其中因子注意力机制可以选择影响大坝变形较大的因素并分配不同的权重,而时间注意力机制可以在所有的时间步长上分配不同的权重以确定不同隐藏状态的影响程度,从而有助于提高模型的预测精度并可以初步解释混凝土坝变形机理,增强深度学习模型的物理可解释性。2. This scheme adopts a double attention mechanism method based on factor attention and time memory attention. During the training process of the dam deformation prediction model, the weights of different factors and time can be determined adaptively. The factor attention mechanism can be Select the factors that affect the large deformation of the dam and assign different weights, and the time attention mechanism can assign different weights on all time steps to determine the degree of influence of different hidden states, which helps to improve the prediction accuracy of the model And it can preliminarily explain the deformation mechanism of concrete dams, and enhance the physical interpretability of deep learning models.
3.本方案采用的JAYA算法具有全局搜索能力,算法没有额外需要设置的参数,可以寻找混凝土坝变形预测模型的最优结构参数和训练参数,有助于提高模型预测的精度和鲁棒性。3. The JAYA algorithm adopted in this scheme has the ability of global search. The algorithm has no additional parameters to be set. It can find the optimal structural parameters and training parameters of the concrete dam deformation prediction model, which helps to improve the accuracy and robustness of the model prediction.
4.本方案通过对样本数据集进行标准化处理,以及引入损失函数修正初始网络模型,分别从样本和模型两个方面进行数据矫正,以保证混凝土坝变形预测模型的准确性,从而提高变形预测的精度。4. This program standardizes the sample data set and introduces a loss function to correct the initial network model, and performs data correction from two aspects of the sample and the model to ensure the accuracy of the concrete dam deformation prediction model, thereby improving the accuracy of deformation prediction. precision.
附图说明Description of drawings
为了更清楚地说明本发明具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单介绍。在所有附图中,类似的元件或部分一般由类似的附图标记标识。附图中,各元件或部分并不一定按照实际的比例绘制。In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the accompanying drawings that need to be used in the description of the specific embodiments or the prior art. Throughout the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, elements or parts are not necessarily drawn in actual scale.
图1为一个实施例中一种混凝土坝变形预测方法的流程示意图;Fig. 1 is a schematic flow sheet of a concrete dam deformation prediction method in an embodiment;
图2为一个实施例中一种混凝土坝变形预测方法的另一流程示意图;Fig. 2 is another schematic flow chart of a kind of concrete dam deformation prediction method in an embodiment;
图3为因子注意力机制示意图;Figure 3 is a schematic diagram of the factor attention mechanism;
图4为时间注意力机制示意图;Figure 4 is a schematic diagram of the temporal attention mechanism;
图5为基于注意力机制的长短期记忆神经网络模型图;Fig. 5 is the long short-term memory neural network model figure based on attention mechanism;
图6为一个实施例中计算机设备的内部结构图。Figure 6 is an internal block diagram of a computer device in one embodiment.
具体实施方式Detailed ways
下面将结合附图对本发明技术方案的实施例进行详细的描述。以下实施例仅用于更加清楚地说明本发明的技术方案,因此只作为示例,而不能以此来限制本发明的保护范围。Embodiments of the technical solutions of the present invention will be described in detail below in conjunction with the accompanying drawings. The following examples are only used to illustrate the technical solutions of the present invention more clearly, and therefore are only examples, rather than limiting the protection scope of the present invention.
需要注意的是,除非另有说明,本申请使用的技术术语或者科学术语应当为本发明所属领域技术人员所理解的通常意义。It should be noted that, unless otherwise specified, the technical terms or scientific terms used in this application shall have the usual meanings understood by those skilled in the art to which the present invention belongs.
在一个实施例中,如图1所示,提供了一种混凝土坝变形预测方法,包括以下步骤:In one embodiment, as shown in Figure 1, a method for predicting deformation of a concrete dam is provided, comprising the following steps:
S1基于时间序列采集混凝土坝的历史变形数据及历史变形数据对应的外部环境因素数据,构造描述外部环境变化规律的特征数据。S1 collects the historical deformation data of the concrete dam and the external environmental factor data corresponding to the historical deformation data based on the time series, and constructs the characteristic data describing the change law of the external environment.
具体地,如图2所示,采集混凝土坝的变形历史数据,形成混凝土坝变形时间序列,采集影响混凝土坝变形的外部环境因素的时间序列数据,包括:环境温度、水库水位,并构造描述环境变化规律的特征数据。Specifically, as shown in Figure 2, the deformation history data of the concrete dam is collected to form a time series of concrete dam deformation, and the time series data of external environmental factors that affect the deformation of the concrete dam are collected, including: ambient temperature, reservoir water level, and structural description of the environment The characteristic data of the changing law.
在其中一个实施例中,步骤S1中历史变形数据和外部环境因素数据采集时,采用相同的采样时间和采样间距。In one of the embodiments, the same sampling time and sampling interval are used when the historical deformation data and the external environmental factor data are collected in step S1.
具体地,获取相同时间段内且采样间隔相同的大坝变形及与大坝变形相关的温度,水位数据。其中由水位H构造三个水位影响因素H,H2,H3,由温度t构造四个温度效应因素sin(ωt),cos(ωt),sin(2ωt),cos(2ωt),由时间θ构造两个时间效应因素θ,lnθ共9个特征。Specifically, the dam deformation and the temperature and water level data related to the dam deformation are obtained in the same time period and at the same sampling interval. Among them, three water level influencing factors H, H2 , H3 are constructed from water level H, four temperature effect factors sin(ωt), cos(ωt), sin(2ωt), cos(2ωt) are constructed from temperature t, and time θ Construct two time effect factors θ, lnθ, a total of 9 features.
S2根据时间序列分割历史变形数据和特征数据,得到样本数据集,并将样本数据集划分为训练集、验证集和测试集。S2 divides the historical deformation data and feature data according to the time series to obtain the sample data set, and divides the sample data set into training set, verification set and test set.
具体地,根据步骤S1中获得的混凝土坝的变形历史数据和描述环境变化规律的特征数据,按时间分割数据生成混凝土坝变形预测的样本数据集,对数据集进行标准化,并划分数据集为训练集和验证集,测试集用于最后对模型的实验测试。Specifically, according to the deformation history data of the concrete dam obtained in step S1 and the feature data describing the law of environmental changes, the data is divided by time to generate a sample data set for prediction of concrete dam deformation, the data set is standardized, and the data set is divided into training set and validation set, and the test set is used for the final experimental test of the model.
在其中一个实施例中,步骤S2中,在得到样本数据集步骤之后,并将所述样本数据集划分为训练集、验证集和测试集步骤之前,还包括:对所述数据集进行标准化处理,公式如下,In one of the embodiments, in step S2, after the step of obtaining the sample data set, and before the step of dividing the sample data set into a training set, a verification set and a test set, it also includes: standardizing the data set , the formula is as follows,
其中,x是原始数据,u和σ分别是所述特征数据的均值和方差。Wherein, x is the original data, u and σ are the mean and variance of the feature data, respectively.
具体地,首先将前n个历史时刻的9个特征数据(Xt=[x1,x2,…,xn-1,xn]∈n*9,其中作为特征数据,预测数据为下一时刻的混凝土坝变形Yt+1∈1*1形成混凝土坝变形预测样本数据集。样本数据集归一化,将样本数据集划分为训练集、验证集和测试集。Specifically, firstly, the 9 feature data (Xt=[x1 ,x2 ,…,xn-1 ,xn ]∈n*9 of the first n historical moments, where As characteristic data, the predicted data is the concrete dam deformation Yt+1 ∈1*1 at the next moment to form a concrete dam deformation prediction sample data set. The sample data set is normalized, and the sample data set is divided into training set, validation set and test set.
S3在长短期记忆神经网络中引入注意力机制,注意力机制包括因子注意力机制和时间注意力机制,得到基于注意力机制的初始网络模型。S3 introduces the attention mechanism in the long-short-term memory neural network. The attention mechanism includes the factor attention mechanism and the time attention mechanism, and the initial network model based on the attention mechanism is obtained.
具体地,基于注意力机制的初始网络模型如图5所示,基于图3和图4结合长短期记忆人工神经网络(Longshort-termmemory,LSTM)模型构成,首先需要构造基于注意力机制的长短期记忆神经网络模块:该模块包括因子注意力单元,时间注意力单元和LSTM神经网络。而且采用了基于因子注意力和时间记忆力注意力的双注意力机制方法,在大坝位移预测模型训练的过程中可以自适应地确定不同因子和时间的权重,有助于提高模型的预测精度并可以初步解释混凝土坝变形机理,增强深度学习模型的物理可解释性。其中因子注意力机制可以选择影响大坝变形较大的因素并分配不同的权重,而时间注意力机制可以在所有的时间步长上分配不同的权重以确定不同隐藏状态的影响程度。Specifically, the initial network model based on the attention mechanism is shown in Figure 5. Based on Figure 3 and Figure 4 combined with the long-short-term memory artificial neural network (Longshort-termmemory, LSTM) model, it is first necessary to construct a long-short-term memory network model based on the attention mechanism. Memory neural network module: This module includes factor attention unit, temporal attention unit and LSTM neural network. Moreover, the double attention mechanism method based on factor attention and time memory attention is adopted, and the weights of different factors and time can be adaptively determined during the training process of the dam displacement prediction model, which helps to improve the prediction accuracy of the model and It can preliminarily explain the deformation mechanism of concrete dams and enhance the physical interpretability of deep learning models. Among them, the factor attention mechanism can select the factors that affect the large deformation of the dam and assign different weights, while the time attention mechanism can assign different weights on all time steps to determine the degree of influence of different hidden states.
在其中一个实施例中,如图3所示,因子注意力机制中的因子注意力计算公式如下,In one of the embodiments, as shown in Figure 3, the factor attention calculation formula in the factor attention mechanism is as follows,
其中对于某一输入时刻t,输入数据xt具有m个因子,αt为该输入时刻的因子权重,FA为因子权重生成模块,x't为因子权重加权之后的输入数据。For a certain input time t, the input data xt has m factors, αt is the factor weight at this input time, FA is the factor weight generation module, and x't is the input data after factor weight weighting.
具体地,FA为因子权重生成模块,包含一个全连接层和两个激活函数(分别为sigmoid函数和softmax函数),其中,sigmoid函数,在信息科学中,由于其单增以及反函数单增等性质,常被用作神经网络的激活函数。Softmax函数,归一化指数函数是逻辑函数的一种推广。Specifically, FA is a factor weight generation module, which includes a fully connected layer and two activation functions (sigmoid function and softmax function respectively). Among them, the sigmoid function, in information science, due to its single increase and inverse function single increase It is often used as the activation function of neural networks. The Softmax function, the normalized exponential function is a generalization of the logistic function.
在其中一个实施例中,如图4所示,时间注意力机制中的时间注意力计算公式如下,In one of the embodiments, as shown in Figure 4, the time attention calculation formula in the time attention mechanism is as follows,
H=[h1,h2,…,hk]k×sH=[h1 ,h2 ,…,hk ]k×s
β=TA(H)=[β1,β2,…,βk]1×kβ=TA(H)=[β1 ,β2 ,…,βk ]1×k
其中H为长短期记忆神经网络隐藏层的状态输出,β为时间权重参数,TA为时间权重生成模块,k为隐藏层时间步长,s为每个时间步长的维度,hat为时间权重加权之后的隐藏层输出。Where H is the state output of the hidden layer of the long-short-term memory neural network, β is the time weight parameter, TA is the time weight generation module, k is the time step of the hidden layer, s is the dimension of each time step, and hat is the time weight Weighted hidden layer output.
具体地,TA为时间权重生成模块,包含一个全连接层和两个激活函数(分别为ReLu函数和Softmax函数),ReLu函数线,性整流函数,又称修正线性单元,是一种人工神经网络中常用的激活函数。Softmax函数,归一化指数函数是逻辑函数的一种推广。Specifically, TA is a time weight generation module, which includes a fully connected layer and two activation functions (ReLu function and Softmax function respectively), ReLu function line, linear rectification function, also known as modified linear unit, is an artificial neural network A commonly used activation function in . The Softmax function, the normalized exponential function is a generalization of the logistic function.
S4将训练集作为输入,训练初始网络模型的参数,并采用验证集进行验证,得到混凝土坝变形预测模型。S4 takes the training set as input, trains the parameters of the initial network model, and uses the verification set for verification to obtain the concrete dam deformation prediction model.
具体地,基于训练集数据对混凝土坝位移预测模型的参数进行训练,使用验证集数据评价位移预测模型的效果。基于训练集数据的混凝土坝位移预测模型的参数具体过程如下:Specifically, the parameters of the concrete dam displacement prediction model are trained based on the training set data, and the effect of the displacement prediction model is evaluated using the verification set data. The specific process of the parameters of the concrete dam displacement prediction model based on the training set data is as follows:
将步骤S2中得到的训练集输入到因子注意力模块生成注意力权重加权之后的特征数据,并将加权之后的数据输入长短期神经网络模型并输出所有时间步长的隐藏层,将长短期记忆神经网络中隐藏层的输出作为时间注意力模块的输入,输出时间注意力权重加权之后的隐藏层,并连接到全连接网络层,最终预测混凝土坝的变形。其中因子注意力模块与时间注意力模块的训练不需要额外的过程可以在模型权重参数训练过程中共同完成。Input the training set obtained in step S2 into the factor attention module to generate the feature data weighted by the attention weight, and input the weighted data into the long-term and short-term neural network model and output the hidden layer of all time steps, and the long-term short-term memory The output of the hidden layer in the neural network is used as the input of the temporal attention module, and the hidden layer weighted by the temporal attention weight is output, and connected to the fully connected network layer to finally predict the deformation of the concrete dam. Among them, the training of factor attention module and time attention module does not require additional process and can be completed in the process of model weight parameter training.
在其中一个实施例中,步骤S4中将训练集作为输入,训练初始网络模型的参数步骤,还包括:引入损失函数修正所述初始网络模型,损失函数计算公式如下,In one of the embodiments, the training set is used as input in step S4, and the parameter step of training the initial network model further includes: introducing a loss function to correct the initial network model, and the calculation formula of the loss function is as follows,
其中Si和分别是监测值和模型预测值;n为预测值的个数。where Si and are the monitoring value and model prediction value respectively; n is the number of prediction values.
具体地,引入损失函数修正初始网络模型,从模型方面进行数据矫正,以保证混凝土坝变形预测模型的准确性,从而提高变形预测的精度。Specifically, a loss function is introduced to modify the initial network model, and the data is corrected from the model aspect to ensure the accuracy of the concrete dam deformation prediction model, thereby improving the accuracy of deformation prediction.
在其中一个实施例中,步骤S4中得到混凝土坝变形预测模型步骤之后,还包括:采用JAYA算法优化所述混凝土坝变形预测模型中的超参数,所述JAYA算法公式如下,In one of the embodiments, after obtaining the concrete dam deformation prediction model step in step S4, it also includes: using the JAYA algorithm to optimize the hyperparameters in the concrete dam deformation prediction model, and the JAYA algorithm formula is as follows,
uj+1,k=uj,k+r1,j(uj,best-|uj,k|)-r2,j(uj,worst-|uj,k|)uj+1,k =uj,k +r1,j (uj,best -|uj,k |)-r2,j (uj,worst -|uj,k |)
其中uj,best是第j次迭代过程中评价效果最好的超参数组合,uj,worst第j次迭代过程中评价效果最差的超参数组合,uj+1,k是uj,k的更新值,r1,j和r2,j是两个0到1之间的随机数。Among them, uj,best is the hyperparameter combination with the best evaluation effect in the j-th iteration process, uj,worst is the worst-evaluated hyper-parameter combination in the j-th iteration process, uj+1,k is uj, The update value ofk ,r1,j and r2,j are two random numbers between 0 and 1.
具体地,初始化JAYA算法包括初始化超参数,并定义时间步长,隐藏层神经元个数,初始学习率等超参数的搜索范围。根据超参数的设置情况构造混凝土坝的位移预测模型,并使用训练集训练模型,使用验证集评价模型的预测精度。根据模型在验证集上的表现,利用JAYA算法的寻优策略调整模型的超参数,直到满足迭代停止要求。最终返回在验证集上表现最好的模型作为最终的大坝位移预测模型。本发明采用的JAYA算法具有全局搜索能力,算法没有额外需要设置的参数,可以寻找混凝土坝变形预测模型的最优结构参数和训练参数,有助于提高模型预测的精度和鲁棒性。Specifically, initializing the JAYA algorithm includes initializing hyperparameters, and defining the search range of hyperparameters such as the time step, the number of neurons in the hidden layer, and the initial learning rate. According to the setting of hyperparameters, the displacement prediction model of concrete dam is constructed, and the training set is used to train the model, and the verification set is used to evaluate the prediction accuracy of the model. According to the performance of the model on the verification set, the optimization strategy of the JAYA algorithm is used to adjust the hyperparameters of the model until the iteration stop requirement is met. Finally, the best performing model on the validation set is returned as the final dam displacement prediction model. The JAYA algorithm adopted in the present invention has the ability of global search, the algorithm has no additional parameters to be set, can find the optimal structural parameters and training parameters of the concrete dam deformation prediction model, and helps to improve the accuracy and robustness of the model prediction.
S5采用混凝土坝变形预测模型对混凝土坝进行变形预测。S5 uses the concrete dam deformation prediction model to predict the deformation of the concrete dam.
具体地,最终通过得到的混凝土坝变形预测模型对混凝土坝进行变形预测,得到混凝土坝的变形预测结果。Specifically, finally, the deformation prediction of the concrete dam is performed through the obtained concrete dam deformation prediction model, and the deformation prediction result of the concrete dam is obtained.
上述实施例中,通过采用由历史变形数据和外部环境数据构成的训练集来训练长短期记忆神经网络学,相较于传统的静态机器学习方法,本方案能够从训练集中捕捉大坝变形的时序特征,具有动态学习的能力。同时采用了基于因子注意力和时间记忆力注意力的双注意力机制方法,在大坝变形预测模型训练的过程中可以自适应地确定不同因子和时间的权重,从而有助于提高模型的预测精度并可以初步解释混凝土坝变形机理,增强深度学习模型的物理可解释性。In the above-mentioned embodiment, the long-short-term memory neural network is trained by using the training set composed of historical deformation data and external environment data. Compared with the traditional static machine learning method, this scheme can capture the time series of dam deformation from the training set Features, with the ability of dynamic learning. At the same time, the double attention mechanism method based on factor attention and time memory attention is adopted, and the weight of different factors and time can be adaptively determined during the training process of the dam deformation prediction model, which helps to improve the prediction accuracy of the model And it can preliminarily explain the deformation mechanism of concrete dams, and enhance the physical interpretability of deep learning models.
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图6所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储配置模板,还可用于存储目标网页数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种混凝土坝变形预测方法。In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure may be as shown in FIG. 6 . The computer device includes a processor, memory, network interface and database connected by a system bus. Wherein, the processor of the computer device is used to provide calculation and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs and databases. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The computer device's database is used to store configuration templates and may also be used to store landing page data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by a processor, a method for predicting deformation of a concrete dam is realized.
本领域技术人员可以理解,图6中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 6 is only a block diagram of a part of the structure related to the solution of this application, and does not constitute a limitation on the computer equipment to which the solution of this application is applied. The specific computer equipment can be More or fewer components than shown in the figures may be included, or some components may be combined, or have a different arrangement of components.
在一个实施例中,还提供一种存储介质,所述存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被计算机执行时使所述计算机执行如前述实施例所述的方法,所述计算机可以为上述提到的一种混凝土坝变形预测方法的一部分。In one embodiment, a storage medium is further provided, the storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the computer program as described in the foregoing embodiments. The method, the computer can be a part of the above-mentioned concrete dam deformation prediction method.
显然,本领域的技术人员应该明白,上述本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在计算机存储介质(ROM/RAM、磁碟、光盘)中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。所以,本发明不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that each module or each step of the present invention can be realized by a general-purpose computing device, and they can be concentrated on a single computing device, or distributed on a network formed by multiple computing devices , alternatively, they can be implemented with program codes executable by computing devices, thus, they can be stored in computer storage media (ROM/RAM, magnetic disks, optical disks) to be executed by computing devices, and in some cases In this case, the steps shown or described can be performed in a different order than here, or they can be fabricated into individual integrated circuit modules, or multiple modules or steps can be implemented in a single integrated circuit module. Therefore, the present invention is not limited to any specific combination of hardware and software.
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围,其均应涵盖在本发明的权利要求和说明书的范围当中。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it still The technical solutions described in the foregoing embodiments may be modified, or some or all of the technical features may be equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention. , which should be included within the scope of the claims and description of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211591906.6ACN115907200A (en) | 2022-12-09 | 2022-12-09 | Concrete dam deformation prediction method, computer equipment and storage medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211591906.6ACN115907200A (en) | 2022-12-09 | 2022-12-09 | Concrete dam deformation prediction method, computer equipment and storage medium |
| Publication Number | Publication Date |
|---|---|
| CN115907200Atrue CN115907200A (en) | 2023-04-04 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211591906.6APendingCN115907200A (en) | 2022-12-09 | 2022-12-09 | Concrete dam deformation prediction method, computer equipment and storage medium |
| Country | Link |
|---|---|
| CN (1) | CN115907200A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116378120A (en)* | 2023-04-20 | 2023-07-04 | 中交三航局第三工程有限公司 | Deformation monitoring method based on self-attention mechanism |
| CN116738601A (en)* | 2023-05-26 | 2023-09-12 | 中国长江电力股份有限公司 | Dynamic prediction method for deformation of concrete gravity dam |
| CN118469045A (en)* | 2024-07-09 | 2024-08-09 | 石家庄铁道大学 | Permafrost upper limit prediction method, device, equipment and storage medium |
| CN118606657A (en)* | 2024-08-07 | 2024-09-06 | 长江水利委员会长江科学院 | A method, system, device and storage medium for predicting dam deformation |
| CN118862672A (en)* | 2024-07-19 | 2024-10-29 | 华东交通大学 | A method and device for predicting long-term deformation of concrete bridges |
| CN119783496A (en)* | 2024-11-13 | 2025-04-08 | 同济大学 | Concrete temperature monitoring optimization method, device and medium based on optical fiber sensor and machine learning |
| CN120372942A (en)* | 2025-04-11 | 2025-07-25 | 安徽水科数智信息技术有限公司 | Method, equipment and medium for jointly predicting dam cracks and reinforcing steel bar stress |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116378120A (en)* | 2023-04-20 | 2023-07-04 | 中交三航局第三工程有限公司 | Deformation monitoring method based on self-attention mechanism |
| CN116738601A (en)* | 2023-05-26 | 2023-09-12 | 中国长江电力股份有限公司 | Dynamic prediction method for deformation of concrete gravity dam |
| CN118469045A (en)* | 2024-07-09 | 2024-08-09 | 石家庄铁道大学 | Permafrost upper limit prediction method, device, equipment and storage medium |
| CN118469045B (en)* | 2024-07-09 | 2024-11-01 | 石家庄铁道大学 | Permafrost upper limit prediction method, device, equipment and storage medium |
| CN118862672A (en)* | 2024-07-19 | 2024-10-29 | 华东交通大学 | A method and device for predicting long-term deformation of concrete bridges |
| CN118606657A (en)* | 2024-08-07 | 2024-09-06 | 长江水利委员会长江科学院 | A method, system, device and storage medium for predicting dam deformation |
| CN118606657B (en)* | 2024-08-07 | 2024-10-25 | 长江水利委员会长江科学院 | A method, system, device and storage medium for predicting dam deformation |
| CN119783496A (en)* | 2024-11-13 | 2025-04-08 | 同济大学 | Concrete temperature monitoring optimization method, device and medium based on optical fiber sensor and machine learning |
| CN120372942A (en)* | 2025-04-11 | 2025-07-25 | 安徽水科数智信息技术有限公司 | Method, equipment and medium for jointly predicting dam cracks and reinforcing steel bar stress |
| Publication | Publication Date | Title |
|---|---|---|
| CN115907200A (en) | Concrete dam deformation prediction method, computer equipment and storage medium | |
| Tang et al. | A novel wind speed interval prediction based on error prediction method | |
| CN110633792B (en) | End-to-end bearing health index construction method based on convolution cyclic neural network | |
| CN110619420B (en) | A Short-Term Residential Load Forecasting Method Based on Attention-GRU | |
| CN110119854A (en) | Voltage-stablizer water level prediction method based on cost-sensitive LSTM Recognition with Recurrent Neural Network | |
| CN111680786A (en) | A Time Series Prediction Method Based on Improved Weight Gating Unit | |
| CN110309537B (en) | Intelligent health prediction method and system for aircraft | |
| CN112578089B (en) | Air pollutant concentration prediction method based on improved TCN | |
| CN113300884B (en) | A step-by-step network traffic prediction method based on GWO-SVR | |
| CN114330934A (en) | Model parameter self-adaptive GRU new energy short-term power generation power prediction method | |
| CN110222387A (en) | The polynary drilling time sequence prediction method of integral CRJ network is leaked based on mixing | |
| CN117275600A (en) | A method for predicting lake and river water quality parameters based on temporal convolutional neural network | |
| CN117077327A (en) | Bearing life prediction method and system based on digital twin | |
| CN107885967A (en) | A kind of regression model hyperparameter optimization method | |
| CN119886761B (en) | A method, system and product for evaluating the potential of collaborative regulation of multiple user-side resources | |
| Lyu et al. | Joint model for residual life estimation based on Long-Short Term Memory network | |
| CN116050504A (en) | A short-term prediction model of wind power based on deep learning | |
| CN115456272A (en) | Method for predicting residual service life based on variational local weighted subdomain adaptive network | |
| CN119765308A (en) | Wind-solar power generation power prediction method and related device based on LSTM-GRU-Attention | |
| CN119134284A (en) | Short-term wind power forecasting method based on Spearman-ISSA-BiLSTM combined model | |
| CN117350174B (en) | Methods, systems, electronic equipment and media for predicting remaining life of smart meters | |
| CN116662893A (en) | A Water Quality Prediction Method Based on Improved Salp Algorithm Optimizing SVM | |
| CN115630721A (en) | Trajectory prediction method and device based on latent graph structure generation | |
| Mahmudh et al. | Improved extreme learning machine power load forecasting based on firefly optimization algorithms | |
| CN115456301B (en) | A method for predicting the dynamic thermal capacity limit of transmission lines by tracking the time-varying characteristics of environmental factors |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |