Method for measuring, calculating and predicting carbon emission of long-distance natural gas pipeline based on mixed feature screening and multi-model dynamic optimization

By employing a hybrid feature selection model and a multi-model dynamic optimization approach, the problems of inaccurate feature selection and low model training efficiency in carbon emission measurement of long-distance natural gas pipelines have been solved, achieving high-precision and high-efficiency carbon emission prediction and providing a systematic and reliable automated solution.

CN121562902APending Publication Date: 2026-02-24DALIAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511709286.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-20
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

Existing technologies for carbon emission calculation in long-distance natural gas pipelines suffer from problems such as inaccurate feature selection, difficulty in balancing model training efficiency and accuracy, and a lack of systematic multi-model optimization mechanisms, resulting in low prediction accuracy and efficiency.

Method used

By employing a hybrid feature selection model (PCCs-RF) combined with linear correlation analysis and nonlinear importance assessment, a dual-channel attention adaptive long short-term memory network (DAA-LSTM) model is constructed. Furthermore, through a dynamic peak weighted loss function and an adaptive learning rate strategy, a multi-model dynamic optimization framework is built to achieve high-precision and high-efficiency carbon emission prediction.

Benefits of technology

It significantly improves prediction accuracy and robustness, resolves the inherent contradiction between efficiency and accuracy, provides a systematic and highly robust automated prediction solution, and ensures reliability and adaptability under complex working conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121562902A_ABST
    Figure CN121562902A_ABST
Patent Text Reader

Abstract

The invention provides a method for measuring, calculating and predicting carbon emission of a long-distance natural gas pipeline based on mixed feature screening and multi-model dynamic optimization. Firstly, multi-dimensional operation parameters are quantified into a historical total carbon emission sequence based on an emission factor method. And screening key feature variables influencing the historical total carbon emission through a mixed feature screening model fusing linear correlation analysis and nonlinear importance evaluation. Then, constructing a multi-model prediction framework containing a BP neural network, a long-short-term memory network model and a dual-channel attention adaptive long-short-term memory network model; the DAA-LSTM model has a parallel dual-channel structure, and a dynamic peak weighted loss function and an adaptive learning rate strategy are adopted for optimization training. And an optimal prediction model is optimized through the comprehensive performance evaluation indexes, so that a future carbon emission prediction result of the pipeline can be obtained. According to the method, the existing technical problems are effectively solved, and the prediction accuracy, efficiency and robustness are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the interdisciplinary field of smart pipelines and artificial intelligence, and relates to a method for calculating and predicting carbon emissions from long-distance natural gas pipelines based on hybrid feature screening and multi-model dynamic optimization. Background Technology

[0002] Accurately measuring and predicting carbon emissions from fossil fuel transportation is a scientific challenge in achieving national energy conservation and emission reduction goals. Particularly noteworthy is the fact that long-distance natural gas pipeline systems inevitably generate energy consumption (compressor gas consumption and purchased electricity consumption) and gas emissions (methane leakage) during operation, both of which constitute significant sources of carbon emissions.

[0003] The existing technology has the following main problems:

[0004] (1) Existing input feature selection methods are one-sided and imprecise: Existing technologies either rely too much on single linear analysis (such as Pearson correlation coefficient), making it difficult to effectively identify complex nonlinear relationships; or they only use nonlinear evaluation models (such as random forests), but neglect the effective measurement of linear relationships and have poor stability. This limitation of selection leads to suboptimal model input, which fundamentally restricts prediction accuracy. In 2025, Tseng et al. published "Apply data science and feature selection techniques to predict carbon dioxide emissions in Taiwan," which argued that traditional prediction models often fail to fully consider the interaction between variables when dealing with complex multivariate datasets, thus limiting prediction accuracy. In 2025, Zhang published "Deep Graph Learning for Industrial Carbon Emission Analysis and Policy Impact," which argued that industrial carbon emission modeling faces the challenge of multicollinearity, and traditional statistical tools are difficult to effectively handle nonlinear and related features, resulting in suboptimal performance. In 2025, Ghorbal et al. published "Predicting carbon dioxide emissions using deep learning and Ninjametaheuristic optimization algorithm," which indirectly revealed the limitations of traditional feature selection methods by applying principal component analysis (PCA) and blind source separation (BSS) to improve feature selection.

[0005] (2) Blind selection of prediction models and low training efficiency: Existing technologies often directly adopt specific models such as BP neural networks or Long Short-Term Memory (LSTM) networks, but lack systematic evaluation and optimization mechanisms to ensure the optimality of the models. At the same time, these models generally use a fixed learning rate for training, and when faced with complex dynamic data, it is difficult to balance convergence speed and prediction accuracy, and they are prone to getting trapped in local optima, resulting in low training efficiency and unstable prediction results. In 2019, Hao published "Training a single AI model can emit as much carbon as five cars in their lifetimes", which pointed out that the carbon emissions generated by training a single AI model can be equivalent to the lifetime emissions of five cars, revealing the huge environmental cost of deep learning models. In 2025, Kermani et al. published "Energy-Efficient Transformer Inference: Optimization Strategies for TimeSeries Classification", which pointed out that the Transformer model has high computational cost in time series classification and proposed optimization strategies such as removing model redundancy and reducing computational accuracy to improve energy efficiency, reflecting the common challenge of low training efficiency of deep learning models. In 2025, Yang et al.'s "A Survey on Task Scheduling in Carbon-Aware Container Orchestration" argued that the intensive training and deployment of large language models (LLMs) led to a significant increase in energy consumption and carbon emissions. Also in 2025, Zanotti's "On the retraining frequency of global forecasting models" challenged the conventional wisdom that frequent retraining is crucial for maintaining prediction accuracy, proposing that reducing the retraining frequency can lower computational costs without compromising prediction performance, thereby enabling more sustainable large-scale forecasting.

