A deep learning method for predicting rock freeze-thaw damage based on physical constraints

Through a deep learning method based on physical constraints, combined with a fully connected neural network or a Transformer neural network, the problems of generalization ability and physical continuity of rock freeze-thaw damage prediction methods under complex freeze-thaw conditions are solved, and high-precision and low-cost freeze-thaw damage prediction is achieved.

CN120510951BActive Publication Date: 2025-09-23JILIN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511009682.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-22
Publication Date
2025-09-23
Estimated Expiration
2045-07-22

AI Technical Summary

Technical Problem

Existing rock freeze-thaw damage prediction methods have deficiencies in generalization ability and physical continuity. In particular, the prediction accuracy is low under freeze-thaw conditions outside the scope of training data or empirical formulas, and the output results lack continuity.

Method used

A deep learning method based on physical constraints is adopted. By introducing an adaptive physical constraint mechanism, combining a fully connected neural network or a Transformer neural network, a hybrid loss function is constructed, and the ReLU activation function and the Adam optimizer are used to design a phased physical weight adjustment strategy to ensure that the model follows the physical evolution laws of rock freeze-thaw damage during training.

Benefits of technology

It significantly improves the generalization ability and prediction accuracy of the model, ensures the physical continuity and consistency of the output results, can handle multiple initial parameters and data from different sources, reduces experimental costs, and improves the credibility and promotion potential of engineering applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120510951B_ABST
    Figure CN120510951B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of rock freeze-thaw damage prediction, and relates to a deep learning rock freeze-thaw damage prediction method based on physical constraints, which is used to improve the physical consistency and prediction accuracy of the rock freeze-thaw damage prediction model; this method introduces physical constraint formulas into the data-driven deep learning model, and uses an adaptive weight strategy to achieve the organic unity of data fitting and physical rationality. The prediction method includes data collection, data set generation, network construction, physical constraint mechanism formula design, design of formulas reflecting the evolution of various physical properties based on rock freeze-thaw experimental observations or theoretical formula derivation, model training, and prediction output. The deep learning rock freeze-thaw damage prediction method based on physical constraints of the present invention has the advantages of significantly improved generalization ability, stronger physical continuity and consistency, comprehensive application of multi-parameter and multi-source data, phased adaptive training strategy, cost and resource savings, simple operation and easy application and promotion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of rock freeze-thaw damage prediction, and specifically relates to a deep learning prediction method for rock freeze-thaw damage based on physical constraint adaptive parameters. Background Art

[0002] Studies have found that repeated freeze-thaw cycles can cause cumulative damage to rocks, leading to deterioration of mechanical properties such as strength and elastic modulus, posing a serious threat to the stability of rock mass engineering in cold regions. In order to prevent freeze-thaw disasters and evaluate the life of engineering projects, researchers have proposed a variety of rock freeze-thaw damage prediction methods. Generally speaking, these methods can be summarized into three categories: (1) empirical models, which establish empirical relationships by regressing test data; (2) physical mechanics models, which establish theoretical models based on the principles of continuum mechanics or damage mechanics; and (3) deep learning models, which use machine learning and deep neural networks to automatically extract patterns from data for prediction.

[0003] Early prediction of rock freeze-thaw damage primarily relies on empirical models, which fit experimental data to identify mathematical relationships between the number of freeze-thaw cycles and rock performance degradation indicators. The simplest approach is linear regression, which uses linear relationships to approximate the effect of freeze-thaw cycles on the rock's dynamic elastic modulus and strength loss, yielding an empirical pattern in which performance indicators decrease linearly with increasing cycles. However, due to the complexity of freeze-thaw events, a single linear relationship often fails to accurately describe the full-stage damage evolution. Therefore, nonlinear regression methods such as polynomial fitting have been introduced. This method often uses a quadratic polynomial to fit the decay curve of the elastic modulus with freeze-thaw cycles, which can better reflect the trend of rapid initial degradation and later stabilization. In the development of empirical models, researchers have also begun to introduce multivariate regression models with multiple factors. Nikudel et al. (2015) investigated the durability of building stone materials. They collected mechanical parameters of 14 typical building stone materials before and after 30 freeze-thaw cycles and established a multivariate linear regression model linking the initial rock properties before freeze-thaw and the strength indicators after freeze-thaw. This model uses the rock's initial Brazilian splitting strength, point load strength, and longitudinal wave velocity as independent variables, successfully predicting the corresponding splitting strength and velocity after freeze-thaw cycles. Validation tests demonstrate the model's high accuracy. This study integrates multiple parameters to predict freeze-thaw damage, using more than three input parameters (i.e., multi-dimensional input and one-dimensional output). The experimental data was derived from systematic indoor freeze-thaw cycle tests and mechanical testing. These results demonstrate that incorporating the initial physical and mechanical state of rock can significantly improve the accuracy of predictions of post-freeze-thaw properties.

[0004] In recent years, with advances in testing technology and statistical analysis methods, empirical models have further developed into more complex forms. For example, Huang et al. (2022), analyzing a large amount of freeze-thaw test data, proposed an exponential decay model to predict the degradation of sandstone's uniaxial compressive strength (UCS) with freeze-thaw cycles. This model uses the initial compressive strength before freezing and thawing, porosity, and rock type as parameters, and represents the post-freeze-thaw UCS as an exponential decay of the initial value. The model includes three main parameters that reflect the influence of factors such as saturation on strength loss. It has been verified that it can well fit the UCS reduction under different initial water content conditions. In addition, multivariate statistical methods such as partial least squares regression (PLSR) and principal component regression (PCR) have also been used to predict rock freeze-thaw damage. Tai (2022) used low-field nuclear magnetic resonance (NMR) technology to obtain pore structure parameters of post-freeze-thaw rocks. Using PLSR and PCR, they established a multivariate model to predict the peak stress, peak strain, and elastic modulus of sandstone after freeze-thaw. The model's input is high-dimensional, consisting of multiple parameters such as porosity and pore size distribution extracted from T2 spectra. The output is macroscopic rock mechanical parameters, demonstrating excellent prediction accuracy and stability. The study, based on data from a large number of NMR and mechanical tests of rock samples subjected to various freeze-thaw cycles, demonstrates that combining multivariate statistical analysis can reveal correlations between freeze-thaw damage and mechanical properties from purely experimental data, enabling rapid prediction of mechanical properties. Overall, empirical modeling methods offer advantages such as simplicity, computational speed, and minimal requirements for experimental data (a few dozen data sets are sufficient). Empirical formulas offer practical predictive tools for engineering applications, particularly when complex theoretical models are lacking. However, their limitations include limited applicability, lack of physical meaning, and difficulty adapting to complex data patterns. Model parameters often require calibration based on specific rock and environmental tests, making prediction reliability difficult to guarantee beyond the experimental range. Furthermore, traditional empirical models are difficult to use when sample variability is significant or when a high proportion of missing values ​​is present.

