Tunnel heat exchange real-time prediction method and system based on physical guidance machine learning

CN122595822APending Publication Date: 2026-08-18CHONGQING COLLEGE OF ELECTRONICS ENG +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610761416.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-29
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0004]上述现有技术在实际应用中存在明显技术缺陷,数值模拟方法需要精确的围岩实时温度场和湿度场作为初始条件,该类参数在工程运行阶段难以通过传感器实时、全面获取,初始条件与实际情况的偏差会导致预测误差随时间快速累积,在线计算精度无法保障,难以支撑实时调控决策;传统数据驱动方法无法适配进风隧洞换热强非线性、长时序依赖和多变量耦合的特点,传统机器学习模型难以捕捉数据长期依赖关系,单步滚动预测的LSTM模型在多步预测场景下易产生严重误差累积,预测结果会随步长增加迅速失真,稳定性和准确性不足

Benefits of technology

[0016]采用上述技术方案的发明,具有如下优点:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122595822A_ABST
    Figure CN122595822A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of underground engineering ventilation and heat and humidity environment control, and discloses a tunnel heat exchange real-time prediction method and system based on physical guidance machine learning, comprising: obtaining standardized simulation data related to tunnel heat exchange and target tunnel measured data and preprocessing to obtain first time series data; based on air enthalpy and annual cycle, day cycle time characteristics, the first time series data is subjected to physical enhancement feature construction to obtain model input features including encoder input features and decoder input features; an LSTM-Seq2Seq-Attention prediction model is constructed, and a two-stage training strategy of simulation data pre-training and target tunnel measured data fine-tuning is used to train the prediction model; the trained prediction model is used to output tunnel outlet temperature and humidity prediction results at multiple future time points at one time; according to the comparison result of the prediction result and the same period measured data, effective measured samples are screened to obtain a model update data set, and the prediction model is periodically fine-tuned and dynamically updated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of ventilation and thermal and humidity environment control technology in underground engineering, specifically to a method and system for real-time prediction of tunnel heat exchange based on physics-guided machine learning. Background Technology

[0002] The air intake tunnels of large underground projects such as large underground hydropower stations, mines, and subways have significant energy-saving potential in the heat exchange process between the surrounding rock and the air. In order to realize the active utilization and coordinated control of this heat exchange process, it is necessary to predict the air temperature and humidity at the tunnel outlet in real time and accurately.

[0003] Currently, the engineering community mainly adopts two types of technical solutions for predicting heat exchange in air intake tunnels. One type is the numerical simulation method based on the thermo-humidity coupling physical model, which uses the finite volume method, finite element method, etc. to solve the partial differential equation system to predict the heat exchange process. The other type is the traditional data-driven method, which uses machine learning models such as XGBoost, random forest, and traditional LSTM to predict temperature and humidity by regression analysis with historical monitoring data as input.

[0004] The aforementioned existing technologies have significant technical defects in practical applications. Numerical simulation methods require accurate real-time temperature and humidity fields of the surrounding rock as initial conditions. Such parameters are difficult to obtain in real time and comprehensively through sensors during the engineering operation phase. Deviations between the initial conditions and the actual situation will cause prediction errors to accumulate rapidly over time, making it difficult to guarantee the accuracy of online calculations and support real-time control decisions. Traditional data-driven methods cannot adapt to the characteristics of strong nonlinearity, long-term time dependence, and multivariate coupling in the heat exchange of air intake tunnels. Traditional machine learning models are difficult to capture long-term data dependencies. LSTM models with single-step rolling prediction are prone to serious error accumulation in multi-step prediction scenarios, and the prediction results will become distorted rapidly with the increase of the step size, resulting in insufficient stability and accuracy. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention proposes a real-time prediction method and system for tunnel heat exchange based on physics-guided machine learning, which is used to solve the aforementioned technical problems.

[0006] Firstly, a real-time prediction method for tunnel heat transfer based on physics-guided machine learning is provided, including: Acquire standardized simulation data related to heat exchange in the air intake tunnel and measured data of the target tunnel, and preprocess the standardized simulation data and measured data of the target tunnel to obtain first time series data containing historical time period samples and future time period samples; Based on the air enthalpy value and the annual and daily time characteristics, physical enhancement features are constructed on the first time series data to obtain model input features including encoder input features and decoder input features; An LSTM-Seq2Seq-Attention prediction model, comprising an LSTM encoder, an LSTM decoder, an attention mechanism, and a parallel fully connected output layer, is constructed. The prediction model is trained using a two-stage training strategy of pre-training with standardized simulated data and fine-tuning with measured data from the target tunnel, resulting in a fully trained prediction model. Using the trained prediction model, a one-time multi-step real-time prediction is performed based on the latest historical measured data and future predicted data to obtain the predicted temperature and humidity at the tunnel exit. Based on the comparison between the predicted temperature and humidity at the tunnel exit and the measured data from the same period, valid measured samples are selected to obtain the model update dataset. The trained prediction model is periodically fine-tuned and dynamically updated using the model update dataset to obtain an updated prediction model with stable accuracy.

[0007] Furthermore, the standardized simulation data and the measured data of the target tunnel are preprocessed to obtain first time-series data containing historical period samples and future period samples, including: The simulated data related to heat exchange in the air intake tunnel and the measured data of the target tunnel were imputed for missing values ​​and outliers were removed to obtain cleaned data. The cleaned data is segmented using the sliding window method to obtain sample pairs corresponding to historical time periods and future time periods; The different types of continuous features in the sample pairs are standardized to obtain the first time series data.