[0006] In summary, there is an urgent need in this field for a systematic technical solution that can fundamentally solve the above problems. This solution should have efficient feature selection capabilities, an adaptive model optimization mechanism, and an efficient training strategy to achieve high-precision and high-efficiency measurement and prediction of pipeline carbon emissions. Summary of the Invention

[0007] The purpose of this invention is to solve the technical problems in the prior art, such as inaccurate carbon emission calculation of long-distance natural gas pipelines, imprecise feature selection in prediction, difficulty in balancing model training efficiency and accuracy, and lack of a systematic multi-model optimization mechanism. The invention provides a method for calculating and predicting carbon emissions of long-distance natural gas pipelines based on a hybrid feature selection model and dynamic multi-model optimization.

[0008] The core innovation of this invention lies in:

[0009] (1) Innovative hybrid feature screening model (PCCs-RF): By integrating linear correlation analysis (PCCs) and nonlinear importance assessment (RF), a PCCs-RF hybrid feature screening model is constructed, which can comprehensively and robustly identify the key feature variables that have the greatest impact on carbon emissions, ensuring the high quality and high representativeness of the model input, thus laying a solid foundation for achieving high-precision carbon prediction;

[0010] (2) Prediction model structure and optimization method for specific problems: A dual-channel attention adaptive long short-term memory network (DAA-LSTM) model was designed. Its parallel dual-channel structure can capture the periodic patterns and sudden event characteristics in pipeline operation, and intelligently fuse them through gating units. At the same time, a dynamic peak weighted loss function (DPW-Loss) is innovatively used for model training, forcing the model to focus on learning carbon emission peaks and key disturbance events, and combined with an adaptive learning rate strategy. The combination of this model structure and training method fundamentally improves the prediction accuracy and robustness for complex working conditions, and significantly shortens the model training time while ensuring or even improving the prediction accuracy, effectively solving the inherent contradiction between efficiency and accuracy in existing technologies.

[0011] (3) Systematic and Robust Automated Prediction Scheme: This scheme provides a systematic solution from data preparation, mixed feature screening, dynamic evaluation and selection of multiple models based on the Comprehensive Performance Index (CPI) to efficient prediction. The scheme features high accuracy and high efficiency, and shows good robustness to noisy data. It also achieves end-to-end automation, which greatly reduces the dependence on operator experience and provides reliable technical support for pipeline carbon emission prediction.

[0012] The technical solution of the present invention:

[0013] A method for calculating and predicting carbon emissions from long-distance natural gas pipelines based on hybrid feature screening and multi-model dynamic optimization includes the following steps:

[0014] (1) Data preparation and quantification: Obtain multi-dimensional operating parameters of the pipeline within a preset historical period, and quantify the multi-dimensional operating parameters into a historical total carbon emission sequence based on the emission factor method;

[0015] (2) Hybrid Feature Screening Model: A hybrid feature screening model (PCCs-RF) that integrates linear correlation analysis (PCCs) and nonlinear importance assessment (RF) is adopted to process multi-dimensional operating parameters in order to screen out the key feature variables that have the greatest impact on the total historical carbon emissions.

[0016] (3) Dynamic optimization of multiple models:

[0017] 1) Construct a multi-model prediction framework, which embeds a BP neural network, a long short-term memory network (LSTM) model, and a dual-channel attention adaptive long short-term memory network (DAA-LSTM) model, forming multiple prediction models;

[0018] 2) Based on the key feature variables obtained in step 2, train each prediction model separately, and comprehensively evaluate the performance of each prediction model by constructing a comprehensive performance evaluation index, and select the prediction model with the best comprehensive performance.

[0019] (4) Future carbon emission prediction: Input the key characteristic variable data of the period to be predicted into the prediction model with the best comprehensive performance to obtain the prediction results of the future carbon emissions of long-distance natural gas pipelines.

[0020] As a preferred embodiment, the hybrid feature screening model in step (2) further includes the following steps:

[0021] a) Linear Correlation Analysis: The Pearson correlation coefficients (PCCs) between each multidimensional operating parameter and the historical total carbon emission series are calculated to obtain the linear correlation score for each multidimensional operating parameter. Pearson correlation coefficients (PCCs), as a classic statistical method, are widely used to measure the linear correlation between variables. For example, in 2025, Joudah et al. discussed a screening method based on Pearson correlation coefficients (PCCs) in their paper "Air-HOLP: adaptive regularized feature screening for highdimensional correlated data." Although this method is simple to calculate and can effectively identify features with strong linear correlations, it is insufficient when dealing with the combined effects of multiple variables or nonlinear dependencies.

[0022] b) Nonlinear Importance Assessment: A Random Forest Regression (RF) model is constructed, using multi-dimensional operating parameters as input features and historical total carbon emissions as the target. The RF model extracts the nonlinear importance scores of each multi-dimensional operating parameter. For example, as pointed out by Htun et al. in their 2023 paper "Survey of feature selection and extraction techniques for stock market prediction," ensemble learning methods such as Random Forest (RF) are widely used and have achieved excellent prediction accuracy due to their ability to effectively assess the nonlinear importance of features. However, Random Forest may not be able to intuitively reflect the purely linear relationship between variables as readily as the Pearson coefficient during evaluation.