[0005] To overcome the lack of mechanistic basis in empirical models, researchers have attempted to incorporate physical mechanics theory to develop rock freeze-thaw damage models since the early 21st century. These models, based on the principles of rock mechanics and damage mechanics, consider the internal stress-strain and microcrack evolution mechanisms of materials during freeze-thaw cycles. They achieve quantitative theoretical predictions of freeze-thaw damage with fewer experimental calibration parameters. Continuum damage mechanics models are the foundation of physical mechanics methods. As early as 2001, Li Ning et al. highlighted freeze-thaw damage in cold-region geotechnical engineering and introduced the research approach of using damage variables to characterize the effects of freeze-thaw cycles. Subsequently, Zhang Huimei et al. (2010) constructed a rock damage constitutive model that considers the coupled effects of freeze-thaw cycles and mechanical loading. Based on continuum damage mechanics theory, this model assumes that damage caused by freeze-thaw cycles and damage caused by external loads are additive. Damage variables are used to represent freeze-thaw damage evolution and stress damage evolution, respectively. The total damage is then introduced into the rock elastic-plastic constitutive equations through the stress-strain relationship. The model contains several unknown parameters (such as the damage evolution coefficient), which are determined by fitting triaxial compression test data. Verification results demonstrate that the model can effectively reveal the damage propagation patterns of rock under different confining pressures and freeze-thaw cycles, and the stress-strain evolution predicted by its theoretical curves agrees well with experimental results. Statistical damage models that account for material microscopic heterogeneity represent an improvement to continuum damage theory. Huang et al. (2018) employed a Weibull distribution to describe the variability of rock strength units and derived a statistical evolution equation for rock damage variables under the coupled effects of freeze-thaw cycles and external loads. They introduced random parameters into the continuum damage model framework, ensuring that damage accumulation follows statistical laws, and established a freeze-thaw-loading statistical damage constitutive model. This model, using only four to five parameters, characterizes the complete stress-strain curve of rock from the elastic stage to failure, including characteristics such as peak stress reduction and residual strength. Furthermore, it successfully explains the mechanism of nonlinear damage evolution in the stress-strain curve of rock samples under freeze-thaw cycles. Comparison with experimental data demonstrates that Huang et al.'s model can simulate the nonlinear cumulative effects of freeze-thaw damage and the mechanical behavior at each stage, which is of great significance for the stability assessment of engineering rock masses in cold regions. Compared with early models, statistical damage models achieve higher-precision fitting with fewer parameters, but they require assumptions about the distribution of damage units, and the physical meaning of the parameters is not intuitive enough.

[0006] In addition to damage mechanics, constitutive models have also made new progress from the perspective of elastoplastic theory. Huang et al. (2020) proposed an elastoplastic frost heave deformation model that considers thermal-mechanical coupling. This model focuses on the volume expansion and thawing shrinkage behavior of saturated porous rocks during freezing. The model includes multiple parameters such as the frost heave coefficient and plastic hardening parameter, and is calibrated through triaxial freeze-thaw tests at different temperatures. This model can predict the stress-strain paths and residual deformation of porous sandstones under repeated freeze-thaw cycles, successfully explaining the asymmetric strain accumulation phenomenon that occurs in rocks during freeze-thaw cycles.

[0007] Generally speaking, physical mechanics models are characterized by their rooted mechanisms and interpretable parameters. Compared to empirical formulas, such models typically require three to six parameters (such as the initial damage value, evolution coefficient, and frost heave coefficient). These parameters often have clear physical meanings and can be determined through independent experiments or correlated with material properties. However, physical models also have limitations. First, the model derivation process is complex and the applicable conditions are demanding (e.g., specific lithology and stress states), requiring caution in their direct application in practical engineering. Second, while each parameter has a clear physical meaning, extensive freeze-thaw cycle test data is still required. Using fitting formulas, these experimental data are mapped to model parameters. Furthermore, the lack of a unified theoretical framework across different models makes the damage evolution equations and parameters proposed by each model difficult to apply universally.

[0008] Since the 2010s, artificial intelligence technology has developed rapidly, and purely data-driven prediction methods have begun to be applied to rock engineering, including freeze-thaw damage prediction. Unlike traditional models that rely on assumptions, deep learning methods, through training on large amounts of data, can automatically extract nonlinear relationships between freeze-thaw damage and influencing factors. Artificial neural networks (ANNs) and their deep variants, in particular, have become emerging tools for rock freeze-thaw prediction due to their ability to approximate arbitrarily complex mappings. In an earlier exploration, Behnia et al. (2017) used gene expression programming (GEP), an evolutionary algorithm, to construct a freeze-thaw damage prediction formula. Using a variety of initial rock properties (quartz content, dry density, porosity, etc.) before freezing and thawing as input, the GEP algorithm automatically evolved explicit mathematical expressions for calculating the uniaxial compressive strength and elastic modulus of the rock. Results showed that the GEP-generated model had better prediction accuracy than traditional multivariate regression, achieving a smaller error on the test set. This study used a large dataset covering a variety of lithologic samples and did not require manual model formulation, demonstrating the potential of intelligent algorithms for freeze-thaw rock strength prediction. It is only in recent years that deep neural networks have truly been applied to rock freeze-thaw problems. Xiong et al. (2021) proposed a GA-ANN intelligent prediction model, combining a genetic algorithm (GA) with a back-propagation neural network (BPNN) to predict the triaxial compressive strength of sandstone after freeze-thaw. They constructed a three-layer BPNN (input layer-hidden layer-output layer), taking four characteristic parameters (number of freeze-thaw cycles, rock porosity, P-wave velocity, and confining pressure) as inputs, and the triaxial compressive strength of the rock after freeze-thaw as the output (one-dimensional). GA was then used to optimize the network's initial weights and thresholds, avoiding the local minima caused by random initialization. This shows that the combination of evolutionary algorithms and neural networks can fully explore the multi-factor interaction patterns of freeze-thaw damage and achieve prediction accuracy close to that of physical models while relying solely on data. In addition to BPNN, some studies have also combined ensemble learning and deep learning for freeze-thaw damage prediction. Lv et al. (2024) compared various machine learning models to predict the dynamic strength (impact compressive strength DCS) of rocks under freeze-thaw conditions. First, a database containing 10 influencing factors was established (of which several effective features remained after principal component dimensionality reduction). Then, BPNN and random forest (RF) models were trained, and six metaheuristic algorithms were used to optimize hyperparameters, forming 12 combined models.