[0008] Furthermore, based on the air enthalpy, annual cycle, and daily cycle time characteristics, physical enhancement features are constructed on the first time-series data to obtain model input features including encoder input features and decoder input features, including: The air enthalpy is calculated based on the air temperature, relative humidity, and atmospheric pressure in the first time series data to obtain the enthalpy characteristics; The timestamps in the first time series data are converted into sine and cosine values ​​of the annual and daily cycles to obtain the time cycle characteristics; The basic features, enthalpy features, and time period features are assembled to obtain the encoder input features and decoder input features, which are then used as the model input features.

[0009] Furthermore, an LSTM-Seq2Seq-Attention prediction model, comprising an LSTM encoder, an LSTM decoder, an attention mechanism, and a parallel fully connected output layer, is constructed. This prediction model is trained using a two-stage training strategy: pre-training with standardized simulated data and fine-tuning with measured data from the target tunnel. The resulting trained prediction model includes: An encoder based on an LSTM network is constructed to encode historical time-series data, thereby obtaining the encoder's hidden state sequence. Construct a decoder based on an LSTM network, using the encoder's final state as the initial state, to decode future input sequences and obtain the decoder's hidden state sequence; An attention mechanism is introduced to process the encoder's hidden state sequence and the decoder's hidden state sequence to obtain a context vector; A parallel fully connected output layer is constructed to process the context vector and decoder output to obtain the initial prediction model; The initial prediction model was pre-trained using a standardized air intake tunnel heat exchange simulation dataset to obtain a pre-trained model. Load the pre-trained weights and fine-tune the pre-trained model using the actual target tunnel dataset to obtain the trained prediction model.

[0010] Furthermore, using the trained prediction model, a one-time multi-step real-time prediction is performed based on the latest historical measured data and future predicted data to obtain the tunnel exit temperature and humidity prediction results, including: The system acquires the latest historical measured data and future time-forward predicted data at the current moment to generate real-time input data. The real-time input data is preprocessed and physical enhancement features are constructed to obtain real-time model input features; The real-time model input features are fed into the trained prediction model, which outputs predicted values ​​of tunnel exit air temperature and relative humidity for multiple future times at once, thus obtaining the tunnel exit temperature and humidity prediction results.

[0011] Furthermore, based on the comparison between the predicted temperature and humidity at the tunnel exit and the measured data from the same period, valid measured samples are selected to obtain the model update dataset, including: Error calculations are performed on the predicted temperature and humidity at the tunnel exit and the measured data at the corresponding time to obtain an error dataset, and the measured samples corresponding to each error data are determined. Outlier removal is performed on the error dataset to remove abnormal samples whose errors exceed the normal range, resulting in a subset of valid measured samples. The effective measured sample subset is divided according to a preset time window to obtain updated historical-future sample pairs; The update is constructed using historical-future sample pairs to generate physical enhancement features, and the corresponding measured outlet temperature and humidity labels are retained to obtain the model update dataset.

[0012] Furthermore, the trained prediction model is periodically fine-tuned and dynamically updated using the model update dataset to obtain an updated prediction model with stable accuracy, including: The model update dataset is preprocessed and physically enhanced to construct features, resulting in the model input features for the update. During the update cycle, the trained prediction model is used to perform rolling predictions on the input features of the update model to obtain the tunnel exit temperature and humidity prediction results for the current update cycle. When the accumulated model update dataset meets the preset update conditions, the trained prediction model is periodically fine-tuned to obtain an updated prediction model with stable accuracy.

[0013] Secondly, a real-time prediction system for tunnel heat transfer based on physics-guided machine learning is provided, which is based on the real-time prediction method for tunnel heat transfer based on physics-guided machine learning described in any of the preceding paragraphs, including: The preprocessing module is configured to acquire standardized simulation data related to heat exchange in the air intake tunnel and measured data of the target tunnel, and to preprocess the standardized simulation data and measured data of the target tunnel to obtain first time series data containing historical time period samples and future time period samples. The enhanced feature construction module is configured to perform physical enhanced feature construction on the first time series data based on the air enthalpy value and the annual and daily cycle time features, to obtain model input features including encoder input features and decoder input features; The training module is configured to construct an LSTM-Seq2Seq-Attention prediction model that includes an LSTM encoder, an LSTM decoder, an attention mechanism, and a parallel fully connected output layer. The prediction model is trained using a two-stage training strategy of pre-training with standardized simulated data and fine-tuning with measured data from the target tunnel, resulting in a trained prediction model. The prediction module is configured to use the trained prediction model to perform a one-time multi-step real-time prediction based on the latest historical time period measured data and future time period prediction data to obtain the temperature and humidity prediction results of the tunnel exit. The comparison module is configured to filter valid measured samples based on the comparison results between the predicted temperature and humidity at the tunnel exit and the measured data at the same time, and obtain the model update dataset. The dynamic update module is configured to periodically fine-tune and dynamically update the trained prediction model using the model update dataset to obtain an updated prediction model with stable accuracy.

[0014] Thirdly, a terminal is provided, characterized in that it includes a processor, an input device, an output device, and a memory, the processor, the input device, the output device, and the memory being interconnected, wherein the memory is used to store a computer program, the computer program including program instructions, and the processor is configured to invoke the program instructions to execute the real-time prediction method for tunnel heat exchange based on physical guided machine learning as described in any of the preceding claims.