[0023] c) Fusion Scoring and Key Feature Identification: The linear correlation score obtained in step a) and the nonlinear importance score obtained in step b) are weighted and summed to obtain the comprehensive influence score of each multidimensional operating parameter. The calculation formula is as follows:

[0024] (1)

[0025] In the formula: The overall impact score for the i-th operating parameter; Score the linear correlation of the i-th running parameter; The nonlinear importance score for the i-th operating parameter; w is the preset weight;

[0026] Key characteristic variables were identified based on the comprehensive impact score.

[0027] As a preferred option, the multi-dimensional operating parameters include at least pipeline throughput, power consumption, gas consumption and leakage, and these four parameters are determined as the key characteristic variables in step (2).

[0028] As a preferred embodiment, the dual-channel attention adaptive long short-term memory network model has the following characteristics:

[0029] a. Dual-channel structure: The dual-channel structure is used to capture the periodic patterns and sudden event characteristics of pipeline operation;

[0030] b. Adaptive learning rate mechanism: The adaptive learning rate mechanism is implemented by configuring a learning rate adjustment callback function. The callback function monitors the loss function value of the dual-channel attention adaptive long short-term memory network model on the validation set in real time. When the loss function value does not decrease significantly within a preset number of consecutive training rounds, the current learning rate is multiplied by a preset decay factor.

[0031] c. Dynamic Peak Weighted Loss Function: The dynamic peak weighted loss function assigns a dynamic weight w to the error of each historical total carbon emission sample. t .

[0032] As a preferred embodiment, the dynamic peak-weighted loss function assigns a dynamic weight w to the error of each historical total carbon emission sample. t Calculations are performed, and the dynamic weights w are calculated. t and dynamic peak weighted loss function L DPW The calculation formula is as follows:

[0033] (2)

[0034] (3)

[0035] In the formula: The actual historical total carbon emissions at time t; Let be the predicted total carbon emissions at time t; This represents the total historical carbon emissions at time t-1. , These are importance adjustment factors, used to adjust the total real historical carbon emissions. and its changes in adjacent time periods For dynamic weight w t The degree of impact; The length of the historical total carbon emissions sequence; This represents the average of the historical total carbon emissions series. The standard deviation of the historical total carbon emissions series; This represents the average of the historical series of changes in total carbon emissions. Let y be the standard deviation of the historical total carbon emissions series; where the subscript y represents the actual historical total carbon emissions at each time point. The original sequence is formed, where the subscript Δy represents the change in the total historical carbon emissions at adjacent time points. The sequence of changes constituted.

[0036] As a preferred option, in step 3(2), the comprehensive performance evaluation index is obtained by dimensionless processing and positive processing of the prediction accuracy index and computational efficiency index of each prediction performance within the multi-model prediction framework, and then weighted summation according to preset weights.

[0037] As a preferred embodiment, the dimensionless processing and index positiveization processing include:

[0038] "The smaller the better" indicators This includes mean absolute error (MAE), mean squared error (MSE), mean absolute percentage error (MAPE), and the total time (TIME) required for any prediction model to complete training and output prediction results for the test set—indicators where "the smaller the better." Dimensionless score The calculation is as follows:

[0039] (4)

[0040] Among them, if ,but ;

[0041] "The bigger the better" indicator Including the coefficient of determination (R²) 2 Its dimensionless score The calculation is as follows:

[0042] (5)

[0043] Among them, if ,but ;

[0044] In the formula: For any prediction model, the specific calculated value for index category k; The dimensionless score for indicator category k; The minimum value of all prediction models across index category k; The maximum value of all prediction models on indicator category k;

[0045] (6)

[0046] In the formula: The weights of indicator category k are given by the sum of their respective weights. ;

[0047] Furthermore, this invention also provides a method for calculating and predicting carbon emissions from natural gas pipelines based on a hybrid feature screening model and multi-model dynamic optimization, including:

[0048] (1) Processor: used to execute the computer program;

[0049] (2) Memory: used to store the computer program, which, when executed by the processor, implements the method described in this invention.

[0050] The beneficial effects of this invention are:

[0051] Compared with the prior art, the present invention, through its original technical solution, achieves the following significant beneficial effects:

[0052] (1) Fundamental improvement in prediction accuracy: This invention employs a hybrid feature selection model (PCCs-RF) that integrates linear correlation analysis (PCCs) and nonlinear importance assessment (RF), which can more comprehensively and robustly identify key driving factors from complex operating parameters, ensuring high-quality model input. More importantly, through the innovative dual-channel attention adaptive long short-term memory network (DAA-LSTM) model and dynamic peak weighted loss function (DPW-Loss), it achieves accurate differentiation and dynamic modeling of periodic patterns and sudden disturbances, greatly improving the prediction accuracy and reliability of the model under complex operating conditions.

[0053] (2) Achieving both prediction efficiency and accuracy: This invention constructs a multi-model evaluation framework and selects the dual-channel attention adaptive long short-term memory network (DAA-LSTM) model. Combined with an adaptive learning rate strategy, it achieves an ideal training mode of rapid convergence in the early stage and fine-tuning in the later stage. While ensuring or even improving prediction accuracy, it significantly shortens the model training time and effectively solves the inherent contradiction between efficiency and accuracy in the prior art.