[0009] The above method essentially constructs an empirical model generated by data, but because neural networks have powerful information capture capabilities, they can explore more complex nonlinear combinations than manual regression.

[0010] In recent years, a method called physics-informed neural networks (PINNs) has emerged to further bridge the gap between data-driven models and physical mechanics models. Proposed by Raissi et al. (2019), this method essentially uses neural networks to solve partial differential equations with physical constraints. By embedding physical laws into the loss function, the network predictions simultaneously satisfy data fitting and physical conservation conditions. This method has been successfully applied to various fields, including fluid mechanics and solid mechanics. Researchers in the geotechnical field have also explored this approach, but it is still in its infancy. Compared to purely data-driven models, this approach offers greater physical interpretability and generalization capabilities. Furthermore, compared to traditional physical models, it does not require complex numerical solutions. However, the application of PINNs to rock freeze-thaw damage is still in its early stages and has significant limitations. On the one hand, the PINN method relies heavily on the mathematical form of the physical model and the accuracy of the partial differential equations. When the physical model itself contains large approximations or uncertainties, the prediction accuracy will significantly decrease. On the other hand, PINN currently uses physical constraints in the form of fixed equations, which are less flexible and cannot automatically adjust the physical constraint parameters based on specific lithology, environment, or experimental conditions. This means that although the model theoretically combines the advantages of data-driven and physical models, it still has difficulty in practical applications in dealing with the highly complex and frequently changing rock freeze-thaw environments.

[0011] At the same time, deep learning models are also beginning to incorporate physical constraints or prior knowledge to improve their interpretability and extrapolation performance. For example, CT scan images of rock freeze-thaw events are combined with convolutional neural networks (CNNs) for damage identification and quantitative assessment. One study employed a U-Net deep convolutional network to perform pixel-level segmentation on CT slices of frozen-thaw sandstone, automatically extracting crack propagation features for inferring the evolution of freeze-thaw damage. This approach introduces physics (CT images) into the data-driven model, allowing the network output to correspond to specific areas of physical damage, achieving a degree of "physically interpretable" deep learning. In the field of rock freeze-thaw, physics-guided machine learning is still an emerging area. Currently, most deep models are still primarily trained based on pure data, without explicitly considering constraints such as physical conservation. However, with the development of concepts such as physics-enhanced neural networks, it is foreseeable that more deep prediction models incorporating rock mechanics knowledge will emerge in the future, making data-driven methods not only highly accurate but also more reliable and applicable.

[0012] In summary, purely data-driven models rely on highly nonlinear fitting of large amounts of experimental data. While they can uncover patterns within the data, they lack an understanding of the underlying physics. Physical information models, on the other hand, essentially solve specific physical equations, utilizing neural networks as a tool for solving them. Fusion of these two approaches is considered an important future development direction. In this context, it would be desirable to develop a deep learning-based rock freeze-thaw damage prediction method. Unlike the fixed-constraint PINN (Pinning Network), this method incorporates an adaptive physical constraint mechanism, allowing the parameters of each physical constraint term in the model to be automatically optimized and adjusted based on the data. This novel approach maintains the flexibility and high-level fitting capabilities of data-driven models while ensuring that predictions adhere to the continuity and rationality of physical laws, significantly improving the model's generalization and practicality. Summary of the Invention

[0013] The purpose of the present invention is to provide a deep learning rock freeze-thaw damage prediction method based on physical constraints to solve the problems of poor generalization ability of existing rock freeze-thaw damage prediction methods, low prediction accuracy when applied to freeze-thaw conditions outside the scope of training data or empirical formulas, and physically incoherent prediction results and lack of continuity in output.

[0014] The purpose of the present invention is achieved through the following technical solutions:

[0015] A deep learning rock freeze-thaw damage prediction method based on physical constraints includes the following steps:

[0016] Step A, data collection: measuring the initial rock index, environmental parameters and freeze-thaw damage index of the rock sample;

[0017] Step B, generate a data set: divide the initial rock parameters and environmental parameters as input values, divide the prediction target as output values, and standardize the data; divide the data into a 70% training set, a 10% validation set, and a 20% test set; then encapsulate the data into a data set; use one-hot encoding to distinguish rock samples from different sources or types; use standardization to scale the features to a distribution with a mean of 0 and a standard deviation of 1; fit and transform the feature matrix to obtain a standardized feature matrix;

[0018] Step C, Network Construction: Depending on the data volume of the dataset, a fully connected neural network or a Transformer end-to-end neural network is used. A hybrid loss function is constructed that integrates multiple physical evolution formulas. This loss function consists of a data fitting error term and multiple damage indicator error terms with clear physical meanings. The difference between the model output value and the true observation value is measured using the mean squared error. The total loss function consists of a basic data fitting error term and several physical constraint error terms, with each physical term corresponding to a different damage variable. The ReLU activation function is used as the nonlinear activation function. The Adam optimizer is used for optimization.

[0019] Step D: Design of physical constraint mechanism formulas. Formulas reflecting the evolution of various physical properties are designed for damage indicators such as compressive strength, peak strain, elastic modulus, longitudinal wave velocity, porosity, and mass change rate. Parameters of the physical constraint formulas are defined in the neural network.

[0020] Step E, model training: Use k-fold cross-validation to adjust hyperparameters, use early stopping to stop training, and use box plots to represent various indicators of all hyperparameter combinations. During training, a phased physical weight adjustment mechanism is used to adjust the physical formula weights in three stages. Backpropagation is used to update the physical constraint formula parameters. The performance of the loss function on the training set and validation set is output and compared in real time. Finally, the best performing model is saved and used.

[0021] Step F, prediction output: New initial parameters and environmental parameters are input into the trained model to generate the freeze-thaw damage variables that need to be predicted.

[0022] Furthermore, in step A, freeze-thaw damage data for rock samples is collected. The data can be obtained from experimental measurements, public research reports, or published papers. The rock sample is 100 mm high and 50 mm in diameter. Initial indicators include structural surface inclination, dry density, natural density, saturated density, porosity, compressive strength, peak strain, elastic modulus, and longitudinal wave velocity. Environmental parameters include saturation, freezing temperature, freezing time, melting temperature, melting time, confining pressure, water pH, and loading rate. Freeze-thaw damage indicators include post-freeze-thaw compressive strength, post-freeze-thaw peak strain, post-freeze-thaw elastic modulus, post-freeze-thaw longitudinal wave velocity, post-freeze-thaw porosity, and post-freeze-thaw mass change rate.

[0023] Furthermore, in step B, the normalization process uses the following formula:

[0024] Where Xs is the normalized eigenvalue, X is the original eigenvalue, μ is the mean of the eigenvalue, and σ is the standard deviation of the eigenvalue. Furthermore, in step C, each neuron in the fully connected neural network is connected to all neurons in the previous layer, which can capture complex nonlinear relationships and adapt to data volumes of less than 300 items with the assistance of dynamic physical constraints. The specific formula is:

[0025] Among them, z (l) is the linear transformation result of the lth layer, W(l) is the weight matrix of the lth layer, a (l-1) It is l -1 layer activation output, b (l) It is l Furthermore, in step C, when the number of samples is greater than 300 and less than 1000, a lightweight Transformer model (encoder layer < 2) is used, and when the number of samples is greater than 1000, a conventional Transformer model can be used;

[0026] The input embedding layer of the Transformer model maps the input features to a high-dimensional vector space, making it easier for the model to learn the relationship between features. The formula is:

[0027] in, X embed is the concatenated feature matrix, X is the original input feature matrix, W embed is the embedding weight matrix, b embed is bias;

[0028] Transformer has no sequence perception ability, and adds position encoding to retain the position information between features. The formula is:

[0029] in, PE ( pos, 2 i )and PE ( pos, 2 i+ 1) is the position encoding vector, pos Indicates the feature location, i represents the position encoding dimension index, d model represents the embedding vector dimension;

[0030] The Transformer encoder consists of a multi-head self-attention layer and a positional feed-forward network, both with residual connections and layer normalization;

[0031] Multi-head attention mechanism formula:

[0032]

[0033] in:

[0034] in:

[0035] in, MultiHead is the attention mechanism, Q, K, V are the input Query, Key and Value matrices respectively, head i For the i The output of an attention head, W i Q ,W i K ,W i V ,W O are training parameters, Attention is the attention mechanism function, QK T is the product of Q and the transpose of K, d k is the dimension of the Key;

[0036] Position feedforward network FFN formula:

[0037] Among them, W1, W2 and b1, b2 are trainable parameters;

[0038] The features encoded by the Transformer are output through the fully connected layer to obtain the final predicted damage index. Furthermore, in step C, the mean square error metric is:

[0039] in, is the basic data fitting error term, N is the total number of samples, It is i The true value of the sample, is the corresponding model prediction value; the structure of the total loss function can be abstracted as a weighted sum of the following forms:

[0040] in, is the total error term, It is i Physical constraint loss, It is iThe weight parameter of the physical constraint, K is the total number of physical constraints currently introduced; the formula of the ReLU activation function is:

[0041] in, ReLU is the activation function, when the input x When the input is less than 0, the output is 0. x When it is greater than or equal to 0, the output is x .

[0042] Furthermore, in step C, the Adam optimizer uses the first-order momentum and the second-order momentum to dynamically adjust the learning rate. The specific steps are as follows: First, the exponentially weighted moving average of the gradient is calculated:

[0043] in, m t is the first moment estimate of the gradient, g t is the current gradient, β 1 is the momentum parameter;

[0044] Then, we compute the exponentially weighted moving average of the squared gradients:

[0045] in, v t is the second moment estimate of the gradient, β 2 is the momentum parameter;

[0046] The first-order and second-order moment estimates are then bias-corrected:

[0047] Finally, update the parameters:

[0048] in, i t is the current parameter, α is the learning rate, e is a small constant that prevents division by zero.

[0049] Furthermore, in step D, for compressive strength, an exponential decay model is used to describe the cumulative destructive effect of freeze-thaw cycles on rock compressive strength, and corrections are made for temperature conditions, confining pressure, pH, bedding dip, and saturation. The additional contribution of artificial cracks to damage is then considered, and the formula is written as:

[0050]

[0051] in, is the initial compressive strength, is a trainable parameter,r T is the temperature drop rate, T f and T t are the freezing and melting temperatures, P c For confining pressure, pH -7 indicates the effect of pH value deviating from the neutral state, N is the number of freeze-thaw cycles, is the structural surface modulation function, is the saturation modulation function, is the confining pressure modulation function, is the additional damage modulation function of artificial cracks;

[0052] The structural surface effect modulation function is defined as:

[0053] in, i b is the structural surface inclination angle, r 1 is a trainable parameter;

[0054] The saturation modulation function is defined as:

[0055] in, S is saturation, oh 1 is a trainable parameter;

[0056] The confining pressure modulation function is defined as:

[0057] Among them, θ1 is a trainable positive parameter

[0058] The additional damage modulation function of artificial cracks is defined as:

[0059]

[0060] in, A crack To determine whether there is artificial crack, i c is the crack angle, L c and w c are the length and width of the crack respectively, 50 is the reference scale, corresponding to the rock column diameter of 50, i bedding is the structural surface inclination angle, x i is a trainable parameter;

[0061] Furthermore, in step D, for the elastic modulus, a constructor is used to describe the decrease in the elastic modulus of rock after freezing and thawing:

[0062] in, E 0 is the initial elastic modulus, β i is a trainable parameter;

[0063] For the peak strain, the following formula is constructed:

[0064]

[0065] in, is the initial peak strain, c i is a trainable parameter;

[0066] The longitudinal wave velocity is mainly related to the post-freeze-thaw elastic modulus and the post-freeze-thaw porosity, and is defined as follows:

[0067] in, V 0 is the initial longitudinal wave velocity, or i is a trainable parameter;

[0068] For porosity, the following definition method is used:

[0069]

[0070] in, is the initial porosity, k i is a trainable parameter;

[0071] For mass change rate, a definition similar to that of porosity is used:

[0072]

[0073] in, m i is a trainable parameter.

[0074] Furthermore, in step E, a set of phased physical weight adjustment mechanisms is designed to achieve a dynamic trade-off between the guidance of physical laws and data fitting capabilities during the neural network training process; it is divided into three stages: initial strong constraints, mid-term weight decay, and late adaptive optimization. Through high physical constraint weights, the model quickly converges to the physical constraints constructed in step D, and then reduces the physical constraint weights to enable the model to automatically capture available information not involved in the physical formulas. Finally, the physical constraint weight restrictions are released to further refine the model parameters.

[0075] Compared with the prior art, the present invention has the following beneficial effects:

[0076] 1. Significantly improved generalization capability: By introducing strict physical constraints, the model of the present invention can maintain high prediction accuracy and robustness when faced with new freeze-thaw conditions that are not in the training data or empirical formulas, thereby outputting reasonable results under various complex working conditions;

[0077] 2. Enhanced physical continuity and consistency: The model is forced to follow the natural monotonic variation trends of key indicators such as rock compressive strength, peak strain, and elastic modulus during output, making the prediction curve smooth and continuous. This effectively avoids the sudden changes and abnormal fluctuations common in traditional models and enhances the credibility of the model output.