[0015] Fourthly, a computer-readable storage medium is provided, characterized in that the computer-readable storage medium stores a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform the real-time prediction method for tunnel heat exchange based on physical-guided machine learning as described in any of the preceding claims.

[0016] The invention employing the above technical solution has the following advantages: 1. This invention addresses the problems of existing numerical simulation methods relying on unobtainable real-time temperature and humidity field parameters of the surrounding rock, rapid accumulation of prediction errors over time, and the difficulty of capturing long-term time-series dependencies and the tendency for iterative error distortion in multi-step predictions by integrating prior physical knowledge and deep learning technology. On the test set, it can achieve a prediction accuracy of 0.10℃ for average absolute temperature, 0.02 for average absolute normalized relative humidity, and 0.85 for coefficient of determination. In the actual dynamic prediction of the intake tunnel of a hydropower station over 77 days, the average absolute error of the outlet temperature was controlled within 0.45℃ and the average absolute error of humidity was controlled within 2.4%, thus avoiding the error accumulation problem of single-step rolling prediction in principle. Meanwhile, a two-stage training strategy of "simulated data pre-training + measured data fine-tuning" is adopted. The model deployment can be completed with only more than 8 days of easily measurable field data of the target tunnel. There is no need to obtain the thermal properties of the surrounding rock and real-time temperature and humidity field parameters, which reduces the modeling threshold and data acquisition cost of industrial scenarios.

[0017] 2. By introducing physical enhancement features such as enthalpy and time period sine and cosine, the model prediction results conform to the basic laws of thermodynamics. The error between the predicted and measured values ​​of the 24-hour temperature wave attenuation rate is only 4.5%. Moreover, the attention mechanism can intuitively show the model's attention weight for key historical periods, which has good interpretability and can provide reliable real-time data support for the active utilization of heat exchange process in underground engineering air intake tunnels and energy-saving control of ventilation systems. Attached Figure Description

[0018] To more clearly illustrate the specific embodiments of the present invention, the accompanying drawings used in the specific embodiments will be briefly described below. In all the drawings, the elements or parts are not necessarily drawn to scale.

[0019] Figure 1 This is a framework diagram of the real-time prediction method for tunnel heat exchange based on physics-guided machine learning, as described in this invention. Figure 2 This is a flowchart of data acquisition and preprocessing in the real-time prediction method for tunnel heat exchange based on physics-guided machine learning in this invention. Figure 3 This is a schematic diagram of the test section and measuring points in the real-time prediction method for tunnel heat transfer based on physics-guided machine learning of the present invention. Figure 4 This is a flowchart of the model construction and training process in the real-time prediction method for tunnel heat exchange based on physics-guided machine learning in this invention. Figure 5 This is a diagram of the LSTM-Seq2Seq-Attention model for predicting tunnel heat exchange in the real-time prediction method for tunnel heat exchange based on physics-guided machine learning in this invention. Figure 6 This is a schematic diagram of wind speed testing and air temperature and humidity testing in the real-time prediction method for tunnel heat exchange based on physics-guided machine learning of the present invention. Figure 7 This is a comparison chart of the test set prediction and actual measurement results in the real-time prediction method for tunnel heat exchange based on physics-guided machine learning of this invention. Figure 8 This is an attention heatmap at different time steps in the real-time prediction method for tunnel heat exchange based on physics-guided machine learning in this invention. Figure 9 This is a flowchart of the real-time prediction method for tunnel heat exchange based on physics-guided machine learning according to the present invention. Figure 10 This is a flowchart of the real-time prediction system for tunnel heat exchange based on physics-guided machine learning, as described in this invention. Detailed Implementation

[0020] The embodiments of the technical solution of the present invention will now be described in detail with reference to the accompanying drawings. These embodiments are merely illustrative of the technical solution of the present invention and are therefore intended to limit the scope of protection of the present invention.

[0021] like Figures 1-10 As shown, the real-time prediction method for tunnel heat transfer based on physics-guided machine learning of the present invention includes: Step S01: Obtain standardized simulation data and measured data of the target tunnel related to heat exchange in the air intake tunnel, and preprocess the standardized simulation data and measured data of the target tunnel to obtain the first time series data containing historical time period samples and future time period samples. Step S02: Based on the air enthalpy value and the annual and daily cycle time characteristics, physical enhancement features are constructed on the first time series data to obtain model input features including encoder input features and decoder input features; Step S03: Construct an LSTM-Seq2Seq-Attention prediction model that includes an LSTM encoder, an LSTM decoder, an attention mechanism, and a parallel fully connected output layer. Train the prediction model using a two-stage training strategy of pre-training with standardized simulated data and fine-tuning with measured data from the target tunnel to obtain the trained prediction model. Step S04: Using the trained prediction model, perform a one-time multi-step real-time prediction based on the latest historical measured data and future predicted data to obtain the predicted temperature and humidity at the tunnel exit. Step S05: Based on the comparison between the predicted temperature and humidity at the tunnel exit and the measured data from the same period, select valid measured samples to obtain the model update dataset; Step S06: Use the model update dataset to periodically fine-tune and dynamically update the trained prediction model to obtain an updated prediction model with stable accuracy.

[0022] In some embodiments, standardized simulation data and measured data of the target tunnel are preprocessed to obtain first time-series data containing historical period samples and future period samples, including: Missing values ​​were imputed and outliers were removed from the simulated data related to heat exchange in the air intake tunnel and the measured data of the target tunnel to obtain cleaned data. The sliding window method was used to segment the cleaned data to obtain sample pairs corresponding to historical time periods and future time periods; The different types of continuous features in the sample pairs are standardized to obtain the first time series data.