[0054] (3) Enhanced robustness and adaptability of the prediction scheme: The multi-model evaluation and optimization mechanism introduced in this invention systematically compares and evaluates the performance of various models, such as BP neural network, long short-term memory network (LSTM) model, and dual-channel attention adaptive long short-term memory network (DAA-LSTM) model, under specific data, and adaptively selects the prediction model with the best performance and highest efficiency. This mechanism ensures the robustness and adaptability of the prediction scheme in the face of complex and ever-changing operating environments, avoids the limitations or blind selection that may exist in a single model, and provides decision-makers with more reliable carbon emission prediction results.

[0055] (4) The technical solution has strong systematicity and guiding value: This invention provides a systematic solution from data preparation, hybrid feature screening model, multi-model dynamic optimization to efficient prediction. It has a clear structure, rigorous logic, strong operability, and significant systematicity and guiding value. Attached Figure Description

[0056] Figure 1 A schematic diagram illustrating the method for calculating and predicting carbon emissions from long-distance natural gas pipeline systems.

[0057] Figure 2 A schematic diagram of the energy consumption and carbon emission calculation model for long-distance natural gas pipelines;

[0058] Figure 3 A schematic diagram of carbon emission sources along the long-distance natural gas pipeline;

[0059] Figure 4This is a schematic diagram showing the operational data of long-distance natural gas pipelines from 2003 to 2022.

[0060] Figure 5 This is a schematic diagram showing the electricity consumption data of long-distance natural gas pipelines from 2003 to 2022.

[0061] Figure 6 This is a schematic diagram showing the gas consumption operation data of long-distance natural gas pipelines from 2003 to 2022.

[0062] Figure 7 This is a schematic diagram showing the operational data of leakage in long-distance natural gas pipelines from 2003 to 2022.

[0063] Figure 8 A schematic diagram showing the historical total carbon emissions sequence of long-distance natural gas pipelines;

[0064] Figure 9 The PCCs-RF composite score for each dimension of feature variables;

[0065] Figure 10 The diagrams show the comparison and evaluation results of the predicted and actual values ​​of each model; (a) is the comparison of the predicted and actual values ​​of the BP neural network model, (b) is the evaluation index of the BP neural network model, (c) is the comparison of the predicted and actual values ​​of the Long Short-Term Memory (LSTM) network model, (d) is the evaluation index of the Long Short-Term Memory (LSTM) network model, (e) is the comparison of the predicted and actual values ​​of the Dual-Channel Attention Adaptive Long Short-Term Memory (DAA-LSTM) network model, and (f) is the evaluation index of the Dual-Channel Attention Adaptive Long Short-Term Memory (DAA-LSTM) network model.

[0066] Figure 11 A schematic diagram of the predicted peak carbon emission path for long-distance natural gas pipelines under the baseline scenario;

[0067] Figure 12 A schematic diagram of the predicted carbon emission peaking path for long-distance natural gas pipelines under high-carbon scenarios;

[0068] Figure 13 A schematic diagram illustrating the predicted peak carbon emission path of long-distance natural gas pipelines under a low-carbon scenario;

[0069] Figure 14 This diagram illustrates the comparison of peak carbon emission paths for long-distance natural gas pipelines under three scenarios. Detailed Implementation

[0070] The present invention will be further described below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and technical features described in this application can be combined with each other. It should also be pointed out that, unless otherwise indicated, all technical and scientific terms used in this application have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terms "comprising" or "including" and similar words used in this invention refer to elements or objects preceding the word that encompass the elements or objects listed following the word and their equivalents, without excluding other elements or objects.

[0071] Taking a long-distance natural gas pipeline as an example, the implementation process of the present invention will be described in detail.

[0072] 1. Data preparation and carbon emission quantification

[0073] (1) Carbon emission source identification and calculation model construction: First, the carbon emission sources of the natural gas pipeline system are identified, mainly divided into direct emission sources and energy indirect emission sources. For example Figure 3 As shown, direct emission sources include stationary combustion emissions from gas-driven compressors, process emissions such as flare venting, and leakage from equipment valve assemblies; indirect energy emission sources mainly consist of emissions generated from the consumption of purchased electricity to drive equipment such as electric compressors. Secondly, a carbon emission calculation model is constructed based on the "bottom-up" emission factor method, and its framework diagram is shown below. Figure 2 As shown.

[0074] (2) Data Acquisition and Quantification: Monthly operational data of a large natural gas pipeline system were collected over a preset historical period (2003 to 2022 in this embodiment) as multi-dimensional operational parameters. These parameters include at least: natural gas pipeline throughput, power consumption, gas consumption, and leakage, and their historical data curves are shown below. Figures 4 to 7 As shown in the figure. Using the carbon emission calculation model described above, these multi-dimensional operating parameters are quantified into a historical total carbon emission sequence, and the calculation results are as follows. Figure 8 As shown, this provides a data foundation for subsequent steps.

[0075] 2. Hybrid Feature Filtering Model

[0076] This step employs the hybrid feature screening model (PCCs-RF) that integrates linear correlation analysis (PCCs) and nonlinear importance assessment (RF) as defined in this invention, specifically including:

[0077] (1) Linear correlation analysis: Pearson correlation coefficients (PCCs) between each multidimensional operating parameter and the historical total carbon emission series are calculated to obtain the linear correlation score.