[0078] 3. Comprehensive application of multi-parameter and multi-source data: The model can simultaneously process more than 20 initial parameters and effectively integrate experimental data from different sources through techniques such as thermal coding. This comprehensive data processing capability not only improves the comprehensiveness of the prediction, but also makes the model more applicable and has greater promotion potential when dealing with different regions and rock types.

[0079] 4. Phased Adaptive Training Strategy: This invention adopts a physical constraint weight adjustment strategy that starts with a large-scale, then a small-scale, and then an adaptive one. This strategy allows for rapid capture of fundamental physical laws in the initial stages of training, and for progressively more refined data fitting in subsequent stages. This training process ensures rapid model convergence in the early stages, while also enabling fine-tuning of prediction accuracy in the later stages, achieving a perfect fusion of data-driven and physical constraints.

[0080] 5. Cost and resource savings: Due to the model's higher prediction accuracy and stability, the number of actual experiments can be significantly reduced in engineering applications. The introduction of a priori formulas can also reduce the data required for training, thereby reducing energy consumption, labor, and raw material consumption. This advantage not only helps reduce experimental costs but also meets the requirements of green and sustainable development.

[0081] 6. Easy operation and application promotion: By leveraging the advantages of deep learning automation, users can obtain accurate freeze-thaw damage prediction results through simple data preprocessing and parameter input without having to deeply understand complex physical mechanisms. This greatly reduces the complexity and technical threshold of engineering operations, providing convenient conditions for widespread promotion and application. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.

[0083] Figure 1 This is a training flowchart for the deep learning rock freeze-thaw damage prediction method based on physical constraints;

[0084] Figure 2 Schematic diagram of the deep learning method for predicting rock freeze-thaw damage based on physical constraints. DETAILED DESCRIPTION

[0085] The present invention will be further described below in conjunction with embodiment:

[0086] The present invention will be further described in detail below with reference to the accompanying drawings and examples. It will be understood that the specific embodiments described herein are intended only to illustrate the present invention and are not intended to limit the present invention. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present invention, not all structures.

[0087] It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are used only to distinguish the description and should not be understood as indicating or implying relative importance.

[0088] Existing methods for predicting rock freeze-thaw damage, including empirical models and conventional deep learning models, suffer from significant drawbacks when dealing with complex freeze-thaw processes. First, these methods have poor generalization capabilities, and prediction accuracy often drops sharply when applied to freeze-thaw conditions outside the scope of training data or empirical formulas. Second, because they fail to incorporate the inherent physical mechanisms of freeze-thaw damage, the prediction results of traditional models can be physically inconsistent, often exhibiting unusual fluctuations or sudden changes that are inconsistent with actual patterns.

[0089] In response to the above problems, the present invention establishes a physically reasonable rock freeze-thaw damage prediction model by introducing physical constraint formulas, thereby significantly improving the model's generalization ability in complex freeze-thaw processes. Specifically, the present invention integrates prior knowledge of freeze-thaw mechanics into the model, and by adding functional mechanisms that reflect the evolution laws of the mechanical properties of materials (for example, the attenuation function of compressive strength and the growth function of peak strain), the model follows the actual physical evolution trend during the prediction process. With the help of these physical constraints, the model provided by the present invention no longer relies solely on data fitting, but is able to enforce the reasonable physical laws of rock freeze-thaw damage within the model, solving the problem of poor physical consistency of existing models.

[0090] Key mechanical properties of rocks (such as compressive strength, peak strain, and elastic modulus) exhibit a natural monotonic evolution trend during repeated freeze-thaw cycles. For example, as the number of freeze-thaw cycles increases, the compressive strength generally decreases, while the peak strain tends to increase. When dealing with such patterns, purely data-driven models often fail to capture this inherent trend due to the complexity of the data, resulting in broken or chaotic predictions. The present invention introduces multiple physical constraints and adaptive physical weights, enabling the model to quickly capture basic physical laws in the initial stage and refine data fitting in subsequent training, thereby balancing prediction accuracy and physical rationality.

[0091] This paper proposes a deep learning method for predicting rock freeze-thaw damage based on physical constraints. This method introduces physical constraint formulas into a data-driven deep learning model and uses an adaptive weighting strategy to achieve an organic unity of data fitting and physical rationality. Specifically, it includes the following steps:

[0092] Step A, Data Collection: Collect multiple sets of data from rock freeze-thaw experiments. The data can be obtained from experimental measurements or from publicly available research reports or published papers. Typically, a rock sample 100 mm high and 50 mm in diameter is used as the test subject. Parameters measured include initial rock parameters (including structural plane inclination, dry density, natural density, saturated density, porosity, uniaxial compressive strength, peak strain, elastic modulus, and longitudinal wave velocity), environmental parameters (such as saturation, freezing temperature, freezing time, melting temperature, melting time, confining pressure, water pH, and loading rate), and freeze-thaw damage indicators (such as post-freeze-thaw longitudinal wave velocity, post-freeze-thaw uniaxial compressive strength, post-freeze-thaw peak strain, and post-freeze-thaw elastic modulus). Store the raw data in a CSV file.

[0093] Step B: Generate a dataset. First, use the pandas package to load the encoded CSV file, splitting the initial rock parameters and environmental parameters into inputs and the predicted targets into outputs, and normalize the data. Then, use the train_test_split function in the scikit-learn package to split the dataset into a training set (70%), a validation set (10%), and a test set (20%). Finally, encapsulate the data into a dataset using the Dataset class provided by PyTorch. By inheriting from the Dataset class, create a custom class for loading data.

[0094] Using standardization, the features are scaled to a distribution with a mean of 0 and a standard deviation of 1. By importing the StandardScaler class from the scikit-learn library and using the fit_transform method to fit and transform the feature matrix, a standardized feature matrix is ​​obtained. This standardization process eliminates magnitude differences between features. The standardization process uses the following formula:

[0095] in, X s is the normalized eigenvalue, X is the original eigenvalue, m is the mean of the feature, s is the standard deviation of the feature, X s is the standardized feature value. If different rock samples are used, the rock samples need to be encoded using one-hot encoding. Import the OneHotEncoder tool from the scikit-learn library to implement one-hot encoding. First, define the categorical variable. Assume that there are n different categories of rock origin, represented as C 1, C 2,... C n . , create a length of n A binary vector where only the position corresponding to the category is 1 and the other positions are 0. For example, if the origin has 3 categories C 1, C 2, C 3, then C 1 corresponds to the vector [1, 0, 0], C 2 corresponds to the vector [0, 1, 0], and so on.

[0096] Step C: Network construction. The present invention provides two network structures for selection. When the amount of data is less than 300, a fully connected neural network (FCNN) is used. When the amount of data is greater than 300, a Transformer-based neural network (TNN) is used.