[0023] Specifically, missing values ​​were imputed and outliers were removed from the simulated data related to heat exchange in the air intake tunnel and the measured data of the target tunnel to obtain cleaned data.

[0024] The dataset utilizes a previously constructed standardized heat exchange simulation dataset for intake tunnels, which features rich parameters, long time series data, and physical consistency. This dataset is based on 16 typical large-scale underground engineering intake tunnels (latitude 19.0°~42.4°N, wind speed 0.17~7.48m / s) and is generated using a physical model (temperature MAE<1℃, humidity MAE≈5%) validated by year-round measured data. It contains 154 sets of hourly data for 8760 hours, covering the complete heat exchange mechanism of "day-night filtering-seasonal heat storage". The data fields include static parameters such as tunnel length and perimeter, as well as dynamic parameters such as hourly temperature, humidity, wind speed, and enthalpy.

[0025] Data Acquisition: Temperature and humidity recorders (such as Testo174H, accuracy ±0.5℃, ±3%RH) and anemometers (such as Tianjian Huayi WZY-1, accuracy 0.05m / s) are installed at the entrance, exit and middle section of the target air intake tunnel. Air temperature, humidity, wind speed and atmospheric pressure data are continuously collected for no less than 8 days at sampling intervals of no more than 1 hour, which are used as the measured dataset for micro-call.

[0026] Cleaning operations: Linear interpolation is used to impute missing values ​​in time series data, and the 3σ criterion is used to remove outliers that exceed the normal fluctuation range to ensure the continuity and validity of the data.

[0027] The cleaned data was segmented using a sliding window method to obtain sample pairs corresponding to historical and future time periods. The encoder window length 'a' (typically 36 hours) and the decoder window length 'b' (typically 8 hours) were set to divide the continuous time series data into multiple sample pairs of "past a hours → future b hours". Each sample pair contains all feature data of the historical time period and the outlet temperature and humidity label data of the corresponding future time period.

[0028] Different types of continuous features in the sample pairs were standardized to obtain the first time series data. Specifically, the relative humidity feature was standardized to the [0,1] interval using MinMaxScaler to match the output range of the Sigmoid activation function in the subsequent output layer; other continuous features such as temperature, wind speed, and enthalpy were standardized to a mean of 0 and a variance of 1 using StandardScaler to eliminate the influence of differences in the dimensions of different features on model training.

[0029] In some embodiments, physical enhancement features are constructed from the first time-series data based on the air enthalpy, annual cycle, and daily cycle time characteristics to obtain model input features including encoder input features and decoder input features, including: The air enthalpy is calculated based on the air temperature, relative humidity, and atmospheric pressure in the first time series data, and the enthalpy characteristics are obtained. The timestamps in the first time series data are converted into sine and cosine values ​​of the annual and daily cycles to obtain the time cycle characteristics; The basic features, enthalpy features, and time period features are assembled to obtain the encoder input features and decoder input features, which are then used as the model input features.

[0030] Specifically, enthalpy characteristic calculation: Based on the air temperature, relative humidity, and local atmospheric pressure in the first time series data, the air enthalpy (kJ / kg) at the inlet and outlet is calculated to obtain the enthalpy characteristic. Air enthalpy can uniformly characterize the sensible heat and latent heat of air, helping the model to more accurately understand the total heat exchange process between the tunnel surrounding rock and the air, avoiding the problem that temperature and humidity alone cannot fully reflect the heat transfer intensity.

[0031] The timestamps in the first time series data are converted into sine and cosine values ​​of the annual and daily cycles to obtain the time cycle characteristics. The specific calculation formula is as follows: sin_day=sin(2π*day_of_year / 365) cos_day=cos(2π*day_of_year / 365) sin_hour=sin(2π*hour_of_day / 24) cos_hour=cos(2π*hour_of_day / 24) The aforementioned features provide the model with explicit physical priors for "daily cycle" and "annual cycle," enabling it to more effectively learn the thermal inertia effect of the surrounding rock and accurately capture the periodic variation of the heat transfer process.

[0032] The basic features (tunnel static parameters, hourly wind speed, inlet temperature and humidity, outlet temperature and humidity), enthalpy features, and time period features are assembled to obtain encoder input features and decoder input features, which are then used as model input features: Encoder input (corresponding to the past a time points): a total of 13 features, including two static parameters (tunnel length and perimeter), seven dynamic parameters (hourly wind speed, inlet temperature, inlet relative humidity, inlet enthalpy, outlet temperature, outlet relative humidity, and outlet enthalpy), and four time period features (sin_day, cos_day, sin_hour, and cos_hour).

[0033] Decoder input (corresponding to b future moments): a total of 8 features, including four predictable dynamic parameters: future hourly wind speed (set according to ventilation plan or weather forecast), future inlet temperature, future inlet relative humidity, and future inlet enthalpy, as well as four future time period features.