[0078] (2) Nonlinear importance assessment: A random forest (RF) regression model is constructed, with each multi-dimensional operating parameter as a feature and the historical total carbon emission sequence as the target, to extract the nonlinear importance score of each multi-dimensional operating parameter.

[0079] (3) Fusion scoring and key feature identification: The linear and nonlinear scores are weighted and summed to obtain the comprehensive influence score, which is calculated using the following formula:

[0080] (1)

[0081] In the formula: w—preset weight, which is 0.5 in this embodiment. For example... Figure 9 As shown, calculations show that the combined impact score of the four parameters—natural gas pipeline throughput, power consumption, gas consumption, and leakage—is significantly higher than that of other parameters, and therefore they have been identified as key characteristic variables.

[0082] 3. Dynamic optimization of multiple models

[0083] This step constructs a multi-model prediction framework that embeds three prediction models: a BP neural network, a long short-term memory network (LSTM) model, and a dual-channel attention adaptive long short-term memory network (DAA-LSTM) model.

[0084] (1) Data partitioning and preprocessing: The key feature variables selected in step 2 and their corresponding historical total carbon emission sequences are divided into training set, validation set and test set in a 5:2:3 ratio according to time sequence. Max-min normalization is performed on all data.

[0085] (2) BP neural network model training: Construct a BP neural network model, and the specific parameter settings are shown in Table 1.

[0086] Table 1 BP Neural Network Model Parameters

[0087]

[0088] (3) Training of Long Short-Term Memory Network (LSTM) Model: Construct a Long Short-Term Memory Network (LSTM) model, and the specific parameter settings are shown in Table 2.

[0089] Table 2 Training parameters of Long Short-Term Memory (LSTM) network model

[0090]

[0091] (4) Training of the dual-channel attention adaptive LSTM network (DAA-LSTM) model: Considering the significant duality of carbon emission drivers in long-distance natural gas pipelines: on the one hand, parameters such as transmission volume and gas consumption are affected by seasonal demand, exhibiting obvious periodic patterns; on the other hand, sudden events such as surges in leakage caused by equipment failures and drastic changes in operating parameters caused by temporary pipeline maintenance can have a short-term but extremely significant impact on carbon emissions. Traditional single-structure models are difficult to accurately capture these two completely different patterns simultaneously.

[0092] To address this, this invention specifically designs a dual-channel attention-adaptive long short-term memory network (DAA-LSTM) model. The core innovation of this model lies in its parallel dual-channel structure, which simulates the process of expert problem analysis: focusing on both long-term trends and key anomalies. Its model architecture includes a regular channel, an event channel, a gated fusion unit, and a prediction output layer.

[0093] Furthermore, to ensure that the training objectives of the Dual-Channel Attention Adaptive Long Short-Term Memory Network (DAA-LSTM) model are highly aligned with actual business needs, this invention abandons the traditional Mean Squared Error (MSE) or Mean Absolute Error (MAE) loss function and innovatively adopts a Dynamic Peak Weighted Loss (DPW-Loss) function. The Dynamic Peak Weighted Loss (DPW-Loss) assigns a dynamic weight w to the error of each sample (historical total carbon emissions). t To solve this problem, dynamic weight w t and Dynamic Peak Weighted Loss Function (DPW-Loss) L DPW The formulas are shown in equations (1) and (2):

[0094] (1)

[0095] (2)

[0096] In the formula: The actual historical total carbon emissions at time t; Let be the predicted total carbon emissions at time t; This represents the total historical carbon emissions at time t-1. , These are importance adjustment factors, used to adjust the total real historical carbon emissions. and its changes in adjacent time periods For dynamic weight w t The degree of impact; The length of the historical total carbon emissions sequence; This represents the average of the historical total carbon emissions series. The standard deviation of the historical total carbon emissions series; This represents the average of the historical series of changes in total carbon emissions. Let y be the standard deviation of the historical total carbon emissions series; where the subscript y represents the actual historical total carbon emissions at each time point. The original sequence is formed, with the subscript Δy indicating the change in the total historical carbon emissions at adjacent time points. The sequence of changes constituted.

[0097] The Dynamic Peak Weighted Loss (DPW-Loss) and the dual-channel architecture of the Dual-Channel Attention Adaptive Long Short-Term Memory (DAA-LSTM) model form a powerful synergy: the "event channel" of the DAA-LSTM model is responsible for capturing sudden event signals structurally, while the DPW-Loss enhances the model's response to these signals from the perspective of the "training objective." This combination of "architecture recognition" and "objective guidance" is the core guarantee for the high-precision and high-robustness prediction of this invention.

[0098] Meanwhile, the model training employs an adaptive learning rate mechanism, implemented through a configured learning rate adjustment callback function. This callback function monitors the model's loss function value on the validation set in real time. When this value does not decrease significantly within a preset number of consecutive training rounds, it automatically multiplies the current learning rate by a preset decay factor. The specific parameter settings for this model are shown in Table 3.

[0099] Table 3 Training parameters of the dual-channel attention adaptive long short-term memory network (DAA-LSTM) model

[0100]

[0101] (5) Comprehensive Evaluation and Optimization of Model Performance: Based on prediction accuracy and computational efficiency, the performance of three prediction models—BP neural network, Long Short-Term Memory (LSTM) network, and the dual-channel attention adaptive long short-term memory (DAA-LSTM) network model proposed in this invention—is comprehensively evaluated. The evaluation index values ​​for each model are shown in Table 4, and the comparison curves between their predicted and actual values ​​are shown in Table 4. Figure 10 As shown.