[0097] A fully connected neural network is a fundamental structure in deep learning models. Each neuron is connected to all neurons in the previous layer, enabling it to capture complex nonlinear relationships. It has very low data requirements and can accommodate less than 100 sets of data with the assistance of dynamic physical constraints. The specific formula is:

[0098]

[0099] in, z (l) It is l The linear transformation result of the layer, W (l) It is l The weight matrix of the layer, a (l-1) It is l -1 layer activation output, b (l) It is l The bias vector of the layer.

[0100] The Transformer is a deep neural network model based on the self-attention mechanism. It efficiently captures global dependencies in input data and demonstrates strong generalization capabilities in sequence modeling and regression prediction tasks. By building an end-to-end Transformer-based model, it is possible to predict rock damage under freeze-thaw cycles. The Transformer model consists of an input embedding layer, a positional encoding layer, a Transformer encoder module, a feed-forward network layer, and an output layer.

[0101] The input embedding layer maps the input features to a high-dimensional vector space, making it easier for the model to learn the relationship between features. The formula is:

[0102] in, X embed is the concatenated feature matrix, X is the original input feature matrix, W embed is the embedding weight matrix, b embed For bias.

[0103] Transformer has no sequence perception ability, so position encoding is added to preserve the position information between features. The formula is:

[0104] in, PE ( pos, 2 i )and PE ( pos, 2 i+ 1) is the position encoding vector, pos Indicates the feature location, i represents the position encoding dimension index, dmodel Represents the embedding vector dimension.

[0105] The Transformer encoder contains a Multi-Head Self-Attention layer and a Position-wise Feed-Forward network, both with Residual Connection and Layer Normalization.

[0106] Multi-head attention mechanism formula:

[0107]

[0108] in:

[0109] in:

[0110] in, MultiHead is the attention mechanism, Q, K, V are the input Query, Key and Value matrices respectively, head i For the i The output of an attention head, W i Q ,W i K ,W i V ,W O are training parameters, Attention is the attention mechanism function, QK T is the product of Q and the transpose of K, d k is the dimension of the Key;

[0111] Position feedforward network FFN formula:

[0112]

[0113] in, W 1, W 2 and b 1, b 2 is a trainable parameter.

[0114] The features encoded by Transformer are output through the fully connected layer to output the final predicted damage index;

[0115] This paper proposes a hybrid loss function that integrates multiple physical evolution formulas to improve the physical consistency and prediction accuracy of a rock freeze-thaw damage prediction model. This loss function consists of a data fitting error term and multiple damage indicator error terms with clear physical meanings. By incorporating the physical degradation laws of the freeze-thaw process into the neural network training process, the model's generalization ability is enhanced and non-physical fluctuations in the prediction results are significantly reduced. The difference between the model output and the true observation is measured using the mean squared error (MSE), which is expressed as:

[0116]

[0117] in, is the basic data fitting error term, N is the total number of samples, It is i The true value of the sample, is the corresponding model predicted value.

[0118] The total loss function consists of a basic data fitting error and several physical constraint error terms, each of which corresponds to a different damage variable (such as compressive strength, elastic modulus, etc.). This structure can be abstracted as a weighted sum of the following form:

[0119] in, is the total error term, It is i Physical constraint loss, It is i The weight parameter of the physical constraint, K The total number of physical constraints currently introduced.

[0120] The ReLU activation function is used as the nonlinear activation function, and its formula is:

[0121]

[0122] in, ReLU is the activation function, when the input x When the input is less than 0, the output is 0. x When it is greater than or equal to 0, the output is x .

[0123] The Adam optimizer (Adaptive Moment Estimation) is used for optimization. The Adam optimizer accelerates convergence by adjusting the learning rate of each parameter at each iteration. Its core idea is to dynamically adjust the learning rate using first-order momentum (the average of the gradient) and second-order momentum (the average of the squared gradient). The specific steps are as follows:

[0124] First, compute the exponentially weighted moving average of the gradients:

[0125]

[0126] in, m t is the first moment estimate of the gradient, g t is the current gradient, β 1 is the momentum parameter.

[0127] Then, we compute the exponentially weighted moving average of the squared gradients:

[0128]

[0129] in, v t is the second moment estimate of the gradient, β 2 is the momentum parameter.

[0130] The first-order and second-order moment estimates are then bias-corrected:

[0131]

[0132]

[0133] Finally, update the parameters:

[0134]

[0135] in, i t is the current parameter, α is the learning rate, e is a small constant that prevents division by zero.

[0136] Step D, design of physical constraint mechanism formula, based on observations from rock freeze-thaw experiments or deduction of theoretical formulas, design formulas that reflect the evolution of various physical properties. When data is abundant, more refined constraints can be designed to capture the subtle coupling relationships between factors. When data is scarce or sensitivity is unclear, only the main and verified influencing factors are retained. In other words, not all possible influencing factors are added, but the most important factors are screened out based on physical mechanisms and data sensitivity. For the influence of other factors, the fitting ability of the neural network is used to capture them in the middle and late stages of training with small weight constraints and adaptive weights. The following is a feasible solution for constructing a rock freeze-thaw cycle damage constraint formula:

[0137] For compressive strength, an exponential decay model is used to describe the cumulative destructive effect of freeze-thaw cycles on rock compressive strength, while making corrections for temperature conditions, confining pressure, pH, bedding dip, and saturation, and considering the additional contribution of artificial cracks to damage. The formula is written as:

[0138] in, is the initial compressive strength, is a trainable parameter, r T is the temperature drop rate, T f and T t are the freezing and melting temperatures, P c is the confining pressure, ( pH -7) indicates the effect of pH value deviating from the neutral state, N is the number of freeze-thaw cycles, is the structural surface modulation function, is the saturation modulation function, is the confining pressure modulation function, is the additional damage modulation function of artificial cracks;

[0139] The structural surface effect modulation function is defined as:

[0140] in, i b is the inclination angle of the structural surface (based on the horizontal, clockwise is the positive direction), r 1 is a trainable parameter.

[0141] The saturation modulation function is defined as:

[0142] in, S is saturation, oh 1 is a trainable parameter.

[0143] The confining pressure modulation function is defined as:

[0144] in, i 1 is a trainable positive parameter

[0145] The additional damage modulation function of artificial cracks is defined as:

[0146]

[0147] in, A crack Is whether there is an artificial crack (0 or 1), i cis the crack angle (based on the horizontal, clockwise is the positive direction), L c and w c are the length and width of the crack respectively, 50 is the reference scale (corresponding to the rock column diameter of 50), i bedding is the structural surface inclination angle, x i is a trainable parameter.