[0034] In some embodiments, an LSTM-Seq2Seq-Attention prediction model is constructed, comprising an LSTM encoder, an LSTM decoder, an attention mechanism, and a parallel fully connected output layer. The prediction model is trained using a two-stage training strategy: pre-training with standardized simulated data and fine-tuning with measured data from the target tunnel. The resulting trained prediction model includes: An encoder based on an LSTM network is constructed to encode historical time-series data, thereby obtaining the encoder's hidden state sequence. Construct a decoder based on an LSTM network, using the encoder's final state as the initial state, to decode future input sequences and obtain the decoder's hidden state sequence; An attention mechanism is introduced to process the encoder's hidden state sequence and the decoder's hidden state sequence to obtain a context vector; A parallel fully connected output layer is constructed to process the context vector and decoder output to obtain the initial prediction model; The initial prediction model was pre-trained using a standardized air intake tunnel heat exchange simulation dataset to obtain the pre-trained model. Load the pre-trained weights and fine-tune the pre-trained model using the actual target tunnel dataset to obtain the trained prediction model.

[0035] Specifically, an encoder based on an LSTM network is constructed to encode historical time-series data, obtaining the encoder's hidden state sequence. The encoder uses a single-layer or multi-layer LSTM network with an input dimension of 13 and 64 hidden units. The encoder sequentially reads the input sequence Xenc = [x1, x2, ..., xa] from the past 'a' time steps, outputting the final hidden state [ha, ca] and the complete hidden state sequence H = [h1, h2, ..., ha], compressing the historical time-series information into a context vector.

[0036] A decoder based on an LSTM network is constructed. Using the encoder's final state as the initial state, it decodes future input sequences to obtain the decoder's hidden state sequence. The decoder uses an LSTM network with the same number of layers as the encoder, an input dimension of 8, and 64 hidden units. The decoder uses the encoder's final state [ha, ca] as its initial state and successively processes the input sequence Y = [y1, y2, ..., y] at the next b time steps. b Generate the decoder hidden state sequence S = [s1, s2, ..., s]. b The Seq2Seq architecture can generate prediction results for multiple future time steps at once, which in principle avoids the problem of iterative error accumulation in traditional single-step rolling prediction.

[0037] An attention mechanism is introduced to process the encoder and decoder hidden state sequences to obtain a context vector. Using the decoder hidden state sequence S as the query and the encoder hidden state sequence H as the key and value, an attention weight matrix is ​​calculated and weighted, summing the results over the encoder hidden states to obtain the context vector. This mechanism enables the model to adaptively focus on the most critical segments of historical data for the current prediction (such as the most recent moment or the same period of the previous day), improving the accuracy and interpretability of the prediction.

[0038] A parallel fully connected output layer is constructed to process the context vector and decoder output to obtain the initial prediction model. The context vector and decoder output are concatenated and then input into two parallel fully connected layers, used for regressing temperature and relative humidity, respectively. The temperature output layer uses a linear activation function to match the continuous numerical characteristics of temperature; the relative humidity output layer uses a sigmoid activation function to restrict the output to the [0,1] interval, consistent with the physical range of humidity. Finally, the predicted sequence Y for the next b time steps is output. pred = [(T1, RH1), (T2, RH2), ..., (T b RH b )).

[0039] The initial prediction model was pre-trained using a standardized simulated air intake tunnel heat transfer dataset, resulting in a pre-trained model. The weighted mean squared error (MSE) was used as the loss function (temperature and humidity each weighted at 1.0), and the Adam optimizer (initial learning rate 1e-4) was employed. Dropout (0.3) and L2 regularization (0.01) were set in the LSTM layer to prevent overfitting. Training parameters were set as follows: batchsize=32, maximum epochs=200, and early termination tolerance=10. Training was terminated early when the validation set loss no longer decreased for 10 consecutive epochs. This step enabled the model to learn the general physical laws of tunnel heat transfer across seasons and operating conditions.

[0040] The pre-trained weights are loaded, and the pre-trained model is fine-tuned using the target tunnel's measured dataset to obtain the trained prediction model. A smaller learning rate (1e-5) is used for a small number of training epochs, with training parameters set as follows: batchsize=16, epoch=50, and early stop patience value=5. This step enables the model to quickly adapt to the surrounding rock thermal properties, climatic conditions, and operation and maintenance mode of the specific project, requiring only 8 days or more of field measured data to complete the adaptation.

[0041] In some embodiments, a trained prediction model is used to perform a one-time multi-step real-time prediction based on the latest historical measured data and future predicted data to obtain the predicted temperature and humidity at the tunnel exit, including: The system acquires the latest historical measured data and future time-forward predicted data at the current moment to generate real-time input data. Real-time input data is preprocessed and physically enhanced features are constructed to obtain real-time model input features; The real-time model input features are fed into the trained prediction model, which outputs the predicted values ​​of air temperature and relative humidity at the tunnel exit for multiple future times at once, thus obtaining the predicted temperature and humidity results at the tunnel exit.

[0042] Specifically, at the current time t, acquire the latest measured data from the a historical times (including wind speed, temperature, humidity, and atmospheric pressure at the tunnel entrance, exit, and middle section), as well as the predicted data for the next b times (including entrance temperature and humidity obtained from weather forecasts and planned wind speed obtained from ventilation plans).

[0043] The real-time input data is preprocessed using the methods described above, and then physical enhancement features are constructed using the methods described above to obtain the real-time encoder input features and the real-time decoder input features, which are the real-time model input features.

[0044] The real-time model input features are fed into the trained LSA prediction model. The model encodes historical information through an encoder, decodes it by combining future inputs and an attention mechanism, and outputs the predicted values ​​of air temperature and relative humidity at the tunnel exit at b future time points at once, thus obtaining the temperature and humidity prediction results at the tunnel exit.