[0102] Table 4 Model Evaluation Index Values

[0103]

[0104] In terms of prediction accuracy, the coefficients of determination (R²) of the three models... 2The mean absolute error (MAE) of the dual-channel attention adaptive long short-term memory network (DAA-LSTM) model was above 0.9995, indicating that it had a very high goodness of fit to historical data. Specifically, the MAE of the DAA-LSTM model was 0.0915tCO. 2 ) and mean square error (MSE=0.0126(tCO) 2 ) 2 The accuracy was the lowest among the three, showing the best performance and significantly outperforming the standard Long Short-Term Memory (LSTM) network model and the BP neural network model.

[0105] In terms of computational efficiency, the dual-channel attention adaptive long short-term memory network (DAA-LSTM) model takes only 12.75 seconds for both training and prediction, demonstrating a significant efficiency advantage. In comparison, the backpropagation (BP) neural network takes 18.25 seconds, while the second most accurate long short-term memory network (LSTM) model takes the longest at 33.39 seconds, approximately 2.6 times that of the DAA-LSTM model.

[0106] Traditional model evaluation often relies on comparisons of single indicators or empirical trade-offs between multiple indicators with different dimensions, which makes it difficult to arrive at optimal decisions in practical applications. To overcome this limitation, this invention innovatively introduces a Comprehensive Performance Index (CPI). The Comprehensive Performance Index (CPI) aims to provide a unified quantitative standard, quantifying the comprehensive performance of each model through the following steps:

[0107] In the following formulas, the symbol k denotes the category of each performance indicator. The categories of these performance indicators are: Mean Absolute Error (MAE), Mean Squared Error (MSE), Mean Absolute Percentage Error (MAPE), and Coefficient of Determination (R²). 2 ) and the total time (TIME) taken for any prediction model to complete training and output the prediction results for the test set.