[0148] For the elastic modulus, a function similar to the compressive strength is constructed to describe the decrease in the elastic modulus of rock after freezing and thawing:

[0149] in, E 0 is the initial elastic modulus, β i is a trainable parameter.

[0150] For the peak strain, the following formula is constructed:

[0151]

[0152] in, is the initial peak strain, c i is a trainable parameter.

[0153] The longitudinal wave velocity is mainly related to the post-freeze-thaw elastic modulus and the post-freeze-thaw porosity, and is defined as follows:

[0154] in, V 0 is the initial longitudinal wave velocity, or i is a trainable parameter.

[0155] For porosity, the following definition method is used:

[0156]

[0157] in, is the initial porosity, k i is a trainable parameter.

[0158] For mass change rate, a definition similar to that of porosity is used:

[0159]

[0160] in, m i is a trainable parameter.

[0161] All of the above trainable parameters are defined using the nn.Parameter method in PyTorch and are synchronously optimized and updated via backpropagation during network training without manual intervention.

[0162] Step E: Model training. Use the DataLoader class provided by PyTorch to load the dataset and begin training. Use k-fold cross-validation to adjust hyperparameters. This involves splitting the dataset into k equal parts, using each part as the validation set and the remaining k-1 parts as the training set, repeating this cycle k times to evaluate model performance. Early stopping is used to stop training, and box plots are used to plot various metrics for all hyperparameter combinations, including the median, quartiles, whiskers, and outliers. During training, the loss function performance on the training and validation sets is output and compared in real time. The best-performing model is saved and used.

[0163] In order to achieve a dynamic trade-off between physical law guidance and data fitting ability during neural network training, the present invention designs a phased physical weight adjustment mechanism, which is divided into three stages: initial strong constraint, mid-term weight decay, and late adaptive optimization.

[0164] During the initial training phase (e.g., within the first 20% of training rounds), the model's physical constraint weights are initially set to large values ​​(e.g., 0.1). These weights dominate the data-fitting terms (typically on the order of 1e-2 to 1e-1), strengthening the guiding role of physical laws. Manual parameter adjustment is not required; initial values ​​are simply set during model initialization.

[0165] During the training process, due to these l i Parameters are learnable variables, and the optimizer automatically adjusts their values ​​based on the gradient of each term in the loss function. In the middle of training, the model starts to optimize the data fitting error term more. l i It will gradually become smaller due to the decrease of physical error or gradient.

[0166] In the later stages of training, the model no longer fixes the weights of the constraints, but instead automatically controls the relative importance of each item in the loss function based on its gradient and prediction error.

[0167] The early stopping method monitors the loss on the validation set and stops training early when the validation loss no longer decreases significantly over several consecutive epochs to prevent overfitting.

[0168] Step F, predicting output (using the model): Input new initial parameters and environmental parameters into the trained model to generate the freeze-thaw damage variable to be predicted.

[0169] Figure 1The training flow chart shows the overall closed-loop process of data preprocessing, model initialization, initial (large weight) training of physical constraint weights, gradually reducing weight training, later adaptive weight optimization and model evaluation. Figure 2 It shows how the input data is processed by a deep neural network, the physical constraint formula is calculated and the total loss is generated, and finally, the feedback is fed back to the model weight update.

[0170] This invention innovatively integrates the inherent physical evolution laws of rock freeze-thaw processes directly into a deep learning model, achieving an organic unity of data fitting and physical rationality. The present invention explicitly embeds physical constraint formulas reflecting the evolution laws of rock freeze-thaw damage (e.g., compressive strength decay, peak strain growth, elastic modulus decay, etc.) into the deep learning model and sets the relevant parameters in the formula as automatically optimized learnable parameters, thereby ensuring that the model's prediction results have physical continuity and rationality. The present invention adopts a physical constraint weight adjustment strategy that starts with large, then small, and then adaptively adjusts. During the training process, the model is gradually guided from rapidly capturing physical laws to refining data fitting, ensuring that the prediction results maintain a stable and continuous physical trend under different freeze-thaw cycles.

[0171] Note that the above are only preferred embodiments of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments and may include many other equivalent embodiments without departing from the concept of the present invention. The scope of the present invention is determined by the scope of the appended claims.

Claims

1. A deep learning rock freeze-thaw damage prediction method based on physical constraints, characterized by: The following steps are involved: Step A, data collection: measuring the initial rock index, environmental parameters and freeze-thaw damage index of the rock sample; Step B, generate data set: divide rock initial parameters and environmental parameters as input values, divide prediction targets as output values, and standardize the data; The data was divided into a 70% training set, a 10% validation set, and a 20% test set. The data was then packaged into a dataset. One-hot encoding was used to distinguish rock samples from different sources or types. Standardization was used to scale the features to a distribution with a mean of 0 and a standard deviation of 1. Fit and transform the feature matrix to obtain a standardized feature matrix; Step C, Network Construction: Depending on the data volume of the dataset, a fully connected neural network or a Transformer end-to-end neural network is used. A hybrid loss function is constructed that integrates multiple physical evolution formulas. This loss function consists of a data fitting error term and multiple damage indicator error terms with clear physical meanings. The difference between the model output value and the true observation value is measured using the mean squared error. The total loss function consists of a basic data fitting error term and several physical constraint error terms, with each physical term corresponding to a different damage variable. The ReLU activation function is used as the nonlinear activation function. The Adam optimizer is used for optimization. Step D: Designing a physical constraint mechanism formula: Designing formulas that reflect the evolution of various physical properties for compressive strength, peak strain, elastic modulus, longitudinal wave velocity, porosity, and mass change rate damage indicators, and defining the physical constraint formula parameters in the neural network; For compressive strength, an exponential decay model is used to describe the cumulative destructive effect of freeze-thaw cycles on rock compressive strength. The model is then corrected for temperature, confining pressure, pH, bedding dip, and saturation. The additional contribution of artificial cracks to damage is then considered, and the formula is written as: , in, is the initial compressive strength, is a trainable parameter, r T is the temperature drop rate, T f and T t are the freezing and melting temperatures, P c For confining pressure, pH -7 indicates the effect of pH value deviating from the neutral state, N is the number of freeze-thaw cycles, is the structural surface modulation function, is the saturation modulation function, is the confining pressure modulation function, is the additional damage modulation function of artificial cracks; The structural surface effect modulation function is defined as: , in, θ b is the structural surface inclination angle, ρ 1 is a trainable parameter; The saturation modulation function is defined as: , in, S is saturation, ω 1 is a trainable parameter; The confining pressure modulation function is defined as: , in, θ 1 is a trainable positive parameter; The additional damage modulation function of artificial cracks is defined as: , in, A crack To determine whether there is artificial crack, θ c is the crack angle, L c and w c are the length and width of the crack respectively, 50 is the reference scale, corresponding to the rock column diameter of 50, θ bedding is the structural surface inclination angle, ξ i is a trainable parameter; For the elastic modulus, the constructor is used to describe the decrease in the elastic modulus of rock after freeze-thaw: , in, E 0 is the initial elastic modulus, β i is a trainable parameter; For the peak strain, the following formula is constructed: , in, is the initial peak strain, γ i is a trainable parameter; The longitudinal wave velocity is mainly related to the post-freeze-thaw elastic modulus and the post-freeze-thaw porosity, and is defined as follows: , in, V 0 is the initial longitudinal wave velocity, η i is a trainable parameter; For porosity, the following definition method is used: , in, is the initial porosity, κ i is a trainable parameter; For mass change rate, a definition similar to that of porosity is used: , in, μ i is a trainable parameter; Step E, model training: Use k-fold cross-validation to adjust hyperparameters, use early stopping to stop training, and use box plots to represent various indicators of all hyperparameter combinations. During training, a phased physical weight adjustment mechanism is used to adjust the physical formula weights in three stages. Backpropagation is used to update the physical constraint formula parameters. The performance of the loss function on the training set and validation set is output and compared in real time. Finally, the best performing model is saved and used. Step F, prediction output: New initial parameters and environmental parameters are input into the trained model to generate the freeze-thaw damage variables that need to be predicted.