[0045] In some embodiments, valid measured samples are selected based on the comparison between the predicted temperature and humidity at the tunnel exit and the measured data from the same period to obtain the model update dataset, including: Error calculations were performed on the predicted temperature and humidity at the tunnel exit and the corresponding measured data to obtain an error dataset, and the measured samples corresponding to each error data were determined. Outlier removal is performed on the error dataset to remove abnormal samples whose errors exceed the normal range, thus obtaining a subset of valid measured samples. The effective measured sample subset is divided according to a preset time window to obtain updated historical-future sample pairs; Physical enhancement features are constructed using historical-future sample pairs for the update, and the corresponding measured outlet temperature and humidity labels are retained to obtain the model update dataset.

[0046] Specifically, the error is calculated between the predicted temperature and humidity at the tunnel exit and the measured data at the corresponding time to obtain an error dataset. Each error data is then associated with the historical input data, future input data, and measured temperature and humidity labels at the corresponding time.

[0047] Outlier removal is performed on the error dataset. The 3σ criterion is used to remove abnormal samples whose errors exceed the normal range, while retaining a subset of valid measured samples to avoid abnormal data interfering with the model update effect.

[0048] The effective measured sample subset is divided according to a preset time window (consistent with the training phase, i.e., encoder window a hours and decoder window b hours) to obtain updated historical-future sample pairs.

[0049] The updated historical-future sample pairs are used to construct physical enhancement features using the method described above, and the corresponding measured outlet temperature and humidity labels are retained to obtain the model update dataset.

[0050] In some embodiments, the trained prediction model is periodically fine-tuned and dynamically updated using a model update dataset to obtain an updated prediction model with stable accuracy, including: The model update dataset is preprocessed and physically augmented features are constructed to obtain the model input features for the update. Within the update cycle, the trained prediction model is used to perform rolling predictions on the input features of the update model to obtain the tunnel exit temperature and humidity prediction results for the current update cycle. When the accumulated model update dataset meets the preset update conditions, the trained prediction model is fine-tuned periodically to obtain an updated prediction model with stable accuracy.

[0051] Specifically, in each update cycle, newly added valid samples are incorporated into the model update dataset, and updated model input features are generated according to the same standardized parameters and physical enhancement feature construction method as in the training phase.

[0052] Rolling prediction: The current prediction model is used to perform a one-time multi-step prediction on the input features of the updated model to obtain the predicted temperature and humidity of the outlet for the current period, and the prediction results are continuously compared with the subsequent measured values.

[0053] Periodic fine-tuning: When the accumulated samples reach a preset number or a preset time interval, the current prediction model is fine-tuned with a small learning rate, and the model weights are updated.

[0054] Accuracy Preservation: After fine-tuning, real-time prediction and error monitoring continue to be performed to adapt the model to the target tunnel's operating conditions, seasonal changes, and sensor data drift, resulting in an updated prediction model with stable accuracy.

[0055] This invention offers high prediction accuracy and effectively avoids error accumulation: it employs a Seq2Seq architecture to output multi-step prediction results at once, fundamentally solving the error accumulation problem in multi-step prediction using traditional methods.

[0056] A comparison of predicted and measured values ​​at typical moments in typical cases is attached. Figure 7 As shown. The model's prediction accuracy on the test set is: mean absolute error of temperature (MAE) = 0.10℃, normalized relative humidity (MAE) = 0.02, and coefficient of determination R0. 2 =0.85.

[0057] Feature ablation test results: In this embodiment, a feature ablation test was designed and conducted to analyze the importance of each feature. The test involved removing enthalpy, time period, air parameters at the tunnel entrance (0m), tunnel size, etc., one by one from the input features, and testing and recording the model's prediction performance on the test set. The results are shown in Table 1. Under the complete feature combination (enthalpy, time period, tunnel entrance climate parameters, tunnel size, wind speed), the model achieved the highest prediction accuracy (R0). 2 = 0.85). When the tunnel entrance climate parameter is removed, R 2 A sharp drop to 0.40 significantly increased the errors in temperature and humidity, indicating that climatic conditions at the tunnel entrance are crucial for predicting the environment inside the tunnel. Removing wind speed also significantly affected the results: R 2 When the value drops to 0.60, the MAE and MSE of temperature increase significantly, indicating that wind speed plays a crucial role in heat and moisture exchange within the tunnel. In contrast, removing enthalpy or tunnel size has a smaller impact on overall prediction accuracy, but the MSE of temperature increases significantly, suggesting that enthalpy and tunnel size also provide important information in terms of thermodynamics and spatial constraints. After removing the time periodic feature, R... 2 As the relative humidity (MAE) decreased to 0.75, the MAE increased from 0.02 to 0.03, leading to a decline in humidity prediction accuracy. Overall, to obtain more stable and accurate temperature and humidity predictions, engineering practice should retain all features—enthalpy, time period parameters, meteorological parameters, dimensions, and wind speed—to fully utilize their synergistic effects. In this case, the impact of each feature on prediction accuracy, ranked from largest to smallest, is: meteorological parameters, wind speed, time period, enthalpy, and dimensions.

[0058] Table 1. Results of Characteristic Ablation Tests In a case study of the intake tunnel of a hydropower station, the model controlled the mean absolute error (MAE) of the outlet temperature within 0.45℃ and the MAE of humidity within 2.4% during a 77-day dynamic prediction period, and the prediction accuracy met the actual requirements of the project.