[0108] 1. Dimensionless processing and positive index processing: First, the performance indicators used in Table 4 for calculating the Comprehensive Performance Index (CPI) (Mean Absolute Error (MAE), Mean Squared Error (MSE), Mean Absolute Percentage Error (MAPE), Coefficient of Determination (R²), and other indicators are processed accordingly. 2 The time taken to train any prediction model and output the prediction results of the test set is dimensionless and converted into a score in the [0,1] interval.

[0109] a. Regarding indicators that are "the smaller the better" (Mean absolute error (MAE), mean squared error (MSE), mean absolute percentage error (MAPE), and the total time (TIME) taken for any prediction model to complete training and output prediction results for the test set), with its dimensionless score. The calculation is as follows:

[0110] (3)

[0111] Among them, if ,but ;

[0112] b. Regarding indicators that are "the bigger the better". (Coefficient of determination (R) 2 Its dimensionless score The calculation is as follows:

[0113] (4)

[0114] Among them, if ,but ;

[0115] In the formula: For any prediction model, the specific calculated value for index category k; The dimensionless score for indicator category k; The minimum value of all prediction models on index category k; This represents the maximum value of all prediction models across indicator category k.

[0116] 2. Weighted summation calculation of the comprehensive performance evaluation index (CPI): After dimensionless and positive transformation, the scores N of each index are calculated. k We perform a weighted summation to obtain the final comprehensive performance index (CPI).

[0117] (6)

[0118] In the formula: The weights of indicator category k are given by the sum of their respective weights. These weights can be flexibly configured according to the different emphases on prediction accuracy and computational efficiency in actual business scenarios. In this embodiment, considering the priority requirement of high-precision prediction for carbon emission forecasting of long-distance natural gas pipelines, while also taking into account model operating efficiency, the following weight allocation scheme is set:

[0119] a. Prediction accuracy index (Mean Absolute Error (MAE) index) Mean Squared Error (MSE) Mean Absolute Percentage Error (MAPE) and coefficient of determination (R)2 ) Total weight: 0.75 (including) , , , Among them, the coefficient of determination (R²) 2 As a comprehensive indicator for measuring the goodness of fit of a model, it is given a relatively high weight to emphasize its importance; MAE, MSE, and MAPE, as commonly used error measures, are also given appropriate weights respectively.

[0120] b. Computational efficiency metric (the total time (TIME) required for any prediction model to complete training and output prediction results for the test set) Total weight: 0.25 (i.e.) This reflects a reasonable consideration of model calculation speed and resource consumption while ensuring high accuracy.

[0121] By calculating the Comprehensive Performance Index (CPI) value, the performance of each model across all dimensions is integrated into a single, comparable value. A higher CPI value indicates better overall model performance. Based on the weight configurations described above and the data in Table 4, the CPI value for the BP neural network model is 0.1834, the CPI value for the Long Short-Term Memory (LSTM) network model is 0.4313, while the CPI value for the proposed Dual-Channel Attention Adaptive Long Short-Term Memory (DAA-LSTM) model is the highest, reaching 1.0000.

[0122] In summary, the Dual-channel Attention Adaptive Long Short-Term Memory (DAA-LSTM) model, through its targeted dual-channel structure and peak-weighted loss function, achieves a decisive advantage in prediction accuracy, particularly in capturing key data points, while maintaining extremely high computational efficiency through adaptive learning rate. It successfully achieves the optimal balance between prediction accuracy and computational efficiency. Therefore, based on the evaluation results of the Comprehensive Performance Index (CPI), this invention preferentially selects the Dual-channel Attention Adaptive Long Short-Term Memory (DAA-LSTM) model as the best prediction model. This selection process is explicitly and quantitatively supported by the Comprehensive Performance Index (CPI).

[0123] 4. Future Carbon Emission Trend Forecasting and Application

[0124] (1) Scenario setting: The forward scenario analysis method was adopted, and basic scenario, high-carbon scenario and low-carbon scenario were set. The descriptions are shown in Table 5. The specific assumptions of the key characteristic variables (PT: natural gas pipeline transmission volume; PC: electricity consumption; GC: gas consumption; LR: leakage volume) under each scenario are shown in Table 6. The specific annual average change rate settings of each factor in different time periods are shown in Table 7.

[0125] Table 5. Description of Assumptions

[0126]

[0127] Table 6 Scenario Assumptions

[0128]

[0129] Table 7. Setting the rate of change for each factor

[0130]

[0131]

[0132]

[0133] (2) Scenario prediction and analysis: Input the key feature variable data of the period to be predicted under each scenario into the best prediction model selected in step 3 (Dual-channel attention adaptive long short-term memory network (DAA-LSTM) model) to obtain the prediction results of future carbon emissions of long-distance natural gas pipelines.

[0134] a. Baseline scenario carbon emission predictions: such as Figure 11 As shown, under this scenario, carbon emissions from natural gas pipeline systems are projected to peak in 2037, at approximately 288 × 10⁻⁶. 4 tCO2 / year. After peaking, emissions begin to decline slowly, and are projected to drop to approximately 268 × 10⁻⁶ by 2060. 4 tCO2 / year;

[0135] b. Carbon emission prediction under high-carbon scenarios: such as Figure 12 As shown, under this scenario, the peak carbon emissions will be delayed until 2041, reaching approximately 335 × 10⁻⁶. 4 tCO2 / year. Carbon emissions will still exceed 308 × 10⁻⁸ by 2060. 4 tCO2 / year, the pressure to reduce carbon emissions is enormous;

[0136] c. Low-carbon scenario carbon emission prediction: such as Figure 13 As shown, with proactive emission reduction measures and technological breakthroughs, carbon emissions are projected to peak around 2029, at approximately 275 × 10⁻⁶. 4tCO2 / year. Subsequently, carbon emissions will continue to decline rapidly, and are expected to drop to approximately 103 × 10⁻³ tCO2 / year by 2060. 4 tCO2 / year, with significant emission reduction effect;

[0137] d. Comprehensive analysis of prediction results: such as Figure 14 As shown, by comparing the prediction curves of the three scenarios, the following key insights can be drawn: (1) Significant differences in peak time: Carbon emissions under the low-carbon scenario are expected to peak earlier in 2029, while the high-carbon scenario will postpone the peak time to 2041, a difference of up to 12 years. (2) Huge gap between peak and long-term emissions: The peak of the high-carbon scenario (approximately 335 × 10⁻⁶) is much higher than the long-term emissions. 4 tCO2 / year compared to the low-carbon scenario (approximately 275 × 10⁻⁶) 4 The emissions under the high-carbon scenario (tCO2 / year) are approximately 21.8% higher; by 2060, the emissions under the high-carbon scenario (approximately 308 × 10⁻⁶) will be... 4 The tCO2 / year scenario is even more of a low-carbon scenario (approximately 103 × 10⁻⁶). 4 It is nearly three times that of tCO2 / year. This quantitatively reveals the huge differences in future emission reduction pressures under different development paths.

[0138] Figure 1 This demonstrates the overall technical framework of the method described in this invention; Figures 2-8 The document details the data preparation and carbon emission quantification stages, and sequentially presents the framework for the energy consumption and carbon emission calculation model of long-distance natural gas pipelines. Figure 2 Composition of carbon emission sources along the route ( Figure 3 ), data curves of various operating parameters (output, power consumption, gas consumption, and leakage). Figures 4-7 ) and the final calculated historical carbon emissions results ( Figure 8 ); Figure 9 The PCCs-RF comprehensive scores of feature variables in each dimension are shown, verifying the effectiveness of the core feature hybrid feature screening model of this invention; Figure 10 This intuitively demonstrates the comparison and evaluation results between the predicted and actual values ​​of each model, providing decisive data support for the present invention to select the dual-channel attention adaptive long short-term memory network (DAA-LSTM) model as the best prediction model; Figure 11 , Figure 12 and Figure 13 These are the predicted trends of future carbon emissions obtained using the optimal model under the base scenario, high-carbon scenario, and low-carbon scenario, respectively. Figure 14 By summarizing and comparing the predicted trends under different scenarios, the application value of the method of this invention and its ability as a decision support tool are fully verified.

[0139] In summary, the predictive model constructed in this invention not only provides single trend forecasts but also, through multi-scenario simulations, clearly demonstrates to decision-makers the decisive impact of different policy intensities and technological development paths on future carbon emissions. Enterprises can use this model to conduct risk assessments, formulate scientific emission reduction targets, and optimize investment strategies, providing a solid quantitative path and scientific basis for achieving 'dual carbon' goals.