2. The method for predicting rock freeze-thaw damage based on deep learning and physical constraints according to claim 1 is characterized by: In step A, the rock sample is 100 mm in height and 50 mm in diameter; initial indicators include structural surface inclination, dry density, natural density, saturated density, porosity, uniaxial compressive strength, peak strain, elastic modulus, and longitudinal wave velocity; environmental parameters include saturation, freezing temperature, freezing time, melting temperature, melting time, confining pressure, pH value of water, and loading rate; freeze-thaw damage indicators include compressive strength after freeze-thaw, peak strain after freeze-thaw, elastic modulus after freeze-thaw, longitudinal wave velocity after freeze-thaw, porosity after freeze-thaw, and mass change rate after freeze-thaw.

3. The method for predicting rock freeze-thaw damage based on deep learning and physical constraints according to claim 1 is characterized in that: Step B, the standardization process uses the following formula: , in, X s is the normalized eigenvalue, X is the original eigenvalue, μ is the mean of the feature, σ is the standard deviation of the feature.

4. The method for predicting rock freeze-thaw damage based on deep learning and physical constraints according to claim 1 is characterized by: In step C, each neuron of the fully connected neural network is connected to all neurons in the previous layer, which can capture complex nonlinear relationships and can adapt to less than 300 data items with the assistance of dynamic physical constraints. The specific formula is: , in, z (l) It is l The linear transformation result of the layer, W (l) It is l The weight matrix of the layer, a (l-1) It is l -1 layer activation output, b (l) It is l The bias vector of the layer.

5. The method for predicting rock freeze-thaw damage based on deep learning and physical constraints according to claim 1 is characterized by: In step C, when the number of samples is greater than 300 and less than 1000, a lightweight Transformer model is used with an encoder layer of <2. When the number of samples is greater than 1000, a regular Transformer model can be used. The input embedding layer of the Transformer model maps the input features to a high-dimensional vector space, making it easier for the model to learn the relationship between features. The formula is: , in, X embed is the concatenated feature matrix, X is the original input feature matrix, W embed is the embedding weight matrix, b embed is bias; Transformer has no sequence perception ability, and adds position encoding to retain the position information between features. The formula is: , in, PE ( pos, 2 i )and PE ( pos, 2 i+ 1) is the position encoding vector, POS Indicates the feature location, i represents the position encoding dimension index, d model represents the embedding vector dimension; The Transformer encoder consists of a multi-head self-attention layer and a positional feed-forward network, both with residual connections and layer normalization; Multi-head attention mechanism formula: , in: , in: , in, MultiHead is the attention mechanism, Q, K, V are the input Query, Key and Value matrices respectively, head i For the i The output of an attention head, W i Q ,W i K ,W i V ,W O are training parameters, Attention is the attention mechanism function, QK T is the product of Q and the transpose of K, d k is the dimension of the Key; Position feedforward network FFN formula: , in, W 1, W 2 and b 1, b 2 is a trainable parameter; The features encoded by Transformer are output through the fully connected layer to obtain the final predicted damage indicators.

6. The method for predicting rock freeze-thaw damage based on deep learning and physical constraints according to claim 1 is characterized by: Step C, the mean square error metric is: , in, is the basic data fitting error term, N is the total number of samples, It is i The true value of the sample, is the corresponding model prediction value; The structure of the total loss function can be abstracted as a weighted sum of the following forms: , in, is the total error term, It is i Physical constraint loss, It is i The weight parameter of the physical constraint, K is the total number of physical constraints currently introduced; The formula for the ReLU activation function is: , in, ReLU is the activation function, when the input x When the input is less than 0, the output is 0. x When it is greater than or equal to 0, the output is x .

7. The method for predicting rock freeze-thaw damage based on deep learning and physical constraints according to claim 1 is characterized by: Step C: The Adam optimizer uses the first-order momentum and second-order momentum to dynamically adjust the learning rate. First, compute the exponentially weighted moving average of the gradients: , in, m t is the first moment estimate of the gradient, g t is the current gradient, β 1 is the momentum parameter; Then, we compute the exponentially weighted moving average of the squared gradients: , in, v t is the second moment estimate of the gradient, β 2 is the momentum parameter; The first-order and second-order moment estimates are then bias-corrected: , Finally, update the parameters: , in, θ t is the current parameter, α is the learning rate, ε is a small constant that prevents division by zero.

8. The method for predicting rock freeze-thaw damage based on deep learning and physical constraints according to claim 1 is characterized by: In step E, a phased physical weight adjustment mechanism is designed to achieve a dynamic trade-off between the guidance of physical laws and data fitting capabilities during the neural network training process. It is divided into three stages: initial strong constraints, mid-term weight decay, and late adaptive optimization. Through high physical constraint weights, the model quickly converges to the physical constraints constructed in step D. Then, the physical constraint weights are reduced to enable the model to automatically capture available information not involved in the physical formulas. Finally, the physical constraint weight restrictions are lifted, allowing the model to automatically remove unreasonable physical constraints.

Citation Information

Patent Citations

  • Electromagnetic response prediction method of metasurface atomic structure based on physical constraint

    CN114282429A

  • Material complex fatigue life machine learning prediction method based on simple test data

    CN119047348A