[0059] This invention significantly reduces the cost of industrial scenario modeling: by using a strategy of "pre-training with simulated data + fine-tuning with a small amount of measured data", model training and application can be completed with only about 9 days of on-site measured data. This avoids the dependence of traditional numerical simulation on the hard-to-obtain real-time temperature and humidity field of the surrounding rock, and also overcomes the bottleneck of pure data-driven models requiring massive amounts of historical data, significantly reducing the threshold and cost of technology application.

[0060] This invention exhibits strong physical consistency and good model interpretability: by incorporating physical priors such as enthalpy and time periodic characteristics, the model's predictions conform to fundamental thermodynamic laws. Attention heatmap analysis shows that the model can automatically focus on key historical moments of the "last 10 hours" and "the same period of the previous day," accurately capturing the diurnal thermal inertia effect of the surrounding rock. (Attention heatmap attached) Figure 8 This supports the above conclusions. Frequency domain analysis further confirms that the model's prediction of the 24-hour temperature wave attenuation rate has an error of only 4.5% compared with the measured value, demonstrating the model's accurate characterization of the physical mechanism.

[0061] The high-precision real-time prediction results provided by this invention are a prerequisite for implementing the "prediction-based ventilation control strategy". They can effectively guide the tunnel ventilation system to adopt differentiated wind speeds at different times, thereby transferring part of the air conditioning load to the tunnel and achieving significant energy-saving effects.

[0062] In other instances, a real-time prediction system for tunnel heat transfer based on physics-guided machine learning is provided, including any of the physics-guided machine learning-based real-time prediction methods for tunnel heat transfer described above: The preprocessing module is configured to acquire standardized simulation data related to heat exchange in the air intake tunnel and measured data of the target tunnel, and to preprocess the standardized simulation data and measured data of the target tunnel to obtain first time series data containing historical time period samples and future time period samples. The enhanced feature construction module is configured to perform physical enhanced feature construction on the first time series data based on the air enthalpy value and the annual and daily cycle time features, to obtain model input features including encoder input features and decoder input features; The training module is configured to build an LSTM-Seq2Seq-Attention prediction model that includes an LSTM encoder, an LSTM decoder, an attention mechanism, and a parallel fully connected output layer. The prediction model is trained using a two-stage training strategy of pre-training with standardized simulated data and fine-tuning with measured data from the target tunnel, resulting in a trained prediction model. The prediction module is configured to use a trained prediction model to perform a one-time multi-step real-time prediction based on the latest historical measured data and future predicted data to obtain the predicted temperature and humidity at the tunnel exit. The comparison module is configured to filter valid measured samples based on the comparison results between the predicted temperature and humidity at the tunnel exit and the measured data at the same time, and obtain the model update dataset. The dynamic update module is configured to periodically fine-tune and dynamically update the trained prediction model using the model update dataset, resulting in an updated prediction model with stable accuracy.

[0063] In other instances, a terminal is provided, characterized in that it includes a processor, an input device, an output device, and a memory, which are interconnected. The memory is used to store a computer program, which includes program instructions. The processor is configured to invoke the program instructions to execute the physical-guided machine learning-based real-time prediction method for tunnel heat exchange as described above.

[0064] In other instances, a computer-readable storage medium is provided, characterized in that the computer-readable storage medium stores a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform a physical-guided machine learning-based real-time prediction method for tunnel heat transfer as described above.

[0065] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be covered within the scope of the claims and specification of the present invention.

Claims

1. A real-time prediction method for tunnel heat transfer based on physics-guided machine learning, characterized in that, include: Acquire standardized simulation data related to heat exchange in the air intake tunnel and measured data of the target tunnel, and preprocess the standardized simulation data and measured data of the target tunnel to obtain first time series data containing historical time period samples and future time period samples; Based on the air enthalpy value and the annual and daily time characteristics, physical enhancement features are constructed on the first time series data to obtain model input features including encoder input features and decoder input features; An LSTM-Seq2Seq-Attention prediction model, comprising an LSTM encoder, an LSTM decoder, an attention mechanism, and a parallel fully connected output layer, is constructed. The prediction model is trained using a two-stage training strategy of pre-training with standardized simulated data and fine-tuning with measured data from the target tunnel, resulting in a fully trained prediction model. Using the trained prediction model, a one-time multi-step real-time prediction is performed based on the latest historical measured data and future predicted data to obtain the predicted temperature and humidity at the tunnel exit. Based on the comparison between the predicted temperature and humidity at the tunnel exit and the measured data from the same period, valid measured samples are selected to obtain the model update dataset. The trained prediction model is periodically fine-tuned and dynamically updated using the model update dataset to obtain an updated prediction model with stable accuracy.

2. The real-time prediction method for tunnel heat transfer based on physics-guided machine learning according to claim 1, characterized in that, The standardized simulation data and the measured data of the target tunnel are preprocessed to obtain the first time series data, which includes historical time period samples and future time period samples, including: The simulated data related to heat exchange in the air intake tunnel and the measured data of the target tunnel were imputed for missing values ​​and outliers were removed to obtain cleaned data. The cleaned data is segmented using the sliding window method to obtain sample pairs corresponding to historical time periods and future time periods; The different types of continuous features in the sample pairs are standardized to obtain the first time series data.