[0140] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for calculating and predicting carbon emissions from long-distance natural gas pipelines based on hybrid feature screening and multi-model dynamic optimization, characterized in that... Includes the following steps: Step 1: Data preparation and quantification; The system acquires multi-dimensional operating parameters of the pipeline within a preset historical period and quantifies these parameters into a historical total carbon emission sequence based on the emission factor method. Step 2: Mixed feature filtering; A hybrid feature screening model that integrates linear correlation analysis and nonlinear importance assessment is used to process multi-dimensional operating parameters in order to screen out the key feature variables that have the greatest impact on historical total carbon emissions. Step 3: Dynamic optimization of multiple models; (1) Construct a multi-model prediction framework. The multi-model prediction framework is embedded with a BP neural network, a long short-term memory network model and a dual-channel attention adaptive long short-term memory network model, which constitute multiple prediction models. (2) Based on the key feature variables obtained in step two, train each prediction model respectively, and comprehensively evaluate the performance of each prediction model by constructing a comprehensive performance evaluation index, and select the prediction model with the best comprehensive performance. Step 4: Future Emissions Forecasting; Key characteristic variable data for the period to be predicted are input into the best-performing prediction model to obtain the prediction results of future carbon emissions from long-distance natural gas pipelines.

2. The method for calculating and predicting carbon emissions from long-distance natural gas pipelines according to claim 1, characterized in that, The specific implementation process of step two is as follows: a) Linear correlation analysis: Calculate the Pearson correlation coefficient between each multi-dimensional operating parameter and the historical total carbon emission series to obtain the linear correlation score of each multi-dimensional operating parameter; b) Nonlinear importance assessment: Construct a random forest regression model, in which multidimensional operating parameters are used as input features of the random forest regression model, and the historical total carbon emission sequence is used as the target of the random forest regression model. The nonlinear importance score of each multidimensional operating parameter is extracted through the random forest regression model. c) Fusion Scoring and Key Feature Identification: The linear correlation score obtained in step a) and the nonlinear importance score obtained in step b) are weighted and summed to obtain the comprehensive influence score of each multidimensional operating parameter. The calculation formula is as follows: (1); In the formula: The overall impact score for the i-th operating parameter; Score the linear correlation of the i-th running parameter; Score the nonlinear importance of the i-th operating parameter; w is the preset weight; Key characteristic variables were identified based on the comprehensive impact score.

3. The method for calculating and predicting carbon emissions from long-distance natural gas pipelines according to claim 1, characterized in that, The dual-channel attention adaptive long short-term memory network model has the following characteristics: a. Dual-channel structure: The dual-channel structure is used to capture the periodic patterns and sudden event characteristics of pipeline operation; b. Adaptive learning rate mechanism: The adaptive learning rate mechanism is implemented by configuring a learning rate adjustment callback function. The callback function monitors the loss function value of the dual-channel attention adaptive long short-term memory network model on the validation set in real time. When the loss function value does not decrease significantly within a preset number of consecutive training rounds, the current learning rate is multiplied by a preset decay factor. c. Dynamic Peak Weighted Loss Function: The dynamic peak weighted loss function assigns a dynamic weight w to the error of each historical total carbon emission sample. t .

4. The method for calculating and predicting carbon emissions from long-distance natural gas pipelines according to claim 3, characterized in that, The dynamic peak-weighted loss function assigns a dynamic weight w to the error of each historical total carbon emission sample. t Calculations are performed, and the dynamic weights w are calculated. t and dynamic peak weighted loss function L DPW The calculation formula is as follows: (2); (3); In the formula: The actual historical total carbon emissions at time t; Let be the predicted total carbon emissions at time t; This represents the total historical carbon emissions at time t-1. , These are importance adjustment factors, used to adjust the total real historical carbon emissions. and its changes in adjacent time periods For dynamic weight w t The degree of impact; The length of the historical total carbon emissions sequence; This represents the average of the historical total carbon emissions series. The standard deviation of the historical total carbon emissions series; This represents the average of the historical series of changes in total carbon emissions. Let y be the standard deviation of the historical total carbon emissions series; where the subscript y represents the actual historical total carbon emissions at each time point. The original sequence is formed, where the subscript Δy represents the change in the total historical carbon emissions at adjacent time points. The sequence of changes constituted.

5. The method for calculating and predicting carbon emissions from long-distance natural gas pipelines according to claim 1, characterized in that, In step three (2), the comprehensive performance evaluation index is obtained by dimensionless processing and positive processing of the prediction accuracy index and computational efficiency index of each prediction performance in the multi-model prediction framework, and by weighted summation according to preset weights.

6. The method for calculating and predicting carbon emissions from long-distance natural gas pipelines according to claim 5, characterized in that, The dimensionless processing and index positiveization processing include: "The smaller the better" indicators This includes the mean absolute error, mean squared error, mean absolute percentage error, and the total time taken for any prediction model to complete training and output prediction results for the test set; the smaller the better. Dimensionless score The calculation is as follows: (4); Among them, if ,but ; "The bigger the better" indicator Including the coefficient of determination and its dimensionless score The calculation is as follows: (5); Among them, if ,but ; In the formula: For any prediction model, the specific calculated value for index category k; The dimensionless score for indicator category k; The minimum value of all prediction models on index category k; The maximum value of all prediction models on indicator category k; (6); In the formula: The weights of indicator category k are given by the sum of their respective weights. .

7. The method according to claim 1, characterized in that, The prediction model with the best overall performance selected in step three (2) is the dual-channel attention adaptive long short-term memory network model.