3. The real-time prediction method for tunnel heat transfer based on physics-guided machine learning according to claim 1, characterized in that, Based on the air enthalpy and annual and daily time characteristics, physical enhancement features are constructed from the first time-series data to obtain model input features including encoder input features and decoder input features, including: The air enthalpy is calculated based on the air temperature, relative humidity, and atmospheric pressure in the first time series data to obtain the enthalpy characteristics; The timestamps in the first time series data are converted into sine and cosine values ​​of the annual and daily cycles to obtain the time cycle characteristics; The basic features, enthalpy features, and time period features are assembled to obtain the encoder input features and decoder input features, which are then used as the model input features.

4. The real-time prediction method for tunnel heat transfer based on physics-guided machine learning according to claim 1, characterized in that, An LSTM-Seq2Seq-Attention prediction model, comprising an LSTM encoder, an LSTM decoder, an attention mechanism, and a parallel fully connected output layer, is constructed. This model is trained using a two-stage training strategy: pre-training with standardized simulated data and fine-tuning with measured data from the target tunnel. The resulting trained prediction model includes: An encoder based on an LSTM network is constructed to encode historical time-series data, thereby obtaining the encoder's hidden state sequence. Construct a decoder based on an LSTM network, using the encoder's final state as the initial state, to decode future input sequences and obtain the decoder's hidden state sequence; An attention mechanism is introduced to process the encoder's hidden state sequence and the decoder's hidden state sequence to obtain a context vector; A parallel fully connected output layer is constructed to process the context vector and decoder output to obtain the initial prediction model; The initial prediction model was pre-trained using a standardized air intake tunnel heat exchange simulation dataset to obtain a pre-trained model. Load the pre-trained weights and fine-tune the pre-trained model using the actual target tunnel dataset to obtain the trained prediction model.

5. The real-time prediction method for tunnel heat transfer based on physics-guided machine learning according to claim 1, characterized in that, Using the trained prediction model, a one-time multi-step real-time prediction is performed based on the latest historical measured data and future predicted data to obtain the tunnel exit temperature and humidity prediction results, including: The system acquires the latest historical measured data and future time-forward predicted data at the current moment to generate real-time input data. The real-time input data is preprocessed and physical enhancement features are constructed to obtain real-time model input features; The real-time model input features are fed into the trained prediction model, which outputs predicted values ​​of tunnel exit air temperature and relative humidity for multiple future times at once, thus obtaining the tunnel exit temperature and humidity prediction results.

6. The real-time prediction method for tunnel heat transfer based on physics-guided machine learning according to claim 1, characterized in that, Based on the comparison between the predicted temperature and humidity at the tunnel exit and the measured data from the same period, valid measured samples were selected to obtain the model update dataset, which includes: Error calculations are performed on the predicted temperature and humidity at the tunnel exit and the measured data at the corresponding time to obtain an error dataset, and the measured samples corresponding to each error data are determined. Outlier removal is performed on the error dataset to remove abnormal samples whose errors exceed the normal range, resulting in a subset of valid measured samples. The effective measured sample subset is divided according to a preset time window to obtain updated historical-future sample pairs; The update is constructed using historical-future sample pairs to generate physical enhancement features, and the corresponding measured outlet temperature and humidity labels are retained to obtain the model update dataset.

7. The real-time prediction method for tunnel heat transfer based on physics-guided machine learning according to claim 1, characterized in that, The trained prediction model is periodically fine-tuned and dynamically updated using the model update dataset to obtain an updated prediction model with stable accuracy, including: The model update dataset is preprocessed and physically enhanced to construct features, resulting in the model input features for the update. During the update cycle, the trained prediction model is used to perform rolling predictions on the input features of the update model to obtain the tunnel exit temperature and humidity prediction results for the current update cycle. When the accumulated model update dataset meets the preset update conditions, the trained prediction model is periodically fine-tuned to obtain an updated prediction model with stable accuracy.

8. A real-time prediction system for tunnel heat transfer based on physics-guided machine learning, characterized in that, The real-time prediction method for tunnel heat transfer based on physical guided machine learning according to any one of claims 1 to 7 includes: The preprocessing module is configured to acquire standardized simulation data related to heat exchange in the air intake tunnel and measured data of the target tunnel, and to preprocess the standardized simulation data and measured data of the target tunnel to obtain first time series data containing historical time period samples and future time period samples. The enhanced feature construction module is configured to perform physical enhanced feature construction on the first time series data based on the air enthalpy value and the annual and daily cycle time features, to obtain model input features including encoder input features and decoder input features; The training module is configured to construct an LSTM-Seq2Seq-Attention prediction model that includes an LSTM encoder, an LSTM decoder, an attention mechanism, and a parallel fully connected output layer. The prediction model is trained using a two-stage training strategy of pre-training with standardized simulated data and fine-tuning with measured data from the target tunnel, resulting in a trained prediction model. The prediction module is configured to use the trained prediction model to perform a one-time multi-step real-time prediction based on the latest historical time period measured data and future time period prediction data to obtain the temperature and humidity prediction results of the tunnel exit. The comparison module is configured to filter valid measured samples based on the comparison results between the predicted temperature and humidity at the tunnel exit and the measured data at the same time, and obtain the model update dataset. The dynamic update module is configured to periodically fine-tune and dynamically update the trained prediction model using the model update dataset to obtain an updated prediction model with stable accuracy.

9. A terminal, characterized in that, The system includes a processor, an input device, an output device, and a memory, which are interconnected. The memory stores a computer program, which includes program instructions. The processor is configured to invoke the program instructions to execute the real-time prediction method for tunnel heat exchange based on physical guided machine learning as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the real-time prediction method for tunnel heat exchange based on physical guided machine learning as described in any one of claims 1 to 